Skip to content

Commit b25c6fc

Browse files
stainless-app[bot]stainless-bot
authored andcommitted
feat(api): OpenAPI spec update via Stainless API (#1162)
1 parent 5584fca commit b25c6fc

17 files changed

+522
-14
lines changed

.stats.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
configured_endpoints: 1254
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-d8d652bdc7a06e88e4432adbe4d697dae937fcd7edab5323d37610363be6d481.yml
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-d4312bd23a02e20e5d46c142ec08fbe09bb97ce586a900e10d178982734f44ec.yml

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

+34-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22

33
from __future__ import annotations
44

5-
from typing import Type, Optional, cast
5+
from typing import Type, Union, Optional, cast
6+
from datetime import datetime
67
from typing_extensions import Literal
78

89
import httpx
@@ -51,6 +52,9 @@ def create(
5152
name: str,
5253
type: Literal["identity_denied", "forbidden"],
5354
app_count: int | NotGiven = NOT_GIVEN,
55+
created_at: Union[str, datetime] | NotGiven = NOT_GIVEN,
56+
uid: str | NotGiven = NOT_GIVEN,
57+
updated_at: Union[str, datetime] | NotGiven = NOT_GIVEN,
5458
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
5559
# The extra values given here take precedence over values defined on the client or passed to this method.
5660
extra_headers: Headers | None = None,
@@ -72,6 +76,8 @@ def create(
7276
7377
app_count: Number of apps the custom page is assigned to.
7478
79+
uid: UUID
80+
7581
extra_headers: Send extra headers
7682
7783
extra_query: Add additional query parameters to the request
@@ -90,6 +96,9 @@ def create(
9096
"name": name,
9197
"type": type,
9298
"app_count": app_count,
99+
"created_at": created_at,
100+
"uid": uid,
101+
"updated_at": updated_at,
93102
},
94103
custom_page_create_params.CustomPageCreateParams,
95104
),
@@ -112,6 +121,9 @@ def update(
112121
name: str,
113122
type: Literal["identity_denied", "forbidden"],
114123
app_count: int | NotGiven = NOT_GIVEN,
124+
created_at: Union[str, datetime] | NotGiven = NOT_GIVEN,
125+
uid: str | NotGiven = NOT_GIVEN,
126+
updated_at: Union[str, datetime] | NotGiven = NOT_GIVEN,
115127
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
116128
# The extra values given here take precedence over values defined on the client or passed to this method.
117129
extra_headers: Headers | None = None,
@@ -135,6 +147,8 @@ def update(
135147
136148
app_count: Number of apps the custom page is assigned to.
137149
150+
uid: UUID
151+
138152
extra_headers: Send extra headers
139153
140154
extra_query: Add additional query parameters to the request
@@ -155,6 +169,9 @@ def update(
155169
"name": name,
156170
"type": type,
157171
"app_count": app_count,
172+
"created_at": created_at,
173+
"uid": uid,
174+
"updated_at": updated_at,
158175
},
159176
custom_page_update_params.CustomPageUpdateParams,
160177
),
@@ -310,6 +327,9 @@ async def create(
310327
name: str,
311328
type: Literal["identity_denied", "forbidden"],
312329
app_count: int | NotGiven = NOT_GIVEN,
330+
created_at: Union[str, datetime] | NotGiven = NOT_GIVEN,
331+
uid: str | NotGiven = NOT_GIVEN,
332+
updated_at: Union[str, datetime] | NotGiven = NOT_GIVEN,
313333
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
314334
# The extra values given here take precedence over values defined on the client or passed to this method.
315335
extra_headers: Headers | None = None,
@@ -331,6 +351,8 @@ async def create(
331351
332352
app_count: Number of apps the custom page is assigned to.
333353
354+
uid: UUID
355+
334356
extra_headers: Send extra headers
335357
336358
extra_query: Add additional query parameters to the request
@@ -349,6 +371,9 @@ async def create(
349371
"name": name,
350372
"type": type,
351373
"app_count": app_count,
374+
"created_at": created_at,
375+
"uid": uid,
376+
"updated_at": updated_at,
352377
},
353378
custom_page_create_params.CustomPageCreateParams,
354379
),
@@ -371,6 +396,9 @@ async def update(
371396
name: str,
372397
type: Literal["identity_denied", "forbidden"],
373398
app_count: int | NotGiven = NOT_GIVEN,
399+
created_at: Union[str, datetime] | NotGiven = NOT_GIVEN,
400+
uid: str | NotGiven = NOT_GIVEN,
401+
updated_at: Union[str, datetime] | NotGiven = NOT_GIVEN,
374402
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
375403
# The extra values given here take precedence over values defined on the client or passed to this method.
376404
extra_headers: Headers | None = None,
@@ -394,6 +422,8 @@ async def update(
394422
395423
app_count: Number of apps the custom page is assigned to.
396424
425+
uid: UUID
426+
397427
extra_headers: Send extra headers
398428
399429
extra_query: Add additional query parameters to the request
@@ -414,6 +444,9 @@ async def update(
414444
"name": name,
415445
"type": type,
416446
"app_count": app_count,
447+
"created_at": created_at,
448+
"uid": uid,
449+
"updated_at": updated_at,
417450
},
418451
custom_page_update_params.CustomPageUpdateParams,
419452
),

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

+42-5
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22

33
from __future__ import annotations
44

5-
from typing import Type, Optional, cast
5+
from typing import Type, Union, Optional, cast
6+
from datetime import datetime
67

78
import httpx
89

@@ -46,6 +47,8 @@ def create(
4647
*,
4748
account_id: str,
4849
name: str,
50+
created_at: Union[str, datetime] | NotGiven = NOT_GIVEN,
51+
updated_at: Union[str, datetime] | NotGiven = NOT_GIVEN,
4952
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
5053
# The extra values given here take precedence over values defined on the client or passed to this method.
5154
extra_headers: Headers | None = None,
@@ -73,7 +76,14 @@ def create(
7376
raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
7477
return self._post(
7578
f"/accounts/{account_id}/access/tags",
76-
body=maybe_transform({"name": name}, tag_create_params.TagCreateParams),
79+
body=maybe_transform(
80+
{
81+
"name": name,
82+
"created_at": created_at,
83+
"updated_at": updated_at,
84+
},
85+
tag_create_params.TagCreateParams,
86+
),
7787
options=make_request_options(
7888
extra_headers=extra_headers,
7989
extra_query=extra_query,
@@ -90,6 +100,8 @@ def update(
90100
*,
91101
account_id: str,
92102
name: str,
103+
created_at: Union[str, datetime] | NotGiven = NOT_GIVEN,
104+
updated_at: Union[str, datetime] | NotGiven = NOT_GIVEN,
93105
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
94106
# The extra values given here take precedence over values defined on the client or passed to this method.
95107
extra_headers: Headers | None = None,
@@ -121,7 +133,14 @@ def update(
121133
raise ValueError(f"Expected a non-empty value for `tag_name` but received {tag_name!r}")
122134
return self._put(
123135
f"/accounts/{account_id}/access/tags/{tag_name}",
124-
body=maybe_transform({"name": name}, tag_update_params.TagUpdateParams),
136+
body=maybe_transform(
137+
{
138+
"name": name,
139+
"created_at": created_at,
140+
"updated_at": updated_at,
141+
},
142+
tag_update_params.TagUpdateParams,
143+
),
125144
options=make_request_options(
126145
extra_headers=extra_headers,
127146
extra_query=extra_query,
@@ -271,6 +290,8 @@ async def create(
271290
*,
272291
account_id: str,
273292
name: str,
293+
created_at: Union[str, datetime] | NotGiven = NOT_GIVEN,
294+
updated_at: Union[str, datetime] | NotGiven = NOT_GIVEN,
274295
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
275296
# The extra values given here take precedence over values defined on the client or passed to this method.
276297
extra_headers: Headers | None = None,
@@ -298,7 +319,14 @@ async def create(
298319
raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
299320
return await self._post(
300321
f"/accounts/{account_id}/access/tags",
301-
body=await async_maybe_transform({"name": name}, tag_create_params.TagCreateParams),
322+
body=await async_maybe_transform(
323+
{
324+
"name": name,
325+
"created_at": created_at,
326+
"updated_at": updated_at,
327+
},
328+
tag_create_params.TagCreateParams,
329+
),
302330
options=make_request_options(
303331
extra_headers=extra_headers,
304332
extra_query=extra_query,
@@ -315,6 +343,8 @@ async def update(
315343
*,
316344
account_id: str,
317345
name: str,
346+
created_at: Union[str, datetime] | NotGiven = NOT_GIVEN,
347+
updated_at: Union[str, datetime] | NotGiven = NOT_GIVEN,
318348
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
319349
# The extra values given here take precedence over values defined on the client or passed to this method.
320350
extra_headers: Headers | None = None,
@@ -346,7 +376,14 @@ async def update(
346376
raise ValueError(f"Expected a non-empty value for `tag_name` but received {tag_name!r}")
347377
return await self._put(
348378
f"/accounts/{account_id}/access/tags/{tag_name}",
349-
body=await async_maybe_transform({"name": name}, tag_update_params.TagUpdateParams),
379+
body=await async_maybe_transform(
380+
{
381+
"name": name,
382+
"created_at": created_at,
383+
"updated_at": updated_at,
384+
},
385+
tag_update_params.TagUpdateParams,
386+
),
350387
options=make_request_options(
351388
extra_headers=extra_headers,
352389
extra_query=extra_query,

0 commit comments

Comments
 (0)