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 0cb8c39
Show file tree
Hide file tree
Showing 3 changed files with 104 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/webflow/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
ListCustomCodeBlocks,
MissingScopes,
NoDomains,
OauthScope,
Order,
OrderAddress,
OrderAddressJapanType,
Expand Down Expand Up @@ -214,6 +215,7 @@
"MissingScopes",
"NoDomains",
"NotFoundError",
"OauthScope",
"Order",
"OrderAddress",
"OrderAddressJapanType",
Expand Down
2 changes: 2 additions & 0 deletions src/webflow/types/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
from .list_custom_code_blocks import ListCustomCodeBlocks
from .missing_scopes import MissingScopes
from .no_domains import NoDomains
from .oauth_scope import OauthScope
from .order import Order
from .order_address import OrderAddress
from .order_address_japan_type import OrderAddressJapanType
Expand Down Expand Up @@ -173,6 +174,7 @@
"ListCustomCodeBlocks",
"MissingScopes",
"NoDomains",
"OauthScope",
"Order",
"OrderAddress",
"OrderAddressJapanType",
Expand Down
100 changes: 100 additions & 0 deletions src/webflow/types/oauth_scope.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 OauthScope(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 OauthScope.AUTHORIZED_USER_READ:
return authorized_user_read()
if self is OauthScope.READ_PAGES:
return read_pages()
if self is OauthScope.SITES_READ:
return sites_read()
if self is OauthScope.SITES_WRITE:
return sites_write()
if self is OauthScope.CUSTOM_CODE_READ:
return custom_code_read()
if self is OauthScope.CUSTOM_CODE_WRITE:
return custom_code_write()
if self is OauthScope.CUSTOM_CODE_DELETE:
return custom_code_delete()
if self is OauthScope.USERS_READ:
return users_read()
if self is OauthScope.USERS_WRITE:
return users_write()
if self is OauthScope.ECOMMERCE_READ:
return ecommerce_read()
if self is OauthScope.ECOMMERCE_WRITE:
return ecommerce_write()

0 comments on commit 0cb8c39

Please sign in to comment.