Skip to content

Commit

Permalink
feat(api): update via SDK Studio (#778)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-app[bot] authored Jun 3, 2024
1 parent 302c6a0 commit 849c09e
Show file tree
Hide file tree
Showing 17 changed files with 205 additions and 312 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: 1335
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-5be95789763c3b4b655f44e48b2d615e059cdfb5a52d62a7e084c84ffa039fe2.yml
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-e83b5eb5706ca8b525141f506338cd1d465eb133815b9ddc53df612ea4a2ecef.yml
42 changes: 20 additions & 22 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -4068,6 +4068,26 @@ Methods:
- <code title="patch /accounts/{account_id}/magic/sites/{site_id}">client.magic_transit.sites.<a href="./src/cloudflare/resources/magic_transit/sites/sites.py">edit</a>(site_id, \*, account_id, \*\*<a href="src/cloudflare/types/magic_transit/site_edit_params.py">params</a>) -> <a href="./src/cloudflare/types/magic_transit/site.py">Site</a></code>
- <code title="get /accounts/{account_id}/magic/sites/{site_id}">client.magic_transit.sites.<a href="./src/cloudflare/resources/magic_transit/sites/sites.py">get</a>(site_id, \*, account_id) -> <a href="./src/cloudflare/types/magic_transit/site.py">Site</a></code>

### AppConfiguration

Types:

```python
from cloudflare.types.magic_transit.sites import (
AppConfigurationCreateResponse,
AppConfigurationUpdateResponse,
AppConfigurationListResponse,
AppConfigurationDeleteResponse,
)
```

Methods:

- <code title="post /accounts/{account_id}/magic/sites/{site_id}/app_configs">client.magic_transit.sites.app_configuration.<a href="./src/cloudflare/resources/magic_transit/sites/app_configuration.py">create</a>(site_id, \*, account_id, \*\*<a href="src/cloudflare/types/magic_transit/sites/app_configuration_create_params.py">params</a>) -> <a href="./src/cloudflare/types/magic_transit/sites/app_configuration_create_response.py">Optional</a></code>
- <code title="put /accounts/{account_id}/magic/sites/{site_id}/app_configs/{app_config_id}">client.magic_transit.sites.app_configuration.<a href="./src/cloudflare/resources/magic_transit/sites/app_configuration.py">update</a>(app_config_id, \*, account_id, site_id, \*\*<a href="src/cloudflare/types/magic_transit/sites/app_configuration_update_params.py">params</a>) -> <a href="./src/cloudflare/types/magic_transit/sites/app_configuration_update_response.py">Optional</a></code>
- <code title="get /accounts/{account_id}/magic/sites/{site_id}/app_configs">client.magic_transit.sites.app_configuration.<a href="./src/cloudflare/resources/magic_transit/sites/app_configuration.py">list</a>(site_id, \*, account_id) -> <a href="./src/cloudflare/types/magic_transit/sites/app_configuration_list_response.py">SyncSinglePage[AppConfigurationListResponse]</a></code>
- <code title="delete /accounts/{account_id}/magic/sites/{site_id}/app_configs/{app_config_id}">client.magic_transit.sites.app_configuration.<a href="./src/cloudflare/resources/magic_transit/sites/app_configuration.py">delete</a>(app_config_id, \*, account_id, site_id) -> <a href="./src/cloudflare/types/magic_transit/sites/app_configuration_delete_response.py">Optional</a></code>

### ACLs

Types:
Expand Down Expand Up @@ -4127,28 +4147,6 @@ Methods:
- <code title="patch /accounts/{account_id}/magic/sites/{site_id}/wans/{wan_id}">client.magic_transit.sites.wans.<a href="./src/cloudflare/resources/magic_transit/sites/wans.py">edit</a>(wan_id, \*, account_id, site_id, \*\*<a href="src/cloudflare/types/magic_transit/sites/wan_edit_params.py">params</a>) -> <a href="./src/cloudflare/types/magic_transit/sites/wan.py">WAN</a></code>
- <code title="get /accounts/{account_id}/magic/sites/{site_id}/wans/{wan_id}">client.magic_transit.sites.wans.<a href="./src/cloudflare/resources/magic_transit/sites/wans.py">get</a>(wan_id, \*, account_id, site_id) -> <a href="./src/cloudflare/types/magic_transit/sites/wan.py">WAN</a></code>

### Sites

#### AppConfiguration

Types:

```python
from cloudflare.types.magic_transit.sites.sites import (
AppConfigurationCreateResponse,
AppConfigurationUpdateResponse,
AppConfigurationListResponse,
AppConfigurationDeleteResponse,
)
```

Methods:

- <code title="post /accounts/{account_id}/magic/sites/{site_id}/app_configs">client.magic_transit.sites.sites.app_configuration.<a href="./src/cloudflare/resources/magic_transit/sites/sites/app_configuration.py">create</a>(site_id, \*, account_id, \*\*<a href="src/cloudflare/types/magic_transit/sites/sites/app_configuration_create_params.py">params</a>) -> <a href="./src/cloudflare/types/magic_transit/sites/sites/app_configuration_create_response.py">Optional</a></code>
- <code title="put /accounts/{account_id}/magic/sites/{site_id}/app_configs/{app_config_id}">client.magic_transit.sites.sites.app_configuration.<a href="./src/cloudflare/resources/magic_transit/sites/sites/app_configuration.py">update</a>(app_config_id, \*, account_id, site_id, \*\*<a href="src/cloudflare/types/magic_transit/sites/sites/app_configuration_update_params.py">params</a>) -> <a href="./src/cloudflare/types/magic_transit/sites/sites/app_configuration_update_response.py">Optional</a></code>
- <code title="get /accounts/{account_id}/magic/sites/{site_id}/app_configs">client.magic_transit.sites.sites.app_configuration.<a href="./src/cloudflare/resources/magic_transit/sites/sites/app_configuration.py">list</a>(site_id, \*, account_id) -> <a href="./src/cloudflare/types/magic_transit/sites/sites/app_configuration_list_response.py">SyncSinglePage[AppConfigurationListResponse]</a></code>
- <code title="delete /accounts/{account_id}/magic/sites/{site_id}/app_configs/{app_config_id}">client.magic_transit.sites.sites.app_configuration.<a href="./src/cloudflare/resources/magic_transit/sites/sites/app_configuration.py">delete</a>(app_config_id, \*, account_id, site_id) -> <a href="./src/cloudflare/types/magic_transit/sites/sites/app_configuration_delete_response.py">Optional</a></code>

## Connectors

Types:
Expand Down
14 changes: 14 additions & 0 deletions src/cloudflare/resources/magic_transit/sites/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,22 @@
SitesResourceWithStreamingResponse,
AsyncSitesResourceWithStreamingResponse,
)
from .app_configuration import (
AppConfigurationResource,
AsyncAppConfigurationResource,
AppConfigurationResourceWithRawResponse,
AsyncAppConfigurationResourceWithRawResponse,
AppConfigurationResourceWithStreamingResponse,
AsyncAppConfigurationResourceWithStreamingResponse,
)

__all__ = [
"AppConfigurationResource",
"AsyncAppConfigurationResource",
"AppConfigurationResourceWithRawResponse",
"AsyncAppConfigurationResourceWithRawResponse",
"AppConfigurationResourceWithStreamingResponse",
"AsyncAppConfigurationResourceWithStreamingResponse",
"ACLsResource",
"AsyncACLsResource",
"ACLsResourceWithRawResponse",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,31 +6,31 @@

import httpx

from ....._types import NOT_GIVEN, Body, Query, Headers, NotGiven
from ....._utils import (
from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven
from ...._utils import (
required_args,
maybe_transform,
async_maybe_transform,
)
from ....._compat import cached_property
from ....._resource import SyncAPIResource, AsyncAPIResource
from ....._response import (
from ...._compat import cached_property
from ...._resource import SyncAPIResource, AsyncAPIResource
from ...._response import (
to_raw_response_wrapper,
to_streamed_response_wrapper,
async_to_raw_response_wrapper,
async_to_streamed_response_wrapper,
)
from ....._wrappers import ResultWrapper
from .....pagination import SyncSinglePage, AsyncSinglePage
from ....._base_client import (
from ...._wrappers import ResultWrapper
from ....pagination import SyncSinglePage, AsyncSinglePage
from ...._base_client import (
AsyncPaginator,
make_request_options,
)
from .....types.magic_transit.sites.sites import app_configuration_create_params, app_configuration_update_params
from .....types.magic_transit.sites.sites.app_configuration_list_response import AppConfigurationListResponse
from .....types.magic_transit.sites.sites.app_configuration_create_response import AppConfigurationCreateResponse
from .....types.magic_transit.sites.sites.app_configuration_delete_response import AppConfigurationDeleteResponse
from .....types.magic_transit.sites.sites.app_configuration_update_response import AppConfigurationUpdateResponse
from ....types.magic_transit.sites import app_configuration_create_params, app_configuration_update_params
from ....types.magic_transit.sites.app_configuration_list_response import AppConfigurationListResponse
from ....types.magic_transit.sites.app_configuration_create_response import AppConfigurationCreateResponse
from ....types.magic_transit.sites.app_configuration_delete_response import AppConfigurationDeleteResponse
from ....types.magic_transit.sites.app_configuration_update_response import AppConfigurationUpdateResponse

__all__ = ["AppConfigurationResource", "AsyncAppConfigurationResource"]

Expand Down
65 changes: 32 additions & 33 deletions src/cloudflare/resources/magic_transit/sites/sites.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,6 @@
WANsResourceWithStreamingResponse,
AsyncWANsResourceWithStreamingResponse,
)
from .sites import (
SitesResource,
AsyncSitesResource,
SitesResourceWithRawResponse,
AsyncSitesResourceWithRawResponse,
SitesResourceWithStreamingResponse,
AsyncSitesResourceWithStreamingResponse,
sites,
)
from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven
from ...._utils import (
maybe_transform,
Expand All @@ -58,6 +49,14 @@
AsyncPaginator,
make_request_options,
)
from .app_configuration import (
AppConfigurationResource,
AsyncAppConfigurationResource,
AppConfigurationResourceWithRawResponse,
AsyncAppConfigurationResourceWithRawResponse,
AppConfigurationResourceWithStreamingResponse,
AsyncAppConfigurationResourceWithStreamingResponse,
)
from ....types.magic_transit import (
site_edit_params,
site_list_params,
Expand All @@ -71,6 +70,10 @@


class SitesResource(SyncAPIResource):
@cached_property
def app_configuration(self) -> AppConfigurationResource:
return AppConfigurationResource(self._client)

@cached_property
def acls(self) -> ACLsResource:
return ACLsResource(self._client)
Expand All @@ -83,10 +86,6 @@ def lans(self) -> LANsResource:
def wans(self) -> WANsResource:
return WANsResource(self._client)

@cached_property
def sites(self) -> sites.SitesResource:
return SitesResource(self._client)

@cached_property
def with_raw_response(self) -> SitesResourceWithRawResponse:
return SitesResourceWithRawResponse(self)
Expand Down Expand Up @@ -432,6 +431,10 @@ def get(


class AsyncSitesResource(AsyncAPIResource):
@cached_property
def app_configuration(self) -> AsyncAppConfigurationResource:
return AsyncAppConfigurationResource(self._client)

@cached_property
def acls(self) -> AsyncACLsResource:
return AsyncACLsResource(self._client)
Expand All @@ -444,10 +447,6 @@ def lans(self) -> AsyncLANsResource:
def wans(self) -> AsyncWANsResource:
return AsyncWANsResource(self._client)

@cached_property
def sites(self) -> sites.AsyncSitesResource:
return AsyncSitesResource(self._client)

@cached_property
def with_raw_response(self) -> AsyncSitesResourceWithRawResponse:
return AsyncSitesResourceWithRawResponse(self)
Expand Down Expand Up @@ -815,6 +814,10 @@ def __init__(self, sites: SitesResource) -> None:
sites.get,
)

@cached_property
def app_configuration(self) -> AppConfigurationResourceWithRawResponse:
return AppConfigurationResourceWithRawResponse(self._sites.app_configuration)

@cached_property
def acls(self) -> ACLsResourceWithRawResponse:
return ACLsResourceWithRawResponse(self._sites.acls)
Expand All @@ -827,10 +830,6 @@ def lans(self) -> LANsResourceWithRawResponse:
def wans(self) -> WANsResourceWithRawResponse:
return WANsResourceWithRawResponse(self._sites.wans)

@cached_property
def sites(self) -> SitesResourceWithRawResponse:
return SitesResourceWithRawResponse(self._sites.sites)


class AsyncSitesResourceWithRawResponse:
def __init__(self, sites: AsyncSitesResource) -> None:
Expand All @@ -855,6 +854,10 @@ def __init__(self, sites: AsyncSitesResource) -> None:
sites.get,
)

@cached_property
def app_configuration(self) -> AsyncAppConfigurationResourceWithRawResponse:
return AsyncAppConfigurationResourceWithRawResponse(self._sites.app_configuration)

@cached_property
def acls(self) -> AsyncACLsResourceWithRawResponse:
return AsyncACLsResourceWithRawResponse(self._sites.acls)
Expand All @@ -867,10 +870,6 @@ def lans(self) -> AsyncLANsResourceWithRawResponse:
def wans(self) -> AsyncWANsResourceWithRawResponse:
return AsyncWANsResourceWithRawResponse(self._sites.wans)

@cached_property
def sites(self) -> AsyncSitesResourceWithRawResponse:
return AsyncSitesResourceWithRawResponse(self._sites.sites)


class SitesResourceWithStreamingResponse:
def __init__(self, sites: SitesResource) -> None:
Expand All @@ -895,6 +894,10 @@ def __init__(self, sites: SitesResource) -> None:
sites.get,
)

@cached_property
def app_configuration(self) -> AppConfigurationResourceWithStreamingResponse:
return AppConfigurationResourceWithStreamingResponse(self._sites.app_configuration)

@cached_property
def acls(self) -> ACLsResourceWithStreamingResponse:
return ACLsResourceWithStreamingResponse(self._sites.acls)
Expand All @@ -907,10 +910,6 @@ def lans(self) -> LANsResourceWithStreamingResponse:
def wans(self) -> WANsResourceWithStreamingResponse:
return WANsResourceWithStreamingResponse(self._sites.wans)

@cached_property
def sites(self) -> SitesResourceWithStreamingResponse:
return SitesResourceWithStreamingResponse(self._sites.sites)


class AsyncSitesResourceWithStreamingResponse:
def __init__(self, sites: AsyncSitesResource) -> None:
Expand All @@ -935,6 +934,10 @@ def __init__(self, sites: AsyncSitesResource) -> None:
sites.get,
)

@cached_property
def app_configuration(self) -> AsyncAppConfigurationResourceWithStreamingResponse:
return AsyncAppConfigurationResourceWithStreamingResponse(self._sites.app_configuration)

@cached_property
def acls(self) -> AsyncACLsResourceWithStreamingResponse:
return AsyncACLsResourceWithStreamingResponse(self._sites.acls)
Expand All @@ -946,7 +949,3 @@ def lans(self) -> AsyncLANsResourceWithStreamingResponse:
@cached_property
def wans(self) -> AsyncWANsResourceWithStreamingResponse:
return AsyncWANsResourceWithStreamingResponse(self._sites.wans)

@cached_property
def sites(self) -> AsyncSitesResourceWithStreamingResponse:
return AsyncSitesResourceWithStreamingResponse(self._sites.sites)
33 changes: 0 additions & 33 deletions src/cloudflare/resources/magic_transit/sites/sites/__init__.py

This file was deleted.

Loading

0 comments on commit 849c09e

Please sign in to comment.