Skip to content

Commit d3a2188

Browse files
authored
Merge pull request #2698 from cloudflare/sync/staging-next-2026-04-17
feat(workers,registrar,custom_pages): restore codegen updates previously excluded for test failures
2 parents cbf9a27 + 9227352 commit d3a2188

79 files changed

Lines changed: 1959 additions & 447 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# CustomPages
2+
3+
Types:
4+
5+
```python
6+
from cloudflare.types.custom_pages import (
7+
CustomPageUpdateResponse,
8+
CustomPageListResponse,
9+
CustomPageGetResponse,
10+
)
11+
```
12+
13+
Methods:
14+
15+
- <code title="put /{accounts_or_zones}/{account_or_zone_id}/custom_pages/{identifier}">client.custom_pages.<a href="./src/cloudflare/resources/custom_pages/custom_pages.py">update</a>(identifier, \*, account_id, zone_id, \*\*<a href="src/cloudflare/types/custom_pages/custom_page_update_params.py">params</a>) -> <a href="./src/cloudflare/types/custom_pages/custom_page_update_response.py">Optional[CustomPageUpdateResponse]</a></code>
16+
- <code title="get /{accounts_or_zones}/{account_or_zone_id}/custom_pages">client.custom_pages.<a href="./src/cloudflare/resources/custom_pages/custom_pages.py">list</a>(\*, account_id, zone_id) -> <a href="./src/cloudflare/types/custom_pages/custom_page_list_response.py">SyncSinglePage[CustomPageListResponse]</a></code>
17+
- <code title="get /{accounts_or_zones}/{account_or_zone_id}/custom_pages/{identifier}">client.custom_pages.<a href="./src/cloudflare/resources/custom_pages/custom_pages.py">get</a>(identifier, \*, account_id, zone_id) -> <a href="./src/cloudflare/types/custom_pages/custom_page_get_response.py">Optional[CustomPageGetResponse]</a></code>
18+
19+
## Assets
20+
21+
Types:
22+
23+
```python
24+
from cloudflare.types.custom_pages import (
25+
AssetCreateResponse,
26+
AssetUpdateResponse,
27+
AssetListResponse,
28+
AssetGetResponse,
29+
)
30+
```
31+
32+
Methods:
33+
34+
- <code title="post /{accounts_or_zones}/{account_or_zone_id}/custom_pages/assets">client.custom_pages.assets.<a href="./src/cloudflare/resources/custom_pages/assets.py">create</a>(\*, account_id, zone_id, \*\*<a href="src/cloudflare/types/custom_pages/asset_create_params.py">params</a>) -> <a href="./src/cloudflare/types/custom_pages/asset_create_response.py">Optional[AssetCreateResponse]</a></code>
35+
- <code title="put /{accounts_or_zones}/{account_or_zone_id}/custom_pages/assets/{asset_name}">client.custom_pages.assets.<a href="./src/cloudflare/resources/custom_pages/assets.py">update</a>(asset_name, \*, account_id, zone_id, \*\*<a href="src/cloudflare/types/custom_pages/asset_update_params.py">params</a>) -> <a href="./src/cloudflare/types/custom_pages/asset_update_response.py">Optional[AssetUpdateResponse]</a></code>
36+
- <code title="get /{accounts_or_zones}/{account_or_zone_id}/custom_pages/assets">client.custom_pages.assets.<a href="./src/cloudflare/resources/custom_pages/assets.py">list</a>(\*, account_id, zone_id, \*\*<a href="src/cloudflare/types/custom_pages/asset_list_params.py">params</a>) -> <a href="./src/cloudflare/types/custom_pages/asset_list_response.py">SyncV4PagePaginationArray[AssetListResponse]</a></code>
37+
- <code title="delete /{accounts_or_zones}/{account_or_zone_id}/custom_pages/assets/{asset_name}">client.custom_pages.assets.<a href="./src/cloudflare/resources/custom_pages/assets.py">delete</a>(asset_name, \*, account_id, zone_id) -> None</code>
38+
- <code title="get /{accounts_or_zones}/{account_or_zone_id}/custom_pages/assets/{asset_name}">client.custom_pages.assets.<a href="./src/cloudflare/resources/custom_pages/assets.py">get</a>(asset_name, \*, account_id, zone_id) -> <a href="./src/cloudflare/types/custom_pages/asset_get_response.py">Optional[AssetGetResponse]</a></code>

src/cloudflare/resources/custom_pages/assets.py

Lines changed: 117 additions & 31 deletions
Large diffs are not rendered by default.

src/cloudflare/resources/custom_pages/custom_pages.py

Lines changed: 72 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
AssetsResourceWithStreamingResponse,
1616
AsyncAssetsResourceWithStreamingResponse,
1717
)
18-
from ..._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
19-
from ..._utils import maybe_transform, async_maybe_transform
18+
from ..._types import Body, Query, Headers, NotGiven, not_given
19+
from ..._utils import path_template, maybe_transform, async_maybe_transform
2020
from ..._compat import cached_property
2121
from ..._resource import SyncAPIResource, AsyncAPIResource
2222
from ..._response import (
@@ -77,8 +77,8 @@ def update(
7777
*,
7878
state: Literal["default", "customized"],
7979
url: str,
80-
account_id: str | Omit = omit,
81-
zone_id: str | Omit = omit,
80+
account_id: str | None = None,
81+
zone_id: str | None = None,
8282
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
8383
# The extra values given here take precedence over values defined on the client or passed to this method.
8484
extra_headers: Headers | None = None,
@@ -110,6 +110,10 @@ def update(
110110
"""
111111
if not identifier:
112112
raise ValueError(f"Expected a non-empty value for `identifier` but received {identifier!r}")
113+
if account_id is None:
114+
account_id = self._client._get_account_id_path_param()
115+
if zone_id is None:
116+
zone_id = self._client._get_zone_id_path_param()
113117
if account_id and zone_id:
114118
raise ValueError("You cannot provide both account_id and zone_id")
115119

@@ -123,7 +127,12 @@ def update(
123127
account_or_zone = "zones"
124128
account_or_zone_id = zone_id
125129
return self._put(
126-
f"/{account_or_zone}/{account_or_zone_id}/custom_pages/{identifier}",
130+
path_template(
131+
"/{account_or_zone}/{account_or_zone_id}/custom_pages/{identifier}",
132+
identifier=identifier,
133+
account_or_zone=account_or_zone,
134+
account_or_zone_id=account_or_zone_id,
135+
),
127136
body=maybe_transform(
128137
{
129138
"state": state,
@@ -144,8 +153,8 @@ def update(
144153
def list(
145154
self,
146155
*,
147-
account_id: str | Omit = omit,
148-
zone_id: str | Omit = omit,
156+
account_id: str | None = None,
157+
zone_id: str | None = None,
149158
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
150159
# The extra values given here take precedence over values defined on the client or passed to this method.
151160
extra_headers: Headers | None = None,
@@ -169,6 +178,10 @@ def list(
169178
170179
timeout: Override the client-level default timeout for this request, in seconds
171180
"""
181+
if account_id is None:
182+
account_id = self._client._get_account_id_path_param()
183+
if zone_id is None:
184+
zone_id = self._client._get_zone_id_path_param()
172185
if account_id and zone_id:
173186
raise ValueError("You cannot provide both account_id and zone_id")
174187

@@ -182,7 +195,11 @@ def list(
182195
account_or_zone = "zones"
183196
account_or_zone_id = zone_id
184197
return self._get_api_list(
185-
f"/{account_or_zone}/{account_or_zone_id}/custom_pages",
198+
path_template(
199+
"/{account_or_zone}/{account_or_zone_id}/custom_pages",
200+
account_or_zone=account_or_zone,
201+
account_or_zone_id=account_or_zone_id,
202+
),
186203
page=SyncSinglePage[CustomPageListResponse],
187204
options=make_request_options(
188205
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
@@ -205,8 +222,8 @@ def get(
205222
"waf_challenge",
206223
],
207224
*,
208-
account_id: str | Omit = omit,
209-
zone_id: str | Omit = omit,
225+
account_id: str | None = None,
226+
zone_id: str | None = None,
210227
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
211228
# The extra values given here take precedence over values defined on the client or passed to this method.
212229
extra_headers: Headers | None = None,
@@ -234,6 +251,10 @@ def get(
234251
"""
235252
if not identifier:
236253
raise ValueError(f"Expected a non-empty value for `identifier` but received {identifier!r}")
254+
if account_id is None:
255+
account_id = self._client._get_account_id_path_param()
256+
if zone_id is None:
257+
zone_id = self._client._get_zone_id_path_param()
237258
if account_id and zone_id:
238259
raise ValueError("You cannot provide both account_id and zone_id")
239260

@@ -247,7 +268,12 @@ def get(
247268
account_or_zone = "zones"
248269
account_or_zone_id = zone_id
249270
return self._get(
250-
f"/{account_or_zone}/{account_or_zone_id}/custom_pages/{identifier}",
271+
path_template(
272+
"/{account_or_zone}/{account_or_zone_id}/custom_pages/{identifier}",
273+
identifier=identifier,
274+
account_or_zone=account_or_zone,
275+
account_or_zone_id=account_or_zone_id,
276+
),
251277
options=make_request_options(
252278
extra_headers=extra_headers,
253279
extra_query=extra_query,
@@ -300,8 +326,8 @@ async def update(
300326
*,
301327
state: Literal["default", "customized"],
302328
url: str,
303-
account_id: str | Omit = omit,
304-
zone_id: str | Omit = omit,
329+
account_id: str | None = None,
330+
zone_id: str | None = None,
305331
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
306332
# The extra values given here take precedence over values defined on the client or passed to this method.
307333
extra_headers: Headers | None = None,
@@ -333,6 +359,10 @@ async def update(
333359
"""
334360
if not identifier:
335361
raise ValueError(f"Expected a non-empty value for `identifier` but received {identifier!r}")
362+
if account_id is None:
363+
account_id = self._client._get_account_id_path_param()
364+
if zone_id is None:
365+
zone_id = self._client._get_zone_id_path_param()
336366
if account_id and zone_id:
337367
raise ValueError("You cannot provide both account_id and zone_id")
338368

@@ -346,7 +376,12 @@ async def update(
346376
account_or_zone = "zones"
347377
account_or_zone_id = zone_id
348378
return await self._put(
349-
f"/{account_or_zone}/{account_or_zone_id}/custom_pages/{identifier}",
379+
path_template(
380+
"/{account_or_zone}/{account_or_zone_id}/custom_pages/{identifier}",
381+
identifier=identifier,
382+
account_or_zone=account_or_zone,
383+
account_or_zone_id=account_or_zone_id,
384+
),
350385
body=await async_maybe_transform(
351386
{
352387
"state": state,
@@ -367,8 +402,8 @@ async def update(
367402
def list(
368403
self,
369404
*,
370-
account_id: str | Omit = omit,
371-
zone_id: str | Omit = omit,
405+
account_id: str | None = None,
406+
zone_id: str | None = None,
372407
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
373408
# The extra values given here take precedence over values defined on the client or passed to this method.
374409
extra_headers: Headers | None = None,
@@ -392,6 +427,10 @@ def list(
392427
393428
timeout: Override the client-level default timeout for this request, in seconds
394429
"""
430+
if account_id is None:
431+
account_id = self._client._get_account_id_path_param()
432+
if zone_id is None:
433+
zone_id = self._client._get_zone_id_path_param()
395434
if account_id and zone_id:
396435
raise ValueError("You cannot provide both account_id and zone_id")
397436

@@ -405,7 +444,11 @@ def list(
405444
account_or_zone = "zones"
406445
account_or_zone_id = zone_id
407446
return self._get_api_list(
408-
f"/{account_or_zone}/{account_or_zone_id}/custom_pages",
447+
path_template(
448+
"/{account_or_zone}/{account_or_zone_id}/custom_pages",
449+
account_or_zone=account_or_zone,
450+
account_or_zone_id=account_or_zone_id,
451+
),
409452
page=AsyncSinglePage[CustomPageListResponse],
410453
options=make_request_options(
411454
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
@@ -428,8 +471,8 @@ async def get(
428471
"waf_challenge",
429472
],
430473
*,
431-
account_id: str | Omit = omit,
432-
zone_id: str | Omit = omit,
474+
account_id: str | None = None,
475+
zone_id: str | None = None,
433476
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
434477
# The extra values given here take precedence over values defined on the client or passed to this method.
435478
extra_headers: Headers | None = None,
@@ -457,6 +500,10 @@ async def get(
457500
"""
458501
if not identifier:
459502
raise ValueError(f"Expected a non-empty value for `identifier` but received {identifier!r}")
503+
if account_id is None:
504+
account_id = self._client._get_account_id_path_param()
505+
if zone_id is None:
506+
zone_id = self._client._get_zone_id_path_param()
460507
if account_id and zone_id:
461508
raise ValueError("You cannot provide both account_id and zone_id")
462509

@@ -470,7 +517,12 @@ async def get(
470517
account_or_zone = "zones"
471518
account_or_zone_id = zone_id
472519
return await self._get(
473-
f"/{account_or_zone}/{account_or_zone_id}/custom_pages/{identifier}",
520+
path_template(
521+
"/{account_or_zone}/{account_or_zone_id}/custom_pages/{identifier}",
522+
identifier=identifier,
523+
account_or_zone=account_or_zone,
524+
account_or_zone_id=account_or_zone_id,
525+
),
474526
options=make_request_options(
475527
extra_headers=extra_headers,
476528
extra_query=extra_query,
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# Registrar
2+
3+
Types:
4+
5+
```python
6+
from cloudflare.types.registrar import (
7+
Registration,
8+
WorkflowStatus,
9+
RegistrarCheckResponse,
10+
RegistrarSearchResponse,
11+
)
12+
```
13+
14+
Methods:
15+
16+
- <code title="post /accounts/{account_id}/registrar/domain-check">client.registrar.<a href="./src/cloudflare/resources/registrar/registrar.py">check</a>(\*, account_id, \*\*<a href="src/cloudflare/types/registrar/registrar_check_params.py">params</a>) -> <a href="./src/cloudflare/types/registrar/registrar_check_response.py">RegistrarCheckResponse</a></code>
17+
- <code title="get /accounts/{account_id}/registrar/domain-search">client.registrar.<a href="./src/cloudflare/resources/registrar/registrar.py">search</a>(\*, account_id, \*\*<a href="src/cloudflare/types/registrar/registrar_search_params.py">params</a>) -> <a href="./src/cloudflare/types/registrar/registrar_search_response.py">RegistrarSearchResponse</a></code>
18+
19+
## Domains
20+
21+
Types:
22+
23+
```python
24+
from cloudflare.types.registrar import Domain
25+
```
26+
27+
Methods:
28+
29+
- <code title="put /accounts/{account_id}/registrar/domains/{domain_name}">client.registrar.domains.<a href="./src/cloudflare/resources/registrar/domains.py">update</a>(domain_name, \*, account_id, \*\*<a href="src/cloudflare/types/registrar/domain_update_params.py">params</a>) -> object</code>
30+
- <code title="get /accounts/{account_id}/registrar/domains">client.registrar.domains.<a href="./src/cloudflare/resources/registrar/domains.py">list</a>(\*, account_id) -> <a href="./src/cloudflare/types/registrar/domain.py">SyncSinglePage[Domain]</a></code>
31+
- <code title="get /accounts/{account_id}/registrar/domains/{domain_name}">client.registrar.domains.<a href="./src/cloudflare/resources/registrar/domains.py">get</a>(domain_name, \*, account_id) -> object</code>
32+
33+
## Registrations
34+
35+
Methods:
36+
37+
- <code title="post /accounts/{account_id}/registrar/registrations">client.registrar.registrations.<a href="./src/cloudflare/resources/registrar/registrations.py">create</a>(\*, account_id, \*\*<a href="src/cloudflare/types/registrar/registration_create_params.py">params</a>) -> <a href="./src/cloudflare/types/registrar/workflow_status.py">WorkflowStatus</a></code>
38+
- <code title="get /accounts/{account_id}/registrar/registrations">client.registrar.registrations.<a href="./src/cloudflare/resources/registrar/registrations.py">list</a>(\*, account_id, \*\*<a href="src/cloudflare/types/registrar/registration_list_params.py">params</a>) -> <a href="./src/cloudflare/types/registrar/registration.py">SyncCursorPagination[Registration]</a></code>
39+
- <code title="patch /accounts/{account_id}/registrar/registrations/{domain_name}">client.registrar.registrations.<a href="./src/cloudflare/resources/registrar/registrations.py">edit</a>(domain_name, \*, account_id, \*\*<a href="src/cloudflare/types/registrar/registration_edit_params.py">params</a>) -> <a href="./src/cloudflare/types/registrar/workflow_status.py">WorkflowStatus</a></code>
40+
- <code title="get /accounts/{account_id}/registrar/registrations/{domain_name}">client.registrar.registrations.<a href="./src/cloudflare/resources/registrar/registrations.py">get</a>(domain_name, \*, account_id) -> <a href="./src/cloudflare/types/registrar/registration.py">Registration</a></code>
41+
42+
## RegistrationStatus
43+
44+
Methods:
45+
46+
- <code title="get /accounts/{account_id}/registrar/registrations/{domain_name}/registration-status">client.registrar.registration_status.<a href="./src/cloudflare/resources/registrar/registration_status.py">get</a>(domain_name, \*, account_id) -> <a href="./src/cloudflare/types/registrar/workflow_status.py">WorkflowStatus</a></code>
47+
48+
## UpdateStatus
49+
50+
Methods:
51+
52+
- <code title="get /accounts/{account_id}/registrar/registrations/{domain_name}/update-status">client.registrar.update_status.<a href="./src/cloudflare/resources/registrar/update_status.py">get</a>(domain_name, \*, account_id) -> <a href="./src/cloudflare/types/registrar/workflow_status.py">WorkflowStatus</a></code>

0 commit comments

Comments
 (0)