Skip to content

Commit

Permalink
feat(api): OpenAPI spec update via Stainless API (#316)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-app[bot] authored and stainless-bot committed Apr 22, 2024
1 parent d42b574 commit 032d4ea
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 50 deletions.
8 changes: 4 additions & 4 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -7272,11 +7272,11 @@ from cloudflare.types import CallsApp, CallsAppWithSecret

Methods:

- <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>
- <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>
- <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>
- <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>
- <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>
- <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>
- <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>
- <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>
- <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>

# CloudforceOne

Expand Down
34 changes: 17 additions & 17 deletions src/cloudflare/resources/calls.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from __future__ import annotations

from typing import Type, Optional, cast
from typing import Type, cast

import httpx

Expand Down Expand Up @@ -50,7 +50,7 @@ def create(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> Optional[CallsAppWithSecret]:
) -> CallsAppWithSecret:
"""Creates a new Cloudflare calls app.
An app is an unique enviroment where each
Expand Down Expand Up @@ -81,7 +81,7 @@ def create(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
cast_to=cast(Type[Optional[CallsAppWithSecret]], ResultWrapper[CallsAppWithSecret]),
cast_to=cast(Type[CallsAppWithSecret], ResultWrapper[CallsAppWithSecret]),
)

def update(
Expand All @@ -96,7 +96,7 @@ def update(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> Optional[CallsApp]:
) -> CallsApp:
"""
Edit details for a single app.
Expand Down Expand Up @@ -129,7 +129,7 @@ def update(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
cast_to=cast(Type[Optional[CallsApp]], ResultWrapper[CallsApp]),
cast_to=cast(Type[CallsApp], ResultWrapper[CallsApp]),
)

def list(
Expand Down Expand Up @@ -179,7 +179,7 @@ def delete(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> Optional[CallsApp]:
) -> CallsApp:
"""
Deletes an app from Cloudflare Calls
Expand Down Expand Up @@ -209,7 +209,7 @@ def delete(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
cast_to=cast(Type[Optional[CallsApp]], ResultWrapper[CallsApp]),
cast_to=cast(Type[CallsApp], ResultWrapper[CallsApp]),
)

def get(
Expand All @@ -223,7 +223,7 @@ def get(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> Optional[CallsApp]:
) -> CallsApp:
"""
Fetches details for a single Calls app.
Expand Down Expand Up @@ -253,7 +253,7 @@ def get(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
cast_to=cast(Type[Optional[CallsApp]], ResultWrapper[CallsApp]),
cast_to=cast(Type[CallsApp], ResultWrapper[CallsApp]),
)


Expand All @@ -277,7 +277,7 @@ async def create(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> Optional[CallsAppWithSecret]:
) -> CallsAppWithSecret:
"""Creates a new Cloudflare calls app.
An app is an unique enviroment where each
Expand Down Expand Up @@ -308,7 +308,7 @@ async def create(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
cast_to=cast(Type[Optional[CallsAppWithSecret]], ResultWrapper[CallsAppWithSecret]),
cast_to=cast(Type[CallsAppWithSecret], ResultWrapper[CallsAppWithSecret]),
)

async def update(
Expand All @@ -323,7 +323,7 @@ async def update(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> Optional[CallsApp]:
) -> CallsApp:
"""
Edit details for a single app.
Expand Down Expand Up @@ -356,7 +356,7 @@ async def update(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
cast_to=cast(Type[Optional[CallsApp]], ResultWrapper[CallsApp]),
cast_to=cast(Type[CallsApp], ResultWrapper[CallsApp]),
)

def list(
Expand Down Expand Up @@ -406,7 +406,7 @@ async def delete(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> Optional[CallsApp]:
) -> CallsApp:
"""
Deletes an app from Cloudflare Calls
Expand Down Expand Up @@ -436,7 +436,7 @@ async def delete(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
cast_to=cast(Type[Optional[CallsApp]], ResultWrapper[CallsApp]),
cast_to=cast(Type[CallsApp], ResultWrapper[CallsApp]),
)

async def get(
Expand All @@ -450,7 +450,7 @@ async def get(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> Optional[CallsApp]:
) -> CallsApp:
"""
Fetches details for a single Calls app.
Expand Down Expand Up @@ -480,7 +480,7 @@ async def get(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
cast_to=cast(Type[Optional[CallsApp]], ResultWrapper[CallsApp]),
cast_to=cast(Type[CallsApp], ResultWrapper[CallsApp]),
)


Expand Down
Loading

0 comments on commit 032d4ea

Please sign in to comment.