Skip to content

Commit 515105e

Browse files
release: 3.1.0-alpha (#94)
* chore: update github action * codegen metadata * codegen metadata * feat: AISWE-429: Upgrade porting customer_service_record OpenAPI to 3.1 with Standard Webhooks * codegen metadata * codegen metadata * feat: port-4315: add filter by country code * chore(internal): change ci workflow machines * feat(api): rename Error to MessagesError * feat: AISWE-429: Upgrade messaging 10dlc OpenAPI to 3.1 with Standard Webhooks * feat: AISWE-429: Upgrade messaging messaging OpenAPI to 3.1 with Standard Webhooks * feat: AISWE-429: Upgrade programmable-fax programmable-fax OpenAPI to 3.1 with Standard Webhooks * feat: port-4315: add country_code filter to description * feat: AISWE-429: Upgrade call-control call-control OpenAPI to 3.1 with Standard Webhooks * fix: avoid newer type syntax * chore(internal): update pyright exclude list * feat: NUM-6108: Update Advanced Order API reference to include requirement_groups * feat: AISWE-429: Upgrade numbers numbers OpenAPI to 3.1 with Standard Webhooks * release: 3.1.0-alpha --------- Co-authored-by: stainless-app[bot] <142633134+stainless-app[bot]@users.noreply.github.com>
1 parent 11dcec9 commit 515105e

26 files changed

Lines changed: 781 additions & 452 deletions

.github/workflows/ci.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,13 @@ jobs:
3636
run: ./scripts/lint
3737

3838
build:
39-
if: github.repository == 'stainless-sdks/telnyx-python' && (github.event_name == 'push' || github.event.pull_request.head.repo.fork)
39+
if: github.event_name == 'push' || github.event.pull_request.head.repo.fork
4040
timeout-minutes: 10
4141
name: build
4242
permissions:
4343
contents: read
4444
id-token: write
45-
runs-on: depot-ubuntu-24.04
45+
runs-on: ${{ github.repository == 'stainless-sdks/telnyx-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
4646
steps:
4747
- uses: actions/checkout@v4
4848

@@ -61,12 +61,14 @@ jobs:
6161
run: rye build
6262

6363
- name: Get GitHub OIDC Token
64+
if: github.repository == 'stainless-sdks/telnyx-python'
6465
id: github-oidc
6566
uses: actions/github-script@v6
6667
with:
6768
script: core.setOutput('github_token', await core.getIDToken());
6869

6970
- name: Upload tarball
71+
if: github.repository == 'stainless-sdks/telnyx-python'
7072
env:
7173
URL: https://pkg.stainless.com/s
7274
AUTH: ${{ steps.github-oidc.outputs.github_token }}

.release-please-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "3.0.0-alpha"
2+
".": "3.1.0-alpha"
33
}

.stats.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
configured_endpoints: 799
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/telnyx%2Ftelnyx-66f54879a0b9030d7c537924e1d2ea96445b49d214254da567e15293d2363d41.yml
3-
openapi_spec_hash: 3fe88315a74c8d3e044b8ae32ffe931e
4-
config_hash: cfebf6bd2ce8bd116d0eedc0d4a600f0
1+
configured_endpoints: 800
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/telnyx%2Ftelnyx-40a540682e7307b506c6d48ed7fc93b2751075b37276bbf6d1871415abc701a4.yml
3+
openapi_spec_hash: 2d2c92c05002d51217cb901152d4439a
4+
config_hash: 042e8a6e781fd484663a6c2142daaae5

CHANGELOG.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,34 @@
11
# Changelog
22

3+
## 3.1.0-alpha (2025-08-27)
4+
5+
Full Changelog: [v3.0.0-alpha...v3.1.0-alpha](https://github.com/team-telnyx/telnyx-python/compare/v3.0.0-alpha...v3.1.0-alpha)
6+
7+
### Features
8+
9+
* AISWE-429: Upgrade call-control call-control OpenAPI to 3.1 with Standard Webhooks ([c6498e6](https://github.com/team-telnyx/telnyx-python/commit/c6498e6e628c19175191de0092ba897c69318d0d))
10+
* AISWE-429: Upgrade messaging 10dlc OpenAPI to 3.1 with Standard Webhooks ([e0cf35f](https://github.com/team-telnyx/telnyx-python/commit/e0cf35f4d12d8f24e26dab02909e238c02d22465))
11+
* AISWE-429: Upgrade messaging messaging OpenAPI to 3.1 with Standard Webhooks ([c005985](https://github.com/team-telnyx/telnyx-python/commit/c005985aaacf9a41cf889bf15e6eb40d1a773e44))
12+
* AISWE-429: Upgrade numbers numbers OpenAPI to 3.1 with Standard Webhooks ([9448fc5](https://github.com/team-telnyx/telnyx-python/commit/9448fc586b6de3896cfacc01f4153650c3cd0d2b))
13+
* AISWE-429: Upgrade porting customer_service_record OpenAPI to 3.1 with Standard Webhooks ([ea07f5c](https://github.com/team-telnyx/telnyx-python/commit/ea07f5c8688b990d4890f28e377ec20074993ace))
14+
* AISWE-429: Upgrade programmable-fax programmable-fax OpenAPI to 3.1 with Standard Webhooks ([0ce7e38](https://github.com/team-telnyx/telnyx-python/commit/0ce7e38f1a87f45e1a60570322bae101b8646286))
15+
* **api:** rename Error to MessagesError ([ac58be4](https://github.com/team-telnyx/telnyx-python/commit/ac58be4181157fce47ac0bbc077dc2f0b73985e8))
16+
* NUM-6108: Update Advanced Order API reference to include requirement_groups ([d0cc66f](https://github.com/team-telnyx/telnyx-python/commit/d0cc66f4a4faa41a557cf3b27d30f465f724dcd4))
17+
* port-4315: add country_code filter to description ([7f7b678](https://github.com/team-telnyx/telnyx-python/commit/7f7b678b435cab29addaaff865275d9d0f0ffed7))
18+
* port-4315: add filter by country code ([920c561](https://github.com/team-telnyx/telnyx-python/commit/920c561527177a01119fb4c542227d2cfff02998))
19+
20+
21+
### Bug Fixes
22+
23+
* avoid newer type syntax ([1f4d346](https://github.com/team-telnyx/telnyx-python/commit/1f4d346115cbe1f985e9f711716d47c891487440))
24+
25+
26+
### Chores
27+
28+
* **internal:** change ci workflow machines ([c87408f](https://github.com/team-telnyx/telnyx-python/commit/c87408f180f76257a61fcbfc173d3ddc1890be8d))
29+
* **internal:** update pyright exclude list ([4863f67](https://github.com/team-telnyx/telnyx-python/commit/4863f67905e609ceb919323d86802c69bad660f8))
30+
* update github action ([f445c07](https://github.com/team-telnyx/telnyx-python/commit/f445c07c8a4e60a8c61b24925f0545b0bdd8f074))
31+
332
## 3.0.0-alpha (2025-08-18)
433

534
Full Changelog: [v0.0.1...v3.0.0-alpha](https://github.com/team-telnyx/telnyx-python/compare/v0.0.1...v3.0.0-alpha)

api.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,7 @@ Methods:
134134

135135
- <code title="post /advanced_orders">client.advanced_orders.<a href="./src/telnyx/resources/advanced_orders.py">create</a>(\*\*<a href="src/telnyx/types/advanced_order_create_params.py">params</a>) -> object</code>
136136
- <code title="get /advanced_orders/{order_id}">client.advanced_orders.<a href="./src/telnyx/resources/advanced_orders.py">retrieve</a>(order_id) -> object</code>
137+
- <code title="patch /advanced_orders/{order_id}">client.advanced_orders.<a href="./src/telnyx/resources/advanced_orders.py">update</a>(order_id, \*\*<a href="src/telnyx/types/advanced_order_update_params.py">params</a>) -> object</code>
137138
- <code title="get /advanced_orders">client.advanced_orders.<a href="./src/telnyx/resources/advanced_orders.py">list</a>() -> object</code>
138139

139140
# AI

pyproject.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "telnyx"
3-
version = "3.0.0-alpha"
3+
version = "3.1.0-alpha"
44
description = "The official Python library for the telnyx API"
55
dynamic = ["readme"]
66
license = "MIT"
@@ -148,6 +148,7 @@ exclude = [
148148
"_dev",
149149
".venv",
150150
".nox",
151+
".git",
151152
]
152153

153154
reportImplicitOverride = true

src/telnyx/_models.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ def model_dump(
304304
exclude_none=exclude_none,
305305
)
306306

307-
return cast(dict[str, Any], json_safe(dumped)) if mode == "json" else dumped
307+
return cast("dict[str, Any]", json_safe(dumped)) if mode == "json" else dumped
308308

309309
@override
310310
def model_dump_json(

src/telnyx/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

33
__title__ = "telnyx"
4-
__version__ = "3.0.0-alpha" # x-release-please-version
4+
__version__ = "3.1.0-alpha" # x-release-please-version

src/telnyx/resources/advanced_orders.py

Lines changed: 135 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
import httpx
99

10-
from ..types import advanced_order_create_params
10+
from ..types import advanced_order_create_params, advanced_order_update_params
1111
from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven
1212
from .._utils import maybe_transform, async_maybe_transform
1313
from .._compat import cached_property
@@ -54,6 +54,7 @@ def create(
5454
phone_number_type: Literal["local", "mobile", "toll_free", "shared_cost", "national", "landline"]
5555
| NotGiven = NOT_GIVEN,
5656
quantity: int | NotGiven = NOT_GIVEN,
57+
requirement_group_id: str | NotGiven = NOT_GIVEN,
5758
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
5859
# The extra values given here take precedence over values defined on the client or passed to this method.
5960
extra_headers: Headers | None = None,
@@ -65,6 +66,8 @@ def create(
6566
Create Advanced Order
6667
6768
Args:
69+
requirement_group_id: The ID of the requirement group to associate with this advanced order
70+
6871
extra_headers: Send extra headers
6972
7073
extra_query: Add additional query parameters to the request
@@ -84,6 +87,7 @@ def create(
8487
"features": features,
8588
"phone_number_type": phone_number_type,
8689
"quantity": quantity,
90+
"requirement_group_id": requirement_group_id,
8791
},
8892
advanced_order_create_params.AdvancedOrderCreateParams,
8993
),
@@ -126,6 +130,63 @@ def retrieve(
126130
cast_to=object,
127131
)
128132

133+
def update(
134+
self,
135+
order_id: str,
136+
*,
137+
area_code: str | NotGiven = NOT_GIVEN,
138+
comments: str | NotGiven = NOT_GIVEN,
139+
country_code: str | NotGiven = NOT_GIVEN,
140+
customer_reference: str | NotGiven = NOT_GIVEN,
141+
features: List[Literal["sms", "mms", "voice", "fax", "emergency"]] | NotGiven = NOT_GIVEN,
142+
phone_number_type: Literal["local", "mobile", "toll_free", "shared_cost", "national", "landline"]
143+
| NotGiven = NOT_GIVEN,
144+
quantity: int | NotGiven = NOT_GIVEN,
145+
requirement_group_id: str | NotGiven = NOT_GIVEN,
146+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
147+
# The extra values given here take precedence over values defined on the client or passed to this method.
148+
extra_headers: Headers | None = None,
149+
extra_query: Query | None = None,
150+
extra_body: Body | None = None,
151+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
152+
) -> object:
153+
"""
154+
Update Advanced Order
155+
156+
Args:
157+
requirement_group_id: The ID of the requirement group to associate with this advanced order
158+
159+
extra_headers: Send extra headers
160+
161+
extra_query: Add additional query parameters to the request
162+
163+
extra_body: Add additional JSON properties to the request
164+
165+
timeout: Override the client-level default timeout for this request, in seconds
166+
"""
167+
if not order_id:
168+
raise ValueError(f"Expected a non-empty value for `order_id` but received {order_id!r}")
169+
return self._patch(
170+
f"/advanced_orders/{order_id}",
171+
body=maybe_transform(
172+
{
173+
"area_code": area_code,
174+
"comments": comments,
175+
"country_code": country_code,
176+
"customer_reference": customer_reference,
177+
"features": features,
178+
"phone_number_type": phone_number_type,
179+
"quantity": quantity,
180+
"requirement_group_id": requirement_group_id,
181+
},
182+
advanced_order_update_params.AdvancedOrderUpdateParams,
183+
),
184+
options=make_request_options(
185+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
186+
),
187+
cast_to=object,
188+
)
189+
129190
def list(
130191
self,
131192
*,
@@ -177,6 +238,7 @@ async def create(
177238
phone_number_type: Literal["local", "mobile", "toll_free", "shared_cost", "national", "landline"]
178239
| NotGiven = NOT_GIVEN,
179240
quantity: int | NotGiven = NOT_GIVEN,
241+
requirement_group_id: str | NotGiven = NOT_GIVEN,
180242
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
181243
# The extra values given here take precedence over values defined on the client or passed to this method.
182244
extra_headers: Headers | None = None,
@@ -188,6 +250,8 @@ async def create(
188250
Create Advanced Order
189251
190252
Args:
253+
requirement_group_id: The ID of the requirement group to associate with this advanced order
254+
191255
extra_headers: Send extra headers
192256
193257
extra_query: Add additional query parameters to the request
@@ -207,6 +271,7 @@ async def create(
207271
"features": features,
208272
"phone_number_type": phone_number_type,
209273
"quantity": quantity,
274+
"requirement_group_id": requirement_group_id,
210275
},
211276
advanced_order_create_params.AdvancedOrderCreateParams,
212277
),
@@ -249,6 +314,63 @@ async def retrieve(
249314
cast_to=object,
250315
)
251316

317+
async def update(
318+
self,
319+
order_id: str,
320+
*,
321+
area_code: str | NotGiven = NOT_GIVEN,
322+
comments: str | NotGiven = NOT_GIVEN,
323+
country_code: str | NotGiven = NOT_GIVEN,
324+
customer_reference: str | NotGiven = NOT_GIVEN,
325+
features: List[Literal["sms", "mms", "voice", "fax", "emergency"]] | NotGiven = NOT_GIVEN,
326+
phone_number_type: Literal["local", "mobile", "toll_free", "shared_cost", "national", "landline"]
327+
| NotGiven = NOT_GIVEN,
328+
quantity: int | NotGiven = NOT_GIVEN,
329+
requirement_group_id: str | NotGiven = NOT_GIVEN,
330+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
331+
# The extra values given here take precedence over values defined on the client or passed to this method.
332+
extra_headers: Headers | None = None,
333+
extra_query: Query | None = None,
334+
extra_body: Body | None = None,
335+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
336+
) -> object:
337+
"""
338+
Update Advanced Order
339+
340+
Args:
341+
requirement_group_id: The ID of the requirement group to associate with this advanced order
342+
343+
extra_headers: Send extra headers
344+
345+
extra_query: Add additional query parameters to the request
346+
347+
extra_body: Add additional JSON properties to the request
348+
349+
timeout: Override the client-level default timeout for this request, in seconds
350+
"""
351+
if not order_id:
352+
raise ValueError(f"Expected a non-empty value for `order_id` but received {order_id!r}")
353+
return await self._patch(
354+
f"/advanced_orders/{order_id}",
355+
body=await async_maybe_transform(
356+
{
357+
"area_code": area_code,
358+
"comments": comments,
359+
"country_code": country_code,
360+
"customer_reference": customer_reference,
361+
"features": features,
362+
"phone_number_type": phone_number_type,
363+
"quantity": quantity,
364+
"requirement_group_id": requirement_group_id,
365+
},
366+
advanced_order_update_params.AdvancedOrderUpdateParams,
367+
),
368+
options=make_request_options(
369+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
370+
),
371+
cast_to=object,
372+
)
373+
252374
async def list(
253375
self,
254376
*,
@@ -279,6 +401,9 @@ def __init__(self, advanced_orders: AdvancedOrdersResource) -> None:
279401
self.retrieve = to_raw_response_wrapper(
280402
advanced_orders.retrieve,
281403
)
404+
self.update = to_raw_response_wrapper(
405+
advanced_orders.update,
406+
)
282407
self.list = to_raw_response_wrapper(
283408
advanced_orders.list,
284409
)
@@ -294,6 +419,9 @@ def __init__(self, advanced_orders: AsyncAdvancedOrdersResource) -> None:
294419
self.retrieve = async_to_raw_response_wrapper(
295420
advanced_orders.retrieve,
296421
)
422+
self.update = async_to_raw_response_wrapper(
423+
advanced_orders.update,
424+
)
297425
self.list = async_to_raw_response_wrapper(
298426
advanced_orders.list,
299427
)
@@ -309,6 +437,9 @@ def __init__(self, advanced_orders: AdvancedOrdersResource) -> None:
309437
self.retrieve = to_streamed_response_wrapper(
310438
advanced_orders.retrieve,
311439
)
440+
self.update = to_streamed_response_wrapper(
441+
advanced_orders.update,
442+
)
312443
self.list = to_streamed_response_wrapper(
313444
advanced_orders.list,
314445
)
@@ -324,6 +455,9 @@ def __init__(self, advanced_orders: AsyncAdvancedOrdersResource) -> None:
324455
self.retrieve = async_to_streamed_response_wrapper(
325456
advanced_orders.retrieve,
326457
)
458+
self.update = async_to_streamed_response_wrapper(
459+
advanced_orders.update,
460+
)
327461
self.list = async_to_streamed_response_wrapper(
328462
advanced_orders.list,
329463
)

src/telnyx/resources/portouts/portouts.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -145,9 +145,10 @@ def list(
145145
Args:
146146
filter:
147147
Consolidated filter parameter (deepObject style). Originally:
148-
filter[carrier_name], filter[pon], filter[spid], filter[status],
149-
filter[status_in], filter[ported_out_at], filter[inserted_at], filter[foc_date],
150-
filter[phone_number], filter[support_key]
148+
filter[carrier_name], filter[country_code], filter[country_code_in],
149+
filter[foc_date], filter[inserted_at], filter[phone_number], filter[pon],
150+
filter[ported_out_at], filter[spid], filter[status], filter[status_in],
151+
filter[support_key]
151152
152153
page: Consolidated page parameter (deepObject style). Originally: page[number],
153154
page[size]
@@ -359,9 +360,10 @@ async def list(
359360
Args:
360361
filter:
361362
Consolidated filter parameter (deepObject style). Originally:
362-
filter[carrier_name], filter[pon], filter[spid], filter[status],
363-
filter[status_in], filter[ported_out_at], filter[inserted_at], filter[foc_date],
364-
filter[phone_number], filter[support_key]
363+
filter[carrier_name], filter[country_code], filter[country_code_in],
364+
filter[foc_date], filter[inserted_at], filter[phone_number], filter[pon],
365+
filter[ported_out_at], filter[spid], filter[status], filter[status_in],
366+
filter[support_key]
365367
366368
page: Consolidated page parameter (deepObject style). Originally: page[number],
367369
page[size]

0 commit comments

Comments
 (0)