Skip to content

Commit 6409e1c

Browse files
feat(api): api update
1 parent 58a55d5 commit 6409e1c

57 files changed

Lines changed: 1281 additions & 4216 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 1781
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-2bfb36c626416e47cb758ab9f6f03d7a4ad14f7b7d4ecfc43e204effec027213.yml
3-
openapi_spec_hash: 01656e36e266af66a86deb34e34d1821
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-d12e5f29ee59534bcbd3655ccc82d3f9b721562ce32d6a74905e4f64ea963ff3.yml
3+
openapi_spec_hash: 816ab531b7373d57f9c701d5bb8dcd2a
44
config_hash: a433f3793b734bc6fcc9d9e0c27ff8c2

api.md

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

src/cloudflare/resources/zero_trust/access/applications/applications.py

Lines changed: 129 additions & 205 deletions
Large diffs are not rendered by default.

src/cloudflare/resources/zero_trust/access/applications/cas.py

Lines changed: 41 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
import httpx
88

99
from ....._types import NOT_GIVEN, Body, Query, Headers, NotGiven
10+
from ....._utils import maybe_transform
1011
from ....._compat import cached_property
1112
from ....._resource import SyncAPIResource, AsyncAPIResource
1213
from ....._response import (
@@ -16,8 +17,9 @@
1617
async_to_streamed_response_wrapper,
1718
)
1819
from ....._wrappers import ResultWrapper
19-
from .....pagination import SyncSinglePage, AsyncSinglePage
20+
from .....pagination import SyncV4PagePaginationArray, AsyncV4PagePaginationArray
2021
from ....._base_client import AsyncPaginator, make_request_options
22+
from .....types.zero_trust.access.applications import ca_list_params
2123
from .....types.zero_trust.access.applications.ca import CA
2224
from .....types.zero_trust.access.applications.ca_delete_response import CADeleteResponse
2325

@@ -106,13 +108,15 @@ def list(
106108
*,
107109
account_id: str | NotGiven = NOT_GIVEN,
108110
zone_id: str | NotGiven = NOT_GIVEN,
111+
page: int | NotGiven = NOT_GIVEN,
112+
per_page: int | NotGiven = NOT_GIVEN,
109113
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
110114
# The extra values given here take precedence over values defined on the client or passed to this method.
111115
extra_headers: Headers | None = None,
112116
extra_query: Query | None = None,
113117
extra_body: Body | None = None,
114118
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
115-
) -> SyncSinglePage[CA]:
119+
) -> SyncV4PagePaginationArray[CA]:
116120
"""
117121
Lists short-lived certificate CAs and their public keys.
118122
@@ -121,6 +125,10 @@ def list(
121125
122126
zone_id: The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.
123127
128+
page: Page number of results.
129+
130+
per_page: Number of results per page.
131+
124132
extra_headers: Send extra headers
125133
126134
extra_query: Add additional query parameters to the request
@@ -143,9 +151,19 @@ def list(
143151
account_or_zone_id = zone_id
144152
return self._get_api_list(
145153
f"/{account_or_zone}/{account_or_zone_id}/access/apps/ca",
146-
page=SyncSinglePage[CA],
154+
page=SyncV4PagePaginationArray[CA],
147155
options=make_request_options(
148-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
156+
extra_headers=extra_headers,
157+
extra_query=extra_query,
158+
extra_body=extra_body,
159+
timeout=timeout,
160+
query=maybe_transform(
161+
{
162+
"page": page,
163+
"per_page": per_page,
164+
},
165+
ca_list_params.CAListParams,
166+
),
149167
),
150168
model=CA,
151169
)
@@ -347,13 +365,15 @@ def list(
347365
*,
348366
account_id: str | NotGiven = NOT_GIVEN,
349367
zone_id: str | NotGiven = NOT_GIVEN,
368+
page: int | NotGiven = NOT_GIVEN,
369+
per_page: int | NotGiven = NOT_GIVEN,
350370
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
351371
# The extra values given here take precedence over values defined on the client or passed to this method.
352372
extra_headers: Headers | None = None,
353373
extra_query: Query | None = None,
354374
extra_body: Body | None = None,
355375
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
356-
) -> AsyncPaginator[CA, AsyncSinglePage[CA]]:
376+
) -> AsyncPaginator[CA, AsyncV4PagePaginationArray[CA]]:
357377
"""
358378
Lists short-lived certificate CAs and their public keys.
359379
@@ -362,6 +382,10 @@ def list(
362382
363383
zone_id: The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.
364384
385+
page: Page number of results.
386+
387+
per_page: Number of results per page.
388+
365389
extra_headers: Send extra headers
366390
367391
extra_query: Add additional query parameters to the request
@@ -384,9 +408,19 @@ def list(
384408
account_or_zone_id = zone_id
385409
return self._get_api_list(
386410
f"/{account_or_zone}/{account_or_zone_id}/access/apps/ca",
387-
page=AsyncSinglePage[CA],
411+
page=AsyncV4PagePaginationArray[CA],
388412
options=make_request_options(
389-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
413+
extra_headers=extra_headers,
414+
extra_query=extra_query,
415+
extra_body=extra_body,
416+
timeout=timeout,
417+
query=maybe_transform(
418+
{
419+
"page": page,
420+
"per_page": per_page,
421+
},
422+
ca_list_params.CAListParams,
423+
),
390424
),
391425
model=CA,
392426
)

src/cloudflare/resources/zero_trust/access/applications/policies.py

Lines changed: 40 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@
1717
async_to_streamed_response_wrapper,
1818
)
1919
from ....._wrappers import ResultWrapper
20-
from .....pagination import SyncSinglePage, AsyncSinglePage
20+
from .....pagination import SyncV4PagePaginationArray, AsyncV4PagePaginationArray
2121
from ....._base_client import AsyncPaginator, make_request_options
22-
from .....types.zero_trust.access.applications import policy_create_params, policy_update_params
22+
from .....types.zero_trust.access.applications import policy_list_params, policy_create_params, policy_update_params
2323
from .....types.zero_trust.access.approval_group_param import ApprovalGroupParam
2424
from .....types.zero_trust.access.applications.policy_get_response import PolicyGetResponse
2525
from .....types.zero_trust.access.applications.policy_list_response import PolicyListResponse
@@ -258,13 +258,15 @@ def list(
258258
*,
259259
account_id: str | NotGiven = NOT_GIVEN,
260260
zone_id: str | NotGiven = NOT_GIVEN,
261+
page: int | NotGiven = NOT_GIVEN,
262+
per_page: int | NotGiven = NOT_GIVEN,
261263
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
262264
# The extra values given here take precedence over values defined on the client or passed to this method.
263265
extra_headers: Headers | None = None,
264266
extra_query: Query | None = None,
265267
extra_body: Body | None = None,
266268
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
267-
) -> SyncSinglePage[PolicyListResponse]:
269+
) -> SyncV4PagePaginationArray[PolicyListResponse]:
268270
"""Lists Access policies configured for an application.
269271
270272
Returns both exclusively
@@ -277,6 +279,10 @@ def list(
277279
278280
zone_id: The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.
279281
282+
page: Page number of results.
283+
284+
per_page: Number of results per page.
285+
280286
extra_headers: Send extra headers
281287
282288
extra_query: Add additional query parameters to the request
@@ -301,9 +307,19 @@ def list(
301307
account_or_zone_id = zone_id
302308
return self._get_api_list(
303309
f"/{account_or_zone}/{account_or_zone_id}/access/apps/{app_id}/policies",
304-
page=SyncSinglePage[PolicyListResponse],
310+
page=SyncV4PagePaginationArray[PolicyListResponse],
305311
options=make_request_options(
306-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
312+
extra_headers=extra_headers,
313+
extra_query=extra_query,
314+
extra_body=extra_body,
315+
timeout=timeout,
316+
query=maybe_transform(
317+
{
318+
"page": page,
319+
"per_page": per_page,
320+
},
321+
policy_list_params.PolicyListParams,
322+
),
307323
),
308324
model=PolicyListResponse,
309325
)
@@ -665,13 +681,15 @@ def list(
665681
*,
666682
account_id: str | NotGiven = NOT_GIVEN,
667683
zone_id: str | NotGiven = NOT_GIVEN,
684+
page: int | NotGiven = NOT_GIVEN,
685+
per_page: int | NotGiven = NOT_GIVEN,
668686
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
669687
# The extra values given here take precedence over values defined on the client or passed to this method.
670688
extra_headers: Headers | None = None,
671689
extra_query: Query | None = None,
672690
extra_body: Body | None = None,
673691
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
674-
) -> AsyncPaginator[PolicyListResponse, AsyncSinglePage[PolicyListResponse]]:
692+
) -> AsyncPaginator[PolicyListResponse, AsyncV4PagePaginationArray[PolicyListResponse]]:
675693
"""Lists Access policies configured for an application.
676694
677695
Returns both exclusively
@@ -684,6 +702,10 @@ def list(
684702
685703
zone_id: The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.
686704
705+
page: Page number of results.
706+
707+
per_page: Number of results per page.
708+
687709
extra_headers: Send extra headers
688710
689711
extra_query: Add additional query parameters to the request
@@ -708,9 +730,19 @@ def list(
708730
account_or_zone_id = zone_id
709731
return self._get_api_list(
710732
f"/{account_or_zone}/{account_or_zone_id}/access/apps/{app_id}/policies",
711-
page=AsyncSinglePage[PolicyListResponse],
733+
page=AsyncV4PagePaginationArray[PolicyListResponse],
712734
options=make_request_options(
713-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
735+
extra_headers=extra_headers,
736+
extra_query=extra_query,
737+
extra_body=extra_body,
738+
timeout=timeout,
739+
query=maybe_transform(
740+
{
741+
"page": page,
742+
"per_page": per_page,
743+
},
744+
policy_list_params.PolicyListParams,
745+
),
714746
),
715747
model=PolicyListResponse,
716748
)

src/cloudflare/resources/zero_trust/access/applications/policy_tests/users.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,8 @@ def list(
6767
6868
policy_test_id: The UUID of the policy test.
6969
70+
page: Page number of results.
71+
7072
status: Filter users by their policy evaluation status.
7173
7274
extra_headers: Send extra headers
@@ -145,6 +147,8 @@ def list(
145147
146148
policy_test_id: The UUID of the policy test.
147149
150+
page: Page number of results.
151+
148152
status: Filter users by their policy evaluation status.
149153
150154
extra_headers: Send extra headers

src/cloudflare/resources/zero_trust/access/certificates/certificates.py

Lines changed: 40 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@
2525
async_to_streamed_response_wrapper,
2626
)
2727
from ....._wrappers import ResultWrapper
28-
from .....pagination import SyncSinglePage, AsyncSinglePage
28+
from .....pagination import SyncV4PagePaginationArray, AsyncV4PagePaginationArray
2929
from ....._base_client import AsyncPaginator, make_request_options
30-
from .....types.zero_trust.access import certificate_create_params, certificate_update_params
30+
from .....types.zero_trust.access import certificate_list_params, certificate_create_params, certificate_update_params
3131
from .....types.zero_trust.access.certificate import Certificate
3232
from .....types.zero_trust.access.associated_hostnames import AssociatedHostnames
3333
from .....types.zero_trust.access.certificate_delete_response import CertificateDeleteResponse
@@ -203,13 +203,15 @@ def list(
203203
*,
204204
account_id: str | NotGiven = NOT_GIVEN,
205205
zone_id: str | NotGiven = NOT_GIVEN,
206+
page: int | NotGiven = NOT_GIVEN,
207+
per_page: int | NotGiven = NOT_GIVEN,
206208
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
207209
# The extra values given here take precedence over values defined on the client or passed to this method.
208210
extra_headers: Headers | None = None,
209211
extra_query: Query | None = None,
210212
extra_body: Body | None = None,
211213
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
212-
) -> SyncSinglePage[Certificate]:
214+
) -> SyncV4PagePaginationArray[Certificate]:
213215
"""
214216
Lists all mTLS root certificates.
215217
@@ -218,6 +220,10 @@ def list(
218220
219221
zone_id: The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.
220222
223+
page: Page number of results.
224+
225+
per_page: Number of results per page.
226+
221227
extra_headers: Send extra headers
222228
223229
extra_query: Add additional query parameters to the request
@@ -240,9 +246,19 @@ def list(
240246
account_or_zone_id = zone_id
241247
return self._get_api_list(
242248
f"/{account_or_zone}/{account_or_zone_id}/access/certificates",
243-
page=SyncSinglePage[Certificate],
249+
page=SyncV4PagePaginationArray[Certificate],
244250
options=make_request_options(
245-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
251+
extra_headers=extra_headers,
252+
extra_query=extra_query,
253+
extra_body=extra_body,
254+
timeout=timeout,
255+
query=maybe_transform(
256+
{
257+
"page": page,
258+
"per_page": per_page,
259+
},
260+
certificate_list_params.CertificateListParams,
261+
),
246262
),
247263
model=Certificate,
248264
)
@@ -530,13 +546,15 @@ def list(
530546
*,
531547
account_id: str | NotGiven = NOT_GIVEN,
532548
zone_id: str | NotGiven = NOT_GIVEN,
549+
page: int | NotGiven = NOT_GIVEN,
550+
per_page: int | NotGiven = NOT_GIVEN,
533551
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
534552
# The extra values given here take precedence over values defined on the client or passed to this method.
535553
extra_headers: Headers | None = None,
536554
extra_query: Query | None = None,
537555
extra_body: Body | None = None,
538556
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
539-
) -> AsyncPaginator[Certificate, AsyncSinglePage[Certificate]]:
557+
) -> AsyncPaginator[Certificate, AsyncV4PagePaginationArray[Certificate]]:
540558
"""
541559
Lists all mTLS root certificates.
542560
@@ -545,6 +563,10 @@ def list(
545563
546564
zone_id: The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.
547565
566+
page: Page number of results.
567+
568+
per_page: Number of results per page.
569+
548570
extra_headers: Send extra headers
549571
550572
extra_query: Add additional query parameters to the request
@@ -567,9 +589,19 @@ def list(
567589
account_or_zone_id = zone_id
568590
return self._get_api_list(
569591
f"/{account_or_zone}/{account_or_zone_id}/access/certificates",
570-
page=AsyncSinglePage[Certificate],
592+
page=AsyncV4PagePaginationArray[Certificate],
571593
options=make_request_options(
572-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
594+
extra_headers=extra_headers,
595+
extra_query=extra_query,
596+
extra_body=extra_body,
597+
timeout=timeout,
598+
query=maybe_transform(
599+
{
600+
"page": page,
601+
"per_page": per_page,
602+
},
603+
certificate_list_params.CertificateListParams,
604+
),
573605
),
574606
model=Certificate,
575607
)

0 commit comments

Comments
 (0)