Skip to content

Commit

Permalink
feat(api): update via SDK Studio (#281)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-app[bot] committed Apr 24, 2024
1 parent e5f819a commit 2557c05
Show file tree
Hide file tree
Showing 10 changed files with 31 additions and 20 deletions.
2 changes: 1 addition & 1 deletion api.md
Original file line number Diff line number Diff line change
Expand Up @@ -5676,7 +5676,7 @@ Types:

```python
from cloudflare.types.zero_trust.gateway import (
Lists,
GatewayList,
ListCreateResponse,
ListUpdateResponse,
ListListResponse,
Expand Down
10 changes: 5 additions & 5 deletions src/cloudflare/resources/zero_trust/gateway/lists/lists.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@
make_request_options,
)
from .....types.zero_trust.gateway import (
ListsParam,
ListGetResponse,
GatewayListParam,
ListEditResponse,
ListListResponse,
ListCreateResponse,
Expand Down Expand Up @@ -71,7 +71,7 @@ def create(
name: str,
type: Literal["SERIAL", "URL", "DOMAIN", "EMAIL", "IP"],
description: str | NotGiven = NOT_GIVEN,
items: Iterable[ListsParam] | NotGiven = NOT_GIVEN,
items: Iterable[GatewayListParam] | 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 @@ -265,7 +265,7 @@ def edit(
list_id: str,
*,
account_id: str,
append: Iterable[ListsParam] | NotGiven = NOT_GIVEN,
append: Iterable[GatewayListParam] | NotGiven = NOT_GIVEN,
remove: List[str] | 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.
Expand Down Expand Up @@ -378,7 +378,7 @@ async def create(
name: str,
type: Literal["SERIAL", "URL", "DOMAIN", "EMAIL", "IP"],
description: str | NotGiven = NOT_GIVEN,
items: Iterable[ListsParam] | NotGiven = NOT_GIVEN,
items: Iterable[GatewayListParam] | 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 @@ -572,7 +572,7 @@ async def edit(
list_id: str,
*,
account_id: str,
append: Iterable[ListsParam] | NotGiven = NOT_GIVEN,
append: Iterable[GatewayListParam] | NotGiven = NOT_GIVEN,
remove: List[str] | 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.
Expand Down
4 changes: 2 additions & 2 deletions src/cloudflare/types/zero_trust/gateway/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,12 @@

from __future__ import annotations

from .lists import Lists as Lists
from .app_type import AppType as AppType
from .category import Category as Category
from .location import Location as Location
from .schedule import Schedule as Schedule
from .gateway_ips import GatewayIPs as GatewayIPs
from .lists_param import ListsParam as ListsParam
from .gateway_list import GatewayList as GatewayList
from .gateway_rule import GatewayRule as GatewayRule
from .rule_setting import RuleSetting as RuleSetting
from .tls_settings import TLSSettings as TLSSettings
Expand All @@ -21,6 +20,7 @@
from .list_edit_params import ListEditParams as ListEditParams
from .location_network import LocationNetwork as LocationNetwork
from .list_get_response import ListGetResponse as ListGetResponse
from .gateway_list_param import GatewayListParam as GatewayListParam
from .list_create_params import ListCreateParams as ListCreateParams
from .list_delete_params import ListDeleteParams as ListDeleteParams
from .list_edit_response import ListEditResponse as ListEditResponse
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
from typing import Optional
from datetime import datetime

from ....._models import BaseModel
from ...._models import BaseModel

__all__ = ["Lists"]
__all__ = ["GatewayList"]


class Lists(BaseModel):
class GatewayList(BaseModel):
created_at: Optional[datetime] = None

value: Optional[str] = None
Expand Down
12 changes: 12 additions & 0 deletions src/cloudflare/types/zero_trust/gateway/gateway_list_param.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

from __future__ import annotations

from typing_extensions import TypedDict

__all__ = ["GatewayListParam"]


class GatewayListParam(TypedDict, total=False):
value: str
"""The value of the item in a list."""
4 changes: 2 additions & 2 deletions src/cloudflare/types/zero_trust/gateway/list_create_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from typing import Iterable
from typing_extensions import Literal, Required, TypedDict

from .lists_param import ListsParam
from .gateway_list_param import GatewayListParam

__all__ = ["ListCreateParams"]

Expand All @@ -22,5 +22,5 @@ class ListCreateParams(TypedDict, total=False):
description: str
"""The description of the list."""

items: Iterable[ListsParam]
items: Iterable[GatewayListParam]
"""The items in the list."""
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
from datetime import datetime
from typing_extensions import Literal

from .lists import Lists
from ...._models import BaseModel
from .gateway_list import GatewayList

__all__ = ["ListCreateResponse"]

Expand All @@ -19,7 +19,7 @@ class ListCreateResponse(BaseModel):
description: Optional[str] = None
"""The description of the list."""

items: Optional[List[Lists]] = None
items: Optional[List[GatewayList]] = None
"""The items in the list."""

name: Optional[str] = None
Expand Down
4 changes: 2 additions & 2 deletions src/cloudflare/types/zero_trust/gateway/list_edit_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@
from typing import List, Iterable
from typing_extensions import Required, TypedDict

from .lists_param import ListsParam
from .gateway_list_param import GatewayListParam

__all__ = ["ListEditParams"]


class ListEditParams(TypedDict, total=False):
account_id: Required[str]

append: Iterable[ListsParam]
append: Iterable[GatewayListParam]
"""The items in the list."""

remove: List[str]
Expand Down
1 change: 0 additions & 1 deletion src/cloudflare/types/zero_trust/gateway/lists/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,4 @@

from __future__ import annotations

from .lists import Lists as Lists
from .item_list_response import ItemListResponse as ItemListResponse
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

from typing import List

from cloudflare.types.zero_trust.gateway import Lists
from ..gateway_list import GatewayList

__all__ = ["ItemListResponse"]

ItemListResponse = List[Lists]
ItemListResponse = List[GatewayList]

0 comments on commit 2557c05

Please sign in to comment.