typizer 0.1.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.
- typizer/__init__.py +8 -0
- typizer/api/__init__.py +1 -0
- typizer/api/account/__init__.py +1 -0
- typizer/api/account/delete_me.py +243 -0
- typizer/api/account/get_me.py +192 -0
- typizer/api/account/list_sign_ins.py +194 -0
- typizer/api/agent/__init__.py +1 -0
- typizer/api/agent/create_agent_message.py +290 -0
- typizer/api/agent/create_agent_sample_run.py +304 -0
- typizer/api/agent/create_agent_thread.py +251 -0
- typizer/api/agent/get_agent_thread.py +223 -0
- typizer/api/agent/list_agent_threads.py +243 -0
- typizer/api/agent/save_agent_thread.py +283 -0
- typizer/api/agent/update_agent_thread.py +245 -0
- typizer/api/api_keys/__init__.py +1 -0
- typizer/api/api_keys/create_api_key.py +235 -0
- typizer/api/api_keys/delete_api_key.py +217 -0
- typizer/api/api_keys/list_api_keys.py +196 -0
- typizer/api/auth/__init__.py +1 -0
- typizer/api/auth/start_login.py +209 -0
- typizer/api/batches/__init__.py +1 -0
- typizer/api/batches/create_batch.py +333 -0
- typizer/api/batches/export_batch.py +281 -0
- typizer/api/batches/get_batch.py +213 -0
- typizer/api/batches/list_batches.py +243 -0
- typizer/api/billing/__init__.py +1 -0
- typizer/api/billing/create_checkout.py +243 -0
- typizer/api/billing/create_contract_request.py +233 -0
- typizer/api/billing/create_invoice.py +243 -0
- typizer/api/billing/get_act_pdf.py +225 -0
- typizer/api/billing/get_balance.py +187 -0
- typizer/api/billing/get_billing_profile.py +196 -0
- typizer/api/billing/get_company.py +233 -0
- typizer/api/billing/get_contract_request_pdf.py +225 -0
- typizer/api/billing/get_payment.py +213 -0
- typizer/api/billing/get_usage.py +278 -0
- typizer/api/billing/list_contract_requests.py +196 -0
- typizer/api/billing/list_payments.py +233 -0
- typizer/api/billing/suggest_companies.py +214 -0
- typizer/api/billing/update_autotopup.py +231 -0
- typizer/api/billing/update_billing_profile.py +230 -0
- typizer/api/consents/__init__.py +1 -0
- typizer/api/consents/create_consent.py +228 -0
- typizer/api/consents/get_my_consents.py +210 -0
- typizer/api/demo/__init__.py +1 -0
- typizer/api/demo/create_demo_run.py +314 -0
- typizer/api/demo/get_demo_run.py +249 -0
- typizer/api/demo/list_demo_samples.py +159 -0
- typizer/api/files/__init__.py +1 -0
- typizer/api/files/create_file.py +266 -0
- typizer/api/files/delete_file.py +231 -0
- typizer/api/files/get_file.py +213 -0
- typizer/api/files/get_file_content.py +233 -0
- typizer/api/meta/__init__.py +1 -0
- typizer/api/meta/get_open_api_document.py +185 -0
- typizer/api/organization/__init__.py +1 -0
- typizer/api/organization/delete_organization.py +231 -0
- typizer/api/organization/get_organization.py +194 -0
- typizer/api/organization/update_organization.py +212 -0
- typizer/api/runs/__init__.py +1 -0
- typizer/api/runs/create_run.py +358 -0
- typizer/api/runs/extract.py +350 -0
- typizer/api/runs/get_run.py +225 -0
- typizer/api/runs/get_run_output.py +286 -0
- typizer/api/runs/list_runs.py +362 -0
- typizer/api/runs/retry_run.py +275 -0
- typizer/api/status/__init__.py +1 -0
- typizer/api/status/get_status.py +172 -0
- typizer/api/typizers/__init__.py +1 -0
- typizer/api/typizers/create_typizer.py +239 -0
- typizer/api/typizers/delete_typizer.py +229 -0
- typizer/api/typizers/generate_typizer.py +282 -0
- typizer/api/typizers/get_typizer.py +213 -0
- typizer/api/typizers/get_typizer_version.py +231 -0
- typizer/api/typizers/get_typizer_xsd.py +215 -0
- typizer/api/typizers/list_typizer_versions.py +256 -0
- typizer/api/typizers/list_typizers.py +235 -0
- typizer/api/typizers/update_typizer.py +247 -0
- typizer/api/webhooks/__init__.py +1 -0
- typizer/api/webhooks/create_webhook_endpoint.py +259 -0
- typizer/api/webhooks/delete_webhook_endpoint.py +217 -0
- typizer/api/webhooks/get_webhook_endpoint.py +217 -0
- typizer/api/webhooks/list_webhook_deliveries.py +264 -0
- typizer/api/webhooks/list_webhook_endpoints.py +235 -0
- typizer/api/webhooks/retry_webhook_delivery.py +254 -0
- typizer/api/webhooks/test_webhook_endpoint.py +254 -0
- typizer/api/webhooks/update_webhook_endpoint.py +252 -0
- typizer/client.py +268 -0
- typizer/errors.py +16 -0
- typizer/models/__init__.py +449 -0
- typizer/models/agent_message.py +103 -0
- typizer/models/agent_message_content.py +72 -0
- typizer/models/agent_message_object.py +8 -0
- typizer/models/agent_message_role.py +10 -0
- typizer/models/agent_thread.py +166 -0
- typizer/models/agent_thread_draft_schema_type_0.py +47 -0
- typizer/models/agent_thread_object.py +8 -0
- typizer/models/api_key.py +152 -0
- typizer/models/api_key_created_by.py +87 -0
- typizer/models/api_key_object.py +8 -0
- typizer/models/balance.py +103 -0
- typizer/models/balance_lot.py +97 -0
- typizer/models/balance_lot_source.py +11 -0
- typizer/models/balance_object.py +8 -0
- typizer/models/batch.py +146 -0
- typizer/models/batch_object.py +8 -0
- typizer/models/batch_status.py +9 -0
- typizer/models/billing_profile.py +184 -0
- typizer/models/billing_profile_autotopup.py +148 -0
- typizer/models/billing_profile_object.py +8 -0
- typizer/models/checkout.py +69 -0
- typizer/models/checkout_request.py +87 -0
- typizer/models/checkout_request_autotopup.py +81 -0
- typizer/models/checkout_request_package_code.py +12 -0
- typizer/models/company.py +139 -0
- typizer/models/company_list.py +107 -0
- typizer/models/company_list_object.py +8 -0
- typizer/models/company_object.py +8 -0
- typizer/models/company_status.py +12 -0
- typizer/models/company_type.py +9 -0
- typizer/models/consent_request.py +61 -0
- typizer/models/consent_request_kind.py +9 -0
- typizer/models/contract_request.py +211 -0
- typizer/models/contract_request_delivery_type_1.py +9 -0
- typizer/models/contract_request_delivery_type_2_type_1.py +9 -0
- typizer/models/contract_request_delivery_type_3_type_1.py +9 -0
- typizer/models/contract_request_edo_type_0.py +112 -0
- typizer/models/contract_request_list.py +107 -0
- typizer/models/contract_request_list_object.py +8 -0
- typizer/models/contract_request_object.py +8 -0
- typizer/models/contract_request_status.py +12 -0
- typizer/models/create_agent_message_request.py +54 -0
- typizer/models/create_agent_thread_request.py +51 -0
- typizer/models/create_api_key_request.py +85 -0
- typizer/models/create_batch_files_body.py +149 -0
- typizer/models/create_batch_files_body_format.py +11 -0
- typizer/models/create_batch_files_body_mode.py +9 -0
- typizer/models/create_batch_request.py +108 -0
- typizer/models/create_batch_request_format.py +11 -0
- typizer/models/create_batch_request_metadata.py +52 -0
- typizer/models/create_batch_request_mode.py +9 -0
- typizer/models/create_demo_run_files_body.py +107 -0
- typizer/models/create_demo_run_files_body_consent_pd.py +8 -0
- typizer/models/create_file_body.py +75 -0
- typizer/models/create_invoice_request.py +63 -0
- typizer/models/create_invoice_request_package_code.py +12 -0
- typizer/models/create_run_files_body.py +169 -0
- typizer/models/create_run_files_body_format.py +11 -0
- typizer/models/create_run_files_body_mode.py +9 -0
- typizer/models/create_run_request.py +120 -0
- typizer/models/create_run_request_format.py +11 -0
- typizer/models/create_run_request_metadata.py +53 -0
- typizer/models/create_run_request_mode.py +9 -0
- typizer/models/create_typizer_request.py +125 -0
- typizer/models/create_typizer_request_default_format.py +11 -0
- typizer/models/create_typizer_request_mode.py +9 -0
- typizer/models/create_typizer_request_schema.py +53 -0
- typizer/models/create_webhook_endpoint_request.py +62 -0
- typizer/models/created_api_key.py +163 -0
- typizer/models/deleted_api_key.py +79 -0
- typizer/models/deleted_api_key_object.py +8 -0
- typizer/models/deleted_file.py +79 -0
- typizer/models/deleted_file_object.py +8 -0
- typizer/models/deleted_typizer.py +79 -0
- typizer/models/deleted_typizer_object.py +8 -0
- typizer/models/deleted_webhook_endpoint.py +79 -0
- typizer/models/deleted_webhook_endpoint_object.py +8 -0
- typizer/models/demo_run.py +180 -0
- typizer/models/demo_run_error_type_0.py +69 -0
- typizer/models/demo_run_object.py +8 -0
- typizer/models/demo_run_pages.py +76 -0
- typizer/models/demo_run_request.py +52 -0
- typizer/models/demo_run_request_sample.py +10 -0
- typizer/models/demo_run_status.py +11 -0
- typizer/models/demo_sample.py +95 -0
- typizer/models/demo_sample_id.py +10 -0
- typizer/models/demo_sample_list.py +85 -0
- typizer/models/demo_sample_list_object.py +8 -0
- typizer/models/export_batch_format.py +10 -0
- typizer/models/extract_files_body.py +194 -0
- typizer/models/extract_files_body_format.py +11 -0
- typizer/models/extract_files_body_mode.py +9 -0
- typizer/models/extract_request.py +146 -0
- typizer/models/extract_request_format.py +11 -0
- typizer/models/extract_request_metadata.py +53 -0
- typizer/models/extract_request_mode.py +9 -0
- typizer/models/extract_request_schema.py +53 -0
- typizer/models/file.py +153 -0
- typizer/models/file_object.py +8 -0
- typizer/models/file_source.py +12 -0
- typizer/models/generate_typizer_request.py +51 -0
- typizer/models/get_open_api_document_response_200.py +45 -0
- typizer/models/get_run_output_format.py +11 -0
- typizer/models/get_usage_group_by.py +10 -0
- typizer/models/list_agent_threads_response_200.py +107 -0
- typizer/models/list_agent_threads_response_200_object.py +8 -0
- typizer/models/list_api_keys_response_200.py +107 -0
- typizer/models/list_api_keys_response_200_object.py +8 -0
- typizer/models/list_batches_response_200.py +107 -0
- typizer/models/list_batches_response_200_object.py +8 -0
- typizer/models/list_runs_response_200.py +107 -0
- typizer/models/list_runs_response_200_object.py +8 -0
- typizer/models/list_runs_source.py +12 -0
- typizer/models/list_runs_status.py +11 -0
- typizer/models/list_typizer_versions_response_200.py +107 -0
- typizer/models/list_typizer_versions_response_200_object.py +8 -0
- typizer/models/list_typizers_response_200.py +107 -0
- typizer/models/list_typizers_response_200_object.py +8 -0
- typizer/models/list_webhook_deliveries_response_200.py +107 -0
- typizer/models/list_webhook_deliveries_response_200_object.py +8 -0
- typizer/models/list_webhook_endpoints_response_200.py +107 -0
- typizer/models/list_webhook_endpoints_response_200_object.py +8 -0
- typizer/models/login_challenge.py +71 -0
- typizer/models/login_challenge_object.py +8 -0
- typizer/models/login_start_request.py +94 -0
- typizer/models/login_start_request_consents.py +74 -0
- typizer/models/login_start_request_consents_pd_processing.py +61 -0
- typizer/models/maintenance_event.py +139 -0
- typizer/models/maintenance_event_components_item.py +13 -0
- typizer/models/maintenance_event_kind.py +9 -0
- typizer/models/maintenance_event_object.py +8 -0
- typizer/models/maintenance_event_status.py +9 -0
- typizer/models/marketing_consent_state.py +102 -0
- typizer/models/me.py +226 -0
- typizer/models/me_api_key_type_0.py +88 -0
- typizer/models/me_auth.py +9 -0
- typizer/models/me_features.py +70 -0
- typizer/models/me_object.py +8 -0
- typizer/models/me_organization.py +69 -0
- typizer/models/me_organizations_item.py +79 -0
- typizer/models/me_organizations_item_role.py +10 -0
- typizer/models/me_role_type_1.py +10 -0
- typizer/models/me_role_type_2_type_1.py +10 -0
- typizer/models/me_role_type_3_type_1.py +10 -0
- typizer/models/me_user_type_0.py +86 -0
- typizer/models/my_consents.py +77 -0
- typizer/models/my_consents_object.py +8 -0
- typizer/models/organization.py +93 -0
- typizer/models/organization_object.py +8 -0
- typizer/models/organization_settings.py +74 -0
- typizer/models/organization_settings_file_retention.py +11 -0
- typizer/models/organization_settings_output_retention.py +10 -0
- typizer/models/payment.py +231 -0
- typizer/models/payment_act_type_0.py +136 -0
- typizer/models/payment_act_type_0_edo_type_0.py +112 -0
- typizer/models/payment_invoice_type_0.py +121 -0
- typizer/models/payment_invoice_type_0_status.py +11 -0
- typizer/models/payment_list.py +107 -0
- typizer/models/payment_list_object.py +8 -0
- typizer/models/payment_method.py +10 -0
- typizer/models/payment_object.py +8 -0
- typizer/models/payment_status.py +15 -0
- typizer/models/problem.py +158 -0
- typizer/models/problem_code.py +26 -0
- typizer/models/run.py +318 -0
- typizer/models/run_error_type_0.py +69 -0
- typizer/models/run_fields_type_0.py +45 -0
- typizer/models/run_file_type_0.py +69 -0
- typizer/models/run_format.py +11 -0
- typizer/models/run_metadata.py +45 -0
- typizer/models/run_mode.py +9 -0
- typizer/models/run_object.py +8 -0
- typizer/models/run_pages.py +82 -0
- typizer/models/run_source.py +12 -0
- typizer/models/run_status.py +11 -0
- typizer/models/save_agent_thread_request.py +63 -0
- typizer/models/save_agent_thread_response_200.py +47 -0
- typizer/models/save_agent_thread_response_201.py +47 -0
- typizer/models/scope.py +12 -0
- typizer/models/sign_in.py +94 -0
- typizer/models/sign_in_list.py +108 -0
- typizer/models/sign_in_list_object.py +8 -0
- typizer/models/sign_in_object.py +8 -0
- typizer/models/status.py +85 -0
- typizer/models/status_object.py +8 -0
- typizer/models/typizer.py +158 -0
- typizer/models/typizer_default_format.py +11 -0
- typizer/models/typizer_draft.py +97 -0
- typizer/models/typizer_draft_object.py +8 -0
- typizer/models/typizer_draft_schema.py +53 -0
- typizer/models/typizer_mode.py +9 -0
- typizer/models/typizer_object.py +8 -0
- typizer/models/typizer_schema.py +47 -0
- typizer/models/typizer_version.py +118 -0
- typizer/models/typizer_version_object.py +8 -0
- typizer/models/typizer_version_schema.py +45 -0
- typizer/models/update_agent_thread_request.py +80 -0
- typizer/models/update_agent_thread_request_draft_schema.py +53 -0
- typizer/models/update_autotopup_request.py +111 -0
- typizer/models/update_autotopup_request_consent.py +62 -0
- typizer/models/update_autotopup_request_package_code.py +12 -0
- typizer/models/update_billing_profile_request.py +127 -0
- typizer/models/update_organization_request.py +69 -0
- typizer/models/update_organization_request_file_retention.py +11 -0
- typizer/models/update_organization_request_output_retention.py +10 -0
- typizer/models/update_typizer_request.py +131 -0
- typizer/models/update_typizer_request_default_format.py +11 -0
- typizer/models/update_typizer_request_mode.py +9 -0
- typizer/models/update_typizer_request_schema.py +53 -0
- typizer/models/update_webhook_endpoint_request.py +83 -0
- typizer/models/update_webhook_endpoint_request_status.py +9 -0
- typizer/models/usage.py +119 -0
- typizer/models/usage_group_by.py +10 -0
- typizer/models/usage_object.py +8 -0
- typizer/models/usage_row.py +102 -0
- typizer/models/webhook_delivery.py +154 -0
- typizer/models/webhook_delivery_object.py +8 -0
- typizer/models/webhook_delivery_status.py +10 -0
- typizer/models/webhook_endpoint.py +156 -0
- typizer/models/webhook_endpoint_object.py +8 -0
- typizer/models/webhook_endpoint_status.py +9 -0
- typizer/models/webhook_event_type.py +11 -0
- typizer/py.typed +1 -0
- typizer/types.py +54 -0
- typizer-0.1.0.dist-info/METADATA +280 -0
- typizer-0.1.0.dist-info/RECORD +318 -0
- typizer-0.1.0.dist-info/WHEEL +4 -0
- typizer-0.1.0.dist-info/licenses/LICENSE +21 -0
typizer/__init__.py
ADDED
typizer/api/__init__.py
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"""Contains methods for accessing the API"""
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"""Contains endpoint functions for accessing the API"""
|
|
@@ -0,0 +1,243 @@
|
|
|
1
|
+
from http import HTTPStatus
|
|
2
|
+
from typing import Any, cast
|
|
3
|
+
|
|
4
|
+
import httpx
|
|
5
|
+
|
|
6
|
+
from ... import errors
|
|
7
|
+
from ...client import AuthenticatedClient, Client
|
|
8
|
+
from ...models.problem import Problem
|
|
9
|
+
from ...types import UNSET, Response, Unset
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
def _get_kwargs(
|
|
13
|
+
*,
|
|
14
|
+
typizer_organization: str | Unset = UNSET,
|
|
15
|
+
) -> dict[str, Any]:
|
|
16
|
+
headers: dict[str, Any] = {}
|
|
17
|
+
if not isinstance(typizer_organization, Unset):
|
|
18
|
+
headers["Typizer-Organization"] = typizer_organization
|
|
19
|
+
|
|
20
|
+
_kwargs: dict[str, Any] = {
|
|
21
|
+
"method": "delete",
|
|
22
|
+
"url": "/v1/me",
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
_kwargs["headers"] = headers
|
|
26
|
+
return _kwargs
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Any | Problem | None:
|
|
30
|
+
if response.status_code == 204:
|
|
31
|
+
response_204 = cast(Any, None)
|
|
32
|
+
return response_204
|
|
33
|
+
|
|
34
|
+
if response.status_code == 400:
|
|
35
|
+
response_400 = Problem.from_dict(response.json())
|
|
36
|
+
|
|
37
|
+
return response_400
|
|
38
|
+
|
|
39
|
+
if response.status_code == 401:
|
|
40
|
+
response_401 = Problem.from_dict(response.json())
|
|
41
|
+
|
|
42
|
+
return response_401
|
|
43
|
+
|
|
44
|
+
if response.status_code == 403:
|
|
45
|
+
response_403 = Problem.from_dict(response.json())
|
|
46
|
+
|
|
47
|
+
return response_403
|
|
48
|
+
|
|
49
|
+
if response.status_code == 409:
|
|
50
|
+
response_409 = Problem.from_dict(response.json())
|
|
51
|
+
|
|
52
|
+
return response_409
|
|
53
|
+
|
|
54
|
+
if response.status_code == 429:
|
|
55
|
+
response_429 = Problem.from_dict(response.json())
|
|
56
|
+
|
|
57
|
+
return response_429
|
|
58
|
+
|
|
59
|
+
if response.status_code == 500:
|
|
60
|
+
response_500 = Problem.from_dict(response.json())
|
|
61
|
+
|
|
62
|
+
return response_500
|
|
63
|
+
|
|
64
|
+
if response.status_code == 503:
|
|
65
|
+
response_503 = Problem.from_dict(response.json())
|
|
66
|
+
|
|
67
|
+
return response_503
|
|
68
|
+
|
|
69
|
+
if client.raise_on_unexpected_status:
|
|
70
|
+
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
71
|
+
else:
|
|
72
|
+
return None
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[Any | Problem]:
|
|
76
|
+
return Response(
|
|
77
|
+
status_code=HTTPStatus(response.status_code),
|
|
78
|
+
content=response.content,
|
|
79
|
+
headers=response.headers,
|
|
80
|
+
parsed=_parse_response(client=client, response=response),
|
|
81
|
+
)
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
def sync_detailed(
|
|
85
|
+
*,
|
|
86
|
+
client: AuthenticatedClient,
|
|
87
|
+
typizer_organization: str | Unset = UNSET,
|
|
88
|
+
) -> Response[Any | Problem]:
|
|
89
|
+
"""Удалить аккаунт и отозвать согласие на обработку персональных данных
|
|
90
|
+
|
|
91
|
+
Только сессия, вход не раньше чем 10 минут назад (иначе 403 forbidden «recent sign-in required»:
|
|
92
|
+
войдите заново).
|
|
93
|
+
|
|
94
|
+
Так отзывается согласие на обработку персональных данных (pd-consent, п. 7.3): аккаунт
|
|
95
|
+
обезличивается — удаляются почта, имя и фото, завершаются все сессии, способы входа, ключи API
|
|
96
|
+
и членства, — а личная организация удаляется (файлы и результаты удаляют задачи хранения).
|
|
97
|
+
Отзыв записывается в журнал согласий; платёжные записи хранятся, как требует налоговое
|
|
98
|
+
законодательство.
|
|
99
|
+
|
|
100
|
+
Если пользователь — единственный владелец другой организации, ничего не меняется и ответ —
|
|
101
|
+
409 conflict: сначала передайте владение или удалите ту организацию.
|
|
102
|
+
|
|
103
|
+
Доступ: только сессия.
|
|
104
|
+
|
|
105
|
+
Args:
|
|
106
|
+
typizer_organization (str | Unset):
|
|
107
|
+
|
|
108
|
+
Raises:
|
|
109
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
110
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
111
|
+
|
|
112
|
+
Returns:
|
|
113
|
+
Response[Any | Problem]
|
|
114
|
+
"""
|
|
115
|
+
|
|
116
|
+
kwargs = _get_kwargs(
|
|
117
|
+
typizer_organization=typizer_organization,
|
|
118
|
+
)
|
|
119
|
+
|
|
120
|
+
response = client.get_httpx_client().request(
|
|
121
|
+
**kwargs,
|
|
122
|
+
)
|
|
123
|
+
|
|
124
|
+
return _build_response(client=client, response=response)
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
def sync(
|
|
128
|
+
*,
|
|
129
|
+
client: AuthenticatedClient,
|
|
130
|
+
typizer_organization: str | Unset = UNSET,
|
|
131
|
+
) -> Any | Problem | None:
|
|
132
|
+
"""Удалить аккаунт и отозвать согласие на обработку персональных данных
|
|
133
|
+
|
|
134
|
+
Только сессия, вход не раньше чем 10 минут назад (иначе 403 forbidden «recent sign-in required»:
|
|
135
|
+
войдите заново).
|
|
136
|
+
|
|
137
|
+
Так отзывается согласие на обработку персональных данных (pd-consent, п. 7.3): аккаунт
|
|
138
|
+
обезличивается — удаляются почта, имя и фото, завершаются все сессии, способы входа, ключи API
|
|
139
|
+
и членства, — а личная организация удаляется (файлы и результаты удаляют задачи хранения).
|
|
140
|
+
Отзыв записывается в журнал согласий; платёжные записи хранятся, как требует налоговое
|
|
141
|
+
законодательство.
|
|
142
|
+
|
|
143
|
+
Если пользователь — единственный владелец другой организации, ничего не меняется и ответ —
|
|
144
|
+
409 conflict: сначала передайте владение или удалите ту организацию.
|
|
145
|
+
|
|
146
|
+
Доступ: только сессия.
|
|
147
|
+
|
|
148
|
+
Args:
|
|
149
|
+
typizer_organization (str | Unset):
|
|
150
|
+
|
|
151
|
+
Raises:
|
|
152
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
153
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
154
|
+
|
|
155
|
+
Returns:
|
|
156
|
+
Any | Problem
|
|
157
|
+
"""
|
|
158
|
+
|
|
159
|
+
return sync_detailed(
|
|
160
|
+
client=client,
|
|
161
|
+
typizer_organization=typizer_organization,
|
|
162
|
+
).parsed
|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
async def asyncio_detailed(
|
|
166
|
+
*,
|
|
167
|
+
client: AuthenticatedClient,
|
|
168
|
+
typizer_organization: str | Unset = UNSET,
|
|
169
|
+
) -> Response[Any | Problem]:
|
|
170
|
+
"""Удалить аккаунт и отозвать согласие на обработку персональных данных
|
|
171
|
+
|
|
172
|
+
Только сессия, вход не раньше чем 10 минут назад (иначе 403 forbidden «recent sign-in required»:
|
|
173
|
+
войдите заново).
|
|
174
|
+
|
|
175
|
+
Так отзывается согласие на обработку персональных данных (pd-consent, п. 7.3): аккаунт
|
|
176
|
+
обезличивается — удаляются почта, имя и фото, завершаются все сессии, способы входа, ключи API
|
|
177
|
+
и членства, — а личная организация удаляется (файлы и результаты удаляют задачи хранения).
|
|
178
|
+
Отзыв записывается в журнал согласий; платёжные записи хранятся, как требует налоговое
|
|
179
|
+
законодательство.
|
|
180
|
+
|
|
181
|
+
Если пользователь — единственный владелец другой организации, ничего не меняется и ответ —
|
|
182
|
+
409 conflict: сначала передайте владение или удалите ту организацию.
|
|
183
|
+
|
|
184
|
+
Доступ: только сессия.
|
|
185
|
+
|
|
186
|
+
Args:
|
|
187
|
+
typizer_organization (str | Unset):
|
|
188
|
+
|
|
189
|
+
Raises:
|
|
190
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
191
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
192
|
+
|
|
193
|
+
Returns:
|
|
194
|
+
Response[Any | Problem]
|
|
195
|
+
"""
|
|
196
|
+
|
|
197
|
+
kwargs = _get_kwargs(
|
|
198
|
+
typizer_organization=typizer_organization,
|
|
199
|
+
)
|
|
200
|
+
|
|
201
|
+
response = await client.get_async_httpx_client().request(**kwargs)
|
|
202
|
+
|
|
203
|
+
return _build_response(client=client, response=response)
|
|
204
|
+
|
|
205
|
+
|
|
206
|
+
async def asyncio(
|
|
207
|
+
*,
|
|
208
|
+
client: AuthenticatedClient,
|
|
209
|
+
typizer_organization: str | Unset = UNSET,
|
|
210
|
+
) -> Any | Problem | None:
|
|
211
|
+
"""Удалить аккаунт и отозвать согласие на обработку персональных данных
|
|
212
|
+
|
|
213
|
+
Только сессия, вход не раньше чем 10 минут назад (иначе 403 forbidden «recent sign-in required»:
|
|
214
|
+
войдите заново).
|
|
215
|
+
|
|
216
|
+
Так отзывается согласие на обработку персональных данных (pd-consent, п. 7.3): аккаунт
|
|
217
|
+
обезличивается — удаляются почта, имя и фото, завершаются все сессии, способы входа, ключи API
|
|
218
|
+
и членства, — а личная организация удаляется (файлы и результаты удаляют задачи хранения).
|
|
219
|
+
Отзыв записывается в журнал согласий; платёжные записи хранятся, как требует налоговое
|
|
220
|
+
законодательство.
|
|
221
|
+
|
|
222
|
+
Если пользователь — единственный владелец другой организации, ничего не меняется и ответ —
|
|
223
|
+
409 conflict: сначала передайте владение или удалите ту организацию.
|
|
224
|
+
|
|
225
|
+
Доступ: только сессия.
|
|
226
|
+
|
|
227
|
+
Args:
|
|
228
|
+
typizer_organization (str | Unset):
|
|
229
|
+
|
|
230
|
+
Raises:
|
|
231
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
232
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
233
|
+
|
|
234
|
+
Returns:
|
|
235
|
+
Any | Problem
|
|
236
|
+
"""
|
|
237
|
+
|
|
238
|
+
return (
|
|
239
|
+
await asyncio_detailed(
|
|
240
|
+
client=client,
|
|
241
|
+
typizer_organization=typizer_organization,
|
|
242
|
+
)
|
|
243
|
+
).parsed
|
|
@@ -0,0 +1,192 @@
|
|
|
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.me import Me
|
|
9
|
+
from ...models.problem import Problem
|
|
10
|
+
from ...types import UNSET, Response, Unset
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
def _get_kwargs(
|
|
14
|
+
*,
|
|
15
|
+
typizer_organization: str | Unset = UNSET,
|
|
16
|
+
) -> dict[str, Any]:
|
|
17
|
+
headers: dict[str, Any] = {}
|
|
18
|
+
if not isinstance(typizer_organization, Unset):
|
|
19
|
+
headers["Typizer-Organization"] = typizer_organization
|
|
20
|
+
|
|
21
|
+
_kwargs: dict[str, Any] = {
|
|
22
|
+
"method": "get",
|
|
23
|
+
"url": "/v1/me",
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
_kwargs["headers"] = headers
|
|
27
|
+
return _kwargs
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Me | Problem | None:
|
|
31
|
+
if response.status_code == 200:
|
|
32
|
+
response_200 = Me.from_dict(response.json())
|
|
33
|
+
|
|
34
|
+
return response_200
|
|
35
|
+
|
|
36
|
+
if response.status_code == 400:
|
|
37
|
+
response_400 = Problem.from_dict(response.json())
|
|
38
|
+
|
|
39
|
+
return response_400
|
|
40
|
+
|
|
41
|
+
if response.status_code == 401:
|
|
42
|
+
response_401 = Problem.from_dict(response.json())
|
|
43
|
+
|
|
44
|
+
return response_401
|
|
45
|
+
|
|
46
|
+
if response.status_code == 403:
|
|
47
|
+
response_403 = Problem.from_dict(response.json())
|
|
48
|
+
|
|
49
|
+
return response_403
|
|
50
|
+
|
|
51
|
+
if response.status_code == 429:
|
|
52
|
+
response_429 = Problem.from_dict(response.json())
|
|
53
|
+
|
|
54
|
+
return response_429
|
|
55
|
+
|
|
56
|
+
if response.status_code == 500:
|
|
57
|
+
response_500 = Problem.from_dict(response.json())
|
|
58
|
+
|
|
59
|
+
return response_500
|
|
60
|
+
|
|
61
|
+
if response.status_code == 503:
|
|
62
|
+
response_503 = Problem.from_dict(response.json())
|
|
63
|
+
|
|
64
|
+
return response_503
|
|
65
|
+
|
|
66
|
+
if client.raise_on_unexpected_status:
|
|
67
|
+
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
68
|
+
else:
|
|
69
|
+
return None
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[Me | Problem]:
|
|
73
|
+
return Response(
|
|
74
|
+
status_code=HTTPStatus(response.status_code),
|
|
75
|
+
content=response.content,
|
|
76
|
+
headers=response.headers,
|
|
77
|
+
parsed=_parse_response(client=client, response=response),
|
|
78
|
+
)
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
def sync_detailed(
|
|
82
|
+
*,
|
|
83
|
+
client: AuthenticatedClient,
|
|
84
|
+
typizer_organization: str | Unset = UNSET,
|
|
85
|
+
) -> Response[Me | Problem]:
|
|
86
|
+
"""Кто вызывает: пользователь или ключ API, организация, флаги функций
|
|
87
|
+
|
|
88
|
+
Доступ: ключ API или сессия.
|
|
89
|
+
|
|
90
|
+
Args:
|
|
91
|
+
typizer_organization (str | Unset):
|
|
92
|
+
|
|
93
|
+
Raises:
|
|
94
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
95
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
96
|
+
|
|
97
|
+
Returns:
|
|
98
|
+
Response[Me | Problem]
|
|
99
|
+
"""
|
|
100
|
+
|
|
101
|
+
kwargs = _get_kwargs(
|
|
102
|
+
typizer_organization=typizer_organization,
|
|
103
|
+
)
|
|
104
|
+
|
|
105
|
+
response = client.get_httpx_client().request(
|
|
106
|
+
**kwargs,
|
|
107
|
+
)
|
|
108
|
+
|
|
109
|
+
return _build_response(client=client, response=response)
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
def sync(
|
|
113
|
+
*,
|
|
114
|
+
client: AuthenticatedClient,
|
|
115
|
+
typizer_organization: str | Unset = UNSET,
|
|
116
|
+
) -> Me | Problem | None:
|
|
117
|
+
"""Кто вызывает: пользователь или ключ API, организация, флаги функций
|
|
118
|
+
|
|
119
|
+
Доступ: ключ API или сессия.
|
|
120
|
+
|
|
121
|
+
Args:
|
|
122
|
+
typizer_organization (str | Unset):
|
|
123
|
+
|
|
124
|
+
Raises:
|
|
125
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
126
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
127
|
+
|
|
128
|
+
Returns:
|
|
129
|
+
Me | Problem
|
|
130
|
+
"""
|
|
131
|
+
|
|
132
|
+
return sync_detailed(
|
|
133
|
+
client=client,
|
|
134
|
+
typizer_organization=typizer_organization,
|
|
135
|
+
).parsed
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
async def asyncio_detailed(
|
|
139
|
+
*,
|
|
140
|
+
client: AuthenticatedClient,
|
|
141
|
+
typizer_organization: str | Unset = UNSET,
|
|
142
|
+
) -> Response[Me | Problem]:
|
|
143
|
+
"""Кто вызывает: пользователь или ключ API, организация, флаги функций
|
|
144
|
+
|
|
145
|
+
Доступ: ключ API или сессия.
|
|
146
|
+
|
|
147
|
+
Args:
|
|
148
|
+
typizer_organization (str | Unset):
|
|
149
|
+
|
|
150
|
+
Raises:
|
|
151
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
152
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
153
|
+
|
|
154
|
+
Returns:
|
|
155
|
+
Response[Me | Problem]
|
|
156
|
+
"""
|
|
157
|
+
|
|
158
|
+
kwargs = _get_kwargs(
|
|
159
|
+
typizer_organization=typizer_organization,
|
|
160
|
+
)
|
|
161
|
+
|
|
162
|
+
response = await client.get_async_httpx_client().request(**kwargs)
|
|
163
|
+
|
|
164
|
+
return _build_response(client=client, response=response)
|
|
165
|
+
|
|
166
|
+
|
|
167
|
+
async def asyncio(
|
|
168
|
+
*,
|
|
169
|
+
client: AuthenticatedClient,
|
|
170
|
+
typizer_organization: str | Unset = UNSET,
|
|
171
|
+
) -> Me | Problem | None:
|
|
172
|
+
"""Кто вызывает: пользователь или ключ API, организация, флаги функций
|
|
173
|
+
|
|
174
|
+
Доступ: ключ API или сессия.
|
|
175
|
+
|
|
176
|
+
Args:
|
|
177
|
+
typizer_organization (str | Unset):
|
|
178
|
+
|
|
179
|
+
Raises:
|
|
180
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
181
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
182
|
+
|
|
183
|
+
Returns:
|
|
184
|
+
Me | Problem
|
|
185
|
+
"""
|
|
186
|
+
|
|
187
|
+
return (
|
|
188
|
+
await asyncio_detailed(
|
|
189
|
+
client=client,
|
|
190
|
+
typizer_organization=typizer_organization,
|
|
191
|
+
)
|
|
192
|
+
).parsed
|
|
@@ -0,0 +1,194 @@
|
|
|
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.problem import Problem
|
|
9
|
+
from ...models.sign_in_list import SignInList
|
|
10
|
+
from ...types import UNSET, Response, Unset
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
def _get_kwargs(
|
|
14
|
+
*,
|
|
15
|
+
typizer_organization: str | Unset = UNSET,
|
|
16
|
+
) -> dict[str, Any]:
|
|
17
|
+
headers: dict[str, Any] = {}
|
|
18
|
+
if not isinstance(typizer_organization, Unset):
|
|
19
|
+
headers["Typizer-Organization"] = typizer_organization
|
|
20
|
+
|
|
21
|
+
_kwargs: dict[str, Any] = {
|
|
22
|
+
"method": "get",
|
|
23
|
+
"url": "/v1/me/sign_ins",
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
_kwargs["headers"] = headers
|
|
27
|
+
return _kwargs
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Problem | SignInList | None:
|
|
31
|
+
if response.status_code == 200:
|
|
32
|
+
response_200 = SignInList.from_dict(response.json())
|
|
33
|
+
|
|
34
|
+
return response_200
|
|
35
|
+
|
|
36
|
+
if response.status_code == 400:
|
|
37
|
+
response_400 = Problem.from_dict(response.json())
|
|
38
|
+
|
|
39
|
+
return response_400
|
|
40
|
+
|
|
41
|
+
if response.status_code == 401:
|
|
42
|
+
response_401 = Problem.from_dict(response.json())
|
|
43
|
+
|
|
44
|
+
return response_401
|
|
45
|
+
|
|
46
|
+
if response.status_code == 403:
|
|
47
|
+
response_403 = Problem.from_dict(response.json())
|
|
48
|
+
|
|
49
|
+
return response_403
|
|
50
|
+
|
|
51
|
+
if response.status_code == 429:
|
|
52
|
+
response_429 = Problem.from_dict(response.json())
|
|
53
|
+
|
|
54
|
+
return response_429
|
|
55
|
+
|
|
56
|
+
if response.status_code == 500:
|
|
57
|
+
response_500 = Problem.from_dict(response.json())
|
|
58
|
+
|
|
59
|
+
return response_500
|
|
60
|
+
|
|
61
|
+
if response.status_code == 503:
|
|
62
|
+
response_503 = Problem.from_dict(response.json())
|
|
63
|
+
|
|
64
|
+
return response_503
|
|
65
|
+
|
|
66
|
+
if client.raise_on_unexpected_status:
|
|
67
|
+
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
68
|
+
else:
|
|
69
|
+
return None
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
def _build_response(
|
|
73
|
+
*, client: AuthenticatedClient | Client, response: httpx.Response
|
|
74
|
+
) -> Response[Problem | SignInList]:
|
|
75
|
+
return Response(
|
|
76
|
+
status_code=HTTPStatus(response.status_code),
|
|
77
|
+
content=response.content,
|
|
78
|
+
headers=response.headers,
|
|
79
|
+
parsed=_parse_response(client=client, response=response),
|
|
80
|
+
)
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
def sync_detailed(
|
|
84
|
+
*,
|
|
85
|
+
client: AuthenticatedClient,
|
|
86
|
+
typizer_organization: str | Unset = UNSET,
|
|
87
|
+
) -> Response[Problem | SignInList]:
|
|
88
|
+
"""Журнал входов текущего пользователя
|
|
89
|
+
|
|
90
|
+
Доступ: только сессия.
|
|
91
|
+
|
|
92
|
+
Args:
|
|
93
|
+
typizer_organization (str | Unset):
|
|
94
|
+
|
|
95
|
+
Raises:
|
|
96
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
97
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
98
|
+
|
|
99
|
+
Returns:
|
|
100
|
+
Response[Problem | SignInList]
|
|
101
|
+
"""
|
|
102
|
+
|
|
103
|
+
kwargs = _get_kwargs(
|
|
104
|
+
typizer_organization=typizer_organization,
|
|
105
|
+
)
|
|
106
|
+
|
|
107
|
+
response = client.get_httpx_client().request(
|
|
108
|
+
**kwargs,
|
|
109
|
+
)
|
|
110
|
+
|
|
111
|
+
return _build_response(client=client, response=response)
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
def sync(
|
|
115
|
+
*,
|
|
116
|
+
client: AuthenticatedClient,
|
|
117
|
+
typizer_organization: str | Unset = UNSET,
|
|
118
|
+
) -> Problem | SignInList | None:
|
|
119
|
+
"""Журнал входов текущего пользователя
|
|
120
|
+
|
|
121
|
+
Доступ: только сессия.
|
|
122
|
+
|
|
123
|
+
Args:
|
|
124
|
+
typizer_organization (str | Unset):
|
|
125
|
+
|
|
126
|
+
Raises:
|
|
127
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
128
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
129
|
+
|
|
130
|
+
Returns:
|
|
131
|
+
Problem | SignInList
|
|
132
|
+
"""
|
|
133
|
+
|
|
134
|
+
return sync_detailed(
|
|
135
|
+
client=client,
|
|
136
|
+
typizer_organization=typizer_organization,
|
|
137
|
+
).parsed
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
async def asyncio_detailed(
|
|
141
|
+
*,
|
|
142
|
+
client: AuthenticatedClient,
|
|
143
|
+
typizer_organization: str | Unset = UNSET,
|
|
144
|
+
) -> Response[Problem | SignInList]:
|
|
145
|
+
"""Журнал входов текущего пользователя
|
|
146
|
+
|
|
147
|
+
Доступ: только сессия.
|
|
148
|
+
|
|
149
|
+
Args:
|
|
150
|
+
typizer_organization (str | Unset):
|
|
151
|
+
|
|
152
|
+
Raises:
|
|
153
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
154
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
155
|
+
|
|
156
|
+
Returns:
|
|
157
|
+
Response[Problem | SignInList]
|
|
158
|
+
"""
|
|
159
|
+
|
|
160
|
+
kwargs = _get_kwargs(
|
|
161
|
+
typizer_organization=typizer_organization,
|
|
162
|
+
)
|
|
163
|
+
|
|
164
|
+
response = await client.get_async_httpx_client().request(**kwargs)
|
|
165
|
+
|
|
166
|
+
return _build_response(client=client, response=response)
|
|
167
|
+
|
|
168
|
+
|
|
169
|
+
async def asyncio(
|
|
170
|
+
*,
|
|
171
|
+
client: AuthenticatedClient,
|
|
172
|
+
typizer_organization: str | Unset = UNSET,
|
|
173
|
+
) -> Problem | SignInList | None:
|
|
174
|
+
"""Журнал входов текущего пользователя
|
|
175
|
+
|
|
176
|
+
Доступ: только сессия.
|
|
177
|
+
|
|
178
|
+
Args:
|
|
179
|
+
typizer_organization (str | Unset):
|
|
180
|
+
|
|
181
|
+
Raises:
|
|
182
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
183
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
184
|
+
|
|
185
|
+
Returns:
|
|
186
|
+
Problem | SignInList
|
|
187
|
+
"""
|
|
188
|
+
|
|
189
|
+
return (
|
|
190
|
+
await asyncio_detailed(
|
|
191
|
+
client=client,
|
|
192
|
+
typizer_organization=typizer_organization,
|
|
193
|
+
)
|
|
194
|
+
).parsed
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"""Contains endpoint functions for accessing the API"""
|