gcore 0.4.0__py3-none-any.whl → 0.5.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of gcore might be problematic. Click here for more details.
- gcore/_base_client.py +9 -2
- gcore/_client.py +9 -0
- gcore/_constants.py +2 -2
- gcore/_models.py +8 -5
- gcore/_version.py +1 -1
- gcore/pagination.py +192 -1
- gcore/resources/__init__.py +14 -0
- gcore/resources/cloud/baremetal/servers.py +2 -2
- gcore/resources/cloud/gpu_baremetal_clusters/gpu_baremetal_clusters.py +2 -2
- gcore/resources/cloud/inference/deployments/deployments.py +66 -33
- gcore/resources/cloud/inference/deployments/logs.py +7 -7
- gcore/resources/cloud/inference/inference.py +5 -5
- gcore/resources/cloud/inference/models.py +16 -15
- gcore/resources/cloud/inference/registry_credentials.py +16 -16
- gcore/resources/cloud/inference/secrets.py +4 -5
- gcore/resources/cloud/instances/instances.py +2 -2
- gcore/resources/cloud/secrets.py +14 -224
- gcore/resources/cloud/tasks.py +30 -28
- gcore/resources/fastedge/__init__.py +103 -0
- gcore/resources/fastedge/apps/__init__.py +33 -0
- gcore/resources/fastedge/apps/apps.py +932 -0
- gcore/resources/fastedge/apps/logs.py +248 -0
- gcore/resources/fastedge/binaries.py +286 -0
- gcore/resources/fastedge/fastedge.py +327 -0
- gcore/resources/fastedge/kv_stores.py +523 -0
- gcore/resources/fastedge/secrets.py +687 -0
- gcore/resources/fastedge/statistics.py +347 -0
- gcore/resources/fastedge/templates.py +652 -0
- gcore/types/cloud/__init__.py +2 -28
- gcore/types/cloud/baremetal/server_create_params.py +1 -1
- gcore/types/cloud/gpu_baremetal_cluster_create_params.py +1 -1
- gcore/types/cloud/inference/__init__.py +12 -8
- gcore/types/cloud/inference/deployment_create_params.py +224 -7
- gcore/types/cloud/inference/deployment_update_params.py +24 -3
- gcore/types/cloud/inference/deployments/__init__.py +1 -0
- gcore/types/cloud/inference/{inference_log.py → deployments/inference_deployment_log.py} +3 -3
- gcore/types/cloud/inference/inference_deployment.py +266 -0
- gcore/types/cloud/inference/{inference_apikey_secret.py → inference_deployment_api_key.py} +2 -2
- gcore/types/cloud/inference/{mlcatalog_model_card.py → inference_model.py} +2 -2
- gcore/types/cloud/inference/{inference_registry_credential.py → inference_registry_credentials.py} +2 -2
- gcore/types/cloud/inference/{inference_registry_credential_full.py → inference_registry_credentials_create.py} +2 -2
- gcore/types/cloud/inference/inference_secret.py +10 -3
- gcore/types/cloud/inference/model_list_params.py +2 -4
- gcore/types/cloud/{container_probe.py → inference/probe.py} +9 -9
- gcore/types/cloud/{container_probe_config.py → inference/probe_config.py} +5 -5
- gcore/types/cloud/{container_probe_exec.py → inference/probe_exec.py} +3 -3
- gcore/types/cloud/{container_probe_http_get.py → inference/probe_http_get.py} +3 -3
- gcore/types/cloud/{container_probe_tcp_socket.py → inference/probe_tcp_socket.py} +3 -3
- gcore/types/cloud/inference/secret_create_params.py +10 -4
- gcore/types/cloud/inference/secret_replace_params.py +10 -4
- gcore/types/cloud/{region_capacity.py → inference_region_capacity.py} +10 -3
- gcore/types/cloud/{region_capacity_list.py → inference_region_capacity_list.py} +4 -4
- gcore/types/cloud/instance_create_params.py +1 -1
- gcore/types/cloud/task_list_params.py +15 -14
- gcore/types/fastedge/__init__.py +48 -0
- gcore/types/fastedge/app.py +81 -0
- gcore/types/fastedge/app_create_params.py +56 -0
- gcore/types/fastedge/app_list_params.py +50 -0
- gcore/types/fastedge/app_param.py +56 -0
- gcore/types/fastedge/app_replace_params.py +17 -0
- gcore/types/fastedge/app_short.py +60 -0
- gcore/types/fastedge/app_update_params.py +56 -0
- gcore/types/fastedge/apps/__init__.py +6 -0
- gcore/types/fastedge/apps/log.py +28 -0
- gcore/types/fastedge/apps/log_list_params.py +37 -0
- gcore/types/fastedge/binary.py +40 -0
- gcore/types/fastedge/binary_list_response.py +12 -0
- gcore/types/fastedge/binary_short.py +32 -0
- gcore/types/fastedge/call_status.py +24 -0
- gcore/types/fastedge/client.py +57 -0
- gcore/types/fastedge/duration_stats.py +30 -0
- gcore/types/fastedge/kv_store.py +33 -0
- gcore/types/fastedge/kv_store_create_params.py +23 -0
- gcore/types/fastedge/kv_store_get_response.py +10 -0
- gcore/types/fastedge/kv_store_list_params.py +12 -0
- gcore/types/fastedge/kv_store_list_response.py +15 -0
- gcore/types/fastedge/kv_store_replace_params.py +23 -0
- gcore/types/fastedge/kv_store_short.py +19 -0
- gcore/types/fastedge/kv_store_stats.py +26 -0
- gcore/types/fastedge/secret.py +29 -0
- gcore/types/fastedge/secret_create_params.py +27 -0
- gcore/types/fastedge/secret_create_response.py +12 -0
- gcore/types/fastedge/secret_delete_params.py +12 -0
- gcore/types/fastedge/secret_list_params.py +15 -0
- gcore/types/{cloud → fastedge}/secret_list_response.py +2 -6
- gcore/types/fastedge/secret_replace_params.py +27 -0
- gcore/types/fastedge/secret_short.py +21 -0
- gcore/types/fastedge/secret_update_params.py +27 -0
- gcore/types/fastedge/statistic_get_call_series_params.py +28 -0
- gcore/types/fastedge/statistic_get_call_series_response.py +12 -0
- gcore/types/fastedge/statistic_get_duration_series_params.py +28 -0
- gcore/types/fastedge/statistic_get_duration_series_response.py +12 -0
- gcore/types/fastedge/template.py +31 -0
- gcore/types/fastedge/template_create_params.py +30 -0
- gcore/types/fastedge/template_delete_params.py +12 -0
- gcore/types/fastedge/template_list_params.py +25 -0
- gcore/types/fastedge/template_parameter.py +22 -0
- gcore/types/fastedge/template_parameter_param.py +21 -0
- gcore/types/fastedge/template_replace_params.py +30 -0
- gcore/types/fastedge/template_short.py +27 -0
- {gcore-0.4.0.dist-info → gcore-0.5.0.dist-info}/METADATA +7 -5
- {gcore-0.4.0.dist-info → gcore-0.5.0.dist-info}/RECORD +104 -69
- gcore/types/cloud/aws_iam_data.py +0 -13
- gcore/types/cloud/aws_iam_data_param.py +0 -15
- gcore/types/cloud/capacity.py +0 -13
- gcore/types/cloud/container_probe_config_create_param.py +0 -17
- gcore/types/cloud/container_probe_create_param.py +0 -38
- gcore/types/cloud/container_probe_exec_create_param.py +0 -13
- gcore/types/cloud/container_probe_http_get_create_param.py +0 -25
- gcore/types/cloud/container_probe_tcp_socket_create_param.py +0 -12
- gcore/types/cloud/container_scale.py +0 -25
- gcore/types/cloud/container_scale_trigger_rate.py +0 -13
- gcore/types/cloud/container_scale_trigger_sqs.py +0 -33
- gcore/types/cloud/container_scale_trigger_threshold.py +0 -10
- gcore/types/cloud/container_scale_triggers.py +0 -36
- gcore/types/cloud/deploy_status.py +0 -13
- gcore/types/cloud/inference/container.py +0 -26
- gcore/types/cloud/inference/inference.py +0 -95
- gcore/types/cloud/inference/mlcatalog_order_by_choices.py +0 -7
- gcore/types/cloud/inference_probes.py +0 -19
- gcore/types/cloud/ingress_opts_out.py +0 -16
- gcore/types/cloud/ingress_opts_param.py +0 -18
- gcore/types/cloud/secret_create_params.py +0 -66
- {gcore-0.4.0.dist-info → gcore-0.5.0.dist-info}/WHEEL +0 -0
- {gcore-0.4.0.dist-info → gcore-0.5.0.dist-info}/licenses/LICENSE +0 -0
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from .app import App as App
|
|
6
|
+
from .binary import Binary as Binary
|
|
7
|
+
from .client import Client as Client
|
|
8
|
+
from .secret import Secret as Secret
|
|
9
|
+
from .kv_store import KvStore as KvStore
|
|
10
|
+
from .template import Template as Template
|
|
11
|
+
from .app_param import AppParam as AppParam
|
|
12
|
+
from .app_short import AppShort as AppShort
|
|
13
|
+
from .call_status import CallStatus as CallStatus
|
|
14
|
+
from .binary_short import BinaryShort as BinaryShort
|
|
15
|
+
from .secret_short import SecretShort as SecretShort
|
|
16
|
+
from .duration_stats import DurationStats as DurationStats
|
|
17
|
+
from .kv_store_short import KvStoreShort as KvStoreShort
|
|
18
|
+
from .kv_store_stats import KvStoreStats as KvStoreStats
|
|
19
|
+
from .template_short import TemplateShort as TemplateShort
|
|
20
|
+
from .app_list_params import AppListParams as AppListParams
|
|
21
|
+
from .app_create_params import AppCreateParams as AppCreateParams
|
|
22
|
+
from .app_update_params import AppUpdateParams as AppUpdateParams
|
|
23
|
+
from .app_replace_params import AppReplaceParams as AppReplaceParams
|
|
24
|
+
from .secret_list_params import SecretListParams as SecretListParams
|
|
25
|
+
from .template_parameter import TemplateParameter as TemplateParameter
|
|
26
|
+
from .binary_list_response import BinaryListResponse as BinaryListResponse
|
|
27
|
+
from .kv_store_list_params import KvStoreListParams as KvStoreListParams
|
|
28
|
+
from .secret_create_params import SecretCreateParams as SecretCreateParams
|
|
29
|
+
from .secret_delete_params import SecretDeleteParams as SecretDeleteParams
|
|
30
|
+
from .secret_list_response import SecretListResponse as SecretListResponse
|
|
31
|
+
from .secret_update_params import SecretUpdateParams as SecretUpdateParams
|
|
32
|
+
from .template_list_params import TemplateListParams as TemplateListParams
|
|
33
|
+
from .kv_store_get_response import KvStoreGetResponse as KvStoreGetResponse
|
|
34
|
+
from .secret_replace_params import SecretReplaceParams as SecretReplaceParams
|
|
35
|
+
from .kv_store_create_params import KvStoreCreateParams as KvStoreCreateParams
|
|
36
|
+
from .kv_store_list_response import KvStoreListResponse as KvStoreListResponse
|
|
37
|
+
from .secret_create_response import SecretCreateResponse as SecretCreateResponse
|
|
38
|
+
from .template_create_params import TemplateCreateParams as TemplateCreateParams
|
|
39
|
+
from .template_delete_params import TemplateDeleteParams as TemplateDeleteParams
|
|
40
|
+
from .kv_store_replace_params import KvStoreReplaceParams as KvStoreReplaceParams
|
|
41
|
+
from .template_replace_params import TemplateReplaceParams as TemplateReplaceParams
|
|
42
|
+
from .template_parameter_param import TemplateParameterParam as TemplateParameterParam
|
|
43
|
+
from .statistic_get_call_series_params import StatisticGetCallSeriesParams as StatisticGetCallSeriesParams
|
|
44
|
+
from .statistic_get_call_series_response import StatisticGetCallSeriesResponse as StatisticGetCallSeriesResponse
|
|
45
|
+
from .statistic_get_duration_series_params import StatisticGetDurationSeriesParams as StatisticGetDurationSeriesParams
|
|
46
|
+
from .statistic_get_duration_series_response import (
|
|
47
|
+
StatisticGetDurationSeriesResponse as StatisticGetDurationSeriesResponse,
|
|
48
|
+
)
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import Dict, List, Optional
|
|
4
|
+
from datetime import datetime
|
|
5
|
+
from typing_extensions import Literal
|
|
6
|
+
|
|
7
|
+
from ..._models import BaseModel
|
|
8
|
+
|
|
9
|
+
__all__ = ["App", "Secrets"]
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class Secrets(BaseModel):
|
|
13
|
+
id: int
|
|
14
|
+
"""The unique identifier of the secret."""
|
|
15
|
+
|
|
16
|
+
comment: Optional[str] = None
|
|
17
|
+
"""A description or comment about the secret."""
|
|
18
|
+
|
|
19
|
+
name: Optional[str] = None
|
|
20
|
+
"""The unique name of the secret."""
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
class App(BaseModel):
|
|
24
|
+
api_type: Optional[str] = None
|
|
25
|
+
"""Wasm API type"""
|
|
26
|
+
|
|
27
|
+
binary: Optional[int] = None
|
|
28
|
+
"""Binary ID"""
|
|
29
|
+
|
|
30
|
+
comment: Optional[str] = None
|
|
31
|
+
"""App description"""
|
|
32
|
+
|
|
33
|
+
debug_until: Optional[datetime] = None
|
|
34
|
+
"""When debugging finishes"""
|
|
35
|
+
|
|
36
|
+
env: Optional[Dict[str, str]] = None
|
|
37
|
+
"""Environment variables"""
|
|
38
|
+
|
|
39
|
+
log: Optional[Literal["kafka", "none"]] = None
|
|
40
|
+
"""Logging channel (by default - kafka, which allows exploring logs with API)"""
|
|
41
|
+
|
|
42
|
+
name: Optional[str] = None
|
|
43
|
+
"""App name"""
|
|
44
|
+
|
|
45
|
+
networks: Optional[List[str]] = None
|
|
46
|
+
"""Networks"""
|
|
47
|
+
|
|
48
|
+
plan: Optional[str] = None
|
|
49
|
+
"""Plan name"""
|
|
50
|
+
|
|
51
|
+
plan_id: Optional[int] = None
|
|
52
|
+
"""Plan ID"""
|
|
53
|
+
|
|
54
|
+
rsp_headers: Optional[Dict[str, str]] = None
|
|
55
|
+
"""Extra headers to add to the response"""
|
|
56
|
+
|
|
57
|
+
secrets: Optional[Dict[str, Secrets]] = None
|
|
58
|
+
"""Application secrets"""
|
|
59
|
+
|
|
60
|
+
status: Optional[int] = None
|
|
61
|
+
"""
|
|
62
|
+
Status code:
|
|
63
|
+
0 - draft (inactive)
|
|
64
|
+
1 - enabled
|
|
65
|
+
2 - disabled
|
|
66
|
+
3 - hourly call limit exceeded
|
|
67
|
+
4 - daily call limit exceeded
|
|
68
|
+
5 - suspended
|
|
69
|
+
"""
|
|
70
|
+
|
|
71
|
+
stores: Optional[Dict[str, int]] = None
|
|
72
|
+
"""KV stores for the app"""
|
|
73
|
+
|
|
74
|
+
template: Optional[int] = None
|
|
75
|
+
"""Template ID"""
|
|
76
|
+
|
|
77
|
+
template_name: Optional[str] = None
|
|
78
|
+
"""Template name"""
|
|
79
|
+
|
|
80
|
+
url: Optional[str] = None
|
|
81
|
+
"""App URL"""
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing import Dict, Optional
|
|
6
|
+
from typing_extensions import Literal, Required, TypedDict
|
|
7
|
+
|
|
8
|
+
__all__ = ["AppCreateParams", "Secrets"]
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class AppCreateParams(TypedDict, total=False):
|
|
12
|
+
binary: int
|
|
13
|
+
"""Binary ID"""
|
|
14
|
+
|
|
15
|
+
comment: str
|
|
16
|
+
"""App description"""
|
|
17
|
+
|
|
18
|
+
debug: bool
|
|
19
|
+
"""Switch on logging for 30 minutes (switched off by default)"""
|
|
20
|
+
|
|
21
|
+
env: Dict[str, str]
|
|
22
|
+
"""Environment variables"""
|
|
23
|
+
|
|
24
|
+
log: Optional[Literal["kafka", "none"]]
|
|
25
|
+
"""Logging channel (by default - kafka, which allows exploring logs with API)"""
|
|
26
|
+
|
|
27
|
+
name: str
|
|
28
|
+
"""App name"""
|
|
29
|
+
|
|
30
|
+
rsp_headers: Dict[str, str]
|
|
31
|
+
"""Extra headers to add to the response"""
|
|
32
|
+
|
|
33
|
+
secrets: Dict[str, Secrets]
|
|
34
|
+
"""Application secrets"""
|
|
35
|
+
|
|
36
|
+
status: int
|
|
37
|
+
"""
|
|
38
|
+
Status code:
|
|
39
|
+
0 - draft (inactive)
|
|
40
|
+
1 - enabled
|
|
41
|
+
2 - disabled
|
|
42
|
+
3 - hourly call limit exceeded
|
|
43
|
+
4 - daily call limit exceeded
|
|
44
|
+
5 - suspended
|
|
45
|
+
"""
|
|
46
|
+
|
|
47
|
+
stores: Dict[str, int]
|
|
48
|
+
"""KV stores for the app"""
|
|
49
|
+
|
|
50
|
+
template: int
|
|
51
|
+
"""Template ID"""
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
class Secrets(TypedDict, total=False):
|
|
55
|
+
id: Required[int]
|
|
56
|
+
"""The unique identifier of the secret."""
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing_extensions import Literal, TypedDict
|
|
6
|
+
|
|
7
|
+
__all__ = ["AppListParams"]
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class AppListParams(TypedDict, total=False):
|
|
11
|
+
api_type: Literal["wasi-http", "proxy-wasm"]
|
|
12
|
+
"""
|
|
13
|
+
API type:
|
|
14
|
+
wasi-http - WASI with HTTP entry point
|
|
15
|
+
proxy-wasm - Proxy-Wasm app, callable from CDN
|
|
16
|
+
"""
|
|
17
|
+
|
|
18
|
+
binary: int
|
|
19
|
+
"""Binary ID"""
|
|
20
|
+
|
|
21
|
+
limit: int
|
|
22
|
+
"""Limit for pagination"""
|
|
23
|
+
|
|
24
|
+
name: str
|
|
25
|
+
"""Name of the app"""
|
|
26
|
+
|
|
27
|
+
offset: int
|
|
28
|
+
"""Offset for pagination"""
|
|
29
|
+
|
|
30
|
+
ordering: Literal[
|
|
31
|
+
"name", "-name", "status", "-status", "id", "-id", "template", "-template", "binary", "-binary", "plan", "-plan"
|
|
32
|
+
]
|
|
33
|
+
"""Ordering"""
|
|
34
|
+
|
|
35
|
+
plan: int
|
|
36
|
+
"""Plan ID"""
|
|
37
|
+
|
|
38
|
+
status: int
|
|
39
|
+
"""
|
|
40
|
+
Status code:
|
|
41
|
+
0 - draft (inactive)
|
|
42
|
+
1 - enabled
|
|
43
|
+
2 - disabled
|
|
44
|
+
3 - hourly call limit exceeded
|
|
45
|
+
4 - daily call limit exceeded
|
|
46
|
+
5 - suspended
|
|
47
|
+
"""
|
|
48
|
+
|
|
49
|
+
template: int
|
|
50
|
+
"""Template ID"""
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing import Dict, Optional
|
|
6
|
+
from typing_extensions import Literal, Required, TypedDict
|
|
7
|
+
|
|
8
|
+
__all__ = ["AppParam", "Secrets"]
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class Secrets(TypedDict, total=False):
|
|
12
|
+
id: Required[int]
|
|
13
|
+
"""The unique identifier of the secret."""
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
class AppParam(TypedDict, total=False):
|
|
17
|
+
binary: int
|
|
18
|
+
"""Binary ID"""
|
|
19
|
+
|
|
20
|
+
comment: str
|
|
21
|
+
"""App description"""
|
|
22
|
+
|
|
23
|
+
debug: bool
|
|
24
|
+
"""Switch on logging for 30 minutes (switched off by default)"""
|
|
25
|
+
|
|
26
|
+
env: Dict[str, str]
|
|
27
|
+
"""Environment variables"""
|
|
28
|
+
|
|
29
|
+
log: Optional[Literal["kafka", "none"]]
|
|
30
|
+
"""Logging channel (by default - kafka, which allows exploring logs with API)"""
|
|
31
|
+
|
|
32
|
+
name: str
|
|
33
|
+
"""App name"""
|
|
34
|
+
|
|
35
|
+
rsp_headers: Dict[str, str]
|
|
36
|
+
"""Extra headers to add to the response"""
|
|
37
|
+
|
|
38
|
+
secrets: Dict[str, Secrets]
|
|
39
|
+
"""Application secrets"""
|
|
40
|
+
|
|
41
|
+
status: int
|
|
42
|
+
"""
|
|
43
|
+
Status code:
|
|
44
|
+
0 - draft (inactive)
|
|
45
|
+
1 - enabled
|
|
46
|
+
2 - disabled
|
|
47
|
+
3 - hourly call limit exceeded
|
|
48
|
+
4 - daily call limit exceeded
|
|
49
|
+
5 - suspended
|
|
50
|
+
"""
|
|
51
|
+
|
|
52
|
+
stores: Dict[str, int]
|
|
53
|
+
"""KV stores for the app"""
|
|
54
|
+
|
|
55
|
+
template: int
|
|
56
|
+
"""Template ID"""
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing_extensions import TypedDict
|
|
6
|
+
|
|
7
|
+
from .app_param import AppParam
|
|
8
|
+
|
|
9
|
+
__all__ = ["AppReplaceParams", "Body"]
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class AppReplaceParams(TypedDict, total=False):
|
|
13
|
+
body: Body
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
class Body(AppParam, total=False):
|
|
17
|
+
pass
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import List, Optional
|
|
4
|
+
from datetime import datetime
|
|
5
|
+
|
|
6
|
+
from ..._models import BaseModel
|
|
7
|
+
|
|
8
|
+
__all__ = ["AppShort"]
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class AppShort(BaseModel):
|
|
12
|
+
id: int
|
|
13
|
+
"""App ID"""
|
|
14
|
+
|
|
15
|
+
api_type: str
|
|
16
|
+
"""Wasm API type"""
|
|
17
|
+
|
|
18
|
+
binary: int
|
|
19
|
+
"""Binary ID"""
|
|
20
|
+
|
|
21
|
+
name: str
|
|
22
|
+
"""App name"""
|
|
23
|
+
|
|
24
|
+
plan_id: int
|
|
25
|
+
"""Application plan ID"""
|
|
26
|
+
|
|
27
|
+
status: int
|
|
28
|
+
"""
|
|
29
|
+
Status code:
|
|
30
|
+
0 - draft (inactive)
|
|
31
|
+
1 - enabled
|
|
32
|
+
2 - disabled
|
|
33
|
+
3 - hourly call limit exceeded
|
|
34
|
+
4 - daily call limit exceeded
|
|
35
|
+
5 - suspended
|
|
36
|
+
"""
|
|
37
|
+
|
|
38
|
+
comment: Optional[str] = None
|
|
39
|
+
"""Description of the binary"""
|
|
40
|
+
|
|
41
|
+
debug_until: Optional[datetime] = None
|
|
42
|
+
"""When debugging finishes"""
|
|
43
|
+
|
|
44
|
+
networks: Optional[List[str]] = None
|
|
45
|
+
"""Networks"""
|
|
46
|
+
|
|
47
|
+
plan: Optional[str] = None
|
|
48
|
+
"""Application plan name"""
|
|
49
|
+
|
|
50
|
+
template: Optional[int] = None
|
|
51
|
+
"""Template ID"""
|
|
52
|
+
|
|
53
|
+
template_name: Optional[str] = None
|
|
54
|
+
"""Template name"""
|
|
55
|
+
|
|
56
|
+
upgradeable_to: Optional[int] = None
|
|
57
|
+
"""ID of the binary the app can be upgraded to"""
|
|
58
|
+
|
|
59
|
+
url: Optional[str] = None
|
|
60
|
+
"""App URL"""
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing import Dict, Optional
|
|
6
|
+
from typing_extensions import Literal, Required, TypedDict
|
|
7
|
+
|
|
8
|
+
__all__ = ["AppUpdateParams", "Secrets"]
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class AppUpdateParams(TypedDict, total=False):
|
|
12
|
+
binary: int
|
|
13
|
+
"""Binary ID"""
|
|
14
|
+
|
|
15
|
+
comment: str
|
|
16
|
+
"""App description"""
|
|
17
|
+
|
|
18
|
+
debug: bool
|
|
19
|
+
"""Switch on logging for 30 minutes (switched off by default)"""
|
|
20
|
+
|
|
21
|
+
env: Dict[str, str]
|
|
22
|
+
"""Environment variables"""
|
|
23
|
+
|
|
24
|
+
log: Optional[Literal["kafka", "none"]]
|
|
25
|
+
"""Logging channel (by default - kafka, which allows exploring logs with API)"""
|
|
26
|
+
|
|
27
|
+
name: str
|
|
28
|
+
"""App name"""
|
|
29
|
+
|
|
30
|
+
rsp_headers: Dict[str, str]
|
|
31
|
+
"""Extra headers to add to the response"""
|
|
32
|
+
|
|
33
|
+
secrets: Dict[str, Secrets]
|
|
34
|
+
"""Application secrets"""
|
|
35
|
+
|
|
36
|
+
status: int
|
|
37
|
+
"""
|
|
38
|
+
Status code:
|
|
39
|
+
0 - draft (inactive)
|
|
40
|
+
1 - enabled
|
|
41
|
+
2 - disabled
|
|
42
|
+
3 - hourly call limit exceeded
|
|
43
|
+
4 - daily call limit exceeded
|
|
44
|
+
5 - suspended
|
|
45
|
+
"""
|
|
46
|
+
|
|
47
|
+
stores: Dict[str, int]
|
|
48
|
+
"""KV stores for the app"""
|
|
49
|
+
|
|
50
|
+
template: int
|
|
51
|
+
"""Template ID"""
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
class Secrets(TypedDict, total=False):
|
|
55
|
+
id: Required[int]
|
|
56
|
+
"""The unique identifier of the secret."""
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import Optional
|
|
4
|
+
from datetime import datetime
|
|
5
|
+
|
|
6
|
+
from ...._models import BaseModel
|
|
7
|
+
|
|
8
|
+
__all__ = ["Log"]
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class Log(BaseModel):
|
|
12
|
+
id: Optional[str] = None
|
|
13
|
+
"""Id of the log"""
|
|
14
|
+
|
|
15
|
+
app_name: Optional[str] = None
|
|
16
|
+
"""Name of the application"""
|
|
17
|
+
|
|
18
|
+
client_ip: Optional[str] = None
|
|
19
|
+
"""Client IP"""
|
|
20
|
+
|
|
21
|
+
edge: Optional[str] = None
|
|
22
|
+
"""Edge name"""
|
|
23
|
+
|
|
24
|
+
log: Optional[str] = None
|
|
25
|
+
"""Log message"""
|
|
26
|
+
|
|
27
|
+
timestamp: Optional[datetime] = None
|
|
28
|
+
"""Timestamp of a log in RFC3339 format"""
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing import Union
|
|
6
|
+
from datetime import datetime
|
|
7
|
+
from typing_extensions import Literal, Annotated, TypedDict
|
|
8
|
+
|
|
9
|
+
from ...._utils import PropertyInfo
|
|
10
|
+
|
|
11
|
+
__all__ = ["LogListParams"]
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class LogListParams(TypedDict, total=False):
|
|
15
|
+
client_ip: str
|
|
16
|
+
"""Search by client IP"""
|
|
17
|
+
|
|
18
|
+
edge: str
|
|
19
|
+
"""Edge name"""
|
|
20
|
+
|
|
21
|
+
from_: Annotated[Union[str, datetime], PropertyInfo(alias="from", format="iso8601")]
|
|
22
|
+
"""Reporting period start time, RFC3339 format. Default 1 hour ago."""
|
|
23
|
+
|
|
24
|
+
limit: int
|
|
25
|
+
"""Limit for pagination"""
|
|
26
|
+
|
|
27
|
+
offset: int
|
|
28
|
+
"""Offset for pagination"""
|
|
29
|
+
|
|
30
|
+
search: str
|
|
31
|
+
"""Search string"""
|
|
32
|
+
|
|
33
|
+
sort: Literal["desc", "asc"]
|
|
34
|
+
"""Sort order (default desc)"""
|
|
35
|
+
|
|
36
|
+
to: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")]
|
|
37
|
+
"""Reporting period end time, RFC3339 format. Default current time in UTC."""
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import Optional
|
|
4
|
+
|
|
5
|
+
from ..._models import BaseModel
|
|
6
|
+
|
|
7
|
+
__all__ = ["Binary"]
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class Binary(BaseModel):
|
|
11
|
+
id: int
|
|
12
|
+
"""Binary ID"""
|
|
13
|
+
|
|
14
|
+
api_type: str
|
|
15
|
+
"""Wasm API type"""
|
|
16
|
+
|
|
17
|
+
source: int
|
|
18
|
+
"""
|
|
19
|
+
Source language:
|
|
20
|
+
0 - unknown
|
|
21
|
+
1 - Rust
|
|
22
|
+
2 - JavaScript
|
|
23
|
+
"""
|
|
24
|
+
|
|
25
|
+
status: int
|
|
26
|
+
"""
|
|
27
|
+
Status code:
|
|
28
|
+
0 - pending
|
|
29
|
+
1 - compiled
|
|
30
|
+
2 - compilation failed (errors available)
|
|
31
|
+
3 - compilation failed (errors not available)
|
|
32
|
+
4 - resulting binary exceeded the limit
|
|
33
|
+
5 - unsupported source language
|
|
34
|
+
"""
|
|
35
|
+
|
|
36
|
+
checksum: Optional[str] = None
|
|
37
|
+
"""MD5 hash of the binary"""
|
|
38
|
+
|
|
39
|
+
unref_since: Optional[str] = None
|
|
40
|
+
"""Not used since (UTC)"""
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import List
|
|
4
|
+
|
|
5
|
+
from ..._models import BaseModel
|
|
6
|
+
from .binary_short import BinaryShort
|
|
7
|
+
|
|
8
|
+
__all__ = ["BinaryListResponse"]
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class BinaryListResponse(BaseModel):
|
|
12
|
+
binaries: List[BinaryShort]
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import Optional
|
|
4
|
+
|
|
5
|
+
from ..._models import BaseModel
|
|
6
|
+
|
|
7
|
+
__all__ = ["BinaryShort"]
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class BinaryShort(BaseModel):
|
|
11
|
+
id: int
|
|
12
|
+
"""Binary ID"""
|
|
13
|
+
|
|
14
|
+
api_type: str
|
|
15
|
+
"""Wasm API type"""
|
|
16
|
+
|
|
17
|
+
status: int
|
|
18
|
+
"""
|
|
19
|
+
Status code:
|
|
20
|
+
0 - pending
|
|
21
|
+
1 - compiled
|
|
22
|
+
2 - compilation failed (errors available)
|
|
23
|
+
3 - compilation failed (errors not available)
|
|
24
|
+
4 - resulting binary exceeded the limit
|
|
25
|
+
5 - unsupported source language
|
|
26
|
+
"""
|
|
27
|
+
|
|
28
|
+
checksum: Optional[str] = None
|
|
29
|
+
"""MD5 hash of the binary"""
|
|
30
|
+
|
|
31
|
+
unref_since: Optional[str] = None
|
|
32
|
+
"""Not used since (UTC)"""
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import List
|
|
4
|
+
from datetime import datetime
|
|
5
|
+
|
|
6
|
+
from ..._models import BaseModel
|
|
7
|
+
|
|
8
|
+
__all__ = ["CallStatus", "CountByStatus"]
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class CountByStatus(BaseModel):
|
|
12
|
+
count: int
|
|
13
|
+
"""Number of app calls"""
|
|
14
|
+
|
|
15
|
+
status: int
|
|
16
|
+
"""HTTP status"""
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
class CallStatus(BaseModel):
|
|
20
|
+
count_by_status: List[CountByStatus]
|
|
21
|
+
"""Count by status"""
|
|
22
|
+
|
|
23
|
+
time: datetime
|
|
24
|
+
"""Beginning ot reporting slot"""
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import List, Optional
|
|
4
|
+
|
|
5
|
+
from ..._models import BaseModel
|
|
6
|
+
|
|
7
|
+
__all__ = ["Client", "Network"]
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class Network(BaseModel):
|
|
11
|
+
is_default: bool
|
|
12
|
+
"""Is network is default"""
|
|
13
|
+
|
|
14
|
+
name: str
|
|
15
|
+
"""Network name"""
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
class Client(BaseModel):
|
|
19
|
+
app_count: int
|
|
20
|
+
"""Actual allowed number of apps"""
|
|
21
|
+
|
|
22
|
+
app_limit: int
|
|
23
|
+
"""Max allowed number of apps"""
|
|
24
|
+
|
|
25
|
+
daily_consumption: int
|
|
26
|
+
"""Actual number of calls for all apps during the current day (UTC)"""
|
|
27
|
+
|
|
28
|
+
daily_limit: int
|
|
29
|
+
"""Max allowed calls for all apps during a day (UTC)"""
|
|
30
|
+
|
|
31
|
+
hourly_consumption: int
|
|
32
|
+
"""Actual number of calls for all apps during the current hour"""
|
|
33
|
+
|
|
34
|
+
hourly_limit: int
|
|
35
|
+
"""Max allowed calls for all apps during an hour"""
|
|
36
|
+
|
|
37
|
+
monthly_consumption: int
|
|
38
|
+
"""Actual number of calls for all apps during the current calendar month (UTC)"""
|
|
39
|
+
|
|
40
|
+
networks: List[Network]
|
|
41
|
+
"""List of enabled networks"""
|
|
42
|
+
|
|
43
|
+
plan_id: int
|
|
44
|
+
"""Plan ID"""
|
|
45
|
+
|
|
46
|
+
status: int
|
|
47
|
+
"""
|
|
48
|
+
Status code:
|
|
49
|
+
1 - enabled
|
|
50
|
+
2 - disabled
|
|
51
|
+
3 - hourly call limit exceeded
|
|
52
|
+
4 - daily call limit exceeded
|
|
53
|
+
5 - suspended
|
|
54
|
+
"""
|
|
55
|
+
|
|
56
|
+
plan: Optional[str] = None
|
|
57
|
+
"""Plan name"""
|