telnyx 3.5.0a0__py3-none-any.whl → 3.6.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 telnyx might be problematic. Click here for more details.
- telnyx/_client.py +56 -756
- telnyx/_version.py +1 -1
- telnyx/resources/__init__.py +70 -0
- telnyx/resources/advanced_orders.py +63 -63
- telnyx/resources/ai/assistants/assistants.py +15 -17
- telnyx/resources/ai/assistants/versions.py +13 -15
- telnyx/resources/ai/conversations/conversations.py +137 -3
- telnyx/resources/ai/conversations/messages.py +1 -134
- telnyx/resources/brand/brand.py +8 -4
- telnyx/resources/calls/actions.py +154 -150
- telnyx/resources/calls/calls.py +18 -10
- telnyx/resources/conferences/actions.py +8 -24
- telnyx/resources/conferences/conferences.py +2 -6
- telnyx/resources/documents.py +242 -37
- telnyx/resources/legacy/__init__.py +33 -0
- telnyx/resources/legacy/legacy.py +102 -0
- telnyx/resources/legacy/reporting/__init__.py +47 -0
- telnyx/resources/legacy/reporting/batch_detail_records/__init__.py +61 -0
- telnyx/resources/legacy/reporting/batch_detail_records/batch_detail_records.py +166 -0
- telnyx/resources/legacy/reporting/batch_detail_records/messaging.py +482 -0
- telnyx/resources/legacy/reporting/batch_detail_records/speech_to_text.py +399 -0
- telnyx/resources/legacy/reporting/batch_detail_records/voice.py +539 -0
- telnyx/resources/legacy/reporting/reporting.py +134 -0
- telnyx/resources/legacy/reporting/usage_reports/__init__.py +61 -0
- telnyx/resources/legacy/reporting/usage_reports/messaging.py +471 -0
- telnyx/resources/legacy/reporting/usage_reports/number_lookup.py +464 -0
- telnyx/resources/legacy/reporting/usage_reports/usage_reports.py +288 -0
- telnyx/resources/legacy/reporting/usage_reports/voice.py +493 -0
- telnyx/resources/messaging_profiles/messaging_profiles.py +16 -0
- telnyx/resources/messaging_tollfree/verification/requests.py +203 -1
- telnyx/resources/oauth.py +855 -0
- telnyx/resources/oauth_clients.py +711 -0
- telnyx/resources/oauth_grants.py +349 -0
- telnyx/resources/outbound_voice_profiles.py +24 -4
- telnyx/resources/phone_numbers/jobs.py +12 -0
- telnyx/resources/porting_orders/porting_orders.py +20 -8
- telnyx/resources/sim_cards/actions.py +12 -12
- telnyx/resources/sim_cards/sim_cards.py +3 -2
- telnyx/resources/texml/accounts/calls/calls.py +11 -0
- telnyx/resources/texml/accounts/conferences/participants.py +11 -0
- telnyx/resources/verifications/verifications.py +10 -0
- telnyx/resources/verified_numbers/verified_numbers.py +25 -4
- telnyx/resources/verify_profiles.py +182 -1
- telnyx/resources/well_known.py +198 -0
- telnyx/types/__init__.py +51 -9
- telnyx/types/access_ip_address_list_response.py +3 -12
- telnyx/types/access_ip_range_list_response.py +3 -12
- telnyx/types/addresses/action_validate_response.py +8 -3
- telnyx/types/{advanced_order_update_params.py → advanced_order_update_requirement_group_params.py} +2 -2
- telnyx/types/ai/__init__.py +2 -3
- telnyx/types/ai/assistant_import_params.py +1 -1
- telnyx/types/ai/assistants/__init__.py +0 -3
- telnyx/types/ai/assistants_list.py +4 -88
- telnyx/types/ai/{conversations/message_create_params.py → conversation_add_message_params.py} +4 -4
- telnyx/types/ai/conversations/__init__.py +0 -1
- telnyx/types/ai/import_metadata.py +1 -1
- telnyx/types/ai/{assistant_clone_response.py → inference_embedding.py} +2 -2
- telnyx/types/ai/inference_embedding_transfer_tool_params.py +6 -0
- telnyx/types/ai/inference_embedding_transfer_tool_params_param.py +6 -0
- telnyx/types/ai/inference_embedding_webhook_tool_params.py +2 -0
- telnyx/types/ai/inference_embedding_webhook_tool_params_param.py +2 -0
- telnyx/types/ai/voice_settings.py +49 -2
- telnyx/types/ai/voice_settings_param.py +49 -2
- telnyx/types/brand_create_params.py +2 -1
- telnyx/types/brand_update_params.py +2 -1
- telnyx/types/call_dial_params.py +11 -3
- telnyx/types/calls/__init__.py +1 -0
- telnyx/types/calls/action_answer_params.py +1 -2
- telnyx/types/calls/action_gather_using_ai_params.py +5 -8
- telnyx/types/calls/action_start_streaming_params.py +5 -2
- telnyx/types/calls/action_start_transcription_params.py +160 -6
- telnyx/types/calls/action_transfer_params.py +50 -0
- telnyx/types/calls/telnyx_transcription_language.py +108 -0
- telnyx/types/calls/transcription_engine_b_config_param.py +3 -102
- telnyx/types/calls/transcription_start_request_param.py +161 -6
- telnyx/types/campaign_submit_appeal_response.py +0 -3
- telnyx/types/country_coverage_retrieve_country_response.py +7 -0
- telnyx/types/country_coverage_retrieve_response.py +7 -0
- telnyx/types/document_upload_json_params.py +39 -0
- telnyx/types/document_upload_json_response.py +12 -0
- telnyx/types/legacy/__init__.py +3 -0
- telnyx/types/legacy/reporting/__init__.py +12 -0
- telnyx/types/legacy/reporting/batch_detail_records/__init__.py +24 -0
- telnyx/types/legacy/reporting/batch_detail_records/batch_csv_pagination_meta.py +17 -0
- telnyx/types/legacy/reporting/batch_detail_records/cdr_detailed_req_response.py +63 -0
- telnyx/types/legacy/reporting/batch_detail_records/mdr_detail_report_response.py +42 -0
- telnyx/types/legacy/reporting/batch_detail_records/messaging_create_params.py +55 -0
- telnyx/types/legacy/reporting/batch_detail_records/messaging_create_response.py +12 -0
- telnyx/types/legacy/reporting/batch_detail_records/messaging_delete_response.py +12 -0
- telnyx/types/legacy/reporting/batch_detail_records/messaging_list_response.py +15 -0
- telnyx/types/legacy/reporting/batch_detail_records/messaging_retrieve_response.py +12 -0
- telnyx/types/legacy/reporting/batch_detail_records/speech_to_text_create_params.py +19 -0
- telnyx/types/legacy/reporting/batch_detail_records/speech_to_text_create_response.py +12 -0
- telnyx/types/legacy/reporting/batch_detail_records/speech_to_text_delete_response.py +12 -0
- telnyx/types/legacy/reporting/batch_detail_records/speech_to_text_list_response.py +12 -0
- telnyx/types/legacy/reporting/batch_detail_records/speech_to_text_retrieve_response.py +12 -0
- telnyx/types/legacy/reporting/batch_detail_records/stt_detail_report_response.py +27 -0
- telnyx/types/legacy/reporting/batch_detail_records/voice_create_params.py +57 -0
- telnyx/types/legacy/reporting/batch_detail_records/voice_create_response.py +13 -0
- telnyx/types/legacy/reporting/batch_detail_records/voice_delete_response.py +13 -0
- telnyx/types/legacy/reporting/batch_detail_records/voice_list_response.py +15 -0
- telnyx/types/legacy/reporting/batch_detail_records/voice_retrieve_fields_response.py +23 -0
- telnyx/types/legacy/reporting/batch_detail_records/voice_retrieve_response.py +13 -0
- telnyx/types/legacy/reporting/filter.py +31 -0
- telnyx/types/legacy/reporting/filter_param.py +30 -0
- telnyx/types/legacy/reporting/usage_report_retrieve_speech_to_text_params.py +17 -0
- telnyx/types/legacy/reporting/usage_report_retrieve_speech_to_text_response.py +11 -0
- telnyx/types/legacy/reporting/usage_reports/__init__.py +21 -0
- telnyx/types/legacy/reporting/usage_reports/cdr_usage_report_response_legacy.py +43 -0
- telnyx/types/legacy/reporting/usage_reports/mdr_usage_report_response_legacy.py +38 -0
- telnyx/types/legacy/reporting/usage_reports/messaging_create_params.py +29 -0
- telnyx/types/legacy/reporting/usage_reports/messaging_create_response.py +13 -0
- telnyx/types/legacy/reporting/usage_reports/messaging_delete_response.py +13 -0
- telnyx/types/legacy/reporting/usage_reports/messaging_list_params.py +15 -0
- telnyx/types/legacy/reporting/usage_reports/messaging_list_response.py +15 -0
- telnyx/types/legacy/reporting/usage_reports/messaging_retrieve_response.py +13 -0
- telnyx/types/legacy/reporting/usage_reports/number_lookup_create_params.py +26 -0
- telnyx/types/legacy/reporting/usage_reports/number_lookup_list_params.py +13 -0
- telnyx/types/legacy/reporting/usage_reports/standard_pagination_meta.py +17 -0
- telnyx/types/legacy/reporting/usage_reports/voice_create_params.py +40 -0
- telnyx/types/legacy/reporting/usage_reports/voice_create_response.py +13 -0
- telnyx/types/legacy/reporting/usage_reports/voice_delete_response.py +13 -0
- telnyx/types/legacy/reporting/usage_reports/voice_list_params.py +15 -0
- telnyx/types/legacy/reporting/usage_reports/voice_list_response.py +15 -0
- telnyx/types/legacy/reporting/usage_reports/voice_retrieve_response.py +13 -0
- telnyx/types/message_template.py +12 -0
- telnyx/types/messaging_profile.py +3 -0
- telnyx/types/messaging_profile_create_params.py +3 -0
- telnyx/types/messaging_profile_update_params.py +3 -0
- telnyx/types/messaging_tollfree/verification/__init__.py +1 -0
- telnyx/types/messaging_tollfree/verification/request_create_params.py +51 -1
- telnyx/types/messaging_tollfree/verification/request_update_params.py +51 -1
- telnyx/types/messaging_tollfree/verification/toll_free_verification_entity_type.py +9 -0
- telnyx/types/messaging_tollfree/verification/verification_request_egress.py +24 -0
- telnyx/types/messaging_tollfree/verification/verification_request_status.py +24 -0
- telnyx/types/number_order_status_update_webhook_event.py +30 -4
- telnyx/types/oauth_client.py +59 -0
- telnyx/types/oauth_client_create_params.py +39 -0
- telnyx/types/oauth_client_create_response.py +12 -0
- telnyx/types/oauth_client_list_params.py +38 -0
- telnyx/types/oauth_client_list_response.py +15 -0
- telnyx/types/oauth_client_retrieve_response.py +12 -0
- telnyx/types/oauth_client_update_params.py +36 -0
- telnyx/types/oauth_client_update_response.py +12 -0
- telnyx/types/oauth_grant.py +29 -0
- telnyx/types/oauth_grant_delete_response.py +12 -0
- telnyx/types/oauth_grant_list_params.py +17 -0
- telnyx/types/oauth_grant_list_response.py +15 -0
- telnyx/types/oauth_grant_retrieve_response.py +12 -0
- telnyx/types/oauth_grants_params.py +15 -0
- telnyx/types/oauth_grants_response.py +10 -0
- telnyx/types/oauth_introspect_params.py +12 -0
- telnyx/types/oauth_introspect_response.py +30 -0
- telnyx/types/oauth_register_params.py +39 -0
- telnyx/types/oauth_register_response.py +45 -0
- telnyx/types/oauth_retrieve_authorize_params.py +30 -0
- telnyx/types/oauth_retrieve_jwks_response.py +25 -0
- telnyx/types/oauth_retrieve_response.py +47 -0
- telnyx/types/oauth_token_params.py +33 -0
- telnyx/types/oauth_token_response.py +25 -0
- telnyx/types/outbound_voice_profile.py +27 -1
- telnyx/types/outbound_voice_profile_create_params.py +27 -1
- telnyx/types/outbound_voice_profile_list_params.py +1 -1
- telnyx/types/outbound_voice_profile_update_params.py +27 -1
- telnyx/types/pagination_meta_cloudflare_ip_list_sync.py +15 -0
- telnyx/types/pagination_meta_oauth.py +21 -0
- telnyx/types/phone_number_blocks/__init__.py +1 -0
- telnyx/types/phone_number_blocks/job.py +3 -34
- telnyx/types/phone_number_blocks/job_error.py +32 -0
- telnyx/types/phone_number_delete_response.py +7 -0
- telnyx/types/phone_number_detailed.py +7 -0
- telnyx/types/phone_number_list_params.py +6 -0
- telnyx/types/phone_numbers/job_update_batch_params.py +7 -0
- telnyx/types/phone_numbers/phone_numbers_job.py +3 -36
- telnyx/types/porting_order.py +3 -0
- telnyx/types/porting_order_create_params.py +3 -0
- telnyx/types/porting_order_list_params.py +52 -31
- telnyx/types/porting_order_update_params.py +2 -0
- telnyx/types/porting_orders/phone_number_configuration_list_params.py +19 -19
- telnyx/types/report_list_mdrs_response.py +3 -12
- telnyx/types/reports/__init__.py +1 -0
- telnyx/types/reports/mdr_usage_report_list_response.py +3 -12
- telnyx/types/reports/pagination_meta_reporting.py +17 -0
- telnyx/types/requirement_group.py +2 -2
- telnyx/types/requirement_group_list_params.py +1 -1
- telnyx/types/shared/__init__.py +1 -0
- telnyx/types/{error.py → shared/api_error.py} +3 -3
- telnyx/types/shared/simple_sim_card.py +15 -0
- telnyx/types/sim_card.py +12 -0
- telnyx/types/sim_card_update_params.py +2 -1
- telnyx/types/stream_bidirectional_codec.py +1 -1
- telnyx/types/stream_bidirectional_sampling_rate.py +7 -0
- telnyx/types/stream_codec.py +1 -1
- telnyx/types/texml/accounts/call_calls_params.py +16 -1
- telnyx/types/texml/accounts/conferences/participant_participants_params.py +16 -1
- telnyx/types/verification_trigger_call_params.py +7 -0
- telnyx/types/verifications/__init__.py +1 -0
- telnyx/types/verifications/by_phone_number_list_response.py +4 -13
- telnyx/types/verifications/verify_meta.py +17 -0
- telnyx/types/verified_number_create_params.py +10 -0
- telnyx/types/verify_profile.py +18 -3
- telnyx/types/verify_profile_create_template_params.py +12 -0
- telnyx/types/verify_profile_list_response.py +4 -13
- telnyx/types/verify_profile_message_template_response.py +13 -0
- telnyx/types/verify_profile_retrieve_templates_response.py +4 -9
- telnyx/types/verify_profile_update_template_params.py +12 -0
- telnyx/types/well_known_retrieve_authorization_server_metadata_response.py +42 -0
- telnyx/types/well_known_retrieve_protected_resource_metadata_response.py +15 -0
- {telnyx-3.5.0a0.dist-info → telnyx-3.6.0.dist-info}/METADATA +4 -4
- {telnyx-3.5.0a0.dist-info → telnyx-3.6.0.dist-info}/RECORD +212 -121
- telnyx/types/ai/assistant_create_response.py +0 -92
- telnyx/types/ai/assistant_retrieve_response.py +0 -92
- telnyx/types/ai/assistants/version_promote_response.py +0 -92
- telnyx/types/ai/assistants/version_retrieve_response.py +0 -92
- telnyx/types/ai/assistants/version_update_response.py +0 -92
- telnyx/types/client_create_bucket_params.py +0 -13
- telnyx/types/client_delete_objects_params.py +0 -20
- telnyx/types/client_get_object_params.py +0 -15
- telnyx/types/client_list_objects_params.py +0 -13
- telnyx/types/client_put_object_params.py +0 -20
- telnyx/types/list_buckets_response.py +0 -20
- telnyx/types/list_objects_response.py +0 -24
- {telnyx-3.5.0a0.dist-info → telnyx-3.6.0.dist-info}/WHEEL +0 -0
- {telnyx-3.5.0a0.dist-info → telnyx-3.6.0.dist-info}/licenses/LICENSE +0 -0
|
@@ -0,0 +1,59 @@
|
|
|
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
|
+
from typing_extensions import Literal
|
|
6
|
+
|
|
7
|
+
from .._models import BaseModel
|
|
8
|
+
|
|
9
|
+
__all__ = ["OAuthClient"]
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class OAuthClient(BaseModel):
|
|
13
|
+
client_id: str
|
|
14
|
+
"""OAuth client identifier"""
|
|
15
|
+
|
|
16
|
+
client_type: Literal["public", "confidential"]
|
|
17
|
+
"""OAuth client type"""
|
|
18
|
+
|
|
19
|
+
created_at: datetime
|
|
20
|
+
"""Timestamp when the client was created"""
|
|
21
|
+
|
|
22
|
+
name: str
|
|
23
|
+
"""Human-readable name for the OAuth client"""
|
|
24
|
+
|
|
25
|
+
org_id: str
|
|
26
|
+
"""Organization ID that owns this OAuth client"""
|
|
27
|
+
|
|
28
|
+
record_type: Literal["oauth_client"]
|
|
29
|
+
"""Record type identifier"""
|
|
30
|
+
|
|
31
|
+
require_pkce: bool
|
|
32
|
+
"""Whether PKCE (Proof Key for Code Exchange) is required for this client"""
|
|
33
|
+
|
|
34
|
+
updated_at: datetime
|
|
35
|
+
"""Timestamp when the client was last updated"""
|
|
36
|
+
|
|
37
|
+
user_id: str
|
|
38
|
+
"""User ID that created this OAuth client"""
|
|
39
|
+
|
|
40
|
+
allowed_grant_types: Optional[List[Literal["client_credentials", "authorization_code", "refresh_token"]]] = None
|
|
41
|
+
"""List of allowed OAuth grant types"""
|
|
42
|
+
|
|
43
|
+
allowed_scopes: Optional[List[str]] = None
|
|
44
|
+
"""List of allowed OAuth scopes"""
|
|
45
|
+
|
|
46
|
+
client_secret: Optional[str] = None
|
|
47
|
+
"""Client secret (only included when available, for confidential clients)"""
|
|
48
|
+
|
|
49
|
+
logo_uri: Optional[str] = None
|
|
50
|
+
"""URL of the client logo"""
|
|
51
|
+
|
|
52
|
+
policy_uri: Optional[str] = None
|
|
53
|
+
"""URL of the client's privacy policy"""
|
|
54
|
+
|
|
55
|
+
redirect_uris: Optional[List[str]] = None
|
|
56
|
+
"""List of allowed redirect URIs"""
|
|
57
|
+
|
|
58
|
+
tos_uri: Optional[str] = None
|
|
59
|
+
"""URL of the client's terms of service"""
|
|
@@ -0,0 +1,39 @@
|
|
|
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 List
|
|
6
|
+
from typing_extensions import Literal, Required, TypedDict
|
|
7
|
+
|
|
8
|
+
from .._types import SequenceNotStr
|
|
9
|
+
|
|
10
|
+
__all__ = ["OAuthClientCreateParams"]
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class OAuthClientCreateParams(TypedDict, total=False):
|
|
14
|
+
allowed_grant_types: Required[List[Literal["client_credentials", "authorization_code", "refresh_token"]]]
|
|
15
|
+
"""List of allowed OAuth grant types"""
|
|
16
|
+
|
|
17
|
+
allowed_scopes: Required[SequenceNotStr[str]]
|
|
18
|
+
"""List of allowed OAuth scopes"""
|
|
19
|
+
|
|
20
|
+
client_type: Required[Literal["public", "confidential"]]
|
|
21
|
+
"""OAuth client type"""
|
|
22
|
+
|
|
23
|
+
name: Required[str]
|
|
24
|
+
"""The name of the OAuth client"""
|
|
25
|
+
|
|
26
|
+
logo_uri: str
|
|
27
|
+
"""URL of the client logo"""
|
|
28
|
+
|
|
29
|
+
policy_uri: str
|
|
30
|
+
"""URL of the client's privacy policy"""
|
|
31
|
+
|
|
32
|
+
redirect_uris: SequenceNotStr[str]
|
|
33
|
+
"""List of redirect URIs (required for authorization_code flow)"""
|
|
34
|
+
|
|
35
|
+
require_pkce: bool
|
|
36
|
+
"""Whether PKCE (Proof Key for Code Exchange) is required for this client"""
|
|
37
|
+
|
|
38
|
+
tos_uri: str
|
|
39
|
+
"""URL of the client's terms of service"""
|
|
@@ -0,0 +1,12 @@
|
|
|
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
|
+
from .oauth_client import OAuthClient
|
|
7
|
+
|
|
8
|
+
__all__ = ["OAuthClientCreateResponse"]
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class OAuthClientCreateResponse(BaseModel):
|
|
12
|
+
data: Optional[OAuthClient] = None
|
|
@@ -0,0 +1,38 @@
|
|
|
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, Annotated, TypedDict
|
|
6
|
+
|
|
7
|
+
from .._utils import PropertyInfo
|
|
8
|
+
|
|
9
|
+
__all__ = ["OAuthClientListParams"]
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class OAuthClientListParams(TypedDict, total=False):
|
|
13
|
+
filter_allowed_grant_types_contains: Annotated[
|
|
14
|
+
Literal["client_credentials", "authorization_code", "refresh_token"],
|
|
15
|
+
PropertyInfo(alias="filter[allowed_grant_types][contains]"),
|
|
16
|
+
]
|
|
17
|
+
"""Filter by allowed grant type"""
|
|
18
|
+
|
|
19
|
+
filter_client_id: Annotated[str, PropertyInfo(alias="filter[client_id]")]
|
|
20
|
+
"""Filter by client ID"""
|
|
21
|
+
|
|
22
|
+
filter_client_type: Annotated[Literal["confidential", "public"], PropertyInfo(alias="filter[client_type]")]
|
|
23
|
+
"""Filter by client type"""
|
|
24
|
+
|
|
25
|
+
filter_name: Annotated[str, PropertyInfo(alias="filter[name]")]
|
|
26
|
+
"""Filter by exact client name"""
|
|
27
|
+
|
|
28
|
+
filter_name_contains: Annotated[str, PropertyInfo(alias="filter[name][contains]")]
|
|
29
|
+
"""Filter by client name containing text"""
|
|
30
|
+
|
|
31
|
+
filter_verified: Annotated[bool, PropertyInfo(alias="filter[verified]")]
|
|
32
|
+
"""Filter by verification status"""
|
|
33
|
+
|
|
34
|
+
page_number: Annotated[int, PropertyInfo(alias="page[number]")]
|
|
35
|
+
"""Page number"""
|
|
36
|
+
|
|
37
|
+
page_size: Annotated[int, PropertyInfo(alias="page[size]")]
|
|
38
|
+
"""Number of results per page"""
|
|
@@ -0,0 +1,15 @@
|
|
|
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
|
+
from .oauth_client import OAuthClient
|
|
7
|
+
from .pagination_meta_oauth import PaginationMetaOAuth
|
|
8
|
+
|
|
9
|
+
__all__ = ["OAuthClientListResponse"]
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class OAuthClientListResponse(BaseModel):
|
|
13
|
+
data: Optional[List[OAuthClient]] = None
|
|
14
|
+
|
|
15
|
+
meta: Optional[PaginationMetaOAuth] = None
|
|
@@ -0,0 +1,12 @@
|
|
|
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
|
+
from .oauth_client import OAuthClient
|
|
7
|
+
|
|
8
|
+
__all__ = ["OAuthClientRetrieveResponse"]
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class OAuthClientRetrieveResponse(BaseModel):
|
|
12
|
+
data: Optional[OAuthClient] = None
|
|
@@ -0,0 +1,36 @@
|
|
|
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 List
|
|
6
|
+
from typing_extensions import Literal, TypedDict
|
|
7
|
+
|
|
8
|
+
from .._types import SequenceNotStr
|
|
9
|
+
|
|
10
|
+
__all__ = ["OAuthClientUpdateParams"]
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class OAuthClientUpdateParams(TypedDict, total=False):
|
|
14
|
+
allowed_grant_types: List[Literal["client_credentials", "authorization_code", "refresh_token"]]
|
|
15
|
+
"""List of allowed OAuth grant types"""
|
|
16
|
+
|
|
17
|
+
allowed_scopes: SequenceNotStr[str]
|
|
18
|
+
"""List of allowed OAuth scopes"""
|
|
19
|
+
|
|
20
|
+
logo_uri: str
|
|
21
|
+
"""URL of the client logo"""
|
|
22
|
+
|
|
23
|
+
name: str
|
|
24
|
+
"""The name of the OAuth client"""
|
|
25
|
+
|
|
26
|
+
policy_uri: str
|
|
27
|
+
"""URL of the client's privacy policy"""
|
|
28
|
+
|
|
29
|
+
redirect_uris: SequenceNotStr[str]
|
|
30
|
+
"""List of redirect URIs"""
|
|
31
|
+
|
|
32
|
+
require_pkce: bool
|
|
33
|
+
"""Whether PKCE (Proof Key for Code Exchange) is required for this client"""
|
|
34
|
+
|
|
35
|
+
tos_uri: str
|
|
36
|
+
"""URL of the client's terms of service"""
|
|
@@ -0,0 +1,12 @@
|
|
|
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
|
+
from .oauth_client import OAuthClient
|
|
7
|
+
|
|
8
|
+
__all__ = ["OAuthClientUpdateResponse"]
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class OAuthClientUpdateResponse(BaseModel):
|
|
12
|
+
data: Optional[OAuthClient] = None
|
|
@@ -0,0 +1,29 @@
|
|
|
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
|
+
from typing_extensions import Literal
|
|
6
|
+
|
|
7
|
+
from .._models import BaseModel
|
|
8
|
+
|
|
9
|
+
__all__ = ["OAuthGrant"]
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class OAuthGrant(BaseModel):
|
|
13
|
+
id: str
|
|
14
|
+
"""Unique identifier for the OAuth grant"""
|
|
15
|
+
|
|
16
|
+
client_id: str
|
|
17
|
+
"""OAuth client identifier"""
|
|
18
|
+
|
|
19
|
+
created_at: datetime
|
|
20
|
+
"""Timestamp when the grant was created"""
|
|
21
|
+
|
|
22
|
+
record_type: Literal["oauth_grant"]
|
|
23
|
+
"""Record type identifier"""
|
|
24
|
+
|
|
25
|
+
scopes: List[str]
|
|
26
|
+
"""List of granted OAuth scopes"""
|
|
27
|
+
|
|
28
|
+
last_used_at: Optional[datetime] = None
|
|
29
|
+
"""Timestamp when the grant was last used"""
|
|
@@ -0,0 +1,12 @@
|
|
|
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
|
+
from .oauth_grant import OAuthGrant
|
|
7
|
+
|
|
8
|
+
__all__ = ["OAuthGrantDeleteResponse"]
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class OAuthGrantDeleteResponse(BaseModel):
|
|
12
|
+
data: Optional[OAuthGrant] = None
|
|
@@ -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 Annotated, TypedDict
|
|
6
|
+
|
|
7
|
+
from .._utils import PropertyInfo
|
|
8
|
+
|
|
9
|
+
__all__ = ["OAuthGrantListParams"]
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class OAuthGrantListParams(TypedDict, total=False):
|
|
13
|
+
page_number: Annotated[int, PropertyInfo(alias="page[number]")]
|
|
14
|
+
"""Page number"""
|
|
15
|
+
|
|
16
|
+
page_size: Annotated[int, PropertyInfo(alias="page[size]")]
|
|
17
|
+
"""Number of results per page"""
|
|
@@ -0,0 +1,15 @@
|
|
|
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
|
+
from .oauth_grant import OAuthGrant
|
|
7
|
+
from .pagination_meta_oauth import PaginationMetaOAuth
|
|
8
|
+
|
|
9
|
+
__all__ = ["OAuthGrantListResponse"]
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class OAuthGrantListResponse(BaseModel):
|
|
13
|
+
data: Optional[List[OAuthGrant]] = None
|
|
14
|
+
|
|
15
|
+
meta: Optional[PaginationMetaOAuth] = None
|
|
@@ -0,0 +1,12 @@
|
|
|
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
|
+
from .oauth_grant import OAuthGrant
|
|
7
|
+
|
|
8
|
+
__all__ = ["OAuthGrantRetrieveResponse"]
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class OAuthGrantRetrieveResponse(BaseModel):
|
|
12
|
+
data: Optional[OAuthGrant] = None
|
|
@@ -0,0 +1,15 @@
|
|
|
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 Required, TypedDict
|
|
6
|
+
|
|
7
|
+
__all__ = ["OAuthGrantsParams"]
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class OAuthGrantsParams(TypedDict, total=False):
|
|
11
|
+
allowed: Required[bool]
|
|
12
|
+
"""Whether the grant is allowed"""
|
|
13
|
+
|
|
14
|
+
consent_token: Required[str]
|
|
15
|
+
"""Consent token"""
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from .._models import BaseModel
|
|
4
|
+
|
|
5
|
+
__all__ = ["OAuthGrantsResponse"]
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class OAuthGrantsResponse(BaseModel):
|
|
9
|
+
redirect_uri: str
|
|
10
|
+
"""Redirect URI with authorization code or error"""
|
|
@@ -0,0 +1,12 @@
|
|
|
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 Required, TypedDict
|
|
6
|
+
|
|
7
|
+
__all__ = ["OAuthIntrospectParams"]
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class OAuthIntrospectParams(TypedDict, total=False):
|
|
11
|
+
token: Required[str]
|
|
12
|
+
"""The token to introspect"""
|
|
@@ -0,0 +1,30 @@
|
|
|
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__ = ["OAuthIntrospectResponse"]
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class OAuthIntrospectResponse(BaseModel):
|
|
11
|
+
active: bool
|
|
12
|
+
"""Whether the token is active"""
|
|
13
|
+
|
|
14
|
+
aud: Optional[str] = None
|
|
15
|
+
"""Audience"""
|
|
16
|
+
|
|
17
|
+
client_id: Optional[str] = None
|
|
18
|
+
"""Client identifier"""
|
|
19
|
+
|
|
20
|
+
exp: Optional[int] = None
|
|
21
|
+
"""Expiration timestamp"""
|
|
22
|
+
|
|
23
|
+
iat: Optional[int] = None
|
|
24
|
+
"""Issued at timestamp"""
|
|
25
|
+
|
|
26
|
+
iss: Optional[str] = None
|
|
27
|
+
"""Issuer"""
|
|
28
|
+
|
|
29
|
+
scope: Optional[str] = None
|
|
30
|
+
"""Space-separated list of scopes"""
|
|
@@ -0,0 +1,39 @@
|
|
|
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 List
|
|
6
|
+
from typing_extensions import Literal, TypedDict
|
|
7
|
+
|
|
8
|
+
from .._types import SequenceNotStr
|
|
9
|
+
|
|
10
|
+
__all__ = ["OAuthRegisterParams"]
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class OAuthRegisterParams(TypedDict, total=False):
|
|
14
|
+
client_name: str
|
|
15
|
+
"""Human-readable string name of the client to be presented to the end-user"""
|
|
16
|
+
|
|
17
|
+
grant_types: List[Literal["authorization_code", "client_credentials", "refresh_token"]]
|
|
18
|
+
"""Array of OAuth 2.0 grant type strings that the client may use"""
|
|
19
|
+
|
|
20
|
+
logo_uri: str
|
|
21
|
+
"""URL of the client logo"""
|
|
22
|
+
|
|
23
|
+
policy_uri: str
|
|
24
|
+
"""URL of the client's privacy policy"""
|
|
25
|
+
|
|
26
|
+
redirect_uris: SequenceNotStr[str]
|
|
27
|
+
"""Array of redirection URI strings for use in redirect-based flows"""
|
|
28
|
+
|
|
29
|
+
response_types: SequenceNotStr[str]
|
|
30
|
+
"""Array of the OAuth 2.0 response type strings that the client may use"""
|
|
31
|
+
|
|
32
|
+
scope: str
|
|
33
|
+
"""Space-separated string of scope values that the client may use"""
|
|
34
|
+
|
|
35
|
+
token_endpoint_auth_method: Literal["none", "client_secret_basic", "client_secret_post"]
|
|
36
|
+
"""Authentication method for the token endpoint"""
|
|
37
|
+
|
|
38
|
+
tos_uri: str
|
|
39
|
+
"""URL of the client's terms of service"""
|
|
@@ -0,0 +1,45 @@
|
|
|
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__ = ["OAuthRegisterResponse"]
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class OAuthRegisterResponse(BaseModel):
|
|
11
|
+
client_id: str
|
|
12
|
+
"""Unique client identifier"""
|
|
13
|
+
|
|
14
|
+
client_id_issued_at: int
|
|
15
|
+
"""Unix timestamp of when the client ID was issued"""
|
|
16
|
+
|
|
17
|
+
client_name: Optional[str] = None
|
|
18
|
+
"""Human-readable client name"""
|
|
19
|
+
|
|
20
|
+
client_secret: Optional[str] = None
|
|
21
|
+
"""Client secret (only for confidential clients)"""
|
|
22
|
+
|
|
23
|
+
grant_types: Optional[List[str]] = None
|
|
24
|
+
"""Array of allowed grant types"""
|
|
25
|
+
|
|
26
|
+
logo_uri: Optional[str] = None
|
|
27
|
+
"""URL of the client logo"""
|
|
28
|
+
|
|
29
|
+
policy_uri: Optional[str] = None
|
|
30
|
+
"""URL of the client's privacy policy"""
|
|
31
|
+
|
|
32
|
+
redirect_uris: Optional[List[str]] = None
|
|
33
|
+
"""Array of redirection URIs"""
|
|
34
|
+
|
|
35
|
+
response_types: Optional[List[str]] = None
|
|
36
|
+
"""Array of allowed response types"""
|
|
37
|
+
|
|
38
|
+
scope: Optional[str] = None
|
|
39
|
+
"""Space-separated scope values"""
|
|
40
|
+
|
|
41
|
+
token_endpoint_auth_method: Optional[str] = None
|
|
42
|
+
"""Token endpoint authentication method"""
|
|
43
|
+
|
|
44
|
+
tos_uri: Optional[str] = None
|
|
45
|
+
"""URL of the client's terms of service"""
|
|
@@ -0,0 +1,30 @@
|
|
|
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, Required, TypedDict
|
|
6
|
+
|
|
7
|
+
__all__ = ["OAuthRetrieveAuthorizeParams"]
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class OAuthRetrieveAuthorizeParams(TypedDict, total=False):
|
|
11
|
+
client_id: Required[str]
|
|
12
|
+
"""OAuth client identifier"""
|
|
13
|
+
|
|
14
|
+
redirect_uri: Required[str]
|
|
15
|
+
"""Redirect URI"""
|
|
16
|
+
|
|
17
|
+
response_type: Required[Literal["code"]]
|
|
18
|
+
"""OAuth response type"""
|
|
19
|
+
|
|
20
|
+
code_challenge: str
|
|
21
|
+
"""PKCE code challenge"""
|
|
22
|
+
|
|
23
|
+
code_challenge_method: Literal["plain", "S256"]
|
|
24
|
+
"""PKCE code challenge method"""
|
|
25
|
+
|
|
26
|
+
scope: str
|
|
27
|
+
"""Space-separated list of requested scopes"""
|
|
28
|
+
|
|
29
|
+
state: str
|
|
30
|
+
"""State parameter for CSRF protection"""
|
|
@@ -0,0 +1,25 @@
|
|
|
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__ = ["OAuthRetrieveJwksResponse", "Key"]
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class Key(BaseModel):
|
|
11
|
+
alg: Optional[str] = None
|
|
12
|
+
"""Algorithm"""
|
|
13
|
+
|
|
14
|
+
kid: Optional[str] = None
|
|
15
|
+
"""Key ID"""
|
|
16
|
+
|
|
17
|
+
kty: Optional[str] = None
|
|
18
|
+
"""Key type"""
|
|
19
|
+
|
|
20
|
+
use: Optional[str] = None
|
|
21
|
+
"""Key use"""
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
class OAuthRetrieveJwksResponse(BaseModel):
|
|
25
|
+
keys: Optional[List[Key]] = None
|
|
@@ -0,0 +1,47 @@
|
|
|
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__ = ["OAuthRetrieveResponse", "Data", "DataRequestedScope"]
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class DataRequestedScope(BaseModel):
|
|
11
|
+
id: Optional[str] = None
|
|
12
|
+
"""Scope ID"""
|
|
13
|
+
|
|
14
|
+
description: Optional[str] = None
|
|
15
|
+
"""Scope description"""
|
|
16
|
+
|
|
17
|
+
name: Optional[str] = None
|
|
18
|
+
"""Scope name"""
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
class Data(BaseModel):
|
|
22
|
+
client_id: Optional[str] = None
|
|
23
|
+
"""Client ID"""
|
|
24
|
+
|
|
25
|
+
logo_uri: Optional[str] = None
|
|
26
|
+
"""URL of the client logo"""
|
|
27
|
+
|
|
28
|
+
name: Optional[str] = None
|
|
29
|
+
"""Client name"""
|
|
30
|
+
|
|
31
|
+
policy_uri: Optional[str] = None
|
|
32
|
+
"""URL of the client's privacy policy"""
|
|
33
|
+
|
|
34
|
+
redirect_uri: Optional[str] = None
|
|
35
|
+
"""The redirect URI for this authorization"""
|
|
36
|
+
|
|
37
|
+
requested_scopes: Optional[List[DataRequestedScope]] = None
|
|
38
|
+
|
|
39
|
+
tos_uri: Optional[str] = None
|
|
40
|
+
"""URL of the client's terms of service"""
|
|
41
|
+
|
|
42
|
+
verified: Optional[bool] = None
|
|
43
|
+
"""Whether the client is verified"""
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
class OAuthRetrieveResponse(BaseModel):
|
|
47
|
+
data: Optional[Data] = None
|
|
@@ -0,0 +1,33 @@
|
|
|
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, Required, TypedDict
|
|
6
|
+
|
|
7
|
+
__all__ = ["OAuthTokenParams"]
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class OAuthTokenParams(TypedDict, total=False):
|
|
11
|
+
grant_type: Required[Literal["client_credentials", "authorization_code", "refresh_token"]]
|
|
12
|
+
"""OAuth 2.0 grant type"""
|
|
13
|
+
|
|
14
|
+
client_id: str
|
|
15
|
+
"""OAuth client ID (if not using HTTP Basic auth)"""
|
|
16
|
+
|
|
17
|
+
client_secret: str
|
|
18
|
+
"""OAuth client secret (if not using HTTP Basic auth)"""
|
|
19
|
+
|
|
20
|
+
code: str
|
|
21
|
+
"""Authorization code (for authorization_code flow)"""
|
|
22
|
+
|
|
23
|
+
code_verifier: str
|
|
24
|
+
"""PKCE code verifier (for authorization_code flow)"""
|
|
25
|
+
|
|
26
|
+
redirect_uri: str
|
|
27
|
+
"""Redirect URI (for authorization_code flow)"""
|
|
28
|
+
|
|
29
|
+
refresh_token: str
|
|
30
|
+
"""Refresh token (for refresh_token flow)"""
|
|
31
|
+
|
|
32
|
+
scope: str
|
|
33
|
+
"""Space-separated list of requested scopes (for client_credentials)"""
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import Optional
|
|
4
|
+
from typing_extensions import Literal
|
|
5
|
+
|
|
6
|
+
from .._models import BaseModel
|
|
7
|
+
|
|
8
|
+
__all__ = ["OAuthTokenResponse"]
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class OAuthTokenResponse(BaseModel):
|
|
12
|
+
access_token: str
|
|
13
|
+
"""The access token"""
|
|
14
|
+
|
|
15
|
+
expires_in: int
|
|
16
|
+
"""Token lifetime in seconds"""
|
|
17
|
+
|
|
18
|
+
token_type: Literal["Bearer"]
|
|
19
|
+
"""Token type"""
|
|
20
|
+
|
|
21
|
+
refresh_token: Optional[str] = None
|
|
22
|
+
"""Refresh token (if applicable)"""
|
|
23
|
+
|
|
24
|
+
scope: Optional[str] = None
|
|
25
|
+
"""Space-separated list of granted scopes"""
|