Skip to content

Commit

Permalink
SDK regeneration
Browse files Browse the repository at this point in the history
  • Loading branch information
fern-api[bot] committed Dec 23, 2023
1 parent 1f65393 commit 51bb046
Show file tree
Hide file tree
Showing 5 changed files with 118 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/webflow/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@
from .resources import (
AccessGroupsListRequestSort,
InventoryUpdateRequestInventoryType,
OauthScheme,
OrdersListRequestStatus,
OrdersRefundRequestReason,
ProductsCreateSkuResponse,
Expand All @@ -147,6 +148,7 @@
forms,
inventory,
orders,
packaqe,
pages,
products,
scripts,
Expand Down Expand Up @@ -214,6 +216,7 @@
"MissingScopes",
"NoDomains",
"NotFoundError",
"OauthScheme",
"Order",
"OrderAddress",
"OrderAddressJapanType",
Expand Down Expand Up @@ -301,6 +304,7 @@
"forms",
"inventory",
"orders",
"packaqe",
"pages",
"products",
"scripts",
Expand Down
4 changes: 4 additions & 0 deletions src/webflow/resources/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
forms,
inventory,
orders,
packaqe,
pages,
products,
scripts,
Expand All @@ -19,12 +20,14 @@
from .access_groups import AccessGroupsListRequestSort
from .inventory import InventoryUpdateRequestInventoryType
from .orders import OrdersListRequestStatus, OrdersRefundRequestReason
from .packaqe import OauthScheme
from .products import ProductsCreateSkuResponse
from .users import UsersListRequestSort

__all__ = [
"AccessGroupsListRequestSort",
"InventoryUpdateRequestInventoryType",
"OauthScheme",
"OrdersListRequestStatus",
"OrdersRefundRequestReason",
"ProductsCreateSkuResponse",
Expand All @@ -36,6 +39,7 @@
"forms",
"inventory",
"orders",
"packaqe",
"pages",
"products",
"scripts",
Expand Down
5 changes: 5 additions & 0 deletions src/webflow/resources/packaqe/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# This file was auto-generated by Fern from our API Definition.

from .types import OauthScheme

__all__ = ["OauthScheme"]
5 changes: 5 additions & 0 deletions src/webflow/resources/packaqe/types/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# This file was auto-generated by Fern from our API Definition.

from .oauth_scheme import OauthScheme

__all__ = ["OauthScheme"]
100 changes: 100 additions & 0 deletions src/webflow/resources/packaqe/types/oauth_scheme.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
# This file was auto-generated by Fern from our API Definition.

import enum
import typing

T_Result = typing.TypeVar("T_Result")


class OauthScheme(str, enum.Enum):
AUTHORIZED_USER_READ = "authorized_user:read"
"""
read details about the authorized user
"""

READ_PAGES = "read:pages"
"""
read pages on the site
"""

SITES_READ = "sites:read"
"""
read sites on the site
"""

SITES_WRITE = "sites:write"
"""
modify pages on the site
"""

CUSTOM_CODE_READ = "custom_code:read"
"""
read custom code on the site
"""

CUSTOM_CODE_WRITE = "custom_code:write"
"""
modify custom code on the site
"""

CUSTOM_CODE_DELETE = "custom_code:delete"
"""
delete custom code on the site
"""

USERS_READ = "users:read"
"""
read users on the site
"""

USERS_WRITE = "users:write"
"""
modify users on the site
"""

ECOMMERCE_READ = "ecommerce:read"
"""
read ecommerce data
"""

ECOMMERCE_WRITE = "ecommerce:write"
"""
edit ecommerce data
"""

def visit(
self,
authorized_user_read: typing.Callable[[], T_Result],
read_pages: typing.Callable[[], T_Result],
sites_read: typing.Callable[[], T_Result],
sites_write: typing.Callable[[], T_Result],
custom_code_read: typing.Callable[[], T_Result],
custom_code_write: typing.Callable[[], T_Result],
custom_code_delete: typing.Callable[[], T_Result],
users_read: typing.Callable[[], T_Result],
users_write: typing.Callable[[], T_Result],
ecommerce_read: typing.Callable[[], T_Result],
ecommerce_write: typing.Callable[[], T_Result],
) -> T_Result:
if self is OauthScheme.AUTHORIZED_USER_READ:
return authorized_user_read()
if self is OauthScheme.READ_PAGES:
return read_pages()
if self is OauthScheme.SITES_READ:
return sites_read()
if self is OauthScheme.SITES_WRITE:
return sites_write()
if self is OauthScheme.CUSTOM_CODE_READ:
return custom_code_read()
if self is OauthScheme.CUSTOM_CODE_WRITE:
return custom_code_write()
if self is OauthScheme.CUSTOM_CODE_DELETE:
return custom_code_delete()
if self is OauthScheme.USERS_READ:
return users_read()
if self is OauthScheme.USERS_WRITE:
return users_write()
if self is OauthScheme.ECOMMERCE_READ:
return ecommerce_read()
if self is OauthScheme.ECOMMERCE_WRITE:
return ecommerce_write()

0 comments on commit 51bb046

Please sign in to comment.