Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(api): update via SDK Studio #270

Merged
merged 1 commit into from
Apr 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 11 additions & 25 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -5047,7 +5047,10 @@ Methods:
Types:

```python
from cloudflare.types.zero_trust.access.applications import UserPolicyCheckListResponse
from cloudflare.types.zero_trust.access.applications import (
UserPolicyCheckGeo,
UserPolicyCheckListResponse,
)
```

Methods:
Expand Down Expand Up @@ -5285,11 +5288,7 @@ Methods:
Types:

```python
from cloudflare.types.zero_trust import (
NetworkPath,
Percentiles,
UnnamedSchemaRefBf9e2abcf1b78a6cab8e6e29e2228a11,
)
from cloudflare.types.zero_trust import DeviceExperienceMonitor, NetworkPath, Percentiles
```

### Colos
Expand Down Expand Up @@ -5665,10 +5664,10 @@ from cloudflare.types.zero_trust.gateway import (
CustomCertificateSettings,
ExtendedEmailMatching,
FipsSettings,
GatewayConfigurationSettings,
NotificationSettings,
ProtocolDetection,
TLSSettings,
UnnamedSchemaRef055aaf3918bf29f81c09d394a864182e,
ConfigurationUpdateResponse,
ConfigurationEditResponse,
ConfigurationGetResponse,
Expand Down Expand Up @@ -5723,12 +5722,7 @@ Methods:
Types:

```python
from cloudflare.types.zero_trust.gateway import (
Location,
LocationNetwork,
UnnamedSchemaRef1b37523fdb0ae5806cd8e062492aab66,
LocationDeleteResponse,
)
from cloudflare.types.zero_trust.gateway import Location, LocationNetwork, LocationDeleteResponse
```

Methods:
Expand All @@ -5744,10 +5738,7 @@ Methods:
Types:

```python
from cloudflare.types.zero_trust.gateway import (
LoggingSetting,
UnnamedSchemaRefE86eeb84b7e922c35cfb0031a6309f7b,
)
from cloudflare.types.zero_trust.gateway import LoggingSetting
```

Methods:
Expand All @@ -5763,7 +5754,6 @@ Types:
from cloudflare.types.zero_trust.gateway import (
GatewayIPs,
ProxyEndpoint,
UnnamedSchemaRef4753ee81779d0e57189420079abab61e,
ProxyEndpointDeleteResponse,
)
```
Expand Down Expand Up @@ -5807,11 +5797,7 @@ Methods:
Types:

```python
from cloudflare.types.zero_trust.networks import (
Route,
Teamnet,
UnnamedSchemaRefC125d35cbb7f93aab989cd19bd764ed6,
)
from cloudflare.types.zero_trust.networks import NetworkRoute, Route, Teamnet
```

Methods:
Expand Down Expand Up @@ -5982,8 +5968,8 @@ Types:

```python
from cloudflare.types.url_scanner import (
UnnamedSchemaRef3750739f772bbdf0bb00d6634ccc0631,
UnnamedSchemaRef6d7a78acccfc753a8e931b1c4e72b6a6,
URLScannerDomain,
URLScannerTask,
ScanCreateResponse,
ScanGetResponse,
ScanHarResponse,
Expand Down
10 changes: 5 additions & 5 deletions src/cloudflare/resources/zero_trust/gateway/configurations.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
ConfigurationGetResponse,
ConfigurationEditResponse,
ConfigurationUpdateResponse,
UnnamedSchemaRef055aaf3918bf29f81c09d394a864182eParam,
GatewayConfigurationSettingsParam,
configuration_edit_params,
configuration_update_params,
)
Expand All @@ -48,7 +48,7 @@ def update(
self,
*,
account_id: str,
settings: UnnamedSchemaRef055aaf3918bf29f81c09d394a864182eParam | NotGiven = NOT_GIVEN,
settings: GatewayConfigurationSettingsParam | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
Expand Down Expand Up @@ -89,7 +89,7 @@ def edit(
self,
*,
account_id: str,
settings: UnnamedSchemaRef055aaf3918bf29f81c09d394a864182eParam | NotGiven = NOT_GIVEN,
settings: GatewayConfigurationSettingsParam | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
Expand Down Expand Up @@ -182,7 +182,7 @@ async def update(
self,
*,
account_id: str,
settings: UnnamedSchemaRef055aaf3918bf29f81c09d394a864182eParam | NotGiven = NOT_GIVEN,
settings: GatewayConfigurationSettingsParam | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
Expand Down Expand Up @@ -225,7 +225,7 @@ async def edit(
self,
*,
account_id: str,
settings: UnnamedSchemaRef055aaf3918bf29f81c09d394a864182eParam | NotGiven = NOT_GIVEN,
settings: GatewayConfigurationSettingsParam | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
Expand Down
10 changes: 3 additions & 7 deletions src/cloudflare/resources/zero_trust/gateway/logging.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,7 @@
from ...._base_client import (
make_request_options,
)
from ....types.zero_trust.gateway import (
LoggingSetting,
UnnamedSchemaRefE86eeb84b7e922c35cfb0031a6309f7bParam,
logging_update_params,
)
from ....types.zero_trust.gateway import LoggingSetting, logging_update_params

__all__ = ["Logging", "AsyncLogging"]

Expand All @@ -46,7 +42,7 @@ def update(
*,
account_id: str,
redact_pii: bool | NotGiven = NOT_GIVEN,
settings_by_rule_type: UnnamedSchemaRefE86eeb84b7e922c35cfb0031a6309f7bParam | NotGiven = NOT_GIVEN,
settings_by_rule_type: logging_update_params.SettingsByRuleType | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
Expand Down Expand Up @@ -144,7 +140,7 @@ async def update(
*,
account_id: str,
redact_pii: bool | NotGiven = NOT_GIVEN,
settings_by_rule_type: UnnamedSchemaRefE86eeb84b7e922c35cfb0031a6309f7bParam | NotGiven = NOT_GIVEN,
settings_by_rule_type: logging_update_params.SettingsByRuleType | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
Expand Down
4 changes: 1 addition & 3 deletions src/cloudflare/types/url_scanner/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
from .scan_get_response import ScanGetResponse as ScanGetResponse
from .scan_har_response import ScanHarResponse as ScanHarResponse
from .scan_create_params import ScanCreateParams as ScanCreateParams
from .url_scanner_domain import URLScannerDomain as URLScannerDomain
from .scan_create_response import ScanCreateResponse as ScanCreateResponse
from .scan_screenshot_params import ScanScreenshotParams as ScanScreenshotParams
from .unnamed_schema_ref_6d7a78acccfc753a8e931b1c4e72b6a6 import (
UnnamedSchemaRef6d7a78acccfc753a8e931b1c4e72b6a6 as UnnamedSchemaRef6d7a78acccfc753a8e931b1c4e72b6a6,
)
12 changes: 6 additions & 6 deletions src/cloudflare/types/url_scanner/scan_get_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

from ..._models import BaseModel
from ..radar.http import Browser
from .unnamed_schema_ref_6d7a78acccfc753a8e931b1c4e72b6a6 import UnnamedSchemaRef6d7a78acccfc753a8e931b1c4e72b6a6
from .url_scanner_domain import URLScannerDomain

__all__ = [
"ScanGetResponse",
Expand Down Expand Up @@ -78,7 +78,7 @@ class ScanMetaProcessorsCategoriesRisk(BaseModel):


class ScanMetaProcessorsCategories(BaseModel):
content: List[UnnamedSchemaRef6d7a78acccfc753a8e931b1c4e72b6a6]
content: List[URLScannerDomain]

risks: List[ScanMetaProcessorsCategoriesRisk]

Expand Down Expand Up @@ -401,19 +401,19 @@ class ScanASNs(BaseModel):


class ScanDomainsExampleComCategoriesInherited(BaseModel):
content: Optional[List[UnnamedSchemaRef6d7a78acccfc753a8e931b1c4e72b6a6]] = None
content: Optional[List[URLScannerDomain]] = None

from_: Optional[str] = FieldInfo(alias="from", default=None)

risks: Optional[List[UnnamedSchemaRef6d7a78acccfc753a8e931b1c4e72b6a6]] = None
risks: Optional[List[URLScannerDomain]] = None


class ScanDomainsExampleComCategories(BaseModel):
inherited: ScanDomainsExampleComCategoriesInherited

content: Optional[List[UnnamedSchemaRef6d7a78acccfc753a8e931b1c4e72b6a6]] = None
content: Optional[List[URLScannerDomain]] = None

risks: Optional[List[UnnamedSchemaRef6d7a78acccfc753a8e931b1c4e72b6a6]] = None
risks: Optional[List[URLScannerDomain]] = None


class ScanDomainsExampleComDNS(BaseModel):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@

from ..._models import BaseModel

__all__ = ["UnnamedSchemaRef6d7a78acccfc753a8e931b1c4e72b6a6"]
__all__ = ["URLScannerDomain"]


class UnnamedSchemaRef6d7a78acccfc753a8e931b1c4e72b6a6(BaseModel):
class URLScannerDomain(BaseModel):
id: int

name: str
Expand Down
4 changes: 1 addition & 3 deletions src/cloudflare/types/zero_trust/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
from .gateway_list_response import GatewayListResponse as GatewayListResponse
from .identity_provider_type import IdentityProviderType as IdentityProviderType
from .gateway_create_response import GatewayCreateResponse as GatewayCreateResponse
from .device_experience_monitor import DeviceExperienceMonitor as DeviceExperienceMonitor
from .generic_oauth_config_param import GenericOAuthConfigParam as GenericOAuthConfigParam
from .organization_create_params import OrganizationCreateParams as OrganizationCreateParams
from .organization_update_params import OrganizationUpdateParams as OrganizationUpdateParams
Expand All @@ -40,6 +41,3 @@
from .identity_provider_delete_response import IdentityProviderDeleteResponse as IdentityProviderDeleteResponse
from .connectivity_setting_edit_response import ConnectivitySettingEditResponse as ConnectivitySettingEditResponse
from .organization_revoke_users_response import OrganizationRevokeUsersResponse as OrganizationRevokeUsersResponse
from .unnamed_schema_ref_bf9e2abcf1b78a6cab8e6e29e2228a11 import (
UnnamedSchemaRefBf9e2abcf1b78a6cab8e6e29e2228a11 as UnnamedSchemaRefBf9e2abcf1b78a6cab8e6e29e2228a11,
)
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,6 @@
from .approval_group_param import ApprovalGroupParam as ApprovalGroupParam
from .policy_create_params import PolicyCreateParams as PolicyCreateParams
from .policy_update_params import PolicyUpdateParams as PolicyUpdateParams
from .user_policy_check_geo import UserPolicyCheckGeo as UserPolicyCheckGeo
from .policy_delete_response import PolicyDeleteResponse as PolicyDeleteResponse
from .user_policy_check_list_response import UserPolicyCheckListResponse as UserPolicyCheckListResponse
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

from typing import Optional

from ....._models import BaseModel

__all__ = ["UserPolicyCheckGeo"]


class UserPolicyCheckGeo(BaseModel):
country: Optional[str] = None
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@
from typing import List, Optional

from ....._models import BaseModel
from .user_policy_check_geo import UserPolicyCheckGeo

__all__ = ["UserPolicyCheckListResponse", "AppState", "UserIdentity", "UserIdentityGeo"]
__all__ = ["UserPolicyCheckListResponse", "AppState", "UserIdentity"]


class AppState(BaseModel):
Expand All @@ -22,10 +23,6 @@ class AppState(BaseModel):
status: Optional[str] = None


class UserIdentityGeo(BaseModel):
country: Optional[str] = None


class UserIdentity(BaseModel):
id: Optional[str] = None

Expand All @@ -35,7 +32,7 @@ class UserIdentity(BaseModel):

email: Optional[str] = None

geo: Optional[UserIdentityGeo] = None
geo: Optional[UserPolicyCheckGeo] = None

iat: Optional[int] = None

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,9 @@
from pydantic import Field as FieldInfo

from ....._models import BaseModel
from ..applications import UserPolicyCheckGeo

__all__ = [
"ActiveSessionGetResponse",
"DeviceSessions",
"DevicePosture",
"DevicePostureCheck",
"Geo",
"IDP",
"MTLSAuth",
]
__all__ = ["ActiveSessionGetResponse", "DeviceSessions", "DevicePosture", "DevicePostureCheck", "IDP", "MTLSAuth"]


class DeviceSessions(BaseModel):
Expand Down Expand Up @@ -47,10 +40,6 @@ class DevicePosture(BaseModel):
type: Optional[str] = None


class Geo(BaseModel):
country: Optional[str] = None


class IDP(BaseModel):
id: Optional[str] = None

Expand Down Expand Up @@ -84,7 +73,7 @@ class ActiveSessionGetResponse(BaseModel):

email: Optional[str] = None

geo: Optional[Geo] = None
geo: Optional[UserPolicyCheckGeo] = None

iat: Optional[float] = None

Expand Down
9 changes: 3 additions & 6 deletions src/cloudflare/types/zero_trust/access/users/identity.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@
from pydantic import Field as FieldInfo

from ....._models import BaseModel
from ..applications import UserPolicyCheckGeo

__all__ = ["Identity", "DeviceSessions", "DevicePosture", "DevicePostureCheck", "Geo", "IDP", "MTLSAuth"]
__all__ = ["Identity", "DeviceSessions", "DevicePosture", "DevicePostureCheck", "IDP", "MTLSAuth"]


class DeviceSessions(BaseModel):
Expand Down Expand Up @@ -39,10 +40,6 @@ class DevicePosture(BaseModel):
type: Optional[str] = None


class Geo(BaseModel):
country: Optional[str] = None


class IDP(BaseModel):
id: Optional[str] = None

Expand Down Expand Up @@ -76,7 +73,7 @@ class Identity(BaseModel):

email: Optional[str] = None

geo: Optional[Geo] = None
geo: Optional[UserPolicyCheckGeo] = None

iat: Optional[float] = None

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

from ..._models import BaseModel

__all__ = ["UnnamedSchemaRefBf9e2abcf1b78a6cab8e6e29e2228a11"]
__all__ = ["DeviceExperienceMonitor"]


class UnnamedSchemaRefBf9e2abcf1b78a6cab8e6e29e2228a11(BaseModel):
class DeviceExperienceMonitor(BaseModel):
id: str

default: bool
Expand Down
Loading