From 51bb0461ae97529eb27078800c43ed0d87d250b0 Mon Sep 17 00:00:00 2001 From: fern-api <115122769+fern-api[bot]@users.noreply.github.com> Date: Sat, 23 Dec 2023 00:56:36 +0000 Subject: [PATCH] SDK regeneration --- src/webflow/__init__.py | 4 + src/webflow/resources/__init__.py | 4 + src/webflow/resources/packaqe/__init__.py | 5 + .../resources/packaqe/types/__init__.py | 5 + .../resources/packaqe/types/oauth_scheme.py | 100 ++++++++++++++++++ 5 files changed, 118 insertions(+) create mode 100644 src/webflow/resources/packaqe/__init__.py create mode 100644 src/webflow/resources/packaqe/types/__init__.py create mode 100644 src/webflow/resources/packaqe/types/oauth_scheme.py diff --git a/src/webflow/__init__.py b/src/webflow/__init__.py index 5835070..a596fee 100644 --- a/src/webflow/__init__.py +++ b/src/webflow/__init__.py @@ -136,6 +136,7 @@ from .resources import ( AccessGroupsListRequestSort, InventoryUpdateRequestInventoryType, + OauthScheme, OrdersListRequestStatus, OrdersRefundRequestReason, ProductsCreateSkuResponse, @@ -147,6 +148,7 @@ forms, inventory, orders, + packaqe, pages, products, scripts, @@ -214,6 +216,7 @@ "MissingScopes", "NoDomains", "NotFoundError", + "OauthScheme", "Order", "OrderAddress", "OrderAddressJapanType", @@ -301,6 +304,7 @@ "forms", "inventory", "orders", + "packaqe", "pages", "products", "scripts", diff --git a/src/webflow/resources/__init__.py b/src/webflow/resources/__init__.py index d3f2919..ee11ee5 100644 --- a/src/webflow/resources/__init__.py +++ b/src/webflow/resources/__init__.py @@ -8,6 +8,7 @@ forms, inventory, orders, + packaqe, pages, products, scripts, @@ -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", @@ -36,6 +39,7 @@ "forms", "inventory", "orders", + "packaqe", "pages", "products", "scripts", diff --git a/src/webflow/resources/packaqe/__init__.py b/src/webflow/resources/packaqe/__init__.py new file mode 100644 index 0000000..07f0937 --- /dev/null +++ b/src/webflow/resources/packaqe/__init__.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +from .types import OauthScheme + +__all__ = ["OauthScheme"] diff --git a/src/webflow/resources/packaqe/types/__init__.py b/src/webflow/resources/packaqe/types/__init__.py new file mode 100644 index 0000000..9651c05 --- /dev/null +++ b/src/webflow/resources/packaqe/types/__init__.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +from .oauth_scheme import OauthScheme + +__all__ = ["OauthScheme"] diff --git a/src/webflow/resources/packaqe/types/oauth_scheme.py b/src/webflow/resources/packaqe/types/oauth_scheme.py new file mode 100644 index 0000000..051c1e2 --- /dev/null +++ b/src/webflow/resources/packaqe/types/oauth_scheme.py @@ -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()