Skip to content

Commit

Permalink
feat(api): manual updates (#1469)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-app[bot] authored and stainless-bot committed Aug 27, 2024
1 parent 12a1447 commit 0b6ca86
Show file tree
Hide file tree
Showing 90 changed files with 584 additions and 652 deletions.
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
configured_endpoints: 1345
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-daf5718c2fa64621d2f8315b857316b40259bcffe50140179cea21e33ef3065f.yml
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-b809f4b7e3c7baf2424fe4f65e37bc79962c60eb7ac861b275ae340331d2e19a.yml
60 changes: 30 additions & 30 deletions api.md

Large diffs are not rendered by default.

26 changes: 13 additions & 13 deletions src/cloudflare/resources/argo/tiered_caching.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, cast
from typing import Type, Optional, cast
from typing_extensions import Literal

import httpx
Expand Down Expand Up @@ -49,7 +49,7 @@ def edit(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> TieredCachingEditResponse:
) -> Optional[TieredCachingEditResponse]:
"""
Updates enablement of Tiered Caching
Expand All @@ -76,9 +76,9 @@ def edit(
extra_query=extra_query,
extra_body=extra_body,
timeout=timeout,
post_parser=ResultWrapper[TieredCachingEditResponse]._unwrapper,
post_parser=ResultWrapper[Optional[TieredCachingEditResponse]]._unwrapper,
),
cast_to=cast(Type[TieredCachingEditResponse], ResultWrapper[TieredCachingEditResponse]),
cast_to=cast(Type[Optional[TieredCachingEditResponse]], ResultWrapper[TieredCachingEditResponse]),
)

def get(
Expand All @@ -91,7 +91,7 @@ def get(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> TieredCachingGetResponse:
) -> Optional[TieredCachingGetResponse]:
"""
Get Tiered Caching setting
Expand All @@ -115,9 +115,9 @@ def get(
extra_query=extra_query,
extra_body=extra_body,
timeout=timeout,
post_parser=ResultWrapper[TieredCachingGetResponse]._unwrapper,
post_parser=ResultWrapper[Optional[TieredCachingGetResponse]]._unwrapper,
),
cast_to=cast(Type[TieredCachingGetResponse], ResultWrapper[TieredCachingGetResponse]),
cast_to=cast(Type[Optional[TieredCachingGetResponse]], ResultWrapper[TieredCachingGetResponse]),
)


Expand All @@ -141,7 +141,7 @@ async def edit(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> TieredCachingEditResponse:
) -> Optional[TieredCachingEditResponse]:
"""
Updates enablement of Tiered Caching
Expand All @@ -168,9 +168,9 @@ async def edit(
extra_query=extra_query,
extra_body=extra_body,
timeout=timeout,
post_parser=ResultWrapper[TieredCachingEditResponse]._unwrapper,
post_parser=ResultWrapper[Optional[TieredCachingEditResponse]]._unwrapper,
),
cast_to=cast(Type[TieredCachingEditResponse], ResultWrapper[TieredCachingEditResponse]),
cast_to=cast(Type[Optional[TieredCachingEditResponse]], ResultWrapper[TieredCachingEditResponse]),
)

async def get(
Expand All @@ -183,7 +183,7 @@ async def get(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> TieredCachingGetResponse:
) -> Optional[TieredCachingGetResponse]:
"""
Get Tiered Caching setting
Expand All @@ -207,9 +207,9 @@ async def get(
extra_query=extra_query,
extra_body=extra_body,
timeout=timeout,
post_parser=ResultWrapper[TieredCachingGetResponse]._unwrapper,
post_parser=ResultWrapper[Optional[TieredCachingGetResponse]]._unwrapper,
),
cast_to=cast(Type[TieredCachingGetResponse], ResultWrapper[TieredCachingGetResponse]),
cast_to=cast(Type[Optional[TieredCachingGetResponse]], ResultWrapper[TieredCachingGetResponse]),
)


Expand Down
50 changes: 25 additions & 25 deletions src/cloudflare/resources/cache/cache_reserve.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, cast
from typing import Type, Optional, cast
from typing_extensions import Literal

import httpx
Expand Down Expand Up @@ -51,7 +51,7 @@ def clear(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> CacheReserveClearResponse:
) -> Optional[CacheReserveClearResponse]:
"""
You can use Cache Reserve Clear to clear your Cache Reserve, but you must first
disable Cache Reserve. In most cases, this will be accomplished within 24 hours.
Expand Down Expand Up @@ -79,9 +79,9 @@ def clear(
extra_query=extra_query,
extra_body=extra_body,
timeout=timeout,
post_parser=ResultWrapper[CacheReserveClearResponse]._unwrapper,
post_parser=ResultWrapper[Optional[CacheReserveClearResponse]]._unwrapper,
),
cast_to=cast(Type[CacheReserveClearResponse], ResultWrapper[CacheReserveClearResponse]),
cast_to=cast(Type[Optional[CacheReserveClearResponse]], ResultWrapper[CacheReserveClearResponse]),
)

def edit(
Expand All @@ -95,7 +95,7 @@ def edit(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> CacheReserveEditResponse:
) -> Optional[CacheReserveEditResponse]:
"""
Increase cache lifetimes by automatically storing all cacheable files into
Cloudflare's persistent object storage buckets. Requires Cache Reserve
Expand Down Expand Up @@ -127,9 +127,9 @@ def edit(
extra_query=extra_query,
extra_body=extra_body,
timeout=timeout,
post_parser=ResultWrapper[CacheReserveEditResponse]._unwrapper,
post_parser=ResultWrapper[Optional[CacheReserveEditResponse]]._unwrapper,
),
cast_to=cast(Type[CacheReserveEditResponse], ResultWrapper[CacheReserveEditResponse]),
cast_to=cast(Type[Optional[CacheReserveEditResponse]], ResultWrapper[CacheReserveEditResponse]),
)

def get(
Expand All @@ -142,7 +142,7 @@ def get(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> CacheReserveGetResponse:
) -> Optional[CacheReserveGetResponse]:
"""
Increase cache lifetimes by automatically storing all cacheable files into
Cloudflare's persistent object storage buckets. Requires Cache Reserve
Expand Down Expand Up @@ -171,9 +171,9 @@ def get(
extra_query=extra_query,
extra_body=extra_body,
timeout=timeout,
post_parser=ResultWrapper[CacheReserveGetResponse]._unwrapper,
post_parser=ResultWrapper[Optional[CacheReserveGetResponse]]._unwrapper,
),
cast_to=cast(Type[CacheReserveGetResponse], ResultWrapper[CacheReserveGetResponse]),
cast_to=cast(Type[Optional[CacheReserveGetResponse]], ResultWrapper[CacheReserveGetResponse]),
)

def status(
Expand All @@ -186,7 +186,7 @@ def status(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> CacheReserveStatusResponse:
) -> Optional[CacheReserveStatusResponse]:
"""
You can use Cache Reserve Clear to clear your Cache Reserve, but you must first
disable Cache Reserve. In most cases, this will be accomplished within 24 hours.
Expand All @@ -213,9 +213,9 @@ def status(
extra_query=extra_query,
extra_body=extra_body,
timeout=timeout,
post_parser=ResultWrapper[CacheReserveStatusResponse]._unwrapper,
post_parser=ResultWrapper[Optional[CacheReserveStatusResponse]]._unwrapper,
),
cast_to=cast(Type[CacheReserveStatusResponse], ResultWrapper[CacheReserveStatusResponse]),
cast_to=cast(Type[Optional[CacheReserveStatusResponse]], ResultWrapper[CacheReserveStatusResponse]),
)


Expand All @@ -239,7 +239,7 @@ async def clear(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> CacheReserveClearResponse:
) -> Optional[CacheReserveClearResponse]:
"""
You can use Cache Reserve Clear to clear your Cache Reserve, but you must first
disable Cache Reserve. In most cases, this will be accomplished within 24 hours.
Expand Down Expand Up @@ -267,9 +267,9 @@ async def clear(
extra_query=extra_query,
extra_body=extra_body,
timeout=timeout,
post_parser=ResultWrapper[CacheReserveClearResponse]._unwrapper,
post_parser=ResultWrapper[Optional[CacheReserveClearResponse]]._unwrapper,
),
cast_to=cast(Type[CacheReserveClearResponse], ResultWrapper[CacheReserveClearResponse]),
cast_to=cast(Type[Optional[CacheReserveClearResponse]], ResultWrapper[CacheReserveClearResponse]),
)

async def edit(
Expand All @@ -283,7 +283,7 @@ async def edit(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> CacheReserveEditResponse:
) -> Optional[CacheReserveEditResponse]:
"""
Increase cache lifetimes by automatically storing all cacheable files into
Cloudflare's persistent object storage buckets. Requires Cache Reserve
Expand Down Expand Up @@ -315,9 +315,9 @@ async def edit(
extra_query=extra_query,
extra_body=extra_body,
timeout=timeout,
post_parser=ResultWrapper[CacheReserveEditResponse]._unwrapper,
post_parser=ResultWrapper[Optional[CacheReserveEditResponse]]._unwrapper,
),
cast_to=cast(Type[CacheReserveEditResponse], ResultWrapper[CacheReserveEditResponse]),
cast_to=cast(Type[Optional[CacheReserveEditResponse]], ResultWrapper[CacheReserveEditResponse]),
)

async def get(
Expand All @@ -330,7 +330,7 @@ async def get(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> CacheReserveGetResponse:
) -> Optional[CacheReserveGetResponse]:
"""
Increase cache lifetimes by automatically storing all cacheable files into
Cloudflare's persistent object storage buckets. Requires Cache Reserve
Expand Down Expand Up @@ -359,9 +359,9 @@ async def get(
extra_query=extra_query,
extra_body=extra_body,
timeout=timeout,
post_parser=ResultWrapper[CacheReserveGetResponse]._unwrapper,
post_parser=ResultWrapper[Optional[CacheReserveGetResponse]]._unwrapper,
),
cast_to=cast(Type[CacheReserveGetResponse], ResultWrapper[CacheReserveGetResponse]),
cast_to=cast(Type[Optional[CacheReserveGetResponse]], ResultWrapper[CacheReserveGetResponse]),
)

async def status(
Expand All @@ -374,7 +374,7 @@ async def status(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> CacheReserveStatusResponse:
) -> Optional[CacheReserveStatusResponse]:
"""
You can use Cache Reserve Clear to clear your Cache Reserve, but you must first
disable Cache Reserve. In most cases, this will be accomplished within 24 hours.
Expand All @@ -401,9 +401,9 @@ async def status(
extra_query=extra_query,
extra_body=extra_body,
timeout=timeout,
post_parser=ResultWrapper[CacheReserveStatusResponse]._unwrapper,
post_parser=ResultWrapper[Optional[CacheReserveStatusResponse]]._unwrapper,
),
cast_to=cast(Type[CacheReserveStatusResponse], ResultWrapper[CacheReserveStatusResponse]),
cast_to=cast(Type[Optional[CacheReserveStatusResponse]], ResultWrapper[CacheReserveStatusResponse]),
)


Expand Down
30 changes: 17 additions & 13 deletions src/cloudflare/resources/cache/regional_tiered_cache.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, cast
from typing import Type, Optional, cast
from typing_extensions import Literal

import httpx
Expand Down Expand Up @@ -49,7 +49,7 @@ def edit(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> RegionalTieredCacheEditResponse:
) -> Optional[RegionalTieredCacheEditResponse]:
"""
Instructs Cloudflare to check a regional hub data center on the way to your
upper tier. This can help improve performance for smart and custom tiered cache
Expand Down Expand Up @@ -78,9 +78,11 @@ def edit(
extra_query=extra_query,
extra_body=extra_body,
timeout=timeout,
post_parser=ResultWrapper[RegionalTieredCacheEditResponse]._unwrapper,
post_parser=ResultWrapper[Optional[RegionalTieredCacheEditResponse]]._unwrapper,
),
cast_to=cast(
Type[Optional[RegionalTieredCacheEditResponse]], ResultWrapper[RegionalTieredCacheEditResponse]
),
cast_to=cast(Type[RegionalTieredCacheEditResponse], ResultWrapper[RegionalTieredCacheEditResponse]),
)

def get(
Expand All @@ -93,7 +95,7 @@ def get(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> RegionalTieredCacheGetResponse:
) -> Optional[RegionalTieredCacheGetResponse]:
"""
Instructs Cloudflare to check a regional hub data center on the way to your
upper tier. This can help improve performance for smart and custom tiered cache
Expand All @@ -119,9 +121,9 @@ def get(
extra_query=extra_query,
extra_body=extra_body,
timeout=timeout,
post_parser=ResultWrapper[RegionalTieredCacheGetResponse]._unwrapper,
post_parser=ResultWrapper[Optional[RegionalTieredCacheGetResponse]]._unwrapper,
),
cast_to=cast(Type[RegionalTieredCacheGetResponse], ResultWrapper[RegionalTieredCacheGetResponse]),
cast_to=cast(Type[Optional[RegionalTieredCacheGetResponse]], ResultWrapper[RegionalTieredCacheGetResponse]),
)


Expand All @@ -145,7 +147,7 @@ async def edit(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> RegionalTieredCacheEditResponse:
) -> Optional[RegionalTieredCacheEditResponse]:
"""
Instructs Cloudflare to check a regional hub data center on the way to your
upper tier. This can help improve performance for smart and custom tiered cache
Expand Down Expand Up @@ -176,9 +178,11 @@ async def edit(
extra_query=extra_query,
extra_body=extra_body,
timeout=timeout,
post_parser=ResultWrapper[RegionalTieredCacheEditResponse]._unwrapper,
post_parser=ResultWrapper[Optional[RegionalTieredCacheEditResponse]]._unwrapper,
),
cast_to=cast(
Type[Optional[RegionalTieredCacheEditResponse]], ResultWrapper[RegionalTieredCacheEditResponse]
),
cast_to=cast(Type[RegionalTieredCacheEditResponse], ResultWrapper[RegionalTieredCacheEditResponse]),
)

async def get(
Expand All @@ -191,7 +195,7 @@ async def get(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> RegionalTieredCacheGetResponse:
) -> Optional[RegionalTieredCacheGetResponse]:
"""
Instructs Cloudflare to check a regional hub data center on the way to your
upper tier. This can help improve performance for smart and custom tiered cache
Expand All @@ -217,9 +221,9 @@ async def get(
extra_query=extra_query,
extra_body=extra_body,
timeout=timeout,
post_parser=ResultWrapper[RegionalTieredCacheGetResponse]._unwrapper,
post_parser=ResultWrapper[Optional[RegionalTieredCacheGetResponse]]._unwrapper,
),
cast_to=cast(Type[RegionalTieredCacheGetResponse], ResultWrapper[RegionalTieredCacheGetResponse]),
cast_to=cast(Type[Optional[RegionalTieredCacheGetResponse]], ResultWrapper[RegionalTieredCacheGetResponse]),
)


Expand Down
Loading

0 comments on commit 0b6ca86

Please sign in to comment.