pointcosm 0.4.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.
- pointcosm/__init__.py +233 -0
- pointcosm/_generated/__init__.py +8 -0
- pointcosm/_generated/api/__init__.py +1 -0
- pointcosm/_generated/api/assets/__init__.py +1 -0
- pointcosm/_generated/api/assets/storage_assets_complete_upload.py +211 -0
- pointcosm/_generated/api/assets/storage_assets_create.py +209 -0
- pointcosm/_generated/api/assets/storage_assets_create_credentials.py +217 -0
- pointcosm/_generated/api/assets/storage_assets_delete.py +205 -0
- pointcosm/_generated/api/assets/storage_assets_list.py +264 -0
- pointcosm/_generated/api/assets/storage_assets_retrieve.py +205 -0
- pointcosm/_generated/api/green_points/__init__.py +1 -0
- pointcosm/_generated/api/green_points/billing_green_points_account_retrieve.py +195 -0
- pointcosm/_generated/api/green_points/billing_green_points_ledger_list.py +230 -0
- pointcosm/_generated/api/products/__init__.py +1 -0
- pointcosm/_generated/api/products/train_products_list.py +224 -0
- pointcosm/_generated/api/products/train_products_retrieve.py +205 -0
- pointcosm/_generated/api/tasks/__init__.py +1 -0
- pointcosm/_generated/api/tasks/train_artifacts_create_download_url.py +233 -0
- pointcosm/_generated/api/tasks/train_artifacts_list.py +205 -0
- pointcosm/_generated/api/tasks/train_tasks_create.py +209 -0
- pointcosm/_generated/api/tasks/train_tasks_list.py +244 -0
- pointcosm/_generated/api/tasks/train_tasks_rerun.py +226 -0
- pointcosm/_generated/api/tasks/train_tasks_retrieve.py +205 -0
- pointcosm/_generated/api/user_storage_connections/__init__.py +1 -0
- pointcosm/_generated/api/user_storage_connections/storage_connections_create.py +209 -0
- pointcosm/_generated/api/user_storage_connections/storage_connections_delete.py +205 -0
- pointcosm/_generated/api/user_storage_connections/storage_connections_list.py +224 -0
- pointcosm/_generated/api/user_storage_connections/storage_connections_retrieve.py +205 -0
- pointcosm/_generated/api/user_storage_connections/storage_connections_update.py +226 -0
- pointcosm/_generated/api/webhook/__init__.py +1 -0
- pointcosm/_generated/api/webhook/webhooks_configuration_disable.py +178 -0
- pointcosm/_generated/api/webhook/webhooks_configuration_retrieve.py +178 -0
- pointcosm/_generated/api/webhook/webhooks_configuration_update.py +215 -0
- pointcosm/_generated/api/webhook/webhooks_secret_rotate.py +172 -0
- pointcosm/_generated/client.py +272 -0
- pointcosm/_generated/errors.py +16 -0
- pointcosm/_generated/models/__init__.py +277 -0
- pointcosm/_generated/models/api_error.py +102 -0
- pointcosm/_generated/models/api_error_details_type_0.py +47 -0
- pointcosm/_generated/models/api_failure_response.py +83 -0
- pointcosm/_generated/models/artifact_download_out.py +62 -0
- pointcosm/_generated/models/artifact_list_out.py +84 -0
- pointcosm/_generated/models/artifact_out.py +109 -0
- pointcosm/_generated/models/asset_create_in.py +152 -0
- pointcosm/_generated/models/asset_create_in_input_type.py +9 -0
- pointcosm/_generated/models/asset_create_in_upload_mode.py +9 -0
- pointcosm/_generated/models/asset_create_out.py +105 -0
- pointcosm/_generated/models/asset_ingestion_status.py +15 -0
- pointcosm/_generated/models/asset_list_out.py +99 -0
- pointcosm/_generated/models/asset_out.py +448 -0
- pointcosm/_generated/models/asset_out_asset_type.py +9 -0
- pointcosm/_generated/models/asset_out_upload_mode.py +9 -0
- pointcosm/_generated/models/asset_source_type.py +10 -0
- pointcosm/_generated/models/asset_status.py +13 -0
- pointcosm/_generated/models/billing_green_points_account_retrieve_response_200_type_0.py +83 -0
- pointcosm/_generated/models/billing_green_points_ledger_list_response_200_type_0.py +83 -0
- pointcosm/_generated/models/green_point_ledger_entry_out.py +167 -0
- pointcosm/_generated/models/green_point_ledger_page.py +99 -0
- pointcosm/_generated/models/input_limits_out.py +164 -0
- pointcosm/_generated/models/product_green_point_price_out.py +204 -0
- pointcosm/_generated/models/product_green_point_price_out_input_type.py +9 -0
- pointcosm/_generated/models/product_green_point_price_out_pricing_mode_type_0.py +9 -0
- pointcosm/_generated/models/product_input_limit_out.py +139 -0
- pointcosm/_generated/models/public_green_point_account_out.py +101 -0
- pointcosm/_generated/models/public_product_list_out.py +99 -0
- pointcosm/_generated/models/public_product_out.py +158 -0
- pointcosm/_generated/models/public_product_out_green_point_prices.py +62 -0
- pointcosm/_generated/models/public_product_out_input_limits.py +60 -0
- pointcosm/_generated/models/public_product_out_supported_input_types_item.py +9 -0
- pointcosm/_generated/models/safe_transfer_progress.py +278 -0
- pointcosm/_generated/models/safe_transfer_progress_direction.py +9 -0
- pointcosm/_generated/models/safe_transfer_progress_finished_at_quality_type_0.py +9 -0
- pointcosm/_generated/models/safe_transfer_progress_last_updated_at_quality.py +9 -0
- pointcosm/_generated/models/safe_transfer_progress_purpose.py +9 -0
- pointcosm/_generated/models/safe_transfer_progress_started_at_quality.py +9 -0
- pointcosm/_generated/models/safe_transfer_progress_status.py +10 -0
- pointcosm/_generated/models/storage_assets_complete_upload_response_200_type_0.py +83 -0
- pointcosm/_generated/models/storage_assets_create_credentials_response_200_type_0.py +83 -0
- pointcosm/_generated/models/storage_assets_create_response_200_type_0.py +83 -0
- pointcosm/_generated/models/storage_assets_delete_response_200_type_0.py +77 -0
- pointcosm/_generated/models/storage_assets_list_response_200_type_0.py +83 -0
- pointcosm/_generated/models/storage_assets_retrieve_response_200_type_0.py +83 -0
- pointcosm/_generated/models/storage_connections_create_response_200_type_0.py +83 -0
- pointcosm/_generated/models/storage_connections_delete_response_200_type_0.py +77 -0
- pointcosm/_generated/models/storage_connections_list_response_200_type_0.py +85 -0
- pointcosm/_generated/models/storage_connections_retrieve_response_200_type_0.py +83 -0
- pointcosm/_generated/models/storage_connections_update_response_200_type_0.py +83 -0
- pointcosm/_generated/models/storage_credentials_out.py +149 -0
- pointcosm/_generated/models/task_asset_projection.py +70 -0
- pointcosm/_generated/models/task_create_in.py +68 -0
- pointcosm/_generated/models/task_create_in_parameters.py +47 -0
- pointcosm/_generated/models/task_detail_out.py +395 -0
- pointcosm/_generated/models/task_detail_out_rerun_attempt.py +9 -0
- pointcosm/_generated/models/task_green_point_charge_out.py +123 -0
- pointcosm/_generated/models/task_green_point_charge_out_input_type.py +9 -0
- pointcosm/_generated/models/task_green_point_charge_out_pricing_mode.py +9 -0
- pointcosm/_generated/models/task_green_point_charge_out_status.py +10 -0
- pointcosm/_generated/models/task_list_item.py +322 -0
- pointcosm/_generated/models/task_list_item_rerun_attempt.py +9 -0
- pointcosm/_generated/models/task_list_out.py +99 -0
- pointcosm/_generated/models/task_milestone_timing.py +177 -0
- pointcosm/_generated/models/task_milestone_timing_finish_time_quality.py +11 -0
- pointcosm/_generated/models/task_milestone_timing_lifecycle_status.py +11 -0
- pointcosm/_generated/models/task_milestone_timing_milestone.py +14 -0
- pointcosm/_generated/models/task_milestone_timing_start_time_quality.py +11 -0
- pointcosm/_generated/models/task_milestone_timing_timing_completeness.py +10 -0
- pointcosm/_generated/models/task_out.py +130 -0
- pointcosm/_generated/models/task_out_rerun_attempt.py +9 -0
- pointcosm/_generated/models/task_preprocess_progress.py +105 -0
- pointcosm/_generated/models/task_preprocess_progress_availability.py +10 -0
- pointcosm/_generated/models/task_preprocess_progress_quality_level.py +11 -0
- pointcosm/_generated/models/task_product_projection.py +78 -0
- pointcosm/_generated/models/task_progress.py +209 -0
- pointcosm/_generated/models/task_progress_activity_status.py +11 -0
- pointcosm/_generated/models/task_progress_current_milestone.py +14 -0
- pointcosm/_generated/models/task_progress_observation_status.py +11 -0
- pointcosm/_generated/models/task_rerun_in.py +75 -0
- pointcosm/_generated/models/task_rerun_in_parameters_type_0.py +47 -0
- pointcosm/_generated/models/task_status.py +14 -0
- pointcosm/_generated/models/task_summary_out.py +93 -0
- pointcosm/_generated/models/train_artifacts_create_download_url_response_200_type_0.py +83 -0
- pointcosm/_generated/models/train_artifacts_list_response_200_type_0.py +83 -0
- pointcosm/_generated/models/train_products_list_response_200_type_0.py +83 -0
- pointcosm/_generated/models/train_products_retrieve_response_200_type_0.py +83 -0
- pointcosm/_generated/models/train_tasks_create_response_200_type_0.py +83 -0
- pointcosm/_generated/models/train_tasks_list_response_200_type_0.py +83 -0
- pointcosm/_generated/models/train_tasks_rerun_response_200_type_0.py +83 -0
- pointcosm/_generated/models/train_tasks_retrieve_response_200_type_0.py +83 -0
- pointcosm/_generated/models/user_storage_connection_create_in.py +110 -0
- pointcosm/_generated/models/user_storage_connection_create_in_provider_config_type_0.py +47 -0
- pointcosm/_generated/models/user_storage_connection_list_out.py +99 -0
- pointcosm/_generated/models/user_storage_connection_out.py +274 -0
- pointcosm/_generated/models/user_storage_connection_out_provider_config_type_0.py +47 -0
- pointcosm/_generated/models/user_storage_connection_status.py +11 -0
- pointcosm/_generated/models/user_storage_connection_update_in.py +154 -0
- pointcosm/_generated/models/user_storage_connection_update_in_provider_config_type_0.py +47 -0
- pointcosm/_generated/models/webhook_configuration_in.py +42 -0
- pointcosm/_generated/models/webhook_configuration_out.py +124 -0
- pointcosm/_generated/models/webhook_mutation_out.py +91 -0
- pointcosm/_generated/models/webhook_secret_rotation_out.py +65 -0
- pointcosm/_generated/models/webhooks_configuration_disable_response_200_type_0.py +83 -0
- pointcosm/_generated/models/webhooks_configuration_retrieve_response_200_type_0.py +83 -0
- pointcosm/_generated/models/webhooks_configuration_update_response_200_type_0.py +83 -0
- pointcosm/_generated/models/webhooks_secret_rotate_response_200_type_0.py +83 -0
- pointcosm/_generated/types.py +54 -0
- pointcosm/_internal/__init__.py +1 -0
- pointcosm/_internal/capability.py +136 -0
- pointcosm/_internal/contract_evidence.py +38 -0
- pointcosm/_internal/envelope.py +94 -0
- pointcosm/_internal/executor.py +263 -0
- pointcosm/_internal/manifest.py +95 -0
- pointcosm/_internal/model_adapters.py +613 -0
- pointcosm/_internal/retry.py +96 -0
- pointcosm/_internal/sensitive.py +71 -0
- pointcosm/async_client.py +162 -0
- pointcosm/auth/__init__.py +6 -0
- pointcosm/auth/_shared.py +109 -0
- pointcosm/auth/async_provider.py +62 -0
- pointcosm/auth/models.py +74 -0
- pointcosm/auth/sync_provider.py +62 -0
- pointcosm/billing.py +52 -0
- pointcosm/client.py +162 -0
- pointcosm/config.py +96 -0
- pointcosm/exceptions.py +164 -0
- pointcosm/models/__init__.py +127 -0
- pointcosm/models/billing.py +63 -0
- pointcosm/models/common.py +378 -0
- pointcosm/models/storage.py +219 -0
- pointcosm/models/train.py +421 -0
- pointcosm/models/webhooks.py +91 -0
- pointcosm/py.typed +1 -0
- pointcosm/storage.py +240 -0
- pointcosm/train.py +175 -0
- pointcosm/webhooks.py +82 -0
- pointcosm-0.4.0.dist-info/METADATA +217 -0
- pointcosm-0.4.0.dist-info/RECORD +178 -0
- pointcosm-0.4.0.dist-info/WHEEL +4 -0
- pointcosm-0.4.0.dist-info/licenses/LICENSE +201 -0
pointcosm/__init__.py
ADDED
|
@@ -0,0 +1,233 @@
|
|
|
1
|
+
"""Public PointCosm SDK package."""
|
|
2
|
+
|
|
3
|
+
from pointcosm._internal.sensitive import SensitiveStr as SensitiveStr
|
|
4
|
+
from pointcosm.async_client import AsyncPointcosm as AsyncPointcosm
|
|
5
|
+
from pointcosm.client import Pointcosm as Pointcosm
|
|
6
|
+
from pointcosm.config import (
|
|
7
|
+
ClientCredentials as ClientCredentials,
|
|
8
|
+
)
|
|
9
|
+
from pointcosm.config import (
|
|
10
|
+
RetryPolicy as RetryPolicy,
|
|
11
|
+
)
|
|
12
|
+
from pointcosm.config import (
|
|
13
|
+
TimeoutConfig as TimeoutConfig,
|
|
14
|
+
)
|
|
15
|
+
from pointcosm.exceptions import PointcosmApiError as PointcosmApiError
|
|
16
|
+
from pointcosm.exceptions import (
|
|
17
|
+
PointcosmAuthenticationError as PointcosmAuthenticationError,
|
|
18
|
+
)
|
|
19
|
+
from pointcosm.exceptions import (
|
|
20
|
+
PointcosmAuthorizationError as PointcosmAuthorizationError,
|
|
21
|
+
)
|
|
22
|
+
from pointcosm.exceptions import (
|
|
23
|
+
PointcosmConfigurationError as PointcosmConfigurationError,
|
|
24
|
+
)
|
|
25
|
+
from pointcosm.exceptions import PointcosmContractError as PointcosmContractError
|
|
26
|
+
from pointcosm.exceptions import PointcosmError as PointcosmError
|
|
27
|
+
from pointcosm.exceptions import PointcosmRateLimitError as PointcosmRateLimitError
|
|
28
|
+
from pointcosm.exceptions import PointcosmServerError as PointcosmServerError
|
|
29
|
+
from pointcosm.exceptions import PointcosmTimeoutError as PointcosmTimeoutError
|
|
30
|
+
from pointcosm.exceptions import PointcosmTransportError as PointcosmTransportError
|
|
31
|
+
from pointcosm.exceptions import PointcosmValidationError as PointcosmValidationError
|
|
32
|
+
from pointcosm.models import (
|
|
33
|
+
Artifact as Artifact,
|
|
34
|
+
)
|
|
35
|
+
from pointcosm.models import (
|
|
36
|
+
ArtifactDownload as ArtifactDownload,
|
|
37
|
+
)
|
|
38
|
+
from pointcosm.models import (
|
|
39
|
+
ArtifactList as ArtifactList,
|
|
40
|
+
)
|
|
41
|
+
from pointcosm.models import (
|
|
42
|
+
Asset as Asset,
|
|
43
|
+
)
|
|
44
|
+
from pointcosm.models import (
|
|
45
|
+
AssetCreate as AssetCreate,
|
|
46
|
+
)
|
|
47
|
+
from pointcosm.models import (
|
|
48
|
+
AssetCreateResult as AssetCreateResult,
|
|
49
|
+
)
|
|
50
|
+
from pointcosm.models import (
|
|
51
|
+
AssetIngestionStatus as AssetIngestionStatus,
|
|
52
|
+
)
|
|
53
|
+
from pointcosm.models import (
|
|
54
|
+
AssetList as AssetList,
|
|
55
|
+
)
|
|
56
|
+
from pointcosm.models import (
|
|
57
|
+
AssetSourceType as AssetSourceType,
|
|
58
|
+
)
|
|
59
|
+
from pointcosm.models import (
|
|
60
|
+
AssetStatus as AssetStatus,
|
|
61
|
+
)
|
|
62
|
+
from pointcosm.models import (
|
|
63
|
+
ChargeStatus as ChargeStatus,
|
|
64
|
+
)
|
|
65
|
+
from pointcosm.models import (
|
|
66
|
+
GreenPointAccount as GreenPointAccount,
|
|
67
|
+
)
|
|
68
|
+
from pointcosm.models import (
|
|
69
|
+
GreenPointLedgerEntry as GreenPointLedgerEntry,
|
|
70
|
+
)
|
|
71
|
+
from pointcosm.models import (
|
|
72
|
+
GreenPointLedgerPage as GreenPointLedgerPage,
|
|
73
|
+
)
|
|
74
|
+
from pointcosm.models import (
|
|
75
|
+
InputLimits as InputLimits,
|
|
76
|
+
)
|
|
77
|
+
from pointcosm.models import (
|
|
78
|
+
InputType as InputType,
|
|
79
|
+
)
|
|
80
|
+
from pointcosm.models import (
|
|
81
|
+
MilestoneLifecycleStatus as MilestoneLifecycleStatus,
|
|
82
|
+
)
|
|
83
|
+
from pointcosm.models import (
|
|
84
|
+
MilestoneTimeQuality as MilestoneTimeQuality,
|
|
85
|
+
)
|
|
86
|
+
from pointcosm.models import (
|
|
87
|
+
PreprocessAvailability as PreprocessAvailability,
|
|
88
|
+
)
|
|
89
|
+
from pointcosm.models import (
|
|
90
|
+
PricingMode as PricingMode,
|
|
91
|
+
)
|
|
92
|
+
from pointcosm.models import (
|
|
93
|
+
Product as Product,
|
|
94
|
+
)
|
|
95
|
+
from pointcosm.models import (
|
|
96
|
+
ProductGreenPointPrice as ProductGreenPointPrice,
|
|
97
|
+
)
|
|
98
|
+
from pointcosm.models import (
|
|
99
|
+
ProductInputLimit as ProductInputLimit,
|
|
100
|
+
)
|
|
101
|
+
from pointcosm.models import (
|
|
102
|
+
ProductList as ProductList,
|
|
103
|
+
)
|
|
104
|
+
from pointcosm.models import (
|
|
105
|
+
QualityLevel as QualityLevel,
|
|
106
|
+
)
|
|
107
|
+
from pointcosm.models import (
|
|
108
|
+
RetrySafety as RetrySafety,
|
|
109
|
+
)
|
|
110
|
+
from pointcosm.models import (
|
|
111
|
+
StorageConnection as StorageConnection,
|
|
112
|
+
)
|
|
113
|
+
from pointcosm.models import (
|
|
114
|
+
StorageConnectionCreate as StorageConnectionCreate,
|
|
115
|
+
)
|
|
116
|
+
from pointcosm.models import (
|
|
117
|
+
StorageConnectionList as StorageConnectionList,
|
|
118
|
+
)
|
|
119
|
+
from pointcosm.models import (
|
|
120
|
+
StorageConnectionStatus as StorageConnectionStatus,
|
|
121
|
+
)
|
|
122
|
+
from pointcosm.models import (
|
|
123
|
+
StorageConnectionUpdate as StorageConnectionUpdate,
|
|
124
|
+
)
|
|
125
|
+
from pointcosm.models import (
|
|
126
|
+
StorageCredentials as StorageCredentials,
|
|
127
|
+
)
|
|
128
|
+
from pointcosm.models import (
|
|
129
|
+
Task as Task,
|
|
130
|
+
)
|
|
131
|
+
from pointcosm.models import (
|
|
132
|
+
TaskActivityStatus as TaskActivityStatus,
|
|
133
|
+
)
|
|
134
|
+
from pointcosm.models import (
|
|
135
|
+
TaskAsset as TaskAsset,
|
|
136
|
+
)
|
|
137
|
+
from pointcosm.models import (
|
|
138
|
+
TaskCreate as TaskCreate,
|
|
139
|
+
)
|
|
140
|
+
from pointcosm.models import (
|
|
141
|
+
TaskDetail as TaskDetail,
|
|
142
|
+
)
|
|
143
|
+
from pointcosm.models import (
|
|
144
|
+
TaskGreenPointCharge as TaskGreenPointCharge,
|
|
145
|
+
)
|
|
146
|
+
from pointcosm.models import (
|
|
147
|
+
TaskList as TaskList,
|
|
148
|
+
)
|
|
149
|
+
from pointcosm.models import (
|
|
150
|
+
TaskListItem as TaskListItem,
|
|
151
|
+
)
|
|
152
|
+
from pointcosm.models import (
|
|
153
|
+
TaskMilestone as TaskMilestone,
|
|
154
|
+
)
|
|
155
|
+
from pointcosm.models import (
|
|
156
|
+
TaskMilestoneTiming as TaskMilestoneTiming,
|
|
157
|
+
)
|
|
158
|
+
from pointcosm.models import (
|
|
159
|
+
TaskObservationStatus as TaskObservationStatus,
|
|
160
|
+
)
|
|
161
|
+
from pointcosm.models import (
|
|
162
|
+
TaskPreprocessProgress as TaskPreprocessProgress,
|
|
163
|
+
)
|
|
164
|
+
from pointcosm.models import (
|
|
165
|
+
TaskProduct as TaskProduct,
|
|
166
|
+
)
|
|
167
|
+
from pointcosm.models import (
|
|
168
|
+
TaskProgress as TaskProgress,
|
|
169
|
+
)
|
|
170
|
+
from pointcosm.models import (
|
|
171
|
+
TaskRerun as TaskRerun,
|
|
172
|
+
)
|
|
173
|
+
from pointcosm.models import (
|
|
174
|
+
TaskStatus as TaskStatus,
|
|
175
|
+
)
|
|
176
|
+
from pointcosm.models import (
|
|
177
|
+
TaskSummary as TaskSummary,
|
|
178
|
+
)
|
|
179
|
+
from pointcosm.models import (
|
|
180
|
+
TimingCompleteness as TimingCompleteness,
|
|
181
|
+
)
|
|
182
|
+
from pointcosm.models import (
|
|
183
|
+
TransferDirection as TransferDirection,
|
|
184
|
+
)
|
|
185
|
+
from pointcosm.models import (
|
|
186
|
+
TransferProgress as TransferProgress,
|
|
187
|
+
)
|
|
188
|
+
from pointcosm.models import (
|
|
189
|
+
TransferPurpose as TransferPurpose,
|
|
190
|
+
)
|
|
191
|
+
from pointcosm.models import (
|
|
192
|
+
TransferStatus as TransferStatus,
|
|
193
|
+
)
|
|
194
|
+
from pointcosm.models import (
|
|
195
|
+
TransferTimeQuality as TransferTimeQuality,
|
|
196
|
+
)
|
|
197
|
+
from pointcosm.models import (
|
|
198
|
+
UploadMode as UploadMode,
|
|
199
|
+
)
|
|
200
|
+
from pointcosm.models import (
|
|
201
|
+
WebhookConfiguration as WebhookConfiguration,
|
|
202
|
+
)
|
|
203
|
+
from pointcosm.models import (
|
|
204
|
+
WebhookConfigurationUpdate as WebhookConfigurationUpdate,
|
|
205
|
+
)
|
|
206
|
+
from pointcosm.models import (
|
|
207
|
+
WebhookMutation as WebhookMutation,
|
|
208
|
+
)
|
|
209
|
+
from pointcosm.models import (
|
|
210
|
+
WebhookSecretRotation as WebhookSecretRotation,
|
|
211
|
+
)
|
|
212
|
+
from pointcosm.models import __all__ as _models_all
|
|
213
|
+
|
|
214
|
+
__all__ = (
|
|
215
|
+
"AsyncPointcosm",
|
|
216
|
+
"ClientCredentials",
|
|
217
|
+
"Pointcosm",
|
|
218
|
+
"PointcosmApiError",
|
|
219
|
+
"PointcosmAuthenticationError",
|
|
220
|
+
"PointcosmAuthorizationError",
|
|
221
|
+
"PointcosmConfigurationError",
|
|
222
|
+
"PointcosmContractError",
|
|
223
|
+
"PointcosmError",
|
|
224
|
+
"PointcosmRateLimitError",
|
|
225
|
+
"PointcosmServerError",
|
|
226
|
+
"PointcosmTimeoutError",
|
|
227
|
+
"PointcosmTransportError",
|
|
228
|
+
"PointcosmValidationError",
|
|
229
|
+
"RetryPolicy",
|
|
230
|
+
"SensitiveStr",
|
|
231
|
+
"TimeoutConfig",
|
|
232
|
+
*_models_all,
|
|
233
|
+
)
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"""Contains methods for accessing the API"""
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"""Contains endpoint functions for accessing the API"""
|
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
from http import HTTPStatus
|
|
2
|
+
from typing import Any
|
|
3
|
+
from urllib.parse import quote
|
|
4
|
+
from uuid import UUID
|
|
5
|
+
|
|
6
|
+
import httpx
|
|
7
|
+
|
|
8
|
+
from ... import errors
|
|
9
|
+
from ...client import AuthenticatedClient, Client
|
|
10
|
+
from ...models.api_failure_response import ApiFailureResponse
|
|
11
|
+
from ...models.storage_assets_complete_upload_response_200_type_0 import (
|
|
12
|
+
StorageAssetsCompleteUploadResponse200Type0,
|
|
13
|
+
)
|
|
14
|
+
from ...types import Response
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
def _get_kwargs(
|
|
18
|
+
id: UUID,
|
|
19
|
+
) -> dict[str, Any]:
|
|
20
|
+
|
|
21
|
+
_kwargs: dict[str, Any] = {
|
|
22
|
+
"method": "post",
|
|
23
|
+
"url": "/api/v1/assets/{id}/upload-complete".format(
|
|
24
|
+
id=quote(str(id), safe=""),
|
|
25
|
+
),
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
return _kwargs
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
def _parse_response(
|
|
32
|
+
*, client: AuthenticatedClient | Client, response: httpx.Response
|
|
33
|
+
) -> ApiFailureResponse | ApiFailureResponse | StorageAssetsCompleteUploadResponse200Type0 | None:
|
|
34
|
+
if response.status_code == 200:
|
|
35
|
+
|
|
36
|
+
def _parse_response_200(
|
|
37
|
+
data: object,
|
|
38
|
+
) -> ApiFailureResponse | StorageAssetsCompleteUploadResponse200Type0:
|
|
39
|
+
try:
|
|
40
|
+
if not isinstance(data, dict):
|
|
41
|
+
raise TypeError()
|
|
42
|
+
response_200_type_0 = StorageAssetsCompleteUploadResponse200Type0.from_dict(data)
|
|
43
|
+
|
|
44
|
+
return response_200_type_0
|
|
45
|
+
except (TypeError, ValueError, AttributeError, KeyError):
|
|
46
|
+
pass
|
|
47
|
+
if not isinstance(data, dict):
|
|
48
|
+
raise TypeError()
|
|
49
|
+
response_200_type_1 = ApiFailureResponse.from_dict(data)
|
|
50
|
+
|
|
51
|
+
return response_200_type_1
|
|
52
|
+
|
|
53
|
+
response_200 = _parse_response_200(response.json())
|
|
54
|
+
|
|
55
|
+
return response_200
|
|
56
|
+
|
|
57
|
+
if response.status_code == 401:
|
|
58
|
+
response_401 = ApiFailureResponse.from_dict(response.json())
|
|
59
|
+
|
|
60
|
+
return response_401
|
|
61
|
+
|
|
62
|
+
if response.status_code == 403:
|
|
63
|
+
response_403 = ApiFailureResponse.from_dict(response.json())
|
|
64
|
+
|
|
65
|
+
return response_403
|
|
66
|
+
|
|
67
|
+
if response.status_code == 422:
|
|
68
|
+
response_422 = ApiFailureResponse.from_dict(response.json())
|
|
69
|
+
|
|
70
|
+
return response_422
|
|
71
|
+
|
|
72
|
+
if response.status_code == 500:
|
|
73
|
+
response_500 = ApiFailureResponse.from_dict(response.json())
|
|
74
|
+
|
|
75
|
+
return response_500
|
|
76
|
+
|
|
77
|
+
if client.raise_on_unexpected_status:
|
|
78
|
+
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
79
|
+
else:
|
|
80
|
+
return None
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
def _build_response(
|
|
84
|
+
*, client: AuthenticatedClient | Client, response: httpx.Response
|
|
85
|
+
) -> Response[
|
|
86
|
+
ApiFailureResponse | ApiFailureResponse | StorageAssetsCompleteUploadResponse200Type0
|
|
87
|
+
]:
|
|
88
|
+
return Response(
|
|
89
|
+
status_code=HTTPStatus(response.status_code),
|
|
90
|
+
content=response.content,
|
|
91
|
+
headers=response.headers,
|
|
92
|
+
parsed=_parse_response(client=client, response=response),
|
|
93
|
+
)
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
def sync_detailed(
|
|
97
|
+
id: UUID,
|
|
98
|
+
*,
|
|
99
|
+
client: AuthenticatedClient,
|
|
100
|
+
) -> Response[
|
|
101
|
+
ApiFailureResponse | ApiFailureResponse | StorageAssetsCompleteUploadResponse200Type0
|
|
102
|
+
]:
|
|
103
|
+
"""complete asset upload
|
|
104
|
+
|
|
105
|
+
执行 complete asset upload 操作。
|
|
106
|
+
|
|
107
|
+
Args:
|
|
108
|
+
id (UUID):
|
|
109
|
+
|
|
110
|
+
Raises:
|
|
111
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
112
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
113
|
+
|
|
114
|
+
Returns:
|
|
115
|
+
Response[ApiFailureResponse | ApiFailureResponse | StorageAssetsCompleteUploadResponse200Type0]
|
|
116
|
+
"""
|
|
117
|
+
|
|
118
|
+
kwargs = _get_kwargs(
|
|
119
|
+
id=id,
|
|
120
|
+
)
|
|
121
|
+
|
|
122
|
+
response = client.get_httpx_client().request(
|
|
123
|
+
**kwargs,
|
|
124
|
+
)
|
|
125
|
+
|
|
126
|
+
return _build_response(client=client, response=response)
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
def sync(
|
|
130
|
+
id: UUID,
|
|
131
|
+
*,
|
|
132
|
+
client: AuthenticatedClient,
|
|
133
|
+
) -> ApiFailureResponse | ApiFailureResponse | StorageAssetsCompleteUploadResponse200Type0 | None:
|
|
134
|
+
"""complete asset upload
|
|
135
|
+
|
|
136
|
+
执行 complete asset upload 操作。
|
|
137
|
+
|
|
138
|
+
Args:
|
|
139
|
+
id (UUID):
|
|
140
|
+
|
|
141
|
+
Raises:
|
|
142
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
143
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
144
|
+
|
|
145
|
+
Returns:
|
|
146
|
+
ApiFailureResponse | ApiFailureResponse | StorageAssetsCompleteUploadResponse200Type0
|
|
147
|
+
"""
|
|
148
|
+
|
|
149
|
+
return sync_detailed(
|
|
150
|
+
id=id,
|
|
151
|
+
client=client,
|
|
152
|
+
).parsed
|
|
153
|
+
|
|
154
|
+
|
|
155
|
+
async def asyncio_detailed(
|
|
156
|
+
id: UUID,
|
|
157
|
+
*,
|
|
158
|
+
client: AuthenticatedClient,
|
|
159
|
+
) -> Response[
|
|
160
|
+
ApiFailureResponse | ApiFailureResponse | StorageAssetsCompleteUploadResponse200Type0
|
|
161
|
+
]:
|
|
162
|
+
"""complete asset upload
|
|
163
|
+
|
|
164
|
+
执行 complete asset upload 操作。
|
|
165
|
+
|
|
166
|
+
Args:
|
|
167
|
+
id (UUID):
|
|
168
|
+
|
|
169
|
+
Raises:
|
|
170
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
171
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
172
|
+
|
|
173
|
+
Returns:
|
|
174
|
+
Response[ApiFailureResponse | ApiFailureResponse | StorageAssetsCompleteUploadResponse200Type0]
|
|
175
|
+
"""
|
|
176
|
+
|
|
177
|
+
kwargs = _get_kwargs(
|
|
178
|
+
id=id,
|
|
179
|
+
)
|
|
180
|
+
|
|
181
|
+
response = await client.get_async_httpx_client().request(**kwargs)
|
|
182
|
+
|
|
183
|
+
return _build_response(client=client, response=response)
|
|
184
|
+
|
|
185
|
+
|
|
186
|
+
async def asyncio(
|
|
187
|
+
id: UUID,
|
|
188
|
+
*,
|
|
189
|
+
client: AuthenticatedClient,
|
|
190
|
+
) -> ApiFailureResponse | ApiFailureResponse | StorageAssetsCompleteUploadResponse200Type0 | None:
|
|
191
|
+
"""complete asset upload
|
|
192
|
+
|
|
193
|
+
执行 complete asset upload 操作。
|
|
194
|
+
|
|
195
|
+
Args:
|
|
196
|
+
id (UUID):
|
|
197
|
+
|
|
198
|
+
Raises:
|
|
199
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
200
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
201
|
+
|
|
202
|
+
Returns:
|
|
203
|
+
ApiFailureResponse | ApiFailureResponse | StorageAssetsCompleteUploadResponse200Type0
|
|
204
|
+
"""
|
|
205
|
+
|
|
206
|
+
return (
|
|
207
|
+
await asyncio_detailed(
|
|
208
|
+
id=id,
|
|
209
|
+
client=client,
|
|
210
|
+
)
|
|
211
|
+
).parsed
|
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
from http import HTTPStatus
|
|
2
|
+
from typing import Any
|
|
3
|
+
|
|
4
|
+
import httpx
|
|
5
|
+
|
|
6
|
+
from ... import errors
|
|
7
|
+
from ...client import AuthenticatedClient, Client
|
|
8
|
+
from ...models.api_failure_response import ApiFailureResponse
|
|
9
|
+
from ...models.asset_create_in import AssetCreateIn
|
|
10
|
+
from ...models.storage_assets_create_response_200_type_0 import (
|
|
11
|
+
StorageAssetsCreateResponse200Type0,
|
|
12
|
+
)
|
|
13
|
+
from ...types import Response
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
def _get_kwargs(
|
|
17
|
+
*,
|
|
18
|
+
body: AssetCreateIn,
|
|
19
|
+
) -> dict[str, Any]:
|
|
20
|
+
headers: dict[str, Any] = {}
|
|
21
|
+
|
|
22
|
+
_kwargs: dict[str, Any] = {
|
|
23
|
+
"method": "post",
|
|
24
|
+
"url": "/api/v1/assets",
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
_kwargs["json"] = body.to_dict()
|
|
28
|
+
|
|
29
|
+
headers["Content-Type"] = "application/json"
|
|
30
|
+
|
|
31
|
+
_kwargs["headers"] = headers
|
|
32
|
+
return _kwargs
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
def _parse_response(
|
|
36
|
+
*, client: AuthenticatedClient | Client, response: httpx.Response
|
|
37
|
+
) -> ApiFailureResponse | ApiFailureResponse | StorageAssetsCreateResponse200Type0 | None:
|
|
38
|
+
if response.status_code == 200:
|
|
39
|
+
|
|
40
|
+
def _parse_response_200(
|
|
41
|
+
data: object,
|
|
42
|
+
) -> ApiFailureResponse | StorageAssetsCreateResponse200Type0:
|
|
43
|
+
try:
|
|
44
|
+
if not isinstance(data, dict):
|
|
45
|
+
raise TypeError()
|
|
46
|
+
response_200_type_0 = StorageAssetsCreateResponse200Type0.from_dict(data)
|
|
47
|
+
|
|
48
|
+
return response_200_type_0
|
|
49
|
+
except (TypeError, ValueError, AttributeError, KeyError):
|
|
50
|
+
pass
|
|
51
|
+
if not isinstance(data, dict):
|
|
52
|
+
raise TypeError()
|
|
53
|
+
response_200_type_1 = ApiFailureResponse.from_dict(data)
|
|
54
|
+
|
|
55
|
+
return response_200_type_1
|
|
56
|
+
|
|
57
|
+
response_200 = _parse_response_200(response.json())
|
|
58
|
+
|
|
59
|
+
return response_200
|
|
60
|
+
|
|
61
|
+
if response.status_code == 401:
|
|
62
|
+
response_401 = ApiFailureResponse.from_dict(response.json())
|
|
63
|
+
|
|
64
|
+
return response_401
|
|
65
|
+
|
|
66
|
+
if response.status_code == 403:
|
|
67
|
+
response_403 = ApiFailureResponse.from_dict(response.json())
|
|
68
|
+
|
|
69
|
+
return response_403
|
|
70
|
+
|
|
71
|
+
if response.status_code == 422:
|
|
72
|
+
response_422 = ApiFailureResponse.from_dict(response.json())
|
|
73
|
+
|
|
74
|
+
return response_422
|
|
75
|
+
|
|
76
|
+
if response.status_code == 500:
|
|
77
|
+
response_500 = ApiFailureResponse.from_dict(response.json())
|
|
78
|
+
|
|
79
|
+
return response_500
|
|
80
|
+
|
|
81
|
+
if client.raise_on_unexpected_status:
|
|
82
|
+
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
83
|
+
else:
|
|
84
|
+
return None
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
def _build_response(
|
|
88
|
+
*, client: AuthenticatedClient | Client, response: httpx.Response
|
|
89
|
+
) -> Response[ApiFailureResponse | ApiFailureResponse | StorageAssetsCreateResponse200Type0]:
|
|
90
|
+
return Response(
|
|
91
|
+
status_code=HTTPStatus(response.status_code),
|
|
92
|
+
content=response.content,
|
|
93
|
+
headers=response.headers,
|
|
94
|
+
parsed=_parse_response(client=client, response=response),
|
|
95
|
+
)
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
def sync_detailed(
|
|
99
|
+
*,
|
|
100
|
+
client: AuthenticatedClient,
|
|
101
|
+
body: AssetCreateIn,
|
|
102
|
+
) -> Response[ApiFailureResponse | ApiFailureResponse | StorageAssetsCreateResponse200Type0]:
|
|
103
|
+
"""create asset
|
|
104
|
+
|
|
105
|
+
执行 create asset 操作。
|
|
106
|
+
|
|
107
|
+
Args:
|
|
108
|
+
body (AssetCreateIn):
|
|
109
|
+
|
|
110
|
+
Raises:
|
|
111
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
112
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
113
|
+
|
|
114
|
+
Returns:
|
|
115
|
+
Response[ApiFailureResponse | ApiFailureResponse | StorageAssetsCreateResponse200Type0]
|
|
116
|
+
"""
|
|
117
|
+
|
|
118
|
+
kwargs = _get_kwargs(
|
|
119
|
+
body=body,
|
|
120
|
+
)
|
|
121
|
+
|
|
122
|
+
response = client.get_httpx_client().request(
|
|
123
|
+
**kwargs,
|
|
124
|
+
)
|
|
125
|
+
|
|
126
|
+
return _build_response(client=client, response=response)
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
def sync(
|
|
130
|
+
*,
|
|
131
|
+
client: AuthenticatedClient,
|
|
132
|
+
body: AssetCreateIn,
|
|
133
|
+
) -> ApiFailureResponse | ApiFailureResponse | StorageAssetsCreateResponse200Type0 | None:
|
|
134
|
+
"""create asset
|
|
135
|
+
|
|
136
|
+
执行 create asset 操作。
|
|
137
|
+
|
|
138
|
+
Args:
|
|
139
|
+
body (AssetCreateIn):
|
|
140
|
+
|
|
141
|
+
Raises:
|
|
142
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
143
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
144
|
+
|
|
145
|
+
Returns:
|
|
146
|
+
ApiFailureResponse | ApiFailureResponse | StorageAssetsCreateResponse200Type0
|
|
147
|
+
"""
|
|
148
|
+
|
|
149
|
+
return sync_detailed(
|
|
150
|
+
client=client,
|
|
151
|
+
body=body,
|
|
152
|
+
).parsed
|
|
153
|
+
|
|
154
|
+
|
|
155
|
+
async def asyncio_detailed(
|
|
156
|
+
*,
|
|
157
|
+
client: AuthenticatedClient,
|
|
158
|
+
body: AssetCreateIn,
|
|
159
|
+
) -> Response[ApiFailureResponse | ApiFailureResponse | StorageAssetsCreateResponse200Type0]:
|
|
160
|
+
"""create asset
|
|
161
|
+
|
|
162
|
+
执行 create asset 操作。
|
|
163
|
+
|
|
164
|
+
Args:
|
|
165
|
+
body (AssetCreateIn):
|
|
166
|
+
|
|
167
|
+
Raises:
|
|
168
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
169
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
170
|
+
|
|
171
|
+
Returns:
|
|
172
|
+
Response[ApiFailureResponse | ApiFailureResponse | StorageAssetsCreateResponse200Type0]
|
|
173
|
+
"""
|
|
174
|
+
|
|
175
|
+
kwargs = _get_kwargs(
|
|
176
|
+
body=body,
|
|
177
|
+
)
|
|
178
|
+
|
|
179
|
+
response = await client.get_async_httpx_client().request(**kwargs)
|
|
180
|
+
|
|
181
|
+
return _build_response(client=client, response=response)
|
|
182
|
+
|
|
183
|
+
|
|
184
|
+
async def asyncio(
|
|
185
|
+
*,
|
|
186
|
+
client: AuthenticatedClient,
|
|
187
|
+
body: AssetCreateIn,
|
|
188
|
+
) -> ApiFailureResponse | ApiFailureResponse | StorageAssetsCreateResponse200Type0 | None:
|
|
189
|
+
"""create asset
|
|
190
|
+
|
|
191
|
+
执行 create asset 操作。
|
|
192
|
+
|
|
193
|
+
Args:
|
|
194
|
+
body (AssetCreateIn):
|
|
195
|
+
|
|
196
|
+
Raises:
|
|
197
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
198
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
199
|
+
|
|
200
|
+
Returns:
|
|
201
|
+
ApiFailureResponse | ApiFailureResponse | StorageAssetsCreateResponse200Type0
|
|
202
|
+
"""
|
|
203
|
+
|
|
204
|
+
return (
|
|
205
|
+
await asyncio_detailed(
|
|
206
|
+
client=client,
|
|
207
|
+
body=body,
|
|
208
|
+
)
|
|
209
|
+
).parsed
|