-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7b9eb8e
commit b2f6eda
Showing
7 changed files
with
458 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
configured_endpoints: 14 | ||
configured_endpoints: 15 | ||
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/riza%2Friza-api-53d443fce326642ac4579e178d39bd12a49ed8230f1264bda8da4c805d4ae71f.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,111 @@ | ||
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. | ||
|
||
from __future__ import annotations | ||
|
||
from typing import Dict, Iterable, Optional | ||
from typing_extensions import Literal, Required, TypedDict | ||
|
||
__all__ = [ | ||
"CommandExecFuncParams", | ||
"File", | ||
"HTTP", | ||
"HTTPAllow", | ||
"HTTPAllowAuth", | ||
"HTTPAllowAuthBasic", | ||
"HTTPAllowAuthBearer", | ||
"HTTPAllowAuthHeader", | ||
"HTTPAllowAuthQuery", | ||
"Limits", | ||
] | ||
|
||
|
||
class CommandExecFuncParams(TypedDict, total=False): | ||
code: Required[str] | ||
"""The function to execute. | ||
Your code must define a function named 'execute' and return a JSON-serializable | ||
value. | ||
""" | ||
|
||
language: Required[Literal["python", "javascript", "typescript", "ruby", "php"]] | ||
"""The interpreter to use when executing code.""" | ||
|
||
env: Dict[str, str] | ||
"""Set of key-value pairs to add to the script's execution environment.""" | ||
|
||
files: Iterable[File] | ||
"""List of input files.""" | ||
|
||
http: Optional[HTTP] | ||
"""Configuration for HTTP requests and authentication.""" | ||
|
||
input: object | ||
|
||
limits: Optional[Limits] | ||
"""Configuration for execution environment limits.""" | ||
|
||
runtime_revision_id: str | ||
"""The ID of the runtime revision to use when executing code.""" | ||
|
||
|
||
class File(TypedDict, total=False): | ||
contents: str | ||
"""The contents of the file.""" | ||
|
||
path: str | ||
"""The relative path of the file.""" | ||
|
||
|
||
class HTTPAllowAuthBasic(TypedDict, total=False): | ||
password: str | ||
|
||
user_id: str | ||
|
||
|
||
class HTTPAllowAuthBearer(TypedDict, total=False): | ||
token: str | ||
"""The token to set, e.g. 'Authorization: Bearer <token>'.""" | ||
|
||
|
||
class HTTPAllowAuthHeader(TypedDict, total=False): | ||
name: str | ||
|
||
value: str | ||
|
||
|
||
class HTTPAllowAuthQuery(TypedDict, total=False): | ||
key: str | ||
|
||
value: str | ||
|
||
|
||
class HTTPAllowAuth(TypedDict, total=False): | ||
basic: Optional[HTTPAllowAuthBasic] | ||
|
||
bearer: Optional[HTTPAllowAuthBearer] | ||
"""Configuration to add an 'Authorization' header using the 'Bearer' scheme.""" | ||
|
||
header: Optional[HTTPAllowAuthHeader] | ||
|
||
query: Optional[HTTPAllowAuthQuery] | ||
|
||
|
||
class HTTPAllow(TypedDict, total=False): | ||
auth: HTTPAllowAuth | ||
"""Authentication configuration for outbound requests to this host.""" | ||
|
||
host: str | ||
"""The hostname to allow.""" | ||
|
||
|
||
class HTTP(TypedDict, total=False): | ||
allow: Iterable[HTTPAllow] | ||
"""List of allowed HTTP hosts and associated authentication.""" | ||
|
||
|
||
class Limits(TypedDict, total=False): | ||
execution_timeout: int | ||
"""The maximum time allowed for execution (in seconds). Default is 30.""" | ||
|
||
memory_size: int | ||
"""The maximum memory allowed for execution (in MiB). Default is 128.""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. | ||
|
||
from typing import Optional | ||
from typing_extensions import Literal | ||
|
||
from .._models import BaseModel | ||
|
||
__all__ = ["CommandExecFuncResponse", "Execution"] | ||
|
||
|
||
class Execution(BaseModel): | ||
exit_code: Optional[int] = None | ||
"""The exit code returned by the script. | ||
Will often be '0' on success and non-zero on failure. | ||
""" | ||
|
||
stderr: Optional[str] = None | ||
"""The contents of 'stderr' after executing the script.""" | ||
|
||
stdout: Optional[str] = None | ||
"""The contents of 'stdout' after executing the script.""" | ||
|
||
|
||
class CommandExecFuncResponse(BaseModel): | ||
execution: Optional[Execution] = None | ||
|
||
output: Optional[object] = None | ||
|
||
output_status: Optional[Literal["error", "json_serialization_error", "valid"]] = None | ||
"""The status of the output. | ||
"valid" means your function executed successfully and returned a valid | ||
JSON-serializable object, or void. "json_serialization_error" means your | ||
function executed successfully, but returned a nonserializable object. "error" | ||
means your function failed to execute. | ||
""" |
Oops, something went wrong.