telnyx 3.5.0a0__py3-none-any.whl → 3.7.0a0__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.

Files changed (130) hide show
  1. telnyx/_client.py +53 -2
  2. telnyx/_version.py +1 -1
  3. telnyx/resources/__init__.py +70 -0
  4. telnyx/resources/ai/conversations/conversations.py +137 -3
  5. telnyx/resources/ai/conversations/messages.py +1 -134
  6. telnyx/resources/calls/actions.py +146 -146
  7. telnyx/resources/calls/calls.py +4 -10
  8. telnyx/resources/conferences/actions.py +8 -24
  9. telnyx/resources/conferences/conferences.py +2 -6
  10. telnyx/resources/legacy/__init__.py +33 -0
  11. telnyx/resources/legacy/legacy.py +102 -0
  12. telnyx/resources/legacy/reporting/__init__.py +47 -0
  13. telnyx/resources/legacy/reporting/batch_detail_records/__init__.py +61 -0
  14. telnyx/resources/legacy/reporting/batch_detail_records/batch_detail_records.py +166 -0
  15. telnyx/resources/legacy/reporting/batch_detail_records/messaging.py +481 -0
  16. telnyx/resources/legacy/reporting/batch_detail_records/speech_to_text.py +399 -0
  17. telnyx/resources/legacy/reporting/batch_detail_records/voice.py +538 -0
  18. telnyx/resources/legacy/reporting/reporting.py +134 -0
  19. telnyx/resources/legacy/reporting/usage_reports/__init__.py +61 -0
  20. telnyx/resources/legacy/reporting/usage_reports/messaging.py +471 -0
  21. telnyx/resources/legacy/reporting/usage_reports/number_lookup.py +464 -0
  22. telnyx/resources/legacy/reporting/usage_reports/usage_reports.py +288 -0
  23. telnyx/resources/legacy/reporting/usage_reports/voice.py +493 -0
  24. telnyx/resources/oauth.py +855 -0
  25. telnyx/resources/oauth_clients.py +711 -0
  26. telnyx/resources/oauth_grants.py +349 -0
  27. telnyx/resources/phone_numbers/jobs.py +12 -0
  28. telnyx/resources/porting_orders/porting_orders.py +20 -8
  29. telnyx/resources/sim_cards/sim_cards.py +3 -2
  30. telnyx/resources/verifications/verifications.py +10 -0
  31. telnyx/resources/verify_profiles.py +183 -1
  32. telnyx/resources/well_known.py +198 -0
  33. telnyx/types/__init__.py +41 -1
  34. telnyx/types/addresses/action_validate_response.py +2 -2
  35. telnyx/types/ai/__init__.py +1 -0
  36. telnyx/types/ai/{conversations/message_create_params.py → conversation_add_message_params.py} +4 -4
  37. telnyx/types/ai/conversations/__init__.py +0 -1
  38. telnyx/types/ai/inference_embedding_webhook_tool_params.py +2 -0
  39. telnyx/types/ai/inference_embedding_webhook_tool_params_param.py +2 -0
  40. telnyx/types/{error.py → api_error.py} +2 -2
  41. telnyx/types/call_dial_params.py +2 -3
  42. telnyx/types/calls/action_answer_params.py +1 -2
  43. telnyx/types/calls/action_gather_using_ai_params.py +5 -8
  44. telnyx/types/calls/action_start_streaming_params.py +4 -2
  45. telnyx/types/calls/action_transfer_params.py +50 -0
  46. telnyx/types/campaign_submit_appeal_response.py +0 -3
  47. telnyx/types/legacy/__init__.py +3 -0
  48. telnyx/types/legacy/reporting/__init__.py +10 -0
  49. telnyx/types/legacy/reporting/batch_detail_records/__init__.py +20 -0
  50. telnyx/types/legacy/reporting/batch_detail_records/messaging_create_params.py +77 -0
  51. telnyx/types/legacy/reporting/batch_detail_records/messaging_create_response.py +68 -0
  52. telnyx/types/legacy/reporting/batch_detail_records/messaging_delete_response.py +68 -0
  53. telnyx/types/legacy/reporting/batch_detail_records/messaging_list_response.py +80 -0
  54. telnyx/types/legacy/reporting/batch_detail_records/messaging_retrieve_response.py +68 -0
  55. telnyx/types/legacy/reporting/batch_detail_records/speech_to_text_create_params.py +19 -0
  56. telnyx/types/legacy/reporting/batch_detail_records/speech_to_text_create_response.py +31 -0
  57. telnyx/types/legacy/reporting/batch_detail_records/speech_to_text_delete_response.py +31 -0
  58. telnyx/types/legacy/reporting/batch_detail_records/speech_to_text_list_response.py +31 -0
  59. telnyx/types/legacy/reporting/batch_detail_records/speech_to_text_retrieve_response.py +31 -0
  60. telnyx/types/legacy/reporting/batch_detail_records/voice_create_params.py +79 -0
  61. telnyx/types/legacy/reporting/batch_detail_records/voice_create_response.py +91 -0
  62. telnyx/types/legacy/reporting/batch_detail_records/voice_delete_response.py +91 -0
  63. telnyx/types/legacy/reporting/batch_detail_records/voice_list_response.py +102 -0
  64. telnyx/types/legacy/reporting/batch_detail_records/voice_retrieve_fields_response.py +23 -0
  65. telnyx/types/legacy/reporting/batch_detail_records/voice_retrieve_response.py +91 -0
  66. telnyx/types/legacy/reporting/usage_report_retrieve_speech_to_text_params.py +17 -0
  67. telnyx/types/legacy/reporting/usage_report_retrieve_speech_to_text_response.py +11 -0
  68. telnyx/types/legacy/reporting/usage_reports/__init__.py +18 -0
  69. telnyx/types/legacy/reporting/usage_reports/messaging_create_params.py +29 -0
  70. telnyx/types/legacy/reporting/usage_reports/messaging_create_response.py +43 -0
  71. telnyx/types/legacy/reporting/usage_reports/messaging_delete_response.py +43 -0
  72. telnyx/types/legacy/reporting/usage_reports/messaging_list_params.py +15 -0
  73. telnyx/types/legacy/reporting/usage_reports/messaging_list_response.py +54 -0
  74. telnyx/types/legacy/reporting/usage_reports/messaging_retrieve_response.py +43 -0
  75. telnyx/types/legacy/reporting/usage_reports/number_lookup_create_params.py +26 -0
  76. telnyx/types/legacy/reporting/usage_reports/number_lookup_list_params.py +13 -0
  77. telnyx/types/legacy/reporting/usage_reports/voice_create_params.py +40 -0
  78. telnyx/types/legacy/reporting/usage_reports/voice_create_response.py +48 -0
  79. telnyx/types/legacy/reporting/usage_reports/voice_delete_response.py +48 -0
  80. telnyx/types/legacy/reporting/usage_reports/voice_list_params.py +15 -0
  81. telnyx/types/legacy/reporting/usage_reports/voice_list_response.py +59 -0
  82. telnyx/types/legacy/reporting/usage_reports/voice_retrieve_response.py +48 -0
  83. telnyx/types/number_order_status_update_webhook_event.py +30 -4
  84. telnyx/types/oauth_client_create_params.py +39 -0
  85. telnyx/types/oauth_client_create_response.py +63 -0
  86. telnyx/types/oauth_client_list_params.py +38 -0
  87. telnyx/types/oauth_client_list_response.py +79 -0
  88. telnyx/types/oauth_client_retrieve_response.py +63 -0
  89. telnyx/types/oauth_client_update_params.py +36 -0
  90. telnyx/types/oauth_client_update_response.py +63 -0
  91. telnyx/types/oauth_grant_delete_response.py +33 -0
  92. telnyx/types/oauth_grant_list_params.py +17 -0
  93. telnyx/types/oauth_grant_list_response.py +49 -0
  94. telnyx/types/oauth_grant_retrieve_response.py +33 -0
  95. telnyx/types/oauth_grants_params.py +15 -0
  96. telnyx/types/oauth_grants_response.py +10 -0
  97. telnyx/types/oauth_introspect_params.py +12 -0
  98. telnyx/types/oauth_introspect_response.py +30 -0
  99. telnyx/types/oauth_register_params.py +39 -0
  100. telnyx/types/oauth_register_response.py +45 -0
  101. telnyx/types/oauth_retrieve_authorize_params.py +30 -0
  102. telnyx/types/oauth_retrieve_jwks_response.py +25 -0
  103. telnyx/types/oauth_retrieve_response.py +47 -0
  104. telnyx/types/oauth_token_params.py +33 -0
  105. telnyx/types/oauth_token_response.py +25 -0
  106. telnyx/types/phone_number_delete_response.py +7 -0
  107. telnyx/types/phone_number_detailed.py +7 -0
  108. telnyx/types/phone_number_list_params.py +6 -0
  109. telnyx/types/phone_numbers/job_update_batch_params.py +7 -0
  110. telnyx/types/porting_order.py +3 -0
  111. telnyx/types/porting_order_create_params.py +3 -0
  112. telnyx/types/porting_order_list_params.py +52 -31
  113. telnyx/types/porting_order_update_params.py +2 -0
  114. telnyx/types/porting_orders/phone_number_configuration_list_params.py +19 -19
  115. telnyx/types/shared/simple_sim_card.py +15 -0
  116. telnyx/types/sim_card.py +12 -0
  117. telnyx/types/sim_card_update_params.py +2 -1
  118. telnyx/types/stream_bidirectional_codec.py +1 -1
  119. telnyx/types/stream_codec.py +1 -1
  120. telnyx/types/verification_trigger_call_params.py +7 -0
  121. telnyx/types/verify_profile_create_template_params.py +12 -0
  122. telnyx/types/verify_profile_create_template_response.py +17 -0
  123. telnyx/types/verify_profile_update_template_params.py +12 -0
  124. telnyx/types/verify_profile_update_template_response.py +17 -0
  125. telnyx/types/well_known_retrieve_authorization_server_metadata_response.py +42 -0
  126. telnyx/types/well_known_retrieve_protected_resource_metadata_response.py +15 -0
  127. {telnyx-3.5.0a0.dist-info → telnyx-3.7.0a0.dist-info}/METADATA +1 -1
  128. {telnyx-3.5.0a0.dist-info → telnyx-3.7.0a0.dist-info}/RECORD +130 -48
  129. {telnyx-3.5.0a0.dist-info → telnyx-3.7.0a0.dist-info}/WHEEL +0 -0
  130. {telnyx-3.5.0a0.dist-info → telnyx-3.7.0a0.dist-info}/licenses/LICENSE +0 -0
@@ -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,79 @@
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__ = ["OAuthClientListResponse", "Data", "Meta"]
10
+
11
+
12
+ class Data(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"""
60
+
61
+
62
+ class Meta(BaseModel):
63
+ page_number: Optional[int] = None
64
+ """Current page number"""
65
+
66
+ page_size: Optional[int] = None
67
+ """Number of items per page"""
68
+
69
+ total_pages: Optional[int] = None
70
+ """Total number of pages"""
71
+
72
+ total_results: Optional[int] = None
73
+ """Total number of results"""
74
+
75
+
76
+ class OAuthClientListResponse(BaseModel):
77
+ data: Optional[List[Data]] = None
78
+
79
+ meta: Optional[Meta] = None
@@ -0,0 +1,63 @@
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__ = ["OAuthClientRetrieveResponse", "Data"]
10
+
11
+
12
+ class Data(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"""
60
+
61
+
62
+ class OAuthClientRetrieveResponse(BaseModel):
63
+ data: Optional[Data] = 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,63 @@
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__ = ["OAuthClientUpdateResponse", "Data"]
10
+
11
+
12
+ class Data(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"""
60
+
61
+
62
+ class OAuthClientUpdateResponse(BaseModel):
63
+ 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 typing import List, Optional
4
+ from datetime import datetime
5
+ from typing_extensions import Literal
6
+
7
+ from .._models import BaseModel
8
+
9
+ __all__ = ["OAuthGrantDeleteResponse", "Data"]
10
+
11
+
12
+ class Data(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"""
30
+
31
+
32
+ class OAuthGrantDeleteResponse(BaseModel):
33
+ data: Optional[Data] = 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,49 @@
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__ = ["OAuthGrantListResponse", "Data", "Meta"]
10
+
11
+
12
+ class Data(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"""
30
+
31
+
32
+ class Meta(BaseModel):
33
+ page_number: Optional[int] = None
34
+ """Current page number"""
35
+
36
+ page_size: Optional[int] = None
37
+ """Number of items per page"""
38
+
39
+ total_pages: Optional[int] = None
40
+ """Total number of pages"""
41
+
42
+ total_results: Optional[int] = None
43
+ """Total number of results"""
44
+
45
+
46
+ class OAuthGrantListResponse(BaseModel):
47
+ data: Optional[List[Data]] = None
48
+
49
+ meta: Optional[Meta] = None
@@ -0,0 +1,33 @@
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__ = ["OAuthGrantRetrieveResponse", "Data"]
10
+
11
+
12
+ class Data(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"""
30
+
31
+
32
+ class OAuthGrantRetrieveResponse(BaseModel):
33
+ data: Optional[Data] = 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