Skip to content

Commit 156ebba

Browse files
committed
chore: rebuild project due to oas spec rename
1 parent be23c16 commit 156ebba

30 files changed

+446
-249
lines changed

.stats.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
configured_endpoints: 15
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/sent%2Fsent-94f0693a4293af6f8efd912cb33a4fcfa06a7081476538c85c6f173d48624dc0.yml
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/sent%2Fsent-c9d92a0fa493f6b395ed47349958d3113592b3f068bb9618547aaa75ea052eab.yml

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ It is generated with [Stainless](https://www.stainlessapi.com/).
1010

1111
## Documentation
1212

13-
The REST API documentation can be found on [www.sent.dm](https://www.sent.dm/docs). The full API of this library can be found in [api.md](api.md).
13+
The REST API documentation can be found on [sent.dm](https://sent.dm). The full API of this library can be found in [api.md](api.md).
1414

1515
## Installation
1616

SECURITY.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ or products provided by Sent please follow the respective company's security rep
2020

2121
### Sent Terms and Policies
2222

23-
Please contact team@sent.dm for any questions or concerns regarding security of our services.
23+
Please contact team@sent.com for any questions or concerns regarding security of our services.
2424

2525
---
2626

api.md

+18-12
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,15 @@
1+
# Shared Types
2+
3+
```python
4+
from sent.types import Contact
5+
```
6+
17
# Contacts
28

39
Types:
410

511
```python
6-
from sent.types import SentDmServicesContractsDataContactDto, ContactListResponse
12+
from sent.types import ContactListResponse
713
```
814

915
Methods:
@@ -14,13 +20,13 @@ Methods:
1420

1521
Methods:
1622

17-
- <code title="get /contacts/{customerId}/id/{id}">client.contacts.id.<a href="./src/sent/resources/contacts/id.py">retrieve</a>(id, \*, customer_id) -> <a href="./src/sent/types/sent_dm_services_contracts_data_contact_dto.py">SentDmServicesContractsDataContactDto</a></code>
23+
- <code title="get /contact/{customerId}/id/{id}">client.contacts.id.<a href="./src/sent/resources/contacts/id.py">retrieve</a>(id, \*, customer_id) -> <a href="./src/sent/types/shared/contact.py">Contact</a></code>
1824

1925
## Phone
2026

2127
Methods:
2228

23-
- <code title="get /contacts/{customerId}/phone/{phoneNumber}">client.contacts.phone.<a href="./src/sent/resources/contacts/phone.py">retrieve</a>(phone_number, \*, customer_id) -> <a href="./src/sent/types/sent_dm_services_contracts_data_contact_dto.py">SentDmServicesContractsDataContactDto</a></code>
29+
- <code title="get /contact/{customerId}/phone/{phoneNumber}">client.contacts.phone.<a href="./src/sent/resources/contacts/phone.py">retrieve</a>(phone_number, \*, customer_id) -> <a href="./src/sent/types/shared/contact.py">Contact</a></code>
2430

2531
# Messages
2632

@@ -40,32 +46,32 @@ Methods:
4046
Types:
4147

4248
```python
43-
from sent.types import SentDmServicesContractsDataSMSPayloadDto
49+
from sent.types import SMSPayload
4450
```
4551

4652
Methods:
4753

48-
- <code title="get /sms">client.sms.<a href="./src/sent/resources/sms.py">list</a>(\*\*<a href="src/sent/types/sms_list_params.py">params</a>) -> <a href="./src/sent/types/sent_dm_services_contracts_data_sms_payload_dto.py">SentDmServicesContractsDataSMSPayloadDto</a></code>
54+
- <code title="get /sms">client.sms.<a href="./src/sent/resources/sms.py">list</a>(\*\*<a href="src/sent/types/sms_list_params.py">params</a>) -> <a href="./src/sent/types/sms_payload.py">SMSPayload</a></code>
4955

5056
# Whatsapp
5157

5258
Types:
5359

5460
```python
55-
from sent.types import SentDmServicesContractsDataWhatsappPayloadDto
61+
from sent.types import WhatsappPayload
5662
```
5763

5864
Methods:
5965

60-
- <code title="get /whatsapp">client.whatsapp.<a href="./src/sent/resources/whatsapp.py">list</a>(\*\*<a href="src/sent/types/whatsapp_list_params.py">params</a>) -> <a href="./src/sent/types/sent_dm_services_contracts_data_whatsapp_payload_dto.py">SentDmServicesContractsDataWhatsappPayloadDto</a></code>
66+
- <code title="get /whatsapp">client.whatsapp.<a href="./src/sent/resources/whatsapp.py">list</a>(\*\*<a href="src/sent/types/whatsapp_list_params.py">params</a>) -> <a href="./src/sent/types/whatsapp_payload.py">WhatsappPayload</a></code>
6167

6268
# Templates
6369

6470
Types:
6571

6672
```python
6773
from sent.types import (
68-
SentDmServicesContractsResponsesTemplateResponse,
74+
TemplateResponse,
6975
TemplateCreateResponse,
7076
TemplateUpdateResponse,
7177
TemplateListResponse,
@@ -76,7 +82,7 @@ from sent.types import (
7682
Methods:
7783

7884
- <code title="post /templates">client.templates.<a href="./src/sent/resources/templates.py">create</a>(\*\*<a href="src/sent/types/template_create_params.py">params</a>) -> <a href="./src/sent/types/template_create_response.py">object</a></code>
79-
- <code title="get /templates/{customerId}/{id}">client.templates.<a href="./src/sent/resources/templates.py">retrieve</a>(id, \*, customer_id) -> <a href="./src/sent/types/sent_dm_services_contracts_responses_template_response.py">SentDmServicesContractsResponsesTemplateResponse</a></code>
85+
- <code title="get /templates/{customerId}/{id}">client.templates.<a href="./src/sent/resources/templates.py">retrieve</a>(id, \*, customer_id) -> <a href="./src/sent/types/template_response.py">TemplateResponse</a></code>
8086
- <code title="put /templates/{id}">client.templates.<a href="./src/sent/resources/templates.py">update</a>(id, \*\*<a href="src/sent/types/template_update_params.py">params</a>) -> <a href="./src/sent/types/template_update_response.py">object</a></code>
8187
- <code title="get /templates">client.templates.<a href="./src/sent/resources/templates.py">list</a>(\*\*<a href="src/sent/types/template_list_params.py">params</a>) -> <a href="./src/sent/types/template_list_response.py">TemplateListResponse</a></code>
8288
- <code title="delete /templates/{customerId}/{id}">client.templates.<a href="./src/sent/resources/templates.py">delete</a>(id, \*, customer_id) -> <a href="./src/sent/types/template_delete_response.py">object</a></code>
@@ -86,11 +92,11 @@ Methods:
8692
Types:
8793

8894
```python
89-
from sent.types import SentDmServicesContractsDataCustomerDto, CustomerDeleteResponse
95+
from sent.types import Customer, CustomerDeleteResponse
9096
```
9197

9298
Methods:
9399

94-
- <code title="get /customers/{id}">client.customers.<a href="./src/sent/resources/customers.py">retrieve</a>(id) -> <a href="./src/sent/types/sent_dm_services_contracts_data_customer_dto.py">SentDmServicesContractsDataCustomerDto</a></code>
95-
- <code title="put /customers/{id}">client.customers.<a href="./src/sent/resources/customers.py">update</a>(id, \*\*<a href="src/sent/types/customer_update_params.py">params</a>) -> <a href="./src/sent/types/sent_dm_services_contracts_data_customer_dto.py">SentDmServicesContractsDataCustomerDto</a></code>
100+
- <code title="get /customers/{id}">client.customers.<a href="./src/sent/resources/customers.py">retrieve</a>(id) -> <a href="./src/sent/types/customer.py">Customer</a></code>
101+
- <code title="put /customers/{id}">client.customers.<a href="./src/sent/resources/customers.py">update</a>(id, \*\*<a href="src/sent/types/customer_update_params.py">params</a>) -> <a href="./src/sent/types/customer.py">Customer</a></code>
96102
- <code title="delete /customers/{id}">client.customers.<a href="./src/sent/resources/customers.py">delete</a>(id) -> <a href="./src/sent/types/customer_delete_response.py">object</a></code>

pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description = "The official Python library for the Sent API"
55
dynamic = ["readme"]
66
license = "Apache-2.0"
77
authors = [
8-
{ name = "Sent", email = "team@sent.dm" },
8+
{ name = "Sent", email = "team@sent.com" },
99
]
1010
dependencies = [
1111
"httpx>=0.23.0, <1",

src/sent/_client.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ def __init__(
9696
if base_url is None:
9797
base_url = os.environ.get("SENT_BASE_URL")
9898
if base_url is None:
99-
base_url = f"https://api.sent.dm"
99+
base_url = f"https://sent.dm"
100100

101101
super().__init__(
102102
version=__version__,
@@ -274,7 +274,7 @@ def __init__(
274274
if base_url is None:
275275
base_url = os.environ.get("SENT_BASE_URL")
276276
if base_url is None:
277-
base_url = f"https://api.sent.dm"
277+
base_url = f"https://sent.dm"
278278

279279
super().__init__(
280280
version=__version__,

src/sent/resources/contacts/id.py

+7-7
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
async_to_streamed_response_wrapper,
1515
)
1616
from ..._base_client import make_request_options
17-
from ...types.sent_dm_services_contracts_data_contact_dto import SentDmServicesContractsDataContactDto
17+
from ...types.shared.contact import Contact
1818

1919
__all__ = ["IDResource", "AsyncIDResource"]
2020

@@ -50,7 +50,7 @@ def retrieve(
5050
extra_query: Query | None = None,
5151
extra_body: Body | None = None,
5252
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
53-
) -> SentDmServicesContractsDataContactDto:
53+
) -> Contact:
5454
"""
5555
Args:
5656
extra_headers: Send extra headers
@@ -66,11 +66,11 @@ def retrieve(
6666
if not id:
6767
raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
6868
return self._get(
69-
f"/contacts/{customer_id}/id/{id}",
69+
f"/contact/{customer_id}/id/{id}",
7070
options=make_request_options(
7171
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
7272
),
73-
cast_to=SentDmServicesContractsDataContactDto,
73+
cast_to=Contact,
7474
)
7575

7676

@@ -105,7 +105,7 @@ async def retrieve(
105105
extra_query: Query | None = None,
106106
extra_body: Body | None = None,
107107
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
108-
) -> SentDmServicesContractsDataContactDto:
108+
) -> Contact:
109109
"""
110110
Args:
111111
extra_headers: Send extra headers
@@ -121,11 +121,11 @@ async def retrieve(
121121
if not id:
122122
raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
123123
return await self._get(
124-
f"/contacts/{customer_id}/id/{id}",
124+
f"/contact/{customer_id}/id/{id}",
125125
options=make_request_options(
126126
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
127127
),
128-
cast_to=SentDmServicesContractsDataContactDto,
128+
cast_to=Contact,
129129
)
130130

131131

src/sent/resources/contacts/phone.py

+7-7
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
async_to_streamed_response_wrapper,
1515
)
1616
from ..._base_client import make_request_options
17-
from ...types.sent_dm_services_contracts_data_contact_dto import SentDmServicesContractsDataContactDto
17+
from ...types.shared.contact import Contact
1818

1919
__all__ = ["PhoneResource", "AsyncPhoneResource"]
2020

@@ -50,7 +50,7 @@ def retrieve(
5050
extra_query: Query | None = None,
5151
extra_body: Body | None = None,
5252
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
53-
) -> SentDmServicesContractsDataContactDto:
53+
) -> Contact:
5454
"""
5555
Args:
5656
extra_headers: Send extra headers
@@ -66,11 +66,11 @@ def retrieve(
6666
if not phone_number:
6767
raise ValueError(f"Expected a non-empty value for `phone_number` but received {phone_number!r}")
6868
return self._get(
69-
f"/contacts/{customer_id}/phone/{phone_number}",
69+
f"/contact/{customer_id}/phone/{phone_number}",
7070
options=make_request_options(
7171
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
7272
),
73-
cast_to=SentDmServicesContractsDataContactDto,
73+
cast_to=Contact,
7474
)
7575

7676

@@ -105,7 +105,7 @@ async def retrieve(
105105
extra_query: Query | None = None,
106106
extra_body: Body | None = None,
107107
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
108-
) -> SentDmServicesContractsDataContactDto:
108+
) -> Contact:
109109
"""
110110
Args:
111111
extra_headers: Send extra headers
@@ -121,11 +121,11 @@ async def retrieve(
121121
if not phone_number:
122122
raise ValueError(f"Expected a non-empty value for `phone_number` but received {phone_number!r}")
123123
return await self._get(
124-
f"/contacts/{customer_id}/phone/{phone_number}",
124+
f"/contact/{customer_id}/phone/{phone_number}",
125125
options=make_request_options(
126126
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
127127
),
128-
cast_to=SentDmServicesContractsDataContactDto,
128+
cast_to=Contact,
129129
)
130130

131131

src/sent/resources/customers.py

+13-13
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
import httpx
66

7-
from ..types import SentDmServicesContractsDataCustomerDto, customer_update_params
7+
from ..types import Customer, customer_update_params
88
from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven
99
from .._utils import (
1010
maybe_transform,
@@ -19,8 +19,8 @@
1919
async_to_streamed_response_wrapper,
2020
)
2121
from .._base_client import make_request_options
22-
from ..types.sent_dm_services_contracts_data_customer_dto import SentDmServicesContractsDataCustomerDto
23-
from ..types.sent_dm_services_contracts_data_customer_dto_param import SentDmServicesContractsDataCustomerDtoParam
22+
from ..types.customer import Customer
23+
from ..types.customer_param import CustomerParam
2424

2525
__all__ = ["CustomersResource", "AsyncCustomersResource"]
2626

@@ -55,7 +55,7 @@ def retrieve(
5555
extra_query: Query | None = None,
5656
extra_body: Body | None = None,
5757
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
58-
) -> SentDmServicesContractsDataCustomerDto:
58+
) -> Customer:
5959
"""
6060
Args:
6161
extra_headers: Send extra headers
@@ -73,21 +73,21 @@ def retrieve(
7373
options=make_request_options(
7474
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
7575
),
76-
cast_to=SentDmServicesContractsDataCustomerDto,
76+
cast_to=Customer,
7777
)
7878

7979
def update(
8080
self,
8181
id: str,
8282
*,
83-
customer: SentDmServicesContractsDataCustomerDtoParam | NotGiven = NOT_GIVEN,
83+
customer: CustomerParam | NotGiven = NOT_GIVEN,
8484
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
8585
# The extra values given here take precedence over values defined on the client or passed to this method.
8686
extra_headers: Headers | None = None,
8787
extra_query: Query | None = None,
8888
extra_body: Body | None = None,
8989
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
90-
) -> SentDmServicesContractsDataCustomerDto:
90+
) -> Customer:
9191
"""
9292
Args:
9393
extra_headers: Send extra headers
@@ -106,7 +106,7 @@ def update(
106106
options=make_request_options(
107107
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
108108
),
109-
cast_to=SentDmServicesContractsDataCustomerDto,
109+
cast_to=Customer,
110110
)
111111

112112
def delete(
@@ -171,7 +171,7 @@ async def retrieve(
171171
extra_query: Query | None = None,
172172
extra_body: Body | None = None,
173173
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
174-
) -> SentDmServicesContractsDataCustomerDto:
174+
) -> Customer:
175175
"""
176176
Args:
177177
extra_headers: Send extra headers
@@ -189,21 +189,21 @@ async def retrieve(
189189
options=make_request_options(
190190
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
191191
),
192-
cast_to=SentDmServicesContractsDataCustomerDto,
192+
cast_to=Customer,
193193
)
194194

195195
async def update(
196196
self,
197197
id: str,
198198
*,
199-
customer: SentDmServicesContractsDataCustomerDtoParam | NotGiven = NOT_GIVEN,
199+
customer: CustomerParam | NotGiven = NOT_GIVEN,
200200
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
201201
# The extra values given here take precedence over values defined on the client or passed to this method.
202202
extra_headers: Headers | None = None,
203203
extra_query: Query | None = None,
204204
extra_body: Body | None = None,
205205
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
206-
) -> SentDmServicesContractsDataCustomerDto:
206+
) -> Customer:
207207
"""
208208
Args:
209209
extra_headers: Send extra headers
@@ -222,7 +222,7 @@ async def update(
222222
options=make_request_options(
223223
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
224224
),
225-
cast_to=SentDmServicesContractsDataCustomerDto,
225+
cast_to=Customer,
226226
)
227227

228228
async def delete(

0 commit comments

Comments
 (0)