diff --git a/.release-please-manifest.json b/.release-please-manifest.json index f7014c3..a713055 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.11.0" + ".": "0.12.0" } \ No newline at end of file diff --git a/.stats.yml b/.stats.yml index e284c0a..fe2e934 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 40 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/sent%2Fsent-dm-38aaadafbb2bf0c5d5bb9330a0a5e7a89052fe3e791569c8a12051e040193edf.yml -openapi_spec_hash: 2d35c1223beebaf2c1b8d8a474cbf7c2 -config_hash: ad652575976c2c8db09e4575778f0e77 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/sent%2Fsent-dm-294831f61f7890b2cdb89d181f26297732387d5e1288f446c0138e46fb1a4608.yml +openapi_spec_hash: a7f20451621ee678fbe09ff7a297b3ea +config_hash: 497506d9e2e66cd0573bd9c1f1242462 diff --git a/CHANGELOG.md b/CHANGELOG.md index 71908b4..999f361 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,15 @@ # Changelog +## 0.12.0 (2026-03-12) + +Full Changelog: [v0.11.0...v0.12.0](https://github.com/sentdm/sent-dm-python/compare/v0.11.0...v0.12.0) + +### Features + +* **api:** api update ([42a3b0e](https://github.com/sentdm/sent-dm-python/commit/42a3b0ed01ad9db6bf7d0a899d71831fbfbcd861)) +* **api:** manual updates ([e08ed33](https://github.com/sentdm/sent-dm-python/commit/e08ed33e783744f84c88826061b47ccd27fc4324)) +* **api:** manual updates ([7c9c66a](https://github.com/sentdm/sent-dm-python/commit/7c9c66ac0bc7944a91e658a311dfd38f70e9adf8)) + ## 0.11.0 (2026-03-11) Full Changelog: [v0.10.0...v0.11.0](https://github.com/sentdm/sent-dm-python/compare/v0.10.0...v0.11.0) diff --git a/api.md b/api.md index 42fc91e..5c71f65 100644 --- a/api.md +++ b/api.md @@ -1,9 +1,3 @@ -# Shared Types - -```python -from sent_dm.types import BaseDto -``` - # Webhooks Types: @@ -13,7 +7,7 @@ from sent_dm.types import ( APIError, APIMeta, APIResponseWebhook, - MutationRequestBase, + MutationRequest, PaginationMeta, WebhookResponse, WebhookListResponse, @@ -110,7 +104,7 @@ Methods: - client.profiles.update(profile_id, \*\*params) -> APIResponseOfProfileDetail - client.profiles.list() -> ProfileListResponse - client.profiles.delete(profile_id, \*\*params) -> None -- client.profiles.complete_setup(profile_id, \*\*params) -> object +- client.profiles.complete(profile_id, \*\*params) -> object ## Campaigns @@ -119,6 +113,7 @@ Types: ```python from sent_dm.types.profiles import ( APIResponseOfTcrCampaignWithUseCases, + BaseDto, CampaignData, MessagingUseCaseUs, SentDmServicesEndpointsCustomerApIv3ContractsRequestsCampaignsCampaignUseCaseData, diff --git a/pyproject.toml b/pyproject.toml index f51484c..d98f2ad 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "sentdm" -version = "0.11.0" +version = "0.12.0" description = "The official Python library for the sent-dm API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/sent_dm/_version.py b/src/sent_dm/_version.py index f4a29db..85a5a9f 100644 --- a/src/sent_dm/_version.py +++ b/src/sent_dm/_version.py @@ -1,4 +1,4 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. __title__ = "sent_dm" -__version__ = "0.11.0" # x-release-please-version +__version__ = "0.12.0" # x-release-please-version diff --git a/src/sent_dm/resources/messages.py b/src/sent_dm/resources/messages.py index d1395fa..530970a 100644 --- a/src/sent_dm/resources/messages.py +++ b/src/sent_dm/resources/messages.py @@ -153,7 +153,8 @@ def send( sandbox: Sandbox flag - when true, the operation is simulated without side effects Useful for testing integrations without actual execution - template: Template reference (by id or name, with optional parameters) + template: SDK-style template reference: resolve by ID or by name, with optional + parameters. to: List of recipient phone numbers in E.164 format (multi-recipient fan-out) @@ -320,7 +321,8 @@ async def send( sandbox: Sandbox flag - when true, the operation is simulated without side effects Useful for testing integrations without actual execution - template: Template reference (by id or name, with optional parameters) + template: SDK-style template reference: resolve by ID or by name, with optional + parameters. to: List of recipient phone numbers in E.164 format (multi-recipient fan-out) diff --git a/src/sent_dm/resources/profiles/campaigns.py b/src/sent_dm/resources/profiles/campaigns.py index 941865e..84eb013 100644 --- a/src/sent_dm/resources/profiles/campaigns.py +++ b/src/sent_dm/resources/profiles/campaigns.py @@ -66,7 +66,7 @@ def create( campaign must include at least one use case with sample messages. Args: - campaign: Campaign data + campaign: Campaign data for create or update operation sandbox: Sandbox flag - when true, the operation is simulated without side effects Useful for testing integrations without actual execution @@ -127,7 +127,7 @@ def update( update campaigns that have already been submitted to TCR. Args: - campaign: Campaign data + campaign: Campaign data for create or update operation sandbox: Sandbox flag - when true, the operation is simulated without side effects Useful for testing integrations without actual execution @@ -293,7 +293,7 @@ async def create( campaign must include at least one use case with sample messages. Args: - campaign: Campaign data + campaign: Campaign data for create or update operation sandbox: Sandbox flag - when true, the operation is simulated without side effects Useful for testing integrations without actual execution @@ -354,7 +354,7 @@ async def update( update campaigns that have already been submitted to TCR. Args: - campaign: Campaign data + campaign: Campaign data for create or update operation sandbox: Sandbox flag - when true, the operation is simulated without side effects Useful for testing integrations without actual execution diff --git a/src/sent_dm/resources/profiles/profiles.py b/src/sent_dm/resources/profiles/profiles.py index ee8a4b7..bbfcd9e 100644 --- a/src/sent_dm/resources/profiles/profiles.py +++ b/src/sent_dm/resources/profiles/profiles.py @@ -10,7 +10,7 @@ profile_create_params, profile_delete_params, profile_update_params, - profile_complete_setup_params, + profile_complete_params, ) from ..._types import Body, Omit, Query, Headers, NoneType, NotGiven, omit, not_given from ..._utils import maybe_transform, strip_not_given, async_maybe_transform @@ -139,9 +139,8 @@ def create( allow_template_sharing: Whether templates are shared across profiles (default: false) - billing_contact: Billing contact for this profile. Required when billing_model is "profile" or - "profile_and_organization". Identifies who receives invoices and who is - responsible for payment. + billing_contact: Billing contact information for a profile. Required when billing_model is + "profile" or "profile_and_organization". billing_model: Billing model: profile, organization, or profile_and_organization (default: @@ -153,9 +152,7 @@ def create( - "profile_and_organization": the profile is billed first with the organization as fallback; billing_contact is required. - brand: Brand and KYC information for this profile (optional). When provided, creates - the brand associated with this profile. Cannot be set when inherit_tcr_brand is - true. + brand: Brand and KYC data grouped into contact, business, and compliance sections description: Profile description (optional) @@ -171,9 +168,9 @@ def create( name: Profile name (required) - payment_details: Payment card details for this profile (optional). Accepted when billing_model is - "profile" or "profile_and_organization". Not persisted on our servers — - forwarded to the payment processor. + payment_details: Payment card details for a profile. Accepted when billing_model is "profile" or + "profile_and_organization". These details are not stored on our servers and will + be forwarded to the payment processor. sandbox: Sandbox flag - when true, the operation is simulated without side effects Useful for testing integrations without actual execution @@ -182,11 +179,11 @@ def create( only letters, numbers, and spaces, and include at least one letter. Example: "SALES", "Mkt 2", "Support1". - whatsapp_business_account: Direct WhatsApp Business Account credentials for this profile. When provided, - the profile uses its own WhatsApp Business Account instead of inheriting from - the organization. When omitted, the profile inherits the organization's WhatsApp - Business Account (requires the organization to have completed WhatsApp Embedded - Signup). + whatsapp_business_account: Direct WhatsApp Business Account credentials for a profile. Use this when the + profile should have its own WhatsApp Business Account instead of inheriting from + the organization. Credentials must be obtained from Meta Business Manager by + creating a System User with whatsapp_business_messaging and + whatsapp_business_management scopes. extra_headers: Send extra headers @@ -332,9 +329,8 @@ def update( allow_template_sharing: Whether templates are shared across profiles (optional) - billing_contact: Billing contact for this profile. Required when billing_model is "profile" or - "profile_and_organization" and no billing contact has been configured yet. - Identifies who receives invoices and who is responsible for payment. + billing_contact: Billing contact information for a profile. Required when billing_model is + "profile" or "profile_and_organization". billing_model: Billing model: profile, organization, or profile_and_organization (optional). @@ -344,10 +340,7 @@ def update( - "profile_and_organization": the profile is billed first with the organization as fallback; billing_contact is required. - brand: Brand and KYC information for this profile (optional). When provided, creates or - updates the brand associated with this profile. Cannot be set when - inherit_tcr_brand is true. Once a brand has been submitted to TCR it cannot be - modified. + brand: Brand and KYC data grouped into contact, business, and compliance sections description: Profile description (optional) @@ -363,9 +356,9 @@ def update( name: Profile name (optional) - payment_details: Payment card details for this profile (optional). Accepted when billing_model is - "profile" or "profile_and_organization". Not persisted on our servers — - forwarded to the payment processor. + payment_details: Payment card details for a profile. Accepted when billing_model is "profile" or + "profile_and_organization". These details are not stored on our servers and will + be forwarded to the payment processor. sandbox: Sandbox flag - when true, the operation is simulated without side effects Useful for testing integrations without actual execution @@ -511,7 +504,7 @@ def delete( cast_to=NoneType, ) - def complete_setup( + def complete( self, profile_id: str, *, @@ -579,7 +572,7 @@ def complete_setup( "web_hook_url": web_hook_url, "sandbox": sandbox, }, - profile_complete_setup_params.ProfileCompleteSetupParams, + profile_complete_params.ProfileCompleteParams, ), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout @@ -687,9 +680,8 @@ async def create( allow_template_sharing: Whether templates are shared across profiles (default: false) - billing_contact: Billing contact for this profile. Required when billing_model is "profile" or - "profile_and_organization". Identifies who receives invoices and who is - responsible for payment. + billing_contact: Billing contact information for a profile. Required when billing_model is + "profile" or "profile_and_organization". billing_model: Billing model: profile, organization, or profile_and_organization (default: @@ -701,9 +693,7 @@ async def create( - "profile_and_organization": the profile is billed first with the organization as fallback; billing_contact is required. - brand: Brand and KYC information for this profile (optional). When provided, creates - the brand associated with this profile. Cannot be set when inherit_tcr_brand is - true. + brand: Brand and KYC data grouped into contact, business, and compliance sections description: Profile description (optional) @@ -719,9 +709,9 @@ async def create( name: Profile name (required) - payment_details: Payment card details for this profile (optional). Accepted when billing_model is - "profile" or "profile_and_organization". Not persisted on our servers — - forwarded to the payment processor. + payment_details: Payment card details for a profile. Accepted when billing_model is "profile" or + "profile_and_organization". These details are not stored on our servers and will + be forwarded to the payment processor. sandbox: Sandbox flag - when true, the operation is simulated without side effects Useful for testing integrations without actual execution @@ -730,11 +720,11 @@ async def create( only letters, numbers, and spaces, and include at least one letter. Example: "SALES", "Mkt 2", "Support1". - whatsapp_business_account: Direct WhatsApp Business Account credentials for this profile. When provided, - the profile uses its own WhatsApp Business Account instead of inheriting from - the organization. When omitted, the profile inherits the organization's WhatsApp - Business Account (requires the organization to have completed WhatsApp Embedded - Signup). + whatsapp_business_account: Direct WhatsApp Business Account credentials for a profile. Use this when the + profile should have its own WhatsApp Business Account instead of inheriting from + the organization. Credentials must be obtained from Meta Business Manager by + creating a System User with whatsapp_business_messaging and + whatsapp_business_management scopes. extra_headers: Send extra headers @@ -880,9 +870,8 @@ async def update( allow_template_sharing: Whether templates are shared across profiles (optional) - billing_contact: Billing contact for this profile. Required when billing_model is "profile" or - "profile_and_organization" and no billing contact has been configured yet. - Identifies who receives invoices and who is responsible for payment. + billing_contact: Billing contact information for a profile. Required when billing_model is + "profile" or "profile_and_organization". billing_model: Billing model: profile, organization, or profile_and_organization (optional). @@ -892,10 +881,7 @@ async def update( - "profile_and_organization": the profile is billed first with the organization as fallback; billing_contact is required. - brand: Brand and KYC information for this profile (optional). When provided, creates or - updates the brand associated with this profile. Cannot be set when - inherit_tcr_brand is true. Once a brand has been submitted to TCR it cannot be - modified. + brand: Brand and KYC data grouped into contact, business, and compliance sections description: Profile description (optional) @@ -911,9 +897,9 @@ async def update( name: Profile name (optional) - payment_details: Payment card details for this profile (optional). Accepted when billing_model is - "profile" or "profile_and_organization". Not persisted on our servers — - forwarded to the payment processor. + payment_details: Payment card details for a profile. Accepted when billing_model is "profile" or + "profile_and_organization". These details are not stored on our servers and will + be forwarded to the payment processor. sandbox: Sandbox flag - when true, the operation is simulated without side effects Useful for testing integrations without actual execution @@ -1059,7 +1045,7 @@ async def delete( cast_to=NoneType, ) - async def complete_setup( + async def complete( self, profile_id: str, *, @@ -1127,7 +1113,7 @@ async def complete_setup( "web_hook_url": web_hook_url, "sandbox": sandbox, }, - profile_complete_setup_params.ProfileCompleteSetupParams, + profile_complete_params.ProfileCompleteParams, ), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout @@ -1155,8 +1141,8 @@ def __init__(self, profiles: ProfilesResource) -> None: self.delete = to_raw_response_wrapper( profiles.delete, ) - self.complete_setup = to_raw_response_wrapper( - profiles.complete_setup, + self.complete = to_raw_response_wrapper( + profiles.complete, ) @cached_property @@ -1184,8 +1170,8 @@ def __init__(self, profiles: AsyncProfilesResource) -> None: self.delete = async_to_raw_response_wrapper( profiles.delete, ) - self.complete_setup = async_to_raw_response_wrapper( - profiles.complete_setup, + self.complete = async_to_raw_response_wrapper( + profiles.complete, ) @cached_property @@ -1213,8 +1199,8 @@ def __init__(self, profiles: ProfilesResource) -> None: self.delete = to_streamed_response_wrapper( profiles.delete, ) - self.complete_setup = to_streamed_response_wrapper( - profiles.complete_setup, + self.complete = to_streamed_response_wrapper( + profiles.complete, ) @cached_property @@ -1242,8 +1228,8 @@ def __init__(self, profiles: AsyncProfilesResource) -> None: self.delete = async_to_streamed_response_wrapper( profiles.delete, ) - self.complete_setup = async_to_streamed_response_wrapper( - profiles.complete_setup, + self.complete = async_to_streamed_response_wrapper( + profiles.complete, ) @cached_property diff --git a/src/sent_dm/resources/templates.py b/src/sent_dm/resources/templates.py index 6a1c138..174f768 100644 --- a/src/sent_dm/resources/templates.py +++ b/src/sent_dm/resources/templates.py @@ -82,7 +82,8 @@ def create( creation_source: Source of template creation (default: from-api) - definition: Template definition including header, body, footer, and buttons + definition: Complete definition of a message template including header, body, footer, and + buttons language: Template language code (e.g., en_US) (optional, auto-detected if not provided) @@ -190,7 +191,8 @@ def update( Args: category: Template category: MARKETING, UTILITY, AUTHENTICATION - definition: Template definition including header, body, footer, and buttons + definition: Complete definition of a message template including header, body, footer, and + buttons language: Template language code (e.g., en_US) @@ -410,7 +412,8 @@ async def create( creation_source: Source of template creation (default: from-api) - definition: Template definition including header, body, footer, and buttons + definition: Complete definition of a message template including header, body, footer, and + buttons language: Template language code (e.g., en_US) (optional, auto-detected if not provided) @@ -518,7 +521,8 @@ async def update( Args: category: Template category: MARKETING, UTILITY, AUTHENTICATION - definition: Template definition including header, body, footer, and buttons + definition: Complete definition of a message template including header, body, footer, and + buttons language: Template language code (e.g., en_US) diff --git a/src/sent_dm/types/__init__.py b/src/sent_dm/types/__init__.py index 3be54f9..b8d439e 100644 --- a/src/sent_dm/types/__init__.py +++ b/src/sent_dm/types/__init__.py @@ -2,7 +2,6 @@ from __future__ import annotations -from .shared import BaseDto as BaseDto from .api_meta import APIMeta as APIMeta from .template import Template as Template from .api_error import APIError as APIError @@ -40,6 +39,7 @@ from .webhook_list_response import WebhookListResponse as WebhookListResponse from .webhook_test_response import WebhookTestResponse as WebhookTestResponse from .webhook_update_params import WebhookUpdateParams as WebhookUpdateParams +from .mutation_request_param import MutationRequestParam as MutationRequestParam from .number_lookup_response import NumberLookupResponse as NumberLookupResponse from .tcr_brand_relationship import TcrBrandRelationship as TcrBrandRelationship from .template_create_params import TemplateCreateParams as TemplateCreateParams @@ -48,18 +48,17 @@ from .template_update_params import TemplateUpdateParams as TemplateUpdateParams from .api_response_of_contact import APIResponseOfContact as APIResponseOfContact from .brands_brand_data_param import BrandsBrandDataParam as BrandsBrandDataParam +from .profile_complete_params import ProfileCompleteParams as ProfileCompleteParams from .template_variable_param import TemplateVariableParam as TemplateVariableParam from .user_update_role_params import UserUpdateRoleParams as UserUpdateRoleParams from .destination_country_param import DestinationCountryParam as DestinationCountryParam from .template_definition_param import TemplateDefinitionParam as TemplateDefinitionParam from .billing_contact_info_param import BillingContactInfoParam as BillingContactInfoParam from .webhook_list_events_params import WebhookListEventsParams as WebhookListEventsParams -from .mutation_request_base_param import MutationRequestBaseParam as MutationRequestBaseParam from .template_body_content_param import TemplateBodyContentParam as TemplateBodyContentParam from .webhook_list_events_response import WebhookListEventsResponse as WebhookListEventsResponse from .webhook_rotate_secret_params import WebhookRotateSecretParams as WebhookRotateSecretParams from .webhook_toggle_status_params import WebhookToggleStatusParams as WebhookToggleStatusParams -from .profile_complete_setup_params import ProfileCompleteSetupParams as ProfileCompleteSetupParams from .api_response_of_profile_detail import APIResponseOfProfileDetail as APIResponseOfProfileDetail from .webhook_rotate_secret_response import WebhookRotateSecretResponse as WebhookRotateSecretResponse from .message_retrieve_status_response import MessageRetrieveStatusResponse as MessageRetrieveStatusResponse diff --git a/src/sent_dm/types/api_response_of_contact.py b/src/sent_dm/types/api_response_of_contact.py index 18ddd9d..bdcbe65 100644 --- a/src/sent_dm/types/api_response_of_contact.py +++ b/src/sent_dm/types/api_response_of_contact.py @@ -14,13 +14,13 @@ class APIResponseOfContact(BaseModel): """Standard API response envelope for all v3 endpoints""" data: Optional[ContactResponse] = None - """The response data (null if error)""" + """Contact response for v3 API Uses snake_case for JSON property names""" error: Optional[APIError] = None - """Error details (null if successful)""" + """Error information""" meta: Optional[APIMeta] = None - """Metadata about the request and response""" + """Request and response metadata""" success: Optional[bool] = None """Indicates whether the request was successful""" diff --git a/src/sent_dm/types/api_response_of_profile_detail.py b/src/sent_dm/types/api_response_of_profile_detail.py index df75d04..64335f5 100644 --- a/src/sent_dm/types/api_response_of_profile_detail.py +++ b/src/sent_dm/types/api_response_of_profile_detail.py @@ -14,13 +14,13 @@ class APIResponseOfProfileDetail(BaseModel): """Standard API response envelope for all v3 endpoints""" data: Optional[ProfileDetail] = None - """The response data (null if error)""" + """Detailed profile response for v3 API""" error: Optional[APIError] = None - """Error details (null if successful)""" + """Error information""" meta: Optional[APIMeta] = None - """Metadata about the request and response""" + """Request and response metadata""" success: Optional[bool] = None """Indicates whether the request was successful""" diff --git a/src/sent_dm/types/api_response_of_user.py b/src/sent_dm/types/api_response_of_user.py index 62b90fc..7a21d69 100644 --- a/src/sent_dm/types/api_response_of_user.py +++ b/src/sent_dm/types/api_response_of_user.py @@ -14,13 +14,13 @@ class APIResponseOfUser(BaseModel): """Standard API response envelope for all v3 endpoints""" data: Optional[UserResponse] = None - """The response data (null if error)""" + """User response for v3 API""" error: Optional[APIError] = None - """Error details (null if successful)""" + """Error information""" meta: Optional[APIMeta] = None - """Metadata about the request and response""" + """Request and response metadata""" success: Optional[bool] = None """Indicates whether the request was successful""" diff --git a/src/sent_dm/types/api_response_template.py b/src/sent_dm/types/api_response_template.py index 283b52e..25045be 100644 --- a/src/sent_dm/types/api_response_template.py +++ b/src/sent_dm/types/api_response_template.py @@ -14,13 +14,13 @@ class APIResponseTemplate(BaseModel): """Standard API response envelope for all v3 endpoints""" data: Optional[Template] = None - """The response data (null if error)""" + """Template response for v3 API""" error: Optional[APIError] = None - """Error details (null if successful)""" + """Error information""" meta: Optional[APIMeta] = None - """Metadata about the request and response""" + """Request and response metadata""" success: Optional[bool] = None """Indicates whether the request was successful""" diff --git a/src/sent_dm/types/api_response_webhook.py b/src/sent_dm/types/api_response_webhook.py index 6ec56e6..9f8f594 100644 --- a/src/sent_dm/types/api_response_webhook.py +++ b/src/sent_dm/types/api_response_webhook.py @@ -17,10 +17,10 @@ class APIResponseWebhook(BaseModel): """The response data (null if error)""" error: Optional[APIError] = None - """Error details (null if successful)""" + """Error information""" meta: Optional[APIMeta] = None - """Metadata about the request and response""" + """Request and response metadata""" success: Optional[bool] = None """Indicates whether the request was successful""" diff --git a/src/sent_dm/types/brands_brand_data_param.py b/src/sent_dm/types/brands_brand_data_param.py index c0e5db7..02ea9ed 100644 --- a/src/sent_dm/types/brands_brand_data_param.py +++ b/src/sent_dm/types/brands_brand_data_param.py @@ -22,10 +22,10 @@ class BrandsBrandDataParam(TypedDict, total=False): """Brand and KYC data grouped into contact, business, and compliance sections""" compliance: Required[SentDmServicesEndpointsCustomerApIv3ContractsRequestsBrandsBrandComplianceInfoParam] - """Compliance and TCR-related information""" + """Compliance and TCR information for brand registration""" contact: Required[SentDmServicesEndpointsCustomerApIv3ContractsRequestsBrandsBrandContactInfoParam] - """Contact information for the brand""" + """Contact information for brand KYC""" business: Optional[SentDmServicesEndpointsCustomerApIv3ContractsRequestsBrandsBrandBusinessInfoParam] - """Business details and address information""" + """Business details and address for brand KYC""" diff --git a/src/sent_dm/types/contact_delete_params.py b/src/sent_dm/types/contact_delete_params.py index 1306cfd..9991aeb 100644 --- a/src/sent_dm/types/contact_delete_params.py +++ b/src/sent_dm/types/contact_delete_params.py @@ -5,7 +5,7 @@ from typing_extensions import Required, Annotated, TypedDict from .._utils import PropertyInfo -from .mutation_request_base_param import MutationRequestBaseParam +from .mutation_request_param import MutationRequestParam __all__ = ["ContactDeleteParams", "Body"] @@ -17,7 +17,7 @@ class ContactDeleteParams(TypedDict, total=False): x_profile_id: Annotated[str, PropertyInfo(alias="x-profile-id")] -class Body(MutationRequestBaseParam, total=False): +class Body(MutationRequestParam, total=False): """Request to delete/dissociate a contact""" pass diff --git a/src/sent_dm/types/contact_list_response.py b/src/sent_dm/types/contact_list_response.py index b10fd39..9727745 100644 --- a/src/sent_dm/types/contact_list_response.py +++ b/src/sent_dm/types/contact_list_response.py @@ -12,26 +12,26 @@ class Data(BaseModel): - """The response data (null if error)""" + """Paginated list of contacts response""" contacts: Optional[List[ContactResponse]] = None """List of contacts""" pagination: Optional[PaginationMeta] = None - """Pagination metadata""" + """Pagination metadata for list responses""" class ContactListResponse(BaseModel): """Standard API response envelope for all v3 endpoints""" data: Optional[Data] = None - """The response data (null if error)""" + """Paginated list of contacts response""" error: Optional[APIError] = None - """Error details (null if successful)""" + """Error information""" meta: Optional[APIMeta] = None - """Metadata about the request and response""" + """Request and response metadata""" success: Optional[bool] = None """Indicates whether the request was successful""" diff --git a/src/sent_dm/types/me_retrieve_response.py b/src/sent_dm/types/me_retrieve_response.py index 151f9f3..dd86ed0 100644 --- a/src/sent_dm/types/me_retrieve_response.py +++ b/src/sent_dm/types/me_retrieve_response.py @@ -20,7 +20,7 @@ class DataChannelsRcs(BaseModel): - """RCS channel (provider: vibes)""" + """RCS channel configuration. When configured, includes the RCS phone number.""" configured: Optional[bool] = None """Whether RCS is configured for this account""" @@ -30,7 +30,7 @@ class DataChannelsRcs(BaseModel): class DataChannelsSMS(BaseModel): - """SMS channel (providers: telnyx, sinch)""" + """SMS channel configuration. When configured, includes the sending phone number.""" configured: Optional[bool] = None """Whether SMS is configured for this account""" @@ -40,7 +40,11 @@ class DataChannelsSMS(BaseModel): class DataChannelsWhatsapp(BaseModel): - """WhatsApp Business channel (provider: meta)""" + """WhatsApp Business channel configuration. + + When configured, includes the WhatsApp phone number + and business name. + """ business_name: Optional[str] = None """WhatsApp Business display name""" @@ -53,16 +57,23 @@ class DataChannelsWhatsapp(BaseModel): class DataChannels(BaseModel): - """Messaging channel configuration""" + """Messaging channel configuration. + + All three channels are always present. + Each channel has a "configured" flag; configured channels expose additional details. + """ rcs: Optional[DataChannelsRcs] = None - """RCS channel (provider: vibes)""" + """RCS channel configuration. When configured, includes the RCS phone number.""" sms: Optional[DataChannelsSMS] = None - """SMS channel (providers: telnyx, sinch)""" + """SMS channel configuration. When configured, includes the sending phone number.""" whatsapp: Optional[DataChannelsWhatsapp] = None - """WhatsApp Business channel (provider: meta)""" + """WhatsApp Business channel configuration. + + When configured, includes the WhatsApp phone number and business name. + """ class DataProfile(BaseModel): @@ -100,13 +111,21 @@ class DataProfile(BaseModel): class Data(BaseModel): - """The response data (null if error)""" + """ + Account response for GET /v3/me endpoint. + Returns organization (with profiles), user (standalone), or profile (child of an organization) + data depending on the API key type. Always includes messaging channel configuration. + """ id: Optional[str] = None """Customer ID (organization, account, or profile)""" channels: Optional[DataChannels] = None - """Messaging channel configuration""" + """Messaging channel configuration. + + All three channels are always present. Each channel has a "configured" flag; + configured channels expose additional details. + """ created_at: Optional[datetime] = None """When the account was created""" @@ -133,7 +152,7 @@ class Data(BaseModel): """ settings: Optional[ProfileSettings] = None - """Profile settings (only for profile type)""" + """Profile configuration settings""" short_name: Optional[str] = None """Short name / abbreviation (only for profile type)""" @@ -155,13 +174,17 @@ class MeRetrieveResponse(BaseModel): """Standard API response envelope for all v3 endpoints""" data: Optional[Data] = None - """The response data (null if error)""" + """ + Account response for GET /v3/me endpoint. Returns organization (with profiles), + user (standalone), or profile (child of an organization) data depending on the + API key type. Always includes messaging channel configuration. + """ error: Optional[APIError] = None - """Error details (null if successful)""" + """Error information""" meta: Optional[APIMeta] = None - """Metadata about the request and response""" + """Request and response metadata""" success: Optional[bool] = None """Indicates whether the request was successful""" diff --git a/src/sent_dm/types/message_retrieve_activities_response.py b/src/sent_dm/types/message_retrieve_activities_response.py index 1dcf737..986492b 100644 --- a/src/sent_dm/types/message_retrieve_activities_response.py +++ b/src/sent_dm/types/message_retrieve_activities_response.py @@ -36,7 +36,7 @@ class DataActivity(BaseModel): class Data(BaseModel): - """The response data (null if error)""" + """Response for GET /messages/{id}/activities""" activities: Optional[List[DataActivity]] = None """List of activity events ordered by most recent first""" @@ -49,13 +49,13 @@ class MessageRetrieveActivitiesResponse(BaseModel): """Standard API response envelope for all v3 endpoints""" data: Optional[Data] = None - """The response data (null if error)""" + """Response for GET /messages/{id}/activities""" error: Optional[APIError] = None - """Error details (null if successful)""" + """Error information""" meta: Optional[APIMeta] = None - """Metadata about the request and response""" + """Request and response metadata""" success: Optional[bool] = None """Indicates whether the request was successful""" diff --git a/src/sent_dm/types/message_retrieve_status_response.py b/src/sent_dm/types/message_retrieve_status_response.py index 4e0c015..20f7bc9 100644 --- a/src/sent_dm/types/message_retrieve_status_response.py +++ b/src/sent_dm/types/message_retrieve_status_response.py @@ -42,7 +42,7 @@ class DataMessageBody(BaseModel): class Data(BaseModel): - """The response data (null if error)""" + """Message response for v3 API — same shape as v2 with snake_case JSON conventions""" id: Optional[str] = None @@ -85,13 +85,13 @@ class MessageRetrieveStatusResponse(BaseModel): """Standard API response envelope for all v3 endpoints""" data: Optional[Data] = None - """The response data (null if error)""" + """Message response for v3 API — same shape as v2 with snake_case JSON conventions""" error: Optional[APIError] = None - """Error details (null if successful)""" + """Error information""" meta: Optional[APIMeta] = None - """Metadata about the request and response""" + """Request and response metadata""" success: Optional[bool] = None """Indicates whether the request was successful""" diff --git a/src/sent_dm/types/message_send_params.py b/src/sent_dm/types/message_send_params.py index 701be84..5645c2f 100644 --- a/src/sent_dm/types/message_send_params.py +++ b/src/sent_dm/types/message_send_params.py @@ -27,7 +27,10 @@ class MessageSendParams(TypedDict, total=False): """ template: Template - """Template reference (by id or name, with optional parameters)""" + """ + SDK-style template reference: resolve by ID or by name, with optional + parameters. + """ to: SequenceNotStr[str] """List of recipient phone numbers in E.164 format (multi-recipient fan-out)""" @@ -38,7 +41,9 @@ class MessageSendParams(TypedDict, total=False): class Template(TypedDict, total=False): - """Template reference (by id or name, with optional parameters)""" + """ + SDK-style template reference: resolve by ID or by name, with optional parameters. + """ id: Optional[str] """Template ID (mutually exclusive with name)""" diff --git a/src/sent_dm/types/message_send_response.py b/src/sent_dm/types/message_send_response.py index fade660..44541da 100644 --- a/src/sent_dm/types/message_send_response.py +++ b/src/sent_dm/types/message_send_response.py @@ -26,7 +26,7 @@ class DataRecipient(BaseModel): class Data(BaseModel): - """The response data (null if error)""" + """Response for the multi-recipient send message endpoint""" body: Optional[str] = None """Resolved template body text""" @@ -48,13 +48,13 @@ class MessageSendResponse(BaseModel): """Standard API response envelope for all v3 endpoints""" data: Optional[Data] = None - """The response data (null if error)""" + """Response for the multi-recipient send message endpoint""" error: Optional[APIError] = None - """Error details (null if successful)""" + """Error information""" meta: Optional[APIMeta] = None - """Metadata about the request and response""" + """Request and response metadata""" success: Optional[bool] = None """Indicates whether the request was successful""" diff --git a/src/sent_dm/types/mutation_request_base_param.py b/src/sent_dm/types/mutation_request_param.py similarity index 78% rename from src/sent_dm/types/mutation_request_base_param.py rename to src/sent_dm/types/mutation_request_param.py index bf4abc5..2487ca2 100644 --- a/src/sent_dm/types/mutation_request_base_param.py +++ b/src/sent_dm/types/mutation_request_param.py @@ -4,10 +4,10 @@ from typing_extensions import TypedDict -__all__ = ["MutationRequestBaseParam"] +__all__ = ["MutationRequestParam"] -class MutationRequestBaseParam(TypedDict, total=False): +class MutationRequestParam(TypedDict, total=False): sandbox: bool """ Sandbox flag - when true, the operation is simulated without side effects Useful diff --git a/src/sent_dm/types/number_lookup_response.py b/src/sent_dm/types/number_lookup_response.py index dd07228..ece5b95 100644 --- a/src/sent_dm/types/number_lookup_response.py +++ b/src/sent_dm/types/number_lookup_response.py @@ -38,10 +38,10 @@ class NumberLookupResponse(BaseModel): """The response data (null if error)""" error: Optional[APIError] = None - """Error details (null if successful)""" + """Error information""" meta: Optional[APIMeta] = None - """Metadata about the request and response""" + """Request and response metadata""" success: Optional[bool] = None """Indicates whether the request was successful""" diff --git a/src/sent_dm/types/pagination_meta.py b/src/sent_dm/types/pagination_meta.py index e18950d..cbd38f5 100644 --- a/src/sent_dm/types/pagination_meta.py +++ b/src/sent_dm/types/pagination_meta.py @@ -8,7 +8,7 @@ class Cursors(BaseModel): - """Cursor-based pagination (optional)""" + """Cursor-based pagination pointers""" after: Optional[str] = None """Cursor to fetch the next page""" @@ -21,7 +21,7 @@ class PaginationMeta(BaseModel): """Pagination metadata for list responses""" cursors: Optional[Cursors] = None - """Cursor-based pagination (optional)""" + """Cursor-based pagination pointers""" has_more: Optional[bool] = None """Whether there are more pages after this one""" diff --git a/src/sent_dm/types/profile_complete_setup_params.py b/src/sent_dm/types/profile_complete_params.py similarity index 87% rename from src/sent_dm/types/profile_complete_setup_params.py rename to src/sent_dm/types/profile_complete_params.py index c788b63..a444957 100644 --- a/src/sent_dm/types/profile_complete_setup_params.py +++ b/src/sent_dm/types/profile_complete_params.py @@ -6,10 +6,10 @@ from .._utils import PropertyInfo -__all__ = ["ProfileCompleteSetupParams"] +__all__ = ["ProfileCompleteParams"] -class ProfileCompleteSetupParams(TypedDict, total=False): +class ProfileCompleteParams(TypedDict, total=False): web_hook_url: Required[Annotated[str, PropertyInfo(alias="webHookUrl")]] """Webhook URL to call when profile completion finishes (success or failure)""" diff --git a/src/sent_dm/types/profile_create_params.py b/src/sent_dm/types/profile_create_params.py index 9f8d194..0579b77 100644 --- a/src/sent_dm/types/profile_create_params.py +++ b/src/sent_dm/types/profile_create_params.py @@ -21,10 +21,9 @@ class ProfileCreateParams(TypedDict, total=False): """Whether templates are shared across profiles (default: false)""" billing_contact: Optional[BillingContactInfoParam] - """Billing contact for this profile. - - Required when billing_model is "profile" or "profile_and_organization". - Identifies who receives invoices and who is responsible for payment. + """ + Billing contact information for a profile. Required when billing_model is + "profile" or "profile_and_organization". """ billing_model: Optional[str] @@ -40,11 +39,7 @@ class ProfileCreateParams(TypedDict, total=False): """ brand: Optional[BrandsBrandDataParam] - """ - Brand and KYC information for this profile (optional). When provided, creates - the brand associated with this profile. Cannot be set when inherit_tcr_brand is - true. - """ + """Brand and KYC data grouped into contact, business, and compliance sections""" description: Optional[str] """Profile description (optional)""" @@ -69,9 +64,9 @@ class ProfileCreateParams(TypedDict, total=False): payment_details: Optional[PaymentDetailsParam] """ - Payment card details for this profile (optional). Accepted when billing_model is - "profile" or "profile_and_organization". Not persisted on our servers — - forwarded to the payment processor. + Payment card details for a profile. Accepted when billing_model is "profile" or + "profile_and_organization". These details are not stored on our servers and will + be forwarded to the payment processor. """ sandbox: bool @@ -89,11 +84,11 @@ class ProfileCreateParams(TypedDict, total=False): whatsapp_business_account: Optional[WhatsappBusinessAccount] """ - Direct WhatsApp Business Account credentials for this profile. When provided, - the profile uses its own WhatsApp Business Account instead of inheriting from - the organization. When omitted, the profile inherits the organization's WhatsApp - Business Account (requires the organization to have completed WhatsApp Embedded - Signup). + Direct WhatsApp Business Account credentials for a profile. Use this when the + profile should have its own WhatsApp Business Account instead of inheriting from + the organization. Credentials must be obtained from Meta Business Manager by + creating a System User with whatsapp_business_messaging and + whatsapp_business_management scopes. """ idempotency_key: Annotated[str, PropertyInfo(alias="Idempotency-Key")] @@ -103,10 +98,10 @@ class ProfileCreateParams(TypedDict, total=False): class WhatsappBusinessAccount(TypedDict, total=False): """ - Direct WhatsApp Business Account credentials for this profile. - When provided, the profile uses its own WhatsApp Business Account instead of inheriting from the organization. - When omitted, the profile inherits the organization's WhatsApp Business Account (requires the organization - to have completed WhatsApp Embedded Signup). + Direct WhatsApp Business Account credentials for a profile. + Use this when the profile should have its own WhatsApp Business Account instead of inheriting from the organization. + Credentials must be obtained from Meta Business Manager by creating a System User with + whatsapp_business_messaging and whatsapp_business_management scopes. """ access_token: Required[str] diff --git a/src/sent_dm/types/profile_delete_params.py b/src/sent_dm/types/profile_delete_params.py index 2b329f3..6b358e5 100644 --- a/src/sent_dm/types/profile_delete_params.py +++ b/src/sent_dm/types/profile_delete_params.py @@ -5,7 +5,7 @@ from typing_extensions import Required, Annotated, TypedDict from .._utils import PropertyInfo -from .mutation_request_base_param import MutationRequestBaseParam +from .mutation_request_param import MutationRequestParam __all__ = ["ProfileDeleteParams", "Body"] @@ -17,7 +17,7 @@ class ProfileDeleteParams(TypedDict, total=False): x_profile_id: Annotated[str, PropertyInfo(alias="x-profile-id")] -class Body(MutationRequestBaseParam, total=False): +class Body(MutationRequestParam, total=False): """Request to delete a profile""" pass diff --git a/src/sent_dm/types/profile_detail.py b/src/sent_dm/types/profile_detail.py index 1bc7437..ef3f734 100644 --- a/src/sent_dm/types/profile_detail.py +++ b/src/sent_dm/types/profile_detail.py @@ -13,10 +13,7 @@ class BillingContact(BaseModel): - """Billing contact for this profile. - - Present when billing_model is "profile" or "profile_and_organization". - """ + """Billing contact info returned in profile responses""" address: Optional[str] = None @@ -68,7 +65,6 @@ class BrandCompliance(BaseModel): """Compliance and TCR-related information""" brand_relationship: Optional[TcrBrandRelationship] = None - """Brand relationship level with TCR""" destination_countries: Optional[List[DestinationCountry]] = None """List of destination countries for messaging""" @@ -89,7 +85,6 @@ class BrandCompliance(BaseModel): """Primary messaging use case description""" vertical: Optional[TcrVertical] = None - """Business vertical/industry category""" class BrandContact(BaseModel): @@ -115,10 +110,8 @@ class BrandContact(BaseModel): class Brand(BaseModel): - """Brand associated with this profile. - - Null if no brand has been configured yet. - Includes KYC information and TCR registration status. + """ + Brand response with nested contact, business, and compliance sections — mirrors the request structure. """ id: Optional[str] = None @@ -140,13 +133,11 @@ class Brand(BaseModel): """CSP (Campaign Service Provider) ID""" identity_status: Optional[Literal["SELF_DECLARED", "UNVERIFIED", "VERIFIED", "VETTED_VERIFIED"]] = None - """TCR brand identity verification status""" is_inherited: Optional[bool] = None """Whether this brand is inherited from the parent organization""" status: Optional[Literal["ACTIVE", "INACTIVE", "SUSPENDED"]] = None - """TCR brand status""" submitted_at: Optional[datetime] = None """When the brand was submitted to TCR""" @@ -180,19 +171,15 @@ class ProfileDetail(BaseModel): """Whether templates are shared across profiles in the organization""" billing_contact: Optional[BillingContact] = None - """Billing contact for this profile. - - Present when billing_model is "profile" or "profile_and_organization". - """ + """Billing contact info returned in profile responses""" billing_model: Optional[str] = None """Billing model: profile, organization, or profile_and_organization""" brand: Optional[Brand] = None - """Brand associated with this profile. - - Null if no brand has been configured yet. Includes KYC information and TCR - registration status. + """ + Brand response with nested contact, business, and compliance sections — mirrors + the request structure. """ created_at: Optional[datetime] = None diff --git a/src/sent_dm/types/profile_list_response.py b/src/sent_dm/types/profile_list_response.py index 01d729f..f54be3d 100644 --- a/src/sent_dm/types/profile_list_response.py +++ b/src/sent_dm/types/profile_list_response.py @@ -11,7 +11,7 @@ class Data(BaseModel): - """The response data (null if error)""" + """List of profiles response""" profiles: Optional[List[ProfileDetail]] = None """List of profiles in the organization""" @@ -21,13 +21,13 @@ class ProfileListResponse(BaseModel): """Standard API response envelope for all v3 endpoints""" data: Optional[Data] = None - """The response data (null if error)""" + """List of profiles response""" error: Optional[APIError] = None - """Error details (null if successful)""" + """Error information""" meta: Optional[APIMeta] = None - """Metadata about the request and response""" + """Request and response metadata""" success: Optional[bool] = None """Indicates whether the request was successful""" diff --git a/src/sent_dm/types/profile_update_params.py b/src/sent_dm/types/profile_update_params.py index 696f519..da08aac 100644 --- a/src/sent_dm/types/profile_update_params.py +++ b/src/sent_dm/types/profile_update_params.py @@ -24,11 +24,9 @@ class ProfileUpdateParams(TypedDict, total=False): """Whether templates are shared across profiles (optional)""" billing_contact: Optional[BillingContactInfoParam] - """Billing contact for this profile. - - Required when billing_model is "profile" or "profile_and_organization" and no - billing contact has been configured yet. Identifies who receives invoices and - who is responsible for payment. + """ + Billing contact information for a profile. Required when billing_model is + "profile" or "profile_and_organization". """ billing_model: Optional[str] @@ -42,12 +40,7 @@ class ProfileUpdateParams(TypedDict, total=False): """ brand: Optional[BrandsBrandDataParam] - """ - Brand and KYC information for this profile (optional). When provided, creates or - updates the brand associated with this profile. Cannot be set when - inherit_tcr_brand is true. Once a brand has been submitted to TCR it cannot be - modified. - """ + """Brand and KYC data grouped into contact, business, and compliance sections""" description: Optional[str] """Profile description (optional)""" @@ -72,9 +65,9 @@ class ProfileUpdateParams(TypedDict, total=False): payment_details: Optional[PaymentDetailsParam] """ - Payment card details for this profile (optional). Accepted when billing_model is - "profile" or "profile_and_organization". Not persisted on our servers — - forwarded to the payment processor. + Payment card details for a profile. Accepted when billing_model is "profile" or + "profile_and_organization". These details are not stored on our servers and will + be forwarded to the payment processor. """ sandbox: bool diff --git a/src/sent_dm/types/profiles/__init__.py b/src/sent_dm/types/profiles/__init__.py index 55f1405..4c8ff4e 100644 --- a/src/sent_dm/types/profiles/__init__.py +++ b/src/sent_dm/types/profiles/__init__.py @@ -2,6 +2,7 @@ from __future__ import annotations +from .base_dto import BaseDto as BaseDto from .campaign_data_param import CampaignDataParam as CampaignDataParam from .messaging_use_case_us import MessagingUseCaseUs as MessagingUseCaseUs from .campaign_create_params import CampaignCreateParams as CampaignCreateParams diff --git a/src/sent_dm/types/profiles/api_response_of_tcr_campaign_with_use_cases.py b/src/sent_dm/types/profiles/api_response_of_tcr_campaign_with_use_cases.py index 55ede5f..04c6a0b 100644 --- a/src/sent_dm/types/profiles/api_response_of_tcr_campaign_with_use_cases.py +++ b/src/sent_dm/types/profiles/api_response_of_tcr_campaign_with_use_cases.py @@ -17,10 +17,10 @@ class APIResponseOfTcrCampaignWithUseCases(BaseModel): """The response data (null if error)""" error: Optional[APIError] = None - """Error details (null if successful)""" + """Error information""" meta: Optional[APIMeta] = None - """Metadata about the request and response""" + """Request and response metadata""" success: Optional[bool] = None """Indicates whether the request was successful""" diff --git a/src/sent_dm/types/shared/base_dto.py b/src/sent_dm/types/profiles/base_dto.py similarity index 100% rename from src/sent_dm/types/shared/base_dto.py rename to src/sent_dm/types/profiles/base_dto.py diff --git a/src/sent_dm/types/profiles/campaign_create_params.py b/src/sent_dm/types/profiles/campaign_create_params.py index 7f497dd..823e3f4 100644 --- a/src/sent_dm/types/profiles/campaign_create_params.py +++ b/src/sent_dm/types/profiles/campaign_create_params.py @@ -12,7 +12,7 @@ class CampaignCreateParams(TypedDict, total=False): campaign: Required[CampaignDataParam] - """Campaign data""" + """Campaign data for create or update operation""" sandbox: bool """ diff --git a/src/sent_dm/types/profiles/campaign_delete_params.py b/src/sent_dm/types/profiles/campaign_delete_params.py index f01f605..fda8341 100644 --- a/src/sent_dm/types/profiles/campaign_delete_params.py +++ b/src/sent_dm/types/profiles/campaign_delete_params.py @@ -5,7 +5,7 @@ from typing_extensions import Required, Annotated, TypedDict from ..._utils import PropertyInfo -from ..mutation_request_base_param import MutationRequestBaseParam +from ..mutation_request_param import MutationRequestParam __all__ = ["CampaignDeleteParams", "Body"] @@ -19,7 +19,7 @@ class CampaignDeleteParams(TypedDict, total=False): x_profile_id: Annotated[str, PropertyInfo(alias="x-profile-id")] -class Body(MutationRequestBaseParam, total=False): +class Body(MutationRequestParam, total=False): """Request to delete a campaign from a brand""" pass diff --git a/src/sent_dm/types/profiles/campaign_list_response.py b/src/sent_dm/types/profiles/campaign_list_response.py index 0a389fa..059ec96 100644 --- a/src/sent_dm/types/profiles/campaign_list_response.py +++ b/src/sent_dm/types/profiles/campaign_list_response.py @@ -17,10 +17,10 @@ class CampaignListResponse(BaseModel): """The response data (null if error)""" error: Optional[APIError] = None - """Error details (null if successful)""" + """Error information""" meta: Optional[APIMeta] = None - """Metadata about the request and response""" + """Request and response metadata""" success: Optional[bool] = None """Indicates whether the request was successful""" diff --git a/src/sent_dm/types/profiles/campaign_update_params.py b/src/sent_dm/types/profiles/campaign_update_params.py index a27401b..4a6c968 100644 --- a/src/sent_dm/types/profiles/campaign_update_params.py +++ b/src/sent_dm/types/profiles/campaign_update_params.py @@ -14,7 +14,7 @@ class CampaignUpdateParams(TypedDict, total=False): profile_id: Required[Annotated[str, PropertyInfo(alias="profileId")]] campaign: Required[CampaignDataParam] - """Campaign data""" + """Campaign data for create or update operation""" sandbox: bool """ diff --git a/src/sent_dm/types/profiles/sent_dm_services_endpoints_customer_ap_iv3_contracts_requests_campaigns_campaign_use_case_data_param.py b/src/sent_dm/types/profiles/sent_dm_services_endpoints_customer_ap_iv3_contracts_requests_campaigns_campaign_use_case_data_param.py index 9915f23..0527f60 100644 --- a/src/sent_dm/types/profiles/sent_dm_services_endpoints_customer_ap_iv3_contracts_requests_campaigns_campaign_use_case_data_param.py +++ b/src/sent_dm/types/profiles/sent_dm_services_endpoints_customer_ap_iv3_contracts_requests_campaigns_campaign_use_case_data_param.py @@ -15,7 +15,6 @@ class SentDmServicesEndpointsCustomerApIv3ContractsRequestsCampaignsCampaignUseC """Campaign use case with sample messages""" messaging_use_case_us: Required[Annotated[MessagingUseCaseUs, PropertyInfo(alias="messagingUseCaseUs")]] - """US messaging use case category""" sample_messages: Required[Annotated[SequenceNotStr[str], PropertyInfo(alias="sampleMessages")]] """Sample messages for this use case (1-5 messages, max 1024 characters each)""" diff --git a/src/sent_dm/types/profiles/tcr_campaign_with_use_cases.py b/src/sent_dm/types/profiles/tcr_campaign_with_use_cases.py index d3577d3..99bbd10 100644 --- a/src/sent_dm/types/profiles/tcr_campaign_with_use_cases.py +++ b/src/sent_dm/types/profiles/tcr_campaign_with_use_cases.py @@ -6,7 +6,7 @@ from pydantic import Field as FieldInfo -from ..shared.base_dto import BaseDto +from .base_dto import BaseDto from .messaging_use_case_us import MessagingUseCaseUs __all__ = ["TcrCampaignWithUseCases", "TcrCampaignWithUseCasesUseCase"] diff --git a/src/sent_dm/types/sent_dm_services_endpoints_customer_ap_iv3_contracts_requests_brands_brand_business_info_param.py b/src/sent_dm/types/sent_dm_services_endpoints_customer_ap_iv3_contracts_requests_brands_brand_business_info_param.py index dad5090..dfb0149 100644 --- a/src/sent_dm/types/sent_dm_services_endpoints_customer_ap_iv3_contracts_requests_brands_brand_business_info_param.py +++ b/src/sent_dm/types/sent_dm_services_endpoints_customer_ap_iv3_contracts_requests_brands_brand_business_info_param.py @@ -26,7 +26,6 @@ class SentDmServicesEndpointsCustomerApIv3ContractsRequestsBrandsBrandBusinessIn Optional[Literal["PRIVATE_PROFIT", "PUBLIC_PROFIT", "NON_PROFIT", "SOLE_PROPRIETOR", "GOVERNMENT"]], PropertyInfo(alias="entityType"), ] - """Business entity type""" legal_name: Annotated[Optional[str], PropertyInfo(alias="legalName")] """Legal business name""" diff --git a/src/sent_dm/types/sent_dm_services_endpoints_customer_ap_iv3_contracts_requests_brands_brand_compliance_info_param.py b/src/sent_dm/types/sent_dm_services_endpoints_customer_ap_iv3_contracts_requests_brands_brand_compliance_info_param.py index 5b787cd..2030a52 100644 --- a/src/sent_dm/types/sent_dm_services_endpoints_customer_ap_iv3_contracts_requests_brands_brand_compliance_info_param.py +++ b/src/sent_dm/types/sent_dm_services_endpoints_customer_ap_iv3_contracts_requests_brands_brand_compliance_info_param.py @@ -17,10 +17,8 @@ class SentDmServicesEndpointsCustomerApIv3ContractsRequestsBrandsBrandCompliance """Compliance and TCR information for brand registration""" brand_relationship: Required[Annotated[TcrBrandRelationship, PropertyInfo(alias="brandRelationship")]] - """Brand relationship level with TCR (required for TCR)""" vertical: Required[TcrVertical] - """Business vertical/industry category (required for TCR)""" destination_countries: Annotated[ Optional[Iterable[DestinationCountryParam]], PropertyInfo(alias="destinationCountries") diff --git a/src/sent_dm/types/shared/__init__.py b/src/sent_dm/types/shared/__init__.py deleted file mode 100644 index 147f4b4..0000000 --- a/src/sent_dm/types/shared/__init__.py +++ /dev/null @@ -1,3 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from .base_dto import BaseDto as BaseDto diff --git a/src/sent_dm/types/template_create_params.py b/src/sent_dm/types/template_create_params.py index dce9066..a740609 100644 --- a/src/sent_dm/types/template_create_params.py +++ b/src/sent_dm/types/template_create_params.py @@ -22,7 +22,10 @@ class TemplateCreateParams(TypedDict, total=False): """Source of template creation (default: from-api)""" definition: TemplateDefinitionParam - """Template definition including header, body, footer, and buttons""" + """ + Complete definition of a message template including header, body, footer, and + buttons + """ language: Optional[str] """Template language code (e.g., en_US) (optional, auto-detected if not provided)""" diff --git a/src/sent_dm/types/template_definition_param.py b/src/sent_dm/types/template_definition_param.py index e3fa488..055f801 100644 --- a/src/sent_dm/types/template_definition_param.py +++ b/src/sent_dm/types/template_definition_param.py @@ -31,16 +31,13 @@ class TemplateDefinitionParam(TypedDict, total=False): """ body: Required[SentDmServicesCommonContractsPocOsTemplateBodyParam] - """ - Required template body with content for different channels (multi-channel, - SMS-specific, or WhatsApp-specific) - """ + """Body section of a message template with channel-specific content""" authentication_config: Annotated[ Optional[SentDmServicesCommonContractsPocOsAuthenticationConfigParam], PropertyInfo(alias="authenticationConfig"), ] - """Configuration specific to AUTHENTICATION category templates (optional)""" + """Configuration for AUTHENTICATION category templates""" buttons: Optional[Iterable[SentDmServicesCommonContractsPocOsTemplateButtonParam]] """Optional list of interactive buttons (e.g., quick replies, URLs, phone numbers)""" @@ -49,7 +46,7 @@ class TemplateDefinitionParam(TypedDict, total=False): """The version of the template definition format""" footer: Optional[SentDmServicesCommonContractsPocOsTemplateFooterParam] - """Optional template footer with optional variables""" + """Footer section of a message template""" header: Optional[SentDmServicesCommonContractsPocOsTemplateHeaderParam] - """Optional template header with optional variables""" + """Header section of a message template""" diff --git a/src/sent_dm/types/template_list_response.py b/src/sent_dm/types/template_list_response.py index b41e9f8..657027e 100644 --- a/src/sent_dm/types/template_list_response.py +++ b/src/sent_dm/types/template_list_response.py @@ -12,10 +12,10 @@ class Data(BaseModel): - """The response data (null if error)""" + """Paginated list of templates""" pagination: Optional[PaginationMeta] = None - """Pagination metadata""" + """Pagination metadata for list responses""" templates: Optional[List[Template]] = None """List of templates""" @@ -25,13 +25,13 @@ class TemplateListResponse(BaseModel): """Standard API response envelope for all v3 endpoints""" data: Optional[Data] = None - """The response data (null if error)""" + """Paginated list of templates""" error: Optional[APIError] = None - """Error details (null if successful)""" + """Error information""" meta: Optional[APIMeta] = None - """Metadata about the request and response""" + """Request and response metadata""" success: Optional[bool] = None """Indicates whether the request was successful""" diff --git a/src/sent_dm/types/template_update_params.py b/src/sent_dm/types/template_update_params.py index 54bbd9f..7c6b98d 100644 --- a/src/sent_dm/types/template_update_params.py +++ b/src/sent_dm/types/template_update_params.py @@ -16,7 +16,10 @@ class TemplateUpdateParams(TypedDict, total=False): """Template category: MARKETING, UTILITY, AUTHENTICATION""" definition: Optional[TemplateDefinitionParam] - """Template definition including header, body, footer, and buttons""" + """ + Complete definition of a message template including header, body, footer, and + buttons + """ language: Optional[str] """Template language code (e.g., en_US)""" diff --git a/src/sent_dm/types/user_list_response.py b/src/sent_dm/types/user_list_response.py index add6fb1..8878e4d 100644 --- a/src/sent_dm/types/user_list_response.py +++ b/src/sent_dm/types/user_list_response.py @@ -11,7 +11,7 @@ class Data(BaseModel): - """The response data (null if error)""" + """List of users response""" users: Optional[List[UserResponse]] = None """List of users in the organization""" @@ -21,13 +21,13 @@ class UserListResponse(BaseModel): """Standard API response envelope for all v3 endpoints""" data: Optional[Data] = None - """The response data (null if error)""" + """List of users response""" error: Optional[APIError] = None - """Error details (null if successful)""" + """Error information""" meta: Optional[APIMeta] = None - """Metadata about the request and response""" + """Request and response metadata""" success: Optional[bool] = None """Indicates whether the request was successful""" diff --git a/src/sent_dm/types/user_remove_params.py b/src/sent_dm/types/user_remove_params.py index 522f2d0..dd4ed75 100644 --- a/src/sent_dm/types/user_remove_params.py +++ b/src/sent_dm/types/user_remove_params.py @@ -5,7 +5,7 @@ from typing_extensions import Required, Annotated, TypedDict from .._utils import PropertyInfo -from .mutation_request_base_param import MutationRequestBaseParam +from .mutation_request_param import MutationRequestParam __all__ = ["UserRemoveParams", "Body"] @@ -17,7 +17,7 @@ class UserRemoveParams(TypedDict, total=False): x_profile_id: Annotated[str, PropertyInfo(alias="x-profile-id")] -class Body(MutationRequestBaseParam, total=False): +class Body(MutationRequestParam, total=False): """Request to remove a user from an organization""" pass diff --git a/src/sent_dm/types/webhook_list_event_types_response.py b/src/sent_dm/types/webhook_list_event_types_response.py index fdf011f..3cbcd53 100644 --- a/src/sent_dm/types/webhook_list_event_types_response.py +++ b/src/sent_dm/types/webhook_list_event_types_response.py @@ -32,10 +32,10 @@ class WebhookListEventTypesResponse(BaseModel): """The response data (null if error)""" error: Optional[APIError] = None - """Error details (null if successful)""" + """Error information""" meta: Optional[APIMeta] = None - """Metadata about the request and response""" + """Request and response metadata""" success: Optional[bool] = None """Indicates whether the request was successful""" diff --git a/src/sent_dm/types/webhook_list_events_response.py b/src/sent_dm/types/webhook_list_events_response.py index cc89b1c..d1fa58e 100644 --- a/src/sent_dm/types/webhook_list_events_response.py +++ b/src/sent_dm/types/webhook_list_events_response.py @@ -51,10 +51,10 @@ class WebhookListEventsResponse(BaseModel): """The response data (null if error)""" error: Optional[APIError] = None - """Error details (null if successful)""" + """Error information""" meta: Optional[APIMeta] = None - """Metadata about the request and response""" + """Request and response metadata""" success: Optional[bool] = None """Indicates whether the request was successful""" diff --git a/src/sent_dm/types/webhook_list_response.py b/src/sent_dm/types/webhook_list_response.py index 5192d5f..61c24aa 100644 --- a/src/sent_dm/types/webhook_list_response.py +++ b/src/sent_dm/types/webhook_list_response.py @@ -27,10 +27,10 @@ class WebhookListResponse(BaseModel): """The response data (null if error)""" error: Optional[APIError] = None - """Error details (null if successful)""" + """Error information""" meta: Optional[APIMeta] = None - """Metadata about the request and response""" + """Request and response metadata""" success: Optional[bool] = None """Indicates whether the request was successful""" diff --git a/src/sent_dm/types/webhook_rotate_secret_params.py b/src/sent_dm/types/webhook_rotate_secret_params.py index d217cb5..51a4de5 100644 --- a/src/sent_dm/types/webhook_rotate_secret_params.py +++ b/src/sent_dm/types/webhook_rotate_secret_params.py @@ -5,7 +5,7 @@ from typing_extensions import Required, Annotated, TypedDict from .._utils import PropertyInfo -from .mutation_request_base_param import MutationRequestBaseParam +from .mutation_request_param import MutationRequestParam __all__ = ["WebhookRotateSecretParams", "Body"] @@ -18,5 +18,5 @@ class WebhookRotateSecretParams(TypedDict, total=False): x_profile_id: Annotated[str, PropertyInfo(alias="x-profile-id")] -class Body(MutationRequestBaseParam, total=False): +class Body(MutationRequestParam, total=False): pass diff --git a/src/sent_dm/types/webhook_rotate_secret_response.py b/src/sent_dm/types/webhook_rotate_secret_response.py index e7ee6e2..4304204 100644 --- a/src/sent_dm/types/webhook_rotate_secret_response.py +++ b/src/sent_dm/types/webhook_rotate_secret_response.py @@ -22,10 +22,10 @@ class WebhookRotateSecretResponse(BaseModel): """The response data (null if error)""" error: Optional[APIError] = None - """Error details (null if successful)""" + """Error information""" meta: Optional[APIMeta] = None - """Metadata about the request and response""" + """Request and response metadata""" success: Optional[bool] = None """Indicates whether the request was successful""" diff --git a/src/sent_dm/types/webhook_test_response.py b/src/sent_dm/types/webhook_test_response.py index 08af11c..9de2e6b 100644 --- a/src/sent_dm/types/webhook_test_response.py +++ b/src/sent_dm/types/webhook_test_response.py @@ -24,10 +24,10 @@ class WebhookTestResponse(BaseModel): """The response data (null if error)""" error: Optional[APIError] = None - """Error details (null if successful)""" + """Error information""" meta: Optional[APIMeta] = None - """Metadata about the request and response""" + """Request and response metadata""" success: Optional[bool] = None """Indicates whether the request was successful""" diff --git a/tests/api_resources/test_profiles.py b/tests/api_resources/test_profiles.py index be45cde..b6707f7 100644 --- a/tests/api_resources/test_profiles.py +++ b/tests/api_resources/test_profiles.py @@ -388,8 +388,8 @@ def test_path_params_delete(self, client: SentDm) -> None: @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize - def test_method_complete_setup(self, client: SentDm) -> None: - profile = client.profiles.complete_setup( + def test_method_complete(self, client: SentDm) -> None: + profile = client.profiles.complete( profile_id="660e8400-e29b-41d4-a716-446655440000", web_hook_url="https://your-app.com/webhook/profile-complete", ) @@ -397,8 +397,8 @@ def test_method_complete_setup(self, client: SentDm) -> None: @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize - def test_method_complete_setup_with_all_params(self, client: SentDm) -> None: - profile = client.profiles.complete_setup( + def test_method_complete_with_all_params(self, client: SentDm) -> None: + profile = client.profiles.complete( profile_id="660e8400-e29b-41d4-a716-446655440000", web_hook_url="https://your-app.com/webhook/profile-complete", sandbox=False, @@ -409,8 +409,8 @@ def test_method_complete_setup_with_all_params(self, client: SentDm) -> None: @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize - def test_raw_response_complete_setup(self, client: SentDm) -> None: - response = client.profiles.with_raw_response.complete_setup( + def test_raw_response_complete(self, client: SentDm) -> None: + response = client.profiles.with_raw_response.complete( profile_id="660e8400-e29b-41d4-a716-446655440000", web_hook_url="https://your-app.com/webhook/profile-complete", ) @@ -422,8 +422,8 @@ def test_raw_response_complete_setup(self, client: SentDm) -> None: @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize - def test_streaming_response_complete_setup(self, client: SentDm) -> None: - with client.profiles.with_streaming_response.complete_setup( + def test_streaming_response_complete(self, client: SentDm) -> None: + with client.profiles.with_streaming_response.complete( profile_id="660e8400-e29b-41d4-a716-446655440000", web_hook_url="https://your-app.com/webhook/profile-complete", ) as response: @@ -437,9 +437,9 @@ def test_streaming_response_complete_setup(self, client: SentDm) -> None: @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize - def test_path_params_complete_setup(self, client: SentDm) -> None: + def test_path_params_complete(self, client: SentDm) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `profile_id` but received ''"): - client.profiles.with_raw_response.complete_setup( + client.profiles.with_raw_response.complete( profile_id="", web_hook_url="https://your-app.com/webhook/profile-complete", ) @@ -818,8 +818,8 @@ async def test_path_params_delete(self, async_client: AsyncSentDm) -> None: @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize - async def test_method_complete_setup(self, async_client: AsyncSentDm) -> None: - profile = await async_client.profiles.complete_setup( + async def test_method_complete(self, async_client: AsyncSentDm) -> None: + profile = await async_client.profiles.complete( profile_id="660e8400-e29b-41d4-a716-446655440000", web_hook_url="https://your-app.com/webhook/profile-complete", ) @@ -827,8 +827,8 @@ async def test_method_complete_setup(self, async_client: AsyncSentDm) -> None: @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize - async def test_method_complete_setup_with_all_params(self, async_client: AsyncSentDm) -> None: - profile = await async_client.profiles.complete_setup( + async def test_method_complete_with_all_params(self, async_client: AsyncSentDm) -> None: + profile = await async_client.profiles.complete( profile_id="660e8400-e29b-41d4-a716-446655440000", web_hook_url="https://your-app.com/webhook/profile-complete", sandbox=False, @@ -839,8 +839,8 @@ async def test_method_complete_setup_with_all_params(self, async_client: AsyncSe @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize - async def test_raw_response_complete_setup(self, async_client: AsyncSentDm) -> None: - response = await async_client.profiles.with_raw_response.complete_setup( + async def test_raw_response_complete(self, async_client: AsyncSentDm) -> None: + response = await async_client.profiles.with_raw_response.complete( profile_id="660e8400-e29b-41d4-a716-446655440000", web_hook_url="https://your-app.com/webhook/profile-complete", ) @@ -852,8 +852,8 @@ async def test_raw_response_complete_setup(self, async_client: AsyncSentDm) -> N @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize - async def test_streaming_response_complete_setup(self, async_client: AsyncSentDm) -> None: - async with async_client.profiles.with_streaming_response.complete_setup( + async def test_streaming_response_complete(self, async_client: AsyncSentDm) -> None: + async with async_client.profiles.with_streaming_response.complete( profile_id="660e8400-e29b-41d4-a716-446655440000", web_hook_url="https://your-app.com/webhook/profile-complete", ) as response: @@ -867,9 +867,9 @@ async def test_streaming_response_complete_setup(self, async_client: AsyncSentDm @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize - async def test_path_params_complete_setup(self, async_client: AsyncSentDm) -> None: + async def test_path_params_complete(self, async_client: AsyncSentDm) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `profile_id` but received ''"): - await async_client.profiles.with_raw_response.complete_setup( + await async_client.profiles.with_raw_response.complete( profile_id="", web_hook_url="https://your-app.com/webhook/profile-complete", )