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

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
71 changes: 17 additions & 54 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -3759,11 +3759,7 @@ Methods:
Types:

```python
from cloudflare.types import (
HealthCheck,
HealthCheckType,
UnnamedSchemaRefEebdc868ce7f7ae92e23438caa84e7b5,
)
from cloudflare.types import HealthCheck, HealthCheckRate, HealthCheckType
```

## CfInterconnects
Expand Down Expand Up @@ -3967,10 +3963,7 @@ Methods:
Types:

```python
from cloudflare.types.magic_network_monitoring import (
Configuration,
UnnamedSchemaRef621ca3f6ea9a96427c902b0d14279ff8,
)
from cloudflare.types.magic_network_monitoring import Configuration
```

Methods:
Expand All @@ -3992,10 +3985,7 @@ Methods:
Types:

```python
from cloudflare.types.magic_network_monitoring import (
MagicNetworkMonitoringRule,
UnnamedSchemaRef99ba74ba6027c3c87ca03d4e81cfc16d,
)
from cloudflare.types.magic_network_monitoring import MagicNetworkMonitoringRule
```

Methods:
Expand Down Expand Up @@ -4198,13 +4188,7 @@ Methods:
Types:

```python
from cloudflare.types.rules import (
Hostname,
List,
Redirect,
UnnamedSchemaRefE706d5e8367564544e2991af82ebb07a,
ListDeleteResponse,
)
from cloudflare.types.rules import Hostname, List, Redirect, ListDeleteResponse
```

Methods:
Expand All @@ -4220,10 +4204,7 @@ Methods:
Types:

```python
from cloudflare.types.rules.lists import (
UnnamedSchemaRefCc279fb99baf6a166db5c4e790a8c6cd,
BulkOperationGetResponse,
)
from cloudflare.types.rules.lists import OperationStatus, BulkOperationGetResponse
```

Methods:
Expand All @@ -4236,8 +4217,8 @@ Types:

```python
from cloudflare.types.rules.lists import (
UnnamedSchemaRef34bb6e31800bc0207c083affa12d2775,
UnnamedSchemaRef46621d4d5b6644caae5c9167b8e28865,
ListCursor,
ListItem,
ItemCreateResponse,
ItemUpdateResponse,
ItemListResponse,
Expand All @@ -4261,11 +4242,7 @@ Methods:
Types:

```python
from cloudflare.types.storage import (
Components,
Schema,
UnnamedSchemaRef608bee5065f7314d6fa572b89a1910f7,
)
from cloudflare.types.storage import Components, Schema
```

Methods:
Expand Down Expand Up @@ -4490,7 +4467,7 @@ Methods:
Types:

```python
from cloudflare.types import UnnamedSchemaRefD6e23adacaca017802aaa484a8b3f405
from cloudflare.types import Alert
```

## AvailableAlerts
Expand Down Expand Up @@ -4753,9 +4730,9 @@ Types:

```python
from cloudflare.types.zero_trust.devices import (
DEXTest,
SchemaData,
SchemaHTTP,
UnnamedSchemaRef15fd6ef0641450fd873ffb71715170c9,
DEXTestDeleteResponse,
)
```
Expand All @@ -4773,11 +4750,7 @@ Methods:
Types:

```python
from cloudflare.types.zero_trust.devices import (
DeviceNetwork,
UnnamedSchemaRefD2b048663faf5e0cd5c90501b71171de,
NetworkDeleteResponse,
)
from cloudflare.types.zero_trust.devices import DeviceNetwork, NetworkDeleteResponse
```

Methods:
Expand All @@ -4793,11 +4766,7 @@ Methods:
Types:

```python
from cloudflare.types.zero_trust.devices import (
SettingsPolicy,
UnnamedSchemaRefF636ff9f2cb41ff4b715cf8ed8515581,
PolicyDeleteResponse,
)
from cloudflare.types.zero_trust.devices import SettingsPolicy, PolicyDeleteResponse
```

Methods:
Expand Down Expand Up @@ -4827,7 +4796,6 @@ Types:
```python
from cloudflare.types.zero_trust.devices.policies import (
SplitTunnelExclude,
UnnamedSchemaRef0462afe1a32ee90b1999d4277af59fa8,
ExcludeUpdateResponse,
ExcludeGetResponse,
)
Expand All @@ -4846,7 +4814,7 @@ Types:
```python
from cloudflare.types.zero_trust.devices.policies import (
FallbackDomain,
UnnamedSchemaRef1fbf91ecd61792c751fead58dc8005e6,
FallbackDomainPolicy,
FallbackDomainUpdateResponse,
FallbackDomainGetResponse,
)
Expand All @@ -4865,7 +4833,6 @@ Types:
```python
from cloudflare.types.zero_trust.devices.policies import (
SplitTunnelInclude,
UnnamedSchemaRef5e0c6134a624678286f4a424b001870a,
IncludeUpdateResponse,
IncludeGetResponse,
)
Expand All @@ -4886,9 +4853,6 @@ from cloudflare.types.zero_trust.devices import (
DeviceInput,
DeviceMatch,
DevicePostureRule,
UnnamedSchemaRef34ef0ad73a63c3f76ed170adca181930,
UnnamedSchemaRef41885dd46b9e0294254c49305a273681,
UnnamedSchemaRef9e35ef84511131488ae286ce78ac4b27,
PostureDeleteResponse,
)
```
Expand All @@ -4906,11 +4870,7 @@ Methods:
Types:

```python
from cloudflare.types.zero_trust.devices.posture import (
Integration,
UnnamedSchemaRefB84b377dfc9454d455b646d4bc9ab507,
IntegrationDeleteResponse,
)
from cloudflare.types.zero_trust.devices.posture import Integration, IntegrationDeleteResponse
```

Methods:
Expand Down Expand Up @@ -5043,6 +5003,9 @@ from cloudflare.types.zero_trust.access import (
Application,
CorsHeaders,
CustomPagesh,
SaasAppNameFormat,
SaasAppNameIDFormat,
SaasAppSource,
SAMLSaasApp,
SelfHostedDomainsh,
ApplicationDeleteResponse,
Expand Down
2 changes: 1 addition & 1 deletion src/cloudflare/_utils/_proxy.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
class LazyProxy(Generic[T], ABC):
"""Implements data methods to pretend that an instance is another instance.

This includes forwarding attribute access and othe methods.
This includes forwarding attribute access and other methods.
"""

# Note: we have to special case proxies that themselves return proxies
Expand Down
4 changes: 1 addition & 3 deletions src/cloudflare/types/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@
from .additional_routes import AdditionalRoutes as AdditionalRoutes
from .cookie_attributes import CookieAttributes as CookieAttributes
from .custom_nameserver import CustomNameserver as CustomNameserver
from .health_check_rate import HealthCheckRate as HealthCheckRate
from .health_check_type import HealthCheckType as HealthCheckType
from .lighthouse_report import LighthouseReport as LighthouseReport
from .location_strategy import LocationStrategy as LocationStrategy
Expand Down Expand Up @@ -356,6 +357,3 @@
from .unnamed_schema_ref_c5858f1f916a921846e0b6159af470a7 import (
UnnamedSchemaRefC5858f1f916a921846e0b6159af470a7 as UnnamedSchemaRefC5858f1f916a921846e0b6159af470a7,
)
from .unnamed_schema_ref_eebdc868ce7f7ae92e23438caa84e7b5 import (
UnnamedSchemaRefEebdc868ce7f7ae92e23438caa84e7b5 as UnnamedSchemaRefEebdc868ce7f7ae92e23438caa84e7b5,
)
4 changes: 2 additions & 2 deletions src/cloudflare/types/health_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
from typing_extensions import Literal

from .._models import BaseModel
from .health_check_rate import HealthCheckRate
from .health_check_type import HealthCheckType
from .unnamed_schema_ref_eebdc868ce7f7ae92e23438caa84e7b5 import UnnamedSchemaRefEebdc868ce7f7ae92e23438caa84e7b5

__all__ = ["HealthCheck"]

Expand All @@ -24,7 +24,7 @@ class HealthCheck(BaseModel):
enabled: Optional[bool] = None
"""Determines whether to run healthchecks for a tunnel."""

rate: Optional[UnnamedSchemaRefEebdc868ce7f7ae92e23438caa84e7b5] = None
rate: Optional[HealthCheckRate] = None
"""How frequent the health check is run. The default value is `mid`."""

target: Optional[str] = None
Expand Down
4 changes: 2 additions & 2 deletions src/cloudflare/types/health_check_param.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

from typing_extensions import Literal, TypedDict

from .health_check_rate import HealthCheckRate
from .health_check_type import HealthCheckType
from .unnamed_schema_ref_eebdc868ce7f7ae92e23438caa84e7b5 import UnnamedSchemaRefEebdc868ce7f7ae92e23438caa84e7b5

__all__ = ["HealthCheckParam"]

Expand All @@ -24,7 +24,7 @@ class HealthCheckParam(TypedDict, total=False):
enabled: bool
"""Determines whether to run healthchecks for a tunnel."""

rate: UnnamedSchemaRefEebdc868ce7f7ae92e23438caa84e7b5
rate: HealthCheckRate
"""How frequent the health check is run. The default value is `mid`."""

target: str
Expand Down
7 changes: 7 additions & 0 deletions src/cloudflare/types/health_check_rate.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

from typing_extensions import Literal

__all__ = ["HealthCheckRate"]

HealthCheckRate = Literal["low", "mid", "high"]
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
from datetime import datetime

from ..._models import BaseModel
from ..health_check_rate import HealthCheckRate
from ..health_check_type import HealthCheckType
from ..unnamed_schema_ref_eebdc868ce7f7ae92e23438caa84e7b5 import UnnamedSchemaRefEebdc868ce7f7ae92e23438caa84e7b5

__all__ = ["CfInterconnectListResponse", "Interconnect", "InterconnectGRE", "InterconnectHealthCheck"]

Expand All @@ -22,7 +22,7 @@ class InterconnectHealthCheck(BaseModel):
enabled: Optional[bool] = None
"""Determines whether to run healthchecks for a tunnel."""

rate: Optional[UnnamedSchemaRefEebdc868ce7f7ae92e23438caa84e7b5] = None
rate: Optional[HealthCheckRate] = None
"""How frequent the health check is run. The default value is `mid`."""

target: Optional[str] = None
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

from typing_extensions import Required, TypedDict

from ..health_check_rate import HealthCheckRate
from ..health_check_type import HealthCheckType
from ..unnamed_schema_ref_eebdc868ce7f7ae92e23438caa84e7b5 import UnnamedSchemaRefEebdc868ce7f7ae92e23438caa84e7b5

__all__ = ["CfInterconnectUpdateParams", "GRE", "HealthCheck"]

Expand Down Expand Up @@ -48,7 +48,7 @@ class HealthCheck(TypedDict, total=False):
enabled: bool
"""Determines whether to run healthchecks for a tunnel."""

rate: UnnamedSchemaRefEebdc868ce7f7ae92e23438caa84e7b5
rate: HealthCheckRate
"""How frequent the health check is run. The default value is `mid`."""

target: str
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@

from ..._models import BaseModel
from .psk_metadata import PSKMetadata
from ..health_check_rate import HealthCheckRate
from ..health_check_type import HealthCheckType
from ..unnamed_schema_ref_eebdc868ce7f7ae92e23438caa84e7b5 import UnnamedSchemaRefEebdc868ce7f7ae92e23438caa84e7b5

__all__ = ["IPSECTunnelCreateResponse", "IPSECTunnel", "IPSECTunnelTunnelHealthCheck"]

Expand All @@ -15,7 +15,7 @@ class IPSECTunnelTunnelHealthCheck(BaseModel):
enabled: Optional[bool] = None
"""Determines whether to run healthchecks for a tunnel."""

rate: Optional[UnnamedSchemaRefEebdc868ce7f7ae92e23438caa84e7b5] = None
rate: Optional[HealthCheckRate] = None
"""How frequent the health check is run. The default value is `mid`."""

target: Optional[str] = None
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@

from ..._models import BaseModel
from .psk_metadata import PSKMetadata
from ..health_check_rate import HealthCheckRate
from ..health_check_type import HealthCheckType
from ..unnamed_schema_ref_eebdc868ce7f7ae92e23438caa84e7b5 import UnnamedSchemaRefEebdc868ce7f7ae92e23438caa84e7b5

__all__ = ["IPSECTunnelListResponse", "IPSECTunnel", "IPSECTunnelTunnelHealthCheck"]

Expand All @@ -15,7 +15,7 @@ class IPSECTunnelTunnelHealthCheck(BaseModel):
enabled: Optional[bool] = None
"""Determines whether to run healthchecks for a tunnel."""

rate: Optional[UnnamedSchemaRefEebdc868ce7f7ae92e23438caa84e7b5] = None
rate: Optional[HealthCheckRate] = None
"""How frequent the health check is run. The default value is `mid`."""

target: Optional[str] = None
Expand Down
8 changes: 2 additions & 6 deletions src/cloudflare/types/rules/lists/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@

from __future__ import annotations

from .list_cursor import ListCursor as ListCursor
from .item_list_params import ItemListParams as ItemListParams
from .operation_status import OperationStatus as OperationStatus
from .item_get_response import ItemGetResponse as ItemGetResponse
from .item_create_params import ItemCreateParams as ItemCreateParams
from .item_delete_params import ItemDeleteParams as ItemDeleteParams
Expand All @@ -11,9 +13,3 @@
from .item_delete_response import ItemDeleteResponse as ItemDeleteResponse
from .item_update_response import ItemUpdateResponse as ItemUpdateResponse
from .bulk_operation_get_response import BulkOperationGetResponse as BulkOperationGetResponse
from .unnamed_schema_ref_34bb6e31800bc0207c083affa12d2775 import (
UnnamedSchemaRef34bb6e31800bc0207c083affa12d2775 as UnnamedSchemaRef34bb6e31800bc0207c083affa12d2775,
)
from .unnamed_schema_ref_cc279fb99baf6a166db5c4e790a8c6cd import (
UnnamedSchemaRefCc279fb99baf6a166db5c4e790a8c6cd as UnnamedSchemaRefCc279fb99baf6a166db5c4e790a8c6cd,
)
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@

from ...._models import BaseModel

__all__ = ["UnnamedSchemaRef34bb6e31800bc0207c083affa12d2775"]
__all__ = ["ListCursor"]


class UnnamedSchemaRef34bb6e31800bc0207c083affa12d2775(BaseModel):
class ListCursor(BaseModel):
after: Optional[str] = None

before: Optional[str] = None
7 changes: 7 additions & 0 deletions src/cloudflare/types/rules/lists/operation_status.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

from typing_extensions import Literal

__all__ = ["OperationStatus"]

OperationStatus = Literal["pending", "running", "completed", "failed"]

This file was deleted.

3 changes: 0 additions & 3 deletions src/cloudflare/types/storage/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,3 @@
from .components import Components as Components
from .analytics_list_params import AnalyticsListParams as AnalyticsListParams
from .analytics_stored_params import AnalyticsStoredParams as AnalyticsStoredParams
from .unnamed_schema_ref_608bee5065f7314d6fa572b89a1910f7 import (
UnnamedSchemaRef608bee5065f7314d6fa572b89a1910f7 as UnnamedSchemaRef608bee5065f7314d6fa572b89a1910f7,
)
Loading