Skip to content

Commit 032d4ea

Browse files
stainless-app[bot]stainless-bot
authored andcommitted
feat(api): OpenAPI spec update via Stainless API (#316)
1 parent d42b574 commit 032d4ea

File tree

3 files changed

+50
-50
lines changed

3 files changed

+50
-50
lines changed

api.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -7272,11 +7272,11 @@ from cloudflare.types import CallsApp, CallsAppWithSecret
72727272

72737273
Methods:
72747274

7275-
- <code title="post /accounts/{account_id}/calls/apps">client.calls.<a href="./src/cloudflare/resources/calls.py">create</a>(\*, account_id, \*\*<a href="src/cloudflare/types/call_create_params.py">params</a>) -> <a href="./src/cloudflare/types/calls_app_with_secret.py">Optional</a></code>
7276-
- <code title="put /accounts/{account_id}/calls/apps/{app_id}">client.calls.<a href="./src/cloudflare/resources/calls.py">update</a>(app_id, \*, account_id, \*\*<a href="src/cloudflare/types/call_update_params.py">params</a>) -> <a href="./src/cloudflare/types/calls_app.py">Optional</a></code>
7275+
- <code title="post /accounts/{account_id}/calls/apps">client.calls.<a href="./src/cloudflare/resources/calls.py">create</a>(\*, account_id, \*\*<a href="src/cloudflare/types/call_create_params.py">params</a>) -> <a href="./src/cloudflare/types/calls_app_with_secret.py">CallsAppWithSecret</a></code>
7276+
- <code title="put /accounts/{account_id}/calls/apps/{app_id}">client.calls.<a href="./src/cloudflare/resources/calls.py">update</a>(app_id, \*, account_id, \*\*<a href="src/cloudflare/types/call_update_params.py">params</a>) -> <a href="./src/cloudflare/types/calls_app.py">CallsApp</a></code>
72777277
- <code title="get /accounts/{account_id}/calls/apps">client.calls.<a href="./src/cloudflare/resources/calls.py">list</a>(\*, account_id) -> <a href="./src/cloudflare/types/calls_app.py">SyncSinglePage[CallsApp]</a></code>
7278-
- <code title="delete /accounts/{account_id}/calls/apps/{app_id}">client.calls.<a href="./src/cloudflare/resources/calls.py">delete</a>(app_id, \*, account_id) -> <a href="./src/cloudflare/types/calls_app.py">Optional</a></code>
7279-
- <code title="get /accounts/{account_id}/calls/apps/{app_id}">client.calls.<a href="./src/cloudflare/resources/calls.py">get</a>(app_id, \*, account_id) -> <a href="./src/cloudflare/types/calls_app.py">Optional</a></code>
7278+
- <code title="delete /accounts/{account_id}/calls/apps/{app_id}">client.calls.<a href="./src/cloudflare/resources/calls.py">delete</a>(app_id, \*, account_id) -> <a href="./src/cloudflare/types/calls_app.py">CallsApp</a></code>
7279+
- <code title="get /accounts/{account_id}/calls/apps/{app_id}">client.calls.<a href="./src/cloudflare/resources/calls.py">get</a>(app_id, \*, account_id) -> <a href="./src/cloudflare/types/calls_app.py">CallsApp</a></code>
72807280

72817281
# CloudforceOne
72827282

src/cloudflare/resources/calls.py

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

33
from __future__ import annotations
44

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

77
import httpx
88

@@ -50,7 +50,7 @@ def create(
5050
extra_query: Query | None = None,
5151
extra_body: Body | None = None,
5252
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
53-
) -> Optional[CallsAppWithSecret]:
53+
) -> CallsAppWithSecret:
5454
"""Creates a new Cloudflare calls app.
5555
5656
An app is an unique enviroment where each
@@ -81,7 +81,7 @@ def create(
8181
timeout=timeout,
8282
post_parser=ResultWrapper._unwrapper,
8383
),
84-
cast_to=cast(Type[Optional[CallsAppWithSecret]], ResultWrapper[CallsAppWithSecret]),
84+
cast_to=cast(Type[CallsAppWithSecret], ResultWrapper[CallsAppWithSecret]),
8585
)
8686

8787
def update(
@@ -96,7 +96,7 @@ def update(
9696
extra_query: Query | None = None,
9797
extra_body: Body | None = None,
9898
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
99-
) -> Optional[CallsApp]:
99+
) -> CallsApp:
100100
"""
101101
Edit details for a single app.
102102
@@ -129,7 +129,7 @@ def update(
129129
timeout=timeout,
130130
post_parser=ResultWrapper._unwrapper,
131131
),
132-
cast_to=cast(Type[Optional[CallsApp]], ResultWrapper[CallsApp]),
132+
cast_to=cast(Type[CallsApp], ResultWrapper[CallsApp]),
133133
)
134134

135135
def list(
@@ -179,7 +179,7 @@ def delete(
179179
extra_query: Query | None = None,
180180
extra_body: Body | None = None,
181181
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
182-
) -> Optional[CallsApp]:
182+
) -> CallsApp:
183183
"""
184184
Deletes an app from Cloudflare Calls
185185
@@ -209,7 +209,7 @@ def delete(
209209
timeout=timeout,
210210
post_parser=ResultWrapper._unwrapper,
211211
),
212-
cast_to=cast(Type[Optional[CallsApp]], ResultWrapper[CallsApp]),
212+
cast_to=cast(Type[CallsApp], ResultWrapper[CallsApp]),
213213
)
214214

215215
def get(
@@ -223,7 +223,7 @@ def get(
223223
extra_query: Query | None = None,
224224
extra_body: Body | None = None,
225225
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
226-
) -> Optional[CallsApp]:
226+
) -> CallsApp:
227227
"""
228228
Fetches details for a single Calls app.
229229
@@ -253,7 +253,7 @@ def get(
253253
timeout=timeout,
254254
post_parser=ResultWrapper._unwrapper,
255255
),
256-
cast_to=cast(Type[Optional[CallsApp]], ResultWrapper[CallsApp]),
256+
cast_to=cast(Type[CallsApp], ResultWrapper[CallsApp]),
257257
)
258258

259259

@@ -277,7 +277,7 @@ async def create(
277277
extra_query: Query | None = None,
278278
extra_body: Body | None = None,
279279
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
280-
) -> Optional[CallsAppWithSecret]:
280+
) -> CallsAppWithSecret:
281281
"""Creates a new Cloudflare calls app.
282282
283283
An app is an unique enviroment where each
@@ -308,7 +308,7 @@ async def create(
308308
timeout=timeout,
309309
post_parser=ResultWrapper._unwrapper,
310310
),
311-
cast_to=cast(Type[Optional[CallsAppWithSecret]], ResultWrapper[CallsAppWithSecret]),
311+
cast_to=cast(Type[CallsAppWithSecret], ResultWrapper[CallsAppWithSecret]),
312312
)
313313

314314
async def update(
@@ -323,7 +323,7 @@ async def update(
323323
extra_query: Query | None = None,
324324
extra_body: Body | None = None,
325325
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
326-
) -> Optional[CallsApp]:
326+
) -> CallsApp:
327327
"""
328328
Edit details for a single app.
329329
@@ -356,7 +356,7 @@ async def update(
356356
timeout=timeout,
357357
post_parser=ResultWrapper._unwrapper,
358358
),
359-
cast_to=cast(Type[Optional[CallsApp]], ResultWrapper[CallsApp]),
359+
cast_to=cast(Type[CallsApp], ResultWrapper[CallsApp]),
360360
)
361361

362362
def list(
@@ -406,7 +406,7 @@ async def delete(
406406
extra_query: Query | None = None,
407407
extra_body: Body | None = None,
408408
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
409-
) -> Optional[CallsApp]:
409+
) -> CallsApp:
410410
"""
411411
Deletes an app from Cloudflare Calls
412412
@@ -436,7 +436,7 @@ async def delete(
436436
timeout=timeout,
437437
post_parser=ResultWrapper._unwrapper,
438438
),
439-
cast_to=cast(Type[Optional[CallsApp]], ResultWrapper[CallsApp]),
439+
cast_to=cast(Type[CallsApp], ResultWrapper[CallsApp]),
440440
)
441441

442442
async def get(
@@ -450,7 +450,7 @@ async def get(
450450
extra_query: Query | None = None,
451451
extra_body: Body | None = None,
452452
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
453-
) -> Optional[CallsApp]:
453+
) -> CallsApp:
454454
"""
455455
Fetches details for a single Calls app.
456456
@@ -480,7 +480,7 @@ async def get(
480480
timeout=timeout,
481481
post_parser=ResultWrapper._unwrapper,
482482
),
483-
cast_to=cast(Type[Optional[CallsApp]], ResultWrapper[CallsApp]),
483+
cast_to=cast(Type[CallsApp], ResultWrapper[CallsApp]),
484484
)
485485

486486

0 commit comments

Comments
 (0)