Skip to content

Commit 0b41651

Browse files
stainless-app[bot]stainless-bot
authored andcommitted
feat(api): OpenAPI spec update via Stainless API (#337)
1 parent 0b9bdab commit 0b41651

17 files changed

+326
-326
lines changed

api.md

+26-26
Large diffs are not rendered by default.

src/cloudflare/resources/zero_trust/gateway/audit_ssh_settings.py

+9-9
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
from __future__ import annotations
44

5-
from typing import Type, cast
5+
from typing import Type, Optional, cast
66

77
import httpx
88

@@ -49,7 +49,7 @@ def update(
4949
extra_query: Query | None = None,
5050
extra_body: Body | None = None,
5151
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
52-
) -> GatewaySettings:
52+
) -> Optional[GatewaySettings]:
5353
"""
5454
Updates Zero Trust Audit SSH settings.
5555
@@ -84,7 +84,7 @@ def update(
8484
timeout=timeout,
8585
post_parser=ResultWrapper._unwrapper,
8686
),
87-
cast_to=cast(Type[GatewaySettings], ResultWrapper[GatewaySettings]),
87+
cast_to=cast(Type[Optional[GatewaySettings]], ResultWrapper[GatewaySettings]),
8888
)
8989

9090
def get(
@@ -97,7 +97,7 @@ def get(
9797
extra_query: Query | None = None,
9898
extra_body: Body | None = None,
9999
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
100-
) -> GatewaySettings:
100+
) -> Optional[GatewaySettings]:
101101
"""
102102
Get all Zero Trust Audit SSH settings for an account.
103103
@@ -121,7 +121,7 @@ def get(
121121
timeout=timeout,
122122
post_parser=ResultWrapper._unwrapper,
123123
),
124-
cast_to=cast(Type[GatewaySettings], ResultWrapper[GatewaySettings]),
124+
cast_to=cast(Type[Optional[GatewaySettings]], ResultWrapper[GatewaySettings]),
125125
)
126126

127127

@@ -146,7 +146,7 @@ async def update(
146146
extra_query: Query | None = None,
147147
extra_body: Body | None = None,
148148
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
149-
) -> GatewaySettings:
149+
) -> Optional[GatewaySettings]:
150150
"""
151151
Updates Zero Trust Audit SSH settings.
152152
@@ -181,7 +181,7 @@ async def update(
181181
timeout=timeout,
182182
post_parser=ResultWrapper._unwrapper,
183183
),
184-
cast_to=cast(Type[GatewaySettings], ResultWrapper[GatewaySettings]),
184+
cast_to=cast(Type[Optional[GatewaySettings]], ResultWrapper[GatewaySettings]),
185185
)
186186

187187
async def get(
@@ -194,7 +194,7 @@ async def get(
194194
extra_query: Query | None = None,
195195
extra_body: Body | None = None,
196196
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
197-
) -> GatewaySettings:
197+
) -> Optional[GatewaySettings]:
198198
"""
199199
Get all Zero Trust Audit SSH settings for an account.
200200
@@ -218,7 +218,7 @@ async def get(
218218
timeout=timeout,
219219
post_parser=ResultWrapper._unwrapper,
220220
),
221-
cast_to=cast(Type[GatewaySettings], ResultWrapper[GatewaySettings]),
221+
cast_to=cast(Type[Optional[GatewaySettings]], ResultWrapper[GatewaySettings]),
222222
)
223223

224224

src/cloudflare/resources/zero_trust/gateway/configurations.py

+13-13
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
from __future__ import annotations
44

5-
from typing import Type, cast
5+
from typing import Type, Optional, cast
66

77
import httpx
88

@@ -55,7 +55,7 @@ def update(
5555
extra_query: Query | None = None,
5656
extra_body: Body | None = None,
5757
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
58-
) -> ConfigurationUpdateResponse:
58+
) -> Optional[ConfigurationUpdateResponse]:
5959
"""
6060
Updates the current Zero Trust account configuration.
6161
@@ -82,7 +82,7 @@ def update(
8282
timeout=timeout,
8383
post_parser=ResultWrapper._unwrapper,
8484
),
85-
cast_to=cast(Type[ConfigurationUpdateResponse], ResultWrapper[ConfigurationUpdateResponse]),
85+
cast_to=cast(Type[Optional[ConfigurationUpdateResponse]], ResultWrapper[ConfigurationUpdateResponse]),
8686
)
8787

8888
def edit(
@@ -96,7 +96,7 @@ def edit(
9696
extra_query: Query | None = None,
9797
extra_body: Body | None = None,
9898
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
99-
) -> ConfigurationEditResponse:
99+
) -> Optional[ConfigurationEditResponse]:
100100
"""Patches the current Zero Trust account configuration.
101101
102102
This endpoint can update a
@@ -128,7 +128,7 @@ def edit(
128128
timeout=timeout,
129129
post_parser=ResultWrapper._unwrapper,
130130
),
131-
cast_to=cast(Type[ConfigurationEditResponse], ResultWrapper[ConfigurationEditResponse]),
131+
cast_to=cast(Type[Optional[ConfigurationEditResponse]], ResultWrapper[ConfigurationEditResponse]),
132132
)
133133

134134
def get(
@@ -141,7 +141,7 @@ def get(
141141
extra_query: Query | None = None,
142142
extra_body: Body | None = None,
143143
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
144-
) -> ConfigurationGetResponse:
144+
) -> Optional[ConfigurationGetResponse]:
145145
"""
146146
Fetches the current Zero Trust account configuration.
147147
@@ -165,7 +165,7 @@ def get(
165165
timeout=timeout,
166166
post_parser=ResultWrapper._unwrapper,
167167
),
168-
cast_to=cast(Type[ConfigurationGetResponse], ResultWrapper[ConfigurationGetResponse]),
168+
cast_to=cast(Type[Optional[ConfigurationGetResponse]], ResultWrapper[ConfigurationGetResponse]),
169169
)
170170

171171

@@ -189,7 +189,7 @@ async def update(
189189
extra_query: Query | None = None,
190190
extra_body: Body | None = None,
191191
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
192-
) -> ConfigurationUpdateResponse:
192+
) -> Optional[ConfigurationUpdateResponse]:
193193
"""
194194
Updates the current Zero Trust account configuration.
195195
@@ -218,7 +218,7 @@ async def update(
218218
timeout=timeout,
219219
post_parser=ResultWrapper._unwrapper,
220220
),
221-
cast_to=cast(Type[ConfigurationUpdateResponse], ResultWrapper[ConfigurationUpdateResponse]),
221+
cast_to=cast(Type[Optional[ConfigurationUpdateResponse]], ResultWrapper[ConfigurationUpdateResponse]),
222222
)
223223

224224
async def edit(
@@ -232,7 +232,7 @@ async def edit(
232232
extra_query: Query | None = None,
233233
extra_body: Body | None = None,
234234
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
235-
) -> ConfigurationEditResponse:
235+
) -> Optional[ConfigurationEditResponse]:
236236
"""Patches the current Zero Trust account configuration.
237237
238238
This endpoint can update a
@@ -264,7 +264,7 @@ async def edit(
264264
timeout=timeout,
265265
post_parser=ResultWrapper._unwrapper,
266266
),
267-
cast_to=cast(Type[ConfigurationEditResponse], ResultWrapper[ConfigurationEditResponse]),
267+
cast_to=cast(Type[Optional[ConfigurationEditResponse]], ResultWrapper[ConfigurationEditResponse]),
268268
)
269269

270270
async def get(
@@ -277,7 +277,7 @@ async def get(
277277
extra_query: Query | None = None,
278278
extra_body: Body | None = None,
279279
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
280-
) -> ConfigurationGetResponse:
280+
) -> Optional[ConfigurationGetResponse]:
281281
"""
282282
Fetches the current Zero Trust account configuration.
283283
@@ -301,7 +301,7 @@ async def get(
301301
timeout=timeout,
302302
post_parser=ResultWrapper._unwrapper,
303303
),
304-
cast_to=cast(Type[ConfigurationGetResponse], ResultWrapper[ConfigurationGetResponse]),
304+
cast_to=cast(Type[Optional[ConfigurationGetResponse]], ResultWrapper[ConfigurationGetResponse]),
305305
)
306306

307307

src/cloudflare/resources/zero_trust/gateway/gateway.py

+9-9
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
from __future__ import annotations
44

5-
from typing import Type, cast
5+
from typing import Type, Optional, cast
66

77
import httpx
88

@@ -152,7 +152,7 @@ def create(
152152
extra_query: Query | None = None,
153153
extra_body: Body | None = None,
154154
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
155-
) -> GatewayCreateResponse:
155+
) -> Optional[GatewayCreateResponse]:
156156
"""
157157
Creates a Zero Trust account with an existing Cloudflare account.
158158
@@ -176,7 +176,7 @@ def create(
176176
timeout=timeout,
177177
post_parser=ResultWrapper._unwrapper,
178178
),
179-
cast_to=cast(Type[GatewayCreateResponse], ResultWrapper[GatewayCreateResponse]),
179+
cast_to=cast(Type[Optional[GatewayCreateResponse]], ResultWrapper[GatewayCreateResponse]),
180180
)
181181

182182
def list(
@@ -189,7 +189,7 @@ def list(
189189
extra_query: Query | None = None,
190190
extra_body: Body | None = None,
191191
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
192-
) -> GatewayListResponse:
192+
) -> Optional[GatewayListResponse]:
193193
"""
194194
Gets information about the current Zero Trust account.
195195
@@ -213,7 +213,7 @@ def list(
213213
timeout=timeout,
214214
post_parser=ResultWrapper._unwrapper,
215215
),
216-
cast_to=cast(Type[GatewayListResponse], ResultWrapper[GatewayListResponse]),
216+
cast_to=cast(Type[Optional[GatewayListResponse]], ResultWrapper[GatewayListResponse]),
217217
)
218218

219219

@@ -272,7 +272,7 @@ async def create(
272272
extra_query: Query | None = None,
273273
extra_body: Body | None = None,
274274
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
275-
) -> GatewayCreateResponse:
275+
) -> Optional[GatewayCreateResponse]:
276276
"""
277277
Creates a Zero Trust account with an existing Cloudflare account.
278278
@@ -296,7 +296,7 @@ async def create(
296296
timeout=timeout,
297297
post_parser=ResultWrapper._unwrapper,
298298
),
299-
cast_to=cast(Type[GatewayCreateResponse], ResultWrapper[GatewayCreateResponse]),
299+
cast_to=cast(Type[Optional[GatewayCreateResponse]], ResultWrapper[GatewayCreateResponse]),
300300
)
301301

302302
async def list(
@@ -309,7 +309,7 @@ async def list(
309309
extra_query: Query | None = None,
310310
extra_body: Body | None = None,
311311
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
312-
) -> GatewayListResponse:
312+
) -> Optional[GatewayListResponse]:
313313
"""
314314
Gets information about the current Zero Trust account.
315315
@@ -333,7 +333,7 @@ async def list(
333333
timeout=timeout,
334334
post_parser=ResultWrapper._unwrapper,
335335
),
336-
cast_to=cast(Type[GatewayListResponse], ResultWrapper[GatewayListResponse]),
336+
cast_to=cast(Type[Optional[GatewayListResponse]], ResultWrapper[GatewayListResponse]),
337337
)
338338

339339

0 commit comments

Comments
 (0)