Skip to content

Commit b6db7f9

Browse files
feat(api): manual updates
1 parent 32ca119 commit b6db7f9

29 files changed

+283
-462
lines changed

.stats.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 40
22
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/sent%2Fsent-dm-2566cdc5d8e0bffe2a8c442692b0fc1b35d3bfe7e9bf578331fc19d402361c1f.yml
33
openapi_spec_hash: 85e1feeb9bbc8d59bb34d6cdd679575a
4-
config_hash: ad652575976c2c8db09e4575778f0e77
4+
config_hash: 676ee4f74f5b328b155283c879154b66

api.md

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
1-
# Shared Types
2-
3-
```python
4-
from sent_dm.types import BaseDto
5-
```
6-
71
# Webhooks
82

93
Types:
@@ -13,7 +7,7 @@ from sent_dm.types import (
137
APIError,
148
APIMeta,
159
APIResponseWebhook,
16-
MutationRequestBase,
10+
MutationRequest,
1711
PaginationMeta,
1812
WebhookResponse,
1913
WebhookListResponse,
@@ -60,12 +54,6 @@ Types:
6054
```python
6155
from sent_dm.types import (
6256
APIResponseTemplate,
63-
SentDmServicesCommonContractsPocOsAuthenticationConfig,
64-
SentDmServicesCommonContractsPocOsTemplateBody,
65-
SentDmServicesCommonContractsPocOsTemplateButton,
66-
SentDmServicesCommonContractsPocOsTemplateButtonProps,
67-
SentDmServicesCommonContractsPocOsTemplateFooter,
68-
SentDmServicesCommonContractsPocOsTemplateHeader,
6957
Template,
7058
TemplateBodyContent,
7159
TemplateDefinition,
@@ -94,9 +82,6 @@ from sent_dm.types import (
9482
DestinationCountry,
9583
PaymentDetails,
9684
ProfileDetail,
97-
SentDmServicesEndpointsCustomerApIv3ContractsRequestsBrandsBrandBusinessInfo,
98-
SentDmServicesEndpointsCustomerApIv3ContractsRequestsBrandsBrandComplianceInfo,
99-
SentDmServicesEndpointsCustomerApIv3ContractsRequestsBrandsBrandContactInfo,
10085
TcrBrandRelationship,
10186
TcrVertical,
10287
ProfileListResponse,
@@ -110,7 +95,7 @@ Methods:
11095
- <code title="patch /v3/profiles/{profileId}">client.profiles.<a href="./src/sent_dm/resources/profiles/profiles.py">update</a>(profile_id, \*\*<a href="src/sent_dm/types/profile_update_params.py">params</a>) -> <a href="./src/sent_dm/types/api_response_of_profile_detail.py">APIResponseOfProfileDetail</a></code>
11196
- <code title="get /v3/profiles">client.profiles.<a href="./src/sent_dm/resources/profiles/profiles.py">list</a>() -> <a href="./src/sent_dm/types/profile_list_response.py">ProfileListResponse</a></code>
11297
- <code title="delete /v3/profiles/{profileId}">client.profiles.<a href="./src/sent_dm/resources/profiles/profiles.py">delete</a>(profile_id, \*\*<a href="src/sent_dm/types/profile_delete_params.py">params</a>) -> None</code>
113-
- <code title="post /v3/profiles/{profileId}/complete">client.profiles.<a href="./src/sent_dm/resources/profiles/profiles.py">complete_setup</a>(profile_id, \*\*<a href="src/sent_dm/types/profile_complete_setup_params.py">params</a>) -> object</code>
98+
- <code title="post /v3/profiles/{profileId}/complete">client.profiles.<a href="./src/sent_dm/resources/profiles/profiles.py">complete</a>(profile_id, \*\*<a href="src/sent_dm/types/profile_complete_params.py">params</a>) -> object</code>
11499

115100
## Campaigns
116101

@@ -119,9 +104,9 @@ Types:
119104
```python
120105
from sent_dm.types.profiles import (
121106
APIResponseOfTcrCampaignWithUseCases,
107+
BaseDto,
122108
CampaignData,
123109
MessagingUseCaseUs,
124-
SentDmServicesEndpointsCustomerApIv3ContractsRequestsCampaignsCampaignUseCaseData,
125110
TcrCampaignWithUseCases,
126111
CampaignListResponse,
127112
)

src/sent_dm/resources/profiles/profiles.py

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
profile_create_params,
1111
profile_delete_params,
1212
profile_update_params,
13-
profile_complete_setup_params,
13+
profile_complete_params,
1414
)
1515
from ..._types import Body, Omit, Query, Headers, NoneType, NotGiven, omit, not_given
1616
from ..._utils import maybe_transform, strip_not_given, async_maybe_transform
@@ -504,7 +504,7 @@ def delete(
504504
cast_to=NoneType,
505505
)
506506

507-
def complete_setup(
507+
def complete(
508508
self,
509509
profile_id: str,
510510
*,
@@ -572,7 +572,7 @@ def complete_setup(
572572
"web_hook_url": web_hook_url,
573573
"sandbox": sandbox,
574574
},
575-
profile_complete_setup_params.ProfileCompleteSetupParams,
575+
profile_complete_params.ProfileCompleteParams,
576576
),
577577
options=make_request_options(
578578
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
@@ -1045,7 +1045,7 @@ async def delete(
10451045
cast_to=NoneType,
10461046
)
10471047

1048-
async def complete_setup(
1048+
async def complete(
10491049
self,
10501050
profile_id: str,
10511051
*,
@@ -1113,7 +1113,7 @@ async def complete_setup(
11131113
"web_hook_url": web_hook_url,
11141114
"sandbox": sandbox,
11151115
},
1116-
profile_complete_setup_params.ProfileCompleteSetupParams,
1116+
profile_complete_params.ProfileCompleteParams,
11171117
),
11181118
options=make_request_options(
11191119
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
@@ -1141,8 +1141,8 @@ def __init__(self, profiles: ProfilesResource) -> None:
11411141
self.delete = to_raw_response_wrapper(
11421142
profiles.delete,
11431143
)
1144-
self.complete_setup = to_raw_response_wrapper(
1145-
profiles.complete_setup,
1144+
self.complete = to_raw_response_wrapper(
1145+
profiles.complete,
11461146
)
11471147

11481148
@cached_property
@@ -1170,8 +1170,8 @@ def __init__(self, profiles: AsyncProfilesResource) -> None:
11701170
self.delete = async_to_raw_response_wrapper(
11711171
profiles.delete,
11721172
)
1173-
self.complete_setup = async_to_raw_response_wrapper(
1174-
profiles.complete_setup,
1173+
self.complete = async_to_raw_response_wrapper(
1174+
profiles.complete,
11751175
)
11761176

11771177
@cached_property
@@ -1199,8 +1199,8 @@ def __init__(self, profiles: ProfilesResource) -> None:
11991199
self.delete = to_streamed_response_wrapper(
12001200
profiles.delete,
12011201
)
1202-
self.complete_setup = to_streamed_response_wrapper(
1203-
profiles.complete_setup,
1202+
self.complete = to_streamed_response_wrapper(
1203+
profiles.complete,
12041204
)
12051205

12061206
@cached_property
@@ -1228,8 +1228,8 @@ def __init__(self, profiles: AsyncProfilesResource) -> None:
12281228
self.delete = async_to_streamed_response_wrapper(
12291229
profiles.delete,
12301230
)
1231-
self.complete_setup = async_to_streamed_response_wrapper(
1232-
profiles.complete_setup,
1231+
self.complete = async_to_streamed_response_wrapper(
1232+
profiles.complete,
12331233
)
12341234

12351235
@cached_property

src/sent_dm/types/__init__.py

Lines changed: 2 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
from __future__ import annotations
44

5-
from .shared import BaseDto as BaseDto
65
from .api_meta import APIMeta as APIMeta
76
from .template import Template as Template
87
from .api_error import APIError as APIError
@@ -40,6 +39,7 @@
4039
from .webhook_list_response import WebhookListResponse as WebhookListResponse
4140
from .webhook_test_response import WebhookTestResponse as WebhookTestResponse
4241
from .webhook_update_params import WebhookUpdateParams as WebhookUpdateParams
42+
from .mutation_request_param import MutationRequestParam as MutationRequestParam
4343
from .number_lookup_response import NumberLookupResponse as NumberLookupResponse
4444
from .tcr_brand_relationship import TcrBrandRelationship as TcrBrandRelationship
4545
from .template_create_params import TemplateCreateParams as TemplateCreateParams
@@ -48,47 +48,19 @@
4848
from .template_update_params import TemplateUpdateParams as TemplateUpdateParams
4949
from .api_response_of_contact import APIResponseOfContact as APIResponseOfContact
5050
from .brands_brand_data_param import BrandsBrandDataParam as BrandsBrandDataParam
51+
from .profile_complete_params import ProfileCompleteParams as ProfileCompleteParams
5152
from .template_variable_param import TemplateVariableParam as TemplateVariableParam
5253
from .user_update_role_params import UserUpdateRoleParams as UserUpdateRoleParams
5354
from .destination_country_param import DestinationCountryParam as DestinationCountryParam
5455
from .template_definition_param import TemplateDefinitionParam as TemplateDefinitionParam
5556
from .billing_contact_info_param import BillingContactInfoParam as BillingContactInfoParam
5657
from .webhook_list_events_params import WebhookListEventsParams as WebhookListEventsParams
57-
from .mutation_request_base_param import MutationRequestBaseParam as MutationRequestBaseParam
5858
from .template_body_content_param import TemplateBodyContentParam as TemplateBodyContentParam
5959
from .webhook_list_events_response import WebhookListEventsResponse as WebhookListEventsResponse
6060
from .webhook_rotate_secret_params import WebhookRotateSecretParams as WebhookRotateSecretParams
6161
from .webhook_toggle_status_params import WebhookToggleStatusParams as WebhookToggleStatusParams
62-
from .profile_complete_setup_params import ProfileCompleteSetupParams as ProfileCompleteSetupParams
6362
from .api_response_of_profile_detail import APIResponseOfProfileDetail as APIResponseOfProfileDetail
6463
from .webhook_rotate_secret_response import WebhookRotateSecretResponse as WebhookRotateSecretResponse
6564
from .message_retrieve_status_response import MessageRetrieveStatusResponse as MessageRetrieveStatusResponse
6665
from .webhook_list_event_types_response import WebhookListEventTypesResponse as WebhookListEventTypesResponse
6766
from .message_retrieve_activities_response import MessageRetrieveActivitiesResponse as MessageRetrieveActivitiesResponse
68-
from .sent_dm_services_common_contracts_poc_os_template_body_param import (
69-
SentDmServicesCommonContractsPocOsTemplateBodyParam as SentDmServicesCommonContractsPocOsTemplateBodyParam,
70-
)
71-
from .sent_dm_services_common_contracts_poc_os_template_button_param import (
72-
SentDmServicesCommonContractsPocOsTemplateButtonParam as SentDmServicesCommonContractsPocOsTemplateButtonParam,
73-
)
74-
from .sent_dm_services_common_contracts_poc_os_template_footer_param import (
75-
SentDmServicesCommonContractsPocOsTemplateFooterParam as SentDmServicesCommonContractsPocOsTemplateFooterParam,
76-
)
77-
from .sent_dm_services_common_contracts_poc_os_template_header_param import (
78-
SentDmServicesCommonContractsPocOsTemplateHeaderParam as SentDmServicesCommonContractsPocOsTemplateHeaderParam,
79-
)
80-
from .sent_dm_services_common_contracts_poc_os_authentication_config_param import (
81-
SentDmServicesCommonContractsPocOsAuthenticationConfigParam as SentDmServicesCommonContractsPocOsAuthenticationConfigParam,
82-
)
83-
from .sent_dm_services_common_contracts_poc_os_template_button_props_param import (
84-
SentDmServicesCommonContractsPocOsTemplateButtonPropsParam as SentDmServicesCommonContractsPocOsTemplateButtonPropsParam,
85-
)
86-
from .sent_dm_services_endpoints_customer_ap_iv3_contracts_requests_brands_brand_contact_info_param import (
87-
SentDmServicesEndpointsCustomerApIv3ContractsRequestsBrandsBrandContactInfoParam as SentDmServicesEndpointsCustomerApIv3ContractsRequestsBrandsBrandContactInfoParam,
88-
)
89-
from .sent_dm_services_endpoints_customer_ap_iv3_contracts_requests_brands_brand_business_info_param import (
90-
SentDmServicesEndpointsCustomerApIv3ContractsRequestsBrandsBrandBusinessInfoParam as SentDmServicesEndpointsCustomerApIv3ContractsRequestsBrandsBrandBusinessInfoParam,
91-
)
92-
from .sent_dm_services_endpoints_customer_ap_iv3_contracts_requests_brands_brand_compliance_info_param import (
93-
SentDmServicesEndpointsCustomerApIv3ContractsRequestsBrandsBrandComplianceInfoParam as SentDmServicesEndpointsCustomerApIv3ContractsRequestsBrandsBrandComplianceInfoParam,
94-
)

src/sent_dm/types/brands_brand_data_param.py

Lines changed: 99 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,30 +2,114 @@
22

33
from __future__ import annotations
44

5-
from typing import Optional
6-
from typing_extensions import Required, TypedDict
5+
from typing import Iterable, Optional
6+
from typing_extensions import Literal, Required, Annotated, TypedDict
77

8-
from .sent_dm_services_endpoints_customer_ap_iv3_contracts_requests_brands_brand_contact_info_param import (
9-
SentDmServicesEndpointsCustomerApIv3ContractsRequestsBrandsBrandContactInfoParam,
10-
)
11-
from .sent_dm_services_endpoints_customer_ap_iv3_contracts_requests_brands_brand_business_info_param import (
12-
SentDmServicesEndpointsCustomerApIv3ContractsRequestsBrandsBrandBusinessInfoParam,
13-
)
14-
from .sent_dm_services_endpoints_customer_ap_iv3_contracts_requests_brands_brand_compliance_info_param import (
15-
SentDmServicesEndpointsCustomerApIv3ContractsRequestsBrandsBrandComplianceInfoParam,
16-
)
8+
from .._utils import PropertyInfo
9+
from .tcr_vertical import TcrVertical
10+
from .tcr_brand_relationship import TcrBrandRelationship
11+
from .destination_country_param import DestinationCountryParam
1712

18-
__all__ = ["BrandsBrandDataParam"]
13+
__all__ = ["BrandsBrandDataParam", "Compliance", "Contact", "Business"]
14+
15+
16+
class Compliance(TypedDict, total=False):
17+
"""Compliance and TCR information for brand registration"""
18+
19+
brand_relationship: Required[Annotated[TcrBrandRelationship, PropertyInfo(alias="brandRelationship")]]
20+
21+
vertical: Required[TcrVertical]
22+
23+
destination_countries: Annotated[
24+
Optional[Iterable[DestinationCountryParam]], PropertyInfo(alias="destinationCountries")
25+
]
26+
"""List of destination countries for messaging"""
27+
28+
expected_messaging_volume: Annotated[Optional[str], PropertyInfo(alias="expectedMessagingVolume")]
29+
"""Expected daily messaging volume"""
30+
31+
is_tcr_application: Annotated[Optional[bool], PropertyInfo(alias="isTcrApplication")]
32+
"""Whether this is a TCR (Campaign Registry) application"""
33+
34+
notes: Optional[str]
35+
"""Additional notes about the business or use case"""
36+
37+
phone_number_prefix: Annotated[Optional[str], PropertyInfo(alias="phoneNumberPrefix")]
38+
"""Phone number prefix for messaging (e.g., "+1")"""
39+
40+
primary_use_case: Annotated[Optional[str], PropertyInfo(alias="primaryUseCase")]
41+
"""Primary messaging use case description"""
42+
43+
44+
class Contact(TypedDict, total=False):
45+
"""Contact information for brand KYC"""
46+
47+
name: Required[str]
48+
"""Primary contact name (required)"""
49+
50+
business_name: Annotated[Optional[str], PropertyInfo(alias="businessName")]
51+
"""Business/brand name"""
52+
53+
email: Optional[str]
54+
"""Contact email address"""
55+
56+
phone: Optional[str]
57+
"""Contact phone number in E.164 format"""
58+
59+
phone_country_code: Annotated[Optional[str], PropertyInfo(alias="phoneCountryCode")]
60+
"""Contact phone country code (e.g., "1" for US)"""
61+
62+
role: Optional[str]
63+
"""Contact's role in the business"""
64+
65+
66+
class Business(TypedDict, total=False):
67+
"""Business details and address for brand KYC"""
68+
69+
city: Optional[str]
70+
"""City"""
71+
72+
country: Optional[str]
73+
"""Country code (e.g., US, CA)"""
74+
75+
country_of_registration: Annotated[Optional[str], PropertyInfo(alias="countryOfRegistration")]
76+
"""Country where the business is registered"""
77+
78+
entity_type: Annotated[
79+
Optional[Literal["PRIVATE_PROFIT", "PUBLIC_PROFIT", "NON_PROFIT", "SOLE_PROPRIETOR", "GOVERNMENT"]],
80+
PropertyInfo(alias="entityType"),
81+
]
82+
83+
legal_name: Annotated[Optional[str], PropertyInfo(alias="legalName")]
84+
"""Legal business name"""
85+
86+
postal_code: Annotated[Optional[str], PropertyInfo(alias="postalCode")]
87+
"""Postal/ZIP code"""
88+
89+
state: Optional[str]
90+
"""State/province code"""
91+
92+
street: Optional[str]
93+
"""Street address"""
94+
95+
tax_id: Annotated[Optional[str], PropertyInfo(alias="taxId")]
96+
"""Tax ID/EIN number"""
97+
98+
tax_id_type: Annotated[Optional[str], PropertyInfo(alias="taxIdType")]
99+
"""Type of tax ID (e.g., us_ein, ca_bn)"""
100+
101+
url: Optional[str]
102+
"""Business website URL"""
19103

20104

21105
class BrandsBrandDataParam(TypedDict, total=False):
22106
"""Brand and KYC data grouped into contact, business, and compliance sections"""
23107

24-
compliance: Required[SentDmServicesEndpointsCustomerApIv3ContractsRequestsBrandsBrandComplianceInfoParam]
108+
compliance: Required[Compliance]
25109
"""Compliance and TCR information for brand registration"""
26110

27-
contact: Required[SentDmServicesEndpointsCustomerApIv3ContractsRequestsBrandsBrandContactInfoParam]
111+
contact: Required[Contact]
28112
"""Contact information for brand KYC"""
29113

30-
business: Optional[SentDmServicesEndpointsCustomerApIv3ContractsRequestsBrandsBrandBusinessInfoParam]
114+
business: Optional[Business]
31115
"""Business details and address for brand KYC"""

src/sent_dm/types/contact_delete_params.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
from typing_extensions import Required, Annotated, TypedDict
66

77
from .._utils import PropertyInfo
8-
from .mutation_request_base_param import MutationRequestBaseParam
8+
from .mutation_request_param import MutationRequestParam
99

1010
__all__ = ["ContactDeleteParams", "Body"]
1111

@@ -17,7 +17,7 @@ class ContactDeleteParams(TypedDict, total=False):
1717
x_profile_id: Annotated[str, PropertyInfo(alias="x-profile-id")]
1818

1919

20-
class Body(MutationRequestBaseParam, total=False):
20+
class Body(MutationRequestParam, total=False):
2121
"""Request to delete/dissociate a contact"""
2222

2323
pass

src/sent_dm/types/mutation_request_base_param.py renamed to src/sent_dm/types/mutation_request_param.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44

55
from typing_extensions import TypedDict
66

7-
__all__ = ["MutationRequestBaseParam"]
7+
__all__ = ["MutationRequestParam"]
88

99

10-
class MutationRequestBaseParam(TypedDict, total=False):
10+
class MutationRequestParam(TypedDict, total=False):
1111
sandbox: bool
1212
"""
1313
Sandbox flag - when true, the operation is simulated without side effects Useful

src/sent_dm/types/profile_complete_setup_params.py renamed to src/sent_dm/types/profile_complete_params.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@
66

77
from .._utils import PropertyInfo
88

9-
__all__ = ["ProfileCompleteSetupParams"]
9+
__all__ = ["ProfileCompleteParams"]
1010

1111

12-
class ProfileCompleteSetupParams(TypedDict, total=False):
12+
class ProfileCompleteParams(TypedDict, total=False):
1313
web_hook_url: Required[Annotated[str, PropertyInfo(alias="webHookUrl")]]
1414
"""Webhook URL to call when profile completion finishes (success or failure)"""
1515

0 commit comments

Comments
 (0)