From f72aff10908e26dc93f713168613fbd49520a659 Mon Sep 17 00:00:00 2001 From: "fern-api[bot]" <115122769+fern-api[bot]@users.noreply.github.com> Date: Wed, 11 Mar 2026 18:40:59 +0000 Subject: [PATCH] SDK regeneration --- .github/workflows/ci.yml | 10 +- .mock/definition/__package__.yml | 4311 ----------------- .mock/definition/api.yml | 18 - .mock/definition/assets.yml | 487 -- .mock/definition/collections.yml | 350 -- .mock/definition/collections/fields.yml | 212 - .mock/definition/collections/items.yml | 2145 -------- .mock/definition/comments.yml | 41 - .mock/definition/components.yml | 548 --- .mock/definition/ecommerce.yml | 45 - .mock/definition/forms.yml | 399 -- .mock/definition/inventory.yml | 152 - .mock/definition/items.yml | 112 - .mock/definition/orders.yml | 1971 -------- .mock/definition/pages.yml | 611 --- .mock/definition/pages/scripts.yml | 155 - .mock/definition/products.yml | 642 --- .mock/definition/scripts.yml | 236 - .mock/definition/sites.yml | 558 --- .mock/definition/sites/activityLogs.yml | 77 - .mock/definition/sites/comments.yml | 352 -- .mock/definition/sites/forms.yml | 316 -- .mock/definition/sites/plans.yml | 48 - .mock/definition/sites/redirects.yml | 221 - .mock/definition/sites/robotsTxt.yml | 229 - .mock/definition/sites/scripts.yml | 243 - .mock/definition/sites/wellKnown.yml | 130 - .mock/definition/token.yml | 75 - .mock/definition/webhooks.yml | 188 - .mock/definition/workspaces/auditLogs.yml | 126 - .mock/fern.config.json | 4 - reference.md | 58 +- src/webflow/client.py | 8 +- src/webflow/core/client_wrapper.py | 14 +- src/webflow/resources/collections/__init__.py | 4 +- .../collections/resources/__init__.py | 4 +- .../collections/resources/items/__init__.py | 4 +- .../collections/resources/items/client.py | 8 +- .../resources/items/types/__init__.py | 6 +- ...collection_item_request_body_field_data.py | 6 +- ..._item_request_body_field_data_one_item.py} | 4 +- .../resources/items/types/single_cms_item.py | 2 +- ...ponent_properties_write_properties_item.py | 2 +- .../sites/resources/redirects/client.py | 8 +- src/webflow/types/component_dom.py | 2 +- ...overrides_write_property_overrides_item.py | 6 +- src/webflow/types/product_field_data.py | 2 +- tests/__init__.py | 2 - tests/collections/__init__.py | 2 - tests/collections/test_fields.py | 106 - tests/collections/test_items.py | 1068 ---- tests/conftest.py | 31 - tests/pages/__init__.py | 2 - tests/pages/test_scripts.py | 85 - tests/sites/__init__.py | 2 - tests/sites/test_activity_logs.py | 53 - tests/sites/test_comments.py | 242 - tests/sites/test_forms.py | 193 - tests/sites/test_plans.py | 20 - tests/sites/test_redirects.py | 88 - tests/sites/test_robots_txt.py | 145 - tests/sites/test_scripts.py | 156 - tests/sites/test_well_known.py | 40 - tests/test_assets.py | 409 -- tests/test_collections.py | 551 --- tests/test_components.py | 311 -- tests/test_ecommerce.py | 20 - tests/test_forms.py | 291 -- tests/test_inventory.py | 32 - tests/test_orders.py | 2337 --------- tests/test_pages.py | 407 -- tests/test_products.py | 700 --- tests/test_scripts.py | 159 - tests/test_sites.py | 645 --- tests/test_token.py | 66 - tests/test_webhooks.py | 175 - tests/utilities.py | 162 - tests/workspaces/__init__.py | 2 - tests/workspaces/test_audit_logs.py | 61 - 79 files changed, 74 insertions(+), 23639 deletions(-) delete mode 100644 .mock/definition/__package__.yml delete mode 100644 .mock/definition/api.yml delete mode 100644 .mock/definition/assets.yml delete mode 100644 .mock/definition/collections.yml delete mode 100644 .mock/definition/collections/fields.yml delete mode 100644 .mock/definition/collections/items.yml delete mode 100644 .mock/definition/comments.yml delete mode 100644 .mock/definition/components.yml delete mode 100644 .mock/definition/ecommerce.yml delete mode 100644 .mock/definition/forms.yml delete mode 100644 .mock/definition/inventory.yml delete mode 100644 .mock/definition/items.yml delete mode 100644 .mock/definition/orders.yml delete mode 100644 .mock/definition/pages.yml delete mode 100644 .mock/definition/pages/scripts.yml delete mode 100644 .mock/definition/products.yml delete mode 100644 .mock/definition/scripts.yml delete mode 100644 .mock/definition/sites.yml delete mode 100644 .mock/definition/sites/activityLogs.yml delete mode 100644 .mock/definition/sites/comments.yml delete mode 100644 .mock/definition/sites/forms.yml delete mode 100644 .mock/definition/sites/plans.yml delete mode 100644 .mock/definition/sites/redirects.yml delete mode 100644 .mock/definition/sites/robotsTxt.yml delete mode 100644 .mock/definition/sites/scripts.yml delete mode 100644 .mock/definition/sites/wellKnown.yml delete mode 100644 .mock/definition/token.yml delete mode 100644 .mock/definition/webhooks.yml delete mode 100644 .mock/definition/workspaces/auditLogs.yml delete mode 100644 .mock/fern.config.json rename src/webflow/resources/collections/resources/items/types/{create_bulk_collection_item_request_body_field_data_item.py => create_bulk_collection_item_request_body_field_data_one_item.py} (86%) delete mode 100644 tests/__init__.py delete mode 100644 tests/collections/__init__.py delete mode 100644 tests/collections/test_fields.py delete mode 100644 tests/collections/test_items.py delete mode 100644 tests/conftest.py delete mode 100644 tests/pages/__init__.py delete mode 100644 tests/pages/test_scripts.py delete mode 100644 tests/sites/__init__.py delete mode 100644 tests/sites/test_activity_logs.py delete mode 100644 tests/sites/test_comments.py delete mode 100644 tests/sites/test_forms.py delete mode 100644 tests/sites/test_plans.py delete mode 100644 tests/sites/test_redirects.py delete mode 100644 tests/sites/test_robots_txt.py delete mode 100644 tests/sites/test_scripts.py delete mode 100644 tests/sites/test_well_known.py delete mode 100644 tests/test_assets.py delete mode 100644 tests/test_collections.py delete mode 100644 tests/test_components.py delete mode 100644 tests/test_ecommerce.py delete mode 100644 tests/test_forms.py delete mode 100644 tests/test_inventory.py delete mode 100644 tests/test_orders.py delete mode 100644 tests/test_pages.py delete mode 100644 tests/test_products.py delete mode 100644 tests/test_scripts.py delete mode 100644 tests/test_sites.py delete mode 100644 tests/test_token.py delete mode 100644 tests/test_webhooks.py delete mode 100644 tests/utilities.py delete mode 100644 tests/workspaces/__init__.py delete mode 100644 tests/workspaces/test_audit_logs.py diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d396980..fa41c1f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -3,7 +3,7 @@ name: ci on: [push] jobs: compile: - runs-on: ubuntu-24.04 + runs-on: ubuntu-20.04 steps: - name: Checkout repo uses: actions/checkout@v3 @@ -19,7 +19,7 @@ jobs: - name: Compile run: poetry run mypy . test: - runs-on: ubuntu-24.04 + runs-on: ubuntu-20.04 steps: - name: Checkout repo uses: actions/checkout@v3 @@ -33,15 +33,13 @@ jobs: - name: Install dependencies run: poetry install - - name: Install Fern - run: npm install -g fern-api - name: Test - run: fern test --command "poetry run pytest -rP ./tests/custom/" + run: poetry run pytest -rP . publish: needs: [compile, test] if: github.event_name == 'push' && contains(github.ref, 'refs/tags/') - runs-on: ubuntu-24.04 + runs-on: ubuntu-20.04 steps: - name: Checkout repo uses: actions/checkout@v3 diff --git a/.mock/definition/__package__.yml b/.mock/definition/__package__.yml deleted file mode 100644 index 250c1b4..0000000 --- a/.mock/definition/__package__.yml +++ /dev/null @@ -1,4311 +0,0 @@ -errors: - UnauthorizedError: - status-code: 401 - type: Error - docs: >- - Provided access token is invalid or does not have access to requested - resource - examples: - - value: - code: not_authorized - message: Request not authorized - ForbiddenError: - status-code: 403 - type: unknown - docs: Provided access token is valid, but is missing the required scopes. - examples: - - value: - code: missing_scopes - message: >- - OAuthForbidden: You are missing the following scopes - - components:write - - value: - key: value - - value: - code: forbidden - message: User is not authorized to perform this action - BadRequestError: - status-code: 400 - type: unknown - docs: Request body was incorrectly formatted. - examples: - - value: - code: bad_request - message: 'Bad Request: Request is malformed' - - value: - key: value - - value: - code: validation_error - message: 'Validation Error: Provided ID is invalid' - NotFoundError: - status-code: 404 - type: Error - docs: Requested resource not found - examples: - - value: - code: resource_not_found - message: 'Requested resource not found: The site cannot be found' - TooManyRequestsError: - status-code: 429 - type: Error - docs: >- - The rate limit of the provided access_token has been reached. Please have - your application respect the X-RateLimit-Remaining header we include on - API responses. - examples: - - value: - code: too_many_requests - message: Too many requests - InternalServerError: - status-code: 500 - type: Error - docs: We had a problem with our server. Try again later. - examples: - - value: - code: internal_error - message: An Internal Error occurred - ConflictError: - status-code: 409 - type: unknown - docs: Collection already exists - examples: - - value: - code: duplicate_collection - message: Collection already exists - - value: - message: '''Site is published to multiple domains at different times' - - value: - code: conflict - message: >- - Conflict: Conflict with server data: Live PATCH updates can't be - applied to items that have never been published - - value: - code: custom_code_max_registered_scripts - message: The maximum number of registered scripts has been reached. - - value: - code: forms_require_republish - message: To access this feature, the site needs to be republished. - - value: - code: ecommerce_not_enabled - message: Ecommerce is not yet initialized -types: - ForbiddenErrorBody: - discriminated: false - union: - - InvalidScopes - - NotEnterprisePlanSite - source: - openapi: ../../../openapi/referenced-specs/v2.yml - BadRequestErrorBody: - discriminated: false - union: - - InvalidDomain - - NoDomains - source: - openapi: ../../../openapi/referenced-specs/v2.yml - ItemsListItemsRequestLastPublished: - properties: - lte: - type: optional - docs: Filter items last published before this date - gte: - type: optional - docs: Filter items last published after this date - source: - openapi: ../../../openapi/referenced-specs/v2.yml - ItemsListItemsLiveRequestLastPublished: - properties: - lte: - type: optional - docs: Filter items last published before this date - gte: - type: optional - docs: Filter items last published after this date - source: - openapi: ../../../openapi/referenced-specs/v2.yml - AuthorizedUser: - properties: - id: - type: optional - docs: The unique ID of the user - email: - type: optional - docs: The user's email address - validation: - format: email - firstName: - type: optional - docs: The user's first name - lastName: - type: optional - docs: The user's last name - source: - openapi: ../../../openapi/referenced-specs/v2.yml - ErrorCode: - enum: - - bad_request - - collection_not_found - - conflict - - duplicate_collection - - duplicate_user_email - - ecommerce_not_enabled - - forbidden - - forms_require_republish - - incompatible_webhook_filter - - internal_error - - invalid_auth_version - - invalid_credentials - - invalid_domain - - invalid_user_email - - item_not_found - - missing_scopes - - no_domains - - not_authorized - - not_enterprise_plan_site - - not_enterprise_plan_workspace - - order_not_found - - resource_not_found - - too_many_requests - - unsupported_version - - unsupported_webhook_trigger_type - - user_limit_reached - - user_not_found - - users_not_enabled - - validation_error - docs: Error code - inline: true - source: - openapi: ../../../openapi/referenced-specs/v2.yml - Error: - properties: - code: - type: optional - docs: Error code - message: - type: optional - docs: Error message - externalReference: - type: optional - docs: Link to more information - details: - type: optional> - docs: Array of errors - source: - openapi: ../../../openapi/referenced-specs/v2.yml - Application: - properties: - id: - type: optional - docs: Unique identifier for the Application - description: - type: optional - docs: Application description provided by the developer - homepage: - type: optional - docs: Application homepage URL provided by the developer - validation: - format: uri - displayName: - type: optional - docs: Application name provided by the developer - source: - openapi: ../../../openapi/referenced-specs/v2.yml - AuthorizationAuthorizationAuthorizedTo: - properties: - siteIds: - type: optional> - docs: Array of Sites this app is authorized to - workspaceIds: - type: optional> - docs: Array of Workspaces this app is authorized to - userIds: - type: optional> - docs: Array of Users this app is authorized to - source: - openapi: ../../../openapi/referenced-specs/v2.yml - inline: true - AuthorizationAuthorization: - docs: The Authorization object - properties: - id: - type: optional - docs: The unique ID of the Authorization instance - createdOn: - type: optional - docs: The date the Authorization was created - lastUsed: - type: optional - docs: The date the Authorization was last used - grantType: - type: optional - docs: The grant type of the Authorization - rateLimit: - type: optional - docs: The default rate limit for the Authorization (requests/min) - scope: - type: optional - docs: Comma separted list of OAuth scopes corresponding to the Authorization - authorizedTo: optional - source: - openapi: ../../../openapi/referenced-specs/v2.yml - inline: true - Authorization: - properties: - authorization: - type: optional - docs: The Authorization object - application: optional - source: - openapi: ../../../openapi/referenced-specs/v2.yml - Domain: - properties: - id: - type: string - docs: Unique identifier for the Domain - url: - type: optional - docs: The registered Domain name - lastPublished: - type: optional - docs: The date the custom domain was last published to - access: read-only - source: - openapi: ../../../openapi/referenced-specs/v2.yml - Locale: - properties: - id: - type: optional - docs: The unique identifier for the locale. - cmsLocaleId: - type: optional - docs: A CMS-specific identifier for the locale. - enabled: - type: optional - docs: Indicates if the locale is enabled. - displayName: - type: optional - docs: The display name of the locale, typically in English. - displayImageId: - type: optional - docs: An optional ID for an image associated with the locale, nullable. - redirect: - type: optional - docs: Determines if requests should redirect to the locale's subdirectory. - subdirectory: - type: optional - docs: The subdirectory path for the locale, used in URLs. - tag: - type: optional - docs: >- - A tag or code representing the locale, often following a standard - format like 'en-US'. - source: - openapi: ../../../openapi/referenced-specs/v2.yml - Locales: - properties: - primary: - type: optional - docs: The primary locale for the site or application. - secondary: - type: optional> - docs: A list of secondary locales available for the site or application. - source: - openapi: ../../../openapi/referenced-specs/v2.yml - SiteDataCollectionType: - enum: - - always - - optOut - - disabled - docs: The type of data collection enabled for the site. - inline: true - source: - openapi: ../../../openapi/referenced-specs/v2.yml - Site: - properties: - id: - type: string - docs: Unique identifier for the Site - workspaceId: - type: optional - docs: Unique identifier for the Workspace - createdOn: - type: optional - docs: Date the Site was created - displayName: - type: optional - docs: Name given to Site - shortName: - type: optional - docs: Slugified version of name - lastPublished: - type: optional - docs: Date the Site was last published - lastUpdated: - type: optional - docs: Date the Site was last updated - previewUrl: - type: optional - docs: URL of a generated image for the given Site - validation: - format: uri - timeZone: - type: optional - docs: Site timezone set under Site Settings - parentFolderId: - type: optional - docs: The ID of the parent folder the Site exists in - customDomains: optional> - locales: optional - dataCollectionEnabled: - type: optional - docs: Indicates if data collection is enabled for the site. - dataCollectionType: - type: optional - docs: The type of data collection enabled for the site. - source: - openapi: ../../../openapi/referenced-specs/v2.yml - InvalidScopes: unknown - NotEnterprisePlanWorkspace: unknown - WorkspaceAuditLogItemPayloadUserAccessMethod: - enum: - - dashboard - - sso - - api - - google - inline: true - source: - openapi: ../../../openapi/referenced-specs/v2.yml - User access: - properties: - method: optional - location: - type: optional - docs: The geolocation based on the logged IP address - ipAddress: - type: optional - docs: The captured IP address of the user - source: - openapi: ../../../openapi/referenced-specs/v2.yml - UserAccessAuditLogItemEventSubType: - enum: - - login - - logout - inline: true - source: - openapi: ../../../openapi/referenced-specs/v2.yml - UserAccessAuditLogItem: - properties: - eventSubType: optional - payload: optional - source: - openapi: ../../../openapi/referenced-specs/v2.yml - Custom role: - properties: - roleName: - type: optional - docs: The name of the custom role - previousRoleName: - type: optional - docs: The previous name of the custom role - source: - openapi: ../../../openapi/referenced-specs/v2.yml - CustomRoleAuditLogItemEventSubType: - enum: - - role_created - - role_updated - - role_deleted - inline: true - source: - openapi: ../../../openapi/referenced-specs/v2.yml - CustomRoleAuditLogItem: - properties: - eventSubType: optional - payload: optional - source: - openapi: ../../../openapi/referenced-specs/v2.yml - WorkspaceAuditLogItemPayloadWorkspaceMembershipTargetUser: - properties: - id: optional - email: optional - source: - openapi: ../../../openapi/referenced-specs/v2.yml - inline: true - WorkspaceAuditLogItemPayloadWorkspaceMembershipMethod: - enum: - - sso - - dashboard - - admin - - access_request - inline: true - source: - openapi: ../../../openapi/referenced-specs/v2.yml - WorkspaceAuditLogItemPayloadWorkspaceMembershipUserType: - enum: - - member - - guest - - reviewer - - client - inline: true - source: - openapi: ../../../openapi/referenced-specs/v2.yml - Workspace membership: - properties: - targetUser: optional - method: optional - userType: optional - roleName: - type: optional - docs: The name of the role that was assigned to the user - previousRoleName: - type: optional - docs: The previous role that the user had - source: - openapi: ../../../openapi/referenced-specs/v2.yml - WorkspaceMembershipAuditLogItemEventSubType: - enum: - - user_added - - user_removed - - user_role_updated - inline: true - source: - openapi: ../../../openapi/referenced-specs/v2.yml - WorkspaceMembershipAuditLogItem: - properties: - eventSubType: optional - payload: optional - source: - openapi: ../../../openapi/referenced-specs/v2.yml - WorkspaceAuditLogItemPayloadSiteMembershipSite: - properties: - id: optional - slug: optional - source: - openapi: ../../../openapi/referenced-specs/v2.yml - inline: true - WorkspaceAuditLogItemPayloadSiteMembershipTargetUser: - properties: - id: optional - email: optional - source: - openapi: ../../../openapi/referenced-specs/v2.yml - inline: true - WorkspaceAuditLogItemPayloadSiteMembershipMethod: - enum: - - sso - - invite - - scim - - dashboard - - admin - - access_request - inline: true - source: - openapi: ../../../openapi/referenced-specs/v2.yml - WorkspaceAuditLogItemPayloadSiteMembershipUserType: - enum: - - member - - guest - - reviewer - - client - inline: true - source: - openapi: ../../../openapi/referenced-specs/v2.yml - WorkspaceAuditLogItemPayloadSiteMembershipGranularAccess: - properties: - id: optional - name: optional - type: optional> - restricted: optional - source: - openapi: ../../../openapi/referenced-specs/v2.yml - inline: true - Site membership: - properties: - site: optional - targetUser: optional - method: optional - userType: optional - roleName: - type: optional - docs: The name of the role that was assigned to the user - previousRoleName: - type: optional - docs: The previous role that the user had - granularAccess: optional - source: - openapi: ../../../openapi/referenced-specs/v2.yml - SiteMembershipAuditLogItemEventSubType: - enum: - - user_added - - user_removed - - user_role_updated - - user_granular_access_updated - inline: true - source: - openapi: ../../../openapi/referenced-specs/v2.yml - SiteMembershipAuditLogItem: - properties: - eventSubType: optional - payload: optional - source: - openapi: ../../../openapi/referenced-specs/v2.yml - WorkspaceAuditLogItemPayloadWorkspaceInvitationTargetUser: - properties: - id: optional - email: optional - source: - openapi: ../../../openapi/referenced-specs/v2.yml - inline: true - WorkspaceAuditLogItemPayloadWorkspaceInvitationMethod: - enum: - - sso - - dashboard - - admin - inline: true - source: - openapi: ../../../openapi/referenced-specs/v2.yml - WorkspaceAuditLogItemPayloadWorkspaceInvitationUserType: - enum: - - member - - guest - - reviewer - - client - inline: true - source: - openapi: ../../../openapi/referenced-specs/v2.yml - WorkspaceAuditLogItemPayloadWorkspaceInvitationTargetUsersItem: - properties: - id: optional - email: optional - source: - openapi: ../../../openapi/referenced-specs/v2.yml - inline: true - Workspace invitation: - properties: - targetUser: optional - method: optional - userType: optional - roleName: - type: optional - docs: The name of the role that was assigned to the user - previousRoleName: - type: optional - docs: The previous role that the user had - targetUsers: >- - optional> - source: - openapi: ../../../openapi/referenced-specs/v2.yml - WorkspaceInvitationAuditLogItemEventSubType: - enum: - - invite_sent - - invite_accepted - - invite_updated - - invite_canceled - - invite_declined - - access_request_accepted - inline: true - source: - openapi: ../../../openapi/referenced-specs/v2.yml - WorkspaceInvitationAuditLogItem: - properties: - eventSubType: optional - payload: optional - source: - openapi: ../../../openapi/referenced-specs/v2.yml - WorkspaceAuditLogItemPayloadSettingChangeMethod: - enum: - - dashboard - - admin - inline: true - source: - openapi: ../../../openapi/referenced-specs/v2.yml - Setting change: - properties: - setting: optional> - previousValue: optional - value: optional - method: optional - source: - openapi: ../../../openapi/referenced-specs/v2.yml - SettingChangeAuditLogItem: - properties: - eventSubType: optional> - payload: optional - source: - openapi: ../../../openapi/referenced-specs/v2.yml - WorkspaceAuditLogItemActor: - properties: - id: optional - email: optional - source: - openapi: ../../../openapi/referenced-specs/v2.yml - inline: true - WorkspaceAuditLogItemWorkspace: - properties: - id: optional - slug: optional - source: - openapi: ../../../openapi/referenced-specs/v2.yml - inline: true - WorkspaceAuditLogItem: - discriminant: eventType - base-properties: - timestamp: optional - actor: optional - workspace: optional - union: - user_access: - type: UserAccessAuditLogItem - custom_role: - type: CustomRoleAuditLogItem - workspace_membership: - type: WorkspaceMembershipAuditLogItem - site_membership: - type: SiteMembershipAuditLogItem - workspace_invitation: - type: WorkspaceInvitationAuditLogItem - workspace_setting: - type: SettingChangeAuditLogItem - source: - openapi: ../../../openapi/referenced-specs/v2.yml - Pagination: - docs: Pagination object - properties: - limit: - type: optional - docs: The limit used for pagination - access: read-only - offset: - type: optional - docs: The offset used for pagination - access: read-only - total: - type: optional - docs: The total number of records - access: read-only - source: - openapi: ../../../openapi/referenced-specs/v2.yml - WorkspaceAuditLogResponse: - properties: - items: optional> - pagination: optional - source: - openapi: ../../../openapi/referenced-specs/v2.yml - Sites: - properties: - sites: optional> - source: - openapi: ../../../openapi/referenced-specs/v2.yml - NotEnterprisePlanSite: unknown - Domains: - properties: - customDomains: optional> - source: - openapi: ../../../openapi/referenced-specs/v2.yml - InvalidDomain: unknown - NoDomains: unknown - Redirect: - docs: A single redirection rule, specifying a source URL and a destination URL. - properties: - id: - type: optional - docs: The ID of the specific redirect rule - access: read-only - fromUrl: - type: optional - docs: The source URL path that will be redirected. - toUrl: - type: optional - docs: The target URL path where the user or client will be redirected. - source: - openapi: ../../../openapi/referenced-specs/v2.yml - Redirects: - docs: Site redirects response - properties: - redirects: - type: optional> - docs: List of redirects for a given site - pagination: optional - source: - openapi: ../../../openapi/referenced-specs/v2.yml - SitePlanId: - enum: - - value: hosting-basic-v3 - name: HostingBasicV3 - - value: hosting-cms-v3 - name: HostingCmsV3 - - value: hosting-business-v3 - name: HostingBusinessV3 - - value: hosting-ecommerce-standard-v2 - name: HostingEcommerceStandardV2 - - value: hosting-ecommerce-plus-v2 - name: HostingEcommercePlusV2 - - value: hosting-ecommerce-advanced-v2 - name: HostingEcommerceAdvancedV2 - - value: hosting-basic-v4 - name: HostingBasicV4 - - value: hosting-cms-v4 - name: HostingCmsV4 - - value: hosting-business-v4 - name: HostingBusinessV4 - - value: hosting-ecommerce-standard-v3 - name: HostingEcommerceStandardV3 - - value: hosting-ecommerce-plus-v3 - name: HostingEcommercePlusV3 - - value: hosting-ecommerce-advanced-v3 - name: HostingEcommerceAdvancedV3 - docs: ID of the hosting plan. - inline: true - source: - openapi: ../../../openapi/referenced-specs/v2.yml - SitePlanName: - enum: - - value: Basic Hosting - name: BasicHosting - - value: CMS Hosting - name: CmsHosting - - value: Business Hosting - name: BusinessHosting - - value: ECommerce Standard Hosting - name: ECommerceStandardHosting - - value: ECommerce Plus Hosting - name: ECommercePlusHosting - - value: ECommerce Advanced Hosting - name: ECommerceAdvancedHosting - docs: Name of the hosting plan. - inline: true - source: - openapi: ../../../openapi/referenced-specs/v2.yml - SitePlan: - properties: - id: - type: optional - docs: ID of the hosting plan. - name: - type: optional - docs: Name of the hosting plan. - pricingInfo: - type: optional - docs: URL for more information about Webflow hosting plan pricing. - source: - openapi: ../../../openapi/referenced-specs/v2.yml - RobotsRulesItem: - properties: - userAgent: - type: string - docs: The user agent the rules apply to. - allows: - type: optional> - docs: List of paths allowed for this user agent. - disallows: - type: optional> - docs: List of paths disallowed for this user agent. - source: - openapi: ../../../openapi/referenced-specs/v2.yml - inline: true - Robots: - docs: The robots.txt file for a given site - properties: - rules: - type: optional> - docs: List of rules for user agents. - sitemap: - type: optional - docs: URL to the sitemap. - source: - openapi: ../../../openapi/referenced-specs/v2.yml - SiteActivityLogItemEvent: - enum: - - styles_modified - - site_published - - ix2_modified_on_page - - page_dom_modified - - cms_item - - backup_created - - page_custom_code_modified - - symbols_modified - - variable_modified - - variables_modified - - cms_collection - - page_settings_modified - - page_settings_custom_code_modified - - ix2_modified_on_component - - ix2_modified_on_class - - site_custom_code_modified - - page_duplicated - - secondary_locale_page_content_modified - - page_renamed - - page_created - - page_deleted - - site_unpublished - - backup_restored - - locale_added - - branch_created - - locale_display_name_updated - - locale_subdirectory_updated - - branch_merged - - locale_tag_updated - - branch_deleted - - locale_enabled - - locale_removed - - locale_disabled - - library_shared - - library_unshared - - library_installed - - library_uninstalled - - library_update_shared - - library_update_accepted - - branch_review_created - - branch_review_approved - - branch_review_canceled - inline: true - source: - openapi: ../../../openapi/referenced-specs/v2.yml - SiteActivityLogItemResourceOperation: - enum: - - CREATED - - MODIFIED - - PUBLISHED - - UNPUBLISHED - - DELETED - - GROUP_REORDERED - - GROUP_CREATED - - GROUP_DELETED - - REORDERED - inline: true - source: - openapi: ../../../openapi/referenced-specs/v2.yml - SiteActivityLogItemUser: - properties: - id: optional - displayName: optional - source: - openapi: ../../../openapi/referenced-specs/v2.yml - inline: true - SiteActivityLogItem: - properties: - id: optional - createdOn: optional - lastUpdated: optional - event: optional - resourceOperation: optional - user: optional - resourceId: optional - resourceName: optional - newValue: optional - previousValue: optional - payload: optional> - source: - openapi: ../../../openapi/referenced-specs/v2.yml - SiteActivityLogResponse: - properties: - items: optional> - pagination: optional - source: - openapi: ../../../openapi/referenced-specs/v2.yml - CollectionListArrayItem: - docs: A collection object - properties: - id: - type: string - docs: Unique identifier for a Collection - displayName: - type: optional - docs: Name given to the Collection - singularName: - type: optional - docs: >- - The name of one Item in Collection (e.g. ”Blog Post” if the Collection - is called “Blog Posts”) - slug: - type: optional - docs: Slug of Collection in Site URL structure - createdOn: - type: optional - docs: The date the collection was created - access: read-only - lastUpdated: - type: optional - docs: The date the collection was last updated - access: read-only - source: - openapi: ../../../openapi/referenced-specs/v2.yml - CollectionList: - properties: - collections: - type: optional> - docs: An array of Collections - source: - openapi: ../../../openapi/referenced-specs/v2.yml - StaticFieldType: - enum: - - Color - - DateTime - - Email - - File - - Image - - Link - - MultiImage - - Number - - Phone - - PlainText - - RichText - - Switch - - VideoLink - docs: Choose these appropriate field type for your collection data - inline: true - source: - openapi: ../../../openapi/referenced-specs/v2.yml - Static Field: - properties: - id: - type: optional - docs: Unique identifier for a Field - access: read-only - isEditable: - type: optional - docs: Define whether the field is editable - access: read-only - isRequired: - type: optional - docs: define whether a field is required in a collection - type: - type: StaticFieldType - docs: Choose these appropriate field type for your collection data - displayName: - type: string - docs: The name of a field - helpText: - type: optional - docs: Additional text to help anyone filling out this field - source: - openapi: ../../../openapi/referenced-specs/v2.yml - MetadataOptionsItem: - docs: A single option value for the Option field. - properties: - name: - type: string - docs: The name of the option - id: - type: optional - docs: The unique identifier of the option - access: read-only - source: - openapi: ../../../openapi/referenced-specs/v2.yml - inline: true - Metadata: - docs: The metadata for the Option field. - properties: - options: - docs: The option values for the Option field. - type: list - source: - openapi: ../../../openapi/referenced-specs/v2.yml - Option Field: - properties: - id: - type: optional - docs: Unique identifier for a Field - access: read-only - isEditable: - type: optional - docs: Define whether the field is editable - access: read-only - isRequired: - type: optional - docs: define whether a field is required in a collection - type: - type: literal<"Option"> - docs: >- - The [Option field - type](/data/reference/field-types-item-values#option) - displayName: - type: string - docs: The name of a field - helpText: - type: optional - docs: Additional text to help anyone filling out this field - metadata: Metadata - source: - openapi: ../../../openapi/referenced-specs/v2.yml - ReferenceFieldType: - enum: - - MultiReference - - Reference - docs: Choose these appropriate field type for your collection data - inline: true - source: - openapi: ../../../openapi/referenced-specs/v2.yml - ReferenceFieldMetadata: - docs: >- - The collectionId for the referenced collection. Only applicable for - Reference and MultiReference fields. - properties: - collectionId: - type: string - docs: The unique identifier of the collection - source: - openapi: ../../../openapi/referenced-specs/v2.yml - inline: true - Reference Field: - properties: - id: - type: optional - docs: Unique identifier for a Field - access: read-only - isEditable: - type: optional - docs: Define whether the field is editable - access: read-only - isRequired: - type: optional - docs: define whether a field is required in a collection - type: - type: ReferenceFieldType - docs: Choose these appropriate field type for your collection data - displayName: - type: string - docs: The name of a field - helpText: - type: optional - docs: Additional text to help anyone filling out this field - metadata: - type: ReferenceFieldMetadata - docs: >- - The collectionId for the referenced collection. Only applicable for - Reference and MultiReference fields. - source: - openapi: ../../../openapi/referenced-specs/v2.yml - FieldCreate: - discriminated: false - docs: Details about the field of a collection - union: - - type: Static Field - - type: Option Field - - type: Reference Field - source: - openapi: ../../../openapi/referenced-specs/v2.yml - FieldType: - enum: - - Color - - DateTime - - Email - - ExtFileRef - - File - - Image - - Link - - MultiImage - - MultiReference - - Number - - Option - - Phone - - PlainText - - Reference - - RichText - - Switch - - VideoLink - docs: Choose these appropriate field type for your collection data - inline: true - source: - openapi: ../../../openapi/referenced-specs/v2.yml - FieldValidationsAdditionalPropertiesAdditionalProperties: - properties: - additionalProperties: unknown - source: - openapi: ../../../openapi/referenced-specs/v2.yml - inline: true - FieldValidationsAdditionalProperties: - discriminated: false - union: - - string - - double - - boolean - - integer - - FieldValidationsAdditionalPropertiesAdditionalProperties - source: - openapi: ../../../openapi/referenced-specs/v2.yml - inline: true - FieldValidations: - docs: The validations for the field - properties: - additionalProperties: optional - source: - openapi: ../../../openapi/referenced-specs/v2.yml - inline: true - Field: - docs: The details of a field in a collection - properties: - id: - type: string - docs: Unique identifier for a Field - isRequired: - type: boolean - docs: define whether a field is required in a collection - isEditable: - type: optional - docs: Define whether the field is editable - access: read-only - type: - type: FieldType - docs: Choose these appropriate field type for your collection data - slug: - type: optional - docs: >- - Slug of Field in Site URL structure. Slugs should be all lowercase - with no spaces. Any spaces will be converted to "-." - displayName: - type: string - docs: The name of a field - helpText: - type: optional - docs: Additional text to help anyone filling out this field - validations: - type: optional - docs: The validations for the field - access: read-only - source: - openapi: ../../../openapi/referenced-specs/v2.yml - Collection: - docs: A collection object - properties: - id: - type: string - docs: Unique identifier for a Collection - displayName: - type: string - docs: Name given to the Collection - singularName: - type: string - docs: >- - The name of one Item in Collection (e.g. ”Blog Post” if the Collection - is called “Blog Posts”) - slug: - type: optional - docs: Slug of Collection in Site URL structure - createdOn: - type: optional - docs: The date the collection was created - access: read-only - lastUpdated: - type: optional - docs: The date the collection was last updated - access: read-only - fields: - docs: The list of fields in the Collection - type: list - source: - openapi: ../../../openapi/referenced-specs/v2.yml - CollectionItemFieldData: - properties: - name: - type: string - docs: Name of the Item - slug: - type: string - docs: >- - URL structure of the Item in your site. Note: Updates to an item slug - will break all links referencing the old slug. - extra-properties: true - source: - openapi: ../../../openapi/referenced-specs/v2.yml - inline: true - CollectionItem: - docs: > - A Collection Item represents a single entry in your collection. Each item - includes: - - - - **System metadata** - Automatically managed fields like IDs and - timestamp
- - - **Status flags** - Controls for managing content state: `isDraft`, - `isArchived `
- - - **Content fields** - Stored in `fieldData`. Each item needs a `name` and - `slug`, and may include additional fields matching your collection's - schema definition. - properties: - id: - type: optional - docs: Unique identifier for the Item - access: read-only - cmsLocaleId: - type: optional - docs: Identifier for the locale of the CMS item - lastPublished: - type: optional - docs: The date the item was last published - access: read-only - lastUpdated: - type: optional - docs: The date the item was last updated - access: read-only - createdOn: - type: optional - docs: The date the item was created - access: read-only - isArchived: - type: optional - docs: Boolean determining if the Item is set to archived - default: false - isDraft: - type: optional - docs: Boolean determining if the Item is set to draft - default: false - fieldData: CollectionItemFieldData - source: - openapi: ../../../openapi/referenced-specs/v2.yml - CollectionItemListPagination: - properties: - limit: - type: optional - docs: The limit specified in the request - default: 100 - offset: - type: optional - docs: The offset specified for pagination - default: 0 - total: - type: optional - docs: Total number of items in the collection - source: - openapi: ../../../openapi/referenced-specs/v2.yml - inline: true - CollectionItemList: - docs: Results from collection items list - properties: - items: - type: optional> - docs: List of Items within the collection - pagination: optional - source: - openapi: ../../../openapi/referenced-specs/v2.yml - CollectionItemPostSingleFieldData: - properties: - name: - type: string - docs: Name of the Item - slug: - type: string - docs: >- - URL structure of the Item in your site. Note: Updates to an item slug - will break all links referencing the old slug. - extra-properties: true - source: - openapi: ../../../openapi/referenced-specs/v2.yml - inline: true - CollectionItemPostSingle: - docs: > - A Collection Item represents a single entry in your collection. Each item - includes: - - - - **System metadata** - Automatically managed fields like IDs and - timestamp
- - - **Status flags** - Controls for managing content state: `isDraft`, - `isArchived `
- - - **Content fields** - Stored in `fieldData`. Each item needs a `name` and - `slug`, and may include additional fields matching your collection's - schema definition. - properties: - id: - type: optional - docs: Unique identifier for the Item - access: read-only - cmsLocaleId: - type: optional - docs: Identifier for the locale of the CMS item - lastPublished: - type: optional - docs: The date the item was last published - access: read-only - lastUpdated: - type: optional - docs: The date the item was last updated - access: read-only - createdOn: - type: optional - docs: The date the item was created - access: read-only - isArchived: - type: optional - docs: Boolean determining if the Item is in an archived state. - default: false - isDraft: - type: optional - docs: Boolean determining if the Item is in a draft state. - default: true - fieldData: CollectionItemPostSingleFieldData - source: - openapi: ../../../openapi/referenced-specs/v2.yml - CollectionItemWithIdInputFieldData: - properties: - name: - type: optional - docs: Name of the Item - slug: - type: optional - docs: >- - URL structure of the Item in your site. Note: Updates to an item slug - will break all links referencing the old slug. - extra-properties: true - source: - openapi: ../../../openapi/referenced-specs/v2.yml - inline: true - CollectionItemWithIdInput: - docs: > - The fields that define the schema for a given Item are based on the - Collection that Item belongs to. Beyond the user defined fields, there are - a handful of additional fields that are automatically created for all - items - properties: - id: - type: string - docs: Unique identifier for the Item - cmsLocaleId: - type: optional - docs: Identifier for the locale of the CMS item - lastPublished: - type: optional - docs: The date the item was last published - access: read-only - lastUpdated: - type: optional - docs: The date the item was last updated - access: read-only - createdOn: - type: optional - docs: The date the item was created - access: read-only - isArchived: - type: optional - docs: Boolean determining if the Item is set to archived - isDraft: - type: optional - docs: Boolean determining if the Item is set to draft - fieldData: optional - source: - openapi: ../../../openapi/referenced-specs/v2.yml - CollectionItemListNoPagination: - docs: Results from collection items list - properties: - items: - type: optional> - docs: List of Items within the collection - source: - openapi: ../../../openapi/referenced-specs/v2.yml - Conflict: unknown - BulkCollectionItemFieldData: - properties: - name: - type: optional - docs: Name of the Item - slug: - type: optional - docs: >- - URL structure of the Item in your site. Note: Updates to an item slug - will break all links referencing the old slug. - extra-properties: true - source: - openapi: ../../../openapi/referenced-specs/v2.yml - inline: true - BulkCollectionItem: - docs: > - The fields that define the schema for a given Item are based on the - Collection that Item belongs to. Beyond the user defined fields, there are - a handful of additional fields that are automatically created for all - items - properties: - id: - type: optional - docs: Unique identifier for the Item - cmsLocaleIds: - type: optional> - docs: Array of identifiers for the locales where the item will be created - lastPublished: - type: optional - docs: The date the item was last published - access: read-only - lastUpdated: - type: optional - docs: The date the item was last updated - access: read-only - createdOn: - type: optional - docs: The date the item was created - access: read-only - isArchived: - type: optional - docs: Boolean determining if the Item is set to archived - default: false - isDraft: - type: optional - docs: Boolean determining if the Item is set to draft - default: false - fieldData: optional - source: - openapi: ../../../openapi/referenced-specs/v2.yml - CollectionItemPatchSingleFieldData: - properties: - name: - type: optional - docs: Name of the Item - slug: - type: optional - docs: >- - URL structure of the Item in your site. Note: Updates to an item slug - will break all links referencing the old slug. - extra-properties: true - source: - openapi: ../../../openapi/referenced-specs/v2.yml - inline: true - CollectionItemPatchSingle: - docs: > - The fields that define the schema for a given Item are based on the - Collection that Item belongs to. Beyond the user defined fields, there are - a handful of additional fields that are automatically created for all - items - properties: - id: - type: optional - docs: Unique identifier for the Item - access: read-only - cmsLocaleId: - type: optional - docs: Identifier for the locale of the CMS item - lastPublished: - type: optional - docs: The date the item was last published - access: read-only - lastUpdated: - type: optional - docs: The date the item was last updated - access: read-only - createdOn: - type: optional - docs: The date the item was created - access: read-only - isArchived: - type: optional - docs: Boolean determining if the Item is set to archived - isDraft: - type: optional - docs: Boolean determining if the Item is set to draft - fieldData: optional - source: - openapi: ../../../openapi/referenced-specs/v2.yml - CommentThreadAuthor: - properties: - userId: - type: string - docs: The unique identifier of the author - email: - type: string - docs: Email of the author - name: - type: string - docs: Name of the author - source: - openapi: ../../../openapi/referenced-specs/v2.yml - inline: true - CommentThreadMentionedUsersItem: - properties: - userId: - type: string - docs: The unique identifier of the mentioned user - email: - type: string - docs: Email of the user - name: - type: string - docs: Name of the User - source: - openapi: ../../../openapi/referenced-specs/v2.yml - inline: true - CommentThread: - docs: > - A comment thread represents a conversation between users on a specific - page. Each comment thread has a unique identifier and can contain multiple - comments. Retrieve comment replies using the replies API endpoint. - properties: - id: - type: string - docs: Unique identifier for the comment thread - siteId: - type: string - docs: The site unique identifier - pageId: - type: string - docs: The page unique identifier - localeId: - type: optional - docs: The locale unique identifier - access: read-only - itemId: - type: optional - docs: The item unique identifier - access: read-only - breakpoint: - type: string - docs: The breakpoint the comment was left on - url: - type: string - docs: The URL of the page the comment was left on - content: - type: string - docs: The content of the comment reply - isResolved: - type: boolean - docs: Boolean determining if the comment thread is resolved - default: false - author: CommentThreadAuthor - mentionedUsers: - docs: >- - List of mentioned users. This is an empty array until email - notifications are sent, which can take up to 5 minutes after the - comment is created. - type: list - createdOn: - type: string - docs: The date the item was created - lastUpdated: - type: string - docs: The date the item was last updated - source: - openapi: ../../../openapi/referenced-specs/v2.yml - CommentThreadListPagination: - properties: - limit: - type: integer - docs: The limit specified in the request (default 100) - default: 100 - offset: - type: integer - docs: The offset specified for pagination - default: 0 - total: - type: integer - docs: Total number of comment threads - source: - openapi: ../../../openapi/referenced-specs/v2.yml - inline: true - CommentThreadList: - docs: > - A list of comment threads on the site. Contains the content of the first - reply. - properties: - comments: list - pagination: CommentThreadListPagination - source: - openapi: ../../../openapi/referenced-specs/v2.yml - CommentReplyAuthor: - properties: - id: - type: string - docs: The unique identifier of the author - email: - type: string - docs: Email of the author - name: - type: string - docs: Name of the author - source: - openapi: ../../../openapi/referenced-specs/v2.yml - inline: true - CommentReplyMentionedUsersItem: - properties: - id: - type: string - docs: The unique identifier of the mentioned user - email: - type: string - docs: Email of the user - name: - type: string - docs: Name of the User - source: - openapi: ../../../openapi/referenced-specs/v2.yml - inline: true - CommentReply: - docs: > - A comment thread represents a conversation between users on a specific - page. Each comment thread has a unique identifier and can contain multiple - comments. - properties: - id: - type: string - docs: Unique identifier for the comment thread - commentId: - type: string - docs: The comment reply unique identifier - siteId: - type: string - docs: The site unique identifier - pageId: - type: string - docs: The page unique identifier - localeId: - type: optional - docs: The locale unique identifier - access: read-only - breakpoint: - type: string - docs: The breakpoint the comment was left on - content: - type: string - docs: The content of the comment reply - isResolved: - type: boolean - docs: Boolean determining if the comment thread is resolved - default: false - author: CommentReplyAuthor - mentionedUsers: - type: optional> - docs: >- - List of mentioned users is an empty array until email notifications - are sent. - lastUpdated: - type: optional - docs: The date the item was last updated - access: read-only - createdOn: - type: optional - docs: The date the item was created - access: read-only - source: - openapi: ../../../openapi/referenced-specs/v2.yml - CommentReplyListPagination: - properties: - limit: - type: integer - docs: The limit specified in the request (default 100) - default: 100 - offset: - type: integer - docs: The offset specified for pagination - default: 0 - total: - type: integer - docs: Total number of comment replies - source: - openapi: ../../../openapi/referenced-specs/v2.yml - inline: true - CommentReplyList: - docs: | - A list of comment replies. - properties: - comments: list - pagination: CommentReplyListPagination - source: - openapi: ../../../openapi/referenced-specs/v2.yml - PageSeo: - docs: SEO-related fields for the Page - properties: - title: - type: optional - docs: The Page title shown in search engine results - description: - type: optional - docs: The Page description shown in search engine results - source: - openapi: ../../../openapi/referenced-specs/v2.yml - inline: true - PageOpenGraph: - docs: Open Graph fields for the Page - properties: - title: - type: optional - docs: The title supplied to Open Graph annotations - titleCopied: - type: optional - docs: Indicates the Open Graph title was copied from the SEO title - default: true - access: read-only - description: - type: optional - docs: The description supplied to Open Graph annotations - descriptionCopied: - type: optional - docs: >- - Indicates the Open Graph description was copied from the SEO - description - default: true - access: read-only - source: - openapi: ../../../openapi/referenced-specs/v2.yml - inline: true - Page: - docs: The Page object - properties: - id: - type: string - docs: Unique identifier for the Page - siteId: - type: optional - docs: Unique identifier for the Site - access: read-only - title: - type: optional - docs: Title of the Page - slug: - type: optional - docs: slug of the Page (derived from title) - parentId: - type: optional - docs: Identifier of the parent folder - access: read-only - collectionId: - type: optional - docs: >- - Unique identifier for a linked Collection, value will be null if the - Page is not part of a Collection. - access: read-only - createdOn: - type: optional - docs: The date the Page was created - access: read-only - lastUpdated: - type: optional - docs: The date the Page was most recently updated - access: read-only - archived: - type: optional - docs: Whether the Page has been archived - default: false - access: read-only - draft: - type: optional - docs: Whether the Page is a draft - default: false - access: read-only - canBranch: - type: optional - docs: >- - Indicates whether the Page supports [Page - Branching](https://university.webflow.com/lesson/page-branching). - Pages that are already branches cannot be branched again. - default: false - access: read-only - isBranch: - type: optional - docs: >- - Indicates whether the Page is a Branch of another Page [Page - Branching](https://university.webflow.com/lesson/page-branching) - default: false - access: read-only - branchId: - type: optional - docs: If the Page is a Branch of another Page, this is the ID of the Branch - seo: - type: optional - docs: SEO-related fields for the Page - openGraph: - type: optional - docs: Open Graph fields for the Page - localeId: - type: optional - docs: Unique ID of the page locale - access: read-only - publishedPath: - type: optional - docs: Relative path of the published page URL - access: read-only - source: - openapi: ../../../openapi/referenced-specs/v2.yml - PageList: - docs: The Page object - properties: - pages: optional> - pagination: optional - source: - openapi: ../../../openapi/referenced-specs/v2.yml - TextNodeText: - docs: The text content of the node - properties: - html: - type: optional - docs: The HTML content of the text node. - text: - type: optional - docs: The raw text content of the text node. - source: - openapi: ../../../openapi/referenced-specs/v2.yml - inline: true - TextNode: - docs: > - Represents text content within the DOM. It contains both the raw text and - its HTML representation. Additional attributes can be associated with the - text for styling or other purposes. - properties: - id: - type: string - docs: Node UUID - text: - type: TextNodeText - docs: The text content of the node - attributes: - type: optional> - docs: The custom attributes of the node - source: - openapi: ../../../openapi/referenced-specs/v2.yml - ImageNodeImage: - docs: The image details of the node - properties: - alt: optional - assetId: optional - source: - openapi: ../../../openapi/referenced-specs/v2.yml - inline: true - ImageNode: - docs: > - Represents an image within the DOM. It contains details about the image, - such as its alternative text (alt) for accessibility and an asset - identifier for fetching the actual image resource. Additional attributes - can be associated with the image for styling or other purposes. - properties: - id: - type: string - docs: Node UUID - image: - type: ImageNodeImage - docs: The image details of the node - attributes: - type: optional> - docs: The custom attributes of the node - source: - openapi: ../../../openapi/referenced-specs/v2.yml - Text: - docs: The text content of the node - properties: - html: - type: optional - docs: The HTML content of the text node. - text: - type: optional - docs: The raw text content of the text node. - source: - openapi: ../../../openapi/referenced-specs/v2.yml - ComponentPropertyType: - enum: - - value: Plain Text - name: PlainText - - value: Rich Text - name: RichText - - value: Alt Text - name: AltText - docs: The type of the property. - inline: true - source: - openapi: ../../../openapi/referenced-specs/v2.yml - ComponentProperty: - docs: > - Represents a property of a component instance in the DOM. A property - contains a list of both the raw text and the HTML representation, allowing - for flexibility in rendering and processing. Additional attributes can be - associated with the text for styling or other purposes. - properties: - propertyId: - type: optional - docs: The ID of the property. - type: - type: optional - docs: The type of the property. - label: - type: optional - docs: The label of the property in the UI. - text: - type: optional - docs: >- - Represents text content within the DOM. It contains both the raw text - and its HTML representation. - source: - openapi: ../../../openapi/referenced-specs/v2.yml - ComponentNode: - docs: > - Represents a component instance within the DOM. It contains details about - the component instance, such as its type and properties. - properties: - id: - type: string - docs: The unique identifier of the component instance node - componentId: - type: string - docs: The unique identifier of the component - propertyOverrides: - docs: List of component properties with overrides for a component instance. - type: list - source: - openapi: ../../../openapi/referenced-specs/v2.yml - TextInputNode: - docs: > - Represents text input and textarea elements within the DOM. It contains - the placeholder text in the input. Additional attributes can be associated - with the text for styling or other purposes. - properties: - id: - type: string - docs: Node UUID - placeholder: - type: string - docs: The placeholder text of the input node - attributes: - type: optional> - docs: The custom attributes of the node - source: - openapi: ../../../openapi/referenced-specs/v2.yml - SelectNodeChoicesItem: - properties: - value: - type: string - docs: The value of the choice when selected. - text: - type: string - docs: The text to display for the choice. - source: - openapi: ../../../openapi/referenced-specs/v2.yml - inline: true - SelectNode: - docs: > - Represents select elements within the DOM. It contains the list of choices - in the select. Additional attributes can be associated with the text for - styling or other purposes. - properties: - id: - type: string - docs: Node UUID - choices: - docs: The list of choices in this select node. - type: list - attributes: - type: optional> - docs: The custom attributes of the node - source: - openapi: ../../../openapi/referenced-specs/v2.yml - SubmitButtonNode: - docs: > - Represents submit button elements within the DOM. It contains the text and - waiting text of the button. Additional attributes can be associated with - the text for styling or other purposes. - properties: - id: - type: string - docs: Node UUID - value: - type: string - docs: The text content of the submit button. - waitingText: - type: string - docs: The text to show while the form is submitting. - attributes: - type: optional> - docs: The custom attributes of the node - source: - openapi: ../../../openapi/referenced-specs/v2.yml - SearchButtonNode: - docs: > - Represents search button elements within the DOM. It contains the text of - the button. Additional attributes can be associated with the text for - styling or other purposes. - properties: - id: - type: string - docs: Node UUID - value: - type: string - docs: The text content of the search button. - attributes: - type: optional> - docs: The custom attributes of the node - source: - openapi: ../../../openapi/referenced-specs/v2.yml - Node: - discriminant: type - base-properties: {} - docs: > - A generic representation of a content element within the Document Object - Model (DOM). Each node has a unique identifier and a specific type that - determines its content structure and attributes. - union: - text: - type: TextNode - image: - type: ImageNode - component-instance: - type: ComponentNode - text-input: - type: TextInputNode - select: - type: SelectNode - submit-button: - type: SubmitButtonNode - search-button: - type: SearchButtonNode - source: - openapi: ../../../openapi/referenced-specs/v2.yml - Dom: - docs: > - The DOM (Document Object Model) schema represents the content structure of - a web page or component. It captures various content nodes along with - their associated attributes. Each node has a unique identifier and can be - of different types like text, image or component-instance. The schema also - provides pagination details for scenarios where the content nodes are too - many to be fetched in a single request. - properties: - pageId: - type: optional - docs: Page ID - branchId: - type: optional - docs: >- - The unique identifier of a [specific page - branch.](https://help.webflow.com/hc/en-us/articles/33961355506195-Page-branching) - nodes: optional> - pagination: optional - lastUpdated: - type: optional - docs: The date the page dom was most recently updated - access: read-only - source: - openapi: ../../../openapi/referenced-specs/v2.yml - TextNodeWrite: - docs: Update a text node - properties: - nodeId: - type: string - docs: Node UUID - text: - type: string - docs: >- - HTML content of the node, including the HTML tag. The HTML tags must - be the same as what's returned from the Get Content endpoint. - source: - openapi: ../../../openapi/referenced-specs/v2.yml - ComponentInstanceNodePropertyOverridesWritePropertyOverridesItem: - properties: - propertyId: - type: string - docs: The ID of the property. - text: - type: string - docs: > - The new string or HTML value used to override the component instance - property value. - - The provided value must be compatible with the type of the component - instance property. - - For example, attempting to override a single-line plain-text property - with a multi-line - - value will result in an error. - source: - openapi: ../../../openapi/referenced-specs/v2.yml - inline: true - ComponentInstanceNodePropertyOverridesWrite: - docs: Update text property overrides of a component instance - properties: - nodeId: - type: string - docs: Node UUID - propertyOverrides: - docs: >- - A list of component instance properties to override within the - specified secondary locale. - type: list - source: - openapi: ../../../openapi/referenced-specs/v2.yml - SelectNodeWriteChoicesItem: - properties: - value: - type: string - docs: The value of the choice when selected. - text: - type: string - docs: The text to display for the choice. - source: - openapi: ../../../openapi/referenced-specs/v2.yml - inline: true - Select: - docs: Update choices on a select node - properties: - nodeId: - type: string - docs: Node UUID - choices: - docs: The list of choices to set on the select node. - type: list - source: - openapi: ../../../openapi/referenced-specs/v2.yml - TextInputNodeWrite: - docs: Update placeholder text on a text input node - properties: - nodeId: - type: string - docs: Node UUID - placeholder: - type: string - docs: The placeholder text of the input node - source: - openapi: ../../../openapi/referenced-specs/v2.yml - SubmitButtonNodeWrite: - docs: Update a submit button node - properties: - nodeId: - type: string - docs: Node UUID - value: - type: optional - docs: The text content of the submit button. - waitingText: - type: optional - docs: The text to show while the form is submitting. - source: - openapi: ../../../openapi/referenced-specs/v2.yml - SearchButtonNodeWrite: - docs: Update a search button node - properties: - nodeId: - type: string - docs: Node UUID - value: - type: string - docs: The text content of the search button. - source: - openapi: ../../../openapi/referenced-specs/v2.yml - Component: - docs: The Component object - properties: - id: - type: string - docs: Unique identifier for the Component - name: - type: optional - docs: Component Name - access: read-only - group: - type: optional - docs: The group that the component belongs to - access: read-only - description: - type: optional - docs: Component Description - access: read-only - readonly: - type: optional - docs: >- - Indicates whether the component is read-only. Components that cannot - be updated within this Site are set to readonly. Workspace Libraries - are a good example. - access: read-only - source: - openapi: ../../../openapi/referenced-specs/v2.yml - ComponentList: - docs: List of Components on a site. - properties: - components: optional> - pagination: optional - source: - openapi: ../../../openapi/referenced-specs/v2.yml - ComponentDom: - docs: > - The Component DOM schema represents the content structure of a component. - Similar to Page DOM, it captures various content nodes and their - associated attributes, but specifically for a component's structure. Each - node has a unique identifier and can contain text, images, select or text - inputs, submit buttons, or nested component instances. - properties: - componentId: - type: optional - docs: Component ID - nodes: optional> - pagination: optional - source: - openapi: ../../../openapi/referenced-specs/v2.yml - ComponentProperties: - docs: > - The Component Properties schema represents a list of properties that store - text content. Each property has a unique identifier and can be of - different types like plain text or rich text. The schema also provides - pagination details for scenarios where there more properties than the - limit. - properties: - componentId: - type: optional - docs: Component ID - access: read-only - properties: optional> - pagination: optional - source: - openapi: ../../../openapi/referenced-specs/v2.yml - ScriptApplyLocation: - enum: - - header - - footer - docs: >- - Location of the script, either in the header or footer of the published - site - default: header - inline: true - source: - openapi: ../../../openapi/referenced-specs/v2.yml - ScriptApply: - properties: - id: - type: string - docs: ID of the registered custom code script - location: - type: ScriptApplyLocation - docs: >- - Location of the script, either in the header or footer of the - published site - default: header - version: - type: string - docs: Semantic Version String for the registered script *e.g. 0.0.1* - attributes: - type: optional> - docs: >- - Developer-specified key/value pairs to be applied as attributes to the - script - source: - openapi: ../../../openapi/referenced-specs/v2.yml - ScriptApplyList: - properties: - scripts: - type: optional> - docs: A list of scripts applied to a Site or a Page - lastUpdated: - type: optional - docs: Date when the Site's scripts were last updated - access: read-only - createdOn: - type: optional - docs: Date when the Site's scripts were created - access: read-only - source: - openapi: ../../../openapi/referenced-specs/v2.yml - CustomCodeHostedResponse: - docs: Registered custom code for application - properties: - id: - type: optional - docs: Human readable id, derived from the user-specified display name - access: read-only - canCopy: - type: optional - docs: >- - Define whether the script can be copied on site duplication and - transfer - default: false - displayName: - type: optional - docs: >- - User-facing name for the script. Must be between 1 and 50 alphanumeric - characters - hostedLocation: - type: optional - docs: URI for an externally hosted script location - integrityHash: - type: optional - docs: >- - Sub-Resource Integrity Hash. Only required for externally hosted - scripts (passed via hostedLocation) - createdOn: - type: optional - docs: Timestamp when the script version was created - access: read-only - lastUpdated: - type: optional - docs: Timestamp when the script version was last updated - access: read-only - version: - type: optional - docs: A Semantic Version (SemVer) string, denoting the version of the script - source: - openapi: ../../../openapi/referenced-specs/v2.yml - RegisteredScriptList: - docs: A list of scripts registered to the site - properties: - registeredScripts: optional> - pagination: optional - source: - openapi: ../../../openapi/referenced-specs/v2.yml - CustomCodeInlineResponse: - docs: Registered custom code for application - properties: - id: - type: optional - docs: Human readable id, derived from the user-specified display name - access: read-only - canCopy: - type: optional - docs: >- - Define whether the script can be copied on site duplication and - transfer - default: false - displayName: - type: optional - docs: >- - User-facing name for the script. Must be between 1 and 50 alphanumeric - characters - hostedLocation: - type: optional - docs: URI for an externally hosted script location - integrityHash: - type: optional - docs: >- - Sub-Resource Integrity Hash. Only required for externally hosted - scripts (passed via hostedLocation) - createdOn: - type: optional - docs: Timestamp when the script version was created - access: read-only - lastUpdated: - type: optional - docs: Timestamp when the script version was last updated - access: read-only - version: - type: optional - docs: A Semantic Version (SemVer) string, denoting the version of the script - source: - openapi: ../../../openapi/referenced-specs/v2.yml - Scripts: - docs: A list of scripts applied to a Site or a Page - type: list - CustomCodeBlockType: - enum: - - page - - site - docs: Whether the Custom Code script is applied at the Site-level or Page-level - inline: true - source: - openapi: ../../../openapi/referenced-specs/v2.yml - CustomCodeBlock: - docs: A specific instance of Custom Code applied to a Site or Page - properties: - siteId: - type: optional - docs: The Site ID where the custom code was applied - pageId: - type: optional - docs: The Page ID (if applied at Page-level) - type: - type: optional - docs: >- - Whether the Custom Code script is applied at the Site-level or - Page-level - scripts: optional - createdOn: - type: optional - docs: The date the Block was created - access: read-only - lastUpdated: - type: optional - docs: The date the Block was most recently updated - access: read-only - source: - openapi: ../../../openapi/referenced-specs/v2.yml - ListCustomCodeBlocks: - docs: Custom Code Blocks corresponding to where scripts were applied - properties: - blocks: optional> - pagination: optional - source: - openapi: ../../../openapi/referenced-specs/v2.yml - AssetVariant: - docs: Asset variant details - properties: - hostedUrl: - type: string - docs: URL of where the asset variant is hosted - validation: - format: uri - originalFileName: - type: string - docs: Original file name of the variant - displayName: - type: string - docs: Display name of the variant - format: - type: string - docs: format of the variant - width: - type: integer - docs: Width in pixels - height: - type: optional - docs: Height in pixels - quality: - type: integer - docs: Value between 0 and 100 representing the image quality - error: - type: optional - docs: Any associated validation errors - source: - openapi: ../../../openapi/referenced-specs/v2.yml - Asset: - docs: Asset details - properties: - id: - type: optional - docs: Unique identifier for this asset - access: read-only - contentType: - type: optional - docs: File format type - access: read-only - size: - type: optional - docs: size in bytes - access: read-only - siteId: - type: optional - docs: Unique identifier for the site that hosts this asset - access: read-only - hostedUrl: - type: optional - docs: Link to the asset - validation: - format: uri - access: read-only - originalFileName: - type: optional - docs: Original file name at the time of upload - access: read-only - displayName: - type: string - docs: Display name of the asset - lastUpdated: - type: optional - docs: Date the asset metadata was last updated - access: read-only - createdOn: - type: optional - docs: Date the asset metadata was created - access: read-only - variants: - docs: >- - A list of [asset - variants](https://help.webflow.com/hc/en-us/articles/33961378697107-Responsive-images) - created by Webflow to serve your site responsively. - type: list - altText: - type: optional - docs: The visual description of the asset - source: - openapi: ../../../openapi/referenced-specs/v2.yml - Assets: - docs: A list of assets - properties: - assets: optional> - pagination: optional - source: - openapi: ../../../openapi/referenced-specs/v2.yml - AssetUploadUploadDetails: - docs: Metadata for uploading the asset binary - properties: - acl: optional - bucket: optional - X-Amz-Algorithm: optional - X-Amz-Credential: optional - X-Amz-Date: optional - key: optional - Policy: optional - X-Amz-Signature: optional - success_action_status: optional - content-type: optional - Cache-Control: optional - source: - openapi: ../../../openapi/referenced-specs/v2.yml - inline: true - AssetUpload: - properties: - uploadDetails: - type: optional - docs: Metadata for uploading the asset binary - contentType: optional - id: optional - parentFolder: - type: optional - docs: Parent folder for the asset - uploadUrl: - type: optional - validation: - format: uri - assetUrl: - type: optional - docs: S3 link to the asset - validation: - format: uri - hostedUrl: - type: optional - docs: Represents the link to the asset - validation: - format: uri - originalFileName: - type: optional - docs: >- - Original file name when uploaded. If not specified at time of upload, - it may be extracted from the raw file name - createdOn: - type: optional - docs: Date the asset metadata was created - lastUpdated: - type: optional - docs: Date the asset metadata was last updated - source: - openapi: ../../../openapi/referenced-specs/v2.yml - AssetFolder: - docs: Asset Folder details - properties: - id: - type: optional - docs: Unique identifier for the Asset Folder - displayName: - type: optional - docs: User visible name for the Asset Folder - parentFolder: - type: optional - docs: Pointer to parent Asset Folder (or null if root) - assets: - type: optional> - docs: Array of Asset instances in the folder - siteId: - type: optional - docs: The unique ID of the site the Asset Folder belongs to - createdOn: - type: optional - docs: Date that the Asset Folder was created on - lastUpdated: - type: optional - docs: Date that the Asset Folder was last updated on - source: - openapi: ../../../openapi/referenced-specs/v2.yml - AssetFolderList: - docs: The Asset Folders object - properties: - assetFolders: - type: optional> - docs: A list of Asset folders - pagination: optional - source: - openapi: ../../../openapi/referenced-specs/v2.yml - TriggerType: - enum: - - form_submission - - site_publish - - page_created - - page_metadata_updated - - page_deleted - - ecomm_new_order - - ecomm_order_changed - - ecomm_inventory_changed - - collection_item_created - - collection_item_changed - - collection_item_deleted - - collection_item_published - - collection_item_unpublished - - comment_created - docs: > - The type of event that triggered the request. See the the documentation - for details on [supported events](/data/reference/all-events). - source: - openapi: ../../../openapi/referenced-specs/v2.yml - WebhookFilter: - docs: >- - Only supported for the `form_submission` trigger type. Filter for the form - you want Webhooks to be sent for. - properties: - name: - type: optional - docs: The name of the form you'd like to recieve notifications for. - source: - openapi: ../../../openapi/referenced-specs/v2.yml - inline: true - Webhook: - properties: - id: - type: optional - docs: Unique identifier for the Webhook registration - access: read-only - triggerType: optional - url: - type: optional - docs: URL to send the Webhook payload to - workspaceId: - type: optional - docs: Unique identifier for the Workspace the Webhook is registered in - access: read-only - siteId: - type: optional - docs: Unique identifier for the Site the Webhook is registered in - access: read-only - filter: - type: optional - docs: >- - Only supported for the `form_submission` trigger type. Filter for the - form you want Webhooks to be sent for. - lastTriggered: - type: optional - docs: Date the Webhook instance was last triggered - access: read-only - createdOn: - type: optional - docs: Date the Webhook registration was created - access: read-only - source: - openapi: ../../../openapi/referenced-specs/v2.yml - WebhookList: - properties: - webhooks: optional> - pagination: optional - source: - openapi: ../../../openapi/referenced-specs/v2.yml - FormFieldValueType: - enum: - - Plain - - Email - - Password - - Phone - - Number - docs: The field type - inline: true - source: - openapi: ../../../openapi/referenced-specs/v2.yml - FormFieldValue: - docs: An object containing field info for a specific fieldID. - properties: - displayName: - type: optional - docs: The field name displayed on the site - type: - type: optional - docs: The field type - placeholder: - type: optional - docs: The placeholder text for the field - userVisible: - type: optional - docs: Whether the field is visible to the user - source: - openapi: ../../../openapi/referenced-specs/v2.yml - inline: true - FormField: - type: map - docs: A collection of form fields with additional properties. - FormResponseSettings: - docs: Settings for form responses - properties: - redirectUrl: - type: optional - docs: The url or path to redirect the user to after form submission - redirectMethod: - type: optional - docs: The HTTP request method to use for the redirectUrl (eg. POST or GET) - redirectAction: - type: optional - docs: The action to take after form submission - sendEmailConfirmation: - type: optional - docs: Whether to send an email confirmation to the user - source: - openapi: ../../../openapi/referenced-specs/v2.yml - inline: true - Form: - docs: A Webflow form - properties: - displayName: - type: optional - docs: The Form name displayed on the site - createdOn: - type: optional - docs: Date that the Form was created on - lastUpdated: - type: optional - docs: Date that the Form was last updated on - fields: - type: optional - docs: A collection of form field objects - responseSettings: - type: optional - docs: Settings for form responses - id: - type: optional - docs: The unique ID for the Form - siteId: - type: optional - docs: The unique ID of the Site the Form belongs to - siteDomainId: - type: optional - docs: The unique ID corresponding to the site's Domain name - pageId: - type: optional - docs: The unique ID for the Page on which the Form is placed - pageName: - type: optional - docs: The user-visible name of the Page where the Form is placed - formElementId: - type: optional - docs: The unique ID of the Form element - workspaceId: - type: optional - docs: The unique ID of the Workspace the Site belongs to - source: - openapi: ../../../openapi/referenced-specs/v2.yml - FormList: - properties: - forms: optional> - pagination: optional - source: - openapi: ../../../openapi/referenced-specs/v2.yml - FormSubmission: - properties: - id: - type: optional - docs: The unique ID of the Form submission - displayName: - type: optional - docs: The Form name displayed on the site - siteId: - type: optional - docs: The unique ID of the Site the Form belongs to - workspaceId: - type: optional - docs: The unique ID of the Workspace the Site belongs to - dateSubmitted: - type: optional - docs: Date that the Form was submitted on - formResponse: - type: optional> - docs: The data submitted in the Form - source: - openapi: ../../../openapi/referenced-specs/v2.yml - FormSubmissionList: - properties: - formSubmissions: optional> - pagination: optional - source: - openapi: ../../../openapi/referenced-specs/v2.yml - SkuPropertyListEnumItem: - docs: Enumerated Product variants/Options for the SKU - properties: - id: - type: string - docs: Unique identifier for a Product variant/Option - name: - type: string - docs: Name of the Product variant/Option - slug: - type: string - docs: Slug for the Product variant/Option in the Site URL structure - source: - openapi: ../../../openapi/referenced-specs/v2.yml - inline: true - SkuPropertyList: - docs: A variant/option type for a SKU - properties: - id: - type: string - docs: Unique identifier for a collection of Product Variants - name: - type: string - docs: Name of the collection of Product Variants - enum: - docs: >- - The individual Product variants that are contained within the - collection - type: list - source: - openapi: ../../../openapi/referenced-specs/v2.yml - ProductFieldDataTaxCategory: - enum: - - value: standard-taxable - name: StandardTaxable - - value: standard-exempt - name: StandardExempt - - value: books-religious - name: BooksReligious - - value: books-textbook - name: BooksTextbook - - clothing - - value: clothing-swimwear - name: ClothingSwimwear - - value: digital-goods - name: DigitalGoods - - value: digital-service - name: DigitalService - - value: drugs-non-prescription - name: DrugsNonPrescription - - value: drugs-prescription - name: DrugsPrescription - - value: food-bottled-water - name: FoodBottledWater - - value: food-candy - name: FoodCandy - - value: food-groceries - name: FoodGroceries - - value: food-prepared - name: FoodPrepared - - value: food-soda - name: FoodSoda - - value: food-supplements - name: FoodSupplements - - value: magazine-individual - name: MagazineIndividual - - value: magazine-subscription - name: MagazineSubscription - - value: service-admission - name: ServiceAdmission - - value: service-advertising - name: ServiceAdvertising - - value: service-dry-cleaning - name: ServiceDryCleaning - - value: service-hairdressing - name: ServiceHairdressing - - value: service-installation - name: ServiceInstallation - - value: service-miscellaneous - name: ServiceMiscellaneous - - value: service-parking - name: ServiceParking - - value: service-printing - name: ServicePrinting - - value: service-professional - name: ServiceProfessional - - value: service-repair - name: ServiceRepair - - value: service-training - name: ServiceTraining - docs: Product tax class - inline: true - source: - openapi: ../../../openapi/referenced-specs/v2.yml - ProductFieldDataEcProductType: - enum: - - ff42fee0113744f693a764e3431a9cc2 - - f22027db68002190aef89a4a2b7ac8a1 - - c599e43b1a1c34d5a323aedf75d3adf6 - - b6ccc1830db4b1babeb06a9ac5f6dd76 - docs: >- - Product - types. Enums reflect the following values in order: Physical, Digital, - Service, Advanced" - inline: true - source: - openapi: ../../../openapi/referenced-specs/v2.yml - ProductFieldData: - docs: >- - Contains content-specific details for a product, covering both standard - (e.g., title, description) and custom fields tailored to the product - setup. - properties: - name: - type: optional - docs: Name of the Product - slug: - type: optional - docs: URL structure of the Product in your site. - description: - type: optional - docs: A description of your product - shippable: - type: optional - docs: Boolean determining if the Product is shippable - sku-properties: - type: optional> - docs: Variant types to include in SKUs - category: - type: optional> - docs: The category your product belongs to. - tax-category: - type: optional - docs: Product tax class - default-sku: - type: optional - docs: The default SKU associated with this product. - ec-product-type: - type: optional - docs: >- - Product - types. Enums reflect the following values in order: Physical, - Digital, Service, Advanced" - source: - openapi: ../../../openapi/referenced-specs/v2.yml - Product: - docs: The Product object - properties: - id: - type: optional - docs: Unique identifier for the Product - access: read-only - cmsLocaleId: - type: optional - docs: Identifier for the locale of the CMS item - access: read-only - lastPublished: - type: optional - docs: The date the Product was last published - access: read-only - lastUpdated: - type: optional - docs: The date the Product was last updated - access: read-only - createdOn: - type: optional - docs: The date the Product was created - access: read-only - isArchived: - type: optional - docs: Boolean determining if the Product is set to archived - default: false - isDraft: - type: optional - docs: Boolean determining if the Product is set to draft - default: false - fieldData: optional - source: - openapi: ../../../openapi/referenced-specs/v2.yml - SkuValueList: - type: map - docs: > - A mapping between SKU properties and their values, represented as - key-value pairs. Each key represents a SKU Property ID (e.g. "color") and - maps to its corresponding SKU Value ID (e.g. "blue"). This structure - defines the specific variant combination for a SKU. - SkuFieldDataPrice: - docs: price of SKU - properties: - value: - type: optional - docs: Price of SKU - unit: - type: optional - docs: Currency of Item - currency: - type: optional - docs: Currency of Item (alternative representation) - source: - openapi: ../../../openapi/referenced-specs/v2.yml - inline: true - SkuFieldDataCompareAtPrice: - docs: comparison price of SKU - properties: - value: - type: optional - docs: Price of SKU - unit: - type: optional - docs: Currency of Item - source: - openapi: ../../../openapi/referenced-specs/v2.yml - inline: true - SkuFieldDataEcSkuBillingMethod: - enum: - - value: one-time - name: OneTime - - subscription - docs: >- - [Billing - method](https://help.webflow.com/hc/en-us/articles/33961432087955-Add-and-manage-products-and-categories#billing-methods)for - the SKU - inline: true - source: - openapi: ../../../openapi/referenced-specs/v2.yml - SkuFieldDataEcSkuSubscriptionPlanInterval: - enum: - - day - - week - - month - - year - docs: Interval of subscription renewal - inline: true - source: - openapi: ../../../openapi/referenced-specs/v2.yml - SkuFieldDataEcSkuSubscriptionPlanPlansItemStatus: - enum: - - active - - inactive - - canceled - docs: The status of the plan - inline: true - source: - openapi: ../../../openapi/referenced-specs/v2.yml - SkuFieldDataEcSkuSubscriptionPlanPlansItem: - properties: - platform: - type: optional> - docs: The platform of the subscription plan - id: - type: optional - docs: The unique identifier of the plan - status: - type: optional - docs: The status of the plan - source: - openapi: ../../../openapi/referenced-specs/v2.yml - inline: true - SkuFieldDataEcSkuSubscriptionPlan: - docs: >- - [Subscription - plan](https://help.webflow.com/hc/en-us/articles/33961432087955-Add-and-manage-products-and-categories#subscription) - for the SKU - properties: - interval: - type: optional - docs: Interval of subscription renewal - frequency: - type: optional - docs: Frequncy of billing within interval - trial: - type: optional - docs: Number of days of a trial - plans: - type: optional> - access: read-only - source: - openapi: ../../../openapi/referenced-specs/v2.yml - inline: true - SkuFieldData: - docs: Standard and Custom fields for a SKU - properties: - sku-values: optional - name: - type: string - docs: Name of the Product - slug: - type: string - docs: URL structure of the Product in your site. - price: - type: SkuFieldDataPrice - docs: price of SKU - compare-at-price: - type: optional - docs: comparison price of SKU - ec-sku-billing-method: - type: optional - docs: >- - [Billing - method](https://help.webflow.com/hc/en-us/articles/33961432087955-Add-and-manage-products-and-categories#billing-methods)for - the SKU - ec-sku-subscription-plan: - type: optional - docs: >- - [Subscription - plan](https://help.webflow.com/hc/en-us/articles/33961432087955-Add-and-manage-products-and-categories#subscription) - for the SKU - main-image: - type: optional - docs: The URL for the main image of the SKU - sku: - type: optional - docs: A unique identifier for the SKU - sku-properties: - type: optional> - docs: The properties of the SKU - source: - openapi: ../../../openapi/referenced-specs/v2.yml - Sku: - docs: The SKU object - properties: - id: - type: optional - docs: Unique identifier for the Product - access: read-only - cmsLocaleId: - type: optional - docs: Identifier for the locale of the CMS item - access: read-only - lastPublished: - type: optional - docs: The date the Product was last published - access: read-only - lastUpdated: - type: optional - docs: The date the Product was last updated - access: read-only - createdOn: - type: optional - docs: The date the Product was created - access: read-only - fieldData: optional - source: - openapi: ../../../openapi/referenced-specs/v2.yml - ProductAndSkUs: - docs: A product and its SKUs. - properties: - product: optional - skus: - type: optional> - docs: A list of SKU Objects - source: - openapi: ../../../openapi/referenced-specs/v2.yml - ProductAndSkUsList: - docs: Results from product list - properties: - items: - type: optional> - docs: >- - List of Item objects within the Collection. Contains product and skus - keys for each Item - pagination: optional - source: - openapi: ../../../openapi/referenced-specs/v2.yml - PublishStatus: - enum: - - staging - - live - docs: Indicate whether your Product should be set as "staging" or "live" - default: staging - source: - openapi: ../../../openapi/referenced-specs/v2.yml - OrderPrice: - properties: - unit: - type: optional - docs: The three-letter ISO currency code - value: - type: optional - docs: The numeric value in the base unit of the currency - string: - type: optional - docs: The user-facing string representation of the amount - source: - openapi: ../../../openapi/referenced-specs/v2.yml - OrderAddressType: - enum: - - shipping - - billing - docs: The type of the order address (billing or shipping) - inline: true - source: - openapi: ../../../openapi/referenced-specs/v2.yml - OrderAddressJapanType: - enum: - - kana - - kanji - docs: >- - Represents a Japan-only address format. This field will only appear on - orders placed from Japan. - inline: true - source: - openapi: ../../../openapi/referenced-specs/v2.yml - OrderAddress: - docs: A customer address - properties: - type: - type: optional - docs: The type of the order address (billing or shipping) - japanType: - type: optional - docs: >- - Represents a Japan-only address format. This field will only appear on - orders placed from Japan. - addressee: - type: optional - docs: Display name on the address - line1: - type: optional - docs: The first line of the address - line2: - type: optional - docs: The second line of the address - city: - type: optional - docs: The city of the address. - state: - type: optional - docs: The state or province of the address - country: - type: optional - docs: The country of the address - postalCode: - type: optional - docs: The postal code of the address - source: - openapi: ../../../openapi/referenced-specs/v2.yml - OrderPurchasedItemVariantImageFileVariantsItem: - properties: - url: - type: optional - docs: The hosted location for the Variant's image - validation: - format: uri - originalFileName: optional - size: - type: optional - docs: The image size in bytes - width: - type: optional - docs: The image width in pixels - height: - type: optional - docs: The image height in pixels - source: - openapi: ../../../openapi/referenced-specs/v2.yml - inline: true - OrderPurchasedItemVariantImageFile: - properties: - size: - type: optional - docs: The image size in bytes - originalFileName: - type: optional - docs: the original name of the image - createdOn: - type: optional - docs: The creation timestamp of the image - contentType: - type: optional - docs: The MIME type of the image - width: - type: optional - docs: The image width in pixels - height: - type: optional - docs: The image height in pixels - variants: - type: optional> - docs: Variants of the supplied image - source: - openapi: ../../../openapi/referenced-specs/v2.yml - inline: true - OrderPurchasedItemVariantImage: - properties: - url: - type: optional - docs: The hosted location for the Variant's image - validation: - format: uri - file: optional - source: - openapi: ../../../openapi/referenced-specs/v2.yml - inline: true - OrderPurchasedItem: - docs: An Item that was purchased - properties: - count: - type: optional - docs: Number of Item purchased. - rowTotal: - type: optional - docs: The total for the row - productId: - type: optional - docs: The unique identifier for the Product - access: read-only - productName: - type: optional - docs: User-facing name of the Product - productSlug: - type: optional - docs: Slug for the Product - variantId: - type: optional - docs: Identifier for the Product Variant (SKU) - variantName: - type: optional - docs: User-facing name of the Product Variant (SKU) - variantSlug: - type: optional - docs: Slug for the Product Variant (SKU) - variantSKU: - type: optional - docs: The user-defined custom SKU of the Product Variant (SKU) - variantImage: optional - variantPrice: - type: optional - docs: The price corresponding to the variant - weight: - type: optional - docs: The physical weight of the variant if provided, or null - width: - type: optional - docs: The physical width of the variant if provided, or null - height: - type: optional - docs: The physical height of the variant if provided, or null - length: - type: optional - docs: The physical length of the variant if provided, or null - source: - openapi: ../../../openapi/referenced-specs/v2.yml - StripeDetails: - docs: >- - An object with various Stripe IDs, useful for linking into the stripe - dashboard. - properties: - subscriptionId: - type: optional - docs: Stripe-generated identifier for the Subscription - paymentMethod: - type: optional - docs: Stripe-generated identifier for the PaymentMethod used - paymentIntentId: - type: optional - docs: Stripe-generated identifier for the PaymentIntent, or null - customerId: - type: optional - docs: Stripe-generated customer identifier, or null - chargeId: - type: optional - docs: Stripe-generated charge identifier, or null - disputeId: - type: optional - docs: Stripe-generated dispute identifier, or null - refundId: - type: optional - docs: Stripe-generated refund identifier, or null - refundReason: - type: optional - docs: Stripe-generated refund reason, or null - source: - openapi: ../../../openapi/referenced-specs/v2.yml - StripeCardBrand: - enum: - - Visa - - value: American Express - name: AmericanExpress - - MasterCard - - Discover - - JCB - - value: Diners Club - name: DinersClub - - Unknown - docs: The card's brand (ie. credit card network) - inline: true - source: - openapi: ../../../openapi/referenced-specs/v2.yml - StripeCardExpires: - docs: The card's expiration date. - properties: - year: - type: optional - docs: Year that the card expires - month: - type: optional - docs: Month that the card expires - source: - openapi: ../../../openapi/referenced-specs/v2.yml - inline: true - StripeCard: - docs: > - Details on the card used to fulfill this order, if this order was - finalized with Stripe. - properties: - last4: - type: optional - docs: The last 4 digits on the card as a string - brand: - type: optional - docs: The card's brand (ie. credit card network) - ownerName: - type: optional - docs: The name on the card. - expires: - type: optional - docs: The card's expiration date. - source: - openapi: ../../../openapi/referenced-specs/v2.yml - PaypalDetails: - properties: - orderId: - type: optional - docs: PayPal order identifier - payerId: - type: optional - docs: PayPal payer identifier - captureId: - type: optional - docs: PayPal capture identifier - refundId: - type: optional - docs: PayPal refund identifier - refundReason: - type: optional - docs: PayPal-issued reason for the refund - disputeId: - type: optional - docs: PayPal dispute identifier - source: - openapi: ../../../openapi/referenced-specs/v2.yml - OrderStatus: - enum: - - pending - - unfulfilled - - fulfilled - - disputed - - value: dispute-lost - name: DisputeLost - - refunded - docs: | - The status of the Order - inline: true - source: - openapi: ../../../openapi/referenced-specs/v2.yml - OrderDisputeLastStatus: - enum: - - warning_needs_response - - warning_under_review - - warning_closed - - needs_response - - under_review - - charge_refunded - - won - - lost - docs: > - If an order was disputed by the customer, then this key will be set with - the [dispute's status](https://stripe.com/docs/api#dispute_object-status). - inline: true - source: - openapi: ../../../openapi/referenced-specs/v2.yml - OrderShippingAddressType: - enum: - - shipping - - billing - docs: The type of the order address (billing or shipping) - inline: true - source: - openapi: ../../../openapi/referenced-specs/v2.yml - OrderShippingAddressJapanType: - enum: - - kana - - kanji - docs: >- - Represents a Japan-only address format. This field will only appear on - orders placed from Japan. - inline: true - source: - openapi: ../../../openapi/referenced-specs/v2.yml - OrderShippingAddress: - docs: The shipping address - properties: - type: - type: optional - docs: The type of the order address (billing or shipping) - japanType: - type: optional - docs: >- - Represents a Japan-only address format. This field will only appear on - orders placed from Japan. - addressee: - type: optional - docs: Display name on the address - line1: - type: optional - docs: The first line of the address - line2: - type: optional - docs: The second line of the address - city: - type: optional - docs: The city of the address. - state: - type: optional - docs: The state or province of the address - country: - type: optional - docs: The country of the address - postalCode: - type: optional - docs: The postal code of the address - source: - openapi: ../../../openapi/referenced-specs/v2.yml - inline: true - OrderBillingAddressType: - enum: - - shipping - - billing - docs: The type of the order address (billing or shipping) - inline: true - source: - openapi: ../../../openapi/referenced-specs/v2.yml - OrderBillingAddressJapanType: - enum: - - kana - - kanji - docs: >- - Represents a Japan-only address format. This field will only appear on - orders placed from Japan. - inline: true - source: - openapi: ../../../openapi/referenced-specs/v2.yml - OrderBillingAddress: - docs: The billing address - properties: - type: - type: optional - docs: The type of the order address (billing or shipping) - japanType: - type: optional - docs: >- - Represents a Japan-only address format. This field will only appear on - orders placed from Japan. - addressee: - type: optional - docs: Display name on the address - line1: - type: optional - docs: The first line of the address - line2: - type: optional - docs: The second line of the address - city: - type: optional - docs: The city of the address. - state: - type: optional - docs: The state or province of the address - country: - type: optional - docs: The country of the address - postalCode: - type: optional - docs: The postal code of the address - source: - openapi: ../../../openapi/referenced-specs/v2.yml - inline: true - OrderCustomerInfo: - docs: An object with the keys `fullName` and `email`. - properties: - fullName: - type: optional - docs: The full name of the Customer - email: - type: optional - docs: The Customer's email address - validation: - format: email - source: - openapi: ../../../openapi/referenced-specs/v2.yml - inline: true - OrderMetadata: - properties: - isBuyNow: optional - source: - openapi: ../../../openapi/referenced-specs/v2.yml - inline: true - OrderTotalsExtrasItemType: - enum: - - discount - - value: discount-shipping - name: DiscountShipping - - shipping - - tax - docs: The type of extra item this is. - inline: true - source: - openapi: ../../../openapi/referenced-specs/v2.yml - OrderTotalsExtrasItem: - docs: Extra order items, includes discounts, shipping, and taxes. - properties: - type: - type: optional - docs: The type of extra item this is. - name: - type: optional - docs: A human-readable (but English) name for this extra charge. - description: - type: optional - docs: A human-readable (but English) description of this extra charge. - price: - type: optional - docs: The price for the item - source: - openapi: ../../../openapi/referenced-specs/v2.yml - inline: true - OrderTotals: - docs: An object describing various pricing totals - properties: - subtotal: - type: optional - docs: The subtotal price - extras: - type: optional> - docs: An array of extra items, includes discounts, shipping, and taxes. - total: - type: optional - docs: The total price - source: - openapi: ../../../openapi/referenced-specs/v2.yml - inline: true - OrderDownloadFilesItem: - properties: - id: - type: optional - docs: The unique identifier for the downloadable file - name: - type: optional - docs: The user-facing name for the downloadable file - url: - type: optional - docs: The hosted location for the downloadable file - validation: - format: uri - source: - openapi: ../../../openapi/referenced-specs/v2.yml - inline: true - Order: - properties: - orderId: - type: optional - docs: | - The order ID. Will usually be 6 hex characters, but can also be 9 - hex characters if the site has a very large number of Orders. - Randomly assigned. - access: read-only - status: - type: optional - docs: | - The status of the Order - comment: - type: optional - docs: >- - A comment string for this Order, which is editable by API user (not - used by Webflow). - orderComment: - type: optional - docs: A comment that the customer left when making their Order - acceptedOn: - type: optional - docs: The ISO8601 timestamp that an Order was placed. - fulfilledOn: - type: optional - docs: > - When an Order is marked as 'fulfilled', this field represents the - timestamp of the fulfillment in ISO8601 format. Otherwise, it is null. - refundedOn: - type: optional - docs: >- - When an Order is marked as 'refunded', this field represents the - timestamp of the fulfillment in ISO8601 format. Otherwise, it is null. - disputedOn: - type: optional - docs: > - When an Order is marked as 'disputed', this field represents the - timestamp of the fulfillment in ISO8601 format. Otherwise, it is null. - disputeUpdatedOn: - type: optional - docs: > - If an Order has been disputed by the customer, this key will be set to - the ISO8601 timestamp of the last update received. If the Order is not - disputed, the key will be null. - disputeLastStatus: - type: optional - docs: > - If an order was disputed by the customer, then this key will be set - with the [dispute's - status](https://stripe.com/docs/api#dispute_object-status). - customerPaid: - type: optional - docs: The total paid by the customer - netAmount: - type: optional - docs: The net amount after application fees - applicationFee: - type: optional - docs: The application fee assessed by the platform - allAddresses: - type: optional> - docs: All addresses provided by the customer during the ordering flow. - shippingAddress: - type: optional - docs: The shipping address - billingAddress: - type: optional - docs: The billing address - shippingProvider: - type: optional - docs: > - A string editable by the API user to note the shipping provider used - (not used by Webflow). - shippingTracking: - type: optional - docs: > - A string editable by the API user to note the shipping tracking number - for the order (not used by Webflow). - shippingTrackingURL: - type: optional - validation: - format: uri - customerInfo: - type: optional - docs: An object with the keys `fullName` and `email`. - purchasedItems: - type: optional> - docs: An array of all things that the Customer purchased. - purchasedItemsCount: - type: optional - docs: The sum of all 'count' fields in 'purchasedItems'. - stripeDetails: optional - stripeCard: optional - paypalDetails: optional - customData: - type: optional>> - docs: > - An array of additional inputs for custom order data gathering. Each - object in the array represents an input with a name, and a textInput, - textArea, or checkbox value. - metadata: optional - isCustomerDeleted: - type: optional - docs: > - A boolean indicating whether the customer has been deleted from the - site. - isShippingRequired: - type: optional - docs: > - A boolean indicating whether the order contains one or more purchased - items that require shipping. - hasDownloads: - type: optional - docs: > - A boolean indicating whether the order contains one or more purchased - items that are downloadable. - paymentProcessor: - type: optional - docs: | - A string indicating the payment processor used for this order. - totals: - type: optional - docs: An object describing various pricing totals - downloadFiles: - type: optional> - docs: An array of downloadable file objects. - source: - openapi: ../../../openapi/referenced-specs/v2.yml - OrderList: - docs: Results from order list - properties: - orders: - type: optional> - docs: List of orders - pagination: optional - source: - openapi: ../../../openapi/referenced-specs/v2.yml - InventoryItemInventoryType: - enum: - - infinite - - finite - docs: infinite or finite - inline: true - source: - openapi: ../../../openapi/referenced-specs/v2.yml - InventoryItem: - docs: The availabile inventory for an item - properties: - id: - type: optional - docs: Unique identifier for a SKU item - access: read-only - quantity: - type: optional - docs: >- - Total quantity of items remaining in inventory (if inventoryType is - finite) - inventoryType: - type: optional - docs: infinite or finite - source: - openapi: ../../../openapi/referenced-specs/v2.yml - EcommerceSettings: - docs: Ecommerce settings for a Webflow Site - properties: - siteId: - type: optional - docs: The identifier of the Site - access: read-only - createdOn: - type: optional - docs: Date that the Site was created on - access: read-only - defaultCurrency: - type: optional - docs: The three-letter ISO currency code for the Site - source: - openapi: ../../../openapi/referenced-specs/v2.yml - FormSubmissionTriggerPayloadSchemaItemFieldType: - enum: - - FormTextInput - - FormTextarea - - FormCheckboxInput - - FormRadioInput - - FormFileUploadInput - docs: Form field type - inline: true - source: - openapi: ../../../openapi/referenced-specs/v2.yml - FormSubmissionTriggerPayloadSchemaItem: - properties: - fieldName: - type: optional - docs: Form field name - fieldType: - type: optional - docs: Form field type - fieldElementId: - type: optional - docs: Element ID of the Form Field - source: - openapi: ../../../openapi/referenced-specs/v2.yml - inline: true - FormSubmissionTriggerPayload: - docs: The payload of data sent from Webflow - properties: - name: - type: optional - docs: The name of the form - siteId: - type: optional - docs: The ID of the site that the form was submitted from - data: - type: optional> - docs: The data submitted in the form - schema: - type: optional> - docs: A list of fields from the submitted form - submittedAt: - type: optional - docs: The timestamp the form was submitted - id: - type: optional - docs: the ID of the event - formId: - type: optional - docs: The ID of the form submission - formElementId: - type: optional - docs: The uniqueID of the Form element - source: - openapi: ../../../openapi/referenced-specs/v2.yml - inline: true - FormSubmissionTrigger: - docs: The Webhook payload for when a form is submitted - properties: - triggerType: - type: optional - docs: The type of event that triggered the request - payload: - type: optional - docs: The payload of data sent from Webflow - source: - openapi: ../../../openapi/referenced-specs/v2.yml - SitePublishPayload: - docs: The payload of data sent from Webflow - properties: - siteId: - type: optional - docs: The ID of the site that was published - publishedOn: - type: optional - docs: The timestamp of the publish event - domains: - type: optional> - docs: The domains that were published - publishedBy: - type: optional> - docs: The name andID of the user who published the site - source: - openapi: ../../../openapi/referenced-specs/v2.yml - inline: true - SitePublish: - docs: The Webhook payload for when a Site is published - properties: - triggerType: - type: optional - docs: The type of event that triggered the request - payload: - type: optional - docs: The payload of data sent from Webflow - source: - openapi: ../../../openapi/referenced-specs/v2.yml - NewOrder: - docs: The Webhook payload for when a new order is created - properties: - triggerType: - type: optional - docs: The type of event that triggered the request - payload: optional - source: - openapi: ../../../openapi/referenced-specs/v2.yml - UpdatedOrder: - docs: The Webhook payload for when an order is updated - properties: - triggerType: - type: optional - docs: The type of event that triggered the request - payload: optional - source: - openapi: ../../../openapi/referenced-specs/v2.yml - SingleLocaleCreatedPayloadFieldData: - properties: - name: string - slug: string - extra-properties: true - source: - openapi: ../../../openapi/referenced-specs/v2.yml - inline: true - SingleLocaleCreatedPayload: - properties: - id: - type: string - docs: Unique identifier for the Item - validation: - format: uuid - workspaceId: - type: string - docs: Unique identifier of the workspace - validation: - format: uuid - siteId: - type: string - docs: Unique identifier of the site - validation: - format: uuid - collectionId: - type: string - docs: Unique identifier of the collection - validation: - format: uuid - cmsLocaleId: - type: optional - docs: Unique identifier of the CMS locale for this item - validation: - format: uuid - lastPublished: optional - lastUpdated: optional - createdOn: optional - isArchived: optional - isDraft: optional - fieldData: SingleLocaleCreatedPayloadFieldData - source: - openapi: ../../../openapi/referenced-specs/v2.yml - CollectionItemCreated: - docs: The Webhook payload for when a Collection Item is created - properties: - triggerType: - type: literal<"collection_item_created"> - docs: The type of event that triggered the request - payload: - type: SingleLocaleCreatedPayload - source: - openapi: ../../../openapi/referenced-specs/v2.yml - CollectionItemChanged: - docs: The Webhook payload for when a Collection Item is changed - properties: - triggerType: - type: literal<"collection_item_changed"> - docs: The type of event that triggered the request - payload: - type: SingleLocaleCreatedPayload - source: - openapi: ../../../openapi/referenced-specs/v2.yml - CollectionItemRemovedPayloadFieldData: - properties: - name: string - slug: string - extra-properties: true - source: - openapi: ../../../openapi/referenced-specs/v2.yml - inline: true - CollectionItemRemovedPayload: - docs: The payload of data sent from Webflow - properties: - id: - type: optional - docs: The ID of the collection item that was deleted - siteId: - type: optional - docs: The ID of the site - workspaceId: - type: optional - docs: The ID of the workspace - collectionId: - type: optional - docs: The ID of the collection - cmsLocaleId: - type: optional - docs: Unique identifier of the CMS locale for this item - validation: - format: uuid - lastPublished: optional - lastUpdated: optional - createdOn: optional - isArchived: optional - isDraft: optional - fieldData: optional - source: - openapi: ../../../openapi/referenced-specs/v2.yml - inline: true - CollectionItemRemoved: - properties: - triggerType: - type: optional - docs: The type of event that triggered the request - payload: - type: optional - docs: The payload of data sent from Webflow - source: - openapi: ../../../openapi/referenced-specs/v2.yml - PayloadFieldData: - properties: - name: string - slug: string - extra-properties: true - source: - openapi: ../../../openapi/referenced-specs/v2.yml - inline: true - Payload: - docs: The payload of data sent from Webflow - properties: - id: - type: optional - docs: The ID of the collection item that was unpublished - siteId: - type: optional - docs: The ID of the site - workspaceId: - type: optional - docs: The ID of the workspace - collectionId: - type: optional - docs: The ID of the collection - cmsLocaleId: - type: optional - docs: Unique identifier of the CMS locale for this item - validation: - format: uuid - lastPublished: optional - lastUpdated: optional - createdOn: optional - isArchived: optional - isDraft: optional - fieldData: optional - source: - openapi: ../../../openapi/referenced-specs/v2.yml - CollectionItemPublished: - properties: - triggerType: - type: optional - docs: The type of event that triggered the request - payload: optional - source: - openapi: ../../../openapi/referenced-specs/v2.yml - CollectionItemUnpublishedPayloadFieldData: - properties: - name: string - slug: string - extra-properties: true - source: - openapi: ../../../openapi/referenced-specs/v2.yml - inline: true - CollectionItemUnpublishedPayload: - docs: The payload of data sent from Webflow - properties: - id: - type: optional - docs: The ID of the collection item that was unpublished - siteId: - type: optional - docs: The ID of the site - workspaceId: - type: optional - docs: The ID of the workspace - collectionId: - type: optional - docs: The ID of the collection - cmsLocaleId: - type: optional - docs: Unique identifier of the CMS locale for this item - validation: - format: uuid - lastPublished: optional - lastUpdated: optional - createdOn: optional - isArchived: optional - isDraft: optional - fieldData: optional - source: - openapi: ../../../openapi/referenced-specs/v2.yml - inline: true - CollectionItemUnpublished: - properties: - triggerType: - type: optional - docs: The type of event that triggered the request - payload: - type: optional - docs: The payload of data sent from Webflow - source: - openapi: ../../../openapi/referenced-specs/v2.yml - PageCreatedWebhookPayload: - docs: The payload of data sent from Webflow - properties: - siteId: optional - pageId: optional - pageTitle: optional - createdOn: optional - publishedPath: optional - source: - openapi: ../../../openapi/referenced-specs/v2.yml - inline: true - PageCreatedWebhook: - docs: The Webhook payload for when a Page is created - properties: - triggerType: - type: optional - docs: The type of event that triggered the request - payload: - type: optional - docs: The payload of data sent from Webflow - source: - openapi: ../../../openapi/referenced-specs/v2.yml - PageMetadataUpdatedWebhookPayload: - docs: The payload of data sent from Webflow - properties: - siteId: optional - pageId: optional - pageTitle: optional - lastUpdated: optional - publishedPath: optional - source: - openapi: ../../../openapi/referenced-specs/v2.yml - inline: true - PageMetadataUpdatedWebhook: - docs: The Webhook payload for when a Page's metadata is updated - properties: - triggerType: - type: optional - docs: The type of event that triggered the request - payload: - type: optional - docs: The payload of data sent from Webflow - source: - openapi: ../../../openapi/referenced-specs/v2.yml - PageDeletedWebhookPayload: - docs: The payload of data sent from Webflow - properties: - siteId: optional - pageId: optional - pageTitle: optional - deletedOn: optional - publishedPath: optional - source: - openapi: ../../../openapi/referenced-specs/v2.yml - inline: true - PageDeletedWebhook: - docs: The Webhook payload for when a Page is deleted - properties: - triggerType: - type: optional - docs: The type of event that triggered the request - payload: - type: optional - docs: The payload of data sent from Webflow - source: - openapi: ../../../openapi/referenced-specs/v2.yml - CommentPayloadAuthor: - properties: - userId: - type: string - docs: The unique identifier of the author - email: - type: string - docs: Email of the author - name: - type: string - docs: Name of the author - source: - openapi: ../../../openapi/referenced-specs/v2.yml - inline: true - CommentPayloadMentionedUsersItem: - properties: - userId: - type: string - docs: The unique identifier of the mentioned user - email: - type: string - docs: Email of the user - name: - type: string - docs: Name of the User - source: - openapi: ../../../openapi/referenced-specs/v2.yml - inline: true - CommentPayload: - docs: > - The comment webhook payload contains data for the thread and for replies. - Check the type to determine if the payload is for a thread or a reply. - The webhook payload may be delayed by up to 5 minutes. - properties: - threadId: - type: optional - docs: Unique identifier for the comment thread - access: read-only - commentId: - type: optional - docs: Unique identifier for the comment reply - access: read-only - type: - type: optional - docs: The type of comment payload - access: read-only - siteId: - type: optional - docs: The site unique identifier - access: read-only - pageId: - type: optional - docs: The page unique identifier - access: read-only - localeId: - type: optional - docs: The locale unique identifier - access: read-only - itemId: - type: optional - docs: The item unique identifier - access: read-only - breakpoint: - type: optional - docs: The breakpoint the comment was left on - access: read-only - url: - type: optional - docs: The URL of the page the comment was left on - access: read-only - content: - type: string - docs: The content of the comment reply - isResolved: - type: boolean - docs: Boolean determining if the comment thread is resolved - default: false - author: CommentPayloadAuthor - mentionedUsers: - docs: >- - List of mentioned users. This is an empty array until email - notifications are sent, which can take up to 5 minutes after the - comment is created. - type: list - createdOn: - type: optional - docs: The date the item was created - access: read-only - lastUpdated: - type: optional - docs: The date the item was last updated - access: read-only - source: - openapi: ../../../openapi/referenced-specs/v2.yml - Comment: - docs: The Webhook payload for when a comment thread or reply is made on a Site - properties: - triggerType: - type: optional - docs: The type of event that triggered the request - payload: optional - source: - openapi: ../../../openapi/referenced-specs/v2.yml diff --git a/.mock/definition/api.yml b/.mock/definition/api.yml deleted file mode 100644 index de74f2d..0000000 --- a/.mock/definition/api.yml +++ /dev/null @@ -1,18 +0,0 @@ -name: api -error-discrimination: - strategy: status-code -display-name: Data API -environments: - Data API: - urls: - Base: https://api.webflow.com/v2 - Data API: https://api.webflow.com/v2 - Content Delivery API: https://api-cdn.webflow.com/v2 -default-environment: Data API -default-url: Base -auth-schemes: - BearerToken: - scheme: bearer - token: - name: accessToken -auth: BearerToken diff --git a/.mock/definition/assets.yml b/.mock/definition/assets.yml deleted file mode 100644 index dcdff94..0000000 --- a/.mock/definition/assets.yml +++ /dev/null @@ -1,487 +0,0 @@ -imports: - root: __package__.yml -service: - auth: false - base-path: '' - endpoints: - list: - path: /sites/{site_id}/assets - method: GET - auth: - - OAuth2: - - assets:read - docs: | - List of assets uploaded to a site - - Required scope | `assets:read` - source: - openapi: ../../../openapi/referenced-specs/v2.yml - path-parameters: - site_id: - type: string - docs: Unique identifier for a Site - display-name: List Assets - request: - name: AssetsListRequest - query-parameters: - offset: - type: optional - docs: >- - Offset used for pagination if the results have more than limit - records - limit: - type: optional - docs: 'Maximum number of records to be returned (max limit: 100)' - response: - docs: Request was successful - type: root.Assets - status-code: 200 - errors: - - root.BadRequestError - - root.UnauthorizedError - - root.NotFoundError - - root.TooManyRequestsError - - root.InternalServerError - examples: - - path-parameters: - site_id: 580e63e98c9a982ac9b8b741 - query-parameters: - offset: 1 - limit: 1 - response: - body: - assets: - - id: 63e5889e7fe4eafa7384cea4 - contentType: image/png - size: 2212772 - siteId: 63938b302ea6b0aa6f3d8745 - hostedUrl: >- - https://s3.amazonaws.com/webflow-prod-assets/63938b302ea6b0aa6f3d8745/63e5889e7fe4eafa7384cea4_Vectors-Wrapper.svg - originalFileName: Candy-Wrapper.svg - displayName: 63e5889e7fe4eafa7384cea4_Candy-Wrapper.png - lastUpdated: '2023-03-01T23:42:57Z' - createdOn: '2023-02-09T23:58:22Z' - variants: - - hostedUrl: >- - https://s3.amazonaws.com/webflow-prod-assets/6258612d1ee792848f805dcf/660d83ce30f3a599ddb0bdb3_Screenshot%202024-03-20%20at%209.03.24%E2%80%AFPM-p-500.png - originalFileName: >- - Screenshot%202024-03-20%20at%209.03.24%E2%80%AFPM-p-500.png - displayName: >- - 660d83ce30f3a599ddb0bdb3_Screenshot%202024-03-20%20at%209.03.24%E2%80%AFPM-p-500.png - format: png - width: 500 - height: 900 - quality: 100 - altText: A single candy wrapper - - id: 63e5889e7fe4eafa7384cea5 - contentType: image/png - size: 2212772 - siteId: 63938b302ea6b0aa6f3d8745 - hostedUrl: >- - https://s3.amazonaws.com/webflow-prod-assets/63938b302ea6b0aa6f3d8745/63e5889e7fe4eafa7384cea4_Vectors-Wrapper.svg - originalFileName: Gum-Wrapper.svg - displayName: 63e5889e7fe4eafa7384cea5_Gum-Wrapper.png - lastUpdated: '2023-03-01T23:42:57Z' - createdOn: '2023-02-09T23:58:22Z' - variants: - - hostedUrl: >- - https://s3.amazonaws.com/webflow-prod-assets/6258612d1ee792848f805dcf/660d83ce30f3a599ddb0bdb3_Screenshot%202024-03-20%20at%209.03.24%E2%80%AFPM-p-500.png - originalFileName: >- - Screenshot%202024-03-20%20at%209.03.24%E2%80%AFPM-p-500.png - displayName: >- - 660d83ce30f3a599ddb0bdb3_Screenshot%202024-03-20%20at%209.03.24%E2%80%AFPM-p-500.png - format: png - width: 500 - height: 900 - quality: 100 - altText: A single gum wrapper - pagination: - limit: 2 - offset: 0 - total: 2 - create: - path: /sites/{site_id}/assets - method: POST - auth: - - OAuth2: - - assets:write - docs: > - The first step in uploading an asset to a site. - - - - This endpoint generates a response with the following information: - `uploadUrl` and `uploadDetails`. - - - - Use these properties in the header of a [POST request to Amazson - s3](https://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectPOST.html) - to complete the upload. - - - - To learn more about how to upload assets to Webflow, see our [assets - guide](/data/docs/working-with-assets). - - Required scope | `assets:write` - source: - openapi: ../../../openapi/referenced-specs/v2.yml - path-parameters: - site_id: - type: string - docs: Unique identifier for a Site - display-name: Upload Asset - request: - name: AssetsCreateRequest - body: - properties: - fileName: - type: string - docs: >- - File name including file extension. File names must be less than - 100 characters. - fileHash: - type: string - docs: MD5 hash of the file - parentFolder: - type: optional - docs: ID of the Asset folder (optional) - content-type: application/json - response: - docs: Request was successful - type: root.AssetUpload - status-code: 200 - errors: - - root.BadRequestError - - root.UnauthorizedError - - root.NotFoundError - - root.TooManyRequestsError - - root.InternalServerError - examples: - - path-parameters: - site_id: 580e63e98c9a982ac9b8b741 - request: - fileName: file.png - fileHash: 3c7d87c9575702bc3b1e991f4d3c638e - response: - body: - uploadDetails: - acl: public-read - bucket: webflow-bucket-name - X-Amz-Algorithm: AWS4-HMAC-SHA256 - X-Amz-Credential: ///s3/aws4_request - X-Amz-Date: - key: /_ - Policy: - X-Amz-Signature: - success_action_status: '201' - content-type: image/png - Cache-Control: max-age=31536000, must-revalidate - contentType: image/png - id: 64358b9544249dc43d37d2b7 - parentFolder: 6436b1ce5281cace05b65aea - uploadUrl: >- - https://s3.amazonaws.com/webflow-dev-assets/643021114e290e0d3a0602b2/64358b9544249dc43d37d2b7_Screenshot%202023-04-11%20at%209.50.42%20AM.png - assetUrl: >- - https://s3.amazonaws.com/webflow-prod-assets/6258612d1ee792848f805dcf/660d907ab9e91e3e9f56385e_paranoidAndroid-2024.png - hostedUrl: >- - https://dev-assets.website-files.com/643021114e290e0d3a0602b2/64358b9544249dc43d37d2b7_Screenshot%202023-04-11%20at%209.50.42%20AM.png - originalFileName: file.png - createdOn: '2023-04-11T16:32:21Z' - lastUpdated: '2023-04-12T20:31:03Z' - get: - path: /assets/{asset_id} - method: GET - auth: - - OAuth2: - - assets:read - docs: | - Get details about an asset - - Required scope | `assets:read` - source: - openapi: ../../../openapi/referenced-specs/v2.yml - path-parameters: - asset_id: - type: string - docs: Unique identifier for an Asset on a site - display-name: Get Asset - response: - docs: Request was successful - type: root.Asset - status-code: 200 - errors: - - root.BadRequestError - - root.UnauthorizedError - - root.NotFoundError - - root.TooManyRequestsError - - root.InternalServerError - examples: - - path-parameters: - asset_id: 580e63fc8c9a982ac9b8b745 - response: - body: - id: 63e5889e7fe4eafa7384cea4 - contentType: image/png - size: 2212772 - siteId: 63938b302ea6b0aa6f3d8745 - hostedUrl: >- - https://s3.amazonaws.com/webflow-prod-assets/63938b302ea6b0aa6f3d8745/63e5889e7fe4eafa7384cea4_Vectors-Wrapper.svg - originalFileName: Candy-Wrapper.svg - displayName: 63e5889e7fe4eafa7384cea4_Candy-Wrapper.png - lastUpdated: '2023-03-01T23:42:57Z' - createdOn: '2023-02-09T23:58:22Z' - variants: - - hostedUrl: >- - https://s3.amazonaws.com/webflow-prod-assets/6258612d1ee792848f805dcf/660d83ce30f3a599ddb0bdb3_Screenshot%202024-03-20%20at%209.03.24%E2%80%AFPM-p-500.png - originalFileName: Screenshot%202024-03-20%20at%209.03.24%E2%80%AFPM-p-500.png - displayName: >- - 660d83ce30f3a599ddb0bdb3_Screenshot%202024-03-20%20at%209.03.24%E2%80%AFPM-p-500.png - format: png - width: 500 - height: 900 - quality: 100 - error: error - altText: A single candy wrapper - delete: - path: /assets/{asset_id} - method: DELETE - auth: - - OAuth2: - - assets:write - docs: | - Delete an Asset - - Required Scope: `assets: write` - source: - openapi: ../../../openapi/referenced-specs/v2.yml - path-parameters: - asset_id: - type: string - docs: Unique identifier for an Asset on a site - display-name: Delete Asset - errors: - - root.BadRequestError - - root.UnauthorizedError - - root.NotFoundError - - root.TooManyRequestsError - - root.InternalServerError - examples: - - path-parameters: - asset_id: 580e63fc8c9a982ac9b8b745 - update: - path: /assets/{asset_id} - method: PATCH - auth: - - OAuth2: - - assets:write - docs: | - Update details of an Asset. - - Required scope | `assets:write` - source: - openapi: ../../../openapi/referenced-specs/v2.yml - path-parameters: - asset_id: - type: string - docs: Unique identifier for an Asset on a site - display-name: Update Asset - request: - name: AssetsUpdateRequest - body: - properties: - localeId: - type: optional - docs: >- - Unique identifier for a specific locale. Applicable, when using - localization. - displayName: - type: optional - docs: A human readable name for the asset - content-type: application/json - response: - docs: Request was successful - type: root.Asset - status-code: 200 - errors: - - root.BadRequestError - - root.UnauthorizedError - - root.NotFoundError - - root.TooManyRequestsError - - root.InternalServerError - examples: - - path-parameters: - asset_id: 580e63fc8c9a982ac9b8b745 - request: {} - response: - body: - id: 63e5889e7fe4eafa7384cea4 - contentType: image/png - size: 2212772 - siteId: 63938b302ea6b0aa6f3d8745 - hostedUrl: >- - https://s3.amazonaws.com/webflow-prod-assets/63938b302ea6b0aa6f3d8745/63e5889e7fe4eafa7384cea4_Vectors-Wrapper.svg - originalFileName: Candy-Wrapper.svg - displayName: 63e5889e7fe4eafa7384cea4_Candy-Wrapper.png - lastUpdated: '2023-03-01T23:42:57Z' - createdOn: '2023-02-09T23:58:22Z' - variants: - - hostedUrl: >- - https://s3.amazonaws.com/webflow-prod-assets/6258612d1ee792848f805dcf/660d83ce30f3a599ddb0bdb3_Screenshot%202024-03-20%20at%209.03.24%E2%80%AFPM-p-500.png - originalFileName: Screenshot%202024-03-20%20at%209.03.24%E2%80%AFPM-p-500.png - displayName: >- - 660d83ce30f3a599ddb0bdb3_Screenshot%202024-03-20%20at%209.03.24%E2%80%AFPM-p-500.png - format: png - width: 500 - height: 900 - quality: 100 - error: error - altText: A single candy wrapper - list-folders: - path: /sites/{site_id}/asset_folders - method: GET - auth: - - OAuth2: - - assets:read - docs: | - List Asset Folders within a given site - - Required scope | `assets:read` - source: - openapi: ../../../openapi/referenced-specs/v2.yml - path-parameters: - site_id: - type: string - docs: Unique identifier for a Site - display-name: List Asset Folders - response: - docs: Request was successful - type: root.AssetFolderList - status-code: 200 - errors: - - root.BadRequestError - - root.UnauthorizedError - - root.NotFoundError - - root.TooManyRequestsError - - root.InternalServerError - examples: - - path-parameters: - site_id: 580e63e98c9a982ac9b8b741 - response: - body: - assetFolders: - - id: 6390c49774a71f0e3c1a08ee - displayName: emoji icons - parentFolder: 6390c49774a71f99f21a08eb - assets: - - 63e5889e7fe4eafa7384cea4 - - 659595234426a9fcbad57043 - siteId: 6390c49674a71f84b51a08d8 - createdOn: '2018-10-14T21:55:49Z' - lastUpdated: '2022-12-07T16:51:37Z' - pagination: - limit: 1 - offset: 0 - total: 1 - create-folder: - path: /sites/{site_id}/asset_folders - method: POST - auth: - - OAuth2: - - assets:write - docs: | - Create an Asset Folder within a given site - - Required scope | `assets:write` - source: - openapi: ../../../openapi/referenced-specs/v2.yml - path-parameters: - site_id: - type: string - docs: Unique identifier for a Site - display-name: Create Asset Folder - request: - name: AssetsCreateFolderRequest - body: - properties: - displayName: - type: string - docs: A human readable name for the Asset Folder - parentFolder: - type: optional - docs: >- - An (optional) pointer to a parent Asset Folder (or null for - root) - content-type: application/json - response: - docs: Request was successful - type: root.AssetFolder - status-code: 200 - errors: - - root.BadRequestError - - root.UnauthorizedError - - root.NotFoundError - - root.TooManyRequestsError - - root.InternalServerError - examples: - - path-parameters: - site_id: 580e63e98c9a982ac9b8b741 - request: - displayName: my asset folder - response: - body: - id: 6390c49774a71f0e3c1a08ee - displayName: emoji icons - parentFolder: 6390c49774a71f99f21a08eb - assets: - - 63e5889e7fe4eafa7384cea4 - - 659595234426a9fcbad57043 - siteId: 6390c49674a71f84b51a08d8 - createdOn: '2018-10-14T21:55:49Z' - lastUpdated: '2022-12-07T16:51:37Z' - get-folder: - path: /asset_folders/{asset_folder_id} - method: GET - auth: - - OAuth2: - - assets:read - docs: | - Get details about a specific Asset Folder - - Required scope | `assets:read` - source: - openapi: ../../../openapi/referenced-specs/v2.yml - path-parameters: - asset_folder_id: - type: string - docs: Unique identifier for an Asset Folder - display-name: Get Asset Folder - response: - docs: Request was successful - type: root.AssetFolder - status-code: 200 - errors: - - root.BadRequestError - - root.UnauthorizedError - - root.NotFoundError - - root.TooManyRequestsError - - root.InternalServerError - examples: - - path-parameters: - asset_folder_id: 6390c49774a71f0e3c1a08ee - response: - body: - id: 6390c49774a71f0e3c1a08ee - displayName: emoji icons - parentFolder: 6390c49774a71f99f21a08eb - assets: - - 63e5889e7fe4eafa7384cea4 - - 659595234426a9fcbad57043 - siteId: 6390c49674a71f84b51a08d8 - createdOn: '2018-10-14T21:55:49Z' - lastUpdated: '2022-12-07T16:51:37Z' - source: - openapi: ../../../openapi/referenced-specs/v2.yml - display-name: Assets -docs: Assets are files that are uploaded to your Webflow account. diff --git a/.mock/definition/collections.yml b/.mock/definition/collections.yml deleted file mode 100644 index b9ee7cd..0000000 --- a/.mock/definition/collections.yml +++ /dev/null @@ -1,350 +0,0 @@ -imports: - root: __package__.yml -service: - auth: false - base-path: '' - endpoints: - list: - path: /sites/{site_id}/collections - method: GET - auth: - - OAuth2: - - cms:read - docs: | - List of all Collections within a Site. - - Required scope | `cms:read` - source: - openapi: ../../../openapi/referenced-specs/v2.yml - path-parameters: - site_id: - type: string - docs: Unique identifier for a Site - display-name: List Collections - response: - docs: Request was successful - type: root.CollectionList - status-code: 200 - errors: - - root.BadRequestError - - root.UnauthorizedError - - root.NotFoundError - - root.TooManyRequestsError - - root.InternalServerError - examples: - - path-parameters: - site_id: 580e63e98c9a982ac9b8b741 - response: - body: - collections: - - id: 63692ab61fb2852f582ba8f5 - displayName: Products - singularName: Product - slug: product - createdOn: '2019-06-12T13:35:14Z' - lastUpdated: '2022-11-17T15:08:50Z' - - id: 63692ab61fb2856e6a2ba8f6 - displayName: Categories - singularName: Category - slug: category - createdOn: '2019-06-12T13:35:14Z' - lastUpdated: '2022-11-17T15:08:50Z' - - id: 63692ab61fb285a8562ba8f4 - displayName: SKUs - singularName: SKU - slug: sku - createdOn: '2019-06-12T13:35:14Z' - lastUpdated: '2022-11-17T15:08:50Z' - create: - path: /sites/{site_id}/collections - method: POST - auth: - - OAuth2: - - cms:write - docs: > - Create a Collection for a site with collection fields. - - - Each collection includes the required _name_ and _slug_ fields, which - are generated automatically. You can update the `displayName` of these - fields, but the slug for them cannot be changed. Fields slugs are - automatically converted to lowercase. Spaces in slugs are replaced with - hyphens. - - - Required scope | `cms:write` - source: - openapi: ../../../openapi/referenced-specs/v2.yml - path-parameters: - site_id: - type: string - docs: Unique identifier for a Site - display-name: Create Collection - request: - name: CollectionsCreateRequest - body: - properties: - displayName: - type: string - docs: Name of the collection. Each collection name must be distinct. - singularName: - type: string - docs: Singular name of each item. - slug: - type: optional - docs: Part of a URL that identifier - fields: - type: optional> - docs: An array of custom fields to add to the collection - content-type: application/json - response: - docs: Request was successful - type: root.Collection - status-code: 200 - errors: - - root.BadRequestError - - root.UnauthorizedError - - root.NotFoundError - - root.ConflictError - - root.TooManyRequestsError - - root.InternalServerError - examples: - - path-parameters: - site_id: 580e63e98c9a982ac9b8b741 - request: - displayName: Blog Posts - singularName: Blog Post - slug: posts - fields: - - isRequired: true - type: PlainText - displayName: Title - helpText: The title of the blog post - - isRequired: true - type: RichText - displayName: Content - helpText: The content of the blog post - - isRequired: true - type: Reference - displayName: Author - helpText: The author of the blog post - metadata: - collectionId: 23cc2d952d4e4631ffd4345d2743db4e - response: - body: - id: 562ac0395358780a1f5e6fbd - displayName: Blog Posts - singularName: Blog Post - slug: posts - createdOn: '2016-10-24T19:41:48Z' - lastUpdated: '2016-10-24T19:42:38Z' - fields: - - id: id - isRequired: true - isEditable: true - type: PlainText - slug: title - displayName: Title - helpText: The title of the blog post - - id: id - isRequired: true - isEditable: true - type: RichText - slug: content - displayName: Content - helpText: The content of the blog post - - id: id - isRequired: true - isEditable: true - type: Reference - slug: author - displayName: Author - helpText: The author of the blog post - get: - path: /collections/{collection_id} - method: GET - auth: - - OAuth2: - - cms:read - docs: | - Get the full details of a collection from its ID. - - Required scope | `cms:read` - source: - openapi: ../../../openapi/referenced-specs/v2.yml - path-parameters: - collection_id: - type: string - docs: Unique identifier for a Collection - display-name: Get Collection Details - response: - docs: Request was successful - type: root.Collection - status-code: 200 - errors: - - root.BadRequestError - - root.UnauthorizedError - - root.NotFoundError - - root.TooManyRequestsError - - root.InternalServerError - examples: - - path-parameters: - collection_id: 580e63fc8c9a982ac9b8b745 - response: - body: - id: 7f15043107e2fc95644e93807ee25dd6 - displayName: Guide Entries - singularName: Guide Entry - slug: guide-entry - createdOn: '2024-04-12T12:42:00Z' - lastUpdated: '2024-04-12T12:42:00Z' - fields: - - id: 5e2a1b3c4d5e6f7890a1b2c3 - isRequired: true - isEditable: true - type: PlainText - slug: name - displayName: Entry Title - helpText: Name of the entry. - - id: 5e2a1b3c4d5e6f7890a1b2c4 - isRequired: true - isEditable: true - type: PlainText - slug: slug - displayName: Slug - helpText: Slug of the entry. - - id: 6f7e8d9c0b1a2e3d4c5b6a7f - isRequired: false - isEditable: true - type: PlainText - slug: summary - displayName: Summary - helpText: A short summary of the entry. - - id: 1a2b3c4d5e6f7a8b9c0d1e2f - isRequired: false - isEditable: true - type: RichText - slug: entry-html - displayName: Entry HTML - helpText: The HTML content of the entry. - - id: 7e8d9c0b1a2e3d4c5b6a7f8e - isRequired: false - isEditable: true - type: Image - slug: illustration-image - displayName: Illustration Image - helpText: An image of the entry. - - id: 2f3e4d5c6b7a8e9d0c1b2a3f - isRequired: false - isEditable: true - type: VideoLink - slug: demonstration-video - displayName: Demonstration Video - helpText: A video of the entry. - - id: 8e9d0c1b2a3f4e5d6c7b8a9e - isRequired: false - isEditable: true - type: Link - slug: more-info-link - displayName: More Info Link - helpText: A link to more information about the entry. - - id: 3f4e5d6c7b8a9e0d1c2b3a4f - isRequired: false - isEditable: true - type: Number - slug: importance-level - displayName: Importance Level - helpText: The importance level of the entry. - - id: 9e0d1c2b3a4f5e6d7c8b9a0e - isRequired: false - isEditable: true - type: Switch - slug: is-essential - displayName: Is Essential - helpText: Is this entry essential? - - id: 4f5e6d7c8b9a0e1d2c3b4a5f - isRequired: false - isEditable: true - type: Color - slug: first-mentioned - displayName: First Mentioned - helpText: Date of the first mention of the subject. - - id: 0e1d2c3b4a5f6e7d8c9b0a1e - isRequired: false - isEditable: true - type: Color - slug: towel-color - displayName: Towel Color - helpText: The color of the towel. - - id: 5f6e7d8c9b0a1e2d3c4b5a6f - isRequired: false - isEditable: true - type: Reference - slug: related-entry - displayName: Related Entry - helpText: A related entry. - - id: 1e2d3c4b5a6f7e8d9c0b1a2f - isRequired: false - isEditable: true - type: MultiReference - slug: mentioned-in-entries - displayName: Mentioned In Entries - helpText: Entries that mention this subject. - - id: 6f7e8d9c0b1a2e3d4c5b6a8f - isRequired: false - isEditable: true - type: Option - slug: item-type - displayName: Item Type - helpText: The type of item. - - id: 2e3d4c5b6a7f8e9d0c1b2a4f - isRequired: false - isEditable: true - type: File - slug: guide-file - displayName: Guide File - helpText: helpText - - id: 7f8e9d0c1b2a3f4e5d6c8b9e - isRequired: false - isEditable: true - type: Email - slug: contributor-email - displayName: Contributor Email - helpText: helpText - - id: 3a4f5e6d7c8b9a0e1d2c4b5f - isRequired: false - isEditable: true - type: Phone - slug: emergency-contact - displayName: Emergency Contact - helpText: helpText - delete: - path: /collections/{collection_id} - method: DELETE - auth: - - OAuth2: - - cms:write - docs: | - Delete a collection using its ID. - - Required scope | `cms:write` - source: - openapi: ../../../openapi/referenced-specs/v2.yml - path-parameters: - collection_id: - type: string - docs: Unique identifier for a Collection - display-name: Delete Collection - errors: - - root.BadRequestError - - root.UnauthorizedError - - root.NotFoundError - - root.TooManyRequestsError - - root.InternalServerError - examples: - - path-parameters: - collection_id: 580e63fc8c9a982ac9b8b745 - source: - openapi: ../../../openapi/referenced-specs/v2.yml - display-name: Collections -docs: Collections are CMS collections of items. diff --git a/.mock/definition/collections/fields.yml b/.mock/definition/collections/fields.yml deleted file mode 100644 index 8d83b9f..0000000 --- a/.mock/definition/collections/fields.yml +++ /dev/null @@ -1,212 +0,0 @@ -imports: - root: ../__package__.yml -service: - auth: false - base-path: '' - endpoints: - create: - path: /collections/{collection_id}/fields - method: POST - auth: - - OAuth2: - - cms:write - docs: > - Create a custom field in a collection. - - - Field validation is currently not available through the API. - - - Bulk creation of fields is not supported with this endpoint. To add - multiple fields at once, include them when you [create the - collection.](/data/v2.0.0/reference/cms/collections/create) - - - Required scope | `cms:write` - source: - openapi: ../../../openapi/referenced-specs/v2.yml - path-parameters: - collection_id: - type: string - docs: Unique identifier for a Collection - display-name: Create Collection Field - request: - body: root.FieldCreate - content-type: application/json - response: - docs: Request was successful - type: root.FieldCreate - status-code: 200 - errors: - - root.BadRequestError - - root.UnauthorizedError - - root.NotFoundError - - root.ConflictError - - root.TooManyRequestsError - - root.InternalServerError - examples: - - name: StaticField - path-parameters: - collection_id: 580e63fc8c9a982ac9b8b745 - request: - id: 562ac0395358780a1f5e6fbc - isEditable: true - isRequired: false - type: RichText - displayName: Post Body - helpText: Add the body of your post here - response: - body: - id: 562ac0395358780a1f5e6fbc - isEditable: true - isRequired: false - type: RichText - displayName: Post Body - helpText: Add the body of your post here - - name: OptionField - path-parameters: - collection_id: 580e63fc8c9a982ac9b8b745 - request: - id: 562ac0395358780a1f5e6fbc - isEditable: true - isRequired: false - type: Option - displayName: Post Type - helpText: Add the body of your post here - metadata: - options: - - name: Feature - - name: News - - name: Product Highlight - response: - body: - id: 562ac0395358780a1f5e6fbc - isEditable: true - isRequired: false - type: Option - displayName: Post Type - helpText: Add the body of your post here - metadata: - options: - - name: Feature - - name: News - - name: Product Highlight - - name: ReferenceField - path-parameters: - collection_id: 580e63fc8c9a982ac9b8b745 - request: - id: 562ac0395358780a1f5e6fbd - isEditable: true - isRequired: false - type: Reference - displayName: Author - helpText: Add the post author here - metadata: - collectionId: 63692ab61fb2852f582ba8f5 - response: - body: - id: 562ac0395358780a1f5e6fbd - isEditable: true - isRequired: false - type: Reference - displayName: Author - helpText: Add the post author here - metadata: - collectionId: 63692ab61fb2852f582ba8f5 - delete: - path: /collections/{collection_id}/fields/{field_id} - method: DELETE - auth: - - OAuth2: - - cms:write - docs: > - Delete a custom field in a collection. This endpoint does not currently - support bulk deletion. - - - Required scope | `cms:write` - source: - openapi: ../../../openapi/referenced-specs/v2.yml - path-parameters: - collection_id: - type: string - docs: Unique identifier for a Collection - field_id: - type: string - docs: Unique identifier for a Field in a collection - display-name: Delete Collection Field - errors: - - root.BadRequestError - - root.UnauthorizedError - - root.NotFoundError - - root.TooManyRequestsError - - root.InternalServerError - examples: - - path-parameters: - collection_id: 580e63fc8c9a982ac9b8b745 - field_id: 580e63fc8c9a982ac9b8b745 - update: - path: /collections/{collection_id}/fields/{field_id} - method: PATCH - auth: - - OAuth2: - - cms:write - docs: | - Update a custom field in a collection. - - Required scope | `cms:write` - source: - openapi: ../../../openapi/referenced-specs/v2.yml - path-parameters: - collection_id: - type: string - docs: Unique identifier for a Collection - field_id: - type: string - docs: Unique identifier for a Field in a collection - display-name: Update Collection Field - request: - name: FieldUpdate - body: - properties: - isRequired: - type: optional - docs: Define whether a field is required in a collection - displayName: - type: optional - docs: The name of a field - helpText: - type: optional - docs: Additional text to help anyone filling out this field - content-type: application/json - response: - docs: Request was successful - type: root.Field - status-code: 200 - errors: - - root.BadRequestError - - root.UnauthorizedError - - root.NotFoundError - - root.TooManyRequestsError - - root.InternalServerError - examples: - - path-parameters: - collection_id: 580e63fc8c9a982ac9b8b745 - field_id: 580e63fc8c9a982ac9b8b745 - request: - isRequired: false - displayName: Post Body - helpText: Add the body of your post here - response: - body: - id: 75821f618da60c18383330bcc0ca488b - isRequired: false - isEditable: true - type: RichText - slug: post-body - displayName: Post Body - helpText: Add the body of your post here - validations: - additionalProperties: additionalProperties - source: - openapi: ../../../openapi/referenced-specs/v2.yml diff --git a/.mock/definition/collections/items.yml b/.mock/definition/collections/items.yml deleted file mode 100644 index 57e6402..0000000 --- a/.mock/definition/collections/items.yml +++ /dev/null @@ -1,2145 +0,0 @@ -imports: - root: ../__package__.yml -types: - ItemsListItemsRequestSortBy: - enum: - - lastPublished - - name - - slug - source: - openapi: ../../../openapi/referenced-specs/v2.yml - ItemsListItemsRequestSortOrder: - enum: - - asc - - desc - source: - openapi: ../../../openapi/referenced-specs/v2.yml - Multiple Items: - properties: - items: - type: optional> - docs: An array of items to create - source: - openapi: ../../../openapi/referenced-specs/v2.yml - inline: true - ItemsCreateItemRequestBody: - discriminated: false - union: - - root.CollectionItemPostSingle - - type: Multiple Items - source: - openapi: ../../../openapi/referenced-specs/v2.yml - ItemsDeleteItemsRequestItemsItem: - properties: - id: - type: string - docs: Unique identifier for the Item - cmsLocaleIds: - type: optional> - docs: Array of identifiers for the locales where the item will be created - source: - openapi: ../../../openapi/referenced-specs/v2.yml - inline: true - ItemsUpdateItemsResponse: - discriminated: false - union: - - type: root.CollectionItem - - type: root.CollectionItemList - source: - openapi: ../../../openapi/referenced-specs/v2.yml - ItemsListItemsLiveRequestSortBy: - enum: - - lastPublished - - name - - slug - source: - openapi: ../../../openapi/referenced-specs/v2.yml - ItemsListItemsLiveRequestSortOrder: - enum: - - asc - - desc - source: - openapi: ../../../openapi/referenced-specs/v2.yml - Multiple Live Items: - properties: - items: - type: optional> - docs: List of collection items to create - source: - openapi: ../../../openapi/referenced-specs/v2.yml - inline: true - ItemsCreateItemLiveRequestBody: - discriminated: false - union: - - type: root.CollectionItem - - type: Multiple Live Items - source: - openapi: ../../../openapi/referenced-specs/v2.yml - ItemsDeleteItemsLiveRequestItemsItem: - properties: - id: - type: string - docs: Unique identifier for the Item - cmsLocaleIds: - type: optional> - docs: Array of identifiers for the locales where the item will be created - source: - openapi: ../../../openapi/referenced-specs/v2.yml - inline: true - Single CMS Item: - properties: - name: - type: string - docs: The name of the item. - slug: - type: string - docs: >- - URL slug for the item in your site. - - Note: Updating the item slug will break all links referencing the old - slug. - extra-properties: true - source: - openapi: ../../../openapi/referenced-specs/v2.yml - inline: true - CreateBulkCollectionItemRequestBodyFieldDataItem: - docs: A single CMS item to create - properties: - name: - type: string - docs: The name of the item. - slug: - type: string - docs: >- - URL slug for the item in your site. - - Note: Updating the item slug will break all links referencing the old - slug. - extra-properties: true - source: - openapi: ../../../openapi/referenced-specs/v2.yml - inline: true - CreateBulkCollectionItemRequestBodyFieldData: - discriminated: false - union: - - type: Single CMS Item - - docs: A list of CMS items to create - type: list - source: - openapi: ../../../openapi/referenced-specs/v2.yml - inline: true - Item IDs: - docs: An array of Item IDs in a single locale - properties: - itemIds: optional> - source: - openapi: ../../../openapi/referenced-specs/v2.yml - inline: true - ItemsPublishItemRequestItemsItemsItem: - properties: - id: - type: string - docs: The ID of the CMS item - cmsLocaleIds: - type: optional> - docs: Array of identifiers for the locales where the item will be published - source: - openapi: ../../../openapi/referenced-specs/v2.yml - inline: true - Item IDs with Locales: - docs: An array of Item IDs with included `cmsLocaleIds` - properties: - items: optional> - source: - openapi: ../../../openapi/referenced-specs/v2.yml - inline: true - ItemsPublishItemRequest: - discriminated: false - union: - - type: Item IDs - docs: An array of Item IDs in a single locale - - type: Item IDs with Locales - docs: An array of Item IDs with included `cmsLocaleIds` - source: - openapi: ../../../openapi/referenced-specs/v2.yml - ItemsPublishItemResponse: - properties: - publishedItemIds: optional> - errors: optional> - source: - openapi: ../../../openapi/referenced-specs/v2.yml -service: - auth: false - base-path: '' - endpoints: - list-items: - path: /collections/{collection_id}/items - method: GET - auth: - - OAuth2: - - cms:read - docs: | - List of all Items within a Collection. - - Required scope | `CMS:read` - source: - openapi: ../../../openapi/referenced-specs/v2.yml - path-parameters: - collection_id: - type: string - docs: Unique identifier for a Collection - display-name: List Collection Items - request: - name: ItemsListItemsRequest - query-parameters: - cmsLocaleId: - type: optional - docs: >- - Unique identifier for a CMS Locale. This UID is different from the - Site locale identifier and is listed as `cmsLocaleId` in the Sites - response. To query multiple locales, input a comma separated - string. - offset: - type: optional - docs: >- - Offset used for pagination if the results have more than limit - records - limit: - type: optional - docs: 'Maximum number of records to be returned (max limit: 100)' - name: - type: optional - docs: Filter by the exact name of the item(s) - slug: - type: optional - docs: Filter by the exact slug of the item - lastPublished: - type: optional - docs: Filter by the last published date of the item(s) - sortBy: - type: optional - docs: Sort results by the provided value - sortOrder: - type: optional - docs: Sorts the results by asc or desc - response: - docs: Request was successful - type: root.CollectionItemList - status-code: 200 - errors: - - root.BadRequestError - - root.UnauthorizedError - - root.NotFoundError - - root.TooManyRequestsError - - root.InternalServerError - examples: - - path-parameters: - collection_id: 580e63fc8c9a982ac9b8b745 - query-parameters: - cmsLocaleId: cmsLocaleId - offset: 1 - limit: 1 - name: name - slug: slug - sortBy: lastPublished - sortOrder: asc - response: - body: - items: - - id: 62b720ef280c7a7a3be8cabe - cmsLocaleId: 66f6e966c9e1dc700a857ca3 - lastPublished: '2022-06-30T13:35:20.878Z' - lastUpdated: '2022-06-25T14:51:27.809Z' - createdOn: '2022-06-25T14:51:27.809Z' - isArchived: false - isDraft: false - fieldData: - name: Senior Data Analyst - slug: senior-data-analyst - url: https://boards.greenhouse.io/webflow/jobs/26567701 - department: Data - - id: 62c880ef281c7b7b4cf9dabc - cmsLocaleId: 66f6e966c9e1dc700a857ca3 - lastPublished: '2023-04-15T10:25:18.123Z' - lastUpdated: '2023-04-10T11:45:30.567Z' - createdOn: '2023-04-10T11:45:30.567Z' - isArchived: false - isDraft: false - fieldData: - name: Product Manager - slug: product-manager - url: https://boards.greenhouse.io/webflow/jobs/31234567 - department: Product - pagination: - limit: 25 - offset: 0 - total: 2 - create-item: - path: /collections/{collection_id}/items - method: POST - auth: - - OAuth2: - - cms:write - docs: > - Create Item(s) in a Collection. - - - - To create items across multiple locales, please use [this - endpoint.](/data/reference/cms/collection-items/staged-items/create-items) - - - Required scope | `CMS:write` - source: - openapi: ../../../openapi/referenced-specs/v2.yml - path-parameters: - collection_id: - type: string - docs: Unique identifier for a Collection - display-name: Create Collection Item(s) - request: - body: ItemsCreateItemRequestBody - query-parameters: - skipInvalidFiles: - type: optional - default: true - docs: >- - When true, invalid files are skipped and processing continues. - When false, the entire request fails if any file is invalid. - name: ItemsCreateItemRequest - content-type: application/json - response: - docs: Request was successful - type: root.CollectionItem - status-code: 202 - errors: - - root.BadRequestError - - root.UnauthorizedError - - root.NotFoundError - - root.TooManyRequestsError - - root.InternalServerError - examples: - - name: SingleItem - path-parameters: - collection_id: 580e63fc8c9a982ac9b8b745 - query-parameters: - skipInvalidFiles: true - request: - isArchived: false - isDraft: false - fieldData: - name: The Hitchhiker's Guide to the Galaxy - slug: hitchhikers-guide-to-the-galaxy - plain-text: Don't Panic. - rich-text: >- -

A Guide to Interstellar Travel

A towel is about the - most massively useful thing an interstellar hitchhiker can have. - Don't forget yours!

- main-image: - fileId: 62b720ef280c7a7a3be8cabe - url: /files/62b720ef280c7a7a3be8cabe_image.png - image-gallery: - - fileId: 62b720ef280c7a7a3be8cabd - url: /files/62b720ef280c7a7a3be8cabd_image.png - - fileId: 62b720ef280c7a7a3be8cabe - url: /files/62b720ef280c7a7a3be8cabe_image.png - intro-video: https://www.youtube.com/watch?v=aJ83KAggd-4 - official-site: >- - https://hitchhikers.fandom.com/wiki/The_Hitchhiker%27s_Guide_to_the_Galaxy - contact-email: zaphod.beeblebrox@heartofgold.gov - support-phone: 424-242-4242 - answer-to-everything: 42 - release-date: '1979-10-12T00:00:00.000Z' - is-featured: true - brand-color: '#000000' - category: 62b720ef280c7a7a3be8cabf - author: 62b720ef280c7a7a3be8cab0 - tags: - - 62b720ef280c7a7a3be8cab1 - - 62b720ef280c7a7a3be8cab2 - downloadable-asset: - fileId: 62b720ef280c7a7a3be8cab3 - url: /files/62b720ef280c7a7a3be8cab3_document.pdf - response: - body: - id: 42b720ef280c7a7a3be8cabe - cmsLocaleId: 653ad57de882f528b32e810e - lastPublished: '2022-11-29T16:22:43.159Z' - lastUpdated: '2022-11-17T17:19:43.282Z' - createdOn: '2022-11-17T17:11:57.148Z' - isArchived: false - isDraft: false - fieldData: - name: The Hitchhiker's Guide to the Galaxy - slug: hitchhikers-guide-to-the-galaxy - plain-text: Don't Panic. - rich-text: >- -

A Guide to Interstellar Travel

A towel is about the - most massively useful thing an interstellar hitchhiker can - have. Don't forget yours!

- main-image: - fileId: 62b720ef280c7a7a3be8cabe - url: /files/62b720ef280c7a7a3be8cabe_image.png - image-gallery: - - fileId: 62b720ef280c7a7a3be8cabd - url: /files/62b720ef280c7a7a3be8cabd_image.png - - fileId: 62b720ef280c7a7a3be8cabe - url: /files/62b720ef280c7a7a3be8cabe_image.png - intro-video: https://www.youtube.com/watch?v=aJ83KAggd-4 - official-site: >- - https://hitchhikers.fandom.com/wiki/The_Hitchhiker%27s_Guide_to_the_Galaxy - contact-email: zaphod.beeblebrox@heartofgold.gov - support-phone: 424-242-4242 - answer-to-everything: 42 - release-date: '1979-10-12T00:00:00.000Z' - is-featured: true - brand-color: '#000000' - category: 62b720ef280c7a7a3be8cabf - author: 62b720ef280c7a7a3be8cab0 - tags: - - 62b720ef280c7a7a3be8cab1 - - 62b720ef280c7a7a3be8cab2 - downloadable-asset: - fileId: 62b720ef280c7a7a3be8cab3 - url: /files/62b720ef280c7a7a3be8cab3_document.pdf - - name: MultipleItems - path-parameters: - collection_id: 580e63fc8c9a982ac9b8b745 - query-parameters: - skipInvalidFiles: true - request: - items: - - isArchived: false - isDraft: false - fieldData: - name: Senior Data Analyst - slug: senior-data-analyst - url: https://boards.greenhouse.io/webflow/jobs/26567701 - department: Data - - isArchived: false - isDraft: false - fieldData: - name: Product Manager - slug: product-manager - url: https://boards.greenhouse.io/webflow/jobs/31234567 - department: Product - response: - body: - id: id - cmsLocaleId: 653ad57de882f528b32e810e - lastPublished: '2023-03-17T18:47:35.560Z' - lastUpdated: '2023-03-17T18:47:35.560Z' - createdOn: '2023-03-17T18:47:35.560Z' - isArchived: true - isDraft: true - fieldData: - name: My new item - slug: my-new-item - date: '2022-11-18T00:00:00.000Z' - featured: false - color: '#db4b68' - delete-items: - path: /collections/{collection_id}/items - method: DELETE - auth: - - OAuth2: - - cms:write - docs: > - Delete Items from a Collection. - - - Items will only be deleted in the primary - locale unless a `cmsLocaleId` is included in the request. - - - Required scope | `CMS:write` - source: - openapi: ../../../openapi/referenced-specs/v2.yml - path-parameters: - collection_id: - type: string - docs: Unique identifier for a Collection - display-name: Delete Collection Items - request: - name: ItemsDeleteItemsRequest - body: - properties: - items: list - content-type: application/json - errors: - - root.BadRequestError - - root.UnauthorizedError - - root.NotFoundError - - root.ConflictError - - root.TooManyRequestsError - - root.InternalServerError - examples: - - path-parameters: - collection_id: 580e63fc8c9a982ac9b8b745 - request: - items: - - id: 580e64008c9a982ac9b8b754 - update-items: - path: /collections/{collection_id}/items - method: PATCH - auth: - - OAuth2: - - cms:write - docs: > - Update a single item or multiple items in a Collection. - - - The limit for this endpoint is 100 items. - - - Items will only be updated in the primary - locale, unless a `cmsLocaleId` is included in the request. - - - Required scope | `CMS:write` - source: - openapi: ../../../openapi/referenced-specs/v2.yml - path-parameters: - collection_id: - type: string - docs: Unique identifier for a Collection - display-name: Update Collection Items - request: - name: ItemsUpdateItemsRequest - query-parameters: - skipInvalidFiles: - type: optional - default: true - docs: >- - When true, invalid files are skipped and processing continues. - When false, the entire request fails if any file is invalid. - body: - properties: - items: optional> - content-type: application/json - response: - docs: Request was successful - type: ItemsUpdateItemsResponse - status-code: 200 - errors: - - root.BadRequestError - - root.UnauthorizedError - - root.NotFoundError - - root.TooManyRequestsError - - root.InternalServerError - examples: - - name: LocalizedItems - path-parameters: - collection_id: 580e63fc8c9a982ac9b8b745 - query-parameters: - skipInvalidFiles: true - request: - items: - - id: 66f6ed9576ddacf3149d5ea6 - cmsLocaleId: 66f6e966c9e1dc700a857ca5 - fieldData: - name: Ne Paniquez Pas - slug: ne-paniquez-pas - featured: false - - id: 66f6ed9576ddacf3149d5ea6 - cmsLocaleId: 66f6e966c9e1dc700a857ca4 - fieldData: - name: No Entrar en Pánico - slug: no-entrar-en-panico - featured: false - - id: 66f6ed9576ddacf3149d5eaa - cmsLocaleId: 66f6e966c9e1dc700a857ca5 - fieldData: - name: Au Revoir et Merci pour Tous les Poissons - slug: au-revoir-et-merci - featured: false - - id: 66f6ed9576ddacf3149d5eaa - cmsLocaleId: 66f6e966c9e1dc700a857ca4 - fieldData: - name: Hasta Luego y Gracias por Todo el Pescado - slug: hasta-luego-y-gracias - featured: false - response: - body: - items: - - id: 66f6ed9576ddacf3149d5ea6 - cmsLocaleId: 66f6e966c9e1dc700a857ca5 - lastPublished: '2024-09-27T17:38:29.066Z' - lastUpdated: '2024-09-27T17:38:29.066Z' - createdOn: '2024-09-27T17:38:29.066Z' - isArchived: false - isDraft: false - fieldData: - name: Ne Paniquez Pas - slug: ne-paniquez-pas - featured: false - - id: 66f6ed9576ddacf3149d5ea6 - cmsLocaleId: 66f6e966c9e1dc700a857ca4 - lastPublished: '2024-09-27T17:38:29.066Z' - lastUpdated: '2024-09-27T17:38:29.066Z' - createdOn: '2024-09-27T17:38:29.066Z' - isArchived: false - isDraft: false - fieldData: - name: No Entrar en Pánico - slug: no-entrar-en-panico - featured: false - - id: 66f6ed9576ddacf3149d5eaa - cmsLocaleId: 66f6e966c9e1dc700a857ca5 - lastPublished: '2024-09-27T17:38:29.066Z' - lastUpdated: '2024-09-27T17:38:29.066Z' - createdOn: '2024-09-27T17:38:29.066Z' - isArchived: false - isDraft: false - fieldData: - name: Au Revoir et Merci pour Tous les Poissons - slug: au-revoir-et-merci - featured: false - - id: 66f6ed9576ddacf3149d5eaa - cmsLocaleId: 66f6e966c9e1dc700a857ca4 - lastPublished: '2024-09-27T17:38:29.066Z' - lastUpdated: '2024-09-27T17:38:29.066Z' - createdOn: '2024-09-27T17:38:29.066Z' - isArchived: false - isDraft: false - fieldData: - name: Hasta Luego y Gracias por Todo el Pescado - slug: hasta-luego-y-gracias - featured: false - pagination: - limit: 25 - offset: 0 - total: 4 - - name: MultipleItems - path-parameters: - collection_id: 580e63fc8c9a982ac9b8b745 - query-parameters: - skipInvalidFiles: true - request: - items: - - id: 580e64008c9a982ac9b8b754 - isArchived: false - isDraft: false - fieldData: - name: Senior Data Analyst - slug: senior-data-analyst - url: https://boards.greenhouse.io/webflow/jobs/26567701 - department: Data - - id: 580e64008c9a982ac9b8b754 - isArchived: false - isDraft: false - fieldData: - name: Product Manager - slug: product-manager - url: https://boards.greenhouse.io/webflow/jobs/31234567 - department: Product - response: - body: - items: - - id: 62b720ef280c7a7a3be8cabe - cmsLocaleId: 66f6e966c9e1dc700a857ca3 - lastPublished: '2022-06-30T13:35:20.878Z' - lastUpdated: '2022-06-25T14:51:27.809Z' - createdOn: '2022-06-25T14:51:27.809Z' - isArchived: false - isDraft: false - fieldData: - name: Senior Data Analyst - slug: senior-data-analyst - url: https://boards.greenhouse.io/webflow/jobs/26567701 - department: Data - - id: 62c880ef281c7b7b4cf9dabc - cmsLocaleId: 66f6e966c9e1dc700a857ca3 - lastPublished: '2023-04-15T10:25:18.123Z' - lastUpdated: '2023-04-10T11:45:30.567Z' - createdOn: '2023-04-10T11:45:30.567Z' - isArchived: false - isDraft: false - fieldData: - name: Product Manager - slug: product-manager - url: https://boards.greenhouse.io/webflow/jobs/31234567 - department: Product - pagination: - limit: 25 - offset: 0 - total: 2 - list-items-live: - path: /collections/{collection_id}/items/live - method: GET - auth: - - OAuth2: - - cms:read - docs: | - List all published items in a collection. - - - Serving data to applications in real-time? Use the Content Delivery API at `api-cdn.webflow.com` for better performance. The CDN-backed endpoint is optimized for high-volume reads, while the Data API is designed for writes and management operations. - - - Required scope | `CMS:read` - source: - openapi: ../../../openapi/referenced-specs/v2.yml - path-parameters: - collection_id: - type: string - docs: Unique identifier for a Collection - display-name: List Live Collection Items - request: - name: ItemsListItemsLiveRequest - query-parameters: - cmsLocaleId: - type: optional - docs: >- - Unique identifier for a CMS Locale. This UID is different from the - Site locale identifier and is listed as `cmsLocaleId` in the Sites - response. To query multiple locales, input a comma separated - string. - offset: - type: optional - docs: >- - Offset used for pagination if the results have more than limit - records - limit: - type: optional - docs: 'Maximum number of records to be returned (max limit: 100)' - name: - type: optional - docs: Filter by the exact name of the item(s) - slug: - type: optional - docs: Filter by the exact slug of the item - lastPublished: - type: optional - docs: Filter by the last published date of the item(s) - sortBy: - type: optional - docs: Sort results by the provided value - sortOrder: - type: optional - docs: Sorts the results by asc or desc - response: - docs: Request was successful - type: root.CollectionItemList - status-code: 200 - url: Data API - errors: - - root.BadRequestError - - root.UnauthorizedError - - root.NotFoundError - - root.TooManyRequestsError - - root.InternalServerError - examples: - - path-parameters: - collection_id: 580e63fc8c9a982ac9b8b745 - query-parameters: - cmsLocaleId: cmsLocaleId - offset: 1 - limit: 1 - name: name - slug: slug - sortBy: lastPublished - sortOrder: asc - response: - body: - items: - - id: 62b720ef280c7a7a3be8cabe - cmsLocaleId: 66f6e966c9e1dc700a857ca3 - lastPublished: '2022-06-30T13:35:20.878Z' - lastUpdated: '2022-06-25T14:51:27.809Z' - createdOn: '2022-06-25T14:51:27.809Z' - isArchived: false - isDraft: false - fieldData: - name: Senior Data Analyst - slug: senior-data-analyst - url: https://boards.greenhouse.io/webflow/jobs/26567701 - department: Data - - id: 62c880ef281c7b7b4cf9dabc - cmsLocaleId: 66f6e966c9e1dc700a857ca3 - lastPublished: '2023-04-15T10:25:18.123Z' - lastUpdated: '2023-04-10T11:45:30.567Z' - createdOn: '2023-04-10T11:45:30.567Z' - isArchived: false - isDraft: false - fieldData: - name: Product Manager - slug: product-manager - url: https://boards.greenhouse.io/webflow/jobs/31234567 - department: Product - pagination: - limit: 25 - offset: 0 - total: 2 - create-item-live: - path: /collections/{collection_id}/items/live - method: POST - auth: - - OAuth2: - - cms:write - docs: > - Create item(s) in a collection that will be immediately published to the - live site. - - - - To create items across multiple locales, [please use this - endpoint.](/data/reference/cms/collection-items/staged-items/create-items) - - - - Required scope | `CMS:write` - source: - openapi: ../../../openapi/referenced-specs/v2.yml - path-parameters: - collection_id: - type: string - docs: Unique identifier for a Collection - display-name: Create Live Collection Item(s) - request: - body: ItemsCreateItemLiveRequestBody - query-parameters: - skipInvalidFiles: - type: optional - default: true - docs: >- - When true, invalid files are skipped and processing continues. - When false, the entire request fails if any file is invalid. - name: ItemsCreateItemLiveRequest - content-type: application/json - response: - docs: Request was successful - type: root.CollectionItem - status-code: 202 - errors: - - root.BadRequestError - - root.UnauthorizedError - - root.NotFoundError - - root.TooManyRequestsError - - root.InternalServerError - examples: - - name: SingleItem - path-parameters: - collection_id: 580e63fc8c9a982ac9b8b745 - query-parameters: - skipInvalidFiles: true - request: - isArchived: false - isDraft: false - fieldData: - name: The Hitchhiker's Guide to the Galaxy - slug: hitchhikers-guide-to-the-galaxy - plain-text: Don't Panic. - rich-text: >- -

A Guide to Interstellar Travel

A towel is about the - most massively useful thing an interstellar hitchhiker can have. - Don't forget yours!

- main-image: - fileId: 62b720ef280c7a7a3be8cabe - url: /files/62b720ef280c7a7a3be8cabe_image.png - image-gallery: - - fileId: 62b720ef280c7a7a3be8cabd - url: /files/62b720ef280c7a7a3be8cabd_image.png - - fileId: 62b720ef280c7a7a3be8cabe - url: /files/62b720ef280c7a7a3be8cabe_image.png - intro-video: https://www.youtube.com/watch?v=aJ83KAggd-4 - official-site: >- - https://hitchhikers.fandom.com/wiki/The_Hitchhiker%27s_Guide_to_the_Galaxy - contact-email: zaphod.beeblebrox@heartofgold.gov - support-phone: 424-242-4242 - answer-to-everything: 42 - release-date: '1979-10-12T00:00:00.000Z' - is-featured: true - brand-color: '#000000' - category: 62b720ef280c7a7a3be8cabf - author: 62b720ef280c7a7a3be8cab0 - tags: - - 62b720ef280c7a7a3be8cab1 - - 62b720ef280c7a7a3be8cab2 - downloadable-asset: - fileId: 62b720ef280c7a7a3be8cab3 - url: /files/62b720ef280c7a7a3be8cab3_document.pdf - response: - body: - id: 42b720ef280c7a7a3be8cabe - cmsLocaleId: 653ad57de882f528b32e810e - lastPublished: '2022-11-29T16:22:43.159Z' - lastUpdated: '2022-11-17T17:19:43.282Z' - createdOn: '2022-11-17T17:11:57.148Z' - isArchived: false - isDraft: false - fieldData: - name: The Hitchhiker's Guide to the Galaxy - slug: hitchhikers-guide-to-the-galaxy - plain-text: Don't Panic. - rich-text: >- -

A Guide to Interstellar Travel

A towel is about the - most massively useful thing an interstellar hitchhiker can - have. Don't forget yours!

- main-image: - fileId: 62b720ef280c7a7a3be8cabe - url: /files/62b720ef280c7a7a3be8cabe_image.png - image-gallery: - - fileId: 62b720ef280c7a7a3be8cabd - url: /files/62b720ef280c7a7a3be8cabd_image.png - - fileId: 62b720ef280c7a7a3be8cabe - url: /files/62b720ef280c7a7a3be8cabe_image.png - intro-video: https://www.youtube.com/watch?v=aJ83KAggd-4 - official-site: >- - https://hitchhikers.fandom.com/wiki/The_Hitchhiker%27s_Guide_to_the_Galaxy - contact-email: zaphod.beeblebrox@heartofgold.gov - support-phone: 424-242-4242 - answer-to-everything: 42 - release-date: '1979-10-12T00:00:00.000Z' - is-featured: true - brand-color: '#000000' - category: 62b720ef280c7a7a3be8cabf - author: 62b720ef280c7a7a3be8cab0 - tags: - - 62b720ef280c7a7a3be8cab1 - - 62b720ef280c7a7a3be8cab2 - downloadable-asset: - fileId: 62b720ef280c7a7a3be8cab3 - url: /files/62b720ef280c7a7a3be8cab3_document.pdf - - name: MultipleItems - path-parameters: - collection_id: 580e63fc8c9a982ac9b8b745 - query-parameters: - skipInvalidFiles: true - request: - items: - - isArchived: false - isDraft: false - fieldData: - name: Senior Data Analyst - slug: senior-data-analyst - url: https://boards.greenhouse.io/webflow/jobs/26567701 - department: Data - - isArchived: false - isDraft: false - fieldData: - name: Product Manager - slug: product-manager - url: https://boards.greenhouse.io/webflow/jobs/31234567 - department: Product - response: - body: - id: 42b720ef280c7a7a3be8cabe - cmsLocaleId: 653ad57de882f528b32e810e - lastPublished: '2022-11-29T16:22:43.159Z' - lastUpdated: '2022-11-17T17:19:43.282Z' - createdOn: '2022-11-17T17:11:57.148Z' - isArchived: false - isDraft: false - fieldData: - name: The Hitchhiker's Guide to the Galaxy - slug: hitchhikers-guide-to-the-galaxy - plain-text: Don't Panic. - rich-text: >- -

A Guide to Interstellar Travel

A towel is about the - most massively useful thing an interstellar hitchhiker can - have. Don't forget yours!

- main-image: - fileId: 62b720ef280c7a7a3be8cabe - url: /files/62b720ef280c7a7a3be8cabe_image.png - image-gallery: - - fileId: 62b720ef280c7a7a3be8cabd - url: /files/62b720ef280c7a7a3be8cabd_image.png - - fileId: 62b720ef280c7a7a3be8cabe - url: /files/62b720ef280c7a7a3be8cabe_image.png - intro-video: https://www.youtube.com/watch?v=aJ83KAggd-4 - official-site: >- - https://hitchhikers.fandom.com/wiki/The_Hitchhiker%27s_Guide_to_the_Galaxy - contact-email: zaphod.beeblebrox@heartofgold.gov - support-phone: 424-242-4242 - answer-to-everything: 42 - release-date: '1979-10-12T00:00:00.000Z' - is-featured: true - brand-color: '#000000' - category: 62b720ef280c7a7a3be8cabf - author: 62b720ef280c7a7a3be8cab0 - tags: - - 62b720ef280c7a7a3be8cab1 - - 62b720ef280c7a7a3be8cab2 - downloadable-asset: - fileId: 62b720ef280c7a7a3be8cab3 - url: /files/62b720ef280c7a7a3be8cab3_document.pdf - delete-items-live: - path: /collections/{collection_id}/items/live - method: DELETE - auth: - - OAuth2: - - cms:write - docs: > - Unpublish up to 100 items from the live site and set the `isDraft` - property to `true`. - - - Items will only be unpublished in the - primary locale unless a `cmsLocaleId` is included in the request. - - - Required scope | `CMS:write` - source: - openapi: ../../../openapi/referenced-specs/v2.yml - path-parameters: - collection_id: - type: string - docs: Unique identifier for a Collection - display-name: Unpublish Live Collection Items - request: - name: ItemsDeleteItemsLiveRequest - body: - properties: - items: list - content-type: application/json - errors: - - root.BadRequestError - - root.UnauthorizedError - - root.NotFoundError - - root.TooManyRequestsError - - root.InternalServerError - examples: - - path-parameters: - collection_id: 580e63fc8c9a982ac9b8b745 - request: - items: - - id: 580e64008c9a982ac9b8b754 - update-items-live: - path: /collections/{collection_id}/items/live - method: PATCH - auth: - - OAuth2: - - cms:write - docs: > - Update a single published item or multiple published items (up to 100) - in a Collection - - - Items will only be updated in the primary - locale, unless a `cmsLocaleId` is included in the request. - - - Required scope | `CMS:write` - source: - openapi: ../../../openapi/referenced-specs/v2.yml - path-parameters: - collection_id: - type: string - docs: Unique identifier for a Collection - display-name: Update Live Collection Items - request: - name: ItemsUpdateItemsLiveRequest - query-parameters: - skipInvalidFiles: - type: optional - default: true - docs: >- - When true, invalid files are skipped and processing continues. - When false, the entire request fails if any file is invalid. - body: - properties: - items: optional> - content-type: application/json - response: - docs: Request was successful - type: root.CollectionItemListNoPagination - status-code: 200 - errors: - - root.BadRequestError - - root.UnauthorizedError - - root.NotFoundError - - root.ConflictError - - root.TooManyRequestsError - - root.InternalServerError - examples: - - name: LocalizedItems - path-parameters: - collection_id: 580e63fc8c9a982ac9b8b745 - query-parameters: - skipInvalidFiles: true - request: - items: - - id: 66f6ed9576ddacf3149d5ea6 - cmsLocaleId: 66f6e966c9e1dc700a857ca5 - fieldData: - name: Ne Paniquez Pas - slug: ne-paniquez-pas - featured: false - - id: 66f6ed9576ddacf3149d5ea6 - cmsLocaleId: 66f6e966c9e1dc700a857ca4 - fieldData: - name: No Entrar en Pánico - slug: no-entrar-en-panico - featured: false - - id: 66f6ed9576ddacf3149d5eaa - cmsLocaleId: 66f6e966c9e1dc700a857ca5 - fieldData: - name: Au Revoir et Merci pour Tous les Poissons - slug: au-revoir-et-merci - featured: false - - id: 66f6ed9576ddacf3149d5eaa - cmsLocaleId: 66f6e966c9e1dc700a857ca4 - fieldData: - name: Hasta Luego y Gracias por Todo el Pescado - slug: hasta-luego-y-gracias - featured: false - response: - body: - items: - - id: 66f6ed9576ddacf3149d5ea6 - cmsLocaleId: 66f6e966c9e1dc700a857ca5 - lastPublished: '2024-09-27T17:38:29.066Z' - lastUpdated: '2024-09-27T17:38:29.066Z' - createdOn: '2024-09-27T17:38:29.066Z' - isArchived: false - isDraft: false - fieldData: - name: Ne Paniquez Pas - slug: ne-paniquez-pas - featured: false - - id: 66f6ed9576ddacf3149d5ea6 - cmsLocaleId: 66f6e966c9e1dc700a857ca4 - lastPublished: '2024-09-27T17:38:29.066Z' - lastUpdated: '2024-09-27T17:38:29.066Z' - createdOn: '2024-09-27T17:38:29.066Z' - isArchived: false - isDraft: false - fieldData: - name: No Entrar en Pánico - slug: no-entrar-en-panico - featured: false - - id: 66f6ed9576ddacf3149d5eaa - cmsLocaleId: 66f6e966c9e1dc700a857ca5 - lastPublished: '2024-09-27T17:38:29.066Z' - lastUpdated: '2024-09-27T17:38:29.066Z' - createdOn: '2024-09-27T17:38:29.066Z' - isArchived: false - isDraft: false - fieldData: - name: Au Revoir et Merci pour Tous les Poissons - slug: au-revoir-et-merci - featured: false - - id: 66f6ed9576ddacf3149d5eaa - cmsLocaleId: 66f6e966c9e1dc700a857ca4 - lastPublished: '2024-09-27T17:38:29.066Z' - lastUpdated: '2024-09-27T17:38:29.066Z' - createdOn: '2024-09-27T17:38:29.066Z' - isArchived: false - isDraft: false - fieldData: - name: Hasta Luego y Gracias por Todo el Pescado - slug: hasta-luego-y-gracias - featured: false - - name: MultipleItems - path-parameters: - collection_id: 580e63fc8c9a982ac9b8b745 - query-parameters: - skipInvalidFiles: true - request: - items: - - id: 580e64008c9a982ac9b8b754 - isArchived: false - isDraft: false - fieldData: - name: Senior Data Analyst - slug: senior-data-analyst - url: https://boards.greenhouse.io/webflow/jobs/26567701 - department: Data - - id: 580e64008c9a982ac9b8b754 - isArchived: false - isDraft: false - fieldData: - name: Product Manager - slug: product-manager - url: https://boards.greenhouse.io/webflow/jobs/31234567 - department: Product - response: - body: - items: - - id: 66f6ed9576ddacf3149d5ea6 - cmsLocaleId: 66f6e966c9e1dc700a857ca5 - lastPublished: '2024-09-27T17:38:29.066Z' - lastUpdated: '2024-09-27T17:38:29.066Z' - createdOn: '2024-09-27T17:38:29.066Z' - isArchived: false - isDraft: false - fieldData: - name: Ne Paniquez Pas - slug: ne-paniquez-pas - featured: false - - id: 66f6ed9576ddacf3149d5ea6 - cmsLocaleId: 66f6e966c9e1dc700a857ca4 - lastPublished: '2024-09-27T17:38:29.066Z' - lastUpdated: '2024-09-27T17:38:29.066Z' - createdOn: '2024-09-27T17:38:29.066Z' - isArchived: false - isDraft: false - fieldData: - name: No Entrar en Pánico - slug: no-entrar-en-panico - featured: false - - id: 66f6ed9576ddacf3149d5eaa - cmsLocaleId: 66f6e966c9e1dc700a857ca5 - lastPublished: '2024-09-27T17:38:29.066Z' - lastUpdated: '2024-09-27T17:38:29.066Z' - createdOn: '2024-09-27T17:38:29.066Z' - isArchived: false - isDraft: false - fieldData: - name: Au Revoir et Merci pour Tous les Poissons - slug: au-revoir-et-merci - featured: false - - id: 66f6ed9576ddacf3149d5eaa - cmsLocaleId: 66f6e966c9e1dc700a857ca4 - lastPublished: '2024-09-27T17:38:29.066Z' - lastUpdated: '2024-09-27T17:38:29.066Z' - createdOn: '2024-09-27T17:38:29.066Z' - isArchived: false - isDraft: false - fieldData: - name: Hasta Luego y Gracias por Todo el Pescado - slug: hasta-luego-y-gracias - featured: false - - name: Multiple items updated across multiple locales - path-parameters: - collection_id: 580e63fc8c9a982ac9b8b745 - query-parameters: - skipInvalidFiles: true - request: - items: - - id: 66f6ed9576ddacf3149d5ea6 - cmsLocaleId: 66f6e966c9e1dc700a857ca5 - fieldData: - name: Ne Paniquez Pas - slug: ne-paniquez-pas - featured: false - - id: 66f6ed9576ddacf3149d5ea6 - cmsLocaleId: 66f6e966c9e1dc700a857ca4 - fieldData: - name: No Entrar en Pánico - slug: no-entrar-en-panico - featured: false - - id: 66f6ed9576ddacf3149d5eaa - cmsLocaleId: 66f6e966c9e1dc700a857ca5 - fieldData: - name: Au Revoir et Merci pour Tous les Poissons - slug: au-revoir-et-merci - featured: false - - id: 66f6ed9576ddacf3149d5eaa - cmsLocaleId: 66f6e966c9e1dc700a857ca4 - fieldData: - name: Hasta Luego y Gracias por Todo el Pescado - slug: hasta-luego-y-gracias - featured: false - response: - body: - items: - - id: 66f6ed9576ddacf3149d5ea6 - cmsLocaleId: 66f6e966c9e1dc700a857ca5 - lastPublished: '2024-09-27T17:38:29.066Z' - lastUpdated: '2024-09-27T17:38:29.066Z' - createdOn: '2024-09-27T17:38:29.066Z' - isArchived: false - isDraft: false - fieldData: - name: Ne Paniquez Pas - slug: ne-paniquez-pas - featured: false - - id: 66f6ed9576ddacf3149d5ea6 - cmsLocaleId: 66f6e966c9e1dc700a857ca4 - lastPublished: '2024-09-27T17:38:29.066Z' - lastUpdated: '2024-09-27T17:38:29.066Z' - createdOn: '2024-09-27T17:38:29.066Z' - isArchived: false - isDraft: false - fieldData: - name: No Entrar en Pánico - slug: no-entrar-en-panico - featured: false - - id: 66f6ed9576ddacf3149d5eaa - cmsLocaleId: 66f6e966c9e1dc700a857ca5 - lastPublished: '2024-09-27T17:38:29.066Z' - lastUpdated: '2024-09-27T17:38:29.066Z' - createdOn: '2024-09-27T17:38:29.066Z' - isArchived: false - isDraft: false - fieldData: - name: Au Revoir et Merci pour Tous les Poissons - slug: au-revoir-et-merci - featured: false - - id: 66f6ed9576ddacf3149d5eaa - cmsLocaleId: 66f6e966c9e1dc700a857ca4 - lastPublished: '2024-09-27T17:38:29.066Z' - lastUpdated: '2024-09-27T17:38:29.066Z' - createdOn: '2024-09-27T17:38:29.066Z' - isArchived: false - isDraft: false - fieldData: - name: Hasta Luego y Gracias por Todo el Pescado - slug: hasta-luego-y-gracias - featured: false - - name: Multiple items updated in a single locale - path-parameters: - collection_id: 580e63fc8c9a982ac9b8b745 - query-parameters: - skipInvalidFiles: true - request: - items: - - id: 66f6ed9576ddacf3149d5ea6 - cmsLocaleId: 66f6e966c9e1dc700a857ca5 - fieldData: - name: Ne Paniquez Pas - slug: ne-paniquez-pas - featured: false - - id: 66f6ed9576ddacf3149d5ea6 - cmsLocaleId: 66f6e966c9e1dc700a857ca4 - fieldData: - name: No Entrar en Pánico - slug: no-entrar-en-panico - featured: false - - id: 66f6ed9576ddacf3149d5eaa - cmsLocaleId: 66f6e966c9e1dc700a857ca5 - fieldData: - name: Au Revoir et Merci pour Tous les Poissons - slug: au-revoir-et-merci - featured: false - - id: 66f6ed9576ddacf3149d5eaa - cmsLocaleId: 66f6e966c9e1dc700a857ca4 - fieldData: - name: Hasta Luego y Gracias por Todo el Pescado - slug: hasta-luego-y-gracias - featured: false - response: - body: - items: - - id: 62b720ef280c7a7a3be8cabe - cmsLocaleId: 66f6e966c9e1dc700a857ca3 - lastPublished: '2022-06-30T13:35:20.878Z' - lastUpdated: '2022-06-25T14:51:27.809Z' - createdOn: '2022-06-25T14:51:27.809Z' - isArchived: false - isDraft: false - fieldData: - name: Senior Data Analyst - slug: senior-data-analyst - url: https://boards.greenhouse.io/webflow/jobs/26567701 - department: Data - - id: 62c880ef281c7b7b4cf9dabc - cmsLocaleId: 66f6e966c9e1dc700a857ca3 - lastPublished: '2023-04-15T10:25:18.123Z' - lastUpdated: '2023-04-10T11:45:30.567Z' - createdOn: '2023-04-10T11:45:30.567Z' - isArchived: false - isDraft: false - fieldData: - name: Product Manager - slug: product-manager - url: https://boards.greenhouse.io/webflow/jobs/31234567 - department: Product - create-items: - path: /collections/{collection_id}/items/bulk - method: POST - auth: - - OAuth2: - - cms:write - docs: > - Create an item or multiple items in a CMS Collection across multiple - corresponding locales. - - - - - This endpoint can create up to 100 items in a request. - - If the `cmsLocaleIds` parameter is not included in the request, an item will only be created in the primary locale. - - - - Required scope | `CMS:write` - source: - openapi: ../../../openapi/referenced-specs/v2.yml - path-parameters: - collection_id: - type: string - docs: Unique identifier for a Collection - display-name: Create Collection Items - request: - name: CreateBulkCollectionItemRequestBody - query-parameters: - skipInvalidFiles: - type: optional - default: true - docs: >- - When true, invalid files are skipped and processing continues. - When false, the entire request fails if any file is invalid. - body: - properties: - cmsLocaleIds: - type: optional> - docs: >- - Array of identifiers for the locales where the item will be - created - isArchived: - type: optional - docs: Indicates whether the item is archived. - default: false - isDraft: - type: optional - docs: Indicates whether the item is in draft state. - default: true - fieldData: CreateBulkCollectionItemRequestBodyFieldData - content-type: application/json - response: - docs: Request was successful - type: root.BulkCollectionItem - status-code: 202 - errors: - - root.BadRequestError - - root.UnauthorizedError - - root.NotFoundError - - root.TooManyRequestsError - - root.InternalServerError - examples: - - name: Create a single item across multiple locales - path-parameters: - collection_id: 580e63fc8c9a982ac9b8b745 - query-parameters: - skipInvalidFiles: true - request: - cmsLocaleIds: - - 66f6e966c9e1dc700a857ca3 - - 66f6e966c9e1dc700a857ca4 - - 66f6e966c9e1dc700a857ca5 - isArchived: false - isDraft: false - fieldData: - name: Don’t Panic - slug: dont-panic - response: - body: - id: 580e64008c9a982ac9b8b754 - cmsLocaleIds: - - 653ad57de882f528b32e810e - - 6514390aea353fc691d69827 - - 65143930ea353fc691d69cd8 - lastPublished: '2023-03-17T18:47:35.560Z' - lastUpdated: '2023-03-17T18:47:35.560Z' - createdOn: '2023-03-17T18:47:35.560Z' - isArchived: true - isDraft: true - fieldData: - name: My new item - slug: my-new-item - date: '2022-11-18T00:00:00.000Z' - featured: false - color: '#db4b68' - - name: Create multiple items across multiple locales - path-parameters: - collection_id: 580e63fc8c9a982ac9b8b745 - query-parameters: - skipInvalidFiles: true - request: - cmsLocaleIds: - - 66f6e966c9e1dc700a857ca3 - - 66f6e966c9e1dc700a857ca4 - isArchived: false - isDraft: false - fieldData: - - name: Don’t Panic - slug: dont-panic - - name: So Long and Thanks for All the Fish - slug: so-long-and-thanks - response: - body: - id: 580e64008c9a982ac9b8b754 - cmsLocaleIds: - - 653ad57de882f528b32e810e - - 6514390aea353fc691d69827 - - 65143930ea353fc691d69cd8 - lastPublished: '2023-03-17T18:47:35.560Z' - lastUpdated: '2023-03-17T18:47:35.560Z' - createdOn: '2023-03-17T18:47:35.560Z' - isArchived: true - isDraft: true - fieldData: - name: My new item - slug: my-new-item - date: '2022-11-18T00:00:00.000Z' - featured: false - color: '#db4b68' - - name: Single item created across multiple locales - path-parameters: - collection_id: 580e63fc8c9a982ac9b8b745 - query-parameters: - skipInvalidFiles: true - request: - cmsLocaleIds: - - 66f6e966c9e1dc700a857ca3 - - 66f6e966c9e1dc700a857ca4 - - 66f6e966c9e1dc700a857ca5 - isArchived: false - isDraft: false - fieldData: - name: Don’t Panic - slug: dont-panic - response: - body: - id: 580e64008c9a982ac9b8b754 - cmsLocaleIds: - - 653ad57de882f528b32e810e - - 6514390aea353fc691d69827 - - 65143930ea353fc691d69cd8 - lastPublished: '2023-03-17T18:47:35.560Z' - lastUpdated: '2023-03-17T18:47:35.560Z' - createdOn: '2023-03-17T18:47:35.560Z' - isArchived: true - isDraft: true - fieldData: - name: My new item - slug: my-new-item - date: '2022-11-18T00:00:00.000Z' - featured: false - color: '#db4b68' - - name: Multiple items created across multiple locales - path-parameters: - collection_id: 580e63fc8c9a982ac9b8b745 - query-parameters: - skipInvalidFiles: true - request: - cmsLocaleIds: - - 66f6e966c9e1dc700a857ca3 - - 66f6e966c9e1dc700a857ca4 - - 66f6e966c9e1dc700a857ca5 - isArchived: false - isDraft: false - fieldData: - name: Don’t Panic - slug: dont-panic - response: - body: - id: 580e64008c9a982ac9b8b754 - cmsLocaleIds: - - 653ad57de882f528b32e810e - - 6514390aea353fc691d69827 - - 65143930ea353fc691d69cd8 - lastPublished: '2023-03-17T18:47:35.560Z' - lastUpdated: '2023-03-17T18:47:35.560Z' - createdOn: '2023-03-17T18:47:35.560Z' - isArchived: true - isDraft: true - fieldData: - name: My new item - slug: my-new-item - date: '2022-11-18T00:00:00.000Z' - featured: false - color: '#db4b68' - get-item: - path: /collections/{collection_id}/items/{item_id} - method: GET - auth: - - OAuth2: - - cms:read - docs: | - Get details of a selected Collection Item. - - Required scope | `CMS:read` - source: - openapi: ../../../openapi/referenced-specs/v2.yml - path-parameters: - collection_id: - type: string - docs: Unique identifier for a Collection - item_id: - type: string - docs: Unique identifier for an Item - display-name: Get Collection Item - request: - name: ItemsGetItemRequest - query-parameters: - cmsLocaleId: - type: optional - docs: >- - Unique identifier for a CMS Locale. This UID is different from the - Site locale identifier and is listed as `cmsLocaleId` in the Sites - response. To query multiple locales, input a comma separated - string. - response: - docs: Request was successful - type: root.CollectionItem - status-code: 200 - errors: - - root.BadRequestError - - root.UnauthorizedError - - root.NotFoundError - - root.TooManyRequestsError - - root.InternalServerError - examples: - - path-parameters: - collection_id: 580e63fc8c9a982ac9b8b745 - item_id: 580e64008c9a982ac9b8b754 - query-parameters: - cmsLocaleId: cmsLocaleId - response: - body: - id: 42b720ef280c7a7a3be8cabe - cmsLocaleId: 653ad57de882f528b32e810e - lastPublished: '2022-11-29T16:22:43.159Z' - lastUpdated: '2022-11-17T17:19:43.282Z' - createdOn: '2022-11-17T17:11:57.148Z' - isArchived: false - isDraft: false - fieldData: - name: The Hitchhiker's Guide to the Galaxy - slug: hitchhikers-guide-to-the-galaxy - plain-text: Don't Panic. - rich-text: >- -

A Guide to Interstellar Travel

A towel is about the - most massively useful thing an interstellar hitchhiker can - have. Don't forget yours!

- main-image: - fileId: 62b720ef280c7a7a3be8cabe - url: /files/62b720ef280c7a7a3be8cabe_image.png - image-gallery: - - fileId: 62b720ef280c7a7a3be8cabd - url: /files/62b720ef280c7a7a3be8cabd_image.png - - fileId: 62b720ef280c7a7a3be8cabe - url: /files/62b720ef280c7a7a3be8cabe_image.png - intro-video: https://www.youtube.com/watch?v=aJ83KAggd-4 - official-site: >- - https://hitchhikers.fandom.com/wiki/The_Hitchhiker%27s_Guide_to_the_Galaxy - contact-email: zaphod.beeblebrox@heartofgold.gov - support-phone: 424-242-4242 - answer-to-everything: 42 - release-date: '1979-10-12T00:00:00.000Z' - is-featured: true - brand-color: '#000000' - category: 62b720ef280c7a7a3be8cabf - author: 62b720ef280c7a7a3be8cab0 - tags: - - 62b720ef280c7a7a3be8cab1 - - 62b720ef280c7a7a3be8cab2 - downloadable-asset: - fileId: 62b720ef280c7a7a3be8cab3 - url: /files/62b720ef280c7a7a3be8cab3_document.pdf - delete-item: - path: /collections/{collection_id}/items/{item_id} - method: DELETE - auth: - - OAuth2: - - cms:write - docs: | - Delete an item from a collection. - - Required scope | `CMS:write` - source: - openapi: ../../../openapi/referenced-specs/v2.yml - path-parameters: - collection_id: - type: string - docs: Unique identifier for a Collection - item_id: - type: string - docs: Unique identifier for an Item - display-name: Delete Collection Item - request: - name: ItemsDeleteItemRequest - query-parameters: - cmsLocaleId: - type: optional - docs: >- - Unique identifier for a CMS Locale. This UID is different from the - Site locale identifier and is listed as `cmsLocaleId` in the Sites - response. To query multiple locales, input a comma separated - string. - errors: - - root.BadRequestError - - root.UnauthorizedError - - root.NotFoundError - - root.TooManyRequestsError - - root.InternalServerError - examples: - - path-parameters: - collection_id: 580e63fc8c9a982ac9b8b745 - item_id: 580e64008c9a982ac9b8b754 - query-parameters: - cmsLocaleId: cmsLocaleId - update-item: - path: /collections/{collection_id}/items/{item_id} - method: PATCH - auth: - - OAuth2: - - cms:write - docs: | - Update a selected Item in a Collection. - - Required scope | `CMS:write` - source: - openapi: ../../../openapi/referenced-specs/v2.yml - path-parameters: - collection_id: - type: string - docs: Unique identifier for a Collection - item_id: - type: string - docs: Unique identifier for an Item - display-name: Update Collection Item - request: - body: root.CollectionItemPatchSingle - query-parameters: - skipInvalidFiles: - type: optional - default: true - docs: >- - When true, invalid files are skipped and processing continues. - When false, the entire request fails if any file is invalid. - name: ItemsUpdateItemRequest - content-type: application/json - response: - docs: Request was successful - type: root.CollectionItem - status-code: 200 - errors: - - root.BadRequestError - - root.UnauthorizedError - - root.NotFoundError - - root.TooManyRequestsError - - root.InternalServerError - examples: - - path-parameters: - collection_id: 580e63fc8c9a982ac9b8b745 - item_id: 580e64008c9a982ac9b8b754 - query-parameters: - skipInvalidFiles: true - request: - isArchived: false - isDraft: false - fieldData: - name: The Hitchhiker's Guide to the Galaxy - slug: hitchhikers-guide-to-the-galaxy - plain-text: Don't Panic. - rich-text: >- -

A Guide to Interstellar Travel

A towel is about the - most massively useful thing an interstellar hitchhiker can have. - Don't forget yours!

- main-image: - fileId: 62b720ef280c7a7a3be8cabe - url: /files/62b720ef280c7a7a3be8cabe_image.png - image-gallery: - - fileId: 62b720ef280c7a7a3be8cabd - url: /files/62b720ef280c7a7a3be8cabd_image.png - - fileId: 62b720ef280c7a7a3be8cabe - url: /files/62b720ef280c7a7a3be8cabe_image.png - intro-video: https://www.youtube.com/watch?v=aJ83KAggd-4 - official-site: >- - https://hitchhikers.fandom.com/wiki/The_Hitchhiker%27s_Guide_to_the_Galaxy - contact-email: zaphod.beeblebrox@heartofgold.gov - support-phone: 424-242-4242 - answer-to-everything: 42 - release-date: '1979-10-12T00:00:00.000Z' - is-featured: true - brand-color: '#000000' - category: 62b720ef280c7a7a3be8cabf - author: 62b720ef280c7a7a3be8cab0 - tags: - - 62b720ef280c7a7a3be8cab1 - - 62b720ef280c7a7a3be8cab2 - downloadable-asset: - fileId: 62b720ef280c7a7a3be8cab3 - url: /files/62b720ef280c7a7a3be8cab3_document.pdf - response: - body: - id: 42b720ef280c7a7a3be8cabe - cmsLocaleId: 653ad57de882f528b32e810e - lastPublished: '2022-11-29T16:22:43.159Z' - lastUpdated: '2022-11-17T17:19:43.282Z' - createdOn: '2022-11-17T17:11:57.148Z' - isArchived: false - isDraft: false - fieldData: - name: The Hitchhiker's Guide to the Galaxy - slug: hitchhikers-guide-to-the-galaxy - plain-text: Don't Panic. - rich-text: >- -

A Guide to Interstellar Travel

A towel is about the - most massively useful thing an interstellar hitchhiker can - have. Don't forget yours!

- main-image: - fileId: 62b720ef280c7a7a3be8cabe - url: /files/62b720ef280c7a7a3be8cabe_image.png - image-gallery: - - fileId: 62b720ef280c7a7a3be8cabd - url: /files/62b720ef280c7a7a3be8cabd_image.png - - fileId: 62b720ef280c7a7a3be8cabe - url: /files/62b720ef280c7a7a3be8cabe_image.png - intro-video: https://www.youtube.com/watch?v=aJ83KAggd-4 - official-site: >- - https://hitchhikers.fandom.com/wiki/The_Hitchhiker%27s_Guide_to_the_Galaxy - contact-email: zaphod.beeblebrox@heartofgold.gov - support-phone: 424-242-4242 - answer-to-everything: 42 - release-date: '1979-10-12T00:00:00.000Z' - is-featured: true - brand-color: '#000000' - category: 62b720ef280c7a7a3be8cabf - author: 62b720ef280c7a7a3be8cab0 - tags: - - 62b720ef280c7a7a3be8cab1 - - 62b720ef280c7a7a3be8cab2 - downloadable-asset: - fileId: 62b720ef280c7a7a3be8cab3 - url: /files/62b720ef280c7a7a3be8cab3_document.pdf - get-item-live: - path: /collections/{collection_id}/items/{item_id}/live - method: GET - auth: - - OAuth2: - - cms:read - docs: | - Get details of a selected Collection live Item. - - - Serving data to applications in real-time? Use the Content Delivery API at `api-cdn.webflow.com` for better performance. The CDN-backed endpoint is optimized for high-volume reads, while the Data API is designed for writes and management operations. - - - Required scope | `CMS:read` - source: - openapi: ../../../openapi/referenced-specs/v2.yml - path-parameters: - collection_id: - type: string - docs: Unique identifier for a Collection - item_id: - type: string - docs: Unique identifier for an Item - display-name: Get Live Collection Item - request: - name: ItemsGetItemLiveRequest - query-parameters: - cmsLocaleId: - type: optional - docs: >- - Unique identifier for a CMS Locale. This UID is different from the - Site locale identifier and is listed as `cmsLocaleId` in the Sites - response. To query multiple locales, input a comma separated - string. - response: - docs: Request was successful - type: root.CollectionItem - status-code: 200 - url: Data API - errors: - - root.BadRequestError - - root.UnauthorizedError - - root.NotFoundError - - root.TooManyRequestsError - - root.InternalServerError - examples: - - path-parameters: - collection_id: 580e63fc8c9a982ac9b8b745 - item_id: 580e64008c9a982ac9b8b754 - query-parameters: - cmsLocaleId: cmsLocaleId - response: - body: - id: 42b720ef280c7a7a3be8cabe - cmsLocaleId: 653ad57de882f528b32e810e - lastPublished: '2022-11-29T16:22:43.159Z' - lastUpdated: '2022-11-17T17:19:43.282Z' - createdOn: '2022-11-17T17:11:57.148Z' - isArchived: false - isDraft: false - fieldData: - name: The Hitchhiker's Guide to the Galaxy - slug: hitchhikers-guide-to-the-galaxy - plain-text: Don't Panic. - rich-text: >- -

A Guide to Interstellar Travel

A towel is about the - most massively useful thing an interstellar hitchhiker can - have. Don't forget yours!

- main-image: - fileId: 62b720ef280c7a7a3be8cabe - url: /files/62b720ef280c7a7a3be8cabe_image.png - image-gallery: - - fileId: 62b720ef280c7a7a3be8cabd - url: /files/62b720ef280c7a7a3be8cabd_image.png - - fileId: 62b720ef280c7a7a3be8cabe - url: /files/62b720ef280c7a7a3be8cabe_image.png - intro-video: https://www.youtube.com/watch?v=aJ83KAggd-4 - official-site: >- - https://hitchhikers.fandom.com/wiki/The_Hitchhiker%27s_Guide_to_the_Galaxy - contact-email: zaphod.beeblebrox@heartofgold.gov - support-phone: 424-242-4242 - answer-to-everything: 42 - release-date: '1979-10-12T00:00:00.000Z' - is-featured: true - brand-color: '#000000' - category: 62b720ef280c7a7a3be8cabf - author: 62b720ef280c7a7a3be8cab0 - tags: - - 62b720ef280c7a7a3be8cab1 - - 62b720ef280c7a7a3be8cab2 - downloadable-asset: - fileId: 62b720ef280c7a7a3be8cab3 - url: /files/62b720ef280c7a7a3be8cab3_document.pdf - delete-item-live: - path: /collections/{collection_id}/items/{item_id}/live - method: DELETE - auth: - - OAuth2: - - cms:write - docs: > - Unpublish a live item from the site and set the `isDraft` property to - `true`. - - - For bulk unpublishing, please use [this - endpoint.](/data/v2.0.0/reference/cms/collection-items/live-items/delete-items-live) - - - Required scope | `CMS:write` - source: - openapi: ../../../openapi/referenced-specs/v2.yml - path-parameters: - collection_id: - type: string - docs: Unique identifier for a Collection - item_id: - type: string - docs: Unique identifier for an Item - display-name: Unpublish Live Collection Item - request: - name: ItemsDeleteItemLiveRequest - query-parameters: - cmsLocaleId: - type: optional - docs: >- - Unique identifier for a CMS Locale. This UID is different from the - Site locale identifier and is listed as `cmsLocaleId` in the Sites - response. To query multiple locales, input a comma separated - string. - errors: - - root.BadRequestError - - root.UnauthorizedError - - root.NotFoundError - - root.TooManyRequestsError - - root.InternalServerError - examples: - - path-parameters: - collection_id: 580e63fc8c9a982ac9b8b745 - item_id: 580e64008c9a982ac9b8b754 - query-parameters: - cmsLocaleId: cmsLocaleId - update-item-live: - path: /collections/{collection_id}/items/{item_id}/live - method: PATCH - auth: - - OAuth2: - - cms:write - docs: > - Update a selected live Item in a Collection. The updates for this Item - will be published to the live site. - - - Required scope | `CMS:write` - source: - openapi: ../../../openapi/referenced-specs/v2.yml - path-parameters: - collection_id: - type: string - docs: Unique identifier for a Collection - item_id: - type: string - docs: Unique identifier for an Item - display-name: Update Live Collection Item - request: - body: root.CollectionItemPatchSingle - query-parameters: - skipInvalidFiles: - type: optional - default: true - docs: >- - When true, invalid files are skipped and processing continues. - When false, the entire request fails if any file is invalid. - name: ItemsUpdateItemLiveRequest - content-type: application/json - response: - docs: Request was successful - type: root.CollectionItem - status-code: 200 - errors: - - root.BadRequestError - - root.UnauthorizedError - - root.NotFoundError - - root.ConflictError - - root.TooManyRequestsError - - root.InternalServerError - examples: - - path-parameters: - collection_id: 580e63fc8c9a982ac9b8b745 - item_id: 580e64008c9a982ac9b8b754 - query-parameters: - skipInvalidFiles: true - request: - isArchived: false - isDraft: false - fieldData: - name: The Hitchhiker's Guide to the Galaxy - slug: hitchhikers-guide-to-the-galaxy - plain-text: Don't Panic. - rich-text: >- -

A Guide to Interstellar Travel

A towel is about the - most massively useful thing an interstellar hitchhiker can have. - Don't forget yours!

- main-image: - fileId: 62b720ef280c7a7a3be8cabe - url: /files/62b720ef280c7a7a3be8cabe_image.png - image-gallery: - - fileId: 62b720ef280c7a7a3be8cabd - url: /files/62b720ef280c7a7a3be8cabd_image.png - - fileId: 62b720ef280c7a7a3be8cabe - url: /files/62b720ef280c7a7a3be8cabe_image.png - intro-video: https://www.youtube.com/watch?v=aJ83KAggd-4 - official-site: >- - https://hitchhikers.fandom.com/wiki/The_Hitchhiker%27s_Guide_to_the_Galaxy - contact-email: zaphod.beeblebrox@heartofgold.gov - support-phone: 424-242-4242 - answer-to-everything: 42 - release-date: '1979-10-12T00:00:00.000Z' - is-featured: true - brand-color: '#000000' - category: 62b720ef280c7a7a3be8cabf - author: 62b720ef280c7a7a3be8cab0 - tags: - - 62b720ef280c7a7a3be8cab1 - - 62b720ef280c7a7a3be8cab2 - downloadable-asset: - fileId: 62b720ef280c7a7a3be8cab3 - url: /files/62b720ef280c7a7a3be8cab3_document.pdf - response: - body: - id: 42b720ef280c7a7a3be8cabe - cmsLocaleId: 653ad57de882f528b32e810e - lastPublished: '2022-11-29T16:22:43.159Z' - lastUpdated: '2022-11-17T17:19:43.282Z' - createdOn: '2022-11-17T17:11:57.148Z' - isArchived: false - isDraft: false - fieldData: - name: The Hitchhiker's Guide to the Galaxy - slug: hitchhikers-guide-to-the-galaxy - plain-text: Don't Panic. - rich-text: >- -

A Guide to Interstellar Travel

A towel is about the - most massively useful thing an interstellar hitchhiker can - have. Don't forget yours!

- main-image: - fileId: 62b720ef280c7a7a3be8cabe - url: /files/62b720ef280c7a7a3be8cabe_image.png - image-gallery: - - fileId: 62b720ef280c7a7a3be8cabd - url: /files/62b720ef280c7a7a3be8cabd_image.png - - fileId: 62b720ef280c7a7a3be8cabe - url: /files/62b720ef280c7a7a3be8cabe_image.png - intro-video: https://www.youtube.com/watch?v=aJ83KAggd-4 - official-site: >- - https://hitchhikers.fandom.com/wiki/The_Hitchhiker%27s_Guide_to_the_Galaxy - contact-email: zaphod.beeblebrox@heartofgold.gov - support-phone: 424-242-4242 - answer-to-everything: 42 - release-date: '1979-10-12T00:00:00.000Z' - is-featured: true - brand-color: '#000000' - category: 62b720ef280c7a7a3be8cabf - author: 62b720ef280c7a7a3be8cab0 - tags: - - 62b720ef280c7a7a3be8cab1 - - 62b720ef280c7a7a3be8cab2 - downloadable-asset: - fileId: 62b720ef280c7a7a3be8cab3 - url: /files/62b720ef280c7a7a3be8cab3_document.pdf - publish-item: - path: /collections/{collection_id}/items/publish - method: POST - auth: - - OAuth2: - - cms:write - docs: | - Publish an item or multiple items. - - Required scope | `cms:write` - source: - openapi: ../../../openapi/referenced-specs/v2.yml - path-parameters: - collection_id: - type: string - docs: Unique identifier for a Collection - display-name: Publish Collection Item - request: - body: ItemsPublishItemRequest - content-type: application/json - response: - docs: Request was successful - type: ItemsPublishItemResponse - status-code: 202 - errors: - - root.BadRequestError - - root.UnauthorizedError - - root.NotFoundError - - root.ConflictError - - root.TooManyRequestsError - - root.InternalServerError - examples: - - name: PrimaryLocale - path-parameters: - collection_id: 580e63fc8c9a982ac9b8b745 - request: - itemIds: - - 643fd856d66b6528195ee2ca - - 643fd856d66b6528195ee2cb - - 643fd856d66b6528195ee2cc - response: - body: - publishedItemIds: - - 643fd856d66b6528195ee2ca - - 643fd856d66b6528195ee2cb - errors: - - Staging item ID 643fd856d66b6528195ee2cf not found. - - name: SecondaryLocale - path-parameters: - collection_id: 580e63fc8c9a982ac9b8b745 - request: - items: - - id: 643fd856d66b6528195ee2ca - cmsLocaleIds: - - 653ad57de882f528b32e810e - - id: 643fd856d66b6528195ee2cb - cmsLocaleIds: - - 653ad57de882f528b32e810e - - id: 643fd856d66b6528195ee2cc - cmsLocaleIds: - - 653ad57de882f528b32e810e - response: - body: - publishedItemIds: - - 643fd856d66b6528195ee2ca - - 643fd856d66b6528195ee2cb - errors: - - Staging item ID 643fd856d66b6528195ee2cf not found. - - name: MultipleLocales - path-parameters: - collection_id: 580e63fc8c9a982ac9b8b745 - request: - items: - - id: 643fd856d66b6528195ee2ca - cmsLocaleIds: - - 653ad57de882f528b32e810e - - 6514390aea353fc691d69827 - - 65143930ea353fc691d69cd8 - response: - body: - publishedItemIds: - - 643fd856d66b6528195ee2ca - - 643fd856d66b6528195ee2cb - errors: - - Staging item ID 643fd856d66b6528195ee2cf not found. - source: - openapi: ../../../openapi/referenced-specs/v2.yml diff --git a/.mock/definition/comments.yml b/.mock/definition/comments.yml deleted file mode 100644 index 573e375..0000000 --- a/.mock/definition/comments.yml +++ /dev/null @@ -1,41 +0,0 @@ -imports: - root: __package__.yml -webhooks: - comment_created: - audiences: [] - method: POST - display-name: New Comment Thread - headers: {} - payload: root.Comment - examples: - - payload: - triggerType: comment_created - payload: - threadId: 679d2ddb5196117ad04d1ffa - commentId: 679d2ddb5196117ad04d1ff8 - type: new_comment - siteId: 679826b3b20b045e176bc4b5 - pageId: 679826b3b20b045e176bc4bc - localeId: 67993753d910db250db64b3e - itemId: 580e64008c9a982ac9b8b754 - breakpoint: main - url: >- - https://webflow.com/design/site-slug-4ec832?workflow=comment&commentId=679d2ddb5196117ad04d1ffa&pageId=679826b3b20b045e176bc4bc - content: 'This comment mentions another user [[6287ec36a841b25637c663df]] ' - isResolved: false - author: - userId: 6287ec36a841b25637c663df - email: ford.prefect@heartofgold.spaceship - name: Ford Prefect - mentionedUsers: - - userId: 6287ec36a841b25637c663df - email: arthur.dent@heartofgold.spaceship - name: Arthur Dent - createdOn: '2025-01-31T20:08:59.759Z' - lastUpdated: '2025-01-31T20:08:59.759Z' - docs: | - Information about a new comment thread or reply - - - There may be a delay of up to 5 minutes before new comments appear in the system and trigger the webhook notification. - diff --git a/.mock/definition/components.yml b/.mock/definition/components.yml deleted file mode 100644 index 3370a4f..0000000 --- a/.mock/definition/components.yml +++ /dev/null @@ -1,548 +0,0 @@ -imports: - root: __package__.yml -service: - auth: false - base-path: '' - endpoints: - list: - path: /sites/{site_id}/components - method: GET - auth: - - OAuth2: - - components:read - docs: | - List of all components for a site. - - Required scope | `components:read` - source: - openapi: ../../../openapi/referenced-specs/v2.yml - path-parameters: - site_id: - type: string - docs: Unique identifier for a Site - display-name: List Components - request: - name: ComponentsListRequest - query-parameters: - branchId: - type: optional - docs: Scope the operation to work on a specific branch. - limit: - type: optional - docs: 'Maximum number of records to be returned (max limit: 100)' - offset: - type: optional - docs: >- - Offset used for pagination if the results have more than limit - records - response: - docs: Request was successful - type: root.ComponentList - status-code: 200 - errors: - - root.BadRequestError - - root.UnauthorizedError - - root.NotFoundError - - root.TooManyRequestsError - - root.InternalServerError - examples: - - path-parameters: - site_id: 580e63e98c9a982ac9b8b741 - query-parameters: - branchId: 68026fa68ef6dc744c75b833 - limit: 1 - offset: 1 - response: - body: - components: - - id: 6596da6045e56dee495bcbba - name: Primary Button - group: Buttons - description: A default button component that can be used across the site - readonly: true - - id: 658205daa3e8206a523b5ad4 - name: Secondary Button - group: Buttons - description: >- - A secondary button component that can be used across the - site - readonly: true - - id: 6258612d1ee792848f805dcf - name: Card - group: Buttons - description: A button component that can be used across the site - readonly: true - - id: 68a2b1d1ee792848f805dcf - name: Nav - group: Buttons - description: A button component that can be used across the site - readonly: true - pagination: - limit: 20 - offset: 0 - total: 4 - get-content: - path: /sites/{site_id}/components/{component_id}/dom - method: GET - auth: - - OAuth2: - - components:read - docs: > - Get static content from a component definition. This includes text - nodes, image nodes, select nodes, text input nodes, submit button nodes, - and nested component instances. - - To retrieve dynamic content set by component properties, use the [get - component - properties](/data/reference/pages-and-components/components/get-properties) - endpoint. - - - If you do not provide a Locale ID in your request, the response - will return any content that can be localized from the Primary - locale. - - - Required scope | `components:read` - source: - openapi: ../../../openapi/referenced-specs/v2.yml - path-parameters: - site_id: - type: string - docs: Unique identifier for a Site - component_id: - type: string - docs: Unique identifier for a Component - display-name: Get Component Content - request: - name: ComponentsGetContentRequest - query-parameters: - localeId: - type: optional - docs: > - Unique identifier for a specific Locale. - - - [Lear more about - localization.](/data/v2.0.0/docs/working-with-localization) - branchId: - type: optional - docs: Scope the operation to work on a specific branch. - limit: - type: optional - docs: 'Maximum number of records to be returned (max limit: 100)' - offset: - type: optional - docs: >- - Offset used for pagination if the results have more than limit - records - response: - docs: Request was successful - type: root.ComponentDom - status-code: 200 - errors: - - root.BadRequestError - - root.UnauthorizedError - - root.NotFoundError - - root.TooManyRequestsError - - root.InternalServerError - examples: - - path-parameters: - site_id: 580e63e98c9a982ac9b8b741 - component_id: 8505ba55-ef72-629e-f85c-33e4b703d48b - query-parameters: - localeId: 65427cf400e02b306eaa04a0 - branchId: 68026fa68ef6dc744c75b833 - limit: 1 - offset: 1 - response: - body: - componentId: 69118560-d0bc-15fc-bbf8-b8fe5f6535b5 - nodes: - - id: id - text: {} - attributes: - key: value - type: text - - id: id - text: {} - attributes: - key: value - type: text - - id: id - image: {} - attributes: - key: value - type: image - - id: id - placeholder: placeholder - attributes: - key: value - type: text-input - - id: id - choices: - - value: value - text: text - attributes: - key: value - type: select - - id: id - value: value - waitingText: waitingText - attributes: - key: value - type: submit-button - - id: id - componentId: componentId - propertyOverrides: - - propertyId: 7dd14c08-2e96-8d3d-2b19-b5c03642a0f0 - type: component-instance - pagination: - limit: 7 - offset: 0 - total: 7 - update-content: - path: /sites/{site_id}/components/{component_id}/dom - method: POST - auth: - - OAuth2: - - components:write - docs: > - This endpoint updates content within a component defintion for - **secondary locales**. It supports updating up to 1000 nodes in a single - request. - - - Before making updates: - - 1. Use the [get component - content](/data/reference/pages-and-components/components/get-content) - endpoint to identify available content nodes and their types. - - 2. If your component definition has a component instance nested within - it, retrieve the nested component instance's properties that you'll - override using the [get component - properties](/data/reference/pages-and-components/components/get-properties) - endpoint. - - 3. DOM elements may include a `data-w-id` attribute. This attribute is - used by Webflow to maintain custom attributes and links across locales. - Always include the original `data-w-id` value in your update requests to - ensure consistent behavior across all locales. - - - - This endpoint is specifically for localizing component definitions. Ensure that the specified `localeId` is a valid **secondary locale** for the site otherwise the request will fail. - - - - Required scope | `components:write` - source: - openapi: ../../../openapi/referenced-specs/v2.yml - path-parameters: - site_id: - type: string - docs: Unique identifier for a Site - component_id: - type: string - docs: Unique identifier for a Component - display-name: Update Component Content - request: - name: ComponentDomWrite - query-parameters: - localeId: - type: optional - docs: > - Unique identifier for a specific Locale. - - - [Lear more about - localization.](/data/v2.0.0/docs/working-with-localization) - branchId: - type: optional - docs: Scope the operation to work on a specific branch. - body: - properties: - nodes: - docs: >- - List of DOM Nodes with the new content that will be updated in - each node. - type: list - content-type: application/json - response: - docs: Request was successful - type: ComponentsUpdateContentResponse - status-code: 200 - errors: - - root.BadRequestError - - root.UnauthorizedError - - root.ForbiddenError - - root.NotFoundError - - root.TooManyRequestsError - - root.InternalServerError - examples: - - path-parameters: - site_id: 580e63e98c9a982ac9b8b741 - component_id: 8505ba55-ef72-629e-f85c-33e4b703d48b - query-parameters: - localeId: 65427cf400e02b306eaa04a0 - branchId: 68026fa68ef6dc744c75b833 - request: - nodes: - - nodeId: a245c12d-995b-55ee-5ec7-aa36a6cad623 - text:

The Hitchhiker's Guide to the Galaxy

- - nodeId: a245c12d-995b-55ee-5ec7-aa36a6cad627 - text: >- -

Don't Panic!

Always know where your towel - is.

- - nodeId: a245c12d-995b-55ee-5ec7-aa36a6cad635 - choices: - - value: choice-1 - text: First choice - - value: choice-2 - text: Second choice - - nodeId: a245c12d-995b-55ee-5ec7-aa36a6cad642 - placeholder: Enter something here... - - nodeId: a245c12d-995b-55ee-5ec7-aa36a6cad671 - value: Submit - waitingText: Submitting... - - nodeId: a245c12d-995b-55ee-5ec7-aa36a6cad629 - propertyOverrides: - - propertyId: 7dd14c08-2e96-8d3d-2b19-b5c03642a0f0 - text:

Time is an illusion

- - propertyId: 7dd14c08-2e96-8d3d-2b19-b5c03642a0f1 - text: Life, the Universe and Everything - response: - body: - errors: - - errors - get-properties: - path: /sites/{site_id}/components/{component_id}/properties - method: GET - auth: - - OAuth2: - - components:read - docs: > - Get the default property values of a component definition. - - - If you do not include a `localeId` in your request, the response - will return any properties that can be localized from the Primary - locale. - - - Required scope | `components:read` - source: - openapi: ../../../openapi/referenced-specs/v2.yml - path-parameters: - site_id: - type: string - docs: Unique identifier for a Site - component_id: - type: string - docs: Unique identifier for a Component - display-name: Get Component Properties - request: - name: ComponentsGetPropertiesRequest - query-parameters: - localeId: - type: optional - docs: > - Unique identifier for a specific Locale. - - - [Lear more about - localization.](/data/v2.0.0/docs/working-with-localization) - branchId: - type: optional - docs: Scope the operation to work on a specific branch. - limit: - type: optional - docs: 'Maximum number of records to be returned (max limit: 100)' - offset: - type: optional - docs: >- - Offset used for pagination if the results have more than limit - records - response: - docs: Request was successful - type: root.ComponentProperties - status-code: 200 - errors: - - root.BadRequestError - - root.UnauthorizedError - - root.NotFoundError - - root.TooManyRequestsError - - root.InternalServerError - examples: - - path-parameters: - site_id: 580e63e98c9a982ac9b8b741 - component_id: 8505ba55-ef72-629e-f85c-33e4b703d48b - query-parameters: - localeId: 65427cf400e02b306eaa04a0 - branchId: 68026fa68ef6dc744c75b833 - limit: 1 - offset: 1 - response: - body: - componentId: 658205daa3e8206a523b5ad4 - properties: - - propertyId: a245c12d-995b-55ee-5ec7-aa36a6cad623 - type: Plain Text - label: Title - text: - text: The Hitchhiker's Guide to the Galaxy - - propertyId: a245c12d-995b-55ee-5ec7-aa36a6cad627 - type: Rich Text - label: Content - text: - html: >- -

Don't Panic!

Always know where your towel - is.

- pagination: - limit: 2 - offset: 0 - total: 2 - update-properties: - path: /sites/{site_id}/components/{component_id}/properties - method: POST - auth: - - OAuth2: - - components:write - docs: > - Update the default property values of a component definition in a - specificed locale. - - - Before making updates: - - 1. Use the [get component - properties](/data/reference/pages-and-components/components/get-properties) - endpoint to identify properties that can be updated in a secondary - locale. - - 2. Rich Text properties may include a `data-w-id` attribute. This - attribute is used by Webflow to maintain links across locales. Always - include the original `data-w-id` value in your update requests to ensure - consistent behavior across all locales. - - - The request requires a secondary locale ID. If a `localeId` is - missing, the request will not be processed and will result in an - error. - - - Required scope | `components:write` - source: - openapi: ../../../openapi/referenced-specs/v2.yml - path-parameters: - site_id: - type: string - docs: Unique identifier for a Site - component_id: - type: string - docs: Unique identifier for a Component - display-name: Update Component Properties - request: - name: ComponentPropertiesWrite - query-parameters: - localeId: - type: optional - docs: > - Unique identifier for a specific Locale. - - - [Lear more about - localization.](/data/v2.0.0/docs/working-with-localization) - branchId: - type: optional - docs: Scope the operation to work on a specific branch. - body: - properties: - properties: - docs: >- - A list of component properties to update within the specified - secondary locale. - type: list - content-type: application/json - response: - docs: Request was successful - type: ComponentsUpdatePropertiesResponse - status-code: 200 - errors: - - root.BadRequestError - - root.UnauthorizedError - - root.NotFoundError - - root.TooManyRequestsError - - root.InternalServerError - examples: - - path-parameters: - site_id: 580e63e98c9a982ac9b8b741 - component_id: 8505ba55-ef72-629e-f85c-33e4b703d48b - query-parameters: - localeId: 65427cf400e02b306eaa04a0 - branchId: 68026fa68ef6dc744c75b833 - request: - properties: - - propertyId: a245c12d-995b-55ee-5ec7-aa36a6cad623 - text: The Hitchhiker’s Guide to the Galaxy - - propertyId: a245c12d-995b-55ee-5ec7-aa36a6cad627 - text: >- -

Dont Panic!

Always know where your towel - is.

- response: - body: - errors: - - errors - source: - openapi: ../../../openapi/referenced-specs/v2.yml -types: - ComponentDomWriteNodesItem: - discriminated: false - union: - - type: root.TextNodeWrite - - type: root.ComponentInstanceNodePropertyOverridesWrite - - type: root.Select - - type: root.TextInputNodeWrite - - type: root.SubmitButtonNodeWrite - - type: root.SearchButtonNodeWrite - source: - openapi: ../../../openapi/referenced-specs/v2.yml - inline: true - ComponentsUpdateContentResponse: - properties: - errors: - docs: A list of error messages, if any. - type: list - source: - openapi: ../../../openapi/referenced-specs/v2.yml - ComponentPropertiesWritePropertiesItem: - properties: - propertyId: - type: string - docs: The ID of the property. - text: - type: string - docs: > - The new string or HTML value used to update the component property in - the secondary locale. - - - The provided value must be compatible with the type of the component - property. - - - For example, attempting to update a single-line plain-text property - with a multi-line - - value will result in an error. - source: - openapi: ../../../openapi/referenced-specs/v2.yml - inline: true - ComponentsUpdatePropertiesResponse: - properties: - errors: - docs: A list of error messages, if any. - type: list - source: - openapi: ../../../openapi/referenced-specs/v2.yml diff --git a/.mock/definition/ecommerce.yml b/.mock/definition/ecommerce.yml deleted file mode 100644 index 426869f..0000000 --- a/.mock/definition/ecommerce.yml +++ /dev/null @@ -1,45 +0,0 @@ -imports: - root: __package__.yml -service: - auth: false - base-path: '' - endpoints: - get-settings: - path: /sites/{site_id}/ecommerce/settings - method: GET - auth: - - OAuth2: - - ecommerce:read - docs: | - Retrieve ecommerce settings for a site. - - Required scope | `ecommerce:read` - source: - openapi: ../../../openapi/referenced-specs/v2.yml - path-parameters: - site_id: - type: string - docs: Unique identifier for a Site - display-name: Get Ecommerce Settings - response: - docs: Request was successful - type: root.EcommerceSettings - status-code: 200 - errors: - - root.BadRequestError - - root.UnauthorizedError - - root.ForbiddenError - - root.NotFoundError - - root.ConflictError - - root.TooManyRequestsError - - root.InternalServerError - examples: - - path-parameters: - site_id: 580e63e98c9a982ac9b8b741 - response: - body: - siteId: 5eb0b5583bf24e2d3a488969 - createdOn: '2018-10-04T15:21:02Z' - defaultCurrency: USD - source: - openapi: ../../../openapi/referenced-specs/v2.yml diff --git a/.mock/definition/forms.yml b/.mock/definition/forms.yml deleted file mode 100644 index 08f2926..0000000 --- a/.mock/definition/forms.yml +++ /dev/null @@ -1,399 +0,0 @@ -imports: - root: __package__.yml -service: - auth: false - base-path: '' - endpoints: - list: - path: /sites/{site_id}/forms - method: GET - auth: - - OAuth2: - - forms:read - docs: | - List forms for a given site. - - Required scope | `forms:read` - source: - openapi: ../../../openapi/referenced-specs/v2.yml - path-parameters: - site_id: - type: string - docs: Unique identifier for a Site - display-name: List Forms - request: - name: FormsListRequest - query-parameters: - limit: - type: optional - docs: 'Maximum number of records to be returned (max limit: 100)' - offset: - type: optional - docs: >- - Offset used for pagination if the results have more than limit - records - response: - docs: Request was successful - type: root.FormList - status-code: 200 - errors: - - root.BadRequestError - - root.UnauthorizedError - - root.ForbiddenError - - root.NotFoundError - - root.ConflictError - - root.TooManyRequestsError - - root.InternalServerError - examples: - - path-parameters: - site_id: 580e63e98c9a982ac9b8b741 - query-parameters: - limit: 1 - offset: 1 - response: - body: - forms: - - displayName: Email Form - createdOn: '2016-10-24T19:41:29Z' - lastUpdated: '2016-10-24T19:43:17Z' - fields: - '0': - displayName: Email - placeholder: Enter your email - userVisible: true - '1': - displayName: Email - placeholder: Enter your email - userVisible: true - responseSettings: - redirectUrl: https://example.com - redirectMethod: GET - redirectAction: POST https://example.com - sendEmailConfirmation: true - id: 589a331aa51e760df7ccb89e - siteId: 580e63e98c9a982ac9b8b741 - siteDomainId: 6419db964a9c436a4baf6248 - pageId: 6419db964a9c43f6a3af6348 - pageName: Home - formElementId: 4e038d2c-6a1e-4953-7be9-a59a2b453177 - workspaceId: 580e63fc8c9a982ac9b8b744 - - displayName: Name Form - createdOn: '2016-10-24T19:41:29Z' - lastUpdated: '2016-10-24T19:43:17Z' - fields: - '0': - displayName: Email - placeholder: Enter your email - userVisible: true - responseSettings: - redirectUrl: https://example.com - redirectMethod: GET - redirectAction: POST https://example.com - sendEmailConfirmation: false - id: 580ff8d7ba3e45ba9fe588e9 - siteId: 580e63e98c9a982ac9b8b741 - siteDomainId: 6419db964a9c436a4baf6248 - pageId: 6419db964a9c43f6a3af6348 - pageName: Home - formElementId: 4e038d2c-6a1e-4953-7be9-a59a2b453177 - workspaceId: 580e63fc8c9a982ac9b8b744 - pagination: - limit: 25 - offset: 0 - total: 2 - get: - path: /forms/{form_id} - method: GET - auth: - - OAuth2: - - forms:read - docs: | - Get information about a given form. - - Required scope | `forms:read` - source: - openapi: ../../../openapi/referenced-specs/v2.yml - path-parameters: - form_id: - type: string - docs: Unique identifier for a Form - display-name: Get Form Schema - response: - docs: Request was successful - type: root.Form - status-code: 200 - errors: - - root.BadRequestError - - root.UnauthorizedError - - root.ForbiddenError - - root.NotFoundError - - root.TooManyRequestsError - - root.InternalServerError - examples: - - path-parameters: - form_id: 580e63e98c9a982ac9b8b741 - response: - body: - displayName: Email Form - createdOn: '2016-10-24T19:41:29Z' - lastUpdated: '2016-10-24T19:43:17Z' - fields: - 660d5bcc9c0772150459dfb1: - displayName: Name - type: Plain - placeholder: Enter your email - userVisible: true - 589a331aa51e760df7ccb89d: - displayName: Email - type: Email - placeholder: Enter your email - userVisible: true - responseSettings: - redirectUrl: https://example.com - redirectMethod: GET - redirectAction: POST https://example.com - sendEmailConfirmation: true - id: 589a331aa51e760df7ccb89e - siteId: 580e63e98c9a982ac9b8b741 - siteDomainId: 6419db964a9c436a4baf6248 - pageId: 6419db964a9c43f6a3af6348 - pageName: Home - formElementId: 4e038d2c-6a1e-4953-7be9-a59a2b453177 - workspaceId: 580e63fc8c9a982ac9b8b744 - list-submissions: - path: /forms/{form_id}/submissions - method: GET - auth: - - OAuth2: - - forms:read - docs: | - List form submissions for a given form - - - When a form is used in a component definition, each instance of the form is considered a unique form. - - To get a combined list of submissions for a form that appears across multiple component instances, use the [List Form Submissions by Site](/data/reference/forms/form-submissions/list-submissions-by-site) endpoint. - - - Required scope | `forms:read` - source: - openapi: ../../../openapi/referenced-specs/v2.yml - path-parameters: - form_id: - type: string - docs: Unique identifier for a Form - display-name: List Form Submissions - request: - name: FormsListSubmissionsRequest - query-parameters: - offset: - type: optional - docs: >- - Offset used for pagination if the results have more than limit - records - limit: - type: optional - docs: 'Maximum number of records to be returned (max limit: 100)' - response: - docs: Request was successful - type: root.FormSubmissionList - status-code: 200 - errors: - - root.BadRequestError - - root.UnauthorizedError - - root.ForbiddenError - - root.NotFoundError - - root.TooManyRequestsError - - root.InternalServerError - examples: - - path-parameters: - form_id: 580e63e98c9a982ac9b8b741 - query-parameters: - offset: 1 - limit: 1 - response: - body: - formSubmissions: - - id: 6321ca84df3949bfc6752327 - displayName: Sample Form - siteId: 62749158efef318abc8d5a0f - workspaceId: 62749158efef318abc8d5a0f - dateSubmitted: '2022-09-14T12:35:16Z' - formResponse: - First Name: Arthur - Last Name: Dent - - id: 660d64fabf6e0a0d4edab981 - displayName: Sample Form - siteId: 62749158efef318abc8d5a0f - workspaceId: 62749158efef318abc8d5a0f - dateSubmitted: '2022-09-14T12:35:16Z' - formResponse: - First Name: Ford - Last Name: Prefect - pagination: - limit: 25 - offset: 0 - total: 2 - get-submission: - path: /form_submissions/{form_submission_id} - method: GET - auth: - - OAuth2: - - forms:read - docs: | - Get information about a given form submissio. - - Required scope | `forms:read` - source: - openapi: ../../../openapi/referenced-specs/v2.yml - path-parameters: - form_submission_id: - type: string - docs: Unique identifier for a Form Submission - display-name: Get Form Submission - response: - docs: Request was successful - type: root.FormSubmission - status-code: 200 - errors: - - root.BadRequestError - - root.UnauthorizedError - - root.ForbiddenError - - root.NotFoundError - - root.TooManyRequestsError - - root.InternalServerError - examples: - - path-parameters: - form_submission_id: 580e63e98c9a982ac9b8b741 - response: - body: - id: 6321ca84df3949bfc6752327 - displayName: Sample Form - siteId: 62749158efef318abc8d5a0f - workspaceId: 62749158efef318abc8d5a0f - dateSubmitted: '2022-09-14T12:35:16Z' - formResponse: - First Name: Arthur - Last Name: Dent - delete-submission: - path: /form_submissions/{form_submission_id} - method: DELETE - auth: - - OAuth2: - - forms:write - docs: | - Delete a form submission - - - Required scope | `forms:write` - source: - openapi: ../../../openapi/referenced-specs/v2.yml - path-parameters: - form_submission_id: - type: string - docs: Unique identifier for a Form Submission - display-name: Delete Form Submission - errors: - - root.BadRequestError - - root.UnauthorizedError - - root.ForbiddenError - - root.NotFoundError - - root.ConflictError - - root.TooManyRequestsError - - root.InternalServerError - examples: - - path-parameters: - form_submission_id: 580e63e98c9a982ac9b8b741 - update-submission: - path: /form_submissions/{form_submission_id} - method: PATCH - auth: - - OAuth2: - - forms:write - docs: | - Update hidden fields on a form submission - - Required scope | `forms:write` - source: - openapi: ../../../openapi/referenced-specs/v2.yml - path-parameters: - form_submission_id: - type: string - docs: Unique identifier for a Form Submission - display-name: Modify Form Submission - request: - name: FormsUpdateSubmissionRequest - body: - properties: - formSubmissionData: - type: optional> - docs: >- - An existing **hidden field** defined on the form schema, and the - corresponding value to set - content-type: application/json - response: - docs: Request was successful - type: root.FormSubmission - status-code: 200 - errors: - - root.BadRequestError - - root.UnauthorizedError - - root.ForbiddenError - - root.NotFoundError - - root.ConflictError - - root.TooManyRequestsError - - root.InternalServerError - examples: - - path-parameters: - form_submission_id: 580e63e98c9a982ac9b8b741 - request: {} - response: - body: - id: 6321ca84df3949bfc6752327 - displayName: Sample Form - siteId: 62749158efef318abc8d5a0f - workspaceId: 62749158efef318abc8d5a0f - dateSubmitted: '2022-09-14T12:35:16Z' - formResponse: - First Name: Arthur - Last Name: Dent - source: - openapi: ../../../openapi/referenced-specs/v2.yml - display-name: Forms -docs: Forms are forms that are created on your Webflow site. -webhooks: - form_submission: - audiences: [] - method: POST - display-name: Form Submission - headers: {} - payload: root.FormSubmissionTrigger - examples: - - payload: - triggerType: form_submission - payload: - name: Contact Us - siteId: 65427cf400e02b306eaa049c - data: - First Name: Zaphod - Last Name: Beeblebrox - email: zaphod@heartofgold.ai - Phone Number: 15550000000 - schema: - - fieldName: First Name - fieldType: FormTextInput - fieldElementId: 285042f7-d554-dc7f-102c-aa10d6a2d2c4 - - fieldName: Last Name - fieldType: FormTextInput - fieldElementId: 285042f7-d554-dc7f-102c-aa10d6a2d2c5 - - fieldName: email - fieldType: FormTextInput - fieldElementId: 285042f7-d554-dc7f-102c-aa10d6a2d2c6 - - fieldName: Phone Number - fieldType: FormTextInput - fieldElementId: 285042f7-d554-dc7f-102c-aa10d6a2d2c7 - submittedAt: '2022-09-14T12:35:16.117Z' - id: 6321ca84df3949bfc6752327 - formId: 65429eadebe8a9f3a30f62d0 - formElementId: 4e038d2c-6a1e-4953-7be9-a59a2b453177 - docs: Information about a form that was subitted diff --git a/.mock/definition/inventory.yml b/.mock/definition/inventory.yml deleted file mode 100644 index 139fa04..0000000 --- a/.mock/definition/inventory.yml +++ /dev/null @@ -1,152 +0,0 @@ -imports: - root: __package__.yml -service: - auth: false - base-path: '' - endpoints: - list: - path: /collections/{sku_collection_id}/items/{sku_id}/inventory - method: GET - auth: - - OAuth2: - - ecommerce:read - docs: | - List the current inventory levels for a particular SKU item. - - Required scope | `ecommerce:read` - source: - openapi: ../../../openapi/referenced-specs/v2.yml - path-parameters: - sku_collection_id: - type: string - docs: >- - Unique identifier for a SKU collection. Use the List Collections API - to find this ID. - sku_id: - type: string - docs: Unique identifier for a SKU - display-name: List Inventory - response: - docs: Request was successful - type: root.InventoryItem - status-code: 200 - errors: - - root.BadRequestError - - root.UnauthorizedError - - root.ForbiddenError - - root.NotFoundError - - root.ConflictError - - root.TooManyRequestsError - - root.InternalServerError - examples: - - path-parameters: - sku_collection_id: 6377a7c4b7a79608c34a46f7 - sku_id: 5e8518516e147040726cc415 - response: - body: - id: 5bfedb42bab0ad90fa7dad39 - quantity: 100 - inventoryType: finite - update: - path: /collections/{sku_collection_id}/items/{sku_id}/inventory - method: PATCH - auth: - - OAuth2: - - ecommerce:write - docs: > - Updates the current inventory levels for a particular SKU item. - - - Updates may be given in one or two methods, absolutely or - incrementally. - - - Absolute updates are done by setting `quantity` directly. - - - Incremental updates are by specifying the inventory delta in - `updateQuantity` which is then added to the `quantity` stored on the - server. - - - Required scope | `ecommerce:write` - source: - openapi: ../../../openapi/referenced-specs/v2.yml - path-parameters: - sku_collection_id: - type: string - docs: >- - Unique identifier for a SKU collection. Use the List Collections API - to find this ID. - sku_id: - type: string - docs: Unique identifier for a SKU - display-name: Update Item Inventory - request: - name: InventoryUpdateRequest - body: - properties: - inventoryType: - type: InventoryUpdateRequestInventoryType - docs: infinite or finite - updateQuantity: - type: optional - docs: Adds this quantity to currently store quantity. Can be negative. - quantity: - type: optional - docs: Immediately sets quantity to this value. - content-type: application/json - response: - docs: Request was successful - type: root.InventoryItem - status-code: 200 - errors: - - root.BadRequestError - - root.UnauthorizedError - - root.ForbiddenError - - root.NotFoundError - - root.ConflictError - - root.TooManyRequestsError - - root.InternalServerError - examples: - - path-parameters: - sku_collection_id: 6377a7c4b7a79608c34a46f7 - sku_id: 5e8518516e147040726cc415 - request: - inventoryType: infinite - response: - body: - id: 5bfedb42bab0ad90fa7dad39 - quantity: 100 - inventoryType: finite - source: - openapi: ../../../openapi/referenced-specs/v2.yml - display-name: Inventory -docs: Inventory is the stock of e-commerce items in your Webflow site. -types: - InventoryUpdateRequestInventoryType: - enum: - - infinite - - finite - docs: infinite or finite - inline: true - source: - openapi: ../../../openapi/referenced-specs/v2.yml - EcommInventoryChangedPayload: - properties: - triggerType: optional> - payload: optional - source: - openapi: ../../../openapi/referenced-specs/v2.yml -webhooks: - ecomm_inventory_changed: - audiences: [] - method: POST - display-name: Updated eComm Inventory - headers: {} - payload: EcommInventoryChangedPayload - examples: - - name: WebhookInventoryChanged - payload: - triggerType: ecomm_inventory_changed - payload: - \$ref: ./schemas/inventory.yml#/InventoryItem/example - docs: Information about updated ecommerce inventory values diff --git a/.mock/definition/items.yml b/.mock/definition/items.yml deleted file mode 100644 index 634f1f7..0000000 --- a/.mock/definition/items.yml +++ /dev/null @@ -1,112 +0,0 @@ -imports: - root: __package__.yml -webhooks: - collection_item_created: - audiences: [] - method: POST - display-name: Collection Item Created - headers: {} - payload: root.CollectionItemCreated - examples: - - payload: - triggerType: collection_item_created - payload: - id: 580e64008c9a982ac9b8b754 - workspaceId: 625860a7a6c16d624927122f - siteId: 65427cf400e02b306eaa049c - collectionId: 664243617fcc8b464b23c4ee - lastPublished: '2023-03-17T18:47:35Z' - lastUpdated: '2023-03-17T18:47:35Z' - createdOn: '2023-03-17T18:47:35Z' - isArchived: false - isDraft: false - fieldData: - name: Pan-Galactic Gargle Blaster - slug: pan-galactic-gargle-blaster - docs: Information about a new collection item - collection_item_changed: - audiences: [] - method: POST - display-name: Collection Item Updated - headers: {} - payload: root.CollectionItemChanged - examples: - - payload: - triggerType: collection_item_changed - payload: - id: id - workspaceId: workspaceId - siteId: siteId - collectionId: collectionId - fieldData: - name: name - slug: slug - docs: Information about an updated collection item - collection_item_deleted: - audiences: [] - method: POST - display-name: Collection Item Deleted - headers: {} - payload: root.CollectionItemRemoved - examples: - - payload: - triggerType: collection_item_deleted - payload: - id: 66424365e972c886137a1cf1 - siteId: 65427cf400e02b306eaa049c - workspaceId: 625860a7a6c16d624927122f - collectionId: 664243617fcc8b464b23c4ee - cmsLocaleId: 681442a144bb80bd00480fda - lastUpdated: '2025-05-28T04:44:33Z' - createdOn: '2025-05-28T04:27:12Z' - isArchived: false - isDraft: false - fieldData: - name: Earth - slug: earth - description: Mostly harmless - color: '#0000FF' - type: planet - galaxy: Milky Way - docs: Information about a deleted collection item - collection_item_published: - audiences: [] - method: POST - display-name: Collection Item Published - headers: {} - payload: root.CollectionItemPublished - examples: - - payload: - triggerType: collection_item_published - payload: - id: 6321ca84df3949bfc6752327 - siteId: 65427cf400e02b306eaa049c - workspaceId: 625860a7a6c16d624927122f - collectionId: 664243617fcc8b464b23c4ee - cmsLocaleId: 681442a144bb80bd00480fda - docs: Information about a collection item that was published - collection_item_unpublished: - audiences: [] - method: POST - display-name: Collection Item Unpublished - headers: {} - payload: root.CollectionItemUnpublished - examples: - - payload: - triggerType: collection_item_unpublished - payload: - id: 66424365e972c886137a1cf1 - siteId: 65427cf400e02b306eaa049c - workspaceId: 625860a7a6c16d624927122f - collectionId: 664243617fcc8b464b23c4ee - cmsLocaleId: 681442a144bb80bd00480fda - lastUpdated: '2025-05-28T04:44:33Z' - createdOn: '2025-05-28T04:27:12Z' - isArchived: false - isDraft: false - fieldData: - name: Anna Gunn - slug: anna-gunn - _locale: 681442a144bb80bd00480fda - _noSearch: false - docs: Information about a collection item that was removed from the live site diff --git a/.mock/definition/orders.yml b/.mock/definition/orders.yml deleted file mode 100644 index 1f9711e..0000000 --- a/.mock/definition/orders.yml +++ /dev/null @@ -1,1971 +0,0 @@ -types: - OrdersListRequestStatus: - enum: - - pending - - refunded - - value: dispute-lost - name: DisputeLost - - fulfilled - - disputed - - unfulfilled - source: - openapi: ../../../openapi/referenced-specs/v2.yml - OrdersRefundRequestReason: - enum: - - duplicate - - fraudulent - - requested - docs: The reason for the refund - inline: true - source: - openapi: ../../../openapi/referenced-specs/v2.yml -imports: - root: __package__.yml -service: - auth: false - base-path: '' - endpoints: - list: - path: /sites/{site_id}/orders - method: GET - auth: - - OAuth2: - - ecommerce:read - docs: | - List all orders created for a given site. - - Required scope | `ecommerce:read` - source: - openapi: ../../../openapi/referenced-specs/v2.yml - path-parameters: - site_id: - type: string - docs: Unique identifier for a Site - display-name: List Orders - request: - name: OrdersListRequest - query-parameters: - status: - type: optional - docs: Filter the orders by status - offset: - type: optional - docs: >- - Offset used for pagination if the results have more than limit - records - limit: - type: optional - docs: 'Maximum number of records to be returned (max limit: 100)' - response: - docs: Request was successful - type: root.OrderList - status-code: 200 - errors: - - root.BadRequestError - - root.UnauthorizedError - - root.ForbiddenError - - root.NotFoundError - - root.ConflictError - - root.TooManyRequestsError - - root.InternalServerError - examples: - - path-parameters: - site_id: 580e63e98c9a982ac9b8b741 - query-parameters: - status: pending - offset: 1 - limit: 1 - response: - body: - orders: - - orderId: 7c1-9fd - status: unfulfilled - comment: >- - Customer requested gift wrapping and a personalized note - saying: Happy Birthday, Ford! 🎉 Please ensure the item is - packed with extra bubble wrap for safe transit. - orderComment: >- - Please gift wrap with a personal note saying "Happy - Birthday, Ford! 🎉 - acceptedOn: '2024-04-10T13:16:21Z' - fulfilledOn: '2018-12-03T22:06:15Z' - refundedOn: '2018-12-03T22:06:15Z' - disputedOn: '2018-12-03T22:06:15Z' - disputeUpdatedOn: '2018-12-03T22:06:15Z' - disputeLastStatus: warning_needs_response - customerPaid: - unit: USD - value: '5892' - string: \$ 211.55 USD - netAmount: - unit: USD - value: '5892' - string: \$ 200.89 USD - applicationFee: - unit: USD - value: '5892' - string: \$ 4.23 USD - allAddresses: - - type: billing - addressee: Arthur Dent - line1: 20 W 34th St - line2: Empire State Building - city: New York - state: New York - country: US - postalCode: '10118' - - type: shipping - addressee: Arthur Dent - line1: 20 W 34th St - line2: Empire State Building - city: New York - state: New York - country: US - postalCode: '10118' - shippingAddress: - type: shipping - japanType: kanji - addressee: Arthur Dent - line1: 20 W 34th St - line2: Empire State Building - city: New York - state: New York - country: US - postalCode: '10118' - billingAddress: - type: billing - addressee: Arthur Dent - line1: 20 W 34th St - line2: Empire State Building - city: New York - state: New York - country: US - postalCode: '10118' - shippingProvider: Shipping Company, Co. - shippingTracking: tr00000000002 - shippingTrackingURL: https://www.shippingcompany.com/tracking/tr00000000002 - customerInfo: - fullName: Arthur Dent - email: arthur.dent@example.com - purchasedItems: - - count: 2 - rowTotal: - unit: USD - value: '5892' - string: \$ 111.22 USD - productId: 66072fb61b89448912e26791 - productName: Luxurious Fresh Ball - productSlug: luxurious-fresh-ball - variantId: 66072fb71b89448912e2683f - variantName: 'Luxurious Fresh Ball Generic: Bronze, Practical: Plastic' - variantSlug: luxurious-fresh-ball-generic-bronze-practical-plastic - variantSKU: luxurious-fresh-ball-generic-bronze-practical-plastic - variantImage: - url: >- - https://dev-assets.website-files.com/66072f39417a2a35b2589cc7/66072fb51b89448912e2672c_image14.jpeg - variantPrice: - unit: USD - value: '5892' - string: \$ 55.61 USD - weight: 11 - width: 82 - height: 70 - length: 9 - - count: 1 - rowTotal: - unit: USD - value: '5892' - string: \$ 83.09 USD - productId: 66072fb61b89448912e2678b - productName: Incredible Bronze Towels - productSlug: incredible-bronze-towels - variantId: 66072fb71b89448912e2681e - variantName: >- - Incredible Bronze Towels Sleek: Frozen, Incredible: - Metal - variantSlug: incredible-bronze-towels-sleek-frozen-incredible-metal - variantSKU: incredible-bronze-towels-sleek-frozen-incredible-metal - variantImage: - url: >- - https://dev-assets.website-files.com/66072f39417a2a35b2589cc7/66072fb51b89448912e26729_image16.jpeg - variantPrice: - unit: USD - value: '5892' - string: \$ 83.09 USD - weight: 5 - width: 19 - height: 72 - length: 18 - purchasedItemsCount: 3 - stripeDetails: - subscriptionId: sub_1J6xwG2eZvKYlo2CXu9Zt0Tn - paymentMethod: pm_1P410gJYFi4lcbXWbeKghqjK - paymentIntentId: pi_3P410iJYFi4lcbXW0EKKgcVg - customerId: cus_Ptod8KJBiiPgnH - chargeId: ch_3P410iJYFi4lcbXW0DxUkzCH - refundReason: requested_by_customer - stripeCard: - last4: '4242' - brand: Visa - ownerName: Arthur Dent - expires: - year: 2025 - month: 4 - paypalDetails: - orderId: 1a2b3c4d5e6f7g8h9i0j - payerId: 9k8j7i6h5g4f3e2d1c0b - captureId: qwe123rty456uio789p - refundId: abcde12345fghij67890 - refundReason: Customer requested refund - disputeId: zxcvbnm987poiuytrewq - customData: - - key: value - metadata: - isBuyNow: false - isCustomerDeleted: false - isShippingRequired: false - hasDownloads: false - paymentProcessor: stripe - totals: - extras: - - type: tax - name: State Taxes - description: CA Taxes (6.25%) - price: - unit: USD - value: '5892' - string: \$3.44 - downloadFiles: - - id: 5e9a5eba75e0ac242e1b6f64 - name: The modern web design process - Webflow Ebook.pdf - url: >- - https://webflow.com/dashboard/download-digital-product?payload=5d93ba5e38c6b0160ab711d3;e7634a;5eb1aac72912ec06f561278c;5e9a5eba75e0ac242e1b6f63:ka2nehxy:4a1ee0a632feaab94294350087215ed89533f2f530903e3b933b638940e921aa - - orderId: fc7-128 - status: refunded - comment: Example comment to myself - orderComment: '' - acceptedOn: '2024-03-29T21:29:21Z' - fulfilledOn: '2018-12-03T22:06:15Z' - refundedOn: '2024-04-08T18:25:04Z' - disputedOn: '2018-12-03T22:06:15Z' - disputeUpdatedOn: '2018-12-03T22:06:15Z' - disputeLastStatus: warning_needs_response - customerPaid: - unit: USD - value: '5892' - string: \$ 118.73 USD - netAmount: - unit: USD - value: '5892' - string: \$ 112.62 USD - applicationFee: - unit: USD - value: '5892' - string: \$ 2.37 USD - allAddresses: - - type: billing - addressee: Arthur Dent - line1: 20 W 34th St - line2: Empire State Building - city: New York - state: New York - country: US - postalCode: '10118' - - type: shipping - addressee: Arthur Dent - line1: 20 W 34th St - line2: Empire State Building - city: New York - state: New York - country: US - postalCode: '10118' - shippingAddress: - type: shipping - addressee: Arthur Dent - line1: 20 W 34th St - line2: Empire State Building - city: New York - state: New York - country: US - postalCode: '10118' - billingAddress: - type: billing - addressee: Arthur Dent - line1: 20 W 34th St - line2: Empire State Building - city: New York - state: New York - country: US - postalCode: '10118' - shippingProvider: Shipping Company, Co. - shippingTracking: tr00000000001 - shippingTrackingURL: https://www.shippingcompany.com/tracking/tr00000000001 - customerInfo: - fullName: Arthur Dent - email: arthur.dent@example.com - purchasedItems: - - count: 1 - rowTotal: - unit: USD - value: '5892' - string: \$ 55.61 USD - productId: 66072fb61b89448912e26791 - productName: Luxurious Fresh Ball - productSlug: luxurious-fresh-ball - variantId: 66072fb71b89448912e2683f - variantName: 'Luxurious Fresh Ball Generic: Bronze, Practical: Plastic' - variantSlug: luxurious-fresh-ball-generic-bronze-practical-plastic - variantSKU: luxurious-fresh-ball-generic-bronze-practical-plastic - variantImage: - url: >- - https://dev-assets.website-files.com/66072f39417a2a35b2589cc7/66072fb51b89448912e2672c_image14.jpeg - variantPrice: - unit: USD - value: '5892' - string: \$ 55.61 USD - weight: 11 - width: 82 - height: 70 - length: 9 - - count: 1 - rowTotal: - unit: USD - value: '5892' - string: \$ 53.44 USD - productId: 66072fb61b89448912e26799 - productName: Recycled Steel Gloves - productSlug: recycled-steel-gloves - variantId: 66072fb91b89448912e26ab9 - variantName: >- - Recycled Steel Gloves Electronic: Granite, Handcrafted: - grey - variantSlug: >- - recycled-steel-gloves-electronic-granite-handcrafted-grey - variantSKU: >- - recycled-steel-gloves-electronic-granite-handcrafted-grey - variantImage: - url: >- - https://dev-assets.website-files.com/66072f39417a2a35b2589cc7/66072fb51b89448912e2671e_image2.jpeg - variantPrice: - unit: USD - value: '5892' - string: \$ 53.44 USD - weight: 38 - width: 76 - height: 85 - length: 40 - purchasedItemsCount: 2 - stripeDetails: - subscriptionId: sub_1J6xwG2eZvKYlo2CXu9Zt0Tn - paymentMethod: pm_1OzmzBJYFi4lcbXWHKNdXU7j - paymentIntentId: pi_3OzmzDJYFi4lcbXW1hTBW6ft - customerId: cus_PpRsNHwWdUoRKR - chargeId: ch_3OzmzDJYFi4lcbXW1ndkkrH2 - refundId: re_3OzmzDJYFi4lcbXW1kFAmlBk - refundReason: fraudulent - stripeCard: - last4: '4242' - brand: Visa - ownerName: Arthur Dent - expires: - year: 2024 - month: 4 - paypalDetails: - orderId: 1a2b3c4d5e6f7g8h9i0j - payerId: 9k8j7i6h5g4f3e2d1c0b - captureId: qwe123rty456uio789p - refundId: abcde12345fghij67890 - refundReason: Customer requested refund - disputeId: zxcvbnm987poiuytrewq - customData: - - key: value - metadata: - isBuyNow: false - isCustomerDeleted: false - isShippingRequired: true - hasDownloads: false - paymentProcessor: stripe - totals: - subtotal: - unit: USD - value: '5892' - string: \$ 109.05 USD - extras: - - type: tax - name: State Taxes - description: NY Taxes (4.00%) - price: - unit: USD - value: '5892' - string: \$ 4.36 USD - - type: tax - name: City Taxes - description: NEW YORK Taxes (4.88%) - price: - unit: USD - value: '5892' - string: \$ 5.32 USD - - type: shipping - name: Flat - description: '' - price: - unit: USD - value: '5892' - string: \$ 0.00 USD - total: - unit: USD - value: '5892' - string: \$ 118.73 USD - downloadFiles: - - id: 5e9a5eba75e0ac242e1b6f64 - name: New product guide - url: >- - https://webflow.com/dashboard/download-digital-product?payload=5d93ba5e38c6b0160ab711d3;e7634a;5eb1aac72912ec06f561278c;5e9a5eba75e0ac242e1b6f63:ka2nehxy:4a1ee0a632feaab94294350087215ed89533f2f530903e3b933b638940e921aa - pagination: - limit: 100 - offset: 0 - total: 2 - get: - path: /sites/{site_id}/orders/{order_id} - method: GET - auth: - - OAuth2: - - ecommerce:read - docs: | - Retrieve a single product by its ID. All of its SKUs will also be - retrieved. - - Required scope | `ecommerce:read` - source: - openapi: ../../../openapi/referenced-specs/v2.yml - path-parameters: - site_id: - type: string - docs: Unique identifier for a Site - order_id: - type: string - docs: Unique identifier for an Order - display-name: Get Order - response: - docs: Request was successful - type: root.Order - status-code: 200 - errors: - - root.BadRequestError - - root.UnauthorizedError - - root.ForbiddenError - - root.NotFoundError - - root.ConflictError - - root.TooManyRequestsError - - root.InternalServerError - examples: - - path-parameters: - site_id: 580e63e98c9a982ac9b8b741 - order_id: 5e8518516e147040726cc415 - response: - body: - orderId: fc7-128 - status: refunded - comment: >- - Customer requested gift wrapping and a personalized note saying: - Happy Birthday, Ford! 🎉 Please ensure the item is packed with - extra bubble wrap for safe transit. - orderComment: >- - Please gift wrap with a personal note saying "Happy Birthday, - Ford! 🎉 - acceptedOn: '2024-03-29T21:29:21Z' - fulfilledOn: '2024-03-29T21:29:21Z' - refundedOn: '2024-04-08T18:25:04Z' - disputedOn: '2024-03-29T21:29:21Z' - disputeUpdatedOn: '2024-03-29T21:29:21Z' - disputeLastStatus: charge_refunded - customerPaid: - unit: USD - value: '5892' - string: \$ 118.73 USD - netAmount: - unit: USD - value: '5892' - string: \$ 112.62 USD - applicationFee: - unit: USD - value: '5892' - string: \$ 2.37 USD - allAddresses: - - type: billing - japanType: kana - addressee: Arthur Dent - line1: 20 W 34th St - line2: Empire State Building - city: New York - state: New York - country: US - postalCode: '10118' - - type: shipping - japanType: kana - addressee: Arthur Dent - line1: 20 W 34th St - line2: Empire State Building - city: New York - state: New York - country: US - postalCode: '10118' - shippingAddress: - type: shipping - japanType: kanji - addressee: Arthur Dent - line1: 20 W 34th St - line2: Empire State Building - city: New York - state: New York - country: US - postalCode: '10118' - billingAddress: - type: billing - japanType: kana - addressee: Arthur Dent - line1: 20 W 34th St - line2: Empire State Building - city: New York - state: New York - country: US - postalCode: '10118' - shippingProvider: Shipping Company, Co. - shippingTracking: tr00000000001 - shippingTrackingURL: https://www.shippingcompany.com/tracking/tr00000000001 - customerInfo: - fullName: Arthur Dent - email: arthur.dent@example.com - purchasedItems: - - count: 1 - rowTotal: - unit: USD - value: '5892' - string: \$ 55.61 USD - productId: 66072fb61b89448912e26791 - productName: Luxurious Fresh Ball - productSlug: luxurious-fresh-ball - variantId: 66072fb71b89448912e2683f - variantName: 'Luxurious Fresh Ball Generic: Bronze, Practical: Plastic' - variantSlug: luxurious-fresh-ball-generic-bronze-practical-plastic - variantSKU: luxurious-fresh-ball-generic-bronze-practical-plastic - variantImage: - url: >- - https://dev-assets.website-files.com/66072f39417a2a35b2589cc7/66072fb51b89448912e2672c_image14.jpeg - variantPrice: - unit: USD - value: '5892' - string: \$ 55.61 USD - weight: 11 - width: 82 - height: 70 - length: 9 - - count: 1 - rowTotal: - unit: USD - value: '5892' - string: \$ 53.44 USD - productId: 66072fb61b89448912e26799 - productName: Recycled Steel Gloves - productSlug: recycled-steel-gloves - variantId: 66072fb91b89448912e26ab9 - variantName: 'Recycled Steel Gloves Electronic: Granite, Handcrafted: grey' - variantSlug: recycled-steel-gloves-electronic-granite-handcrafted-grey - variantSKU: recycled-steel-gloves-electronic-granite-handcrafted-grey - variantImage: - url: >- - https://dev-assets.website-files.com/66072f39417a2a35b2589cc7/66072fb51b89448912e2671e_image2.jpeg - variantPrice: - unit: USD - value: '5892' - string: \$ 53.44 USD - weight: 38 - width: 76 - height: 85 - length: 40 - purchasedItemsCount: 2 - stripeDetails: - subscriptionId: sub_1J6xwG2eZvKYlo2CXu9Zt0Tn - paymentMethod: pm_1OzmzBJYFi4lcbXWHKNdXU7j - paymentIntentId: pi_3OzmzDJYFi4lcbXW1hTBW6ft - customerId: cus_PpRsNHwWdUoRKR - chargeId: ch_3OzmzDJYFi4lcbXW1ndkkrH2 - disputeId: disputeId - refundId: re_3OzmzDJYFi4lcbXW1kFAmlBk - refundReason: fraudulent - stripeCard: - last4: '4242' - brand: Visa - ownerName: Arthur Dent - expires: - year: 2024 - month: 4 - paypalDetails: - orderId: 1a2b3c4d5e6f7g8h9i0j - payerId: 9k8j7i6h5g4f3e2d1c0b - captureId: qwe123rty456uio789p - refundId: abcde12345fghij67890 - refundReason: Customer requested refund - disputeId: zxcvbnm987poiuytrewq - customData: - - key: value - metadata: - isBuyNow: false - isCustomerDeleted: false - isShippingRequired: true - hasDownloads: false - paymentProcessor: stripe - totals: - subtotal: - unit: USD - value: '5892' - string: \$ 109.05 USD - extras: - - type: tax - name: State Taxes - description: NY Taxes (4.00%) - price: - unit: USD - value: '5892' - string: \$ 4.36 USD - - type: tax - name: City Taxes - description: NEW YORK Taxes (4.88%) - price: - unit: USD - value: '5892' - string: \$ 5.32 USD - - type: shipping - name: Flat - description: '' - price: - unit: USD - value: '5892' - string: \$ 0.00 USD - total: - unit: USD - value: '5892' - string: \$ 118.73 USD - downloadFiles: - - id: 5e9a5eba75e0ac242e1b6f64 - name: New product guide - url: >- - https://webflow.com/dashboard/download-digital-product?payload=5d93ba5e38c6b0160ab711d3;e7634a;5eb1aac72912ec06f561278c;5e9a5eba75e0ac242e1b6f63:ka2nehxy:4a1ee0a632feaab94294350087215ed89533f2f530903e3b933b638940e921aa - update: - path: /sites/{site_id}/orders/{order_id} - method: PATCH - auth: - - OAuth2: - - ecommerce:write - docs: | - This API lets you update the fields, `comment`, `shippingProvider`, - and/or `shippingTracking` for a given order. All three fields can be - updated simultaneously or independently. - - Required scope | `ecommerce:write` - source: - openapi: ../../../openapi/referenced-specs/v2.yml - path-parameters: - site_id: - type: string - docs: Unique identifier for a Site - order_id: - type: string - docs: Unique identifier for an Order - display-name: Update Order - request: - name: OrdersUpdateRequest - body: - properties: - comment: - type: optional - docs: Arbitrary data for your records - shippingProvider: - type: optional - docs: Company or method used to ship order - shippingTracking: - type: optional - docs: Tracking number for order shipment - shippingTrackingURL: - type: optional - docs: URL to track order shipment - content-type: application/json - response: - docs: Request was successful - type: root.Order - status-code: 200 - errors: - - root.BadRequestError - - root.UnauthorizedError - - root.ForbiddenError - - root.NotFoundError - - root.ConflictError - - root.TooManyRequestsError - - root.InternalServerError - examples: - - path-parameters: - site_id: 580e63e98c9a982ac9b8b741 - order_id: 5e8518516e147040726cc415 - request: {} - response: - body: - orderId: fc7-128 - status: refunded - comment: >- - Customer requested gift wrapping and a personalized note saying: - Happy Birthday, Ford! 🎉 Please ensure the item is packed with - extra bubble wrap for safe transit. - orderComment: >- - Please gift wrap with a personal note saying "Happy Birthday, - Ford! 🎉 - acceptedOn: '2024-03-29T21:29:21Z' - fulfilledOn: '2024-03-29T21:29:21Z' - refundedOn: '2024-04-08T18:25:04Z' - disputedOn: '2024-03-29T21:29:21Z' - disputeUpdatedOn: '2024-03-29T21:29:21Z' - disputeLastStatus: charge_refunded - customerPaid: - unit: USD - value: '5892' - string: \$ 118.73 USD - netAmount: - unit: USD - value: '5892' - string: \$ 112.62 USD - applicationFee: - unit: USD - value: '5892' - string: \$ 2.37 USD - allAddresses: - - type: billing - japanType: kana - addressee: Arthur Dent - line1: 20 W 34th St - line2: Empire State Building - city: New York - state: New York - country: US - postalCode: '10118' - - type: shipping - japanType: kana - addressee: Arthur Dent - line1: 20 W 34th St - line2: Empire State Building - city: New York - state: New York - country: US - postalCode: '10118' - shippingAddress: - type: shipping - japanType: kanji - addressee: Arthur Dent - line1: 20 W 34th St - line2: Empire State Building - city: New York - state: New York - country: US - postalCode: '10118' - billingAddress: - type: billing - japanType: kana - addressee: Arthur Dent - line1: 20 W 34th St - line2: Empire State Building - city: New York - state: New York - country: US - postalCode: '10118' - shippingProvider: Shipping Company, Co. - shippingTracking: tr00000000001 - shippingTrackingURL: https://www.shippingcompany.com/tracking/tr00000000001 - customerInfo: - fullName: Arthur Dent - email: arthur.dent@example.com - purchasedItems: - - count: 1 - rowTotal: - unit: USD - value: '5892' - string: \$ 55.61 USD - productId: 66072fb61b89448912e26791 - productName: Luxurious Fresh Ball - productSlug: luxurious-fresh-ball - variantId: 66072fb71b89448912e2683f - variantName: 'Luxurious Fresh Ball Generic: Bronze, Practical: Plastic' - variantSlug: luxurious-fresh-ball-generic-bronze-practical-plastic - variantSKU: luxurious-fresh-ball-generic-bronze-practical-plastic - variantImage: - url: >- - https://dev-assets.website-files.com/66072f39417a2a35b2589cc7/66072fb51b89448912e2672c_image14.jpeg - variantPrice: - unit: USD - value: '5892' - string: \$ 55.61 USD - weight: 11 - width: 82 - height: 70 - length: 9 - - count: 1 - rowTotal: - unit: USD - value: '5892' - string: \$ 53.44 USD - productId: 66072fb61b89448912e26799 - productName: Recycled Steel Gloves - productSlug: recycled-steel-gloves - variantId: 66072fb91b89448912e26ab9 - variantName: 'Recycled Steel Gloves Electronic: Granite, Handcrafted: grey' - variantSlug: recycled-steel-gloves-electronic-granite-handcrafted-grey - variantSKU: recycled-steel-gloves-electronic-granite-handcrafted-grey - variantImage: - url: >- - https://dev-assets.website-files.com/66072f39417a2a35b2589cc7/66072fb51b89448912e2671e_image2.jpeg - variantPrice: - unit: USD - value: '5892' - string: \$ 53.44 USD - weight: 38 - width: 76 - height: 85 - length: 40 - purchasedItemsCount: 2 - stripeDetails: - subscriptionId: sub_1J6xwG2eZvKYlo2CXu9Zt0Tn - paymentMethod: pm_1OzmzBJYFi4lcbXWHKNdXU7j - paymentIntentId: pi_3OzmzDJYFi4lcbXW1hTBW6ft - customerId: cus_PpRsNHwWdUoRKR - chargeId: ch_3OzmzDJYFi4lcbXW1ndkkrH2 - disputeId: disputeId - refundId: re_3OzmzDJYFi4lcbXW1kFAmlBk - refundReason: fraudulent - stripeCard: - last4: '4242' - brand: Visa - ownerName: Arthur Dent - expires: - year: 2024 - month: 4 - paypalDetails: - orderId: 1a2b3c4d5e6f7g8h9i0j - payerId: 9k8j7i6h5g4f3e2d1c0b - captureId: qwe123rty456uio789p - refundId: abcde12345fghij67890 - refundReason: Customer requested refund - disputeId: zxcvbnm987poiuytrewq - customData: - - key: value - metadata: - isBuyNow: false - isCustomerDeleted: false - isShippingRequired: true - hasDownloads: false - paymentProcessor: stripe - totals: - subtotal: - unit: USD - value: '5892' - string: \$ 109.05 USD - extras: - - type: tax - name: State Taxes - description: NY Taxes (4.00%) - price: - unit: USD - value: '5892' - string: \$ 4.36 USD - - type: tax - name: City Taxes - description: NEW YORK Taxes (4.88%) - price: - unit: USD - value: '5892' - string: \$ 5.32 USD - - type: shipping - name: Flat - description: '' - price: - unit: USD - value: '5892' - string: \$ 0.00 USD - total: - unit: USD - value: '5892' - string: \$ 118.73 USD - downloadFiles: - - id: 5e9a5eba75e0ac242e1b6f64 - name: New product guide - url: >- - https://webflow.com/dashboard/download-digital-product?payload=5d93ba5e38c6b0160ab711d3;e7634a;5eb1aac72912ec06f561278c;5e9a5eba75e0ac242e1b6f63:ka2nehxy:4a1ee0a632feaab94294350087215ed89533f2f530903e3b933b638940e921aa - update-fulfill: - path: /sites/{site_id}/orders/{order_id}/fulfill - method: POST - auth: - - OAuth2: - - ecommerce:write - docs: | - Updates an order's status to fulfilled - - Required scope | `ecommerce:write` - source: - openapi: ../../../openapi/referenced-specs/v2.yml - path-parameters: - site_id: - type: string - docs: Unique identifier for a Site - order_id: - type: string - docs: Unique identifier for an Order - display-name: Fulfill Order - request: - name: OrdersUpdateFulfillRequest - body: - properties: - sendOrderFulfilledEmail: - type: optional - docs: Whether or not the Order Fulfilled email should be sent - default: false - content-type: application/json - response: - docs: Request was successful - type: root.Order - status-code: 200 - errors: - - root.BadRequestError - - root.UnauthorizedError - - root.ForbiddenError - - root.NotFoundError - - root.ConflictError - - root.TooManyRequestsError - - root.InternalServerError - examples: - - path-parameters: - site_id: 580e63e98c9a982ac9b8b741 - order_id: 5e8518516e147040726cc415 - request: {} - response: - body: - orderId: fc7-128 - status: refunded - comment: >- - Customer requested gift wrapping and a personalized note saying: - Happy Birthday, Ford! 🎉 Please ensure the item is packed with - extra bubble wrap for safe transit. - orderComment: >- - Please gift wrap with a personal note saying "Happy Birthday, - Ford! 🎉 - acceptedOn: '2024-03-29T21:29:21Z' - fulfilledOn: '2024-03-29T21:29:21Z' - refundedOn: '2024-04-08T18:25:04Z' - disputedOn: '2024-03-29T21:29:21Z' - disputeUpdatedOn: '2024-03-29T21:29:21Z' - disputeLastStatus: charge_refunded - customerPaid: - unit: USD - value: '5892' - string: \$ 118.73 USD - netAmount: - unit: USD - value: '5892' - string: \$ 112.62 USD - applicationFee: - unit: USD - value: '5892' - string: \$ 2.37 USD - allAddresses: - - type: billing - japanType: kana - addressee: Arthur Dent - line1: 20 W 34th St - line2: Empire State Building - city: New York - state: New York - country: US - postalCode: '10118' - - type: shipping - japanType: kana - addressee: Arthur Dent - line1: 20 W 34th St - line2: Empire State Building - city: New York - state: New York - country: US - postalCode: '10118' - shippingAddress: - type: shipping - japanType: kanji - addressee: Arthur Dent - line1: 20 W 34th St - line2: Empire State Building - city: New York - state: New York - country: US - postalCode: '10118' - billingAddress: - type: billing - japanType: kana - addressee: Arthur Dent - line1: 20 W 34th St - line2: Empire State Building - city: New York - state: New York - country: US - postalCode: '10118' - shippingProvider: Shipping Company, Co. - shippingTracking: tr00000000001 - shippingTrackingURL: https://www.shippingcompany.com/tracking/tr00000000001 - customerInfo: - fullName: Arthur Dent - email: arthur.dent@example.com - purchasedItems: - - count: 1 - rowTotal: - unit: USD - value: '5892' - string: \$ 55.61 USD - productId: 66072fb61b89448912e26791 - productName: Luxurious Fresh Ball - productSlug: luxurious-fresh-ball - variantId: 66072fb71b89448912e2683f - variantName: 'Luxurious Fresh Ball Generic: Bronze, Practical: Plastic' - variantSlug: luxurious-fresh-ball-generic-bronze-practical-plastic - variantSKU: luxurious-fresh-ball-generic-bronze-practical-plastic - variantImage: - url: >- - https://dev-assets.website-files.com/66072f39417a2a35b2589cc7/66072fb51b89448912e2672c_image14.jpeg - variantPrice: - unit: USD - value: '5892' - string: \$ 55.61 USD - weight: 11 - width: 82 - height: 70 - length: 9 - - count: 1 - rowTotal: - unit: USD - value: '5892' - string: \$ 53.44 USD - productId: 66072fb61b89448912e26799 - productName: Recycled Steel Gloves - productSlug: recycled-steel-gloves - variantId: 66072fb91b89448912e26ab9 - variantName: 'Recycled Steel Gloves Electronic: Granite, Handcrafted: grey' - variantSlug: recycled-steel-gloves-electronic-granite-handcrafted-grey - variantSKU: recycled-steel-gloves-electronic-granite-handcrafted-grey - variantImage: - url: >- - https://dev-assets.website-files.com/66072f39417a2a35b2589cc7/66072fb51b89448912e2671e_image2.jpeg - variantPrice: - unit: USD - value: '5892' - string: \$ 53.44 USD - weight: 38 - width: 76 - height: 85 - length: 40 - purchasedItemsCount: 2 - stripeDetails: - subscriptionId: sub_1J6xwG2eZvKYlo2CXu9Zt0Tn - paymentMethod: pm_1OzmzBJYFi4lcbXWHKNdXU7j - paymentIntentId: pi_3OzmzDJYFi4lcbXW1hTBW6ft - customerId: cus_PpRsNHwWdUoRKR - chargeId: ch_3OzmzDJYFi4lcbXW1ndkkrH2 - disputeId: disputeId - refundId: re_3OzmzDJYFi4lcbXW1kFAmlBk - refundReason: fraudulent - stripeCard: - last4: '4242' - brand: Visa - ownerName: Arthur Dent - expires: - year: 2024 - month: 4 - paypalDetails: - orderId: 1a2b3c4d5e6f7g8h9i0j - payerId: 9k8j7i6h5g4f3e2d1c0b - captureId: qwe123rty456uio789p - refundId: abcde12345fghij67890 - refundReason: Customer requested refund - disputeId: zxcvbnm987poiuytrewq - customData: - - key: value - metadata: - isBuyNow: false - isCustomerDeleted: false - isShippingRequired: true - hasDownloads: false - paymentProcessor: stripe - totals: - subtotal: - unit: USD - value: '5892' - string: \$ 109.05 USD - extras: - - type: tax - name: State Taxes - description: NY Taxes (4.00%) - price: - unit: USD - value: '5892' - string: \$ 4.36 USD - - type: tax - name: City Taxes - description: NEW YORK Taxes (4.88%) - price: - unit: USD - value: '5892' - string: \$ 5.32 USD - - type: shipping - name: Flat - description: '' - price: - unit: USD - value: '5892' - string: \$ 0.00 USD - total: - unit: USD - value: '5892' - string: \$ 118.73 USD - downloadFiles: - - id: 5e9a5eba75e0ac242e1b6f64 - name: New product guide - url: >- - https://webflow.com/dashboard/download-digital-product?payload=5d93ba5e38c6b0160ab711d3;e7634a;5eb1aac72912ec06f561278c;5e9a5eba75e0ac242e1b6f63:ka2nehxy:4a1ee0a632feaab94294350087215ed89533f2f530903e3b933b638940e921aa - update-unfulfill: - path: /sites/{site_id}/orders/{order_id}/unfulfill - method: POST - auth: - - OAuth2: - - ecommerce:write - docs: | - Updates an order's status to unfulfilled - - Required scope | `ecommerce:write` - source: - openapi: ../../../openapi/referenced-specs/v2.yml - path-parameters: - site_id: - type: string - docs: Unique identifier for a Site - order_id: - type: string - docs: Unique identifier for an Order - display-name: Unfulfill Order - response: - docs: Request was successful - type: root.Order - status-code: 200 - errors: - - root.BadRequestError - - root.UnauthorizedError - - root.ForbiddenError - - root.NotFoundError - - root.ConflictError - - root.TooManyRequestsError - - root.InternalServerError - examples: - - path-parameters: - site_id: 580e63e98c9a982ac9b8b741 - order_id: 5e8518516e147040726cc415 - response: - body: - orderId: fc7-128 - status: refunded - comment: >- - Customer requested gift wrapping and a personalized note saying: - Happy Birthday, Ford! 🎉 Please ensure the item is packed with - extra bubble wrap for safe transit. - orderComment: >- - Please gift wrap with a personal note saying "Happy Birthday, - Ford! 🎉 - acceptedOn: '2024-03-29T21:29:21Z' - fulfilledOn: '2024-03-29T21:29:21Z' - refundedOn: '2024-04-08T18:25:04Z' - disputedOn: '2024-03-29T21:29:21Z' - disputeUpdatedOn: '2024-03-29T21:29:21Z' - disputeLastStatus: charge_refunded - customerPaid: - unit: USD - value: '5892' - string: \$ 118.73 USD - netAmount: - unit: USD - value: '5892' - string: \$ 112.62 USD - applicationFee: - unit: USD - value: '5892' - string: \$ 2.37 USD - allAddresses: - - type: billing - japanType: kana - addressee: Arthur Dent - line1: 20 W 34th St - line2: Empire State Building - city: New York - state: New York - country: US - postalCode: '10118' - - type: shipping - japanType: kana - addressee: Arthur Dent - line1: 20 W 34th St - line2: Empire State Building - city: New York - state: New York - country: US - postalCode: '10118' - shippingAddress: - type: shipping - japanType: kanji - addressee: Arthur Dent - line1: 20 W 34th St - line2: Empire State Building - city: New York - state: New York - country: US - postalCode: '10118' - billingAddress: - type: billing - japanType: kana - addressee: Arthur Dent - line1: 20 W 34th St - line2: Empire State Building - city: New York - state: New York - country: US - postalCode: '10118' - shippingProvider: Shipping Company, Co. - shippingTracking: tr00000000001 - shippingTrackingURL: https://www.shippingcompany.com/tracking/tr00000000001 - customerInfo: - fullName: Arthur Dent - email: arthur.dent@example.com - purchasedItems: - - count: 1 - rowTotal: - unit: USD - value: '5892' - string: \$ 55.61 USD - productId: 66072fb61b89448912e26791 - productName: Luxurious Fresh Ball - productSlug: luxurious-fresh-ball - variantId: 66072fb71b89448912e2683f - variantName: 'Luxurious Fresh Ball Generic: Bronze, Practical: Plastic' - variantSlug: luxurious-fresh-ball-generic-bronze-practical-plastic - variantSKU: luxurious-fresh-ball-generic-bronze-practical-plastic - variantImage: - url: >- - https://dev-assets.website-files.com/66072f39417a2a35b2589cc7/66072fb51b89448912e2672c_image14.jpeg - variantPrice: - unit: USD - value: '5892' - string: \$ 55.61 USD - weight: 11 - width: 82 - height: 70 - length: 9 - - count: 1 - rowTotal: - unit: USD - value: '5892' - string: \$ 53.44 USD - productId: 66072fb61b89448912e26799 - productName: Recycled Steel Gloves - productSlug: recycled-steel-gloves - variantId: 66072fb91b89448912e26ab9 - variantName: 'Recycled Steel Gloves Electronic: Granite, Handcrafted: grey' - variantSlug: recycled-steel-gloves-electronic-granite-handcrafted-grey - variantSKU: recycled-steel-gloves-electronic-granite-handcrafted-grey - variantImage: - url: >- - https://dev-assets.website-files.com/66072f39417a2a35b2589cc7/66072fb51b89448912e2671e_image2.jpeg - variantPrice: - unit: USD - value: '5892' - string: \$ 53.44 USD - weight: 38 - width: 76 - height: 85 - length: 40 - purchasedItemsCount: 2 - stripeDetails: - subscriptionId: sub_1J6xwG2eZvKYlo2CXu9Zt0Tn - paymentMethod: pm_1OzmzBJYFi4lcbXWHKNdXU7j - paymentIntentId: pi_3OzmzDJYFi4lcbXW1hTBW6ft - customerId: cus_PpRsNHwWdUoRKR - chargeId: ch_3OzmzDJYFi4lcbXW1ndkkrH2 - disputeId: disputeId - refundId: re_3OzmzDJYFi4lcbXW1kFAmlBk - refundReason: fraudulent - stripeCard: - last4: '4242' - brand: Visa - ownerName: Arthur Dent - expires: - year: 2024 - month: 4 - paypalDetails: - orderId: 1a2b3c4d5e6f7g8h9i0j - payerId: 9k8j7i6h5g4f3e2d1c0b - captureId: qwe123rty456uio789p - refundId: abcde12345fghij67890 - refundReason: Customer requested refund - disputeId: zxcvbnm987poiuytrewq - customData: - - key: value - metadata: - isBuyNow: false - isCustomerDeleted: false - isShippingRequired: true - hasDownloads: false - paymentProcessor: stripe - totals: - subtotal: - unit: USD - value: '5892' - string: \$ 109.05 USD - extras: - - type: tax - name: State Taxes - description: NY Taxes (4.00%) - price: - unit: USD - value: '5892' - string: \$ 4.36 USD - - type: tax - name: City Taxes - description: NEW YORK Taxes (4.88%) - price: - unit: USD - value: '5892' - string: \$ 5.32 USD - - type: shipping - name: Flat - description: '' - price: - unit: USD - value: '5892' - string: \$ 0.00 USD - total: - unit: USD - value: '5892' - string: \$ 118.73 USD - downloadFiles: - - id: 5e9a5eba75e0ac242e1b6f64 - name: New product guide - url: >- - https://webflow.com/dashboard/download-digital-product?payload=5d93ba5e38c6b0160ab711d3;e7634a;5eb1aac72912ec06f561278c;5e9a5eba75e0ac242e1b6f63:ka2nehxy:4a1ee0a632feaab94294350087215ed89533f2f530903e3b933b638940e921aa - refund: - path: /sites/{site_id}/orders/{order_id}/refund - method: POST - auth: - - OAuth2: - - ecommerce:write - docs: | - This API will reverse a Stripe charge and refund an order back to a - customer. It will also set the order's status to `refunded`. - - Required scope | `ecommerce:write` - source: - openapi: ../../../openapi/referenced-specs/v2.yml - path-parameters: - site_id: - type: string - docs: Unique identifier for a Site - order_id: - type: string - docs: Unique identifier for an Order - display-name: Refund Order - request: - name: OrdersRefundRequest - body: - properties: - reason: - type: optional - docs: The reason for the refund - content-type: application/json - response: - docs: Request was successful - type: root.Order - status-code: 200 - errors: - - root.BadRequestError - - root.UnauthorizedError - - root.ForbiddenError - - root.NotFoundError - - root.ConflictError - - root.TooManyRequestsError - - root.InternalServerError - examples: - - path-parameters: - site_id: 580e63e98c9a982ac9b8b741 - order_id: 5e8518516e147040726cc415 - request: {} - response: - body: - orderId: fc7-128 - status: refunded - comment: >- - Customer requested gift wrapping and a personalized note saying: - Happy Birthday, Ford! 🎉 Please ensure the item is packed with - extra bubble wrap for safe transit. - orderComment: >- - Please gift wrap with a personal note saying "Happy Birthday, - Ford! 🎉 - acceptedOn: '2024-03-29T21:29:21Z' - fulfilledOn: '2024-03-29T21:29:21Z' - refundedOn: '2024-04-08T18:25:04Z' - disputedOn: '2024-03-29T21:29:21Z' - disputeUpdatedOn: '2024-03-29T21:29:21Z' - disputeLastStatus: charge_refunded - customerPaid: - unit: USD - value: '5892' - string: \$ 118.73 USD - netAmount: - unit: USD - value: '5892' - string: \$ 112.62 USD - applicationFee: - unit: USD - value: '5892' - string: \$ 2.37 USD - allAddresses: - - type: billing - japanType: kana - addressee: Arthur Dent - line1: 20 W 34th St - line2: Empire State Building - city: New York - state: New York - country: US - postalCode: '10118' - - type: shipping - japanType: kana - addressee: Arthur Dent - line1: 20 W 34th St - line2: Empire State Building - city: New York - state: New York - country: US - postalCode: '10118' - shippingAddress: - type: shipping - japanType: kanji - addressee: Arthur Dent - line1: 20 W 34th St - line2: Empire State Building - city: New York - state: New York - country: US - postalCode: '10118' - billingAddress: - type: billing - japanType: kana - addressee: Arthur Dent - line1: 20 W 34th St - line2: Empire State Building - city: New York - state: New York - country: US - postalCode: '10118' - shippingProvider: Shipping Company, Co. - shippingTracking: tr00000000001 - shippingTrackingURL: https://www.shippingcompany.com/tracking/tr00000000001 - customerInfo: - fullName: Arthur Dent - email: arthur.dent@example.com - purchasedItems: - - count: 1 - rowTotal: - unit: USD - value: '5892' - string: \$ 55.61 USD - productId: 66072fb61b89448912e26791 - productName: Luxurious Fresh Ball - productSlug: luxurious-fresh-ball - variantId: 66072fb71b89448912e2683f - variantName: 'Luxurious Fresh Ball Generic: Bronze, Practical: Plastic' - variantSlug: luxurious-fresh-ball-generic-bronze-practical-plastic - variantSKU: luxurious-fresh-ball-generic-bronze-practical-plastic - variantImage: - url: >- - https://dev-assets.website-files.com/66072f39417a2a35b2589cc7/66072fb51b89448912e2672c_image14.jpeg - variantPrice: - unit: USD - value: '5892' - string: \$ 55.61 USD - weight: 11 - width: 82 - height: 70 - length: 9 - - count: 1 - rowTotal: - unit: USD - value: '5892' - string: \$ 53.44 USD - productId: 66072fb61b89448912e26799 - productName: Recycled Steel Gloves - productSlug: recycled-steel-gloves - variantId: 66072fb91b89448912e26ab9 - variantName: 'Recycled Steel Gloves Electronic: Granite, Handcrafted: grey' - variantSlug: recycled-steel-gloves-electronic-granite-handcrafted-grey - variantSKU: recycled-steel-gloves-electronic-granite-handcrafted-grey - variantImage: - url: >- - https://dev-assets.website-files.com/66072f39417a2a35b2589cc7/66072fb51b89448912e2671e_image2.jpeg - variantPrice: - unit: USD - value: '5892' - string: \$ 53.44 USD - weight: 38 - width: 76 - height: 85 - length: 40 - purchasedItemsCount: 2 - stripeDetails: - subscriptionId: sub_1J6xwG2eZvKYlo2CXu9Zt0Tn - paymentMethod: pm_1OzmzBJYFi4lcbXWHKNdXU7j - paymentIntentId: pi_3OzmzDJYFi4lcbXW1hTBW6ft - customerId: cus_PpRsNHwWdUoRKR - chargeId: ch_3OzmzDJYFi4lcbXW1ndkkrH2 - disputeId: disputeId - refundId: re_3OzmzDJYFi4lcbXW1kFAmlBk - refundReason: fraudulent - stripeCard: - last4: '4242' - brand: Visa - ownerName: Arthur Dent - expires: - year: 2024 - month: 4 - paypalDetails: - orderId: 1a2b3c4d5e6f7g8h9i0j - payerId: 9k8j7i6h5g4f3e2d1c0b - captureId: qwe123rty456uio789p - refundId: abcde12345fghij67890 - refundReason: Customer requested refund - disputeId: zxcvbnm987poiuytrewq - customData: - - key: value - metadata: - isBuyNow: false - isCustomerDeleted: false - isShippingRequired: true - hasDownloads: false - paymentProcessor: stripe - totals: - subtotal: - unit: USD - value: '5892' - string: \$ 109.05 USD - extras: - - type: tax - name: State Taxes - description: NY Taxes (4.00%) - price: - unit: USD - value: '5892' - string: \$ 4.36 USD - - type: tax - name: City Taxes - description: NEW YORK Taxes (4.88%) - price: - unit: USD - value: '5892' - string: \$ 5.32 USD - - type: shipping - name: Flat - description: '' - price: - unit: USD - value: '5892' - string: \$ 0.00 USD - total: - unit: USD - value: '5892' - string: \$ 118.73 USD - downloadFiles: - - id: 5e9a5eba75e0ac242e1b6f64 - name: New product guide - url: >- - https://webflow.com/dashboard/download-digital-product?payload=5d93ba5e38c6b0160ab711d3;e7634a;5eb1aac72912ec06f561278c;5e9a5eba75e0ac242e1b6f63:ka2nehxy:4a1ee0a632feaab94294350087215ed89533f2f530903e3b933b638940e921aa - source: - openapi: ../../../openapi/referenced-specs/v2.yml - display-name: Orders -docs: Orders are the orders for your Webflow site. -webhooks: - ecomm_new_order: - audiences: [] - method: POST - display-name: New eComm Order - headers: {} - payload: root.NewOrder - examples: - - payload: - triggerType: ecomm_new_order - payload: - orderId: fc7-128 - status: unfulfilled - comment: >- - Customer requested gift wrapping and a personalized note saying: - Happy Birthday, Ford! 🎉 Please ensure the item is packed with - extra bubble wrap for safe transit. - orderComment: >- - Please gift wrap with a personal note saying "Happy Birthday, - Ford! 🎉 - acceptedOn: '2024-03-29T21:29:21Z' - fulfilledOn: '2018-12-03T22:06:15Z' - refundedOn: '2018-12-03T22:06:15Z' - disputedOn: '2018-12-03T22:06:15Z' - disputeUpdatedOn: '2018-12-03T22:06:15Z' - customerPaid: - unit: USD - value: '5892' - string: \$ 118.73 USD - netAmount: - unit: USD - value: '5892' - string: \$ 112.62 USD - applicationFee: - unit: USD - value: '5892' - string: \$ 2.37 USD - allAddresses: - - type: billing - addressee: Arthur Dent - line1: 20 W 34th St - line2: Empire State Building - city: New York - state: New York - country: US - postalCode: '10118' - - type: shipping - addressee: Arthur Dent - line1: 20 W 34th St - line2: Empire State Building - city: New York - state: New York - country: US - postalCode: '10118' - shippingAddress: - type: shipping - japanType: kanji - addressee: Arthur Dent - line1: 20 W 34th St - line2: Empire State Building - city: New York - state: New York - country: US - postalCode: '10118' - billingAddress: - type: billing - addressee: Arthur Dent - line1: 20 W 34th St - line2: Empire State Building - city: New York - state: New York - country: US - postalCode: '10118' - shippingProvider: Shipping Company, Co. - shippingTracking: tr00000000001 - shippingTrackingURL: https://www.shippingcompany.com/tracking/tr00000000001 - customerInfo: - fullName: Arthur Dent - email: arthur.dent@example.com - purchasedItems: - - count: 1 - rowTotal: - unit: USD - value: '5892' - string: \$ 55.61 USD - productId: 66072fb61b89448912e26791 - productName: Luxurious Fresh Ball - productSlug: luxurious-fresh-ball - variantId: 66072fb71b89448912e2683f - variantName: 'Luxurious Fresh Ball Generic: Bronze, Practical: Plastic' - variantSlug: luxurious-fresh-ball-generic-bronze-practical-plastic - variantSKU: luxurious-fresh-ball-generic-bronze-practical-plastic - variantImage: - url: >- - https://dev-assets.website-files.com/66072f39417a2a35b2589cc7/66072fb51b89448912e2672c_image14.jpeg - variantPrice: - unit: USD - value: '5892' - string: \$ 55.61 USD - weight: 11 - width: 82 - height: 70 - length: 9 - - count: 1 - rowTotal: - unit: USD - value: '5892' - string: \$ 53.44 USD - productId: 66072fb61b89448912e26799 - productName: Recycled Steel Gloves - productSlug: recycled-steel-gloves - variantId: 66072fb91b89448912e26ab9 - variantName: 'Recycled Steel Gloves Electronic: Granite, Handcrafted: grey' - variantSlug: recycled-steel-gloves-electronic-granite-handcrafted-grey - variantSKU: recycled-steel-gloves-electronic-granite-handcrafted-grey - variantImage: - url: >- - https://dev-assets.website-files.com/66072f39417a2a35b2589cc7/66072fb51b89448912e2671e_image2.jpeg - variantPrice: - unit: USD - value: '5892' - string: \$ 53.44 USD - weight: 38 - width: 76 - height: 85 - length: 40 - purchasedItemsCount: 2 - stripeDetails: - subscriptionId: sub_1J6xwG2eZvKYlo2CXu9Zt0Tn - paymentMethod: pm_1OzmzBJYFi4lcbXWHKNdXU7j - paymentIntentId: pi_3OzmzDJYFi4lcbXW1hTBW6ft - customerId: cus_PpRsNHwWdUoRKR - chargeId: ch_3OzmzDJYFi4lcbXW1ndkkrH2 - refundId: re_3OzmzDJYFi4lcbXW1kFAmlBk - refundReason: fraudulent - stripeCard: - last4: '4242' - brand: Visa - ownerName: Arthur Dent - expires: - year: 2024 - month: 4 - customData: - - key: value - metadata: - isBuyNow: false - isCustomerDeleted: false - isShippingRequired: true - hasDownloads: false - paymentProcessor: stripe - totals: - subtotal: - unit: USD - value: '5892' - string: \$ 109.05 USD - extras: - - type: tax - name: State Taxes - description: NY Taxes (4.00%) - price: - unit: USD - value: '5892' - string: \$ 4.36 USD - - type: tax - name: City Taxes - description: NEW YORK Taxes (4.88%) - price: - unit: USD - value: '5892' - string: \$ 5.32 USD - - type: shipping - name: Flat - description: '' - price: - unit: USD - value: '5892' - string: \$ 0.00 USD - total: - unit: USD - value: '5892' - string: \$ 118.73 USD - downloadFiles: - - id: 5e9a5eba75e0ac242e1b6f64 - name: New product guide - url: >- - https://webflow.com/dashboard/download-digital-product?payload=5d93ba5e38c6b0160ab711d3;e7634a;5eb1aac72912ec06f561278c;5e9a5eba75e0ac242e1b6f63:ka2nehxy:4a1ee0a632feaab94294350087215ed89533f2f530903e3b933b638940e921aa - docs: Information about a new ecommerce order - ecomm_order_changed: - audiences: [] - method: POST - display-name: Updated eComm Order - headers: {} - payload: root.UpdatedOrder - examples: - - payload: - triggerType: ecomm_order_changed - payload: - orderId: fc7-128 - status: refunded - comment: >- - Customer requested gift wrapping and a personalized note saying: - Happy Birthday, Ford! 🎉 Please ensure the item is packed with - extra bubble wrap for safe transit. - orderComment: >- - Please gift wrap with a personal note saying "Happy Birthday, - Ford! 🎉 - acceptedOn: '2024-03-29T21:29:21Z' - fulfilledOn: '2024-03-29T21:29:21Z' - refundedOn: '2024-04-08T18:25:04Z' - disputedOn: '2024-03-29T21:29:21Z' - disputeUpdatedOn: '2024-03-29T21:29:21Z' - disputeLastStatus: charge_refunded - customerPaid: - unit: USD - value: '5892' - string: \$ 118.73 USD - netAmount: - unit: USD - value: '5892' - string: \$ 112.62 USD - applicationFee: - unit: USD - value: '5892' - string: \$ 2.37 USD - allAddresses: - - type: billing - addressee: Arthur Dent - line1: 20 W 34th St - line2: Empire State Building - city: New York - state: New York - country: US - postalCode: '10118' - - type: shipping - addressee: Arthur Dent - line1: 20 W 34th St - line2: Empire State Building - city: New York - state: New York - country: US - postalCode: '10118' - shippingAddress: - type: shipping - japanType: kanji - addressee: Arthur Dent - line1: 20 W 34th St - line2: Empire State Building - city: New York - state: New York - country: US - postalCode: '10118' - billingAddress: - type: billing - addressee: Arthur Dent - line1: 20 W 34th St - line2: Empire State Building - city: New York - state: New York - country: US - postalCode: '10118' - shippingProvider: Shipping Company, Co. - shippingTracking: tr00000000001 - shippingTrackingURL: https://www.shippingcompany.com/tracking/tr00000000001 - customerInfo: - fullName: Arthur Dent - email: arthur.dent@example.com - purchasedItems: - - count: 1 - rowTotal: - unit: USD - value: '5892' - string: \$ 55.61 USD - productId: 66072fb61b89448912e26791 - productName: Luxurious Fresh Ball - productSlug: luxurious-fresh-ball - variantId: 66072fb71b89448912e2683f - variantName: 'Luxurious Fresh Ball Generic: Bronze, Practical: Plastic' - variantSlug: luxurious-fresh-ball-generic-bronze-practical-plastic - variantSKU: luxurious-fresh-ball-generic-bronze-practical-plastic - variantImage: - url: >- - https://dev-assets.website-files.com/66072f39417a2a35b2589cc7/66072fb51b89448912e2672c_image14.jpeg - variantPrice: - unit: USD - value: '5892' - string: \$ 55.61 USD - weight: 11 - width: 82 - height: 70 - length: 9 - - count: 1 - rowTotal: - unit: USD - value: '5892' - string: \$ 53.44 USD - productId: 66072fb61b89448912e26799 - productName: Recycled Steel Gloves - productSlug: recycled-steel-gloves - variantId: 66072fb91b89448912e26ab9 - variantName: 'Recycled Steel Gloves Electronic: Granite, Handcrafted: grey' - variantSlug: recycled-steel-gloves-electronic-granite-handcrafted-grey - variantSKU: recycled-steel-gloves-electronic-granite-handcrafted-grey - variantImage: - url: >- - https://dev-assets.website-files.com/66072f39417a2a35b2589cc7/66072fb51b89448912e2671e_image2.jpeg - variantPrice: - unit: USD - value: '5892' - string: \$ 53.44 USD - weight: 38 - width: 76 - height: 85 - length: 40 - purchasedItemsCount: 2 - stripeDetails: - subscriptionId: sub_1J6xwG2eZvKYlo2CXu9Zt0Tn - paymentMethod: pm_1OzmzBJYFi4lcbXWHKNdXU7j - paymentIntentId: pi_3OzmzDJYFi4lcbXW1hTBW6ft - customerId: cus_PpRsNHwWdUoRKR - chargeId: ch_3OzmzDJYFi4lcbXW1ndkkrH2 - refundId: re_3OzmzDJYFi4lcbXW1kFAmlBk - refundReason: fraudulent - stripeCard: - last4: '4242' - brand: Visa - ownerName: Arthur Dent - expires: - year: 2024 - month: 4 - customData: - - key: value - metadata: - isBuyNow: false - isCustomerDeleted: false - isShippingRequired: true - hasDownloads: false - paymentProcessor: stripe - totals: - subtotal: - unit: USD - value: '5892' - string: \$ 109.05 USD - extras: - - type: tax - name: State Taxes - description: NY Taxes (4.00%) - price: - unit: USD - value: '5892' - string: \$ 4.36 USD - - type: tax - name: City Taxes - description: NEW YORK Taxes (4.88%) - price: - unit: USD - value: '5892' - string: \$ 5.32 USD - - type: shipping - name: Flat - description: '' - price: - unit: USD - value: '5892' - string: \$ 0.00 USD - total: - unit: USD - value: '5892' - string: \$ 118.73 USD - downloadFiles: - - id: 5e9a5eba75e0ac242e1b6f64 - name: New product guide - url: >- - https://webflow.com/dashboard/download-digital-product?payload=5d93ba5e38c6b0160ab711d3;e7634a;5eb1aac72912ec06f561278c;5e9a5eba75e0ac242e1b6f63:ka2nehxy:4a1ee0a632feaab94294350087215ed89533f2f530903e3b933b638940e921aa - docs: Information about an updated ecommerce order diff --git a/.mock/definition/pages.yml b/.mock/definition/pages.yml deleted file mode 100644 index 12d954e..0000000 --- a/.mock/definition/pages.yml +++ /dev/null @@ -1,611 +0,0 @@ -imports: - root: __package__.yml -service: - auth: false - base-path: '' - endpoints: - list: - path: /sites/{site_id}/pages - method: GET - auth: - - OAuth2: - - page:read - docs: | - List of all pages for a site. - - Required scope | `pages:read` - source: - openapi: ../../../openapi/referenced-specs/v2.yml - path-parameters: - site_id: - type: string - docs: Unique identifier for a Site - display-name: List Pages - request: - name: PagesListRequest - query-parameters: - localeId: - type: optional - docs: > - Unique identifier for a specific Locale. - - - [Lear more about - localization.](/data/v2.0.0/docs/working-with-localization) - limit: - type: optional - docs: 'Maximum number of records to be returned (max limit: 100)' - offset: - type: optional - docs: >- - Offset used for pagination if the results have more than limit - records - response: - docs: Request was successful - type: root.PageList - status-code: 200 - errors: - - root.BadRequestError - - root.UnauthorizedError - - root.NotFoundError - - root.TooManyRequestsError - - root.InternalServerError - examples: - - path-parameters: - site_id: 580e63e98c9a982ac9b8b741 - query-parameters: - localeId: 65427cf400e02b306eaa04a0 - limit: 1 - offset: 1 - response: - body: - pages: - - id: 6596da6045e56dee495bcbba - siteId: 6258612d1ee792848f805dcf - title: Guide to the Galaxy - slug: guide-to-the-galaxy - parentId: 6419db964a9c435aa3af6251 - collectionId: 6390c49774a71f12831a08e3 - createdOn: '2024-03-11T10:42:00Z' - lastUpdated: '2024-03-11T10:42:42Z' - archived: false - draft: false - canBranch: false - isBranch: true - branchId: 68026fa68ef6dc744c75b833 - seo: - title: The Ultimate Hitchhiker's Guide to the Galaxy - description: >- - Everything you need to know about the galaxy, from - avoiding Vogon poetry to the importance of towels. - openGraph: - title: Explore the Cosmos with The Ultimate Guide - titleCopied: false - description: >- - Dive deep into the mysteries of the universe with your - guide to everything galactic. - descriptionCopied: false - localeId: 653fd9af6a07fc9cfd7a5e57 - publishedPath: /en-us/guide-to-the-galaxy - - id: 6596da6045e56dee495bcbad - siteId: 6258612d1ee792848f805dcf - title: Towel Day Celebrations - slug: towel-day - parentId: 6419db964a9c435aa3af6251 - collectionId: 6390c49774a71f12831a08e3 - createdOn: '2024-05-25T09:00:00Z' - lastUpdated: '2024-05-25T09:42:00Z' - archived: false - draft: false - canBranch: true - isBranch: false - branchId: 68026fa68ef6dc744c75b833 - seo: - title: Celebrate Towel Day - The Hitchhiker's Guide to the Galaxy - description: >- - A guide to celebrating Towel Day, in honor of the most - massively useful thing an interstellar hitchhiker can - have. - openGraph: - title: Towel Day - Don't Panic - titleCopied: false - description: >- - Join the galaxy in celebrating Towel Day, the day - dedicated to carrying towels everywhere in memory of - Douglas Adams. - descriptionCopied: false - localeId: 653fd9af6a07fc9cfd7a5e57 - publishedPath: /en-us/towel-day - pagination: - limit: 20 - offset: 0 - total: 2 - get-metadata: - path: /pages/{page_id} - method: GET - auth: - - OAuth2: - - page:read - docs: | - Get metadata information for a single page. - - Required scope | `pages:read` - source: - openapi: ../../../openapi/referenced-specs/v2.yml - path-parameters: - page_id: - type: string - docs: Unique identifier for a Page - display-name: Get Page Metadata - request: - name: PagesGetMetadataRequest - query-parameters: - localeId: - type: optional - docs: > - Unique identifier for a specific Locale. - - - [Lear more about - localization.](/data/v2.0.0/docs/working-with-localization) - response: - docs: Request was successful - type: root.Page - status-code: 200 - errors: - - root.BadRequestError - - root.UnauthorizedError - - root.NotFoundError - - root.TooManyRequestsError - - root.InternalServerError - examples: - - path-parameters: - page_id: 63c720f9347c2139b248e552 - query-parameters: - localeId: 65427cf400e02b306eaa04a0 - response: - body: - id: 6596da6045e56dee495bcbba - siteId: 6258612d1ee792848f805dcf - title: Guide to the Galaxy - slug: guide-to-the-galaxy - parentId: 6419db964a9c435aa3af6251 - collectionId: 6390c49774a71f12831a08e3 - createdOn: '2024-03-11T10:42:00Z' - lastUpdated: '2024-03-11T10:42:42Z' - archived: false - draft: false - canBranch: false - isBranch: true - branchId: 68026fa68ef6dc744c75b833 - seo: - title: The Ultimate Hitchhiker's Guide to the Galaxy - description: >- - Everything you need to know about the galaxy, from avoiding - Vogon poetry to the importance of towels. - openGraph: - title: Explore the Cosmos with The Ultimate Guide - titleCopied: false - description: >- - Dive deep into the mysteries of the universe with your guide - to everything galactic. - descriptionCopied: false - localeId: 653fd9af6a07fc9cfd7a5e57 - publishedPath: /en-us/guide-to-the-galaxy - update-page-settings: - path: /pages/{page_id} - method: PUT - auth: - - OAuth2: - - page:write - docs: | - Update Page-level metadata, including SEO and Open Graph fields. - - Required scope | `pages:write` - source: - openapi: ../../../openapi/referenced-specs/v2.yml - path-parameters: - page_id: - type: string - docs: Unique identifier for a Page - display-name: Update Page Metadata - request: - name: PageMetadataWrite - query-parameters: - localeId: - type: optional - docs: > - Unique identifier for a specific Locale. - - - [Lear more about - localization.](/data/v2.0.0/docs/working-with-localization) - body: - properties: - title: - type: optional - docs: Title for the page - slug: - type: optional - docs: > - Slug for the page. - - - - **Note:** Updating slugs in secondary locales is only supported - in Advanced and - Enterprise localization add-on plans. - seo: - type: optional - docs: SEO-related fields for the Page - openGraph: - type: optional - docs: Open Graph fields for the Page - content-type: application/json - response: - docs: Request was successful - type: root.Page - status-code: 200 - errors: - - root.BadRequestError - - root.UnauthorizedError - - root.NotFoundError - - root.TooManyRequestsError - - root.InternalServerError - examples: - - path-parameters: - page_id: 63c720f9347c2139b248e552 - query-parameters: - localeId: 65427cf400e02b306eaa04a0 - request: - title: Guide to the Galaxy - slug: guide-to-the-galaxy - seo: - title: The Ultimate Hitchhiker's Guide to the Galaxy - description: >- - Everything you need to know about the galaxy, from avoiding - Vogon poetry to the importance of towels. - openGraph: - title: Explore the Cosmos with The Ultimate Guide - titleCopied: false - description: >- - Dive deep into the mysteries of the universe with your guide to - everything galactic. - descriptionCopied: false - response: - body: - id: 6596da6045e56dee495bcbba - siteId: 6258612d1ee792848f805dcf - title: Guide to the Galaxy - slug: guide-to-the-galaxy - parentId: 6419db964a9c435aa3af6251 - collectionId: 6390c49774a71f12831a08e3 - createdOn: '2024-03-11T10:42:00Z' - lastUpdated: '2024-03-11T10:42:42Z' - archived: false - draft: false - canBranch: false - isBranch: true - branchId: 68026fa68ef6dc744c75b833 - seo: - title: The Ultimate Hitchhiker's Guide to the Galaxy - description: >- - Everything you need to know about the galaxy, from avoiding - Vogon poetry to the importance of towels. - openGraph: - title: Explore the Cosmos with The Ultimate Guide - titleCopied: false - description: >- - Dive deep into the mysteries of the universe with your guide - to everything galactic. - descriptionCopied: false - localeId: 653fd9af6a07fc9cfd7a5e57 - publishedPath: /en-us/guide-to-the-galaxy - get-content: - path: /pages/{page_id}/dom - method: GET - auth: - - OAuth2: - - page:read - docs: | - Get text and component instance content from a static page. - - Localization - - Required scope | `pages:read` - source: - openapi: ../../../openapi/referenced-specs/v2.yml - path-parameters: - page_id: - type: string - docs: Unique identifier for a Page - display-name: Get Page Content - request: - name: PagesGetContentRequest - query-parameters: - localeId: - type: optional - docs: > - Unique identifier for a specific Locale. - - - [Lear more about - localization.](/data/v2.0.0/docs/working-with-localization) - limit: - type: optional - docs: 'Maximum number of records to be returned (max limit: 100)' - offset: - type: optional - docs: >- - Offset used for pagination if the results have more than limit - records - response: - docs: Request was successful - type: root.Dom - status-code: 200 - errors: - - root.BadRequestError - - root.UnauthorizedError - - root.ForbiddenError - - root.NotFoundError - - root.TooManyRequestsError - - root.InternalServerError - examples: - - path-parameters: - page_id: 63c720f9347c2139b248e552 - query-parameters: - localeId: 65427cf400e02b306eaa04a0 - limit: 1 - offset: 1 - response: - body: - pageId: 658205daa3e8206a523b5ad4 - branchId: 68026fa68ef6dc744c75b833 - nodes: - - id: id - text: {} - attributes: - key: value - type: text - - id: id - text: {} - attributes: - key: value - type: text - - id: id - image: {} - attributes: - key: value - type: image - - id: id - choices: - - value: value - text: text - attributes: - key: value - type: select - - id: id - placeholder: placeholder - attributes: - key: value - type: text-input - - id: id - text: {} - attributes: - key: value - type: text - - id: id - componentId: componentId - propertyOverrides: - - propertyId: 7dd14c08-2e96-8d3d-2b19-b5c03642a0f0 - type: component-instance - pagination: - limit: 4 - offset: 0 - total: 4 - lastUpdated: '2016-10-24T19:42:38Z' - update-static-content: - path: /pages/{page_id}/dom - method: POST - auth: - - OAuth2: - - page:write - docs: > - This endpoint updates content on a static page in **secondary locales**. - It supports updating up to 1000 nodes in a single request. - - - Before making updates: - - 1. Use the [get page - content](/data/reference/pages-and-components/pages/get-content) - endpoint to identify available content nodes and their types. - - 2. If the page has component instances, retrieve the component's - properties that you'll override using the [get component - properties](/data/reference/pages-and-components/components/get-properties) - endpoint. - - 3. DOM elements may include a `data-w-id` attribute. This attribute is - used by Webflow to maintain custom attributes and links across locales. - Always include the original `data-w-id` value in your update requests to - ensure consistent behavior across all locales. - - - - This endpoint is specifically for localized pages. Ensure that the specified `localeId` is a valid **secondary locale** for the site otherwise the request will fail. - - - - Required scope | `pages:write` - source: - openapi: ../../../openapi/referenced-specs/v2.yml - path-parameters: - page_id: - type: string - docs: Unique identifier for a Page - display-name: Update Page Content - request: - name: PageDomWrite - query-parameters: - localeId: - type: string - docs: The locale identifier. - body: - properties: - nodes: - docs: >- - List of DOM Nodes with the new content that will be updated in - each node. - type: list - content-type: application/json - response: - docs: Request was successful - type: UpdateStaticContentResponse - status-code: 200 - errors: - - root.BadRequestError - - root.UnauthorizedError - - root.ForbiddenError - - root.NotFoundError - - root.TooManyRequestsError - - root.InternalServerError - examples: - - path-parameters: - page_id: 63c720f9347c2139b248e552 - query-parameters: - localeId: localeId - request: - nodes: - - nodeId: a245c12d-995b-55ee-5ec7-aa36a6cad623 - text:

The Hitchhiker's Guide to the Galaxy

- - nodeId: a245c12d-995b-55ee-5ec7-aa36a6cad627 - text: >- -

Don't Panic!

Always know where your towel - is.

- - nodeId: a245c12d-995b-55ee-5ec7-aa36a6cad635 - choices: - - value: choice-1 - text: First choice - - value: choice-2 - text: Second choice - - nodeId: a245c12d-995b-55ee-5ec7-aa36a6cad642 - placeholder: Enter something here... - - nodeId: a245c12d-995b-55ee-5ec7-aa36a6cad671 - value: Submit - waitingText: Submitting... - - nodeId: a245c12d-995b-55ee-5ec7-aa36a6cad629 - propertyOverrides: - - propertyId: 7dd14c08-2e96-8d3d-2b19-b5c03642a0f0 - text:

Time is an illusion

- - propertyId: 7dd14c08-2e96-8d3d-2b19-b5c03642a0f1 - text: Life, the Universe and Everything - response: - body: - errors: - - errors - source: - openapi: ../../../openapi/referenced-specs/v2.yml - display-name: Pages -docs: Pages are the pages in your Webflow site. -types: - PageMetadataWriteSeo: - docs: SEO-related fields for the Page - properties: - title: - type: optional - docs: The Page title shown in search engine results - description: - type: optional - docs: The Page description shown in search engine results - source: - openapi: ../../../openapi/referenced-specs/v2.yml - inline: true - PageMetadataWriteOpenGraph: - docs: Open Graph fields for the Page - properties: - title: - type: optional - docs: The title supplied to Open Graph annotations - titleCopied: - type: optional - docs: Indicates the Open Graph title was copied from the SEO title - description: - type: optional - docs: The description supplied to Open Graph annotations - descriptionCopied: - type: optional - docs: >- - Indicates the Open Graph description was copied from the SEO - description - source: - openapi: ../../../openapi/referenced-specs/v2.yml - inline: true - PageDomWriteNodesItem: - discriminated: false - union: - - type: root.TextNodeWrite - - type: root.ComponentInstanceNodePropertyOverridesWrite - - type: root.Select - - type: root.TextInputNodeWrite - - type: root.SubmitButtonNodeWrite - - type: root.SearchButtonNodeWrite - source: - openapi: ../../../openapi/referenced-specs/v2.yml - inline: true - UpdateStaticContentResponse: - properties: - errors: - docs: A list of error messages, if any. - type: list - source: - openapi: ../../../openapi/referenced-specs/v2.yml -webhooks: - page_created: - audiences: [] - method: POST - display-name: Page Created - headers: {} - payload: root.PageCreatedWebhook - examples: - - payload: - triggerType: page_created - payload: - siteId: 65427cf400e02b306eaa049c - pageId: 66a3cfb276641574f5d58311 - pageTitle: Heart of Gold Specs - createdOn: '2024-07-26T16:32:50Z' - publishedPath: /blog/earth - docs: Information about a new pages - page_metadata_updated: - audiences: [] - method: POST - display-name: Page Metadata Updated - headers: {} - payload: root.PageMetadataUpdatedWebhook - examples: - - payload: - triggerType: page_metadata_updated - payload: - siteId: 65427cf400e02b306eaa049c - pageId: 66a3cfb276641574f5d58311 - pageTitle: Heart of Gold Specs - lastUpdated: '2024-07-26T16:32:50Z' - publishedPath: /blog/earth - docs: Information about a page's updated metadata and/or settings - page_deleted: - audiences: [] - method: POST - display-name: Page Deleted - headers: {} - payload: root.PageDeletedWebhook - examples: - - payload: - triggerType: page_deleted - payload: - siteId: 65427cf400e02b306eaa049c - pageId: 66a3cfb276641574f5d58311 - pageTitle: Heart of Gold Specs - deletedOn: '2024-07-26T16:32:50Z' - publishedPath: /blog/earth - docs: Information about a page that was deleted diff --git a/.mock/definition/pages/scripts.yml b/.mock/definition/pages/scripts.yml deleted file mode 100644 index 59bc96a..0000000 --- a/.mock/definition/pages/scripts.yml +++ /dev/null @@ -1,155 +0,0 @@ -imports: - root: ../__package__.yml -service: - auth: false - base-path: '' - endpoints: - get-custom-code: - path: /pages/{page_id}/custom_code - method: GET - auth: - - OAuth2: - - custom_code:read - docs: | - Get all scripts applied to a page. - - Required scope | `custom_code:read` - source: - openapi: ../../../openapi/referenced-specs/v2.yml - path-parameters: - page_id: - type: string - docs: Unique identifier for a Page - display-name: Get Custom Code - response: - docs: Request was successful - type: root.ScriptApplyList - status-code: 200 - errors: - - root.BadRequestError - - root.UnauthorizedError - - root.NotFoundError - - root.TooManyRequestsError - - root.InternalServerError - examples: - - path-parameters: - page_id: 63c720f9347c2139b248e552 - response: - body: - scripts: - - id: id - location: header - version: version - attributes: - key: value - lastUpdated: lastUpdated - createdOn: createdOn - upsert-custom-code: - path: /pages/{page_id}/custom_code - method: PUT - auth: - - OAuth2: - - custom_code:write - docs: > - Apply registered scripts to a page. If you have multiple scripts your - App needs to apply or maintain on a page, ensure they are always - included in the request body for this endpoint. To remove individual - scripts, simply call this endpoint without the script in the request - body. - - - - To apply a script to a page, the script must first be registered to a Site via the [Register Script](/data/reference/custom-code/custom-code/register-hosted) endpoints. Once registered, the script can be applied to a Site or Page using the appropriate endpoints. See the documentation on [working with Custom Code](/data/docs/custom-code) for more information. - - - - Required scope | `custom_code:write` - source: - openapi: ../../../openapi/referenced-specs/v2.yml - path-parameters: - page_id: - type: string - docs: Unique identifier for a Page - display-name: Add/Update Custom Code - request: - body: root.ScriptApplyList - content-type: application/json - response: - docs: Request was successful - type: root.ScriptApplyList - status-code: 200 - errors: - - root.BadRequestError - - root.UnauthorizedError - - root.NotFoundError - - root.ConflictError - - root.TooManyRequestsError - - root.InternalServerError - examples: - - path-parameters: - page_id: 63c720f9347c2139b248e552 - request: - scripts: - - id: cms_slider - location: header - version: 1.0.0 - attributes: - my-attribute: some-value - - id: alert - location: header - version: 0.0.1 - response: - body: - scripts: - - id: cms_slider - location: header - version: 1.0.0 - attributes: - my-attribute: some-value - - id: alert - location: header - version: 0.0.1 - attributes: - key: value - lastUpdated: '2022-10-26T00:28:54.191Z' - createdOn: '2022-10-26T00:28:54.191Z' - delete-custom-code: - path: /pages/{page_id}/custom_code - method: DELETE - auth: - - OAuth2: - - custom_code:write - docs: > - Remove all scripts from a page applied by the App. This endpoint will - not remove scripts from the site's registered scripts. - - - To remove individual scripts applied by the App, use the [Add/Update - Custom - Code](/data/reference/custom-code/custom-code-pages/upsert-custom-code) - endpoint. - - - Access to this endpoint requires a bearer token obtained from an - [OAuth Code Grant Flow](/data/reference/oauth-app). - - - Required scope | `custom_code:write` - source: - openapi: ../../../openapi/referenced-specs/v2.yml - path-parameters: - page_id: - type: string - docs: Unique identifier for a Page - display-name: Delete Custom Code - errors: - - root.BadRequestError - - root.UnauthorizedError - - root.NotFoundError - - root.TooManyRequestsError - - root.InternalServerError - examples: - - path-parameters: - page_id: 63c720f9347c2139b248e552 - source: - openapi: ../../../openapi/referenced-specs/v2.yml diff --git a/.mock/definition/products.yml b/.mock/definition/products.yml deleted file mode 100644 index 9474978..0000000 --- a/.mock/definition/products.yml +++ /dev/null @@ -1,642 +0,0 @@ -imports: - root: __package__.yml -service: - auth: false - base-path: '' - endpoints: - list: - path: /sites/{site_id}/products - method: GET - auth: - - OAuth2: - - ecommerce:read - docs: > - Retrieve all products for a site. - - - Use `limit` and `offset` to page through all products with subsequent - requests. All SKUs for each product - - will also be fetched and returned. The `limit`, `offset` and `total` - values represent Products only and do not include any SKUs. - - - Required scope | `ecommerce:read` - source: - openapi: ../../../openapi/referenced-specs/v2.yml - path-parameters: - site_id: - type: string - docs: Unique identifier for a Site - display-name: List Products & SKUs - request: - name: ProductsListRequest - query-parameters: - offset: - type: optional - docs: >- - Offset used for pagination if the results have more than limit - records - limit: - type: optional - docs: 'Maximum number of records to be returned (max limit: 100)' - response: - docs: Request was successful - type: root.ProductAndSkUsList - status-code: 200 - errors: - - root.BadRequestError - - root.UnauthorizedError - - root.ForbiddenError - - root.NotFoundError - - root.ConflictError - - root.TooManyRequestsError - - root.InternalServerError - examples: - - path-parameters: - site_id: 580e63e98c9a982ac9b8b741 - query-parameters: - offset: 1 - limit: 1 - response: - body: - items: - - product: - id: 660eb7a486d1d6e0412292d7 - cmsLocaleId: 653ad57de882f528b32e810e - lastPublished: '2024-04-04T14:24:19Z' - lastUpdated: '2024-04-04T14:30:19Z' - createdOn: '2024-04-04T14:22:28Z' - isArchived: false - isDraft: false - fieldData: - name: T-Shirt - slug: t-shirt - description: A plain cotton t-shirt. - shippable: true - sku-properties: - - id: Color - name: Color - enum: - - id: royal-blue - name: Royal Blue - slug: royal-blue - skus: - - id: 66072fb71b89448912e2681c - cmsLocaleId: 653ad57de882f528b32e810e - lastPublished: '2023-03-17T18:47:35Z' - lastUpdated: '2023-03-17T18:47:35Z' - createdOn: '2023-03-17T18:47:35Z' - fieldData: - sku-values: - color: blue - size: small - name: Colorful T-shirt - Default - slug: colorful-t-shirt-default - price: - value: 2499 - unit: USD - currency: USD - main-image: https://www.example.com/image.jpg - sku: '1234567890' - sku-properties: - - id: Color - name: Color - enum: - - id: royal-blue - name: Royal Blue - slug: royal-blue - pagination: - limit: 100 - offset: 0 - total: 100 - create: - path: /sites/{site_id}/products - method: POST - auth: - - OAuth2: - - ecommerce:write - docs: > - Create a new ecommerce product and defaultSKU. A product, at minimum, - must have a single SKU. - - - To create a product with multiple SKUs: - - First, create a list of `sku-properties`, also known as [product options](https://help.webflow.com/hc/en-us/articles/33961334531347-Create-product-options-and-variants). For example, a T-shirt product may have a "color" `sku-property`, with a list of enum values: red, yellow, and blue, another `sku-property` may be "size", with a list of enum values: small, medium, and large. - - Once, a product is created with a list of `sku-properties`, Webflow will create a **default SKU**, which is always a combination of the first `enum` values of each `sku-property`. (e.g. Small - Red - T-Shirt) - - After creation, you can create additional SKUs for the product, using the [Create SKUs endpoint.](/data/reference/ecommerce/products/create-sku) - - Upon creation, the default product type will be `Advanced`, which - ensures all Product and SKU fields will be shown to users in the - Designer. - - - Required scope | `ecommerce:write` - source: - openapi: ../../../openapi/referenced-specs/v2.yml - path-parameters: - site_id: - type: string - docs: Unique identifier for a Site - display-name: Create Product & SKU - request: - name: ProductSkuCreate - body: - properties: - publishStatus: optional - product: ProductSkuCreateProduct - sku: ProductSkuCreateSku - content-type: application/json - response: - docs: Request was successful - type: root.ProductAndSkUs - status-code: 200 - errors: - - root.BadRequestError - - root.UnauthorizedError - - root.ForbiddenError - - root.NotFoundError - - root.ConflictError - - root.TooManyRequestsError - - root.InternalServerError - examples: - - path-parameters: - site_id: 580e63e98c9a982ac9b8b741 - request: - publishStatus: staging - product: - fieldData: - name: Colorful T-shirt - slug: colorful-t-shirt - description: >- - Our best-selling t-shirt available in multiple colors and - sizes - sku-properties: - - id: color - name: Color - enum: - - id: red - name: Red - slug: red - - id: yellow - name: Yellow - slug: yellow - - id: blue - name: Blue - slug: blue - - id: size - name: Size - enum: - - id: small - name: Small - slug: small - - id: medium - name: Medium - slug: medium - - id: large - name: Large - slug: large - sku: - fieldData: - name: Colorful T-shirt - Red Small - slug: colorful-t-shirt-red-small - price: - value: 2499 - unit: USD - currency: USD - main-image: >- - https://rocketamp-sample-store.myshopify.com/cdn/shop/products/Gildan_2000_Antique_Cherry_Red_Front_1024x1024.jpg?v=1527232987 - response: - body: - product: - id: 660eb7a486d1d6e0412292d7 - cmsLocaleId: 653ad57de882f528b32e810e - lastPublished: '2024-04-04T14:24:19Z' - lastUpdated: '2024-04-04T14:30:19Z' - createdOn: '2024-04-04T14:22:28Z' - isArchived: false - isDraft: false - fieldData: - name: T-Shirt - slug: t-shirt - description: A plain cotton t-shirt. - shippable: true - sku-properties: - - id: Color - name: Color - enum: - - id: royal-blue - name: Royal Blue - slug: royal-blue - category: - - category - tax-category: standard-taxable - default-sku: default-sku - ec-product-type: ff42fee0113744f693a764e3431a9cc2 - skus: - - id: 66072fb71b89448912e2681c - cmsLocaleId: 653ad57de882f528b32e810e - lastPublished: '2023-03-17T18:47:35Z' - lastUpdated: '2023-03-17T18:47:35Z' - createdOn: '2023-03-17T18:47:35Z' - fieldData: - sku-values: - color: blue - size: small - name: Colorful T-shirt - Default - slug: colorful-t-shirt-default - price: - value: 2499 - unit: USD - currency: USD - main-image: https://www.example.com/image.jpg - sku: '1234567890' - sku-properties: - - id: Color - name: Color - enum: - - id: royal-blue - name: Royal Blue - slug: royal-blue - get: - path: /sites/{site_id}/products/{product_id} - method: GET - auth: - - OAuth2: - - ecommerce:read - docs: | - Retrieve a single product by its ID. All of its SKUs will also be - retrieved. - - Required scope | `ecommerce:read` - source: - openapi: ../../../openapi/referenced-specs/v2.yml - path-parameters: - site_id: - type: string - docs: Unique identifier for a Site - product_id: - type: string - docs: Unique identifier for a Product - display-name: Get Product and SKUs - response: - docs: Request was successful - type: root.ProductAndSkUs - status-code: 200 - errors: - - root.BadRequestError - - root.UnauthorizedError - - root.ForbiddenError - - root.NotFoundError - - root.ConflictError - - root.TooManyRequestsError - - root.InternalServerError - examples: - - path-parameters: - site_id: 580e63e98c9a982ac9b8b741 - product_id: 580e63fc8c9a982ac9b8b745 - response: - body: - product: - id: 660eb7a486d1d6e0412292d7 - cmsLocaleId: 653ad57de882f528b32e810e - lastPublished: '2024-04-04T14:24:19Z' - lastUpdated: '2024-04-04T14:30:19Z' - createdOn: '2024-04-04T14:22:28Z' - isArchived: false - isDraft: false - fieldData: - name: T-Shirt - slug: t-shirt - description: A plain cotton t-shirt. - shippable: true - sku-properties: - - id: Color - name: Color - enum: - - id: royal-blue - name: Royal Blue - slug: royal-blue - category: - - category - tax-category: standard-taxable - default-sku: default-sku - ec-product-type: ff42fee0113744f693a764e3431a9cc2 - skus: - - id: 66072fb71b89448912e2681c - cmsLocaleId: 653ad57de882f528b32e810e - lastPublished: '2023-03-17T18:47:35Z' - lastUpdated: '2023-03-17T18:47:35Z' - createdOn: '2023-03-17T18:47:35Z' - fieldData: - sku-values: - color: blue - size: small - name: Colorful T-shirt - Default - slug: colorful-t-shirt-default - price: - value: 2499 - unit: USD - currency: USD - main-image: https://www.example.com/image.jpg - sku: '1234567890' - sku-properties: - - id: Color - name: Color - enum: - - id: royal-blue - name: Royal Blue - slug: royal-blue - update: - path: /sites/{site_id}/products/{product_id} - method: PATCH - auth: - - OAuth2: - - ecommerce:write - docs: > - Update an existing Product. - - - Updating an existing Product will set the product type to `Advanced`, - which ensures all Product and SKU fields will be shown to users in the - Designer. - - - Required scope | `ecommerce:write` - source: - openapi: ../../../openapi/referenced-specs/v2.yml - path-parameters: - site_id: - type: string - docs: Unique identifier for a Site - product_id: - type: string - docs: Unique identifier for a Product - display-name: Update Product - request: - name: ProductSkuUpdate - body: - properties: - publishStatus: optional - product: optional - sku: optional - content-type: application/json - response: - docs: Request was successful - type: root.Product - status-code: 200 - errors: - - root.BadRequestError - - root.UnauthorizedError - - root.ForbiddenError - - root.NotFoundError - - root.ConflictError - - root.TooManyRequestsError - - root.InternalServerError - examples: - - path-parameters: - site_id: 580e63e98c9a982ac9b8b741 - product_id: 580e63fc8c9a982ac9b8b745 - request: {} - response: - body: - id: 660eb7a486d1d6e0412292d7 - cmsLocaleId: 653ad57de882f528b32e810e - lastPublished: '2024-04-04T14:24:19Z' - lastUpdated: '2024-04-04T14:30:19Z' - createdOn: '2024-04-04T14:22:28Z' - isArchived: false - isDraft: false - fieldData: - name: T-Shirt - slug: t-shirt - description: A plain cotton t-shirt. - shippable: true - sku-properties: - - id: Color - name: Color - enum: - - id: royal-blue - name: Royal Blue - slug: royal-blue - category: - - category - tax-category: standard-taxable - default-sku: default-sku - ec-product-type: ff42fee0113744f693a764e3431a9cc2 - create-sku: - path: /sites/{site_id}/products/{product_id}/skus - method: POST - auth: - - OAuth2: - - ecommerce:write - docs: > - Create additional SKUs to manage every [option and variant of your - Product.](https://help.webflow.com/hc/en-us/articles/33961334531347-Create-product-options-and-variants) - - - Creating SKUs through the API will set the product type to `Advanced`, - which ensures all Product and SKU fields will be shown to users in the - Designer. - - - Required scope | `ecommerce:write` - source: - openapi: ../../../openapi/referenced-specs/v2.yml - path-parameters: - site_id: - type: string - docs: Unique identifier for a Site - product_id: - type: string - docs: Unique identifier for a Product - display-name: Create SKUs - request: - name: ProductsCreateSkuRequest - body: - properties: - publishStatus: optional - skus: - docs: An array of the SKU data your are adding - type: list - content-type: application/json - response: - docs: Request was successful - type: ProductsCreateSkuResponse - status-code: 200 - errors: - - root.BadRequestError - - root.UnauthorizedError - - root.ForbiddenError - - root.NotFoundError - - root.ConflictError - - root.TooManyRequestsError - - root.InternalServerError - examples: - - path-parameters: - site_id: 580e63e98c9a982ac9b8b741 - product_id: 580e63fc8c9a982ac9b8b745 - request: - skus: - - id: 66072fb71b89448912e2681c - cmsLocaleId: 653ad57de882f528b32e810e - lastPublished: '2023-03-17T18:47:35Z' - lastUpdated: '2023-03-17T18:47:35Z' - createdOn: '2023-03-17T18:47:35Z' - fieldData: - name: Colorful T-shirt - Default - slug: colorful-t-shirt-default - price: - value: 2499 - unit: USD - currency: USD - response: - body: - skus: - - id: 66072fb71b89448912e2681c - cmsLocaleId: 653ad57de882f528b32e810e - lastPublished: '2023-03-17T18:47:35Z' - lastUpdated: '2023-03-17T18:47:35Z' - createdOn: '2023-03-17T18:47:35Z' - fieldData: - sku-values: - color: blue - size: small - name: Colorful T-shirt - Default - slug: colorful-t-shirt-default - price: - value: 2499 - unit: USD - currency: USD - main-image: https://www.example.com/image.jpg - sku: '1234567890' - sku-properties: - - id: Color - name: Color - enum: - - id: royal-blue - name: Royal Blue - slug: royal-blue - update-sku: - path: /sites/{site_id}/products/{product_id}/skus/{sku_id} - method: PATCH - auth: - - OAuth2: - - ecommerce:write - docs: > - Update a specified SKU. - - - Updating an existing SKU will set the Product type to `Advanced`, which - ensures all Product and SKU fields will be shown to users in the - Designer. - - - Required scope | `ecommerce:write` - source: - openapi: ../../../openapi/referenced-specs/v2.yml - path-parameters: - site_id: - type: string - docs: Unique identifier for a Site - product_id: - type: string - docs: Unique identifier for a Product - sku_id: - type: string - docs: Unique identifier for a SKU - display-name: Update SKU - request: - name: ProductsUpdateSkuRequest - body: - properties: - publishStatus: optional - sku: root.Sku - content-type: application/json - response: - docs: Request was successful - type: root.Sku - status-code: 200 - errors: - - root.BadRequestError - - root.UnauthorizedError - - root.ForbiddenError - - root.NotFoundError - - root.ConflictError - - root.TooManyRequestsError - - root.InternalServerError - examples: - - path-parameters: - site_id: 580e63e98c9a982ac9b8b741 - product_id: 580e63fc8c9a982ac9b8b745 - sku_id: 5e8518516e147040726cc415 - request: - sku: - id: 66072fb71b89448912e2681c - cmsLocaleId: 653ad57de882f528b32e810e - lastPublished: '2023-03-17T18:47:35Z' - lastUpdated: '2023-03-17T18:47:35Z' - createdOn: '2023-03-17T18:47:35Z' - fieldData: - name: Colorful T-shirt - Default - slug: colorful-t-shirt-default - price: - value: 2499 - unit: USD - currency: USD - response: - body: - id: 66072fb71b89448912e2681c - cmsLocaleId: 653ad57de882f528b32e810e - lastPublished: '2023-03-17T18:47:35Z' - lastUpdated: '2023-03-17T18:47:35Z' - createdOn: '2023-03-17T18:47:35Z' - fieldData: - sku-values: - color: blue - size: small - name: Colorful T-shirt - Default - slug: colorful-t-shirt-default - price: - value: 2499 - unit: USD - currency: USD - compare-at-price: - value: 100 - unit: USD - ec-sku-billing-method: one-time - ec-sku-subscription-plan: - interval: day - frequency: 1 - trial: 7 - plans: - - {} - main-image: https://www.example.com/image.jpg - sku: '1234567890' - sku-properties: - - id: Color - name: Color - enum: - - id: royal-blue - name: Royal Blue - slug: royal-blue - source: - openapi: ../../../openapi/referenced-specs/v2.yml -types: - ProductSkuCreateProduct: - properties: - fieldData: optional - source: - openapi: ../../../openapi/referenced-specs/v2.yml - inline: true - ProductSkuCreateSku: - properties: - fieldData: optional - source: - openapi: ../../../openapi/referenced-specs/v2.yml - inline: true - ProductsCreateSkuResponse: - properties: - skus: list - source: - openapi: ../../../openapi/referenced-specs/v2.yml diff --git a/.mock/definition/scripts.yml b/.mock/definition/scripts.yml deleted file mode 100644 index 089d5f8..0000000 --- a/.mock/definition/scripts.yml +++ /dev/null @@ -1,236 +0,0 @@ -imports: - root: __package__.yml -service: - auth: false - base-path: '' - endpoints: - list: - path: /sites/{site_id}/registered_scripts - method: GET - auth: - - OAuth2: - - custom_code:read - docs: > - Get a list of scripts that have been registered to a site. A site can - have a maximum of 800 registered scripts. - - - - To apply a script to a site or page, the script must first be registered to a site via the [Register Script](/data/reference/custom-code/custom-code/register-hosted) endpoints. Once registered, the script can be applied to a Site or Page using the appropriate endpoints. See the documentation on [working with Custom Code](/data/docs/custom-code) for more information. - - - - Required scope | `custom_code:read` - source: - openapi: ../../../openapi/referenced-specs/v2.yml - path-parameters: - site_id: - type: string - docs: Unique identifier for a Site - display-name: Get Registered Scripts - response: - docs: Request was successful - type: root.RegisteredScriptList - status-code: 200 - errors: - - root.BadRequestError - - root.UnauthorizedError - - root.NotFoundError - - root.TooManyRequestsError - - root.InternalServerError - examples: - - path-parameters: - site_id: 580e63e98c9a982ac9b8b741 - response: - body: - registeredScripts: - - id: alert - canCopy: false - displayName: Alert - hostedLocation: https://cdn.webflow.io/.../alert-0.0.1.js - integrityHash: integrityHash - createdOn: '2022-10-26T00:28:54.191Z' - lastUpdated: lastUpdated - version: 0.0.1 - - id: alert - canCopy: false - displayName: Alert - hostedLocation: https://cdn.webflow.io/.../alert-0.0.2.js - integrityHash: integrityHash - createdOn: '2022-10-26T00:28:54.191Z' - lastUpdated: lastUpdated - version: 0.0.2 - - id: cms_slider - canCopy: true - displayName: CMS Slider - hostedLocation: https://cdn.jsdelivr.net/.../cms_slider.js - integrityHash: >- - sha384-J+YlJ8v0gpaRoKH7SbFbEmxOZlAxLiwNjfSsBhDooGa5roXlPPpXbEevck4J7YZ+ - createdOn: '2022-10-26T00:28:54.191Z' - lastUpdated: lastUpdated - version: 1.0.0 - pagination: - limit: 100 - offset: 0 - total: 3 - register-hosted: - path: /sites/{site_id}/registered_scripts/hosted - method: POST - auth: - - OAuth2: - - custom_code:write - docs: | - Register a hosted script to a site. - - - To apply a script to a site or page, the script must first be registered to a site via the [Register Script](/data/reference/custom-code/custom-code/register-hosted) endpoints. Once registered, the script can be applied to a Site or Page using the appropriate endpoints. See the documentation on [working with Custom Code](/data/docs/custom-code) for more information. - - - Required scope | `custom_code:write` - source: - openapi: ../../../openapi/referenced-specs/v2.yml - path-parameters: - site_id: - type: string - docs: Unique identifier for a Site - display-name: Register Script - Hosted - request: - name: CustomCodeHostedRequest - body: - properties: - hostedLocation: - type: string - docs: URI for an externally hosted script location - integrityHash: - type: string - docs: Sub-Resource Integrity Hash - canCopy: - type: optional - docs: >- - Define whether the script can be copied on site duplication and - transfer - default: false - version: - type: string - docs: >- - A Semantic Version (SemVer) string, denoting the version of the - script - displayName: - type: string - docs: >- - User-facing name for the script. Must be between 1 and 50 - alphanumeric characters - content-type: application/json - response: - docs: Request was successful - type: root.CustomCodeHostedResponse - status-code: 201 - errors: - - root.BadRequestError - - root.UnauthorizedError - - root.NotFoundError - - root.TooManyRequestsError - - root.InternalServerError - examples: - - path-parameters: - site_id: 580e63e98c9a982ac9b8b741 - request: - hostedLocation: hostedLocation - integrityHash: integrityHash - version: version - displayName: displayName - response: - body: - id: cms_slider - canCopy: true - displayName: CMS Slider - hostedLocation: https://cdn.jsdelivr.net/.../cmsslider.js - integrityHash: >- - sha384-J+YlJ8v0gpaRoKH7SbFbEmxOZlAxLiwNjfSsBhDooGa5roXlPPpXbEevck4J7YZ+ - createdOn: '2022-10-26T00:28:54.191Z' - lastUpdated: lastUpdated - version: 1.0.0 - register-inline: - path: /sites/{site_id}/registered_scripts/inline - method: POST - auth: - - OAuth2: - - custom_code:write - docs: > - Register an inline script to a site. Inline scripts are limited to 2000 - characters. - - - - To apply a script to a site or page, the script must first be registered to a site via the [Register Script](/data/reference/custom-code/custom-code/register-hosted) endpoints. Once registered, the script can be applied to a Site or Page using the appropriate endpoints. See the documentation on [working with Custom Code](/data/docs/custom-code) for more information. - - - - Required scope | `custom_code:write` - source: - openapi: ../../../openapi/referenced-specs/v2.yml - path-parameters: - site_id: - type: string - docs: Unique identifier for a Site - display-name: Register Script - Inline - request: - name: CustomCodeInlineRequest - body: - properties: - sourceCode: - type: string - docs: The code to be added to the site (to be hosted by Webflow). - integrityHash: - type: optional - docs: >- - Sub-Resource Integrity Hash. Only required for externally hosted - scripts (passed via hostedLocation) - canCopy: - type: optional - docs: >- - Define whether the script can be copied on site duplication and - transfer - default: false - version: - type: string - docs: >- - A Semantic Version (SemVer) string, denoting the version of the - script - displayName: - type: string - docs: >- - User-facing name for the script. Must be between 1 and 50 - alphanumeric characters - content-type: application/json - response: - docs: Created - type: root.CustomCodeInlineResponse - status-code: 201 - errors: - - root.BadRequestError - - root.UnauthorizedError - - root.NotFoundError - - root.TooManyRequestsError - - root.InternalServerError - examples: - - name: CustomCodeInlineResponse - path-parameters: - site_id: 580e63e98c9a982ac9b8b741 - request: - sourceCode: alert('hello world'); - version: 0.0.1 - displayName: Alert - response: - body: - id: alert - canCopy: false - displayName: Alert - hostedLocation: >- - https://uploads-ssl.webflow.com/6258612d1ee792848f805dcf%2F64b6c769ff52ba6c3d904a91%2F660d6e15b3d1696f2d2b1447%2Falert-0.0.1.js - integrityHash: integrityHash - createdOn: '2022-10-26T00:28:54.191Z' - lastUpdated: lastUpdated - version: 0.0.1 - source: - openapi: ../../../openapi/referenced-specs/v2.yml diff --git a/.mock/definition/sites.yml b/.mock/definition/sites.yml deleted file mode 100644 index ebc7cd0..0000000 --- a/.mock/definition/sites.yml +++ /dev/null @@ -1,558 +0,0 @@ -imports: - root: __package__.yml -service: - auth: false - base-path: '' - endpoints: - create: - path: /workspaces/{workspace_id}/sites - method: POST - auth: - - OAuth2: - - sites:write - docs: > - Create a site. - - - This endpoint requires an Enterprise - workspace. - - - Required scope | `workspace:write` - source: - openapi: ../../../openapi/referenced-specs/v2.yml - path-parameters: - workspace_id: - type: string - docs: Unique identifier for a Workspace - display-name: Create Site - request: - name: SitesCreateRequest - body: - properties: - name: - type: string - docs: The name of the site - templateName: - type: optional - docs: The workspace or marketplace template to use - parentFolderId: - type: optional - docs: MegaDodo Publications - Potential Book Ideas - content-type: application/json - response: - docs: Request was successful - type: root.Site - status-code: 201 - errors: - - root.BadRequestError - - root.UnauthorizedError - - root.ForbiddenError - - root.NotFoundError - - root.TooManyRequestsError - - root.InternalServerError - examples: - - name: NewlyCreatedSite - path-parameters: - workspace_id: 580e63e98c9a982ac9b8b741 - request: - name: The Hitchhiker's Guide to the Galaxy - response: - body: - id: 670ecf86817e3cc7a510eb6a - workspaceId: 625860a7a6c16d624927122f - createdOn: '2024-10-15T20:24:38Z' - displayName: The Hitchiker's Guide - shortName: hitchikers-guide - lastPublished: '2016-10-24T19:43:17Z' - lastUpdated: '2024-10-15T20:24:38Z' - previewUrl: >- - https://dev-assets.website-files.com/580e63e98c9a982ac9b8b741/201610241243.png - timeZone: America/Los_Angeles - parentFolderId: 670ece123598db72d9648be1 - customDomains: - - id: 589a331aa51e760df7ccb89d - url: test-api-domain.com - lastPublished: '2022-12-07T16:51:37Z' - locales: - primary: - id: 653fd9af6a07fc9cfd7a5e57 - cmsLocaleId: 653ad57de882f528b32e810e - enabled: false - displayName: English (United States) - displayImageId: displayImageId - redirect: true - subdirectory: '' - tag: en-US - secondary: - - id: 653fd9af6a07fc9cfd7a5e57 - cmsLocaleId: 653ad57de882f528b32e810e - enabled: false - displayName: English (United States) - redirect: true - subdirectory: '' - tag: en-US - dataCollectionEnabled: true - dataCollectionType: always - list: - path: /sites - method: GET - auth: - - OAuth2: - - sites:read - docs: | - List of all sites the provided access token is able to access. - - Required scope | `sites:read` - source: - openapi: ../../../openapi/referenced-specs/v2.yml - display-name: List Sites - response: - docs: Request was successful - type: root.Sites - status-code: 200 - errors: - - root.UnauthorizedError - - root.NotFoundError - - root.TooManyRequestsError - examples: - - response: - body: - sites: - - id: 42e63e98c9a982ac9b8b741 - workspaceId: 42e63fc8c9a982ac9b8b744 - createdOn: '1979-10-12T12:00:00Z' - displayName: Heart of Gold Spaceship - shortName: heart-of-gold - lastPublished: '2023-04-02T12:42:00Z' - lastUpdated: '2016-10-24T19:43:17Z' - previewUrl: >- - https://dev-assets.website-files.com/42e63e98c9a982ac9b8b741/197910121200.png - timeZone: DeepSpace/InfiniteImprobability - parentFolderId: 1as2d3f4g5h6j7k8l9z0x1c2v3b4n5m6 - customDomains: - - id: 589a331aa51e760df7ccb89e - url: heartofgold.galaxy - lastPublished: '2022-12-07T16:51:37Z' - locales: - primary: - id: 653fd9af6a07fc9cfd7a5e57 - cmsLocaleId: 653ad57de882f528b32e810e - enabled: true - displayName: English - Heart of Gold Standard - redirect: false - subdirectory: /en - tag: The Ultimate Answer - secondary: - - id: 653fd9af6a07fc9cfd7a5e58 - cmsLocaleId: 653ad57de882f528b32e810g - enabled: true - displayName: Betelgeusian - Vogon Liaison - redirect: true - subdirectory: /bet - tag: Vogon - - id: 653fd9af6a07fc9cfd7a5e59 - cmsLocaleId: 653ad57de882f528b32e810h - enabled: false - displayName: Magrathean - Custom Planet Designs - redirect: true - subdirectory: /mg - tag: Magrathean - dataCollectionEnabled: true - dataCollectionType: always - - id: 42e63e98c9a982ac9b8b742 - workspaceId: 42e63fc8c9a982ac9b8b745 - createdOn: '1981-10-12T12:00:00Z' - displayName: Marvin's Personal Blog - shortName: paranoid-android - lastPublished: '2023-04-02T12:45:00Z' - lastUpdated: '2016-10-24T19:43:17Z' - previewUrl: >- - https://dev-assets.website-files.com/42e63e98c9a982ac9b8b742/198110121200.png - timeZone: DeepSpace/Depression - parentFolderId: 1as2d3f4g5h6j7k8l9z0x1c2v3b4n5m6 - customDomains: - - id: 589a331aa51e760df7ccb89f - url: marvin.blog - lastPublished: '2022-12-07T16:51:37Z' - locales: - primary: - id: 653fd9af6a07fc9cfd7a5e57 - cmsLocaleId: 653ad57de882f528b32e810e - enabled: true - displayName: English - Marvin's Musings - redirect: false - subdirectory: /en - tag: English - secondary: - - id: 653fd9af6a07fc9cfd7a5e56 - cmsLocaleId: 653ad57de882f528b32e810f - enabled: true - displayName: Squornshellous - Mattress Speak - redirect: true - subdirectory: /sr - tag: Squornshellous - dataCollectionEnabled: true - dataCollectionType: always - - id: 42e63e98c9a982ac9b8b743 - workspaceId: 42e63fc8c9a982ac9b8b746 - createdOn: '1982-10-12T12:00:00Z' - displayName: Vogon Poetry Archive - shortName: vogon-poetry - lastPublished: '2023-04-02T12:50:00Z' - lastUpdated: '2016-10-24T19:43:17Z' - previewUrl: >- - https://dev-assets.website-files.com/42e63e98c9a982ac9b8b743/198210121200.png - timeZone: Vogsphere/PoetryHall - parentFolderId: 1as2d3f4g5h6j7k8l9z0x1c2v3b4n5m6 - customDomains: - - id: 589a331aa51e760df7ccb8a0 - url: vogonpoetry.galaxy - lastPublished: '2022-12-07T16:51:37Z' - locales: - primary: - id: 653fd9af6a07fc9cfd7a5e55 - cmsLocaleId: 653ad57de882f528b32e810d - enabled: true - displayName: English - Vogon Verse - redirect: false - subdirectory: /en - tag: Third Worst Poetry - secondary: - - id: 653fd9af6a07fc9cfd7a5e54 - cmsLocaleId: 653ad57de882f528b32e810c - enabled: true - displayName: Galactic - Universal Language - redirect: true - subdirectory: /gl - tag: Pan-Galactic Gargle Blaster - dataCollectionEnabled: true - dataCollectionType: always - get: - path: /sites/{site_id} - method: GET - auth: - - OAuth2: - - sites:read - docs: | - Get details of a site. - - Required scope | `sites:read` - source: - openapi: ../../../openapi/referenced-specs/v2.yml - path-parameters: - site_id: - type: string - docs: Unique identifier for a Site - display-name: Get Site - response: - docs: Request was successful - type: root.Site - status-code: 200 - errors: - - root.BadRequestError - - root.UnauthorizedError - - root.NotFoundError - - root.TooManyRequestsError - - root.InternalServerError - examples: - - name: SiteWithLocales - path-parameters: - site_id: 580e63e98c9a982ac9b8b741 - response: - body: - id: 42e98c9a982ac9b8b742 - workspaceId: 42e63e98c9a982ac9b8b742 - createdOn: '1979-10-12T12:00:00Z' - displayName: The Hitchhiker's Guide to the Galaxy - shortName: hitchhikers-guide - lastPublished: '2023-04-02T12:42:00Z' - lastUpdated: '2023-04-02T12:42:00Z' - previewUrl: >- - https://screenshots.webflow.com/sites/6258612d1ee792848f805dcf/20231219211811_d5990556c743f33b7071300a03bf67e6.png - timeZone: Magrathea/FactoryFloor - parentFolderId: 1as2d3f4g5h6j7k8l9z0x1c2v3b4n5m6 - customDomains: - - id: 589a331aa51e760df7ccb89d - url: hitchhikersguide.galaxy - lastPublished: '2022-12-07T16:51:37Z' - - id: 589a331aa51e760df7ccb89e - url: heartofgold.spaceship - lastPublished: '2022-12-07T16:51:37Z' - locales: - primary: - id: 653fd9af6a07fc9cfd7a5e57 - cmsLocaleId: 653ad57de882f528b32e810e - enabled: false - displayName: English (United States) - displayImageId: displayImageId - redirect: true - subdirectory: '' - tag: en-US - secondary: - - id: 653fd9af6a07fc9cfd7a5e57 - cmsLocaleId: 653ad57de882f528b32e810e - enabled: false - displayName: English (United States) - redirect: true - subdirectory: '' - tag: en-US - dataCollectionEnabled: true - dataCollectionType: always - delete: - path: /sites/{site_id} - method: DELETE - auth: - - OAuth2: - - sites:write - docs: > - Delete a site. - - - This endpoint requires an Enterprise - workspace. - - - Required scope | `sites:write` - source: - openapi: ../../../openapi/referenced-specs/v2.yml - path-parameters: - site_id: - type: string - docs: Unique identifier for a Site - display-name: Delete Site - errors: - - root.BadRequestError - - root.UnauthorizedError - - root.ForbiddenError - - root.NotFoundError - - root.TooManyRequestsError - - root.InternalServerError - examples: - - path-parameters: - site_id: 580e63e98c9a982ac9b8b741 - update: - path: /sites/{site_id} - method: PATCH - auth: - - OAuth2: - - sites:write - docs: > - Update a site. - - - This endpoint requires an Enterprise - workspace. - - - Required scope | `sites:write` - source: - openapi: ../../../openapi/referenced-specs/v2.yml - path-parameters: - site_id: - type: string - docs: Unique identifier for a Site - display-name: Update Site - request: - name: SitesUpdateRequest - body: - properties: - name: - type: optional - docs: The name of the site - parentFolderId: - type: optional - docs: The parent folder ID of the site - content-type: application/json - response: - docs: Request was successful - type: root.Site - status-code: 200 - errors: - - root.BadRequestError - - root.UnauthorizedError - - root.ForbiddenError - - root.NotFoundError - - root.TooManyRequestsError - - root.InternalServerError - examples: - - path-parameters: - site_id: 580e63e98c9a982ac9b8b741 - request: {} - response: - body: - id: 42e98c9a982ac9b8b742 - workspaceId: 42e63e98c9a982ac9b8b742 - createdOn: '1979-10-12T12:00:00Z' - displayName: The Hitchhiker's Guide to the Galaxy - shortName: hitchhikers-guide - lastPublished: '2023-04-02T12:42:00Z' - lastUpdated: '2023-04-02T12:42:00Z' - previewUrl: >- - https://screenshots.webflow.com/sites/6258612d1ee792848f805dcf/20231219211811_d5990556c743f33b7071300a03bf67e6.png - timeZone: Magrathea/FactoryFloor - parentFolderId: 1as2d3f4g5h6j7k8l9z0x1c2v3b4n5m6 - customDomains: - - id: 589a331aa51e760df7ccb89d - url: hitchhikersguide.galaxy - lastPublished: '2022-12-07T16:51:37Z' - - id: 589a331aa51e760df7ccb89e - url: heartofgold.spaceship - lastPublished: '2022-12-07T16:51:37Z' - locales: - primary: - id: 653fd9af6a07fc9cfd7a5e57 - cmsLocaleId: 653ad57de882f528b32e810e - enabled: false - displayName: English (United States) - displayImageId: displayImageId - redirect: true - subdirectory: '' - tag: en-US - secondary: - - id: 653fd9af6a07fc9cfd7a5e57 - cmsLocaleId: 653ad57de882f528b32e810e - enabled: false - displayName: English (United States) - redirect: true - subdirectory: '' - tag: en-US - dataCollectionEnabled: true - dataCollectionType: always - get-custom-domain: - path: /sites/{site_id}/custom_domains - method: GET - auth: - - OAuth2: - - sites:read - docs: | - Get a list of all custom domains related to site. - - Required scope | `sites:read` - source: - openapi: ../../../openapi/referenced-specs/v2.yml - path-parameters: - site_id: - type: string - docs: Unique identifier for a Site - display-name: Get Custom Domains - response: - docs: Request was successful - type: root.Domains - status-code: 200 - errors: - - root.UnauthorizedError - - root.ForbiddenError - - root.NotFoundError - - root.TooManyRequestsError - - root.InternalServerError - examples: - - path-parameters: - site_id: 580e63e98c9a982ac9b8b741 - response: - body: - customDomains: - - id: 589a331aa51e760df7ccb89d - url: hitchhikersguide.galaxy - lastPublished: '2022-12-07T16:51:37Z' - - id: 589a331aa51e760df7ccb89e - url: heartofgold.spaceship - lastPublished: '2022-12-07T16:51:37Z' - publish: - path: /sites/{site_id}/publish - method: POST - auth: - - OAuth2: - - sites:write - docs: > - Publishes a site to one or more more domains. - - - To publish to a specific custom domain, use the domain IDs from the [Get - Custom Domains](/data/reference/sites/get-custom-domain) endpoint. - - - This endpoint has a - specific rate limit of one successful publish queue per minute. - - - Required scope | `sites:write` - source: - openapi: ../../../openapi/referenced-specs/v2.yml - path-parameters: - site_id: - type: string - docs: Unique identifier for a Site - display-name: Publish Site - request: - name: SitesPublishRequest - body: - properties: - customDomains: - type: optional> - docs: Array of Custom Domain IDs to publish - publishToWebflowSubdomain: - type: optional - docs: Choice of whether to publish to the default Webflow Subdomain - default: false - content-type: application/json - response: - docs: Request accepted - type: SitesPublishResponse - status-code: 202 - errors: - - root.BadRequestError - - root.UnauthorizedError - - root.ForbiddenError - - root.NotFoundError - - root.TooManyRequestsError - examples: - - name: DomainIDs - path-parameters: - site_id: 580e63e98c9a982ac9b8b741 - request: - customDomains: - - 660c6449dd97ebc7346ac629 - - 660c6449dd97ebc7346ac62f - publishToWebflowSubdomain: false - response: - body: - customDomains: - - id: 589a331aa51e760df7ccb89d - url: test-api-domain.com - lastPublished: '2022-12-07T16:51:37Z' - publishToWebflowSubdomain: true - source: - openapi: ../../../openapi/referenced-specs/v2.yml - display-name: Sites -docs: Sites are the sites in your Webflow workspace. -types: - SitesPublishResponse: - properties: - customDomains: - type: optional> - docs: Array of domains objects - publishToWebflowSubdomain: - type: optional - docs: Flag for publishing to webflow.io subdomain - default: false - source: - openapi: ../../../openapi/referenced-specs/v2.yml -webhooks: - site_publish: - audiences: [] - method: POST - display-name: Site Publish - headers: {} - payload: root.SitePublish - examples: - - payload: - triggerType: site_publish - payload: - siteId: 62749158efef318abc8d5a0f - publishedOn: '2024-07-26T16:43:20Z' - domains: - - heartofgold.webflow.io - publishedBy: - displayName: Zaphod BeebleBrox - docs: Information about a site that was published diff --git a/.mock/definition/sites/activityLogs.yml b/.mock/definition/sites/activityLogs.yml deleted file mode 100644 index 01f30f9..0000000 --- a/.mock/definition/sites/activityLogs.yml +++ /dev/null @@ -1,77 +0,0 @@ -imports: - root: ../__package__.yml -service: - auth: false - base-path: '' - endpoints: - list: - path: /sites/{site_id}/activity_logs - method: GET - auth: - - OAuth2: - - site_activity:read - docs: > - Retrieve Activity Logs for a specific Site. - - - This endpoint requires an Enterprise - workspace. - - - Required scope: `site_activity:read` - source: - openapi: ../../../openapi/referenced-specs/v2.yml - path-parameters: - site_id: - type: string - docs: Unique identifier for a Site - display-name: Get Site Activity Logs - request: - name: ActivityLogsListRequest - query-parameters: - limit: - type: optional - docs: 'Maximum number of records to be returned (max limit: 100)' - offset: - type: optional - docs: >- - Offset used for pagination if the results have more than limit - records - response: - docs: A list of site activity logs - type: root.SiteActivityLogResponse - status-code: 200 - errors: - - root.ForbiddenError - - root.NotFoundError - - root.TooManyRequestsError - - root.InternalServerError - examples: - - path-parameters: - site_id: 580e63e98c9a982ac9b8b741 - query-parameters: - limit: 1 - offset: 1 - response: - body: - items: - - id: 654c16c7b229e56bcf26872d - createdOn: '2023-11-08T23:16:23Z' - lastUpdated: '2023-11-08T23:16:23Z' - event: cms_collection - resourceOperation: CREATED - user: - id: 6509cd56e90eec668b009712 - displayName: John Doe - resourceId: 654c16c7b229e56bcf26870c - resourceName: foo-bar - newValue: newValue - previousValue: previousValue - payload: - key: value - pagination: - limit: 25 - offset: 0 - total: 1 - source: - openapi: ../../../openapi/referenced-specs/v2.yml diff --git a/.mock/definition/sites/comments.yml b/.mock/definition/sites/comments.yml deleted file mode 100644 index 3885152..0000000 --- a/.mock/definition/sites/comments.yml +++ /dev/null @@ -1,352 +0,0 @@ -types: - CommentsListCommentThreadsRequestSortBy: - enum: - - createdOn - - lastUpdated - source: - openapi: ../../../openapi/referenced-specs/v2.yml - CommentsListCommentThreadsRequestSortOrder: - enum: - - asc - - desc - source: - openapi: ../../../openapi/referenced-specs/v2.yml - CommentsGetCommentThreadRequestSortBy: - enum: - - createdOn - - lastUpdated - source: - openapi: ../../../openapi/referenced-specs/v2.yml - CommentsGetCommentThreadRequestSortOrder: - enum: - - asc - - desc - source: - openapi: ../../../openapi/referenced-specs/v2.yml - CommentsListCommentRepliesRequestSortBy: - enum: - - createdOn - - lastUpdated - source: - openapi: ../../../openapi/referenced-specs/v2.yml - CommentsListCommentRepliesRequestSortOrder: - enum: - - asc - - desc - source: - openapi: ../../../openapi/referenced-specs/v2.yml -imports: - root: ../__package__.yml -service: - auth: false - base-path: '' - endpoints: - list-comment-threads: - path: /sites/{site_id}/comments - method: GET - auth: - - OAuth2: - - comments:read - docs: | - List all comment threads for a site. - - - There may be a delay of up to 5 minutes before new comments appear in the system. - - - Required scope | `comments:read` - source: - openapi: ../../../openapi/referenced-specs/v2.yml - path-parameters: - site_id: - type: string - docs: Unique identifier for a Site - display-name: List Comment Threads - request: - name: CommentsListCommentThreadsRequest - query-parameters: - localeId: - type: optional - docs: > - Unique identifier for a specific Locale. - - - [Lear more about - localization.](/data/v2.0.0/docs/working-with-localization) - offset: - type: optional - docs: >- - Offset used for pagination if the results have more than limit - records - limit: - type: optional - docs: 'Maximum number of records to be returned (max limit: 100)' - sortBy: - type: optional - docs: >- - Sort results by the provided value. Only allowed when sortOrder is - provided. - sortOrder: - type: optional - docs: Sorts the results by asc or desc - response: - docs: Request was successful - type: root.CommentThreadList - status-code: 200 - errors: - - root.BadRequestError - - root.UnauthorizedError - - root.NotFoundError - - root.TooManyRequestsError - - root.InternalServerError - examples: - - path-parameters: - site_id: 580e63e98c9a982ac9b8b741 - query-parameters: - localeId: 65427cf400e02b306eaa04a0 - offset: 1 - limit: 1 - sortBy: createdOn - sortOrder: asc - response: - body: - comments: - - id: 679d2ddb5196117ad04d1ffa - siteId: 679826b3b20b045e176bc4b5 - pageId: 679826b3b20b045e176bc4bc - localeId: 67993753d910db250db64b3e - itemId: 580e64008c9a982ac9b8b754 - breakpoint: main - url: >- - https://webflow.com/design/site-slug-4ec832?workflow=comment&commentId=679d2ddb5196117ad04d1ff8&pageId=679826b3b20b045e176bc4bc - content: 'Let''s go to the pub! [[6287ec36a841b25637c663df]] ' - isResolved: false - author: - userId: 6287ec36a841b25637c663df - email: ford.prefect@heartofgold.spaceship - name: Ford Prefect - mentionedUsers: - - userId: 6287ec36a841b25637c663df - email: arthur.dent@heartofgold.spaceship - name: Arthur Dent - createdOn: '2025-01-31T20:08:59.759Z' - lastUpdated: '2025-01-31T20:08:59.759Z' - - id: 679d2ddb5196117ad04d1ffc - siteId: 679826b3b20b045e176bc4b5 - pageId: 679826b3b20b045e176bc4bc - localeId: 67993753d910db250db64b3e - itemId: 580e64008c9a982ac9b8b754 - breakpoint: main - url: >- - https://webflow.com/design/site-slug-4ec832?workflow=comment&commentId=679d2ddb5196117ad04d1ff8&pageId=679826b3b20b045e176bc4bc - content: >- - You have five minutes left to drink it - [[6287ec36a841b25637c663df]] - isResolved: false - author: - userId: 6287ec36a841b25637c663df - email: ford.prefect@heartofgold.spaceship - name: Ford Prefect - mentionedUsers: - - userId: 6287ec36a841b25637c663df - email: arthur.dent@heartofgold.spaceship - name: Arthur Dent - createdOn: '2025-01-31T20:08:59.759Z' - lastUpdated: '2025-01-31T20:08:59.759Z' - pagination: - limit: 2 - offset: 0 - total: 2 - get-comment-thread: - path: /sites/{site_id}/comments/{comment_thread_id} - method: GET - auth: - - OAuth2: - - comments:read - docs: | - Get details of a specific comment thread. - - - There may be a delay of up to 5 minutes before new comments appear in the system. - - - Required scope | `comments:read` - source: - openapi: ../../../openapi/referenced-specs/v2.yml - path-parameters: - site_id: - type: string - docs: Unique identifier for a Site - comment_thread_id: - type: string - docs: Unique identifier for a Comment Thread - display-name: Get Comment Thread - request: - name: CommentsGetCommentThreadRequest - query-parameters: - localeId: - type: optional - docs: > - Unique identifier for a specific Locale. - - - [Lear more about - localization.](/data/v2.0.0/docs/working-with-localization) - offset: - type: optional - docs: >- - Offset used for pagination if the results have more than limit - records - limit: - type: optional - docs: 'Maximum number of records to be returned (max limit: 100)' - sortBy: - type: optional - docs: >- - Sort results by the provided value. Only allowed when sortOrder is - provided. - sortOrder: - type: optional - docs: Sorts the results by asc or desc - response: - docs: Request was successful - type: root.CommentThread - status-code: 200 - errors: - - root.BadRequestError - - root.UnauthorizedError - - root.NotFoundError - - root.TooManyRequestsError - - root.InternalServerError - examples: - - path-parameters: - site_id: 580e63e98c9a982ac9b8b741 - comment_thread_id: 580e63e98c9a982ac9b8b741 - query-parameters: - localeId: 65427cf400e02b306eaa04a0 - offset: 1 - limit: 1 - sortBy: createdOn - sortOrder: asc - response: - body: - id: 580e64008c9a982ac9b8b754 - siteId: 580e64008c9a982ac9b8b754 - pageId: 580e64008c9a982ac9b8b754 - localeId: 580e64008c9a982ac9b8b754 - itemId: 580e64008c9a982ac9b8b754 - breakpoint: main - url: >- - https://webflow.com/design/site-slug-4ec832?workflow=comment&commentId=679d2ddb5196117ad04d1ff8&pageId=679826b3b20b045e176bc4bc - content: This is a comment reply - isResolved: true - author: - userId: userId - email: email - name: name - mentionedUsers: - - userId: 6287ec36a841b25637c663df - email: arthur.dent@heartofgold.spaceship - name: Arthur Dent - createdOn: '2023-03-17T18:47:35.560Z' - lastUpdated: '2023-03-17T18:47:35.560Z' - list-comment-replies: - path: /sites/{site_id}/comments/{comment_thread_id}/replies - method: GET - auth: - - OAuth2: - - comments:read - docs: | - List all replies to a specific comment thread. - - - There may be a delay of up to 5 minutes before new comments appear in the system. - - - Required scope | `comments:read` - source: - openapi: ../../../openapi/referenced-specs/v2.yml - path-parameters: - site_id: - type: string - docs: Unique identifier for a Site - comment_thread_id: - type: string - docs: Unique identifier for a Comment Thread - display-name: List Comment Replies - request: - name: CommentsListCommentRepliesRequest - query-parameters: - localeId: - type: optional - docs: > - Unique identifier for a specific Locale. - - - [Lear more about - localization.](/data/v2.0.0/docs/working-with-localization) - offset: - type: optional - docs: >- - Offset used for pagination if the results have more than limit - records - limit: - type: optional - docs: 'Maximum number of records to be returned (max limit: 100)' - sortBy: - type: optional - docs: >- - Sort results by the provided value. Only allowed when sortOrder is - provided. - sortOrder: - type: optional - docs: Sorts the results by asc or desc - response: - docs: Request was successful - type: root.CommentReplyList - status-code: 200 - errors: - - root.BadRequestError - - root.UnauthorizedError - - root.NotFoundError - - root.TooManyRequestsError - - root.InternalServerError - examples: - - path-parameters: - site_id: 580e63e98c9a982ac9b8b741 - comment_thread_id: 580e63e98c9a982ac9b8b741 - query-parameters: - localeId: 65427cf400e02b306eaa04a0 - offset: 1 - limit: 1 - sortBy: createdOn - sortOrder: asc - response: - body: - comments: - - id: 679d2ddb5196117ad04d1ffa - commentId: 679d2ddb5196117ad04d1ff8 - siteId: 679826b3b20b045e176bc4b5 - pageId: 679826b3b20b045e176bc4bc - localeId: 67993753d910db250db64b3e - breakpoint: main - content: >- - This comment mentions another user - [[6287ec36a841b25637c663df]] - isResolved: false - author: - id: id - email: email - name: name - mentionedUsers: - - id: id - email: arthur.dent@example.com - name: Arthur Dent - lastUpdated: '2025-01-31T20:08:59.759Z' - createdOn: '2025-01-31T20:08:59.759Z' - pagination: - limit: 2 - offset: 0 - total: 1 - source: - openapi: ../../../openapi/referenced-specs/v2.yml diff --git a/.mock/definition/sites/forms.yml b/.mock/definition/sites/forms.yml deleted file mode 100644 index 27e1e1d..0000000 --- a/.mock/definition/sites/forms.yml +++ /dev/null @@ -1,316 +0,0 @@ -imports: - root: ../__package__.yml -service: - auth: false - base-path: '' - endpoints: - list-submissions-by-site: - path: /sites/{site_id}/form_submissions - method: GET - auth: - - OAuth2: - - forms:read - docs: > - List all form submissions for a given site with the ability to filter - submissions by a centralized `elementId`. - - - Add `elementId` when you want to filter form submissions to a specific - form in a site. You can get the `elementId` from the [List forms - endpoint](/data/reference/forms/forms/list) (displayed as - `formElementId` in the response). - - - - - When a form is used in a Webflow component definition, each instance of - the component will yield a unique form. Adding the `elementId` in this - request ensures this API response includes all submissions from that - core form, wherever that form is used in instantiated components. - - - - - Use the [List Form Submissions - endpoint](/data/reference/forms/form-submissions/list-submissions) to - list form submissions for a given form ID. - - - Required scope | `forms:read` - source: - openapi: ../../../openapi/referenced-specs/v2.yml - path-parameters: - site_id: - type: string - docs: Unique identifier for a Site - display-name: List Form Submissions by Site - request: - name: FormsListSubmissionsBySiteRequest - query-parameters: - elementId: - type: optional - docs: Identifier for an element - offset: - type: optional - docs: >- - Offset used for pagination if the results have more than limit - records - limit: - type: optional - docs: 'Maximum number of records to be returned (max limit: 100)' - response: - docs: Request was successful - type: root.FormSubmissionList - status-code: 200 - errors: - - root.BadRequestError - - root.UnauthorizedError - - root.ForbiddenError - - root.NotFoundError - - root.TooManyRequestsError - - root.InternalServerError - examples: - - path-parameters: - site_id: 580e63e98c9a982ac9b8b741 - query-parameters: - elementId: 18259716-3e5a-646a-5f41-5dc4b9405aa0 - offset: 1 - limit: 1 - response: - body: - formSubmissions: - - id: 6321ca84df3949bfc6752327 - displayName: Sample Form - siteId: 62749158efef318abc8d5a0f - workspaceId: 62749158efef318abc8d5a0f - dateSubmitted: '2022-09-14T12:35:16Z' - formResponse: - First Name: Arthur - Last Name: Dent - - id: 660d64fabf6e0a0d4edab981 - displayName: Sample Form - siteId: 62749158efef318abc8d5a0f - workspaceId: 62749158efef318abc8d5a0f - dateSubmitted: '2022-09-14T12:35:16Z' - formResponse: - First Name: Ford - Last Name: Prefect - pagination: - limit: 25 - offset: 0 - total: 2 - list-submissions: - path: /sites/{site_id}/forms/{form_id}/submissions - method: GET - auth: - - OAuth2: - - forms:read - docs: > - List form submissions for a given form ID within a specific site. - - - Use the [List Form Submissions by Site - endpoint](/data/reference/forms/form-submissions/list-submissions-by-site) - to list form submissions for a given site with the ability to filter by - a `formElementId`. - - - Required scope | `forms:read` - source: - openapi: ../../../openapi/referenced-specs/v2.yml - path-parameters: - site_id: - type: string - docs: Unique identifier for a Site - form_id: - type: string - docs: Unique identifier for a Form - display-name: List Form Submissions - request: - name: FormsListSubmissionsRequest - query-parameters: - offset: - type: optional - docs: >- - Offset used for pagination if the results have more than limit - records - limit: - type: optional - docs: 'Maximum number of records to be returned (max limit: 100)' - response: - docs: Request was successful - type: root.FormSubmissionList - status-code: 200 - errors: - - root.BadRequestError - - root.UnauthorizedError - - root.ForbiddenError - - root.NotFoundError - - root.TooManyRequestsError - - root.InternalServerError - examples: - - path-parameters: - site_id: 580e63e98c9a982ac9b8b741 - form_id: 580e63e98c9a982ac9b8b741 - query-parameters: - offset: 1 - limit: 1 - response: - body: - formSubmissions: - - id: 6321ca84df3949bfc6752327 - displayName: Sample Form - siteId: 62749158efef318abc8d5a0f - workspaceId: 62749158efef318abc8d5a0f - dateSubmitted: '2022-09-14T12:35:16Z' - formResponse: - First Name: Arthur - Last Name: Dent - - id: 660d64fabf6e0a0d4edab981 - displayName: Sample Form - siteId: 62749158efef318abc8d5a0f - workspaceId: 62749158efef318abc8d5a0f - dateSubmitted: '2022-09-14T12:35:16Z' - formResponse: - First Name: Ford - Last Name: Prefect - pagination: - limit: 25 - offset: 0 - total: 2 - get-submission: - path: /sites/{site_id}/form_submissions/{form_submission_id} - method: GET - auth: - - OAuth2: - - forms:read - docs: | - Get information about a form submission within a specific site. - - Required scope | `forms:read` - source: - openapi: ../../../openapi/referenced-specs/v2.yml - path-parameters: - site_id: - type: string - docs: Unique identifier for a Site - form_submission_id: - type: string - docs: Unique identifier for a Form Submission - display-name: Get Form Submission by Site - response: - docs: Request was successful - type: root.FormSubmission - status-code: 200 - errors: - - root.BadRequestError - - root.UnauthorizedError - - root.ForbiddenError - - root.NotFoundError - - root.TooManyRequestsError - - root.InternalServerError - examples: - - path-parameters: - site_id: 580e63e98c9a982ac9b8b741 - form_submission_id: 580e63e98c9a982ac9b8b741 - response: - body: - id: 6321ca84df3949bfc6752327 - displayName: Sample Form - siteId: 62749158efef318abc8d5a0f - workspaceId: 62749158efef318abc8d5a0f - dateSubmitted: '2022-09-14T12:35:16Z' - formResponse: - First Name: Arthur - Last Name: Dent - delete-submission: - path: /sites/{site_id}/form_submissions/{form_submission_id} - method: DELETE - auth: - - OAuth2: - - forms:write - docs: | - Delete a form submission within a specific site. - - Required scope | `forms:write` - source: - openapi: ../../../openapi/referenced-specs/v2.yml - path-parameters: - site_id: - type: string - docs: Unique identifier for a Site - form_submission_id: - type: string - docs: Unique identifier for a Form Submission - display-name: Delete Form Submission by Site - errors: - - root.BadRequestError - - root.UnauthorizedError - - root.ForbiddenError - - root.NotFoundError - - root.ConflictError - - root.TooManyRequestsError - - root.InternalServerError - examples: - - path-parameters: - site_id: 580e63e98c9a982ac9b8b741 - form_submission_id: 580e63e98c9a982ac9b8b741 - update-submission: - path: /sites/{site_id}/form_submissions/{form_submission_id} - method: PATCH - auth: - - OAuth2: - - forms:write - docs: | - Update hidden fields on a form submission within a specific site. - - Required scope | `forms:write` - source: - openapi: ../../../openapi/referenced-specs/v2.yml - path-parameters: - site_id: - type: string - docs: Unique identifier for a Site - form_submission_id: - type: string - docs: Unique identifier for a Form Submission - display-name: Modify Form Submission by Site - request: - name: FormsUpdateSubmissionRequest - body: - properties: - formSubmissionData: - type: optional> - docs: >- - An existing **hidden field** defined on the form schema, and the - corresponding value to set - content-type: application/json - response: - docs: Request was successful - type: root.FormSubmission - status-code: 200 - errors: - - root.BadRequestError - - root.UnauthorizedError - - root.ForbiddenError - - root.NotFoundError - - root.ConflictError - - root.TooManyRequestsError - - root.InternalServerError - examples: - - path-parameters: - site_id: 580e63e98c9a982ac9b8b741 - form_submission_id: 580e63e98c9a982ac9b8b741 - request: {} - response: - body: - id: 6321ca84df3949bfc6752327 - displayName: Sample Form - siteId: 62749158efef318abc8d5a0f - workspaceId: 62749158efef318abc8d5a0f - dateSubmitted: '2022-09-14T12:35:16Z' - formResponse: - First Name: Arthur - Last Name: Dent - source: - openapi: ../../../openapi/referenced-specs/v2.yml diff --git a/.mock/definition/sites/plans.yml b/.mock/definition/sites/plans.yml deleted file mode 100644 index 4f662bc..0000000 --- a/.mock/definition/sites/plans.yml +++ /dev/null @@ -1,48 +0,0 @@ -imports: - root: ../__package__.yml -service: - auth: false - base-path: '' - endpoints: - get-site-plan: - path: /sites/{site_id}/plan - method: GET - auth: - - OAuth2: - - sites:read - docs: > - Get site plan details for the specified Site. - - - This endpoint requires an Enterprise - workspace. - - - Required scope | `sites:read` - source: - openapi: ../../../openapi/referenced-specs/v2.yml - path-parameters: - site_id: - type: string - docs: Unique identifier for a Site - display-name: Get Site Plan - response: - docs: Request was successful - type: root.SitePlan - status-code: 200 - errors: - - root.BadRequestError - - root.UnauthorizedError - - root.NotFoundError - - root.TooManyRequestsError - - root.InternalServerError - examples: - - path-parameters: - site_id: 580e63e98c9a982ac9b8b741 - response: - body: - id: hosting-business-v4 - name: Business Hosting - pricingInfo: https://webflow.com/pricing - source: - openapi: ../../../openapi/referenced-specs/v2.yml diff --git a/.mock/definition/sites/redirects.yml b/.mock/definition/sites/redirects.yml deleted file mode 100644 index 806117c..0000000 --- a/.mock/definition/sites/redirects.yml +++ /dev/null @@ -1,221 +0,0 @@ -imports: - root: ../__package__.yml -service: - auth: false - base-path: '' - endpoints: - list: - path: /sites/{site_id}/redirects - method: GET - auth: - - OAuth2: - - sites:read - docs: > - Fetch a list of all 301 redirect rules configured for a specific site. - - - Use this endpoint to review, audit, or manage the redirection rules that - control how traffic is rerouted on your site. - - - This endpoint requires an Enterprise - workspace. - - - Required scope: `sites:read` - source: - openapi: ../../../openapi/referenced-specs/v2.yml - path-parameters: - site_id: - type: string - docs: Unique identifier for a Site - display-name: Get 301 redirects - response: - docs: Request was successful - type: root.Redirects - status-code: 200 - errors: - - root.BadRequestError - - root.UnauthorizedError - - root.NotFoundError - - root.TooManyRequestsError - - root.InternalServerError - examples: - - path-parameters: - site_id: 580e63e98c9a982ac9b8b741 - response: - body: - redirects: - - id: 42e1a2b7aa1a13f768a0042a - fromUrl: /mostly-harmless - toUrl: /earth - - id: 6x9e7f8d9a4b1c2d3e4f5678 - fromUrl: /babel-fish - toUrl: /translate - pagination: - limit: 100 - offset: 0 - total: 2 - create: - path: /sites/{site_id}/redirects - method: POST - auth: - - OAuth2: - - sites:write - docs: > - Add a new 301 redirection rule to a site. - - - This endpoint allows you to define a source path (`fromUrl`) and its - corresponding destination path (`toUrl`), which will dictate how traffic - is rerouted on your site. This is useful for managing site changes, - restructuring URLs, or handling outdated links. - - - This endpoint requires an Enterprise - workspace. - - - Required scope: `sites:write` - source: - openapi: ../../../openapi/referenced-specs/v2.yml - path-parameters: - site_id: - type: string - docs: Unique identifier for a Site - display-name: Create a 301 redirect - request: - body: root.Redirect - content-type: application/json - response: - docs: Request was successful - type: root.Redirect - status-code: 200 - errors: - - root.BadRequestError - - root.UnauthorizedError - - root.NotFoundError - - root.TooManyRequestsError - - root.InternalServerError - examples: - - path-parameters: - site_id: 580e63e98c9a982ac9b8b741 - request: - id: 42e1a2b7aa1a13f768a0042a - fromUrl: /mostly-harmless - toUrl: /earth - response: - body: - id: 42e1a2b7aa1a13f768a0042a - fromUrl: /mostly-harmless - toUrl: /earth - delete: - path: /sites/{site_id}/redirects/{redirect_id} - method: DELETE - auth: - - OAuth2: - - sites:write - docs: > - Remove a 301 redirection rule from a site. - - - This is useful for cleaning up outdated or unnecessary redirects, - ensuring that your site's routing behavior remains efficient and - up-to-date. - - - This endpoint requires an Enterprise - workspace. - - - Required scope: `sites:write` - source: - openapi: ../../../openapi/referenced-specs/v2.yml - path-parameters: - site_id: - type: string - docs: Unique identifier for a Site - redirect_id: - type: string - docs: Unique identifier site rediect - display-name: Delete 301 redirects - response: - docs: Request was successful - type: root.Redirects - status-code: 200 - errors: - - root.BadRequestError - - root.UnauthorizedError - - root.NotFoundError - - root.TooManyRequestsError - - root.InternalServerError - examples: - - path-parameters: - site_id: 580e63e98c9a982ac9b8b741 - redirect_id: 66c4cb9a20cac35ed19500e6 - response: - body: - redirects: - - id: 42e1a2b7aa1a13f768a0042a - fromUrl: /mostly-harmless - toUrl: /earth - - id: 6x9e7f8d9a4b1c2d3e4f5678 - fromUrl: /babel-fish - toUrl: /translate - pagination: - limit: 100 - offset: 0 - total: 2 - update: - path: /sites/{site_id}/redirects/{redirect_id} - method: PATCH - auth: - - OAuth2: - - sites:write - docs: > - Update a 301 redirection rule from a site. - - - This endpoint requires an Enterprise - workspace. - - - Required scope: `sites:write` - source: - openapi: ../../../openapi/referenced-specs/v2.yml - path-parameters: - site_id: - type: string - docs: Unique identifier for a Site - redirect_id: - type: string - docs: Unique identifier site rediect - display-name: Update 301 redirect - request: - body: root.Redirect - content-type: application/json - response: - docs: Request was successful - type: root.Redirect - status-code: 200 - errors: - - root.BadRequestError - - root.UnauthorizedError - - root.NotFoundError - - root.TooManyRequestsError - - root.InternalServerError - examples: - - path-parameters: - site_id: 580e63e98c9a982ac9b8b741 - redirect_id: 66c4cb9a20cac35ed19500e6 - request: - id: 42e1a2b7aa1a13f768a0042a - fromUrl: /mostly-harmless - toUrl: /earth - response: - body: - id: 42e1a2b7aa1a13f768a0042a - fromUrl: /mostly-harmless - toUrl: /earth - source: - openapi: ../../../openapi/referenced-specs/v2.yml diff --git a/.mock/definition/sites/robotsTxt.yml b/.mock/definition/sites/robotsTxt.yml deleted file mode 100644 index 1aaf6cf..0000000 --- a/.mock/definition/sites/robotsTxt.yml +++ /dev/null @@ -1,229 +0,0 @@ -imports: - root: ../__package__.yml -service: - auth: false - base-path: '' - endpoints: - get: - path: /sites/{site_id}/robots_txt - method: GET - auth: - - OAuth2: - - site_config:read - docs: > - Retrieve the robots.txt configuration for various user agents. - - - This endpoint requires an Enterprise - workspace. - - - Required scope: `site_config:read` - source: - openapi: ../../../openapi/referenced-specs/v2.yml - path-parameters: - site_id: - type: string - docs: Unique identifier for a Site - display-name: Get robots.txt - response: - docs: Request was successful - type: root.Robots - status-code: 200 - errors: - - root.BadRequestError - - root.UnauthorizedError - - root.NotFoundError - - root.TooManyRequestsError - - root.InternalServerError - examples: - - path-parameters: - site_id: 580e63e98c9a982ac9b8b741 - response: - body: - rules: - - userAgent: googlebot - allows: - - /public - disallows: - - /vogon-poetry - - /total-perspective-vortex - sitemap: https://heartofgold.ship/sitemap.xml - put: - path: /sites/{site_id}/robots_txt - method: PUT - auth: - - OAuth2: - - site_config:write - docs: > - Replace the `robots.txt` configuration for various user agents. - - - This endpoint requires an Enterprise - workspace. - - - Required scope | `site_config:write` - source: - openapi: ../../../openapi/referenced-specs/v2.yml - path-parameters: - site_id: - type: string - docs: Unique identifier for a Site - display-name: Replace robots.txt - request: - body: root.Robots - content-type: application/json - response: - docs: Request was successful - type: root.Robots - status-code: 200 - errors: - - root.BadRequestError - - root.UnauthorizedError - - root.NotFoundError - - root.TooManyRequestsError - - root.InternalServerError - examples: - - path-parameters: - site_id: 580e63e98c9a982ac9b8b741 - request: - rules: - - userAgent: googlebot - allows: - - /public - disallows: - - /vogon-poetry - - /total-perspective-vortex - sitemap: https://heartofgold.ship/sitemap.xml - response: - body: - rules: - - userAgent: googlebot - allows: - - /public - disallows: - - /vogon-poetry - - /total-perspective-vortex - sitemap: https://heartofgold.ship/sitemap.xml - delete: - path: /sites/{site_id}/robots_txt - method: DELETE - auth: - - OAuth2: - - site_config:write - docs: > - Remove specific rules for a user-agent in your `robots.txt` file. To - delete all rules for a user-agent, provide an empty rule set. This will - remove the user-agent's entry entirely, leaving it subject to your - site's default crawling behavior. - - - **Note:** Deleting a user-agent with no rules will make the user-agent's - access unrestricted unless other directives apply. - - - This endpoint requires an Enterprise - workspace. - - - Required scope: `site_config:write` - source: - openapi: ../../../openapi/referenced-specs/v2.yml - path-parameters: - site_id: - type: string - docs: Unique identifier for a Site - display-name: Delete robots.txt - request: - body: root.Robots - content-type: application/json - response: - docs: Request was successful - type: root.Robots - status-code: 200 - errors: - - root.BadRequestError - - root.UnauthorizedError - - root.NotFoundError - - root.TooManyRequestsError - - root.InternalServerError - examples: - - path-parameters: - site_id: 580e63e98c9a982ac9b8b741 - request: - rules: - - userAgent: '*' - allows: - - /public - disallows: - - /bubbles - response: - body: - rules: - - userAgent: googlebot - allows: - - /public - disallows: - - /vogon-poetry - - /total-perspective-vortex - sitemap: https://heartofgold.ship/sitemap.xml - patch: - path: /sites/{site_id}/robots_txt - method: PATCH - auth: - - OAuth2: - - site_config:write - docs: > - Update the `robots.txt` configuration for various user agents. - - - This endpoint requires an Enterprise - workspace. - - - Required scope | `site_config:write` - source: - openapi: ../../../openapi/referenced-specs/v2.yml - path-parameters: - site_id: - type: string - docs: Unique identifier for a Site - display-name: Update robots.txt - request: - body: root.Robots - content-type: application/json - response: - docs: Request was successful - type: root.Robots - status-code: 200 - errors: - - root.BadRequestError - - root.UnauthorizedError - - root.NotFoundError - - root.TooManyRequestsError - - root.InternalServerError - examples: - - path-parameters: - site_id: 580e63e98c9a982ac9b8b741 - request: - rules: - - userAgent: googlebot - allows: - - /public - disallows: - - /vogon-poetry - - /total-perspective-vortex - sitemap: https://heartofgold.ship/sitemap.xml - response: - body: - rules: - - userAgent: googlebot - allows: - - /public - disallows: - - /vogon-poetry - - /total-perspective-vortex - sitemap: https://heartofgold.ship/sitemap.xml - source: - openapi: ../../../openapi/referenced-specs/v2.yml diff --git a/.mock/definition/sites/scripts.yml b/.mock/definition/sites/scripts.yml deleted file mode 100644 index 6762c85..0000000 --- a/.mock/definition/sites/scripts.yml +++ /dev/null @@ -1,243 +0,0 @@ -imports: - root: ../__package__.yml -service: - auth: false - base-path: '' - endpoints: - get-custom-code: - path: /sites/{site_id}/custom_code - method: GET - auth: - - OAuth2: - - custom_code:read - docs: | - Get all scripts applied to a site by the App. - - - To apply a script to a site or page, the script must first be registered to a site via the [Register Script](/data/reference/custom-code/custom-code/register-hosted) endpoints. Once registered, the script can be applied to a Site or Page using the appropriate endpoints. See the documentation on [working with Custom Code](/data/docs/custom-code) for more information. - - - Required scope | `custom_code:read` - source: - openapi: ../../../openapi/referenced-specs/v2.yml - path-parameters: - site_id: - type: string - docs: Unique identifier for a Site - display-name: Get Custom Code - response: - docs: Request was successful - type: root.ScriptApplyList - status-code: 200 - errors: - - root.BadRequestError - - root.UnauthorizedError - - root.NotFoundError - - root.TooManyRequestsError - - root.InternalServerError - examples: - - path-parameters: - site_id: 580e63e98c9a982ac9b8b741 - response: - body: - scripts: - - id: cms_slider - location: header - version: 1.0.0 - attributes: - my-attribute: some-value - - id: alert - location: header - version: 0.0.1 - attributes: - key: value - lastUpdated: '2022-10-26T00:28:54.191Z' - createdOn: '2022-10-26T00:28:54.191Z' - upsert-custom-code: - path: /sites/{site_id}/custom_code - method: PUT - auth: - - OAuth2: - - custom_code:write - docs: > - Apply registered scripts to a site. If you have multiple scripts your - App needs to apply or maintain on a site, ensure they are always - included in the request body for this endpoint. To remove individual - scripts, simply call this endpoint without the script in the request - body. - - - - To apply a script to a site or page, the script must first be registered to a site via the [Register Script](/data/reference/custom-code/custom-code/register-hosted) endpoints. Once registered, the script can be applied to a Site or Page using the appropriate endpoints. See the documentation on [working with Custom Code](/data/docs/custom-code) for more information. - - - - Required scope | `custom_code:write` - source: - openapi: ../../../openapi/referenced-specs/v2.yml - path-parameters: - site_id: - type: string - docs: Unique identifier for a Site - display-name: Add/Update Custom Code - request: - body: root.ScriptApplyList - content-type: application/json - response: - docs: Request was successful - type: root.ScriptApplyList - status-code: 200 - errors: - - root.BadRequestError - - root.UnauthorizedError - - root.NotFoundError - - root.TooManyRequestsError - - root.InternalServerError - examples: - - path-parameters: - site_id: 580e63e98c9a982ac9b8b741 - request: - scripts: - - id: cms_slider - location: header - version: 1.0.0 - attributes: - my-attribute: some-value - - id: alert - location: header - version: 0.0.1 - response: - body: - scripts: - - id: cms_slider - location: header - version: 1.0.0 - attributes: - my-attribute: some-value - - id: alert - location: header - version: 0.0.1 - attributes: - key: value - lastUpdated: lastUpdated - createdOn: createdOn - delete-custom-code: - path: /sites/{site_id}/custom_code - method: DELETE - auth: - - OAuth2: - - custom_code:write - docs: > - Remove all scripts from a site applied by the App. This endpoint will - not remove scripts from the site's registered scripts. - - - To remove individual scripts applied by the App, use the [Add/Update - Custom - Code](/data/reference/custom-code/custom-code-sites/upsert-custom-code) - endpoint. - - - Access to this endpoint requires a bearer token obtained from an - [OAuth Code Grant Flow](/data/reference/oauth-app). - - - Required scope | `custom_code:write` - source: - openapi: ../../../openapi/referenced-specs/v2.yml - path-parameters: - site_id: - type: string - docs: Unique identifier for a Site - display-name: Delete Custom Code - errors: - - root.BadRequestError - - root.UnauthorizedError - - root.NotFoundError - - root.TooManyRequestsError - - root.InternalServerError - examples: - - path-parameters: - site_id: 580e63e98c9a982ac9b8b741 - list-custom-code-blocks: - path: /sites/{site_id}/custom_code/blocks - method: GET - auth: - - OAuth2: - - custom_code:read - docs: > - Get a list of scripts that have been applied to a site and/or individual - pages. - - - - To apply a script to a site or page, the script must first be registered to a site via the [Register Script](/data/reference/custom-code/custom-code/register-hosted) endpoints. Once registered, the script can be applied to a Site or Page using the appropriate endpoints. - - See the documentation on [working with Custom Code](/data/docs/custom-code) for more information. - - - - Required scope | `custom_code:read` - source: - openapi: ../../../openapi/referenced-specs/v2.yml - path-parameters: - site_id: - type: string - docs: Unique identifier for a Site - display-name: List Custom Code Blocks - request: - name: ScriptsListCustomCodeBlocksRequest - query-parameters: - offset: - type: optional - docs: >- - Offset used for pagination if the results have more than limit - records - limit: - type: optional - docs: 'Maximum number of records to be returned (max limit: 100)' - response: - docs: Request was successful - type: root.ListCustomCodeBlocks - status-code: 200 - errors: - - root.BadRequestError - - root.UnauthorizedError - - root.NotFoundError - - root.TooManyRequestsError - - root.InternalServerError - examples: - - path-parameters: - site_id: 580e63e98c9a982ac9b8b741 - query-parameters: - offset: 1 - limit: 1 - response: - body: - blocks: - - siteId: 6258612d1ee792848f805dcf - pageId: pageId - type: site - scripts: - - id: chartjs - location: header - version: 4.4.2 - attributes: - key: value - createdOn: '2024-04-03T16:49:15Z' - lastUpdated: '2024-04-03T16:49:15Z' - - siteId: 6390c49674a71f84b51a08d8 - pageId: 6419db964a9c43f6a3af6348 - type: page - scripts: - - id: id - location: header - version: version - createdOn: '2022-10-26T00:28:54Z' - lastUpdated: '2022-10-26T00:28:54Z' - pagination: - limit: 10 - offset: 0 - total: 1 - source: - openapi: ../../../openapi/referenced-specs/v2.yml diff --git a/.mock/definition/sites/wellKnown.yml b/.mock/definition/sites/wellKnown.yml deleted file mode 100644 index 10ef3e0..0000000 --- a/.mock/definition/sites/wellKnown.yml +++ /dev/null @@ -1,130 +0,0 @@ -types: - WellKnownFileContentType: - enum: - - value: application/json - name: ApplicationJson - - value: text/plain - name: TextPlain - docs: The content type of the file. Defaults to application/json - default: application/json - inline: true - source: - openapi: ../../../openapi/referenced-specs/v2.yml -imports: - root: ../__package__.yml -service: - auth: false - base-path: '' - endpoints: - put: - path: /sites/{site_id}/well_known - method: PUT - auth: - - OAuth2: - - site_config:write - docs: > - Upload a supported well-known file to a site. - - - The current restrictions on well-known files are as follows: - - Each file must be smaller than 100kb - - Less than 30 total files - - Have one of the following file extensions (or no extension): `.txt`, `.json`, `.noext` - - - `.noext` is a special file extension that removes other extensions. For example, `apple-app-site-association.noext.txt` will be uploaded as `apple-app-site-association`. Use this extension for tools that have trouble uploading extensionless files. - - - This endpoint requires an Enterprise - workspace. - - - Required scope: `site_config:write` - source: - openapi: ../../../openapi/referenced-specs/v2.yml - path-parameters: - site_id: - type: string - docs: Unique identifier for a Site - display-name: Set a well-known file - request: - name: WellKnownFile - body: - properties: - fileName: - type: string - docs: The name of the file - fileData: - type: string - docs: The contents of the file - contentType: - type: optional - docs: The content type of the file. Defaults to application/json - default: application/json - content-type: application/json - errors: - - root.BadRequestError - - root.UnauthorizedError - - root.NotFoundError - - root.TooManyRequestsError - - root.InternalServerError - examples: - - path-parameters: - site_id: 580e63e98c9a982ac9b8b741 - request: - fileName: apple-app-site-association.txt - fileData: | - { - "applinks": { - "apps": [], - "details": [ - { - "appID": "ABCDE12345.com.example.app", - "paths": [ "/*", "/some/path/*" ] - } - ] - } - } - contentType: application/json - delete: - path: /sites/{site_id}/well_known - method: DELETE - auth: - - OAuth2: - - site_config:write - docs: > - Delete existing well-known files from a site. - - - This endpoint requires an Enterprise - workspace. - - - Required scope: `site_config:write` - source: - openapi: ../../../openapi/referenced-specs/v2.yml - path-parameters: - site_id: - type: string - docs: Unique identifier for a Site - display-name: Delete a well-known file - request: - name: WellKnownDeleteRequest - body: - properties: - fileNames: - type: optional> - docs: A list of file names to delete - content-type: application/json - errors: - - root.BadRequestError - - root.UnauthorizedError - - root.NotFoundError - - root.TooManyRequestsError - - root.InternalServerError - examples: - - path-parameters: - site_id: 580e63e98c9a982ac9b8b741 - request: {} - source: - openapi: ../../../openapi/referenced-specs/v2.yml diff --git a/.mock/definition/token.yml b/.mock/definition/token.yml deleted file mode 100644 index 4b0e365..0000000 --- a/.mock/definition/token.yml +++ /dev/null @@ -1,75 +0,0 @@ -imports: - root: __package__.yml -service: - auth: false - base-path: '' - endpoints: - authorized-by: - path: /token/authorized_by - method: GET - auth: - - OAuth2: - - authorized_user:read - docs: | - Information about the Authorized User - - Required Scope | `authorized_user:read` - source: - openapi: ../../../openapi/referenced-specs/v2.yml - display-name: Get Authorization User Info - response: - docs: Request was successful - type: root.AuthorizedUser - status-code: 200 - errors: - - root.UnauthorizedError - - root.ForbiddenError - examples: - - response: - body: - id: 545bbecb7bdd6769632504a7 - email: some@email.com - firstName: Some - lastName: One - introspect: - path: /token/introspect - method: GET - docs: > - Information about the authorization token - - - Access to this endpoint requires a bearer token from a [Data - Client App](/data/docs/getting-started-data-clients). - source: - openapi: ../../../openapi/referenced-specs/v2.yml - display-name: Get Authorization Info - response: - docs: Request was successful - type: root.Authorization - status-code: 200 - errors: - - root.UnauthorizedError - examples: - - response: - body: - authorization: - id: 55818d58616600637b9a5786 - createdOn: '2016-10-03T23:12:00Z' - lastUsed: '2016-10-10T21:41:12Z' - grantType: authorization_code - rateLimit: 60 - scope: assets:read,assets:write - authorizedTo: - siteIds: - - 62f3b1f7eafac55d0c64ef91 - workspaceIds: - - 52f3b1f7eafac55d0c64ef91 - userIds: - - 545bbecb7bdd6769632504a7 - application: - id: 55131cd036c09f7d07883dfc - description: My Amazing App - homepage: https://webflow.com - displayName: My Amazing App - source: - openapi: ../../../openapi/referenced-specs/v2.yml diff --git a/.mock/definition/webhooks.yml b/.mock/definition/webhooks.yml deleted file mode 100644 index 46bbb02..0000000 --- a/.mock/definition/webhooks.yml +++ /dev/null @@ -1,188 +0,0 @@ -imports: - root: __package__.yml -service: - auth: false - base-path: '' - endpoints: - list: - path: /sites/{site_id}/webhooks - method: GET - docs: | - List all App-created Webhooks registered for a given site - - Required scope | `sites:read` - source: - openapi: ../../../openapi/referenced-specs/v2.yml - path-parameters: - site_id: - type: string - docs: Unique identifier for a Site - display-name: List Webhooks - response: - docs: Request was successful - type: root.WebhookList - status-code: 200 - errors: - - root.BadRequestError - - root.UnauthorizedError - - root.NotFoundError - - root.TooManyRequestsError - - root.InternalServerError - examples: - - path-parameters: - site_id: 580e63e98c9a982ac9b8b741 - response: - body: - webhooks: - - id: 57ca0a9e418c504a6e1acbb6 - triggerType: form_submission - url: https://webhook.site/7f7f7f7f-7f7f-7f7f-7f7f-7f7f7f7f7f7f - workspaceId: 4f4e46fd476ea8c507000001 - siteId: 562ac0395358780a1f5e6fbd - filter: - name: Email Form - lastTriggered: '2023-02-08T23:59:28Z' - createdOn: '2016-09-02T23:26:22Z' - - id: 578d85cce0c47cd2865f4cf2 - triggerType: form_submission - url: https://webhook.site/7f7f7f7f-7f7f-7f7f-7f7f-7f7f7f7f7f7f - workspaceId: 4f4e46fd476ea8c507000001 - siteId: 562ac0395358780a1f5e6fbd - filter: - name: Email Form - lastTriggered: '2023-02-08T23:59:28Z' - createdOn: '2016-07-19T01:43:40Z' - - id: 578d85cce0c47cd2865f4cf3 - triggerType: form_submission - url: https://webhook.site/7f7f7f7f-7f7f-7f7f-7f7f-7f7f7f7f7f7f - workspaceId: 4f4e46fd476ea8c507000001 - siteId: 562ac0395358780a1f5e6fbd - filter: - name: Email Form - lastTriggered: '2023-02-08T23:59:28Z' - createdOn: '2016-07-19T01:43:40Z' - pagination: - limit: 100 - offset: 0 - total: 100 - create: - path: /sites/{site_id}/webhooks - method: POST - docs: > - Create a new Webhook. - - - Limit of 75 registrations per `triggerType`, per site. - - - Access to this endpoint requires a bearer token from a [Data - Client App](/data/docs/getting-started-data-clients). - - Required scope | `sites:write` - source: - openapi: ../../../openapi/referenced-specs/v2.yml - path-parameters: - site_id: - type: string - docs: Unique identifier for a Site - display-name: Create Webhook - request: - body: root.Webhook - content-type: application/json - response: - docs: Request was successful - type: root.Webhook - status-code: 201 - errors: - - root.BadRequestError - - root.UnauthorizedError - - root.NotFoundError - - root.TooManyRequestsError - - root.InternalServerError - examples: - - path-parameters: - site_id: 580e63e98c9a982ac9b8b741 - request: - id: 582266e0cd48de0f0e3c6d8b - triggerType: form_submission - url: https://webhook.site/7f7f7f7f-7f7f-7f7f-7f7f-7f7f7f7f7f7f - workspaceId: 4f4e46fd476ea8c507000001 - siteId: 562ac0395358780a1f5e6fbd - lastTriggered: '2023-02-08T23:59:28Z' - createdOn: '2022-11-08T23:59:28Z' - response: - body: - id: 582266e0cd48de0f0e3c6d8b - triggerType: form_submission - url: https://webhook.site/7f7f7f7f-7f7f-7f7f-7f7f-7f7f7f7f7f7f - workspaceId: 4f4e46fd476ea8c507000001 - siteId: 562ac0395358780a1f5e6fbd - filter: - name: My Form - lastTriggered: '2023-02-08T23:59:28Z' - createdOn: '2022-11-08T23:59:28Z' - get: - path: /webhooks/{webhook_id} - method: GET - docs: | - Get a specific Webhook instance - - Required scope: `sites:read` - source: - openapi: ../../../openapi/referenced-specs/v2.yml - path-parameters: - webhook_id: - type: string - docs: Unique identifier for a Webhook - display-name: Get Webhook - response: - docs: Request was successful - type: root.Webhook - status-code: 200 - errors: - - root.BadRequestError - - root.UnauthorizedError - - root.NotFoundError - - root.TooManyRequestsError - - root.InternalServerError - examples: - - path-parameters: - webhook_id: 580e64008c9a982ac9b8b754 - response: - body: - id: 582266e0cd48de0f0e3c6d8b - triggerType: form_submission - url: https://webhook.site/7f7f7f7f-7f7f-7f7f-7f7f-7f7f7f7f7f7f - workspaceId: 4f4e46fd476ea8c507000001 - siteId: 562ac0395358780a1f5e6fbd - filter: - name: My Form - lastTriggered: '2023-02-08T23:59:28Z' - createdOn: '2022-11-08T23:59:28Z' - delete: - path: /webhooks/{webhook_id} - method: DELETE - docs: | - Remove a Webhook - - Required scope: `sites:read` - source: - openapi: ../../../openapi/referenced-specs/v2.yml - path-parameters: - webhook_id: - type: string - docs: Unique identifier for a Webhook - display-name: Remove Webhook - errors: - - root.BadRequestError - - root.UnauthorizedError - - root.NotFoundError - - root.TooManyRequestsError - - root.InternalServerError - examples: - - path-parameters: - webhook_id: 580e64008c9a982ac9b8b754 - source: - openapi: ../../../openapi/referenced-specs/v2.yml - display-name: Webhooks -docs: Webhooks are the webhooks in your Webflow site. diff --git a/.mock/definition/workspaces/auditLogs.yml b/.mock/definition/workspaces/auditLogs.yml deleted file mode 100644 index 57b604a..0000000 --- a/.mock/definition/workspaces/auditLogs.yml +++ /dev/null @@ -1,126 +0,0 @@ -types: - AuditLogsGetWorkspaceAuditLogsRequestSortOrder: - enum: - - asc - - desc - source: - openapi: ../../../openapi/referenced-specs/v2.yml - AuditLogsGetWorkspaceAuditLogsRequestEventType: - enum: - - user_access - - custom_role - - workspace_membership - - site_membership - - workspace_invitation - - workspace_setting - source: - openapi: ../../../openapi/referenced-specs/v2.yml -imports: - root: ../__package__.yml -service: - auth: false - base-path: '' - endpoints: - get-workspace-audit_logs: - path: /workspaces/{workspace_id_or_slug}/audit_logs - method: GET - auth: - - OAuth2: - - workspace_activity:read - docs: > - Get audit logs for a workspace. - - - This endpoint - requires an Enterprise workspace and a workspace token with the - `workspace_activity:read` scope. Create a workspace token from your - workspace dashboard integrations page to use this endpoint. - - - Required scope | `workspace_activity:read` - source: - openapi: ../../../openapi/referenced-specs/v2.yml - path-parameters: - workspace_id_or_slug: - type: string - docs: Unique identifier or slug for a Workspace - display-name: Get Workspace Audit Logs - request: - name: AuditLogsGetWorkspaceAuditLogsRequest - query-parameters: - limit: - type: optional - docs: 'Maximum number of records to be returned (max limit: 100)' - offset: - type: optional - docs: >- - Offset used for pagination if the results have more than limit - records - sortOrder: - type: optional - docs: Sorts the results by asc or desc - eventType: - type: optional - docs: The event type to filter by - from: - type: optional - docs: The start date to filter by - to: - type: optional - docs: The end date to filter by - response: - docs: A list of workspace audit logs - type: root.WorkspaceAuditLogResponse - status-code: 200 - errors: - - root.UnauthorizedError - - root.ForbiddenError - - root.NotFoundError - - root.TooManyRequestsError - - root.InternalServerError - examples: - - path-parameters: - workspace_id_or_slug: hitchhikers-workspace - query-parameters: - limit: 1 - offset: 1 - sortOrder: asc - eventType: user_access - from: '2025-06-22T16:00:31Z' - to: '2025-07-22T16:00:31Z' - response: - body: - items: - - eventSubType: login - eventType: user_access - timestamp: '2025-04-29T20:30:06Z' - actor: - id: 6661ccb359b561c69f29d554 - email: someone@email.com - workspace: - id: 6621ccb459b561c69f29d57c - slug: hitchhikers-workspace - - eventSubType: user_added - eventType: workspace_membership - timestamp: '2025-04-30T20:30:06Z' - actor: - id: 60492e55bbddce079561cd7a - email: someone@webflow.com - workspace: - id: 6621ccb459b561c69f29d57c - slug: hitchhikers-workspace - - eventSubType: user_added - eventType: site_membership - timestamp: '2025-04-30T00:33:31Z' - actor: - id: 671fe00d185fc8c1ad409d37 - email: someone@webflow.com - workspace: - id: 6621ccb459b561c69f29d57c - slug: hitchhikers-workspace - pagination: - limit: 10 - offset: 0 - total: 3 - source: - openapi: ../../../openapi/referenced-specs/v2.yml diff --git a/.mock/fern.config.json b/.mock/fern.config.json deleted file mode 100644 index 9c2f634..0000000 --- a/.mock/fern.config.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "organization" : "webflow", - "version" : "0.110.1" -} \ No newline at end of file diff --git a/reference.md b/reference.md index 9abecdf..5f86e2f 100644 --- a/reference.md +++ b/reference.md @@ -137,7 +137,7 @@ client.token.introspect()
-Create a site. +Create a site. This endpoint requires an Enterprise workspace. @@ -370,7 +370,7 @@ client.sites.get(
-Delete a site. +Delete a site. This endpoint requires an Enterprise workspace. @@ -444,7 +444,7 @@ client.sites.delete(
-Update a site. +Update a site. This endpoint requires an Enterprise workspace. @@ -606,7 +606,7 @@ client.sites.get_custom_domain(
-Publishes a site to one or more more domains. +Publishes a site to one or more more domains. To publish to a specific custom domain, use the domain IDs from the [Get Custom Domains](/data/reference/sites/get-custom-domain) endpoint. @@ -1325,7 +1325,7 @@ Unique identifier for a specific Locale. **slug:** `typing.Optional[str]` -Slug for the page. +Slug for the page. **Note:** Updating slugs in secondary locales is only supported in Advanced and Enterprise localization add-on plans. @@ -1378,7 +1378,7 @@ Slug for the page. Get text and component instance content from a static page. -Localization +Localization Required scope | `pages:read`
@@ -2689,7 +2689,7 @@ client.assets.list(
-The first step in uploading an asset to a site. +The first step in uploading an asset to a site. This endpoint generates a response with the following information: `uploadUrl` and `uploadDetails`. @@ -2699,7 +2699,7 @@ Use these properties in the header of a [POST request to Amazson s3](https://doc To learn more about how to upload assets to Webflow, see our [assets guide](/data/docs/working-with-assets). - + Required scope | `assets:write`
@@ -3797,7 +3797,7 @@ List form submissions for a given form When a form is used in a component definition, each instance of the form is considered a unique form. - + To get a combined list of submissions for a form that appears across multiple component instances, use the [List Form Submissions by Site](/data/reference/forms/form-submissions/list-submissions-by-site) endpoint. @@ -4115,7 +4115,7 @@ client.forms.update_submission(
-Retrieve all products for a site. +Retrieve all products for a site. Use `limit` and `offset` to page through all products with subsequent requests. All SKUs for each product will also be fetched and returned. The `limit`, `offset` and `total` values represent Products only and do not include any SKUs. @@ -5471,10 +5471,10 @@ client.inventory.list(
-Updates the current inventory levels for a particular SKU item. +Updates the current inventory levels for a particular SKU item. -Updates may be given in one or two methods, absolutely or incrementally. -- Absolute updates are done by setting `quantity` directly. +Updates may be given in one or two methods, absolutely or incrementally. +- Absolute updates are done by setting `quantity` directly. - Incremental updates are by specifying the inventory delta in `updateQuantity` which is then added to the `quantity` stored on the server. Required scope | `ecommerce:write` @@ -6668,7 +6668,7 @@ client.collections.items.create_item_live(
-Unpublish up to 100 items from the live site and set the `isDraft` property to `true`. +Unpublish up to 100 items from the live site and set the `isDraft` property to `true`. Items will only be unpublished in the primary locale unless a `cmsLocaleId` is included in the request. @@ -7107,7 +7107,7 @@ client.collections.items.get_item(
-Delete an item from a collection. +Delete an item from a collection. Required scope | `CMS:write`
@@ -7451,7 +7451,7 @@ client.collections.items.get_item_live(
-Unpublish a live item from the site and set the `isDraft` property to `true`. +Unpublish a live item from the site and set the `isDraft` property to `true`. For bulk unpublishing, please use [this endpoint.](/data/v2.0.0/reference/cms/collection-items/live-items/delete-items-live) @@ -7800,7 +7800,7 @@ client.collections.items.publish_item(
-Get all scripts applied to a page. +Get all scripts applied to a page. Required scope | `custom_code:read`
@@ -8294,7 +8294,7 @@ client.sites.redirects.delete(
-**redirect_id:** `str` — Unique identifier site rediect +**redirect_id:** `str` — Unique identifier site redirect
@@ -8380,7 +8380,7 @@ client.sites.redirects.update(
-**redirect_id:** `str` — Unique identifier site rediect +**redirect_id:** `str` — Unique identifier site redirect
@@ -8887,8 +8887,8 @@ Upload a supported well-known file to a site. The current restrictions on well-known files are as follows: - Each file must be smaller than 100kb - Less than 30 total files - - Have one of the following file extensions (or no extension): `.txt`, `.json`, `.noext` - + - Have one of the following file extensions (or no extension): `.txt`, `.json`, `.noext` + `.noext` is a special file extension that removes other extensions. For example, `apple-app-site-association.noext.txt` will be uploaded as `apple-app-site-association`. Use this extension for tools that have trouble uploading extensionless files. @@ -9075,7 +9075,7 @@ client.sites.well_known.delete(
-Retrieve Activity Logs for a specific Site. +Retrieve Activity Logs for a specific Site. This endpoint requires an Enterprise workspace. @@ -9562,11 +9562,11 @@ Unique identifier for a specific Locale.
-Get all scripts applied to a site by the App. +Get all scripts applied to a site by the App. To apply a script to a site or page, the script must first be registered to a site via the [Register Script](/data/reference/custom-code/custom-code/register-hosted) endpoints. Once registered, the script can be applied to a Site or Page using the appropriate endpoints. See the documentation on [working with Custom Code](/data/docs/custom-code) for more information. - + Required scope | `custom_code:read`
@@ -9827,11 +9827,11 @@ client.sites.scripts.delete_custom_code(
-Get a list of scripts that have been applied to a site and/or individual pages. +Get a list of scripts that have been applied to a site and/or individual pages. - To apply a script to a site or page, the script must first be registered to a site via the [Register Script](/data/reference/custom-code/custom-code/register-hosted) endpoints. Once registered, the script can be applied to a Site or Page using the appropriate endpoints. - + To apply a script to a site or page, the script must first be registered to a site via the [Register Script](/data/reference/custom-code/custom-code/register-hosted) endpoints. Once registered, the script can be applied to a Site or Page using the appropriate endpoints. + See the documentation on [working with Custom Code](/data/docs/custom-code) for more information. @@ -9926,7 +9926,7 @@ client.sites.scripts.list_custom_code_blocks( List all form submissions for a given site with the ability to filter submissions by a centralized `elementId`. -Add `elementId` when you want to filter form submissions to a specific form in a site. You can get the `elementId` from the [List forms endpoint](/data/reference/forms/forms/list) (displayed as `formElementId` in the response). +Add `elementId` when you want to filter form submissions to a specific form in a site. You can get the `elementId` from the [List forms endpoint](/data/reference/forms/forms/list) (displayed as `formElementId` in the response). When a form is used in a Webflow component definition, each instance of the component will yield a unique form. Adding the `elementId` in this request ensures this API response includes all submissions from that core form, wherever that form is used in instantiated components. @@ -10031,7 +10031,7 @@ client.sites.forms.list_submissions_by_site(
-List form submissions for a given form ID within a specific site. +List form submissions for a given form ID within a specific site. Use the [List Form Submissions by Site endpoint](/data/reference/forms/form-submissions/list-submissions-by-site) to list form submissions for a given site with the ability to filter by a `formElementId`. diff --git a/src/webflow/client.py b/src/webflow/client.py index 6f76267..fc74cbc 100644 --- a/src/webflow/client.py +++ b/src/webflow/client.py @@ -50,7 +50,7 @@ class Webflow: - access_token : typing.Optional[typing.Union[str, typing.Callable[[], str]]] + access_token : typing.Union[str, typing.Callable[[], str]] timeout : typing.Optional[float] The timeout to be used, in seconds, for requests. By default the timeout is 60 seconds, unless a custom httpx client is used, in which case this default is not enforced. @@ -73,7 +73,7 @@ def __init__( self, *, environment: WebflowEnvironment = WebflowEnvironment.DATA_API, - access_token: typing.Optional[typing.Union[str, typing.Callable[[], str]]] = None, + access_token: typing.Union[str, typing.Callable[[], str]], timeout: typing.Optional[float] = None, follow_redirects: typing.Optional[bool] = True, httpx_client: typing.Optional[httpx.Client] = None, @@ -120,7 +120,7 @@ class AsyncWebflow: - access_token : typing.Optional[typing.Union[str, typing.Callable[[], str]]] + access_token : typing.Union[str, typing.Callable[[], str]] timeout : typing.Optional[float] The timeout to be used, in seconds, for requests. By default the timeout is 60 seconds, unless a custom httpx client is used, in which case this default is not enforced. @@ -143,7 +143,7 @@ def __init__( self, *, environment: WebflowEnvironment = WebflowEnvironment.DATA_API, - access_token: typing.Optional[typing.Union[str, typing.Callable[[], str]]] = None, + access_token: typing.Union[str, typing.Callable[[], str]], timeout: typing.Optional[float] = None, follow_redirects: typing.Optional[bool] = True, httpx_client: typing.Optional[httpx.AsyncClient] = None, diff --git a/src/webflow/core/client_wrapper.py b/src/webflow/core/client_wrapper.py index 3849c42..e363dd0 100644 --- a/src/webflow/core/client_wrapper.py +++ b/src/webflow/core/client_wrapper.py @@ -11,7 +11,7 @@ class BaseClientWrapper: def __init__( self, *, - access_token: typing.Optional[typing.Union[str, typing.Callable[[], str]]] = None, + access_token: typing.Union[str, typing.Callable[[], str]], environment: WebflowEnvironment, timeout: typing.Optional[float] = None, ): @@ -25,13 +25,11 @@ def get_headers(self) -> typing.Dict[str, str]: "X-Fern-SDK-Name": "webflow", "X-Fern-SDK-Version": "1.2.1", } - access_token = self._get_access_token() - if access_token is not None: - headers["Authorization"] = f"Bearer {access_token}" + headers["Authorization"] = f"Bearer {self._get_access_token()}" return headers - def _get_access_token(self) -> typing.Optional[str]: - if isinstance(self._access_token, str) or self._access_token is None: + def _get_access_token(self) -> str: + if isinstance(self._access_token, str): return self._access_token else: return self._access_token() @@ -47,7 +45,7 @@ class SyncClientWrapper(BaseClientWrapper): def __init__( self, *, - access_token: typing.Optional[typing.Union[str, typing.Callable[[], str]]] = None, + access_token: typing.Union[str, typing.Callable[[], str]], environment: WebflowEnvironment, timeout: typing.Optional[float] = None, httpx_client: httpx.Client, @@ -62,7 +60,7 @@ class AsyncClientWrapper(BaseClientWrapper): def __init__( self, *, - access_token: typing.Optional[typing.Union[str, typing.Callable[[], str]]] = None, + access_token: typing.Union[str, typing.Callable[[], str]], environment: WebflowEnvironment, timeout: typing.Optional[float] = None, httpx_client: httpx.AsyncClient, diff --git a/src/webflow/resources/collections/__init__.py b/src/webflow/resources/collections/__init__.py index 3796806..13d8b3a 100644 --- a/src/webflow/resources/collections/__init__.py +++ b/src/webflow/resources/collections/__init__.py @@ -2,7 +2,7 @@ from .resources import ( CreateBulkCollectionItemRequestBodyFieldData, - CreateBulkCollectionItemRequestBodyFieldDataItem, + CreateBulkCollectionItemRequestBodyFieldDataOneItem, ItemIDs, ItemIDsWithLocales, ItemsCreateItemLiveRequestBody, @@ -26,7 +26,7 @@ __all__ = [ "CreateBulkCollectionItemRequestBodyFieldData", - "CreateBulkCollectionItemRequestBodyFieldDataItem", + "CreateBulkCollectionItemRequestBodyFieldDataOneItem", "ItemIDs", "ItemIDsWithLocales", "ItemsCreateItemLiveRequestBody", diff --git a/src/webflow/resources/collections/resources/__init__.py b/src/webflow/resources/collections/resources/__init__.py index 4ad4d58..854cce7 100644 --- a/src/webflow/resources/collections/resources/__init__.py +++ b/src/webflow/resources/collections/resources/__init__.py @@ -3,7 +3,7 @@ from . import fields, items from .items import ( CreateBulkCollectionItemRequestBodyFieldData, - CreateBulkCollectionItemRequestBodyFieldDataItem, + CreateBulkCollectionItemRequestBodyFieldDataOneItem, ItemIDs, ItemIDsWithLocales, ItemsCreateItemLiveRequestBody, @@ -25,7 +25,7 @@ __all__ = [ "CreateBulkCollectionItemRequestBodyFieldData", - "CreateBulkCollectionItemRequestBodyFieldDataItem", + "CreateBulkCollectionItemRequestBodyFieldDataOneItem", "ItemIDs", "ItemIDsWithLocales", "ItemsCreateItemLiveRequestBody", diff --git a/src/webflow/resources/collections/resources/items/__init__.py b/src/webflow/resources/collections/resources/items/__init__.py index 7dce40c..492ebe2 100644 --- a/src/webflow/resources/collections/resources/items/__init__.py +++ b/src/webflow/resources/collections/resources/items/__init__.py @@ -2,7 +2,7 @@ from .types import ( CreateBulkCollectionItemRequestBodyFieldData, - CreateBulkCollectionItemRequestBodyFieldDataItem, + CreateBulkCollectionItemRequestBodyFieldDataOneItem, ItemIDs, ItemIDsWithLocales, ItemsCreateItemLiveRequestBody, @@ -24,7 +24,7 @@ __all__ = [ "CreateBulkCollectionItemRequestBodyFieldData", - "CreateBulkCollectionItemRequestBodyFieldDataItem", + "CreateBulkCollectionItemRequestBodyFieldDataOneItem", "ItemIDs", "ItemIDsWithLocales", "ItemsCreateItemLiveRequestBody", diff --git a/src/webflow/resources/collections/resources/items/client.py b/src/webflow/resources/collections/resources/items/client.py index 0e04307..3e0b73e 100644 --- a/src/webflow/resources/collections/resources/items/client.py +++ b/src/webflow/resources/collections/resources/items/client.py @@ -713,7 +713,7 @@ def list_items_live( """ _response = self._client_wrapper.httpx_client.request( f"collections/{jsonable_encoder(collection_id)}/items/live", - base_url=self._client_wrapper.get_environment().data_api, + base_url=self._client_wrapper.get_environment().base, method="GET", params={ "cmsLocaleId": cms_locale_id, @@ -1825,7 +1825,7 @@ def get_item_live( """ _response = self._client_wrapper.httpx_client.request( f"collections/{jsonable_encoder(collection_id)}/items/{jsonable_encoder(item_id)}/live", - base_url=self._client_wrapper.get_environment().data_api, + base_url=self._client_wrapper.get_environment().base, method="GET", params={ "cmsLocaleId": cms_locale_id, @@ -3030,7 +3030,7 @@ async def main() -> None: """ _response = await self._client_wrapper.httpx_client.request( f"collections/{jsonable_encoder(collection_id)}/items/live", - base_url=self._client_wrapper.get_environment().data_api, + base_url=self._client_wrapper.get_environment().base, method="GET", params={ "cmsLocaleId": cms_locale_id, @@ -4206,7 +4206,7 @@ async def main() -> None: """ _response = await self._client_wrapper.httpx_client.request( f"collections/{jsonable_encoder(collection_id)}/items/{jsonable_encoder(item_id)}/live", - base_url=self._client_wrapper.get_environment().data_api, + base_url=self._client_wrapper.get_environment().base, method="GET", params={ "cmsLocaleId": cms_locale_id, diff --git a/src/webflow/resources/collections/resources/items/types/__init__.py b/src/webflow/resources/collections/resources/items/types/__init__.py index 2d9a604..2996bbe 100644 --- a/src/webflow/resources/collections/resources/items/types/__init__.py +++ b/src/webflow/resources/collections/resources/items/types/__init__.py @@ -1,7 +1,9 @@ # This file was auto-generated by Fern from our API Definition. from .create_bulk_collection_item_request_body_field_data import CreateBulkCollectionItemRequestBodyFieldData -from .create_bulk_collection_item_request_body_field_data_item import CreateBulkCollectionItemRequestBodyFieldDataItem +from .create_bulk_collection_item_request_body_field_data_one_item import ( + CreateBulkCollectionItemRequestBodyFieldDataOneItem, +) from .item_i_ds import ItemIDs from .item_i_ds_with_locales import ItemIDsWithLocales from .items_create_item_live_request_body import ItemsCreateItemLiveRequestBody @@ -22,7 +24,7 @@ __all__ = [ "CreateBulkCollectionItemRequestBodyFieldData", - "CreateBulkCollectionItemRequestBodyFieldDataItem", + "CreateBulkCollectionItemRequestBodyFieldDataOneItem", "ItemIDs", "ItemIDsWithLocales", "ItemsCreateItemLiveRequestBody", diff --git a/src/webflow/resources/collections/resources/items/types/create_bulk_collection_item_request_body_field_data.py b/src/webflow/resources/collections/resources/items/types/create_bulk_collection_item_request_body_field_data.py index c4bcb14..c99de2f 100644 --- a/src/webflow/resources/collections/resources/items/types/create_bulk_collection_item_request_body_field_data.py +++ b/src/webflow/resources/collections/resources/items/types/create_bulk_collection_item_request_body_field_data.py @@ -2,8 +2,10 @@ import typing from .single_cms_item import SingleCmsItem -from .create_bulk_collection_item_request_body_field_data_item import CreateBulkCollectionItemRequestBodyFieldDataItem +from .create_bulk_collection_item_request_body_field_data_one_item import ( + CreateBulkCollectionItemRequestBodyFieldDataOneItem, +) CreateBulkCollectionItemRequestBodyFieldData = typing.Union[ - SingleCmsItem, typing.List[CreateBulkCollectionItemRequestBodyFieldDataItem] + SingleCmsItem, typing.List[CreateBulkCollectionItemRequestBodyFieldDataOneItem] ] diff --git a/src/webflow/resources/collections/resources/items/types/create_bulk_collection_item_request_body_field_data_item.py b/src/webflow/resources/collections/resources/items/types/create_bulk_collection_item_request_body_field_data_one_item.py similarity index 86% rename from src/webflow/resources/collections/resources/items/types/create_bulk_collection_item_request_body_field_data_item.py rename to src/webflow/resources/collections/resources/items/types/create_bulk_collection_item_request_body_field_data_one_item.py index dd6a4f7..3406287 100644 --- a/src/webflow/resources/collections/resources/items/types/create_bulk_collection_item_request_body_field_data_item.py +++ b/src/webflow/resources/collections/resources/items/types/create_bulk_collection_item_request_body_field_data_one_item.py @@ -6,7 +6,7 @@ import typing -class CreateBulkCollectionItemRequestBodyFieldDataItem(UniversalBaseModel): +class CreateBulkCollectionItemRequestBodyFieldDataOneItem(UniversalBaseModel): """ A single CMS item to create """ @@ -18,7 +18,7 @@ class CreateBulkCollectionItemRequestBodyFieldDataItem(UniversalBaseModel): slug: str = pydantic.Field() """ - URL slug for the item in your site. + URL slug for the item in your site. Note: Updating the item slug will break all links referencing the old slug. """ diff --git a/src/webflow/resources/collections/resources/items/types/single_cms_item.py b/src/webflow/resources/collections/resources/items/types/single_cms_item.py index b64f1a4..944dca0 100644 --- a/src/webflow/resources/collections/resources/items/types/single_cms_item.py +++ b/src/webflow/resources/collections/resources/items/types/single_cms_item.py @@ -14,7 +14,7 @@ class SingleCmsItem(UniversalBaseModel): slug: str = pydantic.Field() """ - URL slug for the item in your site. + URL slug for the item in your site. Note: Updating the item slug will break all links referencing the old slug. """ diff --git a/src/webflow/resources/components/types/component_properties_write_properties_item.py b/src/webflow/resources/components/types/component_properties_write_properties_item.py index b4f8f50..26ae058 100644 --- a/src/webflow/resources/components/types/component_properties_write_properties_item.py +++ b/src/webflow/resources/components/types/component_properties_write_properties_item.py @@ -20,7 +20,7 @@ class ComponentPropertiesWritePropertiesItem(UniversalBaseModel): The provided value must be compatible with the type of the component property. - For example, attempting to update a single-line plain-text property with a multi-line + For example, attempting to update a single-line plain-text property with a multi-line value will result in an error. """ diff --git a/src/webflow/resources/sites/resources/redirects/client.py b/src/webflow/resources/sites/resources/redirects/client.py index 1ac17b4..4067782 100644 --- a/src/webflow/resources/sites/resources/redirects/client.py +++ b/src/webflow/resources/sites/resources/redirects/client.py @@ -277,7 +277,7 @@ def delete( Unique identifier for a Site redirect_id : str - Unique identifier site rediect + Unique identifier site redirect request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -392,7 +392,7 @@ def update( Unique identifier for a Site redirect_id : str - Unique identifier site rediect + Unique identifier site redirect id : typing.Optional[str] The ID of the specific redirect rule @@ -775,7 +775,7 @@ async def delete( Unique identifier for a Site redirect_id : str - Unique identifier site rediect + Unique identifier site redirect request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -898,7 +898,7 @@ async def update( Unique identifier for a Site redirect_id : str - Unique identifier site rediect + Unique identifier site redirect id : typing.Optional[str] The ID of the specific redirect rule diff --git a/src/webflow/types/component_dom.py b/src/webflow/types/component_dom.py index 2f70fc4..6c576b5 100644 --- a/src/webflow/types/component_dom.py +++ b/src/webflow/types/component_dom.py @@ -12,7 +12,7 @@ class ComponentDom(UniversalBaseModel): """ - The Component DOM schema represents the content structure of a component. Similar to Page DOM, it captures various content nodes and their associated attributes, but specifically for a component's structure. Each node has a unique identifier and can contain text, images, select or text inputs, submit buttons, or nested component instances. + The Component DOM schema represents the content structure of a component. Similar to Page DOM, it captures various content nodes and their associated attributes, but specifically for a component's structure. Each node has a unique identifier and can contain text, images, select or text inputs, submit buttons, or nested component instances. """ component_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="componentId")] = ( diff --git a/src/webflow/types/component_instance_node_property_overrides_write_property_overrides_item.py b/src/webflow/types/component_instance_node_property_overrides_write_property_overrides_item.py index 313b0d6..a430854 100644 --- a/src/webflow/types/component_instance_node_property_overrides_write_property_overrides_item.py +++ b/src/webflow/types/component_instance_node_property_overrides_write_property_overrides_item.py @@ -16,9 +16,9 @@ class ComponentInstanceNodePropertyOverridesWritePropertyOverridesItem(Universal text: str = pydantic.Field() """ - The new string or HTML value used to override the component instance property value. - The provided value must be compatible with the type of the component instance property. - For example, attempting to override a single-line plain-text property with a multi-line + The new string or HTML value used to override the component instance property value. + The provided value must be compatible with the type of the component instance property. + For example, attempting to override a single-line plain-text property with a multi-line value will result in an error. """ diff --git a/src/webflow/types/product_field_data.py b/src/webflow/types/product_field_data.py index e907159..ad2237c 100644 --- a/src/webflow/types/product_field_data.py +++ b/src/webflow/types/product_field_data.py @@ -13,7 +13,7 @@ class ProductFieldData(UniversalBaseModel): """ - Contains content-specific details for a product, covering both standard (e.g., title, description) and custom fields tailored to the product setup. + Contains content-specific details for a product, covering both standard (e.g., title, description) and custom fields tailored to the product setup. """ name: typing.Optional[str] = pydantic.Field(default=None) diff --git a/tests/__init__.py b/tests/__init__.py deleted file mode 100644 index f3ea265..0000000 --- a/tests/__init__.py +++ /dev/null @@ -1,2 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - diff --git a/tests/collections/__init__.py b/tests/collections/__init__.py deleted file mode 100644 index f3ea265..0000000 --- a/tests/collections/__init__.py +++ /dev/null @@ -1,2 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - diff --git a/tests/collections/test_fields.py b/tests/collections/test_fields.py deleted file mode 100644 index dc18ff3..0000000 --- a/tests/collections/test_fields.py +++ /dev/null @@ -1,106 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -from webflow import Webflow -from webflow import AsyncWebflow -import typing -from webflow import StaticField -from ..utilities import validate_response - - -async def test_create(client: Webflow, async_client: AsyncWebflow) -> None: - expected_response: typing.Any = { - "id": "562ac0395358780a1f5e6fbc", - "isEditable": True, - "isRequired": False, - "type": "RichText", - "displayName": "Post Body", - "helpText": "Add the body of your post here", - } - expected_types: typing.Any = { - "id": None, - "isEditable": None, - "isRequired": None, - "type": None, - "displayName": None, - "helpText": None, - } - response = client.collections.fields.create( - collection_id="580e63fc8c9a982ac9b8b745", - request=StaticField( - id="562ac0395358780a1f5e6fbc", - is_editable=True, - is_required=False, - type="RichText", - display_name="Post Body", - help_text="Add the body of your post here", - ), - ) - validate_response(response, expected_response, expected_types) - - async_response = await async_client.collections.fields.create( - collection_id="580e63fc8c9a982ac9b8b745", - request=StaticField( - id="562ac0395358780a1f5e6fbc", - is_editable=True, - is_required=False, - type="RichText", - display_name="Post Body", - help_text="Add the body of your post here", - ), - ) - validate_response(async_response, expected_response, expected_types) - - -async def test_delete(client: Webflow, async_client: AsyncWebflow) -> None: - # Type ignore to avoid mypy complaining about the function not being meant to return a value - assert ( - client.collections.fields.delete(collection_id="580e63fc8c9a982ac9b8b745", field_id="580e63fc8c9a982ac9b8b745") # type: ignore[func-returns-value] - is None - ) - - assert ( - await async_client.collections.fields.delete( - collection_id="580e63fc8c9a982ac9b8b745", field_id="580e63fc8c9a982ac9b8b745" - ) # type: ignore[func-returns-value] - is None - ) - - -async def test_update(client: Webflow, async_client: AsyncWebflow) -> None: - expected_response: typing.Any = { - "id": "75821f618da60c18383330bcc0ca488b", - "isRequired": False, - "isEditable": True, - "type": "RichText", - "slug": "post-body", - "displayName": "Post Body", - "helpText": "Add the body of your post here", - "validations": {"additionalProperties": "additionalProperties"}, - } - expected_types: typing.Any = { - "id": None, - "isRequired": None, - "isEditable": None, - "type": None, - "slug": None, - "displayName": None, - "helpText": None, - "validations": {"additionalProperties": None}, - } - response = client.collections.fields.update( - collection_id="580e63fc8c9a982ac9b8b745", - field_id="580e63fc8c9a982ac9b8b745", - is_required=False, - display_name="Post Body", - help_text="Add the body of your post here", - ) - validate_response(response, expected_response, expected_types) - - async_response = await async_client.collections.fields.update( - collection_id="580e63fc8c9a982ac9b8b745", - field_id="580e63fc8c9a982ac9b8b745", - is_required=False, - display_name="Post Body", - help_text="Add the body of your post here", - ) - validate_response(async_response, expected_response, expected_types) diff --git a/tests/collections/test_items.py b/tests/collections/test_items.py deleted file mode 100644 index 0b0807c..0000000 --- a/tests/collections/test_items.py +++ /dev/null @@ -1,1068 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -from webflow import Webflow -from webflow import AsyncWebflow -import typing -from ..utilities import validate_response -from webflow import CollectionItemPostSingle -from webflow import CollectionItemPostSingleFieldData -from webflow.resources.collections.resources.items import ItemsDeleteItemsRequestItemsItem -from webflow import CollectionItemWithIdInput -from webflow import CollectionItemWithIdInputFieldData -from webflow import CollectionItem -from webflow import CollectionItemFieldData -from webflow.resources.collections.resources.items import ItemsDeleteItemsLiveRequestItemsItem -from webflow.resources.collections.resources.items import SingleCmsItem -from webflow import CollectionItemPatchSingleFieldData -from webflow.resources.collections.resources.items import ItemIDs - - -async def test_list_items(client: Webflow, async_client: AsyncWebflow) -> None: - expected_response: typing.Any = { - "items": [ - { - "id": "62b720ef280c7a7a3be8cabe", - "cmsLocaleId": "66f6e966c9e1dc700a857ca3", - "lastPublished": "2022-06-30T13:35:20.878Z", - "lastUpdated": "2022-06-25T14:51:27.809Z", - "createdOn": "2022-06-25T14:51:27.809Z", - "isArchived": False, - "isDraft": False, - "fieldData": { - "name": "Senior Data Analyst", - "slug": "senior-data-analyst", - "url": "https://boards.greenhouse.io/webflow/jobs/26567701", - "department": "Data", - }, - }, - { - "id": "62c880ef281c7b7b4cf9dabc", - "cmsLocaleId": "66f6e966c9e1dc700a857ca3", - "lastPublished": "2023-04-15T10:25:18.123Z", - "lastUpdated": "2023-04-10T11:45:30.567Z", - "createdOn": "2023-04-10T11:45:30.567Z", - "isArchived": False, - "isDraft": False, - "fieldData": { - "name": "Product Manager", - "slug": "product-manager", - "url": "https://boards.greenhouse.io/webflow/jobs/31234567", - "department": "Product", - }, - }, - ], - "pagination": {"limit": 25, "offset": 0, "total": 2}, - } - expected_types: typing.Any = { - "items": ( - "list", - { - 0: { - "id": None, - "cmsLocaleId": None, - "lastPublished": None, - "lastUpdated": None, - "createdOn": None, - "isArchived": None, - "isDraft": None, - "fieldData": {"name": None, "slug": None}, - }, - 1: { - "id": None, - "cmsLocaleId": None, - "lastPublished": None, - "lastUpdated": None, - "createdOn": None, - "isArchived": None, - "isDraft": None, - "fieldData": {"name": None, "slug": None}, - }, - }, - ), - "pagination": {"limit": "integer", "offset": "integer", "total": "integer"}, - } - response = client.collections.items.list_items( - collection_id="580e63fc8c9a982ac9b8b745", - cms_locale_id="cmsLocaleId", - offset=1, - limit=1, - name="name", - slug="slug", - sort_by="lastPublished", - sort_order="asc", - ) - validate_response(response, expected_response, expected_types) - - async_response = await async_client.collections.items.list_items( - collection_id="580e63fc8c9a982ac9b8b745", - cms_locale_id="cmsLocaleId", - offset=1, - limit=1, - name="name", - slug="slug", - sort_by="lastPublished", - sort_order="asc", - ) - validate_response(async_response, expected_response, expected_types) - - -async def test_create_item(client: Webflow, async_client: AsyncWebflow) -> None: - expected_response: typing.Any = { - "id": "42b720ef280c7a7a3be8cabe", - "cmsLocaleId": "653ad57de882f528b32e810e", - "lastPublished": "2022-11-29T16:22:43.159Z", - "lastUpdated": "2022-11-17T17:19:43.282Z", - "createdOn": "2022-11-17T17:11:57.148Z", - "isArchived": False, - "isDraft": False, - "fieldData": { - "name": "The Hitchhiker's Guide to the Galaxy", - "slug": "hitchhikers-guide-to-the-galaxy", - "plain-text": "Don't Panic.", - "rich-text": "

A Guide to Interstellar Travel

A towel is about the most massively useful thing an interstellar hitchhiker can have. Don't forget yours!

", - "main-image": {"fileId": "62b720ef280c7a7a3be8cabe", "url": "/files/62b720ef280c7a7a3be8cabe_image.png"}, - "image-gallery": [ - {"fileId": "62b720ef280c7a7a3be8cabd", "url": "/files/62b720ef280c7a7a3be8cabd_image.png"}, - {"fileId": "62b720ef280c7a7a3be8cabe", "url": "/files/62b720ef280c7a7a3be8cabe_image.png"}, - ], - "intro-video": "https://www.youtube.com/watch?v=aJ83KAggd-4", - "official-site": "https://hitchhikers.fandom.com/wiki/The_Hitchhiker%27s_Guide_to_the_Galaxy", - "contact-email": "zaphod.beeblebrox@heartofgold.gov", - "support-phone": "424-242-4242", - "answer-to-everything": 42, - "release-date": "1979-10-12T00:00:00.000Z", - "is-featured": True, - "brand-color": "#000000", - "category": "62b720ef280c7a7a3be8cabf", - "author": "62b720ef280c7a7a3be8cab0", - "tags": ["62b720ef280c7a7a3be8cab1", "62b720ef280c7a7a3be8cab2"], - "downloadable-asset": { - "fileId": "62b720ef280c7a7a3be8cab3", - "url": "/files/62b720ef280c7a7a3be8cab3_document.pdf", - }, - }, - } - expected_types: typing.Any = { - "id": None, - "cmsLocaleId": None, - "lastPublished": None, - "lastUpdated": None, - "createdOn": None, - "isArchived": None, - "isDraft": None, - "fieldData": {"name": None, "slug": None}, - } - response = client.collections.items.create_item( - collection_id="580e63fc8c9a982ac9b8b745", - skip_invalid_files=True, - request=CollectionItemPostSingle( - is_archived=False, - is_draft=False, - field_data=CollectionItemPostSingleFieldData( - name="The Hitchhiker's Guide to the Galaxy", slug="hitchhikers-guide-to-the-galaxy" - ), - ), - ) - validate_response(response, expected_response, expected_types) - - async_response = await async_client.collections.items.create_item( - collection_id="580e63fc8c9a982ac9b8b745", - skip_invalid_files=True, - request=CollectionItemPostSingle( - is_archived=False, - is_draft=False, - field_data=CollectionItemPostSingleFieldData( - name="The Hitchhiker's Guide to the Galaxy", slug="hitchhikers-guide-to-the-galaxy" - ), - ), - ) - validate_response(async_response, expected_response, expected_types) - - -async def test_delete_items(client: Webflow, async_client: AsyncWebflow) -> None: - # Type ignore to avoid mypy complaining about the function not being meant to return a value - assert ( - client.collections.items.delete_items( - collection_id="580e63fc8c9a982ac9b8b745", - items=[ItemsDeleteItemsRequestItemsItem(id="580e64008c9a982ac9b8b754")], - ) # type: ignore[func-returns-value] - is None - ) - - assert ( - await async_client.collections.items.delete_items( - collection_id="580e63fc8c9a982ac9b8b745", - items=[ItemsDeleteItemsRequestItemsItem(id="580e64008c9a982ac9b8b754")], - ) # type: ignore[func-returns-value] - is None - ) - - -async def test_update_items(client: Webflow, async_client: AsyncWebflow) -> None: - expected_response: typing.Any = { - "items": [ - { - "id": "66f6ed9576ddacf3149d5ea6", - "cmsLocaleId": "66f6e966c9e1dc700a857ca5", - "lastPublished": "2024-09-27T17:38:29.066Z", - "lastUpdated": "2024-09-27T17:38:29.066Z", - "createdOn": "2024-09-27T17:38:29.066Z", - "isArchived": False, - "isDraft": False, - "fieldData": {"name": "Ne Paniquez Pas", "slug": "ne-paniquez-pas", "featured": False}, - }, - { - "id": "66f6ed9576ddacf3149d5ea6", - "cmsLocaleId": "66f6e966c9e1dc700a857ca4", - "lastPublished": "2024-09-27T17:38:29.066Z", - "lastUpdated": "2024-09-27T17:38:29.066Z", - "createdOn": "2024-09-27T17:38:29.066Z", - "isArchived": False, - "isDraft": False, - "fieldData": {"name": "No Entrar en Pánico", "slug": "no-entrar-en-panico", "featured": False}, - }, - { - "id": "66f6ed9576ddacf3149d5eaa", - "cmsLocaleId": "66f6e966c9e1dc700a857ca5", - "lastPublished": "2024-09-27T17:38:29.066Z", - "lastUpdated": "2024-09-27T17:38:29.066Z", - "createdOn": "2024-09-27T17:38:29.066Z", - "isArchived": False, - "isDraft": False, - "fieldData": { - "name": "Au Revoir et Merci pour Tous les Poissons", - "slug": "au-revoir-et-merci", - "featured": False, - }, - }, - { - "id": "66f6ed9576ddacf3149d5eaa", - "cmsLocaleId": "66f6e966c9e1dc700a857ca4", - "lastPublished": "2024-09-27T17:38:29.066Z", - "lastUpdated": "2024-09-27T17:38:29.066Z", - "createdOn": "2024-09-27T17:38:29.066Z", - "isArchived": False, - "isDraft": False, - "fieldData": { - "name": "Hasta Luego y Gracias por Todo el Pescado", - "slug": "hasta-luego-y-gracias", - "featured": False, - }, - }, - ], - "pagination": {"limit": 25, "offset": 0, "total": 4}, - } - expected_types: typing.Any = { - "items": ( - "list", - { - 0: { - "id": None, - "cmsLocaleId": None, - "lastPublished": None, - "lastUpdated": None, - "createdOn": None, - "isArchived": None, - "isDraft": None, - "fieldData": {"name": None, "slug": None}, - }, - 1: { - "id": None, - "cmsLocaleId": None, - "lastPublished": None, - "lastUpdated": None, - "createdOn": None, - "isArchived": None, - "isDraft": None, - "fieldData": {"name": None, "slug": None}, - }, - 2: { - "id": None, - "cmsLocaleId": None, - "lastPublished": None, - "lastUpdated": None, - "createdOn": None, - "isArchived": None, - "isDraft": None, - "fieldData": {"name": None, "slug": None}, - }, - 3: { - "id": None, - "cmsLocaleId": None, - "lastPublished": None, - "lastUpdated": None, - "createdOn": None, - "isArchived": None, - "isDraft": None, - "fieldData": {"name": None, "slug": None}, - }, - }, - ), - "pagination": {"limit": "integer", "offset": "integer", "total": "integer"}, - } - response = client.collections.items.update_items( - collection_id="580e63fc8c9a982ac9b8b745", - skip_invalid_files=True, - items=[ - CollectionItemWithIdInput( - id="66f6ed9576ddacf3149d5ea6", - cms_locale_id="66f6e966c9e1dc700a857ca5", - field_data=CollectionItemWithIdInputFieldData(name="Ne Paniquez Pas", slug="ne-paniquez-pas"), - ), - CollectionItemWithIdInput( - id="66f6ed9576ddacf3149d5ea6", - cms_locale_id="66f6e966c9e1dc700a857ca4", - field_data=CollectionItemWithIdInputFieldData(name="No Entrar en Pánico", slug="no-entrar-en-panico"), - ), - CollectionItemWithIdInput( - id="66f6ed9576ddacf3149d5eaa", - cms_locale_id="66f6e966c9e1dc700a857ca5", - field_data=CollectionItemWithIdInputFieldData( - name="Au Revoir et Merci pour Tous les Poissons", slug="au-revoir-et-merci" - ), - ), - CollectionItemWithIdInput( - id="66f6ed9576ddacf3149d5eaa", - cms_locale_id="66f6e966c9e1dc700a857ca4", - field_data=CollectionItemWithIdInputFieldData( - name="Hasta Luego y Gracias por Todo el Pescado", slug="hasta-luego-y-gracias" - ), - ), - ], - ) - validate_response(response, expected_response, expected_types) - - async_response = await async_client.collections.items.update_items( - collection_id="580e63fc8c9a982ac9b8b745", - skip_invalid_files=True, - items=[ - CollectionItemWithIdInput( - id="66f6ed9576ddacf3149d5ea6", - cms_locale_id="66f6e966c9e1dc700a857ca5", - field_data=CollectionItemWithIdInputFieldData(name="Ne Paniquez Pas", slug="ne-paniquez-pas"), - ), - CollectionItemWithIdInput( - id="66f6ed9576ddacf3149d5ea6", - cms_locale_id="66f6e966c9e1dc700a857ca4", - field_data=CollectionItemWithIdInputFieldData(name="No Entrar en Pánico", slug="no-entrar-en-panico"), - ), - CollectionItemWithIdInput( - id="66f6ed9576ddacf3149d5eaa", - cms_locale_id="66f6e966c9e1dc700a857ca5", - field_data=CollectionItemWithIdInputFieldData( - name="Au Revoir et Merci pour Tous les Poissons", slug="au-revoir-et-merci" - ), - ), - CollectionItemWithIdInput( - id="66f6ed9576ddacf3149d5eaa", - cms_locale_id="66f6e966c9e1dc700a857ca4", - field_data=CollectionItemWithIdInputFieldData( - name="Hasta Luego y Gracias por Todo el Pescado", slug="hasta-luego-y-gracias" - ), - ), - ], - ) - validate_response(async_response, expected_response, expected_types) - - -async def test_list_items_live(client: Webflow, async_client: AsyncWebflow) -> None: - expected_response: typing.Any = { - "items": [ - { - "id": "62b720ef280c7a7a3be8cabe", - "cmsLocaleId": "66f6e966c9e1dc700a857ca3", - "lastPublished": "2022-06-30T13:35:20.878Z", - "lastUpdated": "2022-06-25T14:51:27.809Z", - "createdOn": "2022-06-25T14:51:27.809Z", - "isArchived": False, - "isDraft": False, - "fieldData": { - "name": "Senior Data Analyst", - "slug": "senior-data-analyst", - "url": "https://boards.greenhouse.io/webflow/jobs/26567701", - "department": "Data", - }, - }, - { - "id": "62c880ef281c7b7b4cf9dabc", - "cmsLocaleId": "66f6e966c9e1dc700a857ca3", - "lastPublished": "2023-04-15T10:25:18.123Z", - "lastUpdated": "2023-04-10T11:45:30.567Z", - "createdOn": "2023-04-10T11:45:30.567Z", - "isArchived": False, - "isDraft": False, - "fieldData": { - "name": "Product Manager", - "slug": "product-manager", - "url": "https://boards.greenhouse.io/webflow/jobs/31234567", - "department": "Product", - }, - }, - ], - "pagination": {"limit": 25, "offset": 0, "total": 2}, - } - expected_types: typing.Any = { - "items": ( - "list", - { - 0: { - "id": None, - "cmsLocaleId": None, - "lastPublished": None, - "lastUpdated": None, - "createdOn": None, - "isArchived": None, - "isDraft": None, - "fieldData": {"name": None, "slug": None}, - }, - 1: { - "id": None, - "cmsLocaleId": None, - "lastPublished": None, - "lastUpdated": None, - "createdOn": None, - "isArchived": None, - "isDraft": None, - "fieldData": {"name": None, "slug": None}, - }, - }, - ), - "pagination": {"limit": "integer", "offset": "integer", "total": "integer"}, - } - response = client.collections.items.list_items_live( - collection_id="580e63fc8c9a982ac9b8b745", - cms_locale_id="cmsLocaleId", - offset=1, - limit=1, - name="name", - slug="slug", - sort_by="lastPublished", - sort_order="asc", - ) - validate_response(response, expected_response, expected_types) - - async_response = await async_client.collections.items.list_items_live( - collection_id="580e63fc8c9a982ac9b8b745", - cms_locale_id="cmsLocaleId", - offset=1, - limit=1, - name="name", - slug="slug", - sort_by="lastPublished", - sort_order="asc", - ) - validate_response(async_response, expected_response, expected_types) - - -async def test_create_item_live(client: Webflow, async_client: AsyncWebflow) -> None: - expected_response: typing.Any = { - "id": "42b720ef280c7a7a3be8cabe", - "cmsLocaleId": "653ad57de882f528b32e810e", - "lastPublished": "2022-11-29T16:22:43.159Z", - "lastUpdated": "2022-11-17T17:19:43.282Z", - "createdOn": "2022-11-17T17:11:57.148Z", - "isArchived": False, - "isDraft": False, - "fieldData": { - "name": "The Hitchhiker's Guide to the Galaxy", - "slug": "hitchhikers-guide-to-the-galaxy", - "plain-text": "Don't Panic.", - "rich-text": "

A Guide to Interstellar Travel

A towel is about the most massively useful thing an interstellar hitchhiker can have. Don't forget yours!

", - "main-image": {"fileId": "62b720ef280c7a7a3be8cabe", "url": "/files/62b720ef280c7a7a3be8cabe_image.png"}, - "image-gallery": [ - {"fileId": "62b720ef280c7a7a3be8cabd", "url": "/files/62b720ef280c7a7a3be8cabd_image.png"}, - {"fileId": "62b720ef280c7a7a3be8cabe", "url": "/files/62b720ef280c7a7a3be8cabe_image.png"}, - ], - "intro-video": "https://www.youtube.com/watch?v=aJ83KAggd-4", - "official-site": "https://hitchhikers.fandom.com/wiki/The_Hitchhiker%27s_Guide_to_the_Galaxy", - "contact-email": "zaphod.beeblebrox@heartofgold.gov", - "support-phone": "424-242-4242", - "answer-to-everything": 42, - "release-date": "1979-10-12T00:00:00.000Z", - "is-featured": True, - "brand-color": "#000000", - "category": "62b720ef280c7a7a3be8cabf", - "author": "62b720ef280c7a7a3be8cab0", - "tags": ["62b720ef280c7a7a3be8cab1", "62b720ef280c7a7a3be8cab2"], - "downloadable-asset": { - "fileId": "62b720ef280c7a7a3be8cab3", - "url": "/files/62b720ef280c7a7a3be8cab3_document.pdf", - }, - }, - } - expected_types: typing.Any = { - "id": None, - "cmsLocaleId": None, - "lastPublished": None, - "lastUpdated": None, - "createdOn": None, - "isArchived": None, - "isDraft": None, - "fieldData": {"name": None, "slug": None}, - } - response = client.collections.items.create_item_live( - collection_id="580e63fc8c9a982ac9b8b745", - skip_invalid_files=True, - request=CollectionItem( - is_archived=False, - is_draft=False, - field_data=CollectionItemFieldData( - name="The Hitchhiker's Guide to the Galaxy", slug="hitchhikers-guide-to-the-galaxy" - ), - ), - ) - validate_response(response, expected_response, expected_types) - - async_response = await async_client.collections.items.create_item_live( - collection_id="580e63fc8c9a982ac9b8b745", - skip_invalid_files=True, - request=CollectionItem( - is_archived=False, - is_draft=False, - field_data=CollectionItemFieldData( - name="The Hitchhiker's Guide to the Galaxy", slug="hitchhikers-guide-to-the-galaxy" - ), - ), - ) - validate_response(async_response, expected_response, expected_types) - - -async def test_delete_items_live(client: Webflow, async_client: AsyncWebflow) -> None: - # Type ignore to avoid mypy complaining about the function not being meant to return a value - assert ( - client.collections.items.delete_items_live( - collection_id="580e63fc8c9a982ac9b8b745", - items=[ItemsDeleteItemsLiveRequestItemsItem(id="580e64008c9a982ac9b8b754")], - ) # type: ignore[func-returns-value] - is None - ) - - assert ( - await async_client.collections.items.delete_items_live( - collection_id="580e63fc8c9a982ac9b8b745", - items=[ItemsDeleteItemsLiveRequestItemsItem(id="580e64008c9a982ac9b8b754")], - ) # type: ignore[func-returns-value] - is None - ) - - -async def test_update_items_live(client: Webflow, async_client: AsyncWebflow) -> None: - expected_response: typing.Any = { - "items": [ - { - "id": "66f6ed9576ddacf3149d5ea6", - "cmsLocaleId": "66f6e966c9e1dc700a857ca5", - "lastPublished": "2024-09-27T17:38:29.066Z", - "lastUpdated": "2024-09-27T17:38:29.066Z", - "createdOn": "2024-09-27T17:38:29.066Z", - "isArchived": False, - "isDraft": False, - "fieldData": {"name": "Ne Paniquez Pas", "slug": "ne-paniquez-pas", "featured": False}, - }, - { - "id": "66f6ed9576ddacf3149d5ea6", - "cmsLocaleId": "66f6e966c9e1dc700a857ca4", - "lastPublished": "2024-09-27T17:38:29.066Z", - "lastUpdated": "2024-09-27T17:38:29.066Z", - "createdOn": "2024-09-27T17:38:29.066Z", - "isArchived": False, - "isDraft": False, - "fieldData": {"name": "No Entrar en Pánico", "slug": "no-entrar-en-panico", "featured": False}, - }, - { - "id": "66f6ed9576ddacf3149d5eaa", - "cmsLocaleId": "66f6e966c9e1dc700a857ca5", - "lastPublished": "2024-09-27T17:38:29.066Z", - "lastUpdated": "2024-09-27T17:38:29.066Z", - "createdOn": "2024-09-27T17:38:29.066Z", - "isArchived": False, - "isDraft": False, - "fieldData": { - "name": "Au Revoir et Merci pour Tous les Poissons", - "slug": "au-revoir-et-merci", - "featured": False, - }, - }, - { - "id": "66f6ed9576ddacf3149d5eaa", - "cmsLocaleId": "66f6e966c9e1dc700a857ca4", - "lastPublished": "2024-09-27T17:38:29.066Z", - "lastUpdated": "2024-09-27T17:38:29.066Z", - "createdOn": "2024-09-27T17:38:29.066Z", - "isArchived": False, - "isDraft": False, - "fieldData": { - "name": "Hasta Luego y Gracias por Todo el Pescado", - "slug": "hasta-luego-y-gracias", - "featured": False, - }, - }, - ] - } - expected_types: typing.Any = { - "items": ( - "list", - { - 0: { - "id": None, - "cmsLocaleId": None, - "lastPublished": None, - "lastUpdated": None, - "createdOn": None, - "isArchived": None, - "isDraft": None, - "fieldData": {"name": None, "slug": None}, - }, - 1: { - "id": None, - "cmsLocaleId": None, - "lastPublished": None, - "lastUpdated": None, - "createdOn": None, - "isArchived": None, - "isDraft": None, - "fieldData": {"name": None, "slug": None}, - }, - 2: { - "id": None, - "cmsLocaleId": None, - "lastPublished": None, - "lastUpdated": None, - "createdOn": None, - "isArchived": None, - "isDraft": None, - "fieldData": {"name": None, "slug": None}, - }, - 3: { - "id": None, - "cmsLocaleId": None, - "lastPublished": None, - "lastUpdated": None, - "createdOn": None, - "isArchived": None, - "isDraft": None, - "fieldData": {"name": None, "slug": None}, - }, - }, - ) - } - response = client.collections.items.update_items_live( - collection_id="580e63fc8c9a982ac9b8b745", - skip_invalid_files=True, - items=[ - CollectionItemWithIdInput( - id="66f6ed9576ddacf3149d5ea6", - cms_locale_id="66f6e966c9e1dc700a857ca5", - field_data=CollectionItemWithIdInputFieldData(name="Ne Paniquez Pas", slug="ne-paniquez-pas"), - ), - CollectionItemWithIdInput( - id="66f6ed9576ddacf3149d5ea6", - cms_locale_id="66f6e966c9e1dc700a857ca4", - field_data=CollectionItemWithIdInputFieldData(name="No Entrar en Pánico", slug="no-entrar-en-panico"), - ), - CollectionItemWithIdInput( - id="66f6ed9576ddacf3149d5eaa", - cms_locale_id="66f6e966c9e1dc700a857ca5", - field_data=CollectionItemWithIdInputFieldData( - name="Au Revoir et Merci pour Tous les Poissons", slug="au-revoir-et-merci" - ), - ), - CollectionItemWithIdInput( - id="66f6ed9576ddacf3149d5eaa", - cms_locale_id="66f6e966c9e1dc700a857ca4", - field_data=CollectionItemWithIdInputFieldData( - name="Hasta Luego y Gracias por Todo el Pescado", slug="hasta-luego-y-gracias" - ), - ), - ], - ) - validate_response(response, expected_response, expected_types) - - async_response = await async_client.collections.items.update_items_live( - collection_id="580e63fc8c9a982ac9b8b745", - skip_invalid_files=True, - items=[ - CollectionItemWithIdInput( - id="66f6ed9576ddacf3149d5ea6", - cms_locale_id="66f6e966c9e1dc700a857ca5", - field_data=CollectionItemWithIdInputFieldData(name="Ne Paniquez Pas", slug="ne-paniquez-pas"), - ), - CollectionItemWithIdInput( - id="66f6ed9576ddacf3149d5ea6", - cms_locale_id="66f6e966c9e1dc700a857ca4", - field_data=CollectionItemWithIdInputFieldData(name="No Entrar en Pánico", slug="no-entrar-en-panico"), - ), - CollectionItemWithIdInput( - id="66f6ed9576ddacf3149d5eaa", - cms_locale_id="66f6e966c9e1dc700a857ca5", - field_data=CollectionItemWithIdInputFieldData( - name="Au Revoir et Merci pour Tous les Poissons", slug="au-revoir-et-merci" - ), - ), - CollectionItemWithIdInput( - id="66f6ed9576ddacf3149d5eaa", - cms_locale_id="66f6e966c9e1dc700a857ca4", - field_data=CollectionItemWithIdInputFieldData( - name="Hasta Luego y Gracias por Todo el Pescado", slug="hasta-luego-y-gracias" - ), - ), - ], - ) - validate_response(async_response, expected_response, expected_types) - - -async def test_create_items(client: Webflow, async_client: AsyncWebflow) -> None: - expected_response: typing.Any = { - "id": "580e64008c9a982ac9b8b754", - "cmsLocaleIds": ["653ad57de882f528b32e810e", "6514390aea353fc691d69827", "65143930ea353fc691d69cd8"], - "lastPublished": "2023-03-17T18:47:35.560Z", - "lastUpdated": "2023-03-17T18:47:35.560Z", - "createdOn": "2023-03-17T18:47:35.560Z", - "isArchived": True, - "isDraft": True, - "fieldData": { - "name": "My new item", - "slug": "my-new-item", - "date": "2022-11-18T00:00:00.000Z", - "featured": False, - "color": "#db4b68", - }, - } - expected_types: typing.Any = { - "id": None, - "cmsLocaleIds": ("list", {0: None, 1: None, 2: None}), - "lastPublished": None, - "lastUpdated": None, - "createdOn": None, - "isArchived": None, - "isDraft": None, - "fieldData": {"name": None, "slug": None}, - } - response = client.collections.items.create_items( - collection_id="580e63fc8c9a982ac9b8b745", - skip_invalid_files=True, - cms_locale_ids=["66f6e966c9e1dc700a857ca3", "66f6e966c9e1dc700a857ca4", "66f6e966c9e1dc700a857ca5"], - is_archived=False, - is_draft=False, - field_data=SingleCmsItem(name="Don’t Panic", slug="dont-panic"), - ) - validate_response(response, expected_response, expected_types) - - async_response = await async_client.collections.items.create_items( - collection_id="580e63fc8c9a982ac9b8b745", - skip_invalid_files=True, - cms_locale_ids=["66f6e966c9e1dc700a857ca3", "66f6e966c9e1dc700a857ca4", "66f6e966c9e1dc700a857ca5"], - is_archived=False, - is_draft=False, - field_data=SingleCmsItem(name="Don’t Panic", slug="dont-panic"), - ) - validate_response(async_response, expected_response, expected_types) - - -async def test_get_item(client: Webflow, async_client: AsyncWebflow) -> None: - expected_response: typing.Any = { - "id": "42b720ef280c7a7a3be8cabe", - "cmsLocaleId": "653ad57de882f528b32e810e", - "lastPublished": "2022-11-29T16:22:43.159Z", - "lastUpdated": "2022-11-17T17:19:43.282Z", - "createdOn": "2022-11-17T17:11:57.148Z", - "isArchived": False, - "isDraft": False, - "fieldData": { - "name": "The Hitchhiker's Guide to the Galaxy", - "slug": "hitchhikers-guide-to-the-galaxy", - "plain-text": "Don't Panic.", - "rich-text": "

A Guide to Interstellar Travel

A towel is about the most massively useful thing an interstellar hitchhiker can have. Don't forget yours!

", - "main-image": {"fileId": "62b720ef280c7a7a3be8cabe", "url": "/files/62b720ef280c7a7a3be8cabe_image.png"}, - "image-gallery": [ - {"fileId": "62b720ef280c7a7a3be8cabd", "url": "/files/62b720ef280c7a7a3be8cabd_image.png"}, - {"fileId": "62b720ef280c7a7a3be8cabe", "url": "/files/62b720ef280c7a7a3be8cabe_image.png"}, - ], - "intro-video": "https://www.youtube.com/watch?v=aJ83KAggd-4", - "official-site": "https://hitchhikers.fandom.com/wiki/The_Hitchhiker%27s_Guide_to_the_Galaxy", - "contact-email": "zaphod.beeblebrox@heartofgold.gov", - "support-phone": "424-242-4242", - "answer-to-everything": 42, - "release-date": "1979-10-12T00:00:00.000Z", - "is-featured": True, - "brand-color": "#000000", - "category": "62b720ef280c7a7a3be8cabf", - "author": "62b720ef280c7a7a3be8cab0", - "tags": ["62b720ef280c7a7a3be8cab1", "62b720ef280c7a7a3be8cab2"], - "downloadable-asset": { - "fileId": "62b720ef280c7a7a3be8cab3", - "url": "/files/62b720ef280c7a7a3be8cab3_document.pdf", - }, - }, - } - expected_types: typing.Any = { - "id": None, - "cmsLocaleId": None, - "lastPublished": None, - "lastUpdated": None, - "createdOn": None, - "isArchived": None, - "isDraft": None, - "fieldData": {"name": None, "slug": None}, - } - response = client.collections.items.get_item( - collection_id="580e63fc8c9a982ac9b8b745", item_id="580e64008c9a982ac9b8b754", cms_locale_id="cmsLocaleId" - ) - validate_response(response, expected_response, expected_types) - - async_response = await async_client.collections.items.get_item( - collection_id="580e63fc8c9a982ac9b8b745", item_id="580e64008c9a982ac9b8b754", cms_locale_id="cmsLocaleId" - ) - validate_response(async_response, expected_response, expected_types) - - -async def test_delete_item(client: Webflow, async_client: AsyncWebflow) -> None: - # Type ignore to avoid mypy complaining about the function not being meant to return a value - assert ( - client.collections.items.delete_item( - collection_id="580e63fc8c9a982ac9b8b745", item_id="580e64008c9a982ac9b8b754", cms_locale_id="cmsLocaleId" - ) # type: ignore[func-returns-value] - is None - ) - - assert ( - await async_client.collections.items.delete_item( - collection_id="580e63fc8c9a982ac9b8b745", item_id="580e64008c9a982ac9b8b754", cms_locale_id="cmsLocaleId" - ) # type: ignore[func-returns-value] - is None - ) - - -async def test_update_item(client: Webflow, async_client: AsyncWebflow) -> None: - expected_response: typing.Any = { - "id": "42b720ef280c7a7a3be8cabe", - "cmsLocaleId": "653ad57de882f528b32e810e", - "lastPublished": "2022-11-29T16:22:43.159Z", - "lastUpdated": "2022-11-17T17:19:43.282Z", - "createdOn": "2022-11-17T17:11:57.148Z", - "isArchived": False, - "isDraft": False, - "fieldData": { - "name": "The Hitchhiker's Guide to the Galaxy", - "slug": "hitchhikers-guide-to-the-galaxy", - "plain-text": "Don't Panic.", - "rich-text": "

A Guide to Interstellar Travel

A towel is about the most massively useful thing an interstellar hitchhiker can have. Don't forget yours!

", - "main-image": {"fileId": "62b720ef280c7a7a3be8cabe", "url": "/files/62b720ef280c7a7a3be8cabe_image.png"}, - "image-gallery": [ - {"fileId": "62b720ef280c7a7a3be8cabd", "url": "/files/62b720ef280c7a7a3be8cabd_image.png"}, - {"fileId": "62b720ef280c7a7a3be8cabe", "url": "/files/62b720ef280c7a7a3be8cabe_image.png"}, - ], - "intro-video": "https://www.youtube.com/watch?v=aJ83KAggd-4", - "official-site": "https://hitchhikers.fandom.com/wiki/The_Hitchhiker%27s_Guide_to_the_Galaxy", - "contact-email": "zaphod.beeblebrox@heartofgold.gov", - "support-phone": "424-242-4242", - "answer-to-everything": 42, - "release-date": "1979-10-12T00:00:00.000Z", - "is-featured": True, - "brand-color": "#000000", - "category": "62b720ef280c7a7a3be8cabf", - "author": "62b720ef280c7a7a3be8cab0", - "tags": ["62b720ef280c7a7a3be8cab1", "62b720ef280c7a7a3be8cab2"], - "downloadable-asset": { - "fileId": "62b720ef280c7a7a3be8cab3", - "url": "/files/62b720ef280c7a7a3be8cab3_document.pdf", - }, - }, - } - expected_types: typing.Any = { - "id": None, - "cmsLocaleId": None, - "lastPublished": None, - "lastUpdated": None, - "createdOn": None, - "isArchived": None, - "isDraft": None, - "fieldData": {"name": None, "slug": None}, - } - response = client.collections.items.update_item( - collection_id="580e63fc8c9a982ac9b8b745", - item_id="580e64008c9a982ac9b8b754", - skip_invalid_files=True, - is_archived=False, - is_draft=False, - field_data=CollectionItemPatchSingleFieldData( - name="The Hitchhiker's Guide to the Galaxy", slug="hitchhikers-guide-to-the-galaxy" - ), - ) - validate_response(response, expected_response, expected_types) - - async_response = await async_client.collections.items.update_item( - collection_id="580e63fc8c9a982ac9b8b745", - item_id="580e64008c9a982ac9b8b754", - skip_invalid_files=True, - is_archived=False, - is_draft=False, - field_data=CollectionItemPatchSingleFieldData( - name="The Hitchhiker's Guide to the Galaxy", slug="hitchhikers-guide-to-the-galaxy" - ), - ) - validate_response(async_response, expected_response, expected_types) - - -async def test_get_item_live(client: Webflow, async_client: AsyncWebflow) -> None: - expected_response: typing.Any = { - "id": "42b720ef280c7a7a3be8cabe", - "cmsLocaleId": "653ad57de882f528b32e810e", - "lastPublished": "2022-11-29T16:22:43.159Z", - "lastUpdated": "2022-11-17T17:19:43.282Z", - "createdOn": "2022-11-17T17:11:57.148Z", - "isArchived": False, - "isDraft": False, - "fieldData": { - "name": "The Hitchhiker's Guide to the Galaxy", - "slug": "hitchhikers-guide-to-the-galaxy", - "plain-text": "Don't Panic.", - "rich-text": "

A Guide to Interstellar Travel

A towel is about the most massively useful thing an interstellar hitchhiker can have. Don't forget yours!

", - "main-image": {"fileId": "62b720ef280c7a7a3be8cabe", "url": "/files/62b720ef280c7a7a3be8cabe_image.png"}, - "image-gallery": [ - {"fileId": "62b720ef280c7a7a3be8cabd", "url": "/files/62b720ef280c7a7a3be8cabd_image.png"}, - {"fileId": "62b720ef280c7a7a3be8cabe", "url": "/files/62b720ef280c7a7a3be8cabe_image.png"}, - ], - "intro-video": "https://www.youtube.com/watch?v=aJ83KAggd-4", - "official-site": "https://hitchhikers.fandom.com/wiki/The_Hitchhiker%27s_Guide_to_the_Galaxy", - "contact-email": "zaphod.beeblebrox@heartofgold.gov", - "support-phone": "424-242-4242", - "answer-to-everything": 42, - "release-date": "1979-10-12T00:00:00.000Z", - "is-featured": True, - "brand-color": "#000000", - "category": "62b720ef280c7a7a3be8cabf", - "author": "62b720ef280c7a7a3be8cab0", - "tags": ["62b720ef280c7a7a3be8cab1", "62b720ef280c7a7a3be8cab2"], - "downloadable-asset": { - "fileId": "62b720ef280c7a7a3be8cab3", - "url": "/files/62b720ef280c7a7a3be8cab3_document.pdf", - }, - }, - } - expected_types: typing.Any = { - "id": None, - "cmsLocaleId": None, - "lastPublished": None, - "lastUpdated": None, - "createdOn": None, - "isArchived": None, - "isDraft": None, - "fieldData": {"name": None, "slug": None}, - } - response = client.collections.items.get_item_live( - collection_id="580e63fc8c9a982ac9b8b745", item_id="580e64008c9a982ac9b8b754", cms_locale_id="cmsLocaleId" - ) - validate_response(response, expected_response, expected_types) - - async_response = await async_client.collections.items.get_item_live( - collection_id="580e63fc8c9a982ac9b8b745", item_id="580e64008c9a982ac9b8b754", cms_locale_id="cmsLocaleId" - ) - validate_response(async_response, expected_response, expected_types) - - -async def test_delete_item_live(client: Webflow, async_client: AsyncWebflow) -> None: - # Type ignore to avoid mypy complaining about the function not being meant to return a value - assert ( - client.collections.items.delete_item_live( - collection_id="580e63fc8c9a982ac9b8b745", item_id="580e64008c9a982ac9b8b754", cms_locale_id="cmsLocaleId" - ) # type: ignore[func-returns-value] - is None - ) - - assert ( - await async_client.collections.items.delete_item_live( - collection_id="580e63fc8c9a982ac9b8b745", item_id="580e64008c9a982ac9b8b754", cms_locale_id="cmsLocaleId" - ) # type: ignore[func-returns-value] - is None - ) - - -async def test_update_item_live(client: Webflow, async_client: AsyncWebflow) -> None: - expected_response: typing.Any = { - "id": "42b720ef280c7a7a3be8cabe", - "cmsLocaleId": "653ad57de882f528b32e810e", - "lastPublished": "2022-11-29T16:22:43.159Z", - "lastUpdated": "2022-11-17T17:19:43.282Z", - "createdOn": "2022-11-17T17:11:57.148Z", - "isArchived": False, - "isDraft": False, - "fieldData": { - "name": "The Hitchhiker's Guide to the Galaxy", - "slug": "hitchhikers-guide-to-the-galaxy", - "plain-text": "Don't Panic.", - "rich-text": "

A Guide to Interstellar Travel

A towel is about the most massively useful thing an interstellar hitchhiker can have. Don't forget yours!

", - "main-image": {"fileId": "62b720ef280c7a7a3be8cabe", "url": "/files/62b720ef280c7a7a3be8cabe_image.png"}, - "image-gallery": [ - {"fileId": "62b720ef280c7a7a3be8cabd", "url": "/files/62b720ef280c7a7a3be8cabd_image.png"}, - {"fileId": "62b720ef280c7a7a3be8cabe", "url": "/files/62b720ef280c7a7a3be8cabe_image.png"}, - ], - "intro-video": "https://www.youtube.com/watch?v=aJ83KAggd-4", - "official-site": "https://hitchhikers.fandom.com/wiki/The_Hitchhiker%27s_Guide_to_the_Galaxy", - "contact-email": "zaphod.beeblebrox@heartofgold.gov", - "support-phone": "424-242-4242", - "answer-to-everything": 42, - "release-date": "1979-10-12T00:00:00.000Z", - "is-featured": True, - "brand-color": "#000000", - "category": "62b720ef280c7a7a3be8cabf", - "author": "62b720ef280c7a7a3be8cab0", - "tags": ["62b720ef280c7a7a3be8cab1", "62b720ef280c7a7a3be8cab2"], - "downloadable-asset": { - "fileId": "62b720ef280c7a7a3be8cab3", - "url": "/files/62b720ef280c7a7a3be8cab3_document.pdf", - }, - }, - } - expected_types: typing.Any = { - "id": None, - "cmsLocaleId": None, - "lastPublished": None, - "lastUpdated": None, - "createdOn": None, - "isArchived": None, - "isDraft": None, - "fieldData": {"name": None, "slug": None}, - } - response = client.collections.items.update_item_live( - collection_id="580e63fc8c9a982ac9b8b745", - item_id="580e64008c9a982ac9b8b754", - skip_invalid_files=True, - is_archived=False, - is_draft=False, - field_data=CollectionItemPatchSingleFieldData( - name="The Hitchhiker's Guide to the Galaxy", slug="hitchhikers-guide-to-the-galaxy" - ), - ) - validate_response(response, expected_response, expected_types) - - async_response = await async_client.collections.items.update_item_live( - collection_id="580e63fc8c9a982ac9b8b745", - item_id="580e64008c9a982ac9b8b754", - skip_invalid_files=True, - is_archived=False, - is_draft=False, - field_data=CollectionItemPatchSingleFieldData( - name="The Hitchhiker's Guide to the Galaxy", slug="hitchhikers-guide-to-the-galaxy" - ), - ) - validate_response(async_response, expected_response, expected_types) - - -async def test_publish_item(client: Webflow, async_client: AsyncWebflow) -> None: - expected_response: typing.Any = { - "publishedItemIds": ["643fd856d66b6528195ee2ca", "643fd856d66b6528195ee2cb"], - "errors": ["Staging item ID 643fd856d66b6528195ee2cf not found."], - } - expected_types: typing.Any = {"publishedItemIds": ("list", {0: None, 1: None}), "errors": ("list", {0: None})} - response = client.collections.items.publish_item( - collection_id="580e63fc8c9a982ac9b8b745", - request=ItemIDs(item_ids=["643fd856d66b6528195ee2ca", "643fd856d66b6528195ee2cb", "643fd856d66b6528195ee2cc"]), - ) - validate_response(response, expected_response, expected_types) - - async_response = await async_client.collections.items.publish_item( - collection_id="580e63fc8c9a982ac9b8b745", - request=ItemIDs(item_ids=["643fd856d66b6528195ee2ca", "643fd856d66b6528195ee2cb", "643fd856d66b6528195ee2cc"]), - ) - validate_response(async_response, expected_response, expected_types) diff --git a/tests/conftest.py b/tests/conftest.py deleted file mode 100644 index 398d344..0000000 --- a/tests/conftest.py +++ /dev/null @@ -1,31 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -from webflow import Webflow -import os -from webflow.environment import WebflowEnvironment -import pytest -from webflow import AsyncWebflow - - -@pytest.fixture -def client() -> Webflow: - return Webflow( - access_token=os.getenv("ENV_ACCESS_TOKEN", "access_token"), - environment=WebflowEnvironment( - base=os.getenv("TESTS_BASE_URL", "base_url"), - data_api=os.getenv("TESTS_BASE_URL", "base_url"), - content_delivery_api=os.getenv("TESTS_BASE_URL", "base_url"), - ), - ) - - -@pytest.fixture -def async_client() -> AsyncWebflow: - return AsyncWebflow( - access_token=os.getenv("ENV_ACCESS_TOKEN", "access_token"), - environment=WebflowEnvironment( - base=os.getenv("TESTS_BASE_URL", "base_url"), - data_api=os.getenv("TESTS_BASE_URL", "base_url"), - content_delivery_api=os.getenv("TESTS_BASE_URL", "base_url"), - ), - ) diff --git a/tests/pages/__init__.py b/tests/pages/__init__.py deleted file mode 100644 index f3ea265..0000000 --- a/tests/pages/__init__.py +++ /dev/null @@ -1,2 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - diff --git a/tests/pages/test_scripts.py b/tests/pages/test_scripts.py deleted file mode 100644 index 0e553d2..0000000 --- a/tests/pages/test_scripts.py +++ /dev/null @@ -1,85 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -from webflow import Webflow -from webflow import AsyncWebflow -import typing -from ..utilities import validate_response -from webflow import ScriptApply - - -async def test_get_custom_code(client: Webflow, async_client: AsyncWebflow) -> None: - expected_response: typing.Any = { - "scripts": [{"id": "id", "location": "header", "version": "version", "attributes": {"key": "value"}}], - "lastUpdated": "lastUpdated", - "createdOn": "createdOn", - } - expected_types: typing.Any = { - "scripts": ( - "list", - {0: {"id": None, "location": None, "version": None, "attributes": ("dict", {0: (None, None)})}}, - ), - "lastUpdated": None, - "createdOn": None, - } - response = client.pages.scripts.get_custom_code(page_id="63c720f9347c2139b248e552") - validate_response(response, expected_response, expected_types) - - async_response = await async_client.pages.scripts.get_custom_code(page_id="63c720f9347c2139b248e552") - validate_response(async_response, expected_response, expected_types) - - -async def test_upsert_custom_code(client: Webflow, async_client: AsyncWebflow) -> None: - expected_response: typing.Any = { - "scripts": [ - { - "id": "cms_slider", - "location": "header", - "version": "1.0.0", - "attributes": {"my-attribute": "some-value"}, - }, - {"id": "alert", "location": "header", "version": "0.0.1", "attributes": {"key": "value"}}, - ], - "lastUpdated": "2022-10-26T00:28:54.191Z", - "createdOn": "2022-10-26T00:28:54.191Z", - } - expected_types: typing.Any = { - "scripts": ( - "list", - { - 0: {"id": None, "location": None, "version": None, "attributes": ("dict", {0: (None, None)})}, - 1: {"id": None, "location": None, "version": None, "attributes": ("dict", {0: (None, None)})}, - }, - ), - "lastUpdated": None, - "createdOn": None, - } - response = client.pages.scripts.upsert_custom_code( - page_id="63c720f9347c2139b248e552", - scripts=[ - ScriptApply(id="cms_slider", location="header", version="1.0.0", attributes={"my-attribute": "some-value"}), - ScriptApply(id="alert", location="header", version="0.0.1"), - ], - ) - validate_response(response, expected_response, expected_types) - - async_response = await async_client.pages.scripts.upsert_custom_code( - page_id="63c720f9347c2139b248e552", - scripts=[ - ScriptApply(id="cms_slider", location="header", version="1.0.0", attributes={"my-attribute": "some-value"}), - ScriptApply(id="alert", location="header", version="0.0.1"), - ], - ) - validate_response(async_response, expected_response, expected_types) - - -async def test_delete_custom_code(client: Webflow, async_client: AsyncWebflow) -> None: - # Type ignore to avoid mypy complaining about the function not being meant to return a value - assert ( - client.pages.scripts.delete_custom_code(page_id="63c720f9347c2139b248e552") # type: ignore[func-returns-value] - is None - ) - - assert ( - await async_client.pages.scripts.delete_custom_code(page_id="63c720f9347c2139b248e552") # type: ignore[func-returns-value] - is None - ) diff --git a/tests/sites/__init__.py b/tests/sites/__init__.py deleted file mode 100644 index f3ea265..0000000 --- a/tests/sites/__init__.py +++ /dev/null @@ -1,2 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - diff --git a/tests/sites/test_activity_logs.py b/tests/sites/test_activity_logs.py deleted file mode 100644 index 5046daa..0000000 --- a/tests/sites/test_activity_logs.py +++ /dev/null @@ -1,53 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -from webflow import Webflow -from webflow import AsyncWebflow -import typing -from ..utilities import validate_response - - -async def test_list_(client: Webflow, async_client: AsyncWebflow) -> None: - expected_response: typing.Any = { - "items": [ - { - "id": "654c16c7b229e56bcf26872d", - "createdOn": "2023-11-08T23:16:23Z", - "lastUpdated": "2023-11-08T23:16:23Z", - "event": "cms_collection", - "resourceOperation": "CREATED", - "user": {"id": "6509cd56e90eec668b009712", "displayName": "John Doe"}, - "resourceId": "654c16c7b229e56bcf26870c", - "resourceName": "foo-bar", - "newValue": "newValue", - "previousValue": "previousValue", - "payload": {"key": "value"}, - } - ], - "pagination": {"limit": 25, "offset": 0, "total": 1}, - } - expected_types: typing.Any = { - "items": ( - "list", - { - 0: { - "id": None, - "createdOn": "datetime", - "lastUpdated": "datetime", - "event": None, - "resourceOperation": None, - "user": {"id": None, "displayName": None}, - "resourceId": None, - "resourceName": None, - "newValue": None, - "previousValue": None, - "payload": ("dict", {0: (None, None)}), - } - }, - ), - "pagination": {"limit": "integer", "offset": "integer", "total": "integer"}, - } - response = client.sites.activity_logs.list(site_id="580e63e98c9a982ac9b8b741", limit=1, offset=1) - validate_response(response, expected_response, expected_types) - - async_response = await async_client.sites.activity_logs.list(site_id="580e63e98c9a982ac9b8b741", limit=1, offset=1) - validate_response(async_response, expected_response, expected_types) diff --git a/tests/sites/test_comments.py b/tests/sites/test_comments.py deleted file mode 100644 index a8a81b6..0000000 --- a/tests/sites/test_comments.py +++ /dev/null @@ -1,242 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -from webflow import Webflow -from webflow import AsyncWebflow -import typing -from ..utilities import validate_response - - -async def test_list_comment_threads(client: Webflow, async_client: AsyncWebflow) -> None: - expected_response: typing.Any = { - "comments": [ - { - "id": "679d2ddb5196117ad04d1ffa", - "siteId": "679826b3b20b045e176bc4b5", - "pageId": "679826b3b20b045e176bc4bc", - "localeId": "67993753d910db250db64b3e", - "itemId": "580e64008c9a982ac9b8b754", - "breakpoint": "main", - "url": "https://webflow.com/design/site-slug-4ec832?workflow=comment&commentId=679d2ddb5196117ad04d1ff8&pageId=679826b3b20b045e176bc4bc", - "content": "Let's go to the pub! [[6287ec36a841b25637c663df]] ", - "isResolved": False, - "author": { - "userId": "6287ec36a841b25637c663df", - "email": "ford.prefect@heartofgold.spaceship", - "name": "Ford Prefect", - }, - "mentionedUsers": [ - { - "userId": "6287ec36a841b25637c663df", - "email": "arthur.dent@heartofgold.spaceship", - "name": "Arthur Dent", - } - ], - "createdOn": "2025-01-31T20:08:59.759Z", - "lastUpdated": "2025-01-31T20:08:59.759Z", - }, - { - "id": "679d2ddb5196117ad04d1ffc", - "siteId": "679826b3b20b045e176bc4b5", - "pageId": "679826b3b20b045e176bc4bc", - "localeId": "67993753d910db250db64b3e", - "itemId": "580e64008c9a982ac9b8b754", - "breakpoint": "main", - "url": "https://webflow.com/design/site-slug-4ec832?workflow=comment&commentId=679d2ddb5196117ad04d1ff8&pageId=679826b3b20b045e176bc4bc", - "content": "You have five minutes left to drink it [[6287ec36a841b25637c663df]] ", - "isResolved": False, - "author": { - "userId": "6287ec36a841b25637c663df", - "email": "ford.prefect@heartofgold.spaceship", - "name": "Ford Prefect", - }, - "mentionedUsers": [ - { - "userId": "6287ec36a841b25637c663df", - "email": "arthur.dent@heartofgold.spaceship", - "name": "Arthur Dent", - } - ], - "createdOn": "2025-01-31T20:08:59.759Z", - "lastUpdated": "2025-01-31T20:08:59.759Z", - }, - ], - "pagination": {"limit": 2, "offset": 0, "total": 2}, - } - expected_types: typing.Any = { - "comments": ( - "list", - { - 0: { - "id": None, - "siteId": None, - "pageId": None, - "localeId": None, - "itemId": None, - "breakpoint": None, - "url": None, - "content": None, - "isResolved": None, - "author": {"userId": None, "email": None, "name": None}, - "mentionedUsers": ("list", {0: {"userId": None, "email": None, "name": None}}), - "createdOn": None, - "lastUpdated": None, - }, - 1: { - "id": None, - "siteId": None, - "pageId": None, - "localeId": None, - "itemId": None, - "breakpoint": None, - "url": None, - "content": None, - "isResolved": None, - "author": {"userId": None, "email": None, "name": None}, - "mentionedUsers": ("list", {0: {"userId": None, "email": None, "name": None}}), - "createdOn": None, - "lastUpdated": None, - }, - }, - ), - "pagination": {"limit": "integer", "offset": "integer", "total": "integer"}, - } - response = client.sites.comments.list_comment_threads( - site_id="580e63e98c9a982ac9b8b741", - locale_id="65427cf400e02b306eaa04a0", - offset=1, - limit=1, - sort_by="createdOn", - sort_order="asc", - ) - validate_response(response, expected_response, expected_types) - - async_response = await async_client.sites.comments.list_comment_threads( - site_id="580e63e98c9a982ac9b8b741", - locale_id="65427cf400e02b306eaa04a0", - offset=1, - limit=1, - sort_by="createdOn", - sort_order="asc", - ) - validate_response(async_response, expected_response, expected_types) - - -async def test_get_comment_thread(client: Webflow, async_client: AsyncWebflow) -> None: - expected_response: typing.Any = { - "id": "580e64008c9a982ac9b8b754", - "siteId": "580e64008c9a982ac9b8b754", - "pageId": "580e64008c9a982ac9b8b754", - "localeId": "580e64008c9a982ac9b8b754", - "itemId": "580e64008c9a982ac9b8b754", - "breakpoint": "main", - "url": "https://webflow.com/design/site-slug-4ec832?workflow=comment&commentId=679d2ddb5196117ad04d1ff8&pageId=679826b3b20b045e176bc4bc", - "content": "This is a comment reply", - "isResolved": True, - "author": {"userId": "userId", "email": "email", "name": "name"}, - "mentionedUsers": [ - {"userId": "6287ec36a841b25637c663df", "email": "arthur.dent@heartofgold.spaceship", "name": "Arthur Dent"} - ], - "createdOn": "2023-03-17T18:47:35.560Z", - "lastUpdated": "2023-03-17T18:47:35.560Z", - } - expected_types: typing.Any = { - "id": None, - "siteId": None, - "pageId": None, - "localeId": None, - "itemId": None, - "breakpoint": None, - "url": None, - "content": None, - "isResolved": None, - "author": {"userId": None, "email": None, "name": None}, - "mentionedUsers": ("list", {0: {"userId": None, "email": None, "name": None}}), - "createdOn": None, - "lastUpdated": None, - } - response = client.sites.comments.get_comment_thread( - site_id="580e63e98c9a982ac9b8b741", - comment_thread_id="580e63e98c9a982ac9b8b741", - locale_id="65427cf400e02b306eaa04a0", - offset=1, - limit=1, - sort_by="createdOn", - sort_order="asc", - ) - validate_response(response, expected_response, expected_types) - - async_response = await async_client.sites.comments.get_comment_thread( - site_id="580e63e98c9a982ac9b8b741", - comment_thread_id="580e63e98c9a982ac9b8b741", - locale_id="65427cf400e02b306eaa04a0", - offset=1, - limit=1, - sort_by="createdOn", - sort_order="asc", - ) - validate_response(async_response, expected_response, expected_types) - - -async def test_list_comment_replies(client: Webflow, async_client: AsyncWebflow) -> None: - expected_response: typing.Any = { - "comments": [ - { - "id": "679d2ddb5196117ad04d1ffa", - "commentId": "679d2ddb5196117ad04d1ff8", - "siteId": "679826b3b20b045e176bc4b5", - "pageId": "679826b3b20b045e176bc4bc", - "localeId": "67993753d910db250db64b3e", - "breakpoint": "main", - "content": "This comment mentions another user [[6287ec36a841b25637c663df]] ", - "isResolved": False, - "author": {"id": "id", "email": "email", "name": "name"}, - "mentionedUsers": [{"id": "id", "email": "arthur.dent@example.com", "name": "Arthur Dent"}], - "lastUpdated": "2025-01-31T20:08:59.759Z", - "createdOn": "2025-01-31T20:08:59.759Z", - } - ], - "pagination": {"limit": 2, "offset": 0, "total": 1}, - } - expected_types: typing.Any = { - "comments": ( - "list", - { - 0: { - "id": None, - "commentId": None, - "siteId": None, - "pageId": None, - "localeId": None, - "breakpoint": None, - "content": None, - "isResolved": None, - "author": {"id": None, "email": None, "name": None}, - "mentionedUsers": ("list", {0: {"id": None, "email": None, "name": None}}), - "lastUpdated": None, - "createdOn": None, - } - }, - ), - "pagination": {"limit": "integer", "offset": "integer", "total": "integer"}, - } - response = client.sites.comments.list_comment_replies( - site_id="580e63e98c9a982ac9b8b741", - comment_thread_id="580e63e98c9a982ac9b8b741", - locale_id="65427cf400e02b306eaa04a0", - offset=1, - limit=1, - sort_by="createdOn", - sort_order="asc", - ) - validate_response(response, expected_response, expected_types) - - async_response = await async_client.sites.comments.list_comment_replies( - site_id="580e63e98c9a982ac9b8b741", - comment_thread_id="580e63e98c9a982ac9b8b741", - locale_id="65427cf400e02b306eaa04a0", - offset=1, - limit=1, - sort_by="createdOn", - sort_order="asc", - ) - validate_response(async_response, expected_response, expected_types) diff --git a/tests/sites/test_forms.py b/tests/sites/test_forms.py deleted file mode 100644 index bb8b724..0000000 --- a/tests/sites/test_forms.py +++ /dev/null @@ -1,193 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -from webflow import Webflow -from webflow import AsyncWebflow -import typing -from ..utilities import validate_response - - -async def test_list_submissions_by_site(client: Webflow, async_client: AsyncWebflow) -> None: - expected_response: typing.Any = { - "formSubmissions": [ - { - "id": "6321ca84df3949bfc6752327", - "displayName": "Sample Form", - "siteId": "62749158efef318abc8d5a0f", - "workspaceId": "62749158efef318abc8d5a0f", - "dateSubmitted": "2022-09-14T12:35:16Z", - "formResponse": {"First Name": "Arthur", "Last Name": "Dent"}, - }, - { - "id": "660d64fabf6e0a0d4edab981", - "displayName": "Sample Form", - "siteId": "62749158efef318abc8d5a0f", - "workspaceId": "62749158efef318abc8d5a0f", - "dateSubmitted": "2022-09-14T12:35:16Z", - "formResponse": {"First Name": "Ford", "Last Name": "Prefect"}, - }, - ], - "pagination": {"limit": 25, "offset": 0, "total": 2}, - } - expected_types: typing.Any = { - "formSubmissions": ( - "list", - { - 0: { - "id": None, - "displayName": None, - "siteId": None, - "workspaceId": None, - "dateSubmitted": "datetime", - "formResponse": ("dict", {0: (None, None), 1: (None, None)}), - }, - 1: { - "id": None, - "displayName": None, - "siteId": None, - "workspaceId": None, - "dateSubmitted": "datetime", - "formResponse": ("dict", {0: (None, None), 1: (None, None)}), - }, - }, - ), - "pagination": {"limit": "integer", "offset": "integer", "total": "integer"}, - } - response = client.sites.forms.list_submissions_by_site( - site_id="580e63e98c9a982ac9b8b741", element_id="18259716-3e5a-646a-5f41-5dc4b9405aa0", offset=1, limit=1 - ) - validate_response(response, expected_response, expected_types) - - async_response = await async_client.sites.forms.list_submissions_by_site( - site_id="580e63e98c9a982ac9b8b741", element_id="18259716-3e5a-646a-5f41-5dc4b9405aa0", offset=1, limit=1 - ) - validate_response(async_response, expected_response, expected_types) - - -async def test_list_submissions(client: Webflow, async_client: AsyncWebflow) -> None: - expected_response: typing.Any = { - "formSubmissions": [ - { - "id": "6321ca84df3949bfc6752327", - "displayName": "Sample Form", - "siteId": "62749158efef318abc8d5a0f", - "workspaceId": "62749158efef318abc8d5a0f", - "dateSubmitted": "2022-09-14T12:35:16Z", - "formResponse": {"First Name": "Arthur", "Last Name": "Dent"}, - }, - { - "id": "660d64fabf6e0a0d4edab981", - "displayName": "Sample Form", - "siteId": "62749158efef318abc8d5a0f", - "workspaceId": "62749158efef318abc8d5a0f", - "dateSubmitted": "2022-09-14T12:35:16Z", - "formResponse": {"First Name": "Ford", "Last Name": "Prefect"}, - }, - ], - "pagination": {"limit": 25, "offset": 0, "total": 2}, - } - expected_types: typing.Any = { - "formSubmissions": ( - "list", - { - 0: { - "id": None, - "displayName": None, - "siteId": None, - "workspaceId": None, - "dateSubmitted": "datetime", - "formResponse": ("dict", {0: (None, None), 1: (None, None)}), - }, - 1: { - "id": None, - "displayName": None, - "siteId": None, - "workspaceId": None, - "dateSubmitted": "datetime", - "formResponse": ("dict", {0: (None, None), 1: (None, None)}), - }, - }, - ), - "pagination": {"limit": "integer", "offset": "integer", "total": "integer"}, - } - response = client.sites.forms.list_submissions( - site_id="580e63e98c9a982ac9b8b741", form_id="580e63e98c9a982ac9b8b741", offset=1, limit=1 - ) - validate_response(response, expected_response, expected_types) - - async_response = await async_client.sites.forms.list_submissions( - site_id="580e63e98c9a982ac9b8b741", form_id="580e63e98c9a982ac9b8b741", offset=1, limit=1 - ) - validate_response(async_response, expected_response, expected_types) - - -async def test_get_submission(client: Webflow, async_client: AsyncWebflow) -> None: - expected_response: typing.Any = { - "id": "6321ca84df3949bfc6752327", - "displayName": "Sample Form", - "siteId": "62749158efef318abc8d5a0f", - "workspaceId": "62749158efef318abc8d5a0f", - "dateSubmitted": "2022-09-14T12:35:16Z", - "formResponse": {"First Name": "Arthur", "Last Name": "Dent"}, - } - expected_types: typing.Any = { - "id": None, - "displayName": None, - "siteId": None, - "workspaceId": None, - "dateSubmitted": "datetime", - "formResponse": ("dict", {0: (None, None), 1: (None, None)}), - } - response = client.sites.forms.get_submission( - site_id="580e63e98c9a982ac9b8b741", form_submission_id="580e63e98c9a982ac9b8b741" - ) - validate_response(response, expected_response, expected_types) - - async_response = await async_client.sites.forms.get_submission( - site_id="580e63e98c9a982ac9b8b741", form_submission_id="580e63e98c9a982ac9b8b741" - ) - validate_response(async_response, expected_response, expected_types) - - -async def test_delete_submission(client: Webflow, async_client: AsyncWebflow) -> None: - # Type ignore to avoid mypy complaining about the function not being meant to return a value - assert ( - client.sites.forms.delete_submission( - site_id="580e63e98c9a982ac9b8b741", form_submission_id="580e63e98c9a982ac9b8b741" - ) # type: ignore[func-returns-value] - is None - ) - - assert ( - await async_client.sites.forms.delete_submission( - site_id="580e63e98c9a982ac9b8b741", form_submission_id="580e63e98c9a982ac9b8b741" - ) # type: ignore[func-returns-value] - is None - ) - - -async def test_update_submission(client: Webflow, async_client: AsyncWebflow) -> None: - expected_response: typing.Any = { - "id": "6321ca84df3949bfc6752327", - "displayName": "Sample Form", - "siteId": "62749158efef318abc8d5a0f", - "workspaceId": "62749158efef318abc8d5a0f", - "dateSubmitted": "2022-09-14T12:35:16Z", - "formResponse": {"First Name": "Arthur", "Last Name": "Dent"}, - } - expected_types: typing.Any = { - "id": None, - "displayName": None, - "siteId": None, - "workspaceId": None, - "dateSubmitted": "datetime", - "formResponse": ("dict", {0: (None, None), 1: (None, None)}), - } - response = client.sites.forms.update_submission( - site_id="580e63e98c9a982ac9b8b741", form_submission_id="580e63e98c9a982ac9b8b741" - ) - validate_response(response, expected_response, expected_types) - - async_response = await async_client.sites.forms.update_submission( - site_id="580e63e98c9a982ac9b8b741", form_submission_id="580e63e98c9a982ac9b8b741" - ) - validate_response(async_response, expected_response, expected_types) diff --git a/tests/sites/test_plans.py b/tests/sites/test_plans.py deleted file mode 100644 index 01c304e..0000000 --- a/tests/sites/test_plans.py +++ /dev/null @@ -1,20 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -from webflow import Webflow -from webflow import AsyncWebflow -import typing -from ..utilities import validate_response - - -async def test_get_site_plan(client: Webflow, async_client: AsyncWebflow) -> None: - expected_response: typing.Any = { - "id": "hosting-business-v4", - "name": "Business Hosting", - "pricingInfo": "https://webflow.com/pricing", - } - expected_types: typing.Any = {"id": None, "name": None, "pricingInfo": None} - response = client.sites.plans.get_site_plan(site_id="580e63e98c9a982ac9b8b741") - validate_response(response, expected_response, expected_types) - - async_response = await async_client.sites.plans.get_site_plan(site_id="580e63e98c9a982ac9b8b741") - validate_response(async_response, expected_response, expected_types) diff --git a/tests/sites/test_redirects.py b/tests/sites/test_redirects.py deleted file mode 100644 index 59b7a48..0000000 --- a/tests/sites/test_redirects.py +++ /dev/null @@ -1,88 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -from webflow import Webflow -from webflow import AsyncWebflow -import typing -from ..utilities import validate_response - - -async def test_list_(client: Webflow, async_client: AsyncWebflow) -> None: - expected_response: typing.Any = { - "redirects": [ - {"id": "42e1a2b7aa1a13f768a0042a", "fromUrl": "/mostly-harmless", "toUrl": "/earth"}, - {"id": "6x9e7f8d9a4b1c2d3e4f5678", "fromUrl": "/babel-fish", "toUrl": "/translate"}, - ], - "pagination": {"limit": 100, "offset": 0, "total": 2}, - } - expected_types: typing.Any = { - "redirects": ( - "list", - {0: {"id": None, "fromUrl": None, "toUrl": None}, 1: {"id": None, "fromUrl": None, "toUrl": None}}, - ), - "pagination": {"limit": "integer", "offset": "integer", "total": "integer"}, - } - response = client.sites.redirects.list(site_id="580e63e98c9a982ac9b8b741") - validate_response(response, expected_response, expected_types) - - async_response = await async_client.sites.redirects.list(site_id="580e63e98c9a982ac9b8b741") - validate_response(async_response, expected_response, expected_types) - - -async def test_create(client: Webflow, async_client: AsyncWebflow) -> None: - expected_response: typing.Any = {"id": "42e1a2b7aa1a13f768a0042a", "fromUrl": "/mostly-harmless", "toUrl": "/earth"} - expected_types: typing.Any = {"id": None, "fromUrl": None, "toUrl": None} - response = client.sites.redirects.create( - site_id="580e63e98c9a982ac9b8b741", id="42e1a2b7aa1a13f768a0042a", from_url="/mostly-harmless", to_url="/earth" - ) - validate_response(response, expected_response, expected_types) - - async_response = await async_client.sites.redirects.create( - site_id="580e63e98c9a982ac9b8b741", id="42e1a2b7aa1a13f768a0042a", from_url="/mostly-harmless", to_url="/earth" - ) - validate_response(async_response, expected_response, expected_types) - - -async def test_delete(client: Webflow, async_client: AsyncWebflow) -> None: - expected_response: typing.Any = { - "redirects": [ - {"id": "42e1a2b7aa1a13f768a0042a", "fromUrl": "/mostly-harmless", "toUrl": "/earth"}, - {"id": "6x9e7f8d9a4b1c2d3e4f5678", "fromUrl": "/babel-fish", "toUrl": "/translate"}, - ], - "pagination": {"limit": 100, "offset": 0, "total": 2}, - } - expected_types: typing.Any = { - "redirects": ( - "list", - {0: {"id": None, "fromUrl": None, "toUrl": None}, 1: {"id": None, "fromUrl": None, "toUrl": None}}, - ), - "pagination": {"limit": "integer", "offset": "integer", "total": "integer"}, - } - response = client.sites.redirects.delete(site_id="580e63e98c9a982ac9b8b741", redirect_id="66c4cb9a20cac35ed19500e6") - validate_response(response, expected_response, expected_types) - - async_response = await async_client.sites.redirects.delete( - site_id="580e63e98c9a982ac9b8b741", redirect_id="66c4cb9a20cac35ed19500e6" - ) - validate_response(async_response, expected_response, expected_types) - - -async def test_update(client: Webflow, async_client: AsyncWebflow) -> None: - expected_response: typing.Any = {"id": "42e1a2b7aa1a13f768a0042a", "fromUrl": "/mostly-harmless", "toUrl": "/earth"} - expected_types: typing.Any = {"id": None, "fromUrl": None, "toUrl": None} - response = client.sites.redirects.update( - site_id="580e63e98c9a982ac9b8b741", - redirect_id="66c4cb9a20cac35ed19500e6", - id="42e1a2b7aa1a13f768a0042a", - from_url="/mostly-harmless", - to_url="/earth", - ) - validate_response(response, expected_response, expected_types) - - async_response = await async_client.sites.redirects.update( - site_id="580e63e98c9a982ac9b8b741", - redirect_id="66c4cb9a20cac35ed19500e6", - id="42e1a2b7aa1a13f768a0042a", - from_url="/mostly-harmless", - to_url="/earth", - ) - validate_response(async_response, expected_response, expected_types) diff --git a/tests/sites/test_robots_txt.py b/tests/sites/test_robots_txt.py deleted file mode 100644 index cb38204..0000000 --- a/tests/sites/test_robots_txt.py +++ /dev/null @@ -1,145 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -from webflow import Webflow -from webflow import AsyncWebflow -import typing -from ..utilities import validate_response -from webflow import RobotsRulesItem - - -async def test_get(client: Webflow, async_client: AsyncWebflow) -> None: - expected_response: typing.Any = { - "rules": [ - { - "userAgent": "googlebot", - "allows": ["/public"], - "disallows": ["/vogon-poetry", "/total-perspective-vortex"], - } - ], - "sitemap": "https://heartofgold.ship/sitemap.xml", - } - expected_types: typing.Any = { - "rules": ( - "list", - {0: {"userAgent": None, "allows": ("list", {0: None}), "disallows": ("list", {0: None, 1: None})}}, - ), - "sitemap": None, - } - response = client.sites.robots_txt.get(site_id="580e63e98c9a982ac9b8b741") - validate_response(response, expected_response, expected_types) - - async_response = await async_client.sites.robots_txt.get(site_id="580e63e98c9a982ac9b8b741") - validate_response(async_response, expected_response, expected_types) - - -async def test_put(client: Webflow, async_client: AsyncWebflow) -> None: - expected_response: typing.Any = { - "rules": [ - { - "userAgent": "googlebot", - "allows": ["/public"], - "disallows": ["/vogon-poetry", "/total-perspective-vortex"], - } - ], - "sitemap": "https://heartofgold.ship/sitemap.xml", - } - expected_types: typing.Any = { - "rules": ( - "list", - {0: {"userAgent": None, "allows": ("list", {0: None}), "disallows": ("list", {0: None, 1: None})}}, - ), - "sitemap": None, - } - response = client.sites.robots_txt.put( - site_id="580e63e98c9a982ac9b8b741", - rules=[ - RobotsRulesItem( - user_agent="googlebot", allows=["/public"], disallows=["/vogon-poetry", "/total-perspective-vortex"] - ) - ], - sitemap="https://heartofgold.ship/sitemap.xml", - ) - validate_response(response, expected_response, expected_types) - - async_response = await async_client.sites.robots_txt.put( - site_id="580e63e98c9a982ac9b8b741", - rules=[ - RobotsRulesItem( - user_agent="googlebot", allows=["/public"], disallows=["/vogon-poetry", "/total-perspective-vortex"] - ) - ], - sitemap="https://heartofgold.ship/sitemap.xml", - ) - validate_response(async_response, expected_response, expected_types) - - -async def test_delete(client: Webflow, async_client: AsyncWebflow) -> None: - expected_response: typing.Any = { - "rules": [ - { - "userAgent": "googlebot", - "allows": ["/public"], - "disallows": ["/vogon-poetry", "/total-perspective-vortex"], - } - ], - "sitemap": "https://heartofgold.ship/sitemap.xml", - } - expected_types: typing.Any = { - "rules": ( - "list", - {0: {"userAgent": None, "allows": ("list", {0: None}), "disallows": ("list", {0: None, 1: None})}}, - ), - "sitemap": None, - } - response = client.sites.robots_txt.delete( - site_id="580e63e98c9a982ac9b8b741", - rules=[RobotsRulesItem(user_agent="*", allows=["/public"], disallows=["/bubbles"])], - ) - validate_response(response, expected_response, expected_types) - - async_response = await async_client.sites.robots_txt.delete( - site_id="580e63e98c9a982ac9b8b741", - rules=[RobotsRulesItem(user_agent="*", allows=["/public"], disallows=["/bubbles"])], - ) - validate_response(async_response, expected_response, expected_types) - - -async def test_patch(client: Webflow, async_client: AsyncWebflow) -> None: - expected_response: typing.Any = { - "rules": [ - { - "userAgent": "googlebot", - "allows": ["/public"], - "disallows": ["/vogon-poetry", "/total-perspective-vortex"], - } - ], - "sitemap": "https://heartofgold.ship/sitemap.xml", - } - expected_types: typing.Any = { - "rules": ( - "list", - {0: {"userAgent": None, "allows": ("list", {0: None}), "disallows": ("list", {0: None, 1: None})}}, - ), - "sitemap": None, - } - response = client.sites.robots_txt.patch( - site_id="580e63e98c9a982ac9b8b741", - rules=[ - RobotsRulesItem( - user_agent="googlebot", allows=["/public"], disallows=["/vogon-poetry", "/total-perspective-vortex"] - ) - ], - sitemap="https://heartofgold.ship/sitemap.xml", - ) - validate_response(response, expected_response, expected_types) - - async_response = await async_client.sites.robots_txt.patch( - site_id="580e63e98c9a982ac9b8b741", - rules=[ - RobotsRulesItem( - user_agent="googlebot", allows=["/public"], disallows=["/vogon-poetry", "/total-perspective-vortex"] - ) - ], - sitemap="https://heartofgold.ship/sitemap.xml", - ) - validate_response(async_response, expected_response, expected_types) diff --git a/tests/sites/test_scripts.py b/tests/sites/test_scripts.py deleted file mode 100644 index 47c5179..0000000 --- a/tests/sites/test_scripts.py +++ /dev/null @@ -1,156 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -from webflow import Webflow -from webflow import AsyncWebflow -import typing -from ..utilities import validate_response -from webflow import ScriptApply - - -async def test_get_custom_code(client: Webflow, async_client: AsyncWebflow) -> None: - expected_response: typing.Any = { - "scripts": [ - { - "id": "cms_slider", - "location": "header", - "version": "1.0.0", - "attributes": {"my-attribute": "some-value"}, - }, - {"id": "alert", "location": "header", "version": "0.0.1", "attributes": {"key": "value"}}, - ], - "lastUpdated": "2022-10-26T00:28:54.191Z", - "createdOn": "2022-10-26T00:28:54.191Z", - } - expected_types: typing.Any = { - "scripts": ( - "list", - { - 0: {"id": None, "location": None, "version": None, "attributes": ("dict", {0: (None, None)})}, - 1: {"id": None, "location": None, "version": None, "attributes": ("dict", {0: (None, None)})}, - }, - ), - "lastUpdated": None, - "createdOn": None, - } - response = client.sites.scripts.get_custom_code(site_id="580e63e98c9a982ac9b8b741") - validate_response(response, expected_response, expected_types) - - async_response = await async_client.sites.scripts.get_custom_code(site_id="580e63e98c9a982ac9b8b741") - validate_response(async_response, expected_response, expected_types) - - -async def test_upsert_custom_code(client: Webflow, async_client: AsyncWebflow) -> None: - expected_response: typing.Any = { - "scripts": [ - { - "id": "cms_slider", - "location": "header", - "version": "1.0.0", - "attributes": {"my-attribute": "some-value"}, - }, - {"id": "alert", "location": "header", "version": "0.0.1", "attributes": {"key": "value"}}, - ], - "lastUpdated": "lastUpdated", - "createdOn": "createdOn", - } - expected_types: typing.Any = { - "scripts": ( - "list", - { - 0: {"id": None, "location": None, "version": None, "attributes": ("dict", {0: (None, None)})}, - 1: {"id": None, "location": None, "version": None, "attributes": ("dict", {0: (None, None)})}, - }, - ), - "lastUpdated": None, - "createdOn": None, - } - response = client.sites.scripts.upsert_custom_code( - site_id="580e63e98c9a982ac9b8b741", - scripts=[ - ScriptApply(id="cms_slider", location="header", version="1.0.0", attributes={"my-attribute": "some-value"}), - ScriptApply(id="alert", location="header", version="0.0.1"), - ], - ) - validate_response(response, expected_response, expected_types) - - async_response = await async_client.sites.scripts.upsert_custom_code( - site_id="580e63e98c9a982ac9b8b741", - scripts=[ - ScriptApply(id="cms_slider", location="header", version="1.0.0", attributes={"my-attribute": "some-value"}), - ScriptApply(id="alert", location="header", version="0.0.1"), - ], - ) - validate_response(async_response, expected_response, expected_types) - - -async def test_delete_custom_code(client: Webflow, async_client: AsyncWebflow) -> None: - # Type ignore to avoid mypy complaining about the function not being meant to return a value - assert ( - client.sites.scripts.delete_custom_code(site_id="580e63e98c9a982ac9b8b741") # type: ignore[func-returns-value] - is None - ) - - assert ( - await async_client.sites.scripts.delete_custom_code(site_id="580e63e98c9a982ac9b8b741") # type: ignore[func-returns-value] - is None - ) - - -async def test_list_custom_code_blocks(client: Webflow, async_client: AsyncWebflow) -> None: - expected_response: typing.Any = { - "blocks": [ - { - "siteId": "6258612d1ee792848f805dcf", - "pageId": "pageId", - "type": "site", - "scripts": [ - {"id": "chartjs", "location": "header", "version": "4.4.2", "attributes": {"key": "value"}} - ], - "createdOn": "2024-04-03T16:49:15Z", - "lastUpdated": "2024-04-03T16:49:15Z", - }, - { - "siteId": "6390c49674a71f84b51a08d8", - "pageId": "6419db964a9c43f6a3af6348", - "type": "page", - "scripts": [{"id": "id", "location": "header", "version": "version"}], - "createdOn": "2022-10-26T00:28:54Z", - "lastUpdated": "2022-10-26T00:28:54Z", - }, - ], - "pagination": {"limit": 10, "offset": 0, "total": 1}, - } - expected_types: typing.Any = { - "blocks": ( - "list", - { - 0: { - "siteId": None, - "pageId": None, - "type": None, - "scripts": ( - "list", - {0: {"id": None, "location": None, "version": None, "attributes": ("dict", {0: (None, None)})}}, - ), - "createdOn": "datetime", - "lastUpdated": "datetime", - }, - 1: { - "siteId": None, - "pageId": None, - "type": None, - "scripts": ("list", {0: {"id": None, "location": None, "version": None}}), - "createdOn": "datetime", - "lastUpdated": "datetime", - }, - }, - ), - "pagination": {"limit": "integer", "offset": "integer", "total": "integer"}, - } - response = client.sites.scripts.list_custom_code_blocks(site_id="580e63e98c9a982ac9b8b741", offset=1, limit=1) - validate_response(response, expected_response, expected_types) - - async_response = await async_client.sites.scripts.list_custom_code_blocks( - site_id="580e63e98c9a982ac9b8b741", offset=1, limit=1 - ) - validate_response(async_response, expected_response, expected_types) diff --git a/tests/sites/test_well_known.py b/tests/sites/test_well_known.py deleted file mode 100644 index ad81052..0000000 --- a/tests/sites/test_well_known.py +++ /dev/null @@ -1,40 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -from webflow import Webflow -from webflow import AsyncWebflow - - -async def test_put(client: Webflow, async_client: AsyncWebflow) -> None: - # Type ignore to avoid mypy complaining about the function not being meant to return a value - assert ( - client.sites.well_known.put( - site_id="580e63e98c9a982ac9b8b741", - file_name="apple-app-site-association.txt", - file_data='{\n "applinks": {\n "apps": [],\n "details": [\n {\n "appID": "ABCDE12345.com.example.app",\n "paths": [ "/*", "/some/path/*" ]\n }\n ]\n }\n}\n', - content_type="application/json", - ) # type: ignore[func-returns-value] - is None - ) - - assert ( - await async_client.sites.well_known.put( - site_id="580e63e98c9a982ac9b8b741", - file_name="apple-app-site-association.txt", - file_data='{\n "applinks": {\n "apps": [],\n "details": [\n {\n "appID": "ABCDE12345.com.example.app",\n "paths": [ "/*", "/some/path/*" ]\n }\n ]\n }\n}\n', - content_type="application/json", - ) # type: ignore[func-returns-value] - is None - ) - - -async def test_delete(client: Webflow, async_client: AsyncWebflow) -> None: - # Type ignore to avoid mypy complaining about the function not being meant to return a value - assert ( - client.sites.well_known.delete(site_id="580e63e98c9a982ac9b8b741") # type: ignore[func-returns-value] - is None - ) - - assert ( - await async_client.sites.well_known.delete(site_id="580e63e98c9a982ac9b8b741") # type: ignore[func-returns-value] - is None - ) diff --git a/tests/test_assets.py b/tests/test_assets.py deleted file mode 100644 index 3ae051d..0000000 --- a/tests/test_assets.py +++ /dev/null @@ -1,409 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -from webflow import Webflow -from webflow import AsyncWebflow -import typing -from .utilities import validate_response - - -async def test_list_(client: Webflow, async_client: AsyncWebflow) -> None: - expected_response: typing.Any = { - "assets": [ - { - "id": "63e5889e7fe4eafa7384cea4", - "contentType": "image/png", - "size": 2212772, - "siteId": "63938b302ea6b0aa6f3d8745", - "hostedUrl": "https://s3.amazonaws.com/webflow-prod-assets/63938b302ea6b0aa6f3d8745/63e5889e7fe4eafa7384cea4_Vectors-Wrapper.svg", - "originalFileName": "Candy-Wrapper.svg", - "displayName": "63e5889e7fe4eafa7384cea4_Candy-Wrapper.png", - "lastUpdated": "2023-03-01T23:42:57Z", - "createdOn": "2023-02-09T23:58:22Z", - "variants": [ - { - "hostedUrl": "https://s3.amazonaws.com/webflow-prod-assets/6258612d1ee792848f805dcf/660d83ce30f3a599ddb0bdb3_Screenshot%202024-03-20%20at%209.03.24%E2%80%AFPM-p-500.png", - "originalFileName": "Screenshot%202024-03-20%20at%209.03.24%E2%80%AFPM-p-500.png", - "displayName": "660d83ce30f3a599ddb0bdb3_Screenshot%202024-03-20%20at%209.03.24%E2%80%AFPM-p-500.png", - "format": "png", - "width": 500, - "height": 900, - "quality": 100, - } - ], - "altText": "A single candy wrapper", - }, - { - "id": "63e5889e7fe4eafa7384cea5", - "contentType": "image/png", - "size": 2212772, - "siteId": "63938b302ea6b0aa6f3d8745", - "hostedUrl": "https://s3.amazonaws.com/webflow-prod-assets/63938b302ea6b0aa6f3d8745/63e5889e7fe4eafa7384cea4_Vectors-Wrapper.svg", - "originalFileName": "Gum-Wrapper.svg", - "displayName": "63e5889e7fe4eafa7384cea5_Gum-Wrapper.png", - "lastUpdated": "2023-03-01T23:42:57Z", - "createdOn": "2023-02-09T23:58:22Z", - "variants": [ - { - "hostedUrl": "https://s3.amazonaws.com/webflow-prod-assets/6258612d1ee792848f805dcf/660d83ce30f3a599ddb0bdb3_Screenshot%202024-03-20%20at%209.03.24%E2%80%AFPM-p-500.png", - "originalFileName": "Screenshot%202024-03-20%20at%209.03.24%E2%80%AFPM-p-500.png", - "displayName": "660d83ce30f3a599ddb0bdb3_Screenshot%202024-03-20%20at%209.03.24%E2%80%AFPM-p-500.png", - "format": "png", - "width": 500, - "height": 900, - "quality": 100, - } - ], - "altText": "A single gum wrapper", - }, - ], - "pagination": {"limit": 2, "offset": 0, "total": 2}, - } - expected_types: typing.Any = { - "assets": ( - "list", - { - 0: { - "id": None, - "contentType": None, - "size": "integer", - "siteId": None, - "hostedUrl": None, - "originalFileName": None, - "displayName": None, - "lastUpdated": "datetime", - "createdOn": "datetime", - "variants": ( - "list", - { - 0: { - "hostedUrl": None, - "originalFileName": None, - "displayName": None, - "format": None, - "width": "integer", - "height": "integer", - "quality": "integer", - } - }, - ), - "altText": None, - }, - 1: { - "id": None, - "contentType": None, - "size": "integer", - "siteId": None, - "hostedUrl": None, - "originalFileName": None, - "displayName": None, - "lastUpdated": "datetime", - "createdOn": "datetime", - "variants": ( - "list", - { - 0: { - "hostedUrl": None, - "originalFileName": None, - "displayName": None, - "format": None, - "width": "integer", - "height": "integer", - "quality": "integer", - } - }, - ), - "altText": None, - }, - }, - ), - "pagination": {"limit": "integer", "offset": "integer", "total": "integer"}, - } - response = client.assets.list(site_id="580e63e98c9a982ac9b8b741", offset=1, limit=1) - validate_response(response, expected_response, expected_types) - - async_response = await async_client.assets.list(site_id="580e63e98c9a982ac9b8b741", offset=1, limit=1) - validate_response(async_response, expected_response, expected_types) - - -async def test_create(client: Webflow, async_client: AsyncWebflow) -> None: - expected_response: typing.Any = { - "uploadDetails": { - "acl": "public-read", - "bucket": "webflow-bucket-name", - "X-Amz-Algorithm": "AWS4-HMAC-SHA256", - "X-Amz-Credential": "///s3/aws4_request", - "X-Amz-Date": "", - "key": "/_", - "Policy": "", - "X-Amz-Signature": "", - "success_action_status": "201", - "content-type": "image/png", - "Cache-Control": "max-age=31536000, must-revalidate", - }, - "contentType": "image/png", - "id": "64358b9544249dc43d37d2b7", - "parentFolder": "6436b1ce5281cace05b65aea", - "uploadUrl": "https://s3.amazonaws.com/webflow-dev-assets/643021114e290e0d3a0602b2/64358b9544249dc43d37d2b7_Screenshot%202023-04-11%20at%209.50.42%20AM.png", - "assetUrl": "https://s3.amazonaws.com/webflow-prod-assets/6258612d1ee792848f805dcf/660d907ab9e91e3e9f56385e_paranoidAndroid-2024.png", - "hostedUrl": "https://dev-assets.website-files.com/643021114e290e0d3a0602b2/64358b9544249dc43d37d2b7_Screenshot%202023-04-11%20at%209.50.42%20AM.png", - "originalFileName": "file.png", - "createdOn": "2023-04-11T16:32:21Z", - "lastUpdated": "2023-04-12T20:31:03Z", - } - expected_types: typing.Any = { - "uploadDetails": { - "acl": None, - "bucket": None, - "X-Amz-Algorithm": None, - "X-Amz-Credential": None, - "X-Amz-Date": None, - "key": None, - "Policy": None, - "X-Amz-Signature": None, - "success_action_status": None, - "content-type": None, - "Cache-Control": None, - }, - "contentType": None, - "id": None, - "parentFolder": None, - "uploadUrl": None, - "assetUrl": None, - "hostedUrl": None, - "originalFileName": None, - "createdOn": "datetime", - "lastUpdated": "datetime", - } - response = client.assets.create( - site_id="580e63e98c9a982ac9b8b741", file_name="file.png", file_hash="3c7d87c9575702bc3b1e991f4d3c638e" - ) - validate_response(response, expected_response, expected_types) - - async_response = await async_client.assets.create( - site_id="580e63e98c9a982ac9b8b741", file_name="file.png", file_hash="3c7d87c9575702bc3b1e991f4d3c638e" - ) - validate_response(async_response, expected_response, expected_types) - - -async def test_get(client: Webflow, async_client: AsyncWebflow) -> None: - expected_response: typing.Any = { - "id": "63e5889e7fe4eafa7384cea4", - "contentType": "image/png", - "size": 2212772, - "siteId": "63938b302ea6b0aa6f3d8745", - "hostedUrl": "https://s3.amazonaws.com/webflow-prod-assets/63938b302ea6b0aa6f3d8745/63e5889e7fe4eafa7384cea4_Vectors-Wrapper.svg", - "originalFileName": "Candy-Wrapper.svg", - "displayName": "63e5889e7fe4eafa7384cea4_Candy-Wrapper.png", - "lastUpdated": "2023-03-01T23:42:57Z", - "createdOn": "2023-02-09T23:58:22Z", - "variants": [ - { - "hostedUrl": "https://s3.amazonaws.com/webflow-prod-assets/6258612d1ee792848f805dcf/660d83ce30f3a599ddb0bdb3_Screenshot%202024-03-20%20at%209.03.24%E2%80%AFPM-p-500.png", - "originalFileName": "Screenshot%202024-03-20%20at%209.03.24%E2%80%AFPM-p-500.png", - "displayName": "660d83ce30f3a599ddb0bdb3_Screenshot%202024-03-20%20at%209.03.24%E2%80%AFPM-p-500.png", - "format": "png", - "width": 500, - "height": 900, - "quality": 100, - "error": "error", - } - ], - "altText": "A single candy wrapper", - } - expected_types: typing.Any = { - "id": None, - "contentType": None, - "size": "integer", - "siteId": None, - "hostedUrl": None, - "originalFileName": None, - "displayName": None, - "lastUpdated": "datetime", - "createdOn": "datetime", - "variants": ( - "list", - { - 0: { - "hostedUrl": None, - "originalFileName": None, - "displayName": None, - "format": None, - "width": "integer", - "height": "integer", - "quality": "integer", - "error": None, - } - }, - ), - "altText": None, - } - response = client.assets.get(asset_id="580e63fc8c9a982ac9b8b745") - validate_response(response, expected_response, expected_types) - - async_response = await async_client.assets.get(asset_id="580e63fc8c9a982ac9b8b745") - validate_response(async_response, expected_response, expected_types) - - -async def test_delete(client: Webflow, async_client: AsyncWebflow) -> None: - # Type ignore to avoid mypy complaining about the function not being meant to return a value - assert ( - client.assets.delete(asset_id="580e63fc8c9a982ac9b8b745") # type: ignore[func-returns-value] - is None - ) - - assert ( - await async_client.assets.delete(asset_id="580e63fc8c9a982ac9b8b745") # type: ignore[func-returns-value] - is None - ) - - -async def test_update(client: Webflow, async_client: AsyncWebflow) -> None: - expected_response: typing.Any = { - "id": "63e5889e7fe4eafa7384cea4", - "contentType": "image/png", - "size": 2212772, - "siteId": "63938b302ea6b0aa6f3d8745", - "hostedUrl": "https://s3.amazonaws.com/webflow-prod-assets/63938b302ea6b0aa6f3d8745/63e5889e7fe4eafa7384cea4_Vectors-Wrapper.svg", - "originalFileName": "Candy-Wrapper.svg", - "displayName": "63e5889e7fe4eafa7384cea4_Candy-Wrapper.png", - "lastUpdated": "2023-03-01T23:42:57Z", - "createdOn": "2023-02-09T23:58:22Z", - "variants": [ - { - "hostedUrl": "https://s3.amazonaws.com/webflow-prod-assets/6258612d1ee792848f805dcf/660d83ce30f3a599ddb0bdb3_Screenshot%202024-03-20%20at%209.03.24%E2%80%AFPM-p-500.png", - "originalFileName": "Screenshot%202024-03-20%20at%209.03.24%E2%80%AFPM-p-500.png", - "displayName": "660d83ce30f3a599ddb0bdb3_Screenshot%202024-03-20%20at%209.03.24%E2%80%AFPM-p-500.png", - "format": "png", - "width": 500, - "height": 900, - "quality": 100, - "error": "error", - } - ], - "altText": "A single candy wrapper", - } - expected_types: typing.Any = { - "id": None, - "contentType": None, - "size": "integer", - "siteId": None, - "hostedUrl": None, - "originalFileName": None, - "displayName": None, - "lastUpdated": "datetime", - "createdOn": "datetime", - "variants": ( - "list", - { - 0: { - "hostedUrl": None, - "originalFileName": None, - "displayName": None, - "format": None, - "width": "integer", - "height": "integer", - "quality": "integer", - "error": None, - } - }, - ), - "altText": None, - } - response = client.assets.update(asset_id="580e63fc8c9a982ac9b8b745") - validate_response(response, expected_response, expected_types) - - async_response = await async_client.assets.update(asset_id="580e63fc8c9a982ac9b8b745") - validate_response(async_response, expected_response, expected_types) - - -async def test_list_folders(client: Webflow, async_client: AsyncWebflow) -> None: - expected_response: typing.Any = { - "assetFolders": [ - { - "id": "6390c49774a71f0e3c1a08ee", - "displayName": "emoji icons", - "parentFolder": "6390c49774a71f99f21a08eb", - "assets": ["63e5889e7fe4eafa7384cea4", "659595234426a9fcbad57043"], - "siteId": "6390c49674a71f84b51a08d8", - "createdOn": "2018-10-14T21:55:49Z", - "lastUpdated": "2022-12-07T16:51:37Z", - } - ], - "pagination": {"limit": 1, "offset": 0, "total": 1}, - } - expected_types: typing.Any = { - "assetFolders": ( - "list", - { - 0: { - "id": None, - "displayName": None, - "parentFolder": None, - "assets": ("list", {0: None, 1: None}), - "siteId": None, - "createdOn": "datetime", - "lastUpdated": "datetime", - } - }, - ), - "pagination": {"limit": "integer", "offset": "integer", "total": "integer"}, - } - response = client.assets.list_folders(site_id="580e63e98c9a982ac9b8b741") - validate_response(response, expected_response, expected_types) - - async_response = await async_client.assets.list_folders(site_id="580e63e98c9a982ac9b8b741") - validate_response(async_response, expected_response, expected_types) - - -async def test_create_folder(client: Webflow, async_client: AsyncWebflow) -> None: - expected_response: typing.Any = { - "id": "6390c49774a71f0e3c1a08ee", - "displayName": "emoji icons", - "parentFolder": "6390c49774a71f99f21a08eb", - "assets": ["63e5889e7fe4eafa7384cea4", "659595234426a9fcbad57043"], - "siteId": "6390c49674a71f84b51a08d8", - "createdOn": "2018-10-14T21:55:49Z", - "lastUpdated": "2022-12-07T16:51:37Z", - } - expected_types: typing.Any = { - "id": None, - "displayName": None, - "parentFolder": None, - "assets": ("list", {0: None, 1: None}), - "siteId": None, - "createdOn": "datetime", - "lastUpdated": "datetime", - } - response = client.assets.create_folder(site_id="580e63e98c9a982ac9b8b741", display_name="my asset folder") - validate_response(response, expected_response, expected_types) - - async_response = await async_client.assets.create_folder( - site_id="580e63e98c9a982ac9b8b741", display_name="my asset folder" - ) - validate_response(async_response, expected_response, expected_types) - - -async def test_get_folder(client: Webflow, async_client: AsyncWebflow) -> None: - expected_response: typing.Any = { - "id": "6390c49774a71f0e3c1a08ee", - "displayName": "emoji icons", - "parentFolder": "6390c49774a71f99f21a08eb", - "assets": ["63e5889e7fe4eafa7384cea4", "659595234426a9fcbad57043"], - "siteId": "6390c49674a71f84b51a08d8", - "createdOn": "2018-10-14T21:55:49Z", - "lastUpdated": "2022-12-07T16:51:37Z", - } - expected_types: typing.Any = { - "id": None, - "displayName": None, - "parentFolder": None, - "assets": ("list", {0: None, 1: None}), - "siteId": None, - "createdOn": "datetime", - "lastUpdated": "datetime", - } - response = client.assets.get_folder(asset_folder_id="6390c49774a71f0e3c1a08ee") - validate_response(response, expected_response, expected_types) - - async_response = await async_client.assets.get_folder(asset_folder_id="6390c49774a71f0e3c1a08ee") - validate_response(async_response, expected_response, expected_types) diff --git a/tests/test_collections.py b/tests/test_collections.py deleted file mode 100644 index 4494869..0000000 --- a/tests/test_collections.py +++ /dev/null @@ -1,551 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -from webflow import Webflow -from webflow import AsyncWebflow -import typing -from .utilities import validate_response -from webflow import StaticField -from webflow import ReferenceField -from webflow import ReferenceFieldMetadata - - -async def test_list_(client: Webflow, async_client: AsyncWebflow) -> None: - expected_response: typing.Any = { - "collections": [ - { - "id": "63692ab61fb2852f582ba8f5", - "displayName": "Products", - "singularName": "Product", - "slug": "product", - "createdOn": "2019-06-12T13:35:14Z", - "lastUpdated": "2022-11-17T15:08:50Z", - }, - { - "id": "63692ab61fb2856e6a2ba8f6", - "displayName": "Categories", - "singularName": "Category", - "slug": "category", - "createdOn": "2019-06-12T13:35:14Z", - "lastUpdated": "2022-11-17T15:08:50Z", - }, - { - "id": "63692ab61fb285a8562ba8f4", - "displayName": "SKUs", - "singularName": "SKU", - "slug": "sku", - "createdOn": "2019-06-12T13:35:14Z", - "lastUpdated": "2022-11-17T15:08:50Z", - }, - ] - } - expected_types: typing.Any = { - "collections": ( - "list", - { - 0: { - "id": None, - "displayName": None, - "singularName": None, - "slug": None, - "createdOn": "datetime", - "lastUpdated": "datetime", - }, - 1: { - "id": None, - "displayName": None, - "singularName": None, - "slug": None, - "createdOn": "datetime", - "lastUpdated": "datetime", - }, - 2: { - "id": None, - "displayName": None, - "singularName": None, - "slug": None, - "createdOn": "datetime", - "lastUpdated": "datetime", - }, - }, - ) - } - response = client.collections.list(site_id="580e63e98c9a982ac9b8b741") - validate_response(response, expected_response, expected_types) - - async_response = await async_client.collections.list(site_id="580e63e98c9a982ac9b8b741") - validate_response(async_response, expected_response, expected_types) - - -async def test_create(client: Webflow, async_client: AsyncWebflow) -> None: - expected_response: typing.Any = { - "id": "562ac0395358780a1f5e6fbd", - "displayName": "Blog Posts", - "singularName": "Blog Post", - "slug": "posts", - "createdOn": "2016-10-24T19:41:48Z", - "lastUpdated": "2016-10-24T19:42:38Z", - "fields": [ - { - "id": "id", - "isRequired": True, - "isEditable": True, - "type": "PlainText", - "slug": "title", - "displayName": "Title", - "helpText": "The title of the blog post", - }, - { - "id": "id", - "isRequired": True, - "isEditable": True, - "type": "RichText", - "slug": "content", - "displayName": "Content", - "helpText": "The content of the blog post", - }, - { - "id": "id", - "isRequired": True, - "isEditable": True, - "type": "Reference", - "slug": "author", - "displayName": "Author", - "helpText": "The author of the blog post", - }, - ], - } - expected_types: typing.Any = { - "id": None, - "displayName": None, - "singularName": None, - "slug": None, - "createdOn": "datetime", - "lastUpdated": "datetime", - "fields": ( - "list", - { - 0: { - "id": None, - "isRequired": None, - "isEditable": None, - "type": None, - "slug": None, - "displayName": None, - "helpText": None, - }, - 1: { - "id": None, - "isRequired": None, - "isEditable": None, - "type": None, - "slug": None, - "displayName": None, - "helpText": None, - }, - 2: { - "id": None, - "isRequired": None, - "isEditable": None, - "type": None, - "slug": None, - "displayName": None, - "helpText": None, - }, - }, - ), - } - response = client.collections.create( - site_id="580e63e98c9a982ac9b8b741", - display_name="Blog Posts", - singular_name="Blog Post", - slug="posts", - fields=[ - StaticField( - is_required=True, type="PlainText", display_name="Title", help_text="The title of the blog post" - ), - StaticField( - is_required=True, type="RichText", display_name="Content", help_text="The content of the blog post" - ), - ReferenceField( - is_required=True, - type="Reference", - display_name="Author", - help_text="The author of the blog post", - metadata=ReferenceFieldMetadata(collection_id="23cc2d952d4e4631ffd4345d2743db4e"), - ), - ], - ) - validate_response(response, expected_response, expected_types) - - async_response = await async_client.collections.create( - site_id="580e63e98c9a982ac9b8b741", - display_name="Blog Posts", - singular_name="Blog Post", - slug="posts", - fields=[ - StaticField( - is_required=True, type="PlainText", display_name="Title", help_text="The title of the blog post" - ), - StaticField( - is_required=True, type="RichText", display_name="Content", help_text="The content of the blog post" - ), - ReferenceField( - is_required=True, - type="Reference", - display_name="Author", - help_text="The author of the blog post", - metadata=ReferenceFieldMetadata(collection_id="23cc2d952d4e4631ffd4345d2743db4e"), - ), - ], - ) - validate_response(async_response, expected_response, expected_types) - - -async def test_get(client: Webflow, async_client: AsyncWebflow) -> None: - expected_response: typing.Any = { - "id": "7f15043107e2fc95644e93807ee25dd6", - "displayName": "Guide Entries", - "singularName": "Guide Entry", - "slug": "guide-entry", - "createdOn": "2024-04-12T12:42:00Z", - "lastUpdated": "2024-04-12T12:42:00Z", - "fields": [ - { - "id": "5e2a1b3c4d5e6f7890a1b2c3", - "isRequired": True, - "isEditable": True, - "type": "PlainText", - "slug": "name", - "displayName": "Entry Title", - "helpText": "Name of the entry.", - }, - { - "id": "5e2a1b3c4d5e6f7890a1b2c4", - "isRequired": True, - "isEditable": True, - "type": "PlainText", - "slug": "slug", - "displayName": "Slug", - "helpText": "Slug of the entry.", - }, - { - "id": "6f7e8d9c0b1a2e3d4c5b6a7f", - "isRequired": False, - "isEditable": True, - "type": "PlainText", - "slug": "summary", - "displayName": "Summary", - "helpText": "A short summary of the entry.", - }, - { - "id": "1a2b3c4d5e6f7a8b9c0d1e2f", - "isRequired": False, - "isEditable": True, - "type": "RichText", - "slug": "entry-html", - "displayName": "Entry HTML", - "helpText": "The HTML content of the entry.", - }, - { - "id": "7e8d9c0b1a2e3d4c5b6a7f8e", - "isRequired": False, - "isEditable": True, - "type": "Image", - "slug": "illustration-image", - "displayName": "Illustration Image", - "helpText": "An image of the entry.", - }, - { - "id": "2f3e4d5c6b7a8e9d0c1b2a3f", - "isRequired": False, - "isEditable": True, - "type": "VideoLink", - "slug": "demonstration-video", - "displayName": "Demonstration Video", - "helpText": "A video of the entry.", - }, - { - "id": "8e9d0c1b2a3f4e5d6c7b8a9e", - "isRequired": False, - "isEditable": True, - "type": "Link", - "slug": "more-info-link", - "displayName": "More Info Link", - "helpText": "A link to more information about the entry.", - }, - { - "id": "3f4e5d6c7b8a9e0d1c2b3a4f", - "isRequired": False, - "isEditable": True, - "type": "Number", - "slug": "importance-level", - "displayName": "Importance Level", - "helpText": "The importance level of the entry.", - }, - { - "id": "9e0d1c2b3a4f5e6d7c8b9a0e", - "isRequired": False, - "isEditable": True, - "type": "Switch", - "slug": "is-essential", - "displayName": "Is Essential", - "helpText": "Is this entry essential?", - }, - { - "id": "4f5e6d7c8b9a0e1d2c3b4a5f", - "isRequired": False, - "isEditable": True, - "type": "Color", - "slug": "first-mentioned", - "displayName": "First Mentioned", - "helpText": "Date of the first mention of the subject.", - }, - { - "id": "0e1d2c3b4a5f6e7d8c9b0a1e", - "isRequired": False, - "isEditable": True, - "type": "Color", - "slug": "towel-color", - "displayName": "Towel Color", - "helpText": "The color of the towel.", - }, - { - "id": "5f6e7d8c9b0a1e2d3c4b5a6f", - "isRequired": False, - "isEditable": True, - "type": "Reference", - "slug": "related-entry", - "displayName": "Related Entry", - "helpText": "A related entry.", - }, - { - "id": "1e2d3c4b5a6f7e8d9c0b1a2f", - "isRequired": False, - "isEditable": True, - "type": "MultiReference", - "slug": "mentioned-in-entries", - "displayName": "Mentioned In Entries", - "helpText": "Entries that mention this subject.", - }, - { - "id": "6f7e8d9c0b1a2e3d4c5b6a8f", - "isRequired": False, - "isEditable": True, - "type": "Option", - "slug": "item-type", - "displayName": "Item Type", - "helpText": "The type of item.", - }, - { - "id": "2e3d4c5b6a7f8e9d0c1b2a4f", - "isRequired": False, - "isEditable": True, - "type": "File", - "slug": "guide-file", - "displayName": "Guide File", - "helpText": "helpText", - }, - { - "id": "7f8e9d0c1b2a3f4e5d6c8b9e", - "isRequired": False, - "isEditable": True, - "type": "Email", - "slug": "contributor-email", - "displayName": "Contributor Email", - "helpText": "helpText", - }, - { - "id": "3a4f5e6d7c8b9a0e1d2c4b5f", - "isRequired": False, - "isEditable": True, - "type": "Phone", - "slug": "emergency-contact", - "displayName": "Emergency Contact", - "helpText": "helpText", - }, - ], - } - expected_types: typing.Any = { - "id": None, - "displayName": None, - "singularName": None, - "slug": None, - "createdOn": "datetime", - "lastUpdated": "datetime", - "fields": ( - "list", - { - 0: { - "id": None, - "isRequired": None, - "isEditable": None, - "type": None, - "slug": None, - "displayName": None, - "helpText": None, - }, - 1: { - "id": None, - "isRequired": None, - "isEditable": None, - "type": None, - "slug": None, - "displayName": None, - "helpText": None, - }, - 2: { - "id": None, - "isRequired": None, - "isEditable": None, - "type": None, - "slug": None, - "displayName": None, - "helpText": None, - }, - 3: { - "id": None, - "isRequired": None, - "isEditable": None, - "type": None, - "slug": None, - "displayName": None, - "helpText": None, - }, - 4: { - "id": None, - "isRequired": None, - "isEditable": None, - "type": None, - "slug": None, - "displayName": None, - "helpText": None, - }, - 5: { - "id": None, - "isRequired": None, - "isEditable": None, - "type": None, - "slug": None, - "displayName": None, - "helpText": None, - }, - 6: { - "id": None, - "isRequired": None, - "isEditable": None, - "type": None, - "slug": None, - "displayName": None, - "helpText": None, - }, - 7: { - "id": None, - "isRequired": None, - "isEditable": None, - "type": None, - "slug": None, - "displayName": None, - "helpText": None, - }, - 8: { - "id": None, - "isRequired": None, - "isEditable": None, - "type": None, - "slug": None, - "displayName": None, - "helpText": None, - }, - 9: { - "id": None, - "isRequired": None, - "isEditable": None, - "type": None, - "slug": None, - "displayName": None, - "helpText": None, - }, - 10: { - "id": None, - "isRequired": None, - "isEditable": None, - "type": None, - "slug": None, - "displayName": None, - "helpText": None, - }, - 11: { - "id": None, - "isRequired": None, - "isEditable": None, - "type": None, - "slug": None, - "displayName": None, - "helpText": None, - }, - 12: { - "id": None, - "isRequired": None, - "isEditable": None, - "type": None, - "slug": None, - "displayName": None, - "helpText": None, - }, - 13: { - "id": None, - "isRequired": None, - "isEditable": None, - "type": None, - "slug": None, - "displayName": None, - "helpText": None, - }, - 14: { - "id": None, - "isRequired": None, - "isEditable": None, - "type": None, - "slug": None, - "displayName": None, - "helpText": None, - }, - 15: { - "id": None, - "isRequired": None, - "isEditable": None, - "type": None, - "slug": None, - "displayName": None, - "helpText": None, - }, - 16: { - "id": None, - "isRequired": None, - "isEditable": None, - "type": None, - "slug": None, - "displayName": None, - "helpText": None, - }, - }, - ), - } - response = client.collections.get(collection_id="580e63fc8c9a982ac9b8b745") - validate_response(response, expected_response, expected_types) - - async_response = await async_client.collections.get(collection_id="580e63fc8c9a982ac9b8b745") - validate_response(async_response, expected_response, expected_types) - - -async def test_delete(client: Webflow, async_client: AsyncWebflow) -> None: - # Type ignore to avoid mypy complaining about the function not being meant to return a value - assert ( - client.collections.delete(collection_id="580e63fc8c9a982ac9b8b745") # type: ignore[func-returns-value] - is None - ) - - assert ( - await async_client.collections.delete(collection_id="580e63fc8c9a982ac9b8b745") # type: ignore[func-returns-value] - is None - ) diff --git a/tests/test_components.py b/tests/test_components.py deleted file mode 100644 index c502ef0..0000000 --- a/tests/test_components.py +++ /dev/null @@ -1,311 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -from webflow import Webflow -from webflow import AsyncWebflow -import typing -from .utilities import validate_response -from webflow import TextNodeWrite -from webflow import Select -from webflow import SelectNodeWriteChoicesItem -from webflow import TextInputNodeWrite -from webflow import SubmitButtonNodeWrite -from webflow import ComponentInstanceNodePropertyOverridesWrite -from webflow import ComponentInstanceNodePropertyOverridesWritePropertyOverridesItem -from webflow.resources.components import ComponentPropertiesWritePropertiesItem - - -async def test_list_(client: Webflow, async_client: AsyncWebflow) -> None: - expected_response: typing.Any = { - "components": [ - { - "id": "6596da6045e56dee495bcbba", - "name": "Primary Button", - "group": "Buttons", - "description": "A default button component that can be used across the site", - "readonly": True, - }, - { - "id": "658205daa3e8206a523b5ad4", - "name": "Secondary Button", - "group": "Buttons", - "description": "A secondary button component that can be used across the site", - "readonly": True, - }, - { - "id": "6258612d1ee792848f805dcf", - "name": "Card", - "group": "Buttons", - "description": "A button component that can be used across the site", - "readonly": True, - }, - { - "id": "68a2b1d1ee792848f805dcf", - "name": "Nav", - "group": "Buttons", - "description": "A button component that can be used across the site", - "readonly": True, - }, - ], - "pagination": {"limit": 20, "offset": 0, "total": 4}, - } - expected_types: typing.Any = { - "components": ( - "list", - { - 0: {"id": None, "name": None, "group": None, "description": None, "readonly": None}, - 1: {"id": None, "name": None, "group": None, "description": None, "readonly": None}, - 2: {"id": None, "name": None, "group": None, "description": None, "readonly": None}, - 3: {"id": None, "name": None, "group": None, "description": None, "readonly": None}, - }, - ), - "pagination": {"limit": "integer", "offset": "integer", "total": "integer"}, - } - response = client.components.list( - site_id="580e63e98c9a982ac9b8b741", branch_id="68026fa68ef6dc744c75b833", limit=1, offset=1 - ) - validate_response(response, expected_response, expected_types) - - async_response = await async_client.components.list( - site_id="580e63e98c9a982ac9b8b741", branch_id="68026fa68ef6dc744c75b833", limit=1, offset=1 - ) - validate_response(async_response, expected_response, expected_types) - - -async def test_get_content(client: Webflow, async_client: AsyncWebflow) -> None: - expected_response: typing.Any = { - "componentId": "69118560-d0bc-15fc-bbf8-b8fe5f6535b5", - "nodes": [ - {"id": "id", "text": {}, "attributes": {"key": "value"}, "type": "text"}, - {"id": "id", "text": {}, "attributes": {"key": "value"}, "type": "text"}, - {"id": "id", "image": {}, "attributes": {"key": "value"}, "type": "image"}, - {"id": "id", "placeholder": "placeholder", "attributes": {"key": "value"}, "type": "text-input"}, - { - "id": "id", - "choices": [{"value": "value", "text": "text"}], - "attributes": {"key": "value"}, - "type": "select", - }, - { - "id": "id", - "value": "value", - "waitingText": "waitingText", - "attributes": {"key": "value"}, - "type": "submit-button", - }, - { - "id": "id", - "componentId": "componentId", - "propertyOverrides": [{"propertyId": "7dd14c08-2e96-8d3d-2b19-b5c03642a0f0"}], - "type": "component-instance", - }, - ], - "pagination": {"limit": 7, "offset": 0, "total": 7}, - } - expected_types: typing.Any = { - "componentId": None, - "nodes": ( - "list", - { - 0: "no_validate", - 1: "no_validate", - 2: "no_validate", - 3: "no_validate", - 4: "no_validate", - 5: "no_validate", - 6: "no_validate", - }, - ), - "pagination": {"limit": "integer", "offset": "integer", "total": "integer"}, - } - response = client.components.get_content( - site_id="580e63e98c9a982ac9b8b741", - component_id="8505ba55-ef72-629e-f85c-33e4b703d48b", - locale_id="65427cf400e02b306eaa04a0", - branch_id="68026fa68ef6dc744c75b833", - limit=1, - offset=1, - ) - validate_response(response, expected_response, expected_types) - - async_response = await async_client.components.get_content( - site_id="580e63e98c9a982ac9b8b741", - component_id="8505ba55-ef72-629e-f85c-33e4b703d48b", - locale_id="65427cf400e02b306eaa04a0", - branch_id="68026fa68ef6dc744c75b833", - limit=1, - offset=1, - ) - validate_response(async_response, expected_response, expected_types) - - -async def test_update_content(client: Webflow, async_client: AsyncWebflow) -> None: - expected_response: typing.Any = {"errors": ["errors"]} - expected_types: typing.Any = {"errors": ("list", {0: None})} - response = client.components.update_content( - site_id="580e63e98c9a982ac9b8b741", - component_id="8505ba55-ef72-629e-f85c-33e4b703d48b", - locale_id="65427cf400e02b306eaa04a0", - branch_id="68026fa68ef6dc744c75b833", - nodes=[ - TextNodeWrite( - node_id="a245c12d-995b-55ee-5ec7-aa36a6cad623", text="

The Hitchhiker's Guide to the Galaxy

" - ), - TextNodeWrite( - node_id="a245c12d-995b-55ee-5ec7-aa36a6cad627", - text="

Don't Panic!

Always know where your towel is.

", - ), - Select( - node_id="a245c12d-995b-55ee-5ec7-aa36a6cad635", - choices=[ - SelectNodeWriteChoicesItem(value="choice-1", text="First choice"), - SelectNodeWriteChoicesItem(value="choice-2", text="Second choice"), - ], - ), - TextInputNodeWrite(node_id="a245c12d-995b-55ee-5ec7-aa36a6cad642", placeholder="Enter something here..."), - SubmitButtonNodeWrite( - node_id="a245c12d-995b-55ee-5ec7-aa36a6cad671", value="Submit", waiting_text="Submitting..." - ), - ComponentInstanceNodePropertyOverridesWrite( - node_id="a245c12d-995b-55ee-5ec7-aa36a6cad629", - property_overrides=[ - ComponentInstanceNodePropertyOverridesWritePropertyOverridesItem( - property_id="7dd14c08-2e96-8d3d-2b19-b5c03642a0f0", - text="

Time is an illusion

", - ), - ComponentInstanceNodePropertyOverridesWritePropertyOverridesItem( - property_id="7dd14c08-2e96-8d3d-2b19-b5c03642a0f1", text="Life, the Universe and Everything" - ), - ], - ), - ], - ) - validate_response(response, expected_response, expected_types) - - async_response = await async_client.components.update_content( - site_id="580e63e98c9a982ac9b8b741", - component_id="8505ba55-ef72-629e-f85c-33e4b703d48b", - locale_id="65427cf400e02b306eaa04a0", - branch_id="68026fa68ef6dc744c75b833", - nodes=[ - TextNodeWrite( - node_id="a245c12d-995b-55ee-5ec7-aa36a6cad623", text="

The Hitchhiker's Guide to the Galaxy

" - ), - TextNodeWrite( - node_id="a245c12d-995b-55ee-5ec7-aa36a6cad627", - text="

Don't Panic!

Always know where your towel is.

", - ), - Select( - node_id="a245c12d-995b-55ee-5ec7-aa36a6cad635", - choices=[ - SelectNodeWriteChoicesItem(value="choice-1", text="First choice"), - SelectNodeWriteChoicesItem(value="choice-2", text="Second choice"), - ], - ), - TextInputNodeWrite(node_id="a245c12d-995b-55ee-5ec7-aa36a6cad642", placeholder="Enter something here..."), - SubmitButtonNodeWrite( - node_id="a245c12d-995b-55ee-5ec7-aa36a6cad671", value="Submit", waiting_text="Submitting..." - ), - ComponentInstanceNodePropertyOverridesWrite( - node_id="a245c12d-995b-55ee-5ec7-aa36a6cad629", - property_overrides=[ - ComponentInstanceNodePropertyOverridesWritePropertyOverridesItem( - property_id="7dd14c08-2e96-8d3d-2b19-b5c03642a0f0", - text="

Time is an illusion

", - ), - ComponentInstanceNodePropertyOverridesWritePropertyOverridesItem( - property_id="7dd14c08-2e96-8d3d-2b19-b5c03642a0f1", text="Life, the Universe and Everything" - ), - ], - ), - ], - ) - validate_response(async_response, expected_response, expected_types) - - -async def test_get_properties(client: Webflow, async_client: AsyncWebflow) -> None: - expected_response: typing.Any = { - "componentId": "658205daa3e8206a523b5ad4", - "properties": [ - { - "propertyId": "a245c12d-995b-55ee-5ec7-aa36a6cad623", - "type": "Plain Text", - "label": "Title", - "text": {"text": "The Hitchhiker's Guide to the Galaxy"}, - }, - { - "propertyId": "a245c12d-995b-55ee-5ec7-aa36a6cad627", - "type": "Rich Text", - "label": "Content", - "text": {"html": "

Don't Panic!

Always know where your towel is.

"}, - }, - ], - "pagination": {"limit": 2, "offset": 0, "total": 2}, - } - expected_types: typing.Any = { - "componentId": None, - "properties": ( - "list", - { - 0: {"propertyId": None, "type": None, "label": None, "text": {"text": None}}, - 1: {"propertyId": None, "type": None, "label": None, "text": {"html": None}}, - }, - ), - "pagination": {"limit": "integer", "offset": "integer", "total": "integer"}, - } - response = client.components.get_properties( - site_id="580e63e98c9a982ac9b8b741", - component_id="8505ba55-ef72-629e-f85c-33e4b703d48b", - locale_id="65427cf400e02b306eaa04a0", - branch_id="68026fa68ef6dc744c75b833", - limit=1, - offset=1, - ) - validate_response(response, expected_response, expected_types) - - async_response = await async_client.components.get_properties( - site_id="580e63e98c9a982ac9b8b741", - component_id="8505ba55-ef72-629e-f85c-33e4b703d48b", - locale_id="65427cf400e02b306eaa04a0", - branch_id="68026fa68ef6dc744c75b833", - limit=1, - offset=1, - ) - validate_response(async_response, expected_response, expected_types) - - -async def test_update_properties(client: Webflow, async_client: AsyncWebflow) -> None: - expected_response: typing.Any = {"errors": ["errors"]} - expected_types: typing.Any = {"errors": ("list", {0: None})} - response = client.components.update_properties( - site_id="580e63e98c9a982ac9b8b741", - component_id="8505ba55-ef72-629e-f85c-33e4b703d48b", - locale_id="65427cf400e02b306eaa04a0", - branch_id="68026fa68ef6dc744c75b833", - properties=[ - ComponentPropertiesWritePropertiesItem( - property_id="a245c12d-995b-55ee-5ec7-aa36a6cad623", text="The Hitchhiker’s Guide to the Galaxy" - ), - ComponentPropertiesWritePropertiesItem( - property_id="a245c12d-995b-55ee-5ec7-aa36a6cad627", - text="

Dont Panic!

Always know where your towel is.

", - ), - ], - ) - validate_response(response, expected_response, expected_types) - - async_response = await async_client.components.update_properties( - site_id="580e63e98c9a982ac9b8b741", - component_id="8505ba55-ef72-629e-f85c-33e4b703d48b", - locale_id="65427cf400e02b306eaa04a0", - branch_id="68026fa68ef6dc744c75b833", - properties=[ - ComponentPropertiesWritePropertiesItem( - property_id="a245c12d-995b-55ee-5ec7-aa36a6cad623", text="The Hitchhiker’s Guide to the Galaxy" - ), - ComponentPropertiesWritePropertiesItem( - property_id="a245c12d-995b-55ee-5ec7-aa36a6cad627", - text="

Dont Panic!

Always know where your towel is.

", - ), - ], - ) - validate_response(async_response, expected_response, expected_types) diff --git a/tests/test_ecommerce.py b/tests/test_ecommerce.py deleted file mode 100644 index b33a06f..0000000 --- a/tests/test_ecommerce.py +++ /dev/null @@ -1,20 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -from webflow import Webflow -from webflow import AsyncWebflow -import typing -from .utilities import validate_response - - -async def test_get_settings(client: Webflow, async_client: AsyncWebflow) -> None: - expected_response: typing.Any = { - "siteId": "5eb0b5583bf24e2d3a488969", - "createdOn": "2018-10-04T15:21:02Z", - "defaultCurrency": "USD", - } - expected_types: typing.Any = {"siteId": None, "createdOn": "datetime", "defaultCurrency": None} - response = client.ecommerce.get_settings(site_id="580e63e98c9a982ac9b8b741") - validate_response(response, expected_response, expected_types) - - async_response = await async_client.ecommerce.get_settings(site_id="580e63e98c9a982ac9b8b741") - validate_response(async_response, expected_response, expected_types) diff --git a/tests/test_forms.py b/tests/test_forms.py deleted file mode 100644 index 8ca6e40..0000000 --- a/tests/test_forms.py +++ /dev/null @@ -1,291 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -from webflow import Webflow -from webflow import AsyncWebflow -import typing -from .utilities import validate_response - - -async def test_list_(client: Webflow, async_client: AsyncWebflow) -> None: - expected_response: typing.Any = { - "forms": [ - { - "displayName": "Email Form", - "createdOn": "2016-10-24T19:41:29Z", - "lastUpdated": "2016-10-24T19:43:17Z", - "fields": { - "0": {"displayName": "Email", "placeholder": "Enter your email", "userVisible": True}, - "1": {"displayName": "Email", "placeholder": "Enter your email", "userVisible": True}, - }, - "responseSettings": { - "redirectUrl": "https://example.com", - "redirectMethod": "GET", - "redirectAction": "POST https://example.com", - "sendEmailConfirmation": True, - }, - "id": "589a331aa51e760df7ccb89e", - "siteId": "580e63e98c9a982ac9b8b741", - "siteDomainId": "6419db964a9c436a4baf6248", - "pageId": "6419db964a9c43f6a3af6348", - "pageName": "Home", - "formElementId": "4e038d2c-6a1e-4953-7be9-a59a2b453177", - "workspaceId": "580e63fc8c9a982ac9b8b744", - }, - { - "displayName": "Name Form", - "createdOn": "2016-10-24T19:41:29Z", - "lastUpdated": "2016-10-24T19:43:17Z", - "fields": {"0": {"displayName": "Email", "placeholder": "Enter your email", "userVisible": True}}, - "responseSettings": { - "redirectUrl": "https://example.com", - "redirectMethod": "GET", - "redirectAction": "POST https://example.com", - "sendEmailConfirmation": False, - }, - "id": "580ff8d7ba3e45ba9fe588e9", - "siteId": "580e63e98c9a982ac9b8b741", - "siteDomainId": "6419db964a9c436a4baf6248", - "pageId": "6419db964a9c43f6a3af6348", - "pageName": "Home", - "formElementId": "4e038d2c-6a1e-4953-7be9-a59a2b453177", - "workspaceId": "580e63fc8c9a982ac9b8b744", - }, - ], - "pagination": {"limit": 25, "offset": 0, "total": 2}, - } - expected_types: typing.Any = { - "forms": ( - "list", - { - 0: { - "displayName": None, - "createdOn": "datetime", - "lastUpdated": "datetime", - "fields": ( - "dict", - { - 0: (None, {"displayName": None, "placeholder": None, "userVisible": None}), - 1: (None, {"displayName": None, "placeholder": None, "userVisible": None}), - }, - ), - "responseSettings": { - "redirectUrl": None, - "redirectMethod": None, - "redirectAction": None, - "sendEmailConfirmation": None, - }, - "id": None, - "siteId": None, - "siteDomainId": None, - "pageId": None, - "pageName": None, - "formElementId": None, - "workspaceId": None, - }, - 1: { - "displayName": None, - "createdOn": "datetime", - "lastUpdated": "datetime", - "fields": ("dict", {0: (None, {"displayName": None, "placeholder": None, "userVisible": None})}), - "responseSettings": { - "redirectUrl": None, - "redirectMethod": None, - "redirectAction": None, - "sendEmailConfirmation": None, - }, - "id": None, - "siteId": None, - "siteDomainId": None, - "pageId": None, - "pageName": None, - "formElementId": None, - "workspaceId": None, - }, - }, - ), - "pagination": {"limit": "integer", "offset": "integer", "total": "integer"}, - } - response = client.forms.list(site_id="580e63e98c9a982ac9b8b741", limit=1, offset=1) - validate_response(response, expected_response, expected_types) - - async_response = await async_client.forms.list(site_id="580e63e98c9a982ac9b8b741", limit=1, offset=1) - validate_response(async_response, expected_response, expected_types) - - -async def test_get(client: Webflow, async_client: AsyncWebflow) -> None: - expected_response: typing.Any = { - "displayName": "Email Form", - "createdOn": "2016-10-24T19:41:29Z", - "lastUpdated": "2016-10-24T19:43:17Z", - "fields": { - "660d5bcc9c0772150459dfb1": { - "displayName": "Name", - "type": "Plain", - "placeholder": "Enter your email", - "userVisible": True, - }, - "589a331aa51e760df7ccb89d": { - "displayName": "Email", - "type": "Email", - "placeholder": "Enter your email", - "userVisible": True, - }, - }, - "responseSettings": { - "redirectUrl": "https://example.com", - "redirectMethod": "GET", - "redirectAction": "POST https://example.com", - "sendEmailConfirmation": True, - }, - "id": "589a331aa51e760df7ccb89e", - "siteId": "580e63e98c9a982ac9b8b741", - "siteDomainId": "6419db964a9c436a4baf6248", - "pageId": "6419db964a9c43f6a3af6348", - "pageName": "Home", - "formElementId": "4e038d2c-6a1e-4953-7be9-a59a2b453177", - "workspaceId": "580e63fc8c9a982ac9b8b744", - } - expected_types: typing.Any = { - "displayName": None, - "createdOn": "datetime", - "lastUpdated": "datetime", - "fields": ( - "dict", - { - 0: (None, {"displayName": None, "type": None, "placeholder": None, "userVisible": None}), - 1: (None, {"displayName": None, "type": None, "placeholder": None, "userVisible": None}), - }, - ), - "responseSettings": { - "redirectUrl": None, - "redirectMethod": None, - "redirectAction": None, - "sendEmailConfirmation": None, - }, - "id": None, - "siteId": None, - "siteDomainId": None, - "pageId": None, - "pageName": None, - "formElementId": None, - "workspaceId": None, - } - response = client.forms.get(form_id="580e63e98c9a982ac9b8b741") - validate_response(response, expected_response, expected_types) - - async_response = await async_client.forms.get(form_id="580e63e98c9a982ac9b8b741") - validate_response(async_response, expected_response, expected_types) - - -async def test_list_submissions(client: Webflow, async_client: AsyncWebflow) -> None: - expected_response: typing.Any = { - "formSubmissions": [ - { - "id": "6321ca84df3949bfc6752327", - "displayName": "Sample Form", - "siteId": "62749158efef318abc8d5a0f", - "workspaceId": "62749158efef318abc8d5a0f", - "dateSubmitted": "2022-09-14T12:35:16Z", - "formResponse": {"First Name": "Arthur", "Last Name": "Dent"}, - }, - { - "id": "660d64fabf6e0a0d4edab981", - "displayName": "Sample Form", - "siteId": "62749158efef318abc8d5a0f", - "workspaceId": "62749158efef318abc8d5a0f", - "dateSubmitted": "2022-09-14T12:35:16Z", - "formResponse": {"First Name": "Ford", "Last Name": "Prefect"}, - }, - ], - "pagination": {"limit": 25, "offset": 0, "total": 2}, - } - expected_types: typing.Any = { - "formSubmissions": ( - "list", - { - 0: { - "id": None, - "displayName": None, - "siteId": None, - "workspaceId": None, - "dateSubmitted": "datetime", - "formResponse": ("dict", {0: (None, None), 1: (None, None)}), - }, - 1: { - "id": None, - "displayName": None, - "siteId": None, - "workspaceId": None, - "dateSubmitted": "datetime", - "formResponse": ("dict", {0: (None, None), 1: (None, None)}), - }, - }, - ), - "pagination": {"limit": "integer", "offset": "integer", "total": "integer"}, - } - response = client.forms.list_submissions(form_id="580e63e98c9a982ac9b8b741", offset=1, limit=1) - validate_response(response, expected_response, expected_types) - - async_response = await async_client.forms.list_submissions(form_id="580e63e98c9a982ac9b8b741", offset=1, limit=1) - validate_response(async_response, expected_response, expected_types) - - -async def test_get_submission(client: Webflow, async_client: AsyncWebflow) -> None: - expected_response: typing.Any = { - "id": "6321ca84df3949bfc6752327", - "displayName": "Sample Form", - "siteId": "62749158efef318abc8d5a0f", - "workspaceId": "62749158efef318abc8d5a0f", - "dateSubmitted": "2022-09-14T12:35:16Z", - "formResponse": {"First Name": "Arthur", "Last Name": "Dent"}, - } - expected_types: typing.Any = { - "id": None, - "displayName": None, - "siteId": None, - "workspaceId": None, - "dateSubmitted": "datetime", - "formResponse": ("dict", {0: (None, None), 1: (None, None)}), - } - response = client.forms.get_submission(form_submission_id="580e63e98c9a982ac9b8b741") - validate_response(response, expected_response, expected_types) - - async_response = await async_client.forms.get_submission(form_submission_id="580e63e98c9a982ac9b8b741") - validate_response(async_response, expected_response, expected_types) - - -async def test_delete_submission(client: Webflow, async_client: AsyncWebflow) -> None: - # Type ignore to avoid mypy complaining about the function not being meant to return a value - assert ( - client.forms.delete_submission(form_submission_id="580e63e98c9a982ac9b8b741") # type: ignore[func-returns-value] - is None - ) - - assert ( - await async_client.forms.delete_submission(form_submission_id="580e63e98c9a982ac9b8b741") # type: ignore[func-returns-value] - is None - ) - - -async def test_update_submission(client: Webflow, async_client: AsyncWebflow) -> None: - expected_response: typing.Any = { - "id": "6321ca84df3949bfc6752327", - "displayName": "Sample Form", - "siteId": "62749158efef318abc8d5a0f", - "workspaceId": "62749158efef318abc8d5a0f", - "dateSubmitted": "2022-09-14T12:35:16Z", - "formResponse": {"First Name": "Arthur", "Last Name": "Dent"}, - } - expected_types: typing.Any = { - "id": None, - "displayName": None, - "siteId": None, - "workspaceId": None, - "dateSubmitted": "datetime", - "formResponse": ("dict", {0: (None, None), 1: (None, None)}), - } - response = client.forms.update_submission(form_submission_id="580e63e98c9a982ac9b8b741") - validate_response(response, expected_response, expected_types) - - async_response = await async_client.forms.update_submission(form_submission_id="580e63e98c9a982ac9b8b741") - validate_response(async_response, expected_response, expected_types) diff --git a/tests/test_inventory.py b/tests/test_inventory.py deleted file mode 100644 index 95062f9..0000000 --- a/tests/test_inventory.py +++ /dev/null @@ -1,32 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -from webflow import Webflow -from webflow import AsyncWebflow -import typing -from .utilities import validate_response - - -async def test_list_(client: Webflow, async_client: AsyncWebflow) -> None: - expected_response: typing.Any = {"id": "5bfedb42bab0ad90fa7dad39", "quantity": 100, "inventoryType": "finite"} - expected_types: typing.Any = {"id": None, "quantity": None, "inventoryType": None} - response = client.inventory.list(sku_collection_id="6377a7c4b7a79608c34a46f7", sku_id="5e8518516e147040726cc415") - validate_response(response, expected_response, expected_types) - - async_response = await async_client.inventory.list( - sku_collection_id="6377a7c4b7a79608c34a46f7", sku_id="5e8518516e147040726cc415" - ) - validate_response(async_response, expected_response, expected_types) - - -async def test_update(client: Webflow, async_client: AsyncWebflow) -> None: - expected_response: typing.Any = {"id": "5bfedb42bab0ad90fa7dad39", "quantity": 100, "inventoryType": "finite"} - expected_types: typing.Any = {"id": None, "quantity": None, "inventoryType": None} - response = client.inventory.update( - sku_collection_id="6377a7c4b7a79608c34a46f7", sku_id="5e8518516e147040726cc415", inventory_type="infinite" - ) - validate_response(response, expected_response, expected_types) - - async_response = await async_client.inventory.update( - sku_collection_id="6377a7c4b7a79608c34a46f7", sku_id="5e8518516e147040726cc415", inventory_type="infinite" - ) - validate_response(async_response, expected_response, expected_types) diff --git a/tests/test_orders.py b/tests/test_orders.py deleted file mode 100644 index dce7836..0000000 --- a/tests/test_orders.py +++ /dev/null @@ -1,2337 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -from webflow import Webflow -from webflow import AsyncWebflow -import typing -from .utilities import validate_response - - -async def test_list_(client: Webflow, async_client: AsyncWebflow) -> None: - expected_response: typing.Any = { - "orders": [ - { - "orderId": "7c1-9fd", - "status": "unfulfilled", - "comment": "Customer requested gift wrapping and a personalized note saying: Happy Birthday, Ford! 🎉 Please ensure the item is packed with extra bubble wrap for safe transit.", - "orderComment": 'Please gift wrap with a personal note saying "Happy Birthday, Ford! 🎉', - "acceptedOn": "2024-04-10T13:16:21Z", - "fulfilledOn": "2018-12-03T22:06:15Z", - "refundedOn": "2018-12-03T22:06:15Z", - "disputedOn": "2018-12-03T22:06:15Z", - "disputeUpdatedOn": "2018-12-03T22:06:15Z", - "disputeLastStatus": "warning_needs_response", - "customerPaid": {"unit": "USD", "value": "5892", "string": "$ 211.55 USD"}, - "netAmount": {"unit": "USD", "value": "5892", "string": "$ 200.89 USD"}, - "applicationFee": {"unit": "USD", "value": "5892", "string": "$ 4.23 USD"}, - "allAddresses": [ - { - "type": "billing", - "addressee": "Arthur Dent", - "line1": "20 W 34th St", - "line2": "Empire State Building", - "city": "New York", - "state": "New York", - "country": "US", - "postalCode": "10118", - }, - { - "type": "shipping", - "addressee": "Arthur Dent", - "line1": "20 W 34th St", - "line2": "Empire State Building", - "city": "New York", - "state": "New York", - "country": "US", - "postalCode": "10118", - }, - ], - "shippingAddress": { - "type": "shipping", - "japanType": "kanji", - "addressee": "Arthur Dent", - "line1": "20 W 34th St", - "line2": "Empire State Building", - "city": "New York", - "state": "New York", - "country": "US", - "postalCode": "10118", - }, - "billingAddress": { - "type": "billing", - "addressee": "Arthur Dent", - "line1": "20 W 34th St", - "line2": "Empire State Building", - "city": "New York", - "state": "New York", - "country": "US", - "postalCode": "10118", - }, - "shippingProvider": "Shipping Company, Co.", - "shippingTracking": "tr00000000002", - "shippingTrackingURL": "https://www.shippingcompany.com/tracking/tr00000000002", - "customerInfo": {"fullName": "Arthur Dent", "email": "arthur.dent@example.com"}, - "purchasedItems": [ - { - "count": 2, - "rowTotal": {"unit": "USD", "value": "5892", "string": "$ 111.22 USD"}, - "productId": "66072fb61b89448912e26791", - "productName": "Luxurious Fresh Ball", - "productSlug": "luxurious-fresh-ball", - "variantId": "66072fb71b89448912e2683f", - "variantName": "Luxurious Fresh Ball Generic: Bronze, Practical: Plastic", - "variantSlug": "luxurious-fresh-ball-generic-bronze-practical-plastic", - "variantSKU": "luxurious-fresh-ball-generic-bronze-practical-plastic", - "variantImage": { - "url": "https://dev-assets.website-files.com/66072f39417a2a35b2589cc7/66072fb51b89448912e2672c_image14.jpeg" - }, - "variantPrice": {"unit": "USD", "value": "5892", "string": "$ 55.61 USD"}, - "weight": 11, - "width": 82, - "height": 70, - "length": 9, - }, - { - "count": 1, - "rowTotal": {"unit": "USD", "value": "5892", "string": "$ 83.09 USD"}, - "productId": "66072fb61b89448912e2678b", - "productName": "Incredible Bronze Towels", - "productSlug": "incredible-bronze-towels", - "variantId": "66072fb71b89448912e2681e", - "variantName": "Incredible Bronze Towels Sleek: Frozen, Incredible: Metal", - "variantSlug": "incredible-bronze-towels-sleek-frozen-incredible-metal", - "variantSKU": "incredible-bronze-towels-sleek-frozen-incredible-metal", - "variantImage": { - "url": "https://dev-assets.website-files.com/66072f39417a2a35b2589cc7/66072fb51b89448912e26729_image16.jpeg" - }, - "variantPrice": {"unit": "USD", "value": "5892", "string": "$ 83.09 USD"}, - "weight": 5, - "width": 19, - "height": 72, - "length": 18, - }, - ], - "purchasedItemsCount": 3, - "stripeDetails": { - "subscriptionId": "sub_1J6xwG2eZvKYlo2CXu9Zt0Tn", - "paymentMethod": "pm_1P410gJYFi4lcbXWbeKghqjK", - "paymentIntentId": "pi_3P410iJYFi4lcbXW0EKKgcVg", - "customerId": "cus_Ptod8KJBiiPgnH", - "chargeId": "ch_3P410iJYFi4lcbXW0DxUkzCH", - "refundReason": "requested_by_customer", - }, - "stripeCard": { - "last4": "4242", - "brand": "Visa", - "ownerName": "Arthur Dent", - "expires": {"year": 2025, "month": 4}, - }, - "paypalDetails": { - "orderId": "1a2b3c4d5e6f7g8h9i0j", - "payerId": "9k8j7i6h5g4f3e2d1c0b", - "captureId": "qwe123rty456uio789p", - "refundId": "abcde12345fghij67890", - "refundReason": "Customer requested refund", - "disputeId": "zxcvbnm987poiuytrewq", - }, - "customData": [{"key": "value"}], - "metadata": {"isBuyNow": False}, - "isCustomerDeleted": False, - "isShippingRequired": False, - "hasDownloads": False, - "paymentProcessor": "stripe", - "totals": { - "extras": [ - { - "type": "tax", - "name": "State Taxes", - "description": "CA Taxes (6.25%)", - "price": {"unit": "USD", "value": "5892", "string": "$3.44"}, - } - ] - }, - "downloadFiles": [ - { - "id": "5e9a5eba75e0ac242e1b6f64", - "name": "The modern web design process - Webflow Ebook.pdf", - "url": "https://webflow.com/dashboard/download-digital-product?payload=5d93ba5e38c6b0160ab711d3;e7634a;5eb1aac72912ec06f561278c;5e9a5eba75e0ac242e1b6f63:ka2nehxy:4a1ee0a632feaab94294350087215ed89533f2f530903e3b933b638940e921aa", - } - ], - }, - { - "orderId": "fc7-128", - "status": "refunded", - "comment": "Example comment to myself", - "orderComment": "", - "acceptedOn": "2024-03-29T21:29:21Z", - "fulfilledOn": "2018-12-03T22:06:15Z", - "refundedOn": "2024-04-08T18:25:04Z", - "disputedOn": "2018-12-03T22:06:15Z", - "disputeUpdatedOn": "2018-12-03T22:06:15Z", - "disputeLastStatus": "warning_needs_response", - "customerPaid": {"unit": "USD", "value": "5892", "string": "$ 118.73 USD"}, - "netAmount": {"unit": "USD", "value": "5892", "string": "$ 112.62 USD"}, - "applicationFee": {"unit": "USD", "value": "5892", "string": "$ 2.37 USD"}, - "allAddresses": [ - { - "type": "billing", - "addressee": "Arthur Dent", - "line1": "20 W 34th St", - "line2": "Empire State Building", - "city": "New York", - "state": "New York", - "country": "US", - "postalCode": "10118", - }, - { - "type": "shipping", - "addressee": "Arthur Dent", - "line1": "20 W 34th St", - "line2": "Empire State Building", - "city": "New York", - "state": "New York", - "country": "US", - "postalCode": "10118", - }, - ], - "shippingAddress": { - "type": "shipping", - "addressee": "Arthur Dent", - "line1": "20 W 34th St", - "line2": "Empire State Building", - "city": "New York", - "state": "New York", - "country": "US", - "postalCode": "10118", - }, - "billingAddress": { - "type": "billing", - "addressee": "Arthur Dent", - "line1": "20 W 34th St", - "line2": "Empire State Building", - "city": "New York", - "state": "New York", - "country": "US", - "postalCode": "10118", - }, - "shippingProvider": "Shipping Company, Co.", - "shippingTracking": "tr00000000001", - "shippingTrackingURL": "https://www.shippingcompany.com/tracking/tr00000000001", - "customerInfo": {"fullName": "Arthur Dent", "email": "arthur.dent@example.com"}, - "purchasedItems": [ - { - "count": 1, - "rowTotal": {"unit": "USD", "value": "5892", "string": "$ 55.61 USD"}, - "productId": "66072fb61b89448912e26791", - "productName": "Luxurious Fresh Ball", - "productSlug": "luxurious-fresh-ball", - "variantId": "66072fb71b89448912e2683f", - "variantName": "Luxurious Fresh Ball Generic: Bronze, Practical: Plastic", - "variantSlug": "luxurious-fresh-ball-generic-bronze-practical-plastic", - "variantSKU": "luxurious-fresh-ball-generic-bronze-practical-plastic", - "variantImage": { - "url": "https://dev-assets.website-files.com/66072f39417a2a35b2589cc7/66072fb51b89448912e2672c_image14.jpeg" - }, - "variantPrice": {"unit": "USD", "value": "5892", "string": "$ 55.61 USD"}, - "weight": 11, - "width": 82, - "height": 70, - "length": 9, - }, - { - "count": 1, - "rowTotal": {"unit": "USD", "value": "5892", "string": "$ 53.44 USD"}, - "productId": "66072fb61b89448912e26799", - "productName": "Recycled Steel Gloves", - "productSlug": "recycled-steel-gloves", - "variantId": "66072fb91b89448912e26ab9", - "variantName": "Recycled Steel Gloves Electronic: Granite, Handcrafted: grey", - "variantSlug": "recycled-steel-gloves-electronic-granite-handcrafted-grey", - "variantSKU": "recycled-steel-gloves-electronic-granite-handcrafted-grey", - "variantImage": { - "url": "https://dev-assets.website-files.com/66072f39417a2a35b2589cc7/66072fb51b89448912e2671e_image2.jpeg" - }, - "variantPrice": {"unit": "USD", "value": "5892", "string": "$ 53.44 USD"}, - "weight": 38, - "width": 76, - "height": 85, - "length": 40, - }, - ], - "purchasedItemsCount": 2, - "stripeDetails": { - "subscriptionId": "sub_1J6xwG2eZvKYlo2CXu9Zt0Tn", - "paymentMethod": "pm_1OzmzBJYFi4lcbXWHKNdXU7j", - "paymentIntentId": "pi_3OzmzDJYFi4lcbXW1hTBW6ft", - "customerId": "cus_PpRsNHwWdUoRKR", - "chargeId": "ch_3OzmzDJYFi4lcbXW1ndkkrH2", - "refundId": "re_3OzmzDJYFi4lcbXW1kFAmlBk", - "refundReason": "fraudulent", - }, - "stripeCard": { - "last4": "4242", - "brand": "Visa", - "ownerName": "Arthur Dent", - "expires": {"year": 2024, "month": 4}, - }, - "paypalDetails": { - "orderId": "1a2b3c4d5e6f7g8h9i0j", - "payerId": "9k8j7i6h5g4f3e2d1c0b", - "captureId": "qwe123rty456uio789p", - "refundId": "abcde12345fghij67890", - "refundReason": "Customer requested refund", - "disputeId": "zxcvbnm987poiuytrewq", - }, - "customData": [{"key": "value"}], - "metadata": {"isBuyNow": False}, - "isCustomerDeleted": False, - "isShippingRequired": True, - "hasDownloads": False, - "paymentProcessor": "stripe", - "totals": { - "subtotal": {"unit": "USD", "value": "5892", "string": "$ 109.05 USD"}, - "extras": [ - { - "type": "tax", - "name": "State Taxes", - "description": "NY Taxes (4.00%)", - "price": {"unit": "USD", "value": "5892", "string": "$ 4.36 USD"}, - }, - { - "type": "tax", - "name": "City Taxes", - "description": "NEW YORK Taxes (4.88%)", - "price": {"unit": "USD", "value": "5892", "string": "$ 5.32 USD"}, - }, - { - "type": "shipping", - "name": "Flat", - "description": "", - "price": {"unit": "USD", "value": "5892", "string": "$ 0.00 USD"}, - }, - ], - "total": {"unit": "USD", "value": "5892", "string": "$ 118.73 USD"}, - }, - "downloadFiles": [ - { - "id": "5e9a5eba75e0ac242e1b6f64", - "name": "New product guide", - "url": "https://webflow.com/dashboard/download-digital-product?payload=5d93ba5e38c6b0160ab711d3;e7634a;5eb1aac72912ec06f561278c;5e9a5eba75e0ac242e1b6f63:ka2nehxy:4a1ee0a632feaab94294350087215ed89533f2f530903e3b933b638940e921aa", - } - ], - }, - ], - "pagination": {"limit": 100, "offset": 0, "total": 2}, - } - expected_types: typing.Any = { - "orders": ( - "list", - { - 0: { - "orderId": None, - "status": None, - "comment": None, - "orderComment": None, - "acceptedOn": "datetime", - "fulfilledOn": "datetime", - "refundedOn": "datetime", - "disputedOn": "datetime", - "disputeUpdatedOn": "datetime", - "disputeLastStatus": None, - "customerPaid": {"unit": None, "value": None, "string": None}, - "netAmount": {"unit": None, "value": None, "string": None}, - "applicationFee": {"unit": None, "value": None, "string": None}, - "allAddresses": ( - "list", - { - 0: { - "type": None, - "addressee": None, - "line1": None, - "line2": None, - "city": None, - "state": None, - "country": None, - "postalCode": None, - }, - 1: { - "type": None, - "addressee": None, - "line1": None, - "line2": None, - "city": None, - "state": None, - "country": None, - "postalCode": None, - }, - }, - ), - "shippingAddress": { - "type": None, - "japanType": None, - "addressee": None, - "line1": None, - "line2": None, - "city": None, - "state": None, - "country": None, - "postalCode": None, - }, - "billingAddress": { - "type": None, - "addressee": None, - "line1": None, - "line2": None, - "city": None, - "state": None, - "country": None, - "postalCode": None, - }, - "shippingProvider": None, - "shippingTracking": None, - "shippingTrackingURL": None, - "customerInfo": {"fullName": None, "email": None}, - "purchasedItems": ( - "list", - { - 0: { - "count": None, - "rowTotal": {"unit": None, "value": None, "string": None}, - "productId": None, - "productName": None, - "productSlug": None, - "variantId": None, - "variantName": None, - "variantSlug": None, - "variantSKU": None, - "variantImage": {"url": None}, - "variantPrice": {"unit": None, "value": None, "string": None}, - "weight": None, - "width": None, - "height": None, - "length": None, - }, - 1: { - "count": None, - "rowTotal": {"unit": None, "value": None, "string": None}, - "productId": None, - "productName": None, - "productSlug": None, - "variantId": None, - "variantName": None, - "variantSlug": None, - "variantSKU": None, - "variantImage": {"url": None}, - "variantPrice": {"unit": None, "value": None, "string": None}, - "weight": None, - "width": None, - "height": None, - "length": None, - }, - }, - ), - "purchasedItemsCount": None, - "stripeDetails": { - "subscriptionId": None, - "paymentMethod": None, - "paymentIntentId": None, - "customerId": None, - "chargeId": None, - "refundReason": None, - }, - "stripeCard": { - "last4": None, - "brand": None, - "ownerName": None, - "expires": {"year": None, "month": None}, - }, - "paypalDetails": { - "orderId": None, - "payerId": None, - "captureId": None, - "refundId": None, - "refundReason": None, - "disputeId": None, - }, - "customData": ("list", {0: ("dict", {0: (None, None)})}), - "metadata": {"isBuyNow": None}, - "isCustomerDeleted": None, - "isShippingRequired": None, - "hasDownloads": None, - "paymentProcessor": None, - "totals": { - "extras": ( - "list", - { - 0: { - "type": None, - "name": None, - "description": None, - "price": {"unit": None, "value": None, "string": None}, - } - }, - ) - }, - "downloadFiles": ("list", {0: {"id": None, "name": None, "url": None}}), - }, - 1: { - "orderId": None, - "status": None, - "comment": None, - "orderComment": None, - "acceptedOn": "datetime", - "fulfilledOn": "datetime", - "refundedOn": "datetime", - "disputedOn": "datetime", - "disputeUpdatedOn": "datetime", - "disputeLastStatus": None, - "customerPaid": {"unit": None, "value": None, "string": None}, - "netAmount": {"unit": None, "value": None, "string": None}, - "applicationFee": {"unit": None, "value": None, "string": None}, - "allAddresses": ( - "list", - { - 0: { - "type": None, - "addressee": None, - "line1": None, - "line2": None, - "city": None, - "state": None, - "country": None, - "postalCode": None, - }, - 1: { - "type": None, - "addressee": None, - "line1": None, - "line2": None, - "city": None, - "state": None, - "country": None, - "postalCode": None, - }, - }, - ), - "shippingAddress": { - "type": None, - "addressee": None, - "line1": None, - "line2": None, - "city": None, - "state": None, - "country": None, - "postalCode": None, - }, - "billingAddress": { - "type": None, - "addressee": None, - "line1": None, - "line2": None, - "city": None, - "state": None, - "country": None, - "postalCode": None, - }, - "shippingProvider": None, - "shippingTracking": None, - "shippingTrackingURL": None, - "customerInfo": {"fullName": None, "email": None}, - "purchasedItems": ( - "list", - { - 0: { - "count": None, - "rowTotal": {"unit": None, "value": None, "string": None}, - "productId": None, - "productName": None, - "productSlug": None, - "variantId": None, - "variantName": None, - "variantSlug": None, - "variantSKU": None, - "variantImage": {"url": None}, - "variantPrice": {"unit": None, "value": None, "string": None}, - "weight": None, - "width": None, - "height": None, - "length": None, - }, - 1: { - "count": None, - "rowTotal": {"unit": None, "value": None, "string": None}, - "productId": None, - "productName": None, - "productSlug": None, - "variantId": None, - "variantName": None, - "variantSlug": None, - "variantSKU": None, - "variantImage": {"url": None}, - "variantPrice": {"unit": None, "value": None, "string": None}, - "weight": None, - "width": None, - "height": None, - "length": None, - }, - }, - ), - "purchasedItemsCount": None, - "stripeDetails": { - "subscriptionId": None, - "paymentMethod": None, - "paymentIntentId": None, - "customerId": None, - "chargeId": None, - "refundId": None, - "refundReason": None, - }, - "stripeCard": { - "last4": None, - "brand": None, - "ownerName": None, - "expires": {"year": None, "month": None}, - }, - "paypalDetails": { - "orderId": None, - "payerId": None, - "captureId": None, - "refundId": None, - "refundReason": None, - "disputeId": None, - }, - "customData": ("list", {0: ("dict", {0: (None, None)})}), - "metadata": {"isBuyNow": None}, - "isCustomerDeleted": None, - "isShippingRequired": None, - "hasDownloads": None, - "paymentProcessor": None, - "totals": { - "subtotal": {"unit": None, "value": None, "string": None}, - "extras": ( - "list", - { - 0: { - "type": None, - "name": None, - "description": None, - "price": {"unit": None, "value": None, "string": None}, - }, - 1: { - "type": None, - "name": None, - "description": None, - "price": {"unit": None, "value": None, "string": None}, - }, - 2: { - "type": None, - "name": None, - "description": None, - "price": {"unit": None, "value": None, "string": None}, - }, - }, - ), - "total": {"unit": None, "value": None, "string": None}, - }, - "downloadFiles": ("list", {0: {"id": None, "name": None, "url": None}}), - }, - }, - ), - "pagination": {"limit": "integer", "offset": "integer", "total": "integer"}, - } - response = client.orders.list(site_id="580e63e98c9a982ac9b8b741", status="pending", offset=1, limit=1) - validate_response(response, expected_response, expected_types) - - async_response = await async_client.orders.list( - site_id="580e63e98c9a982ac9b8b741", status="pending", offset=1, limit=1 - ) - validate_response(async_response, expected_response, expected_types) - - -async def test_get(client: Webflow, async_client: AsyncWebflow) -> None: - expected_response: typing.Any = { - "orderId": "fc7-128", - "status": "refunded", - "comment": "Customer requested gift wrapping and a personalized note saying: Happy Birthday, Ford! 🎉 Please ensure the item is packed with extra bubble wrap for safe transit.", - "orderComment": 'Please gift wrap with a personal note saying "Happy Birthday, Ford! 🎉', - "acceptedOn": "2024-03-29T21:29:21Z", - "fulfilledOn": "2024-03-29T21:29:21Z", - "refundedOn": "2024-04-08T18:25:04Z", - "disputedOn": "2024-03-29T21:29:21Z", - "disputeUpdatedOn": "2024-03-29T21:29:21Z", - "disputeLastStatus": "charge_refunded", - "customerPaid": {"unit": "USD", "value": "5892", "string": "$ 118.73 USD"}, - "netAmount": {"unit": "USD", "value": "5892", "string": "$ 112.62 USD"}, - "applicationFee": {"unit": "USD", "value": "5892", "string": "$ 2.37 USD"}, - "allAddresses": [ - { - "type": "billing", - "japanType": "kana", - "addressee": "Arthur Dent", - "line1": "20 W 34th St", - "line2": "Empire State Building", - "city": "New York", - "state": "New York", - "country": "US", - "postalCode": "10118", - }, - { - "type": "shipping", - "japanType": "kana", - "addressee": "Arthur Dent", - "line1": "20 W 34th St", - "line2": "Empire State Building", - "city": "New York", - "state": "New York", - "country": "US", - "postalCode": "10118", - }, - ], - "shippingAddress": { - "type": "shipping", - "japanType": "kanji", - "addressee": "Arthur Dent", - "line1": "20 W 34th St", - "line2": "Empire State Building", - "city": "New York", - "state": "New York", - "country": "US", - "postalCode": "10118", - }, - "billingAddress": { - "type": "billing", - "japanType": "kana", - "addressee": "Arthur Dent", - "line1": "20 W 34th St", - "line2": "Empire State Building", - "city": "New York", - "state": "New York", - "country": "US", - "postalCode": "10118", - }, - "shippingProvider": "Shipping Company, Co.", - "shippingTracking": "tr00000000001", - "shippingTrackingURL": "https://www.shippingcompany.com/tracking/tr00000000001", - "customerInfo": {"fullName": "Arthur Dent", "email": "arthur.dent@example.com"}, - "purchasedItems": [ - { - "count": 1, - "rowTotal": {"unit": "USD", "value": "5892", "string": "$ 55.61 USD"}, - "productId": "66072fb61b89448912e26791", - "productName": "Luxurious Fresh Ball", - "productSlug": "luxurious-fresh-ball", - "variantId": "66072fb71b89448912e2683f", - "variantName": "Luxurious Fresh Ball Generic: Bronze, Practical: Plastic", - "variantSlug": "luxurious-fresh-ball-generic-bronze-practical-plastic", - "variantSKU": "luxurious-fresh-ball-generic-bronze-practical-plastic", - "variantImage": { - "url": "https://dev-assets.website-files.com/66072f39417a2a35b2589cc7/66072fb51b89448912e2672c_image14.jpeg" - }, - "variantPrice": {"unit": "USD", "value": "5892", "string": "$ 55.61 USD"}, - "weight": 11, - "width": 82, - "height": 70, - "length": 9, - }, - { - "count": 1, - "rowTotal": {"unit": "USD", "value": "5892", "string": "$ 53.44 USD"}, - "productId": "66072fb61b89448912e26799", - "productName": "Recycled Steel Gloves", - "productSlug": "recycled-steel-gloves", - "variantId": "66072fb91b89448912e26ab9", - "variantName": "Recycled Steel Gloves Electronic: Granite, Handcrafted: grey", - "variantSlug": "recycled-steel-gloves-electronic-granite-handcrafted-grey", - "variantSKU": "recycled-steel-gloves-electronic-granite-handcrafted-grey", - "variantImage": { - "url": "https://dev-assets.website-files.com/66072f39417a2a35b2589cc7/66072fb51b89448912e2671e_image2.jpeg" - }, - "variantPrice": {"unit": "USD", "value": "5892", "string": "$ 53.44 USD"}, - "weight": 38, - "width": 76, - "height": 85, - "length": 40, - }, - ], - "purchasedItemsCount": 2, - "stripeDetails": { - "subscriptionId": "sub_1J6xwG2eZvKYlo2CXu9Zt0Tn", - "paymentMethod": "pm_1OzmzBJYFi4lcbXWHKNdXU7j", - "paymentIntentId": "pi_3OzmzDJYFi4lcbXW1hTBW6ft", - "customerId": "cus_PpRsNHwWdUoRKR", - "chargeId": "ch_3OzmzDJYFi4lcbXW1ndkkrH2", - "disputeId": "disputeId", - "refundId": "re_3OzmzDJYFi4lcbXW1kFAmlBk", - "refundReason": "fraudulent", - }, - "stripeCard": { - "last4": "4242", - "brand": "Visa", - "ownerName": "Arthur Dent", - "expires": {"year": 2024, "month": 4}, - }, - "paypalDetails": { - "orderId": "1a2b3c4d5e6f7g8h9i0j", - "payerId": "9k8j7i6h5g4f3e2d1c0b", - "captureId": "qwe123rty456uio789p", - "refundId": "abcde12345fghij67890", - "refundReason": "Customer requested refund", - "disputeId": "zxcvbnm987poiuytrewq", - }, - "customData": [{"key": "value"}], - "metadata": {"isBuyNow": False}, - "isCustomerDeleted": False, - "isShippingRequired": True, - "hasDownloads": False, - "paymentProcessor": "stripe", - "totals": { - "subtotal": {"unit": "USD", "value": "5892", "string": "$ 109.05 USD"}, - "extras": [ - { - "type": "tax", - "name": "State Taxes", - "description": "NY Taxes (4.00%)", - "price": {"unit": "USD", "value": "5892", "string": "$ 4.36 USD"}, - }, - { - "type": "tax", - "name": "City Taxes", - "description": "NEW YORK Taxes (4.88%)", - "price": {"unit": "USD", "value": "5892", "string": "$ 5.32 USD"}, - }, - { - "type": "shipping", - "name": "Flat", - "description": "", - "price": {"unit": "USD", "value": "5892", "string": "$ 0.00 USD"}, - }, - ], - "total": {"unit": "USD", "value": "5892", "string": "$ 118.73 USD"}, - }, - "downloadFiles": [ - { - "id": "5e9a5eba75e0ac242e1b6f64", - "name": "New product guide", - "url": "https://webflow.com/dashboard/download-digital-product?payload=5d93ba5e38c6b0160ab711d3;e7634a;5eb1aac72912ec06f561278c;5e9a5eba75e0ac242e1b6f63:ka2nehxy:4a1ee0a632feaab94294350087215ed89533f2f530903e3b933b638940e921aa", - } - ], - } - expected_types: typing.Any = { - "orderId": None, - "status": None, - "comment": None, - "orderComment": None, - "acceptedOn": "datetime", - "fulfilledOn": "datetime", - "refundedOn": "datetime", - "disputedOn": "datetime", - "disputeUpdatedOn": "datetime", - "disputeLastStatus": None, - "customerPaid": {"unit": None, "value": None, "string": None}, - "netAmount": {"unit": None, "value": None, "string": None}, - "applicationFee": {"unit": None, "value": None, "string": None}, - "allAddresses": ( - "list", - { - 0: { - "type": None, - "japanType": None, - "addressee": None, - "line1": None, - "line2": None, - "city": None, - "state": None, - "country": None, - "postalCode": None, - }, - 1: { - "type": None, - "japanType": None, - "addressee": None, - "line1": None, - "line2": None, - "city": None, - "state": None, - "country": None, - "postalCode": None, - }, - }, - ), - "shippingAddress": { - "type": None, - "japanType": None, - "addressee": None, - "line1": None, - "line2": None, - "city": None, - "state": None, - "country": None, - "postalCode": None, - }, - "billingAddress": { - "type": None, - "japanType": None, - "addressee": None, - "line1": None, - "line2": None, - "city": None, - "state": None, - "country": None, - "postalCode": None, - }, - "shippingProvider": None, - "shippingTracking": None, - "shippingTrackingURL": None, - "customerInfo": {"fullName": None, "email": None}, - "purchasedItems": ( - "list", - { - 0: { - "count": None, - "rowTotal": {"unit": None, "value": None, "string": None}, - "productId": None, - "productName": None, - "productSlug": None, - "variantId": None, - "variantName": None, - "variantSlug": None, - "variantSKU": None, - "variantImage": {"url": None}, - "variantPrice": {"unit": None, "value": None, "string": None}, - "weight": None, - "width": None, - "height": None, - "length": None, - }, - 1: { - "count": None, - "rowTotal": {"unit": None, "value": None, "string": None}, - "productId": None, - "productName": None, - "productSlug": None, - "variantId": None, - "variantName": None, - "variantSlug": None, - "variantSKU": None, - "variantImage": {"url": None}, - "variantPrice": {"unit": None, "value": None, "string": None}, - "weight": None, - "width": None, - "height": None, - "length": None, - }, - }, - ), - "purchasedItemsCount": None, - "stripeDetails": { - "subscriptionId": None, - "paymentMethod": None, - "paymentIntentId": None, - "customerId": None, - "chargeId": None, - "disputeId": None, - "refundId": None, - "refundReason": None, - }, - "stripeCard": {"last4": None, "brand": None, "ownerName": None, "expires": {"year": None, "month": None}}, - "paypalDetails": { - "orderId": None, - "payerId": None, - "captureId": None, - "refundId": None, - "refundReason": None, - "disputeId": None, - }, - "customData": ("list", {0: ("dict", {0: (None, None)})}), - "metadata": {"isBuyNow": None}, - "isCustomerDeleted": None, - "isShippingRequired": None, - "hasDownloads": None, - "paymentProcessor": None, - "totals": { - "subtotal": {"unit": None, "value": None, "string": None}, - "extras": ( - "list", - { - 0: { - "type": None, - "name": None, - "description": None, - "price": {"unit": None, "value": None, "string": None}, - }, - 1: { - "type": None, - "name": None, - "description": None, - "price": {"unit": None, "value": None, "string": None}, - }, - 2: { - "type": None, - "name": None, - "description": None, - "price": {"unit": None, "value": None, "string": None}, - }, - }, - ), - "total": {"unit": None, "value": None, "string": None}, - }, - "downloadFiles": ("list", {0: {"id": None, "name": None, "url": None}}), - } - response = client.orders.get(site_id="580e63e98c9a982ac9b8b741", order_id="5e8518516e147040726cc415") - validate_response(response, expected_response, expected_types) - - async_response = await async_client.orders.get( - site_id="580e63e98c9a982ac9b8b741", order_id="5e8518516e147040726cc415" - ) - validate_response(async_response, expected_response, expected_types) - - -async def test_update(client: Webflow, async_client: AsyncWebflow) -> None: - expected_response: typing.Any = { - "orderId": "fc7-128", - "status": "refunded", - "comment": "Customer requested gift wrapping and a personalized note saying: Happy Birthday, Ford! 🎉 Please ensure the item is packed with extra bubble wrap for safe transit.", - "orderComment": 'Please gift wrap with a personal note saying "Happy Birthday, Ford! 🎉', - "acceptedOn": "2024-03-29T21:29:21Z", - "fulfilledOn": "2024-03-29T21:29:21Z", - "refundedOn": "2024-04-08T18:25:04Z", - "disputedOn": "2024-03-29T21:29:21Z", - "disputeUpdatedOn": "2024-03-29T21:29:21Z", - "disputeLastStatus": "charge_refunded", - "customerPaid": {"unit": "USD", "value": "5892", "string": "$ 118.73 USD"}, - "netAmount": {"unit": "USD", "value": "5892", "string": "$ 112.62 USD"}, - "applicationFee": {"unit": "USD", "value": "5892", "string": "$ 2.37 USD"}, - "allAddresses": [ - { - "type": "billing", - "japanType": "kana", - "addressee": "Arthur Dent", - "line1": "20 W 34th St", - "line2": "Empire State Building", - "city": "New York", - "state": "New York", - "country": "US", - "postalCode": "10118", - }, - { - "type": "shipping", - "japanType": "kana", - "addressee": "Arthur Dent", - "line1": "20 W 34th St", - "line2": "Empire State Building", - "city": "New York", - "state": "New York", - "country": "US", - "postalCode": "10118", - }, - ], - "shippingAddress": { - "type": "shipping", - "japanType": "kanji", - "addressee": "Arthur Dent", - "line1": "20 W 34th St", - "line2": "Empire State Building", - "city": "New York", - "state": "New York", - "country": "US", - "postalCode": "10118", - }, - "billingAddress": { - "type": "billing", - "japanType": "kana", - "addressee": "Arthur Dent", - "line1": "20 W 34th St", - "line2": "Empire State Building", - "city": "New York", - "state": "New York", - "country": "US", - "postalCode": "10118", - }, - "shippingProvider": "Shipping Company, Co.", - "shippingTracking": "tr00000000001", - "shippingTrackingURL": "https://www.shippingcompany.com/tracking/tr00000000001", - "customerInfo": {"fullName": "Arthur Dent", "email": "arthur.dent@example.com"}, - "purchasedItems": [ - { - "count": 1, - "rowTotal": {"unit": "USD", "value": "5892", "string": "$ 55.61 USD"}, - "productId": "66072fb61b89448912e26791", - "productName": "Luxurious Fresh Ball", - "productSlug": "luxurious-fresh-ball", - "variantId": "66072fb71b89448912e2683f", - "variantName": "Luxurious Fresh Ball Generic: Bronze, Practical: Plastic", - "variantSlug": "luxurious-fresh-ball-generic-bronze-practical-plastic", - "variantSKU": "luxurious-fresh-ball-generic-bronze-practical-plastic", - "variantImage": { - "url": "https://dev-assets.website-files.com/66072f39417a2a35b2589cc7/66072fb51b89448912e2672c_image14.jpeg" - }, - "variantPrice": {"unit": "USD", "value": "5892", "string": "$ 55.61 USD"}, - "weight": 11, - "width": 82, - "height": 70, - "length": 9, - }, - { - "count": 1, - "rowTotal": {"unit": "USD", "value": "5892", "string": "$ 53.44 USD"}, - "productId": "66072fb61b89448912e26799", - "productName": "Recycled Steel Gloves", - "productSlug": "recycled-steel-gloves", - "variantId": "66072fb91b89448912e26ab9", - "variantName": "Recycled Steel Gloves Electronic: Granite, Handcrafted: grey", - "variantSlug": "recycled-steel-gloves-electronic-granite-handcrafted-grey", - "variantSKU": "recycled-steel-gloves-electronic-granite-handcrafted-grey", - "variantImage": { - "url": "https://dev-assets.website-files.com/66072f39417a2a35b2589cc7/66072fb51b89448912e2671e_image2.jpeg" - }, - "variantPrice": {"unit": "USD", "value": "5892", "string": "$ 53.44 USD"}, - "weight": 38, - "width": 76, - "height": 85, - "length": 40, - }, - ], - "purchasedItemsCount": 2, - "stripeDetails": { - "subscriptionId": "sub_1J6xwG2eZvKYlo2CXu9Zt0Tn", - "paymentMethod": "pm_1OzmzBJYFi4lcbXWHKNdXU7j", - "paymentIntentId": "pi_3OzmzDJYFi4lcbXW1hTBW6ft", - "customerId": "cus_PpRsNHwWdUoRKR", - "chargeId": "ch_3OzmzDJYFi4lcbXW1ndkkrH2", - "disputeId": "disputeId", - "refundId": "re_3OzmzDJYFi4lcbXW1kFAmlBk", - "refundReason": "fraudulent", - }, - "stripeCard": { - "last4": "4242", - "brand": "Visa", - "ownerName": "Arthur Dent", - "expires": {"year": 2024, "month": 4}, - }, - "paypalDetails": { - "orderId": "1a2b3c4d5e6f7g8h9i0j", - "payerId": "9k8j7i6h5g4f3e2d1c0b", - "captureId": "qwe123rty456uio789p", - "refundId": "abcde12345fghij67890", - "refundReason": "Customer requested refund", - "disputeId": "zxcvbnm987poiuytrewq", - }, - "customData": [{"key": "value"}], - "metadata": {"isBuyNow": False}, - "isCustomerDeleted": False, - "isShippingRequired": True, - "hasDownloads": False, - "paymentProcessor": "stripe", - "totals": { - "subtotal": {"unit": "USD", "value": "5892", "string": "$ 109.05 USD"}, - "extras": [ - { - "type": "tax", - "name": "State Taxes", - "description": "NY Taxes (4.00%)", - "price": {"unit": "USD", "value": "5892", "string": "$ 4.36 USD"}, - }, - { - "type": "tax", - "name": "City Taxes", - "description": "NEW YORK Taxes (4.88%)", - "price": {"unit": "USD", "value": "5892", "string": "$ 5.32 USD"}, - }, - { - "type": "shipping", - "name": "Flat", - "description": "", - "price": {"unit": "USD", "value": "5892", "string": "$ 0.00 USD"}, - }, - ], - "total": {"unit": "USD", "value": "5892", "string": "$ 118.73 USD"}, - }, - "downloadFiles": [ - { - "id": "5e9a5eba75e0ac242e1b6f64", - "name": "New product guide", - "url": "https://webflow.com/dashboard/download-digital-product?payload=5d93ba5e38c6b0160ab711d3;e7634a;5eb1aac72912ec06f561278c;5e9a5eba75e0ac242e1b6f63:ka2nehxy:4a1ee0a632feaab94294350087215ed89533f2f530903e3b933b638940e921aa", - } - ], - } - expected_types: typing.Any = { - "orderId": None, - "status": None, - "comment": None, - "orderComment": None, - "acceptedOn": "datetime", - "fulfilledOn": "datetime", - "refundedOn": "datetime", - "disputedOn": "datetime", - "disputeUpdatedOn": "datetime", - "disputeLastStatus": None, - "customerPaid": {"unit": None, "value": None, "string": None}, - "netAmount": {"unit": None, "value": None, "string": None}, - "applicationFee": {"unit": None, "value": None, "string": None}, - "allAddresses": ( - "list", - { - 0: { - "type": None, - "japanType": None, - "addressee": None, - "line1": None, - "line2": None, - "city": None, - "state": None, - "country": None, - "postalCode": None, - }, - 1: { - "type": None, - "japanType": None, - "addressee": None, - "line1": None, - "line2": None, - "city": None, - "state": None, - "country": None, - "postalCode": None, - }, - }, - ), - "shippingAddress": { - "type": None, - "japanType": None, - "addressee": None, - "line1": None, - "line2": None, - "city": None, - "state": None, - "country": None, - "postalCode": None, - }, - "billingAddress": { - "type": None, - "japanType": None, - "addressee": None, - "line1": None, - "line2": None, - "city": None, - "state": None, - "country": None, - "postalCode": None, - }, - "shippingProvider": None, - "shippingTracking": None, - "shippingTrackingURL": None, - "customerInfo": {"fullName": None, "email": None}, - "purchasedItems": ( - "list", - { - 0: { - "count": None, - "rowTotal": {"unit": None, "value": None, "string": None}, - "productId": None, - "productName": None, - "productSlug": None, - "variantId": None, - "variantName": None, - "variantSlug": None, - "variantSKU": None, - "variantImage": {"url": None}, - "variantPrice": {"unit": None, "value": None, "string": None}, - "weight": None, - "width": None, - "height": None, - "length": None, - }, - 1: { - "count": None, - "rowTotal": {"unit": None, "value": None, "string": None}, - "productId": None, - "productName": None, - "productSlug": None, - "variantId": None, - "variantName": None, - "variantSlug": None, - "variantSKU": None, - "variantImage": {"url": None}, - "variantPrice": {"unit": None, "value": None, "string": None}, - "weight": None, - "width": None, - "height": None, - "length": None, - }, - }, - ), - "purchasedItemsCount": None, - "stripeDetails": { - "subscriptionId": None, - "paymentMethod": None, - "paymentIntentId": None, - "customerId": None, - "chargeId": None, - "disputeId": None, - "refundId": None, - "refundReason": None, - }, - "stripeCard": {"last4": None, "brand": None, "ownerName": None, "expires": {"year": None, "month": None}}, - "paypalDetails": { - "orderId": None, - "payerId": None, - "captureId": None, - "refundId": None, - "refundReason": None, - "disputeId": None, - }, - "customData": ("list", {0: ("dict", {0: (None, None)})}), - "metadata": {"isBuyNow": None}, - "isCustomerDeleted": None, - "isShippingRequired": None, - "hasDownloads": None, - "paymentProcessor": None, - "totals": { - "subtotal": {"unit": None, "value": None, "string": None}, - "extras": ( - "list", - { - 0: { - "type": None, - "name": None, - "description": None, - "price": {"unit": None, "value": None, "string": None}, - }, - 1: { - "type": None, - "name": None, - "description": None, - "price": {"unit": None, "value": None, "string": None}, - }, - 2: { - "type": None, - "name": None, - "description": None, - "price": {"unit": None, "value": None, "string": None}, - }, - }, - ), - "total": {"unit": None, "value": None, "string": None}, - }, - "downloadFiles": ("list", {0: {"id": None, "name": None, "url": None}}), - } - response = client.orders.update(site_id="580e63e98c9a982ac9b8b741", order_id="5e8518516e147040726cc415") - validate_response(response, expected_response, expected_types) - - async_response = await async_client.orders.update( - site_id="580e63e98c9a982ac9b8b741", order_id="5e8518516e147040726cc415" - ) - validate_response(async_response, expected_response, expected_types) - - -async def test_update_fulfill(client: Webflow, async_client: AsyncWebflow) -> None: - expected_response: typing.Any = { - "orderId": "fc7-128", - "status": "refunded", - "comment": "Customer requested gift wrapping and a personalized note saying: Happy Birthday, Ford! 🎉 Please ensure the item is packed with extra bubble wrap for safe transit.", - "orderComment": 'Please gift wrap with a personal note saying "Happy Birthday, Ford! 🎉', - "acceptedOn": "2024-03-29T21:29:21Z", - "fulfilledOn": "2024-03-29T21:29:21Z", - "refundedOn": "2024-04-08T18:25:04Z", - "disputedOn": "2024-03-29T21:29:21Z", - "disputeUpdatedOn": "2024-03-29T21:29:21Z", - "disputeLastStatus": "charge_refunded", - "customerPaid": {"unit": "USD", "value": "5892", "string": "$ 118.73 USD"}, - "netAmount": {"unit": "USD", "value": "5892", "string": "$ 112.62 USD"}, - "applicationFee": {"unit": "USD", "value": "5892", "string": "$ 2.37 USD"}, - "allAddresses": [ - { - "type": "billing", - "japanType": "kana", - "addressee": "Arthur Dent", - "line1": "20 W 34th St", - "line2": "Empire State Building", - "city": "New York", - "state": "New York", - "country": "US", - "postalCode": "10118", - }, - { - "type": "shipping", - "japanType": "kana", - "addressee": "Arthur Dent", - "line1": "20 W 34th St", - "line2": "Empire State Building", - "city": "New York", - "state": "New York", - "country": "US", - "postalCode": "10118", - }, - ], - "shippingAddress": { - "type": "shipping", - "japanType": "kanji", - "addressee": "Arthur Dent", - "line1": "20 W 34th St", - "line2": "Empire State Building", - "city": "New York", - "state": "New York", - "country": "US", - "postalCode": "10118", - }, - "billingAddress": { - "type": "billing", - "japanType": "kana", - "addressee": "Arthur Dent", - "line1": "20 W 34th St", - "line2": "Empire State Building", - "city": "New York", - "state": "New York", - "country": "US", - "postalCode": "10118", - }, - "shippingProvider": "Shipping Company, Co.", - "shippingTracking": "tr00000000001", - "shippingTrackingURL": "https://www.shippingcompany.com/tracking/tr00000000001", - "customerInfo": {"fullName": "Arthur Dent", "email": "arthur.dent@example.com"}, - "purchasedItems": [ - { - "count": 1, - "rowTotal": {"unit": "USD", "value": "5892", "string": "$ 55.61 USD"}, - "productId": "66072fb61b89448912e26791", - "productName": "Luxurious Fresh Ball", - "productSlug": "luxurious-fresh-ball", - "variantId": "66072fb71b89448912e2683f", - "variantName": "Luxurious Fresh Ball Generic: Bronze, Practical: Plastic", - "variantSlug": "luxurious-fresh-ball-generic-bronze-practical-plastic", - "variantSKU": "luxurious-fresh-ball-generic-bronze-practical-plastic", - "variantImage": { - "url": "https://dev-assets.website-files.com/66072f39417a2a35b2589cc7/66072fb51b89448912e2672c_image14.jpeg" - }, - "variantPrice": {"unit": "USD", "value": "5892", "string": "$ 55.61 USD"}, - "weight": 11, - "width": 82, - "height": 70, - "length": 9, - }, - { - "count": 1, - "rowTotal": {"unit": "USD", "value": "5892", "string": "$ 53.44 USD"}, - "productId": "66072fb61b89448912e26799", - "productName": "Recycled Steel Gloves", - "productSlug": "recycled-steel-gloves", - "variantId": "66072fb91b89448912e26ab9", - "variantName": "Recycled Steel Gloves Electronic: Granite, Handcrafted: grey", - "variantSlug": "recycled-steel-gloves-electronic-granite-handcrafted-grey", - "variantSKU": "recycled-steel-gloves-electronic-granite-handcrafted-grey", - "variantImage": { - "url": "https://dev-assets.website-files.com/66072f39417a2a35b2589cc7/66072fb51b89448912e2671e_image2.jpeg" - }, - "variantPrice": {"unit": "USD", "value": "5892", "string": "$ 53.44 USD"}, - "weight": 38, - "width": 76, - "height": 85, - "length": 40, - }, - ], - "purchasedItemsCount": 2, - "stripeDetails": { - "subscriptionId": "sub_1J6xwG2eZvKYlo2CXu9Zt0Tn", - "paymentMethod": "pm_1OzmzBJYFi4lcbXWHKNdXU7j", - "paymentIntentId": "pi_3OzmzDJYFi4lcbXW1hTBW6ft", - "customerId": "cus_PpRsNHwWdUoRKR", - "chargeId": "ch_3OzmzDJYFi4lcbXW1ndkkrH2", - "disputeId": "disputeId", - "refundId": "re_3OzmzDJYFi4lcbXW1kFAmlBk", - "refundReason": "fraudulent", - }, - "stripeCard": { - "last4": "4242", - "brand": "Visa", - "ownerName": "Arthur Dent", - "expires": {"year": 2024, "month": 4}, - }, - "paypalDetails": { - "orderId": "1a2b3c4d5e6f7g8h9i0j", - "payerId": "9k8j7i6h5g4f3e2d1c0b", - "captureId": "qwe123rty456uio789p", - "refundId": "abcde12345fghij67890", - "refundReason": "Customer requested refund", - "disputeId": "zxcvbnm987poiuytrewq", - }, - "customData": [{"key": "value"}], - "metadata": {"isBuyNow": False}, - "isCustomerDeleted": False, - "isShippingRequired": True, - "hasDownloads": False, - "paymentProcessor": "stripe", - "totals": { - "subtotal": {"unit": "USD", "value": "5892", "string": "$ 109.05 USD"}, - "extras": [ - { - "type": "tax", - "name": "State Taxes", - "description": "NY Taxes (4.00%)", - "price": {"unit": "USD", "value": "5892", "string": "$ 4.36 USD"}, - }, - { - "type": "tax", - "name": "City Taxes", - "description": "NEW YORK Taxes (4.88%)", - "price": {"unit": "USD", "value": "5892", "string": "$ 5.32 USD"}, - }, - { - "type": "shipping", - "name": "Flat", - "description": "", - "price": {"unit": "USD", "value": "5892", "string": "$ 0.00 USD"}, - }, - ], - "total": {"unit": "USD", "value": "5892", "string": "$ 118.73 USD"}, - }, - "downloadFiles": [ - { - "id": "5e9a5eba75e0ac242e1b6f64", - "name": "New product guide", - "url": "https://webflow.com/dashboard/download-digital-product?payload=5d93ba5e38c6b0160ab711d3;e7634a;5eb1aac72912ec06f561278c;5e9a5eba75e0ac242e1b6f63:ka2nehxy:4a1ee0a632feaab94294350087215ed89533f2f530903e3b933b638940e921aa", - } - ], - } - expected_types: typing.Any = { - "orderId": None, - "status": None, - "comment": None, - "orderComment": None, - "acceptedOn": "datetime", - "fulfilledOn": "datetime", - "refundedOn": "datetime", - "disputedOn": "datetime", - "disputeUpdatedOn": "datetime", - "disputeLastStatus": None, - "customerPaid": {"unit": None, "value": None, "string": None}, - "netAmount": {"unit": None, "value": None, "string": None}, - "applicationFee": {"unit": None, "value": None, "string": None}, - "allAddresses": ( - "list", - { - 0: { - "type": None, - "japanType": None, - "addressee": None, - "line1": None, - "line2": None, - "city": None, - "state": None, - "country": None, - "postalCode": None, - }, - 1: { - "type": None, - "japanType": None, - "addressee": None, - "line1": None, - "line2": None, - "city": None, - "state": None, - "country": None, - "postalCode": None, - }, - }, - ), - "shippingAddress": { - "type": None, - "japanType": None, - "addressee": None, - "line1": None, - "line2": None, - "city": None, - "state": None, - "country": None, - "postalCode": None, - }, - "billingAddress": { - "type": None, - "japanType": None, - "addressee": None, - "line1": None, - "line2": None, - "city": None, - "state": None, - "country": None, - "postalCode": None, - }, - "shippingProvider": None, - "shippingTracking": None, - "shippingTrackingURL": None, - "customerInfo": {"fullName": None, "email": None}, - "purchasedItems": ( - "list", - { - 0: { - "count": None, - "rowTotal": {"unit": None, "value": None, "string": None}, - "productId": None, - "productName": None, - "productSlug": None, - "variantId": None, - "variantName": None, - "variantSlug": None, - "variantSKU": None, - "variantImage": {"url": None}, - "variantPrice": {"unit": None, "value": None, "string": None}, - "weight": None, - "width": None, - "height": None, - "length": None, - }, - 1: { - "count": None, - "rowTotal": {"unit": None, "value": None, "string": None}, - "productId": None, - "productName": None, - "productSlug": None, - "variantId": None, - "variantName": None, - "variantSlug": None, - "variantSKU": None, - "variantImage": {"url": None}, - "variantPrice": {"unit": None, "value": None, "string": None}, - "weight": None, - "width": None, - "height": None, - "length": None, - }, - }, - ), - "purchasedItemsCount": None, - "stripeDetails": { - "subscriptionId": None, - "paymentMethod": None, - "paymentIntentId": None, - "customerId": None, - "chargeId": None, - "disputeId": None, - "refundId": None, - "refundReason": None, - }, - "stripeCard": {"last4": None, "brand": None, "ownerName": None, "expires": {"year": None, "month": None}}, - "paypalDetails": { - "orderId": None, - "payerId": None, - "captureId": None, - "refundId": None, - "refundReason": None, - "disputeId": None, - }, - "customData": ("list", {0: ("dict", {0: (None, None)})}), - "metadata": {"isBuyNow": None}, - "isCustomerDeleted": None, - "isShippingRequired": None, - "hasDownloads": None, - "paymentProcessor": None, - "totals": { - "subtotal": {"unit": None, "value": None, "string": None}, - "extras": ( - "list", - { - 0: { - "type": None, - "name": None, - "description": None, - "price": {"unit": None, "value": None, "string": None}, - }, - 1: { - "type": None, - "name": None, - "description": None, - "price": {"unit": None, "value": None, "string": None}, - }, - 2: { - "type": None, - "name": None, - "description": None, - "price": {"unit": None, "value": None, "string": None}, - }, - }, - ), - "total": {"unit": None, "value": None, "string": None}, - }, - "downloadFiles": ("list", {0: {"id": None, "name": None, "url": None}}), - } - response = client.orders.update_fulfill(site_id="580e63e98c9a982ac9b8b741", order_id="5e8518516e147040726cc415") - validate_response(response, expected_response, expected_types) - - async_response = await async_client.orders.update_fulfill( - site_id="580e63e98c9a982ac9b8b741", order_id="5e8518516e147040726cc415" - ) - validate_response(async_response, expected_response, expected_types) - - -async def test_update_unfulfill(client: Webflow, async_client: AsyncWebflow) -> None: - expected_response: typing.Any = { - "orderId": "fc7-128", - "status": "refunded", - "comment": "Customer requested gift wrapping and a personalized note saying: Happy Birthday, Ford! 🎉 Please ensure the item is packed with extra bubble wrap for safe transit.", - "orderComment": 'Please gift wrap with a personal note saying "Happy Birthday, Ford! 🎉', - "acceptedOn": "2024-03-29T21:29:21Z", - "fulfilledOn": "2024-03-29T21:29:21Z", - "refundedOn": "2024-04-08T18:25:04Z", - "disputedOn": "2024-03-29T21:29:21Z", - "disputeUpdatedOn": "2024-03-29T21:29:21Z", - "disputeLastStatus": "charge_refunded", - "customerPaid": {"unit": "USD", "value": "5892", "string": "$ 118.73 USD"}, - "netAmount": {"unit": "USD", "value": "5892", "string": "$ 112.62 USD"}, - "applicationFee": {"unit": "USD", "value": "5892", "string": "$ 2.37 USD"}, - "allAddresses": [ - { - "type": "billing", - "japanType": "kana", - "addressee": "Arthur Dent", - "line1": "20 W 34th St", - "line2": "Empire State Building", - "city": "New York", - "state": "New York", - "country": "US", - "postalCode": "10118", - }, - { - "type": "shipping", - "japanType": "kana", - "addressee": "Arthur Dent", - "line1": "20 W 34th St", - "line2": "Empire State Building", - "city": "New York", - "state": "New York", - "country": "US", - "postalCode": "10118", - }, - ], - "shippingAddress": { - "type": "shipping", - "japanType": "kanji", - "addressee": "Arthur Dent", - "line1": "20 W 34th St", - "line2": "Empire State Building", - "city": "New York", - "state": "New York", - "country": "US", - "postalCode": "10118", - }, - "billingAddress": { - "type": "billing", - "japanType": "kana", - "addressee": "Arthur Dent", - "line1": "20 W 34th St", - "line2": "Empire State Building", - "city": "New York", - "state": "New York", - "country": "US", - "postalCode": "10118", - }, - "shippingProvider": "Shipping Company, Co.", - "shippingTracking": "tr00000000001", - "shippingTrackingURL": "https://www.shippingcompany.com/tracking/tr00000000001", - "customerInfo": {"fullName": "Arthur Dent", "email": "arthur.dent@example.com"}, - "purchasedItems": [ - { - "count": 1, - "rowTotal": {"unit": "USD", "value": "5892", "string": "$ 55.61 USD"}, - "productId": "66072fb61b89448912e26791", - "productName": "Luxurious Fresh Ball", - "productSlug": "luxurious-fresh-ball", - "variantId": "66072fb71b89448912e2683f", - "variantName": "Luxurious Fresh Ball Generic: Bronze, Practical: Plastic", - "variantSlug": "luxurious-fresh-ball-generic-bronze-practical-plastic", - "variantSKU": "luxurious-fresh-ball-generic-bronze-practical-plastic", - "variantImage": { - "url": "https://dev-assets.website-files.com/66072f39417a2a35b2589cc7/66072fb51b89448912e2672c_image14.jpeg" - }, - "variantPrice": {"unit": "USD", "value": "5892", "string": "$ 55.61 USD"}, - "weight": 11, - "width": 82, - "height": 70, - "length": 9, - }, - { - "count": 1, - "rowTotal": {"unit": "USD", "value": "5892", "string": "$ 53.44 USD"}, - "productId": "66072fb61b89448912e26799", - "productName": "Recycled Steel Gloves", - "productSlug": "recycled-steel-gloves", - "variantId": "66072fb91b89448912e26ab9", - "variantName": "Recycled Steel Gloves Electronic: Granite, Handcrafted: grey", - "variantSlug": "recycled-steel-gloves-electronic-granite-handcrafted-grey", - "variantSKU": "recycled-steel-gloves-electronic-granite-handcrafted-grey", - "variantImage": { - "url": "https://dev-assets.website-files.com/66072f39417a2a35b2589cc7/66072fb51b89448912e2671e_image2.jpeg" - }, - "variantPrice": {"unit": "USD", "value": "5892", "string": "$ 53.44 USD"}, - "weight": 38, - "width": 76, - "height": 85, - "length": 40, - }, - ], - "purchasedItemsCount": 2, - "stripeDetails": { - "subscriptionId": "sub_1J6xwG2eZvKYlo2CXu9Zt0Tn", - "paymentMethod": "pm_1OzmzBJYFi4lcbXWHKNdXU7j", - "paymentIntentId": "pi_3OzmzDJYFi4lcbXW1hTBW6ft", - "customerId": "cus_PpRsNHwWdUoRKR", - "chargeId": "ch_3OzmzDJYFi4lcbXW1ndkkrH2", - "disputeId": "disputeId", - "refundId": "re_3OzmzDJYFi4lcbXW1kFAmlBk", - "refundReason": "fraudulent", - }, - "stripeCard": { - "last4": "4242", - "brand": "Visa", - "ownerName": "Arthur Dent", - "expires": {"year": 2024, "month": 4}, - }, - "paypalDetails": { - "orderId": "1a2b3c4d5e6f7g8h9i0j", - "payerId": "9k8j7i6h5g4f3e2d1c0b", - "captureId": "qwe123rty456uio789p", - "refundId": "abcde12345fghij67890", - "refundReason": "Customer requested refund", - "disputeId": "zxcvbnm987poiuytrewq", - }, - "customData": [{"key": "value"}], - "metadata": {"isBuyNow": False}, - "isCustomerDeleted": False, - "isShippingRequired": True, - "hasDownloads": False, - "paymentProcessor": "stripe", - "totals": { - "subtotal": {"unit": "USD", "value": "5892", "string": "$ 109.05 USD"}, - "extras": [ - { - "type": "tax", - "name": "State Taxes", - "description": "NY Taxes (4.00%)", - "price": {"unit": "USD", "value": "5892", "string": "$ 4.36 USD"}, - }, - { - "type": "tax", - "name": "City Taxes", - "description": "NEW YORK Taxes (4.88%)", - "price": {"unit": "USD", "value": "5892", "string": "$ 5.32 USD"}, - }, - { - "type": "shipping", - "name": "Flat", - "description": "", - "price": {"unit": "USD", "value": "5892", "string": "$ 0.00 USD"}, - }, - ], - "total": {"unit": "USD", "value": "5892", "string": "$ 118.73 USD"}, - }, - "downloadFiles": [ - { - "id": "5e9a5eba75e0ac242e1b6f64", - "name": "New product guide", - "url": "https://webflow.com/dashboard/download-digital-product?payload=5d93ba5e38c6b0160ab711d3;e7634a;5eb1aac72912ec06f561278c;5e9a5eba75e0ac242e1b6f63:ka2nehxy:4a1ee0a632feaab94294350087215ed89533f2f530903e3b933b638940e921aa", - } - ], - } - expected_types: typing.Any = { - "orderId": None, - "status": None, - "comment": None, - "orderComment": None, - "acceptedOn": "datetime", - "fulfilledOn": "datetime", - "refundedOn": "datetime", - "disputedOn": "datetime", - "disputeUpdatedOn": "datetime", - "disputeLastStatus": None, - "customerPaid": {"unit": None, "value": None, "string": None}, - "netAmount": {"unit": None, "value": None, "string": None}, - "applicationFee": {"unit": None, "value": None, "string": None}, - "allAddresses": ( - "list", - { - 0: { - "type": None, - "japanType": None, - "addressee": None, - "line1": None, - "line2": None, - "city": None, - "state": None, - "country": None, - "postalCode": None, - }, - 1: { - "type": None, - "japanType": None, - "addressee": None, - "line1": None, - "line2": None, - "city": None, - "state": None, - "country": None, - "postalCode": None, - }, - }, - ), - "shippingAddress": { - "type": None, - "japanType": None, - "addressee": None, - "line1": None, - "line2": None, - "city": None, - "state": None, - "country": None, - "postalCode": None, - }, - "billingAddress": { - "type": None, - "japanType": None, - "addressee": None, - "line1": None, - "line2": None, - "city": None, - "state": None, - "country": None, - "postalCode": None, - }, - "shippingProvider": None, - "shippingTracking": None, - "shippingTrackingURL": None, - "customerInfo": {"fullName": None, "email": None}, - "purchasedItems": ( - "list", - { - 0: { - "count": None, - "rowTotal": {"unit": None, "value": None, "string": None}, - "productId": None, - "productName": None, - "productSlug": None, - "variantId": None, - "variantName": None, - "variantSlug": None, - "variantSKU": None, - "variantImage": {"url": None}, - "variantPrice": {"unit": None, "value": None, "string": None}, - "weight": None, - "width": None, - "height": None, - "length": None, - }, - 1: { - "count": None, - "rowTotal": {"unit": None, "value": None, "string": None}, - "productId": None, - "productName": None, - "productSlug": None, - "variantId": None, - "variantName": None, - "variantSlug": None, - "variantSKU": None, - "variantImage": {"url": None}, - "variantPrice": {"unit": None, "value": None, "string": None}, - "weight": None, - "width": None, - "height": None, - "length": None, - }, - }, - ), - "purchasedItemsCount": None, - "stripeDetails": { - "subscriptionId": None, - "paymentMethod": None, - "paymentIntentId": None, - "customerId": None, - "chargeId": None, - "disputeId": None, - "refundId": None, - "refundReason": None, - }, - "stripeCard": {"last4": None, "brand": None, "ownerName": None, "expires": {"year": None, "month": None}}, - "paypalDetails": { - "orderId": None, - "payerId": None, - "captureId": None, - "refundId": None, - "refundReason": None, - "disputeId": None, - }, - "customData": ("list", {0: ("dict", {0: (None, None)})}), - "metadata": {"isBuyNow": None}, - "isCustomerDeleted": None, - "isShippingRequired": None, - "hasDownloads": None, - "paymentProcessor": None, - "totals": { - "subtotal": {"unit": None, "value": None, "string": None}, - "extras": ( - "list", - { - 0: { - "type": None, - "name": None, - "description": None, - "price": {"unit": None, "value": None, "string": None}, - }, - 1: { - "type": None, - "name": None, - "description": None, - "price": {"unit": None, "value": None, "string": None}, - }, - 2: { - "type": None, - "name": None, - "description": None, - "price": {"unit": None, "value": None, "string": None}, - }, - }, - ), - "total": {"unit": None, "value": None, "string": None}, - }, - "downloadFiles": ("list", {0: {"id": None, "name": None, "url": None}}), - } - response = client.orders.update_unfulfill(site_id="580e63e98c9a982ac9b8b741", order_id="5e8518516e147040726cc415") - validate_response(response, expected_response, expected_types) - - async_response = await async_client.orders.update_unfulfill( - site_id="580e63e98c9a982ac9b8b741", order_id="5e8518516e147040726cc415" - ) - validate_response(async_response, expected_response, expected_types) - - -async def test_refund(client: Webflow, async_client: AsyncWebflow) -> None: - expected_response: typing.Any = { - "orderId": "fc7-128", - "status": "refunded", - "comment": "Customer requested gift wrapping and a personalized note saying: Happy Birthday, Ford! 🎉 Please ensure the item is packed with extra bubble wrap for safe transit.", - "orderComment": 'Please gift wrap with a personal note saying "Happy Birthday, Ford! 🎉', - "acceptedOn": "2024-03-29T21:29:21Z", - "fulfilledOn": "2024-03-29T21:29:21Z", - "refundedOn": "2024-04-08T18:25:04Z", - "disputedOn": "2024-03-29T21:29:21Z", - "disputeUpdatedOn": "2024-03-29T21:29:21Z", - "disputeLastStatus": "charge_refunded", - "customerPaid": {"unit": "USD", "value": "5892", "string": "$ 118.73 USD"}, - "netAmount": {"unit": "USD", "value": "5892", "string": "$ 112.62 USD"}, - "applicationFee": {"unit": "USD", "value": "5892", "string": "$ 2.37 USD"}, - "allAddresses": [ - { - "type": "billing", - "japanType": "kana", - "addressee": "Arthur Dent", - "line1": "20 W 34th St", - "line2": "Empire State Building", - "city": "New York", - "state": "New York", - "country": "US", - "postalCode": "10118", - }, - { - "type": "shipping", - "japanType": "kana", - "addressee": "Arthur Dent", - "line1": "20 W 34th St", - "line2": "Empire State Building", - "city": "New York", - "state": "New York", - "country": "US", - "postalCode": "10118", - }, - ], - "shippingAddress": { - "type": "shipping", - "japanType": "kanji", - "addressee": "Arthur Dent", - "line1": "20 W 34th St", - "line2": "Empire State Building", - "city": "New York", - "state": "New York", - "country": "US", - "postalCode": "10118", - }, - "billingAddress": { - "type": "billing", - "japanType": "kana", - "addressee": "Arthur Dent", - "line1": "20 W 34th St", - "line2": "Empire State Building", - "city": "New York", - "state": "New York", - "country": "US", - "postalCode": "10118", - }, - "shippingProvider": "Shipping Company, Co.", - "shippingTracking": "tr00000000001", - "shippingTrackingURL": "https://www.shippingcompany.com/tracking/tr00000000001", - "customerInfo": {"fullName": "Arthur Dent", "email": "arthur.dent@example.com"}, - "purchasedItems": [ - { - "count": 1, - "rowTotal": {"unit": "USD", "value": "5892", "string": "$ 55.61 USD"}, - "productId": "66072fb61b89448912e26791", - "productName": "Luxurious Fresh Ball", - "productSlug": "luxurious-fresh-ball", - "variantId": "66072fb71b89448912e2683f", - "variantName": "Luxurious Fresh Ball Generic: Bronze, Practical: Plastic", - "variantSlug": "luxurious-fresh-ball-generic-bronze-practical-plastic", - "variantSKU": "luxurious-fresh-ball-generic-bronze-practical-plastic", - "variantImage": { - "url": "https://dev-assets.website-files.com/66072f39417a2a35b2589cc7/66072fb51b89448912e2672c_image14.jpeg" - }, - "variantPrice": {"unit": "USD", "value": "5892", "string": "$ 55.61 USD"}, - "weight": 11, - "width": 82, - "height": 70, - "length": 9, - }, - { - "count": 1, - "rowTotal": {"unit": "USD", "value": "5892", "string": "$ 53.44 USD"}, - "productId": "66072fb61b89448912e26799", - "productName": "Recycled Steel Gloves", - "productSlug": "recycled-steel-gloves", - "variantId": "66072fb91b89448912e26ab9", - "variantName": "Recycled Steel Gloves Electronic: Granite, Handcrafted: grey", - "variantSlug": "recycled-steel-gloves-electronic-granite-handcrafted-grey", - "variantSKU": "recycled-steel-gloves-electronic-granite-handcrafted-grey", - "variantImage": { - "url": "https://dev-assets.website-files.com/66072f39417a2a35b2589cc7/66072fb51b89448912e2671e_image2.jpeg" - }, - "variantPrice": {"unit": "USD", "value": "5892", "string": "$ 53.44 USD"}, - "weight": 38, - "width": 76, - "height": 85, - "length": 40, - }, - ], - "purchasedItemsCount": 2, - "stripeDetails": { - "subscriptionId": "sub_1J6xwG2eZvKYlo2CXu9Zt0Tn", - "paymentMethod": "pm_1OzmzBJYFi4lcbXWHKNdXU7j", - "paymentIntentId": "pi_3OzmzDJYFi4lcbXW1hTBW6ft", - "customerId": "cus_PpRsNHwWdUoRKR", - "chargeId": "ch_3OzmzDJYFi4lcbXW1ndkkrH2", - "disputeId": "disputeId", - "refundId": "re_3OzmzDJYFi4lcbXW1kFAmlBk", - "refundReason": "fraudulent", - }, - "stripeCard": { - "last4": "4242", - "brand": "Visa", - "ownerName": "Arthur Dent", - "expires": {"year": 2024, "month": 4}, - }, - "paypalDetails": { - "orderId": "1a2b3c4d5e6f7g8h9i0j", - "payerId": "9k8j7i6h5g4f3e2d1c0b", - "captureId": "qwe123rty456uio789p", - "refundId": "abcde12345fghij67890", - "refundReason": "Customer requested refund", - "disputeId": "zxcvbnm987poiuytrewq", - }, - "customData": [{"key": "value"}], - "metadata": {"isBuyNow": False}, - "isCustomerDeleted": False, - "isShippingRequired": True, - "hasDownloads": False, - "paymentProcessor": "stripe", - "totals": { - "subtotal": {"unit": "USD", "value": "5892", "string": "$ 109.05 USD"}, - "extras": [ - { - "type": "tax", - "name": "State Taxes", - "description": "NY Taxes (4.00%)", - "price": {"unit": "USD", "value": "5892", "string": "$ 4.36 USD"}, - }, - { - "type": "tax", - "name": "City Taxes", - "description": "NEW YORK Taxes (4.88%)", - "price": {"unit": "USD", "value": "5892", "string": "$ 5.32 USD"}, - }, - { - "type": "shipping", - "name": "Flat", - "description": "", - "price": {"unit": "USD", "value": "5892", "string": "$ 0.00 USD"}, - }, - ], - "total": {"unit": "USD", "value": "5892", "string": "$ 118.73 USD"}, - }, - "downloadFiles": [ - { - "id": "5e9a5eba75e0ac242e1b6f64", - "name": "New product guide", - "url": "https://webflow.com/dashboard/download-digital-product?payload=5d93ba5e38c6b0160ab711d3;e7634a;5eb1aac72912ec06f561278c;5e9a5eba75e0ac242e1b6f63:ka2nehxy:4a1ee0a632feaab94294350087215ed89533f2f530903e3b933b638940e921aa", - } - ], - } - expected_types: typing.Any = { - "orderId": None, - "status": None, - "comment": None, - "orderComment": None, - "acceptedOn": "datetime", - "fulfilledOn": "datetime", - "refundedOn": "datetime", - "disputedOn": "datetime", - "disputeUpdatedOn": "datetime", - "disputeLastStatus": None, - "customerPaid": {"unit": None, "value": None, "string": None}, - "netAmount": {"unit": None, "value": None, "string": None}, - "applicationFee": {"unit": None, "value": None, "string": None}, - "allAddresses": ( - "list", - { - 0: { - "type": None, - "japanType": None, - "addressee": None, - "line1": None, - "line2": None, - "city": None, - "state": None, - "country": None, - "postalCode": None, - }, - 1: { - "type": None, - "japanType": None, - "addressee": None, - "line1": None, - "line2": None, - "city": None, - "state": None, - "country": None, - "postalCode": None, - }, - }, - ), - "shippingAddress": { - "type": None, - "japanType": None, - "addressee": None, - "line1": None, - "line2": None, - "city": None, - "state": None, - "country": None, - "postalCode": None, - }, - "billingAddress": { - "type": None, - "japanType": None, - "addressee": None, - "line1": None, - "line2": None, - "city": None, - "state": None, - "country": None, - "postalCode": None, - }, - "shippingProvider": None, - "shippingTracking": None, - "shippingTrackingURL": None, - "customerInfo": {"fullName": None, "email": None}, - "purchasedItems": ( - "list", - { - 0: { - "count": None, - "rowTotal": {"unit": None, "value": None, "string": None}, - "productId": None, - "productName": None, - "productSlug": None, - "variantId": None, - "variantName": None, - "variantSlug": None, - "variantSKU": None, - "variantImage": {"url": None}, - "variantPrice": {"unit": None, "value": None, "string": None}, - "weight": None, - "width": None, - "height": None, - "length": None, - }, - 1: { - "count": None, - "rowTotal": {"unit": None, "value": None, "string": None}, - "productId": None, - "productName": None, - "productSlug": None, - "variantId": None, - "variantName": None, - "variantSlug": None, - "variantSKU": None, - "variantImage": {"url": None}, - "variantPrice": {"unit": None, "value": None, "string": None}, - "weight": None, - "width": None, - "height": None, - "length": None, - }, - }, - ), - "purchasedItemsCount": None, - "stripeDetails": { - "subscriptionId": None, - "paymentMethod": None, - "paymentIntentId": None, - "customerId": None, - "chargeId": None, - "disputeId": None, - "refundId": None, - "refundReason": None, - }, - "stripeCard": {"last4": None, "brand": None, "ownerName": None, "expires": {"year": None, "month": None}}, - "paypalDetails": { - "orderId": None, - "payerId": None, - "captureId": None, - "refundId": None, - "refundReason": None, - "disputeId": None, - }, - "customData": ("list", {0: ("dict", {0: (None, None)})}), - "metadata": {"isBuyNow": None}, - "isCustomerDeleted": None, - "isShippingRequired": None, - "hasDownloads": None, - "paymentProcessor": None, - "totals": { - "subtotal": {"unit": None, "value": None, "string": None}, - "extras": ( - "list", - { - 0: { - "type": None, - "name": None, - "description": None, - "price": {"unit": None, "value": None, "string": None}, - }, - 1: { - "type": None, - "name": None, - "description": None, - "price": {"unit": None, "value": None, "string": None}, - }, - 2: { - "type": None, - "name": None, - "description": None, - "price": {"unit": None, "value": None, "string": None}, - }, - }, - ), - "total": {"unit": None, "value": None, "string": None}, - }, - "downloadFiles": ("list", {0: {"id": None, "name": None, "url": None}}), - } - response = client.orders.refund(site_id="580e63e98c9a982ac9b8b741", order_id="5e8518516e147040726cc415") - validate_response(response, expected_response, expected_types) - - async_response = await async_client.orders.refund( - site_id="580e63e98c9a982ac9b8b741", order_id="5e8518516e147040726cc415" - ) - validate_response(async_response, expected_response, expected_types) diff --git a/tests/test_pages.py b/tests/test_pages.py deleted file mode 100644 index 63003be..0000000 --- a/tests/test_pages.py +++ /dev/null @@ -1,407 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -from webflow import Webflow -from webflow import AsyncWebflow -import typing -from .utilities import validate_response -from webflow.resources.pages import PageMetadataWriteSeo -from webflow.resources.pages import PageMetadataWriteOpenGraph -from webflow import TextNodeWrite -from webflow import Select -from webflow import SelectNodeWriteChoicesItem -from webflow import TextInputNodeWrite -from webflow import SubmitButtonNodeWrite -from webflow import ComponentInstanceNodePropertyOverridesWrite -from webflow import ComponentInstanceNodePropertyOverridesWritePropertyOverridesItem - - -async def test_list_(client: Webflow, async_client: AsyncWebflow) -> None: - expected_response: typing.Any = { - "pages": [ - { - "id": "6596da6045e56dee495bcbba", - "siteId": "6258612d1ee792848f805dcf", - "title": "Guide to the Galaxy", - "slug": "guide-to-the-galaxy", - "parentId": "6419db964a9c435aa3af6251", - "collectionId": "6390c49774a71f12831a08e3", - "createdOn": "2024-03-11T10:42:00Z", - "lastUpdated": "2024-03-11T10:42:42Z", - "archived": False, - "draft": False, - "canBranch": False, - "isBranch": True, - "branchId": "68026fa68ef6dc744c75b833", - "seo": { - "title": "The Ultimate Hitchhiker's Guide to the Galaxy", - "description": "Everything you need to know about the galaxy, from avoiding Vogon poetry to the importance of towels.", - }, - "openGraph": { - "title": "Explore the Cosmos with The Ultimate Guide", - "titleCopied": False, - "description": "Dive deep into the mysteries of the universe with your guide to everything galactic.", - "descriptionCopied": False, - }, - "localeId": "653fd9af6a07fc9cfd7a5e57", - "publishedPath": "/en-us/guide-to-the-galaxy", - }, - { - "id": "6596da6045e56dee495bcbad", - "siteId": "6258612d1ee792848f805dcf", - "title": "Towel Day Celebrations", - "slug": "towel-day", - "parentId": "6419db964a9c435aa3af6251", - "collectionId": "6390c49774a71f12831a08e3", - "createdOn": "2024-05-25T09:00:00Z", - "lastUpdated": "2024-05-25T09:42:00Z", - "archived": False, - "draft": False, - "canBranch": True, - "isBranch": False, - "branchId": "68026fa68ef6dc744c75b833", - "seo": { - "title": "Celebrate Towel Day - The Hitchhiker's Guide to the Galaxy", - "description": "A guide to celebrating Towel Day, in honor of the most massively useful thing an interstellar hitchhiker can have.", - }, - "openGraph": { - "title": "Towel Day - Don't Panic", - "titleCopied": False, - "description": "Join the galaxy in celebrating Towel Day, the day dedicated to carrying towels everywhere in memory of Douglas Adams.", - "descriptionCopied": False, - }, - "localeId": "653fd9af6a07fc9cfd7a5e57", - "publishedPath": "/en-us/towel-day", - }, - ], - "pagination": {"limit": 20, "offset": 0, "total": 2}, - } - expected_types: typing.Any = { - "pages": ( - "list", - { - 0: { - "id": None, - "siteId": None, - "title": None, - "slug": None, - "parentId": None, - "collectionId": None, - "createdOn": "datetime", - "lastUpdated": "datetime", - "archived": None, - "draft": None, - "canBranch": None, - "isBranch": None, - "branchId": None, - "seo": {"title": None, "description": None}, - "openGraph": {"title": None, "titleCopied": None, "description": None, "descriptionCopied": None}, - "localeId": None, - "publishedPath": None, - }, - 1: { - "id": None, - "siteId": None, - "title": None, - "slug": None, - "parentId": None, - "collectionId": None, - "createdOn": "datetime", - "lastUpdated": "datetime", - "archived": None, - "draft": None, - "canBranch": None, - "isBranch": None, - "branchId": None, - "seo": {"title": None, "description": None}, - "openGraph": {"title": None, "titleCopied": None, "description": None, "descriptionCopied": None}, - "localeId": None, - "publishedPath": None, - }, - }, - ), - "pagination": {"limit": "integer", "offset": "integer", "total": "integer"}, - } - response = client.pages.list( - site_id="580e63e98c9a982ac9b8b741", locale_id="65427cf400e02b306eaa04a0", limit=1, offset=1 - ) - validate_response(response, expected_response, expected_types) - - async_response = await async_client.pages.list( - site_id="580e63e98c9a982ac9b8b741", locale_id="65427cf400e02b306eaa04a0", limit=1, offset=1 - ) - validate_response(async_response, expected_response, expected_types) - - -async def test_get_metadata(client: Webflow, async_client: AsyncWebflow) -> None: - expected_response: typing.Any = { - "id": "6596da6045e56dee495bcbba", - "siteId": "6258612d1ee792848f805dcf", - "title": "Guide to the Galaxy", - "slug": "guide-to-the-galaxy", - "parentId": "6419db964a9c435aa3af6251", - "collectionId": "6390c49774a71f12831a08e3", - "createdOn": "2024-03-11T10:42:00Z", - "lastUpdated": "2024-03-11T10:42:42Z", - "archived": False, - "draft": False, - "canBranch": False, - "isBranch": True, - "branchId": "68026fa68ef6dc744c75b833", - "seo": { - "title": "The Ultimate Hitchhiker's Guide to the Galaxy", - "description": "Everything you need to know about the galaxy, from avoiding Vogon poetry to the importance of towels.", - }, - "openGraph": { - "title": "Explore the Cosmos with The Ultimate Guide", - "titleCopied": False, - "description": "Dive deep into the mysteries of the universe with your guide to everything galactic.", - "descriptionCopied": False, - }, - "localeId": "653fd9af6a07fc9cfd7a5e57", - "publishedPath": "/en-us/guide-to-the-galaxy", - } - expected_types: typing.Any = { - "id": None, - "siteId": None, - "title": None, - "slug": None, - "parentId": None, - "collectionId": None, - "createdOn": "datetime", - "lastUpdated": "datetime", - "archived": None, - "draft": None, - "canBranch": None, - "isBranch": None, - "branchId": None, - "seo": {"title": None, "description": None}, - "openGraph": {"title": None, "titleCopied": None, "description": None, "descriptionCopied": None}, - "localeId": None, - "publishedPath": None, - } - response = client.pages.get_metadata(page_id="63c720f9347c2139b248e552", locale_id="65427cf400e02b306eaa04a0") - validate_response(response, expected_response, expected_types) - - async_response = await async_client.pages.get_metadata( - page_id="63c720f9347c2139b248e552", locale_id="65427cf400e02b306eaa04a0" - ) - validate_response(async_response, expected_response, expected_types) - - -async def test_update_page_settings(client: Webflow, async_client: AsyncWebflow) -> None: - expected_response: typing.Any = { - "id": "6596da6045e56dee495bcbba", - "siteId": "6258612d1ee792848f805dcf", - "title": "Guide to the Galaxy", - "slug": "guide-to-the-galaxy", - "parentId": "6419db964a9c435aa3af6251", - "collectionId": "6390c49774a71f12831a08e3", - "createdOn": "2024-03-11T10:42:00Z", - "lastUpdated": "2024-03-11T10:42:42Z", - "archived": False, - "draft": False, - "canBranch": False, - "isBranch": True, - "branchId": "68026fa68ef6dc744c75b833", - "seo": { - "title": "The Ultimate Hitchhiker's Guide to the Galaxy", - "description": "Everything you need to know about the galaxy, from avoiding Vogon poetry to the importance of towels.", - }, - "openGraph": { - "title": "Explore the Cosmos with The Ultimate Guide", - "titleCopied": False, - "description": "Dive deep into the mysteries of the universe with your guide to everything galactic.", - "descriptionCopied": False, - }, - "localeId": "653fd9af6a07fc9cfd7a5e57", - "publishedPath": "/en-us/guide-to-the-galaxy", - } - expected_types: typing.Any = { - "id": None, - "siteId": None, - "title": None, - "slug": None, - "parentId": None, - "collectionId": None, - "createdOn": "datetime", - "lastUpdated": "datetime", - "archived": None, - "draft": None, - "canBranch": None, - "isBranch": None, - "branchId": None, - "seo": {"title": None, "description": None}, - "openGraph": {"title": None, "titleCopied": None, "description": None, "descriptionCopied": None}, - "localeId": None, - "publishedPath": None, - } - response = client.pages.update_page_settings( - page_id="63c720f9347c2139b248e552", - locale_id="65427cf400e02b306eaa04a0", - title="Guide to the Galaxy", - slug="guide-to-the-galaxy", - seo=PageMetadataWriteSeo( - title="The Ultimate Hitchhiker's Guide to the Galaxy", - description="Everything you need to know about the galaxy, from avoiding Vogon poetry to the importance of towels.", - ), - open_graph=PageMetadataWriteOpenGraph( - title="Explore the Cosmos with The Ultimate Guide", - title_copied=False, - description="Dive deep into the mysteries of the universe with your guide to everything galactic.", - description_copied=False, - ), - ) - validate_response(response, expected_response, expected_types) - - async_response = await async_client.pages.update_page_settings( - page_id="63c720f9347c2139b248e552", - locale_id="65427cf400e02b306eaa04a0", - title="Guide to the Galaxy", - slug="guide-to-the-galaxy", - seo=PageMetadataWriteSeo( - title="The Ultimate Hitchhiker's Guide to the Galaxy", - description="Everything you need to know about the galaxy, from avoiding Vogon poetry to the importance of towels.", - ), - open_graph=PageMetadataWriteOpenGraph( - title="Explore the Cosmos with The Ultimate Guide", - title_copied=False, - description="Dive deep into the mysteries of the universe with your guide to everything galactic.", - description_copied=False, - ), - ) - validate_response(async_response, expected_response, expected_types) - - -async def test_get_content(client: Webflow, async_client: AsyncWebflow) -> None: - expected_response: typing.Any = { - "pageId": "658205daa3e8206a523b5ad4", - "branchId": "68026fa68ef6dc744c75b833", - "nodes": [ - {"id": "id", "text": {}, "attributes": {"key": "value"}, "type": "text"}, - {"id": "id", "text": {}, "attributes": {"key": "value"}, "type": "text"}, - {"id": "id", "image": {}, "attributes": {"key": "value"}, "type": "image"}, - { - "id": "id", - "choices": [{"value": "value", "text": "text"}], - "attributes": {"key": "value"}, - "type": "select", - }, - {"id": "id", "placeholder": "placeholder", "attributes": {"key": "value"}, "type": "text-input"}, - {"id": "id", "text": {}, "attributes": {"key": "value"}, "type": "text"}, - { - "id": "id", - "componentId": "componentId", - "propertyOverrides": [{"propertyId": "7dd14c08-2e96-8d3d-2b19-b5c03642a0f0"}], - "type": "component-instance", - }, - ], - "pagination": {"limit": 4, "offset": 0, "total": 4}, - "lastUpdated": "2016-10-24T19:42:38Z", - } - expected_types: typing.Any = { - "pageId": None, - "branchId": None, - "nodes": ( - "list", - { - 0: "no_validate", - 1: "no_validate", - 2: "no_validate", - 3: "no_validate", - 4: "no_validate", - 5: "no_validate", - 6: "no_validate", - }, - ), - "pagination": {"limit": "integer", "offset": "integer", "total": "integer"}, - "lastUpdated": "datetime", - } - response = client.pages.get_content( - page_id="63c720f9347c2139b248e552", locale_id="65427cf400e02b306eaa04a0", limit=1, offset=1 - ) - validate_response(response, expected_response, expected_types) - - async_response = await async_client.pages.get_content( - page_id="63c720f9347c2139b248e552", locale_id="65427cf400e02b306eaa04a0", limit=1, offset=1 - ) - validate_response(async_response, expected_response, expected_types) - - -async def test_update_static_content(client: Webflow, async_client: AsyncWebflow) -> None: - expected_response: typing.Any = {"errors": ["errors"]} - expected_types: typing.Any = {"errors": ("list", {0: None})} - response = client.pages.update_static_content( - page_id="63c720f9347c2139b248e552", - locale_id="localeId", - nodes=[ - TextNodeWrite( - node_id="a245c12d-995b-55ee-5ec7-aa36a6cad623", text="

The Hitchhiker's Guide to the Galaxy

" - ), - TextNodeWrite( - node_id="a245c12d-995b-55ee-5ec7-aa36a6cad627", - text="

Don't Panic!

Always know where your towel is.

", - ), - Select( - node_id="a245c12d-995b-55ee-5ec7-aa36a6cad635", - choices=[ - SelectNodeWriteChoicesItem(value="choice-1", text="First choice"), - SelectNodeWriteChoicesItem(value="choice-2", text="Second choice"), - ], - ), - TextInputNodeWrite(node_id="a245c12d-995b-55ee-5ec7-aa36a6cad642", placeholder="Enter something here..."), - SubmitButtonNodeWrite( - node_id="a245c12d-995b-55ee-5ec7-aa36a6cad671", value="Submit", waiting_text="Submitting..." - ), - ComponentInstanceNodePropertyOverridesWrite( - node_id="a245c12d-995b-55ee-5ec7-aa36a6cad629", - property_overrides=[ - ComponentInstanceNodePropertyOverridesWritePropertyOverridesItem( - property_id="7dd14c08-2e96-8d3d-2b19-b5c03642a0f0", - text="

Time is an illusion

", - ), - ComponentInstanceNodePropertyOverridesWritePropertyOverridesItem( - property_id="7dd14c08-2e96-8d3d-2b19-b5c03642a0f1", text="Life, the Universe and Everything" - ), - ], - ), - ], - ) - validate_response(response, expected_response, expected_types) - - async_response = await async_client.pages.update_static_content( - page_id="63c720f9347c2139b248e552", - locale_id="localeId", - nodes=[ - TextNodeWrite( - node_id="a245c12d-995b-55ee-5ec7-aa36a6cad623", text="

The Hitchhiker's Guide to the Galaxy

" - ), - TextNodeWrite( - node_id="a245c12d-995b-55ee-5ec7-aa36a6cad627", - text="

Don't Panic!

Always know where your towel is.

", - ), - Select( - node_id="a245c12d-995b-55ee-5ec7-aa36a6cad635", - choices=[ - SelectNodeWriteChoicesItem(value="choice-1", text="First choice"), - SelectNodeWriteChoicesItem(value="choice-2", text="Second choice"), - ], - ), - TextInputNodeWrite(node_id="a245c12d-995b-55ee-5ec7-aa36a6cad642", placeholder="Enter something here..."), - SubmitButtonNodeWrite( - node_id="a245c12d-995b-55ee-5ec7-aa36a6cad671", value="Submit", waiting_text="Submitting..." - ), - ComponentInstanceNodePropertyOverridesWrite( - node_id="a245c12d-995b-55ee-5ec7-aa36a6cad629", - property_overrides=[ - ComponentInstanceNodePropertyOverridesWritePropertyOverridesItem( - property_id="7dd14c08-2e96-8d3d-2b19-b5c03642a0f0", - text="

Time is an illusion

", - ), - ComponentInstanceNodePropertyOverridesWritePropertyOverridesItem( - property_id="7dd14c08-2e96-8d3d-2b19-b5c03642a0f1", text="Life, the Universe and Everything" - ), - ], - ), - ], - ) - validate_response(async_response, expected_response, expected_types) diff --git a/tests/test_products.py b/tests/test_products.py deleted file mode 100644 index 3438763..0000000 --- a/tests/test_products.py +++ /dev/null @@ -1,700 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -from webflow import Webflow -from webflow import AsyncWebflow -import typing -from .utilities import validate_response -from webflow.resources.products import ProductSkuCreateProduct -from webflow import ProductFieldData -from webflow import SkuPropertyList -from webflow import SkuPropertyListEnumItem -from webflow.resources.products import ProductSkuCreateSku -from webflow import SkuFieldData -from webflow import SkuFieldDataPrice -from webflow import Sku -import datetime - - -async def test_list_(client: Webflow, async_client: AsyncWebflow) -> None: - expected_response: typing.Any = { - "items": [ - { - "product": { - "id": "660eb7a486d1d6e0412292d7", - "cmsLocaleId": "653ad57de882f528b32e810e", - "lastPublished": "2024-04-04T14:24:19Z", - "lastUpdated": "2024-04-04T14:30:19Z", - "createdOn": "2024-04-04T14:22:28Z", - "isArchived": False, - "isDraft": False, - "fieldData": { - "name": "T-Shirt", - "slug": "t-shirt", - "description": "A plain cotton t-shirt.", - "shippable": True, - "sku-properties": [ - { - "id": "Color", - "name": "Color", - "enum": [{"id": "royal-blue", "name": "Royal Blue", "slug": "royal-blue"}], - } - ], - }, - }, - "skus": [ - { - "id": "66072fb71b89448912e2681c", - "cmsLocaleId": "653ad57de882f528b32e810e", - "lastPublished": "2023-03-17T18:47:35Z", - "lastUpdated": "2023-03-17T18:47:35Z", - "createdOn": "2023-03-17T18:47:35Z", - "fieldData": { - "sku-values": {"color": "blue", "size": "small"}, - "name": "Colorful T-shirt - Default", - "slug": "colorful-t-shirt-default", - "price": {"value": 2499, "unit": "USD", "currency": "USD"}, - "main-image": "https://www.example.com/image.jpg", - "sku": "1234567890", - "sku-properties": [ - { - "id": "Color", - "name": "Color", - "enum": [{"id": "royal-blue", "name": "Royal Blue", "slug": "royal-blue"}], - } - ], - }, - } - ], - } - ], - "pagination": {"limit": 100, "offset": 0, "total": 100}, - } - expected_types: typing.Any = { - "items": ( - "list", - { - 0: { - "product": { - "id": None, - "cmsLocaleId": None, - "lastPublished": "datetime", - "lastUpdated": "datetime", - "createdOn": "datetime", - "isArchived": None, - "isDraft": None, - "fieldData": { - "name": None, - "slug": None, - "description": None, - "shippable": None, - "sku-properties": ( - "list", - { - 0: { - "id": None, - "name": None, - "enum": ("list", {0: {"id": None, "name": None, "slug": None}}), - } - }, - ), - }, - }, - "skus": ( - "list", - { - 0: { - "id": None, - "cmsLocaleId": None, - "lastPublished": "datetime", - "lastUpdated": "datetime", - "createdOn": "datetime", - "fieldData": { - "sku-values": ("dict", {0: (None, None), 1: (None, None)}), - "name": None, - "slug": None, - "price": {"value": None, "unit": None, "currency": None}, - "main-image": None, - "sku": None, - "sku-properties": ( - "list", - { - 0: { - "id": None, - "name": None, - "enum": ("list", {0: {"id": None, "name": None, "slug": None}}), - } - }, - ), - }, - } - }, - ), - } - }, - ), - "pagination": {"limit": "integer", "offset": "integer", "total": "integer"}, - } - response = client.products.list(site_id="580e63e98c9a982ac9b8b741", offset=1, limit=1) - validate_response(response, expected_response, expected_types) - - async_response = await async_client.products.list(site_id="580e63e98c9a982ac9b8b741", offset=1, limit=1) - validate_response(async_response, expected_response, expected_types) - - -async def test_create(client: Webflow, async_client: AsyncWebflow) -> None: - expected_response: typing.Any = { - "product": { - "id": "660eb7a486d1d6e0412292d7", - "cmsLocaleId": "653ad57de882f528b32e810e", - "lastPublished": "2024-04-04T14:24:19Z", - "lastUpdated": "2024-04-04T14:30:19Z", - "createdOn": "2024-04-04T14:22:28Z", - "isArchived": False, - "isDraft": False, - "fieldData": { - "name": "T-Shirt", - "slug": "t-shirt", - "description": "A plain cotton t-shirt.", - "shippable": True, - "sku-properties": [ - { - "id": "Color", - "name": "Color", - "enum": [{"id": "royal-blue", "name": "Royal Blue", "slug": "royal-blue"}], - } - ], - "category": ["category"], - "tax-category": "standard-taxable", - "default-sku": "default-sku", - "ec-product-type": "ff42fee0113744f693a764e3431a9cc2", - }, - }, - "skus": [ - { - "id": "66072fb71b89448912e2681c", - "cmsLocaleId": "653ad57de882f528b32e810e", - "lastPublished": "2023-03-17T18:47:35Z", - "lastUpdated": "2023-03-17T18:47:35Z", - "createdOn": "2023-03-17T18:47:35Z", - "fieldData": { - "sku-values": {"color": "blue", "size": "small"}, - "name": "Colorful T-shirt - Default", - "slug": "colorful-t-shirt-default", - "price": {"value": 2499, "unit": "USD", "currency": "USD"}, - "main-image": "https://www.example.com/image.jpg", - "sku": "1234567890", - "sku-properties": [ - { - "id": "Color", - "name": "Color", - "enum": [{"id": "royal-blue", "name": "Royal Blue", "slug": "royal-blue"}], - } - ], - }, - } - ], - } - expected_types: typing.Any = { - "product": { - "id": None, - "cmsLocaleId": None, - "lastPublished": "datetime", - "lastUpdated": "datetime", - "createdOn": "datetime", - "isArchived": None, - "isDraft": None, - "fieldData": { - "name": None, - "slug": None, - "description": None, - "shippable": None, - "sku-properties": ( - "list", - {0: {"id": None, "name": None, "enum": ("list", {0: {"id": None, "name": None, "slug": None}})}}, - ), - "category": ("list", {0: None}), - "tax-category": None, - "default-sku": None, - "ec-product-type": None, - }, - }, - "skus": ( - "list", - { - 0: { - "id": None, - "cmsLocaleId": None, - "lastPublished": "datetime", - "lastUpdated": "datetime", - "createdOn": "datetime", - "fieldData": { - "sku-values": ("dict", {0: (None, None), 1: (None, None)}), - "name": None, - "slug": None, - "price": {"value": None, "unit": None, "currency": None}, - "main-image": None, - "sku": None, - "sku-properties": ( - "list", - { - 0: { - "id": None, - "name": None, - "enum": ("list", {0: {"id": None, "name": None, "slug": None}}), - } - }, - ), - }, - } - }, - ), - } - response = client.products.create( - site_id="580e63e98c9a982ac9b8b741", - publish_status="staging", - product=ProductSkuCreateProduct( - field_data=ProductFieldData( - name="Colorful T-shirt", - slug="colorful-t-shirt", - description="Our best-selling t-shirt available in multiple colors and sizes", - sku_properties=[ - SkuPropertyList( - id="color", - name="Color", - enum=[ - SkuPropertyListEnumItem(id="red", name="Red", slug="red"), - SkuPropertyListEnumItem(id="yellow", name="Yellow", slug="yellow"), - SkuPropertyListEnumItem(id="blue", name="Blue", slug="blue"), - ], - ), - SkuPropertyList( - id="size", - name="Size", - enum=[ - SkuPropertyListEnumItem(id="small", name="Small", slug="small"), - SkuPropertyListEnumItem(id="medium", name="Medium", slug="medium"), - SkuPropertyListEnumItem(id="large", name="Large", slug="large"), - ], - ), - ], - ) - ), - sku=ProductSkuCreateSku( - field_data=SkuFieldData( - name="Colorful T-shirt - Red Small", - slug="colorful-t-shirt-red-small", - price=SkuFieldDataPrice(value=2499.0, unit="USD", currency="USD"), - main_image="https://rocketamp-sample-store.myshopify.com/cdn/shop/products/Gildan_2000_Antique_Cherry_Red_Front_1024x1024.jpg?v=1527232987", - ) - ), - ) - validate_response(response, expected_response, expected_types) - - async_response = await async_client.products.create( - site_id="580e63e98c9a982ac9b8b741", - publish_status="staging", - product=ProductSkuCreateProduct( - field_data=ProductFieldData( - name="Colorful T-shirt", - slug="colorful-t-shirt", - description="Our best-selling t-shirt available in multiple colors and sizes", - sku_properties=[ - SkuPropertyList( - id="color", - name="Color", - enum=[ - SkuPropertyListEnumItem(id="red", name="Red", slug="red"), - SkuPropertyListEnumItem(id="yellow", name="Yellow", slug="yellow"), - SkuPropertyListEnumItem(id="blue", name="Blue", slug="blue"), - ], - ), - SkuPropertyList( - id="size", - name="Size", - enum=[ - SkuPropertyListEnumItem(id="small", name="Small", slug="small"), - SkuPropertyListEnumItem(id="medium", name="Medium", slug="medium"), - SkuPropertyListEnumItem(id="large", name="Large", slug="large"), - ], - ), - ], - ) - ), - sku=ProductSkuCreateSku( - field_data=SkuFieldData( - name="Colorful T-shirt - Red Small", - slug="colorful-t-shirt-red-small", - price=SkuFieldDataPrice(value=2499.0, unit="USD", currency="USD"), - main_image="https://rocketamp-sample-store.myshopify.com/cdn/shop/products/Gildan_2000_Antique_Cherry_Red_Front_1024x1024.jpg?v=1527232987", - ) - ), - ) - validate_response(async_response, expected_response, expected_types) - - -async def test_get(client: Webflow, async_client: AsyncWebflow) -> None: - expected_response: typing.Any = { - "product": { - "id": "660eb7a486d1d6e0412292d7", - "cmsLocaleId": "653ad57de882f528b32e810e", - "lastPublished": "2024-04-04T14:24:19Z", - "lastUpdated": "2024-04-04T14:30:19Z", - "createdOn": "2024-04-04T14:22:28Z", - "isArchived": False, - "isDraft": False, - "fieldData": { - "name": "T-Shirt", - "slug": "t-shirt", - "description": "A plain cotton t-shirt.", - "shippable": True, - "sku-properties": [ - { - "id": "Color", - "name": "Color", - "enum": [{"id": "royal-blue", "name": "Royal Blue", "slug": "royal-blue"}], - } - ], - "category": ["category"], - "tax-category": "standard-taxable", - "default-sku": "default-sku", - "ec-product-type": "ff42fee0113744f693a764e3431a9cc2", - }, - }, - "skus": [ - { - "id": "66072fb71b89448912e2681c", - "cmsLocaleId": "653ad57de882f528b32e810e", - "lastPublished": "2023-03-17T18:47:35Z", - "lastUpdated": "2023-03-17T18:47:35Z", - "createdOn": "2023-03-17T18:47:35Z", - "fieldData": { - "sku-values": {"color": "blue", "size": "small"}, - "name": "Colorful T-shirt - Default", - "slug": "colorful-t-shirt-default", - "price": {"value": 2499, "unit": "USD", "currency": "USD"}, - "main-image": "https://www.example.com/image.jpg", - "sku": "1234567890", - "sku-properties": [ - { - "id": "Color", - "name": "Color", - "enum": [{"id": "royal-blue", "name": "Royal Blue", "slug": "royal-blue"}], - } - ], - }, - } - ], - } - expected_types: typing.Any = { - "product": { - "id": None, - "cmsLocaleId": None, - "lastPublished": "datetime", - "lastUpdated": "datetime", - "createdOn": "datetime", - "isArchived": None, - "isDraft": None, - "fieldData": { - "name": None, - "slug": None, - "description": None, - "shippable": None, - "sku-properties": ( - "list", - {0: {"id": None, "name": None, "enum": ("list", {0: {"id": None, "name": None, "slug": None}})}}, - ), - "category": ("list", {0: None}), - "tax-category": None, - "default-sku": None, - "ec-product-type": None, - }, - }, - "skus": ( - "list", - { - 0: { - "id": None, - "cmsLocaleId": None, - "lastPublished": "datetime", - "lastUpdated": "datetime", - "createdOn": "datetime", - "fieldData": { - "sku-values": ("dict", {0: (None, None), 1: (None, None)}), - "name": None, - "slug": None, - "price": {"value": None, "unit": None, "currency": None}, - "main-image": None, - "sku": None, - "sku-properties": ( - "list", - { - 0: { - "id": None, - "name": None, - "enum": ("list", {0: {"id": None, "name": None, "slug": None}}), - } - }, - ), - }, - } - }, - ), - } - response = client.products.get(site_id="580e63e98c9a982ac9b8b741", product_id="580e63fc8c9a982ac9b8b745") - validate_response(response, expected_response, expected_types) - - async_response = await async_client.products.get( - site_id="580e63e98c9a982ac9b8b741", product_id="580e63fc8c9a982ac9b8b745" - ) - validate_response(async_response, expected_response, expected_types) - - -async def test_update(client: Webflow, async_client: AsyncWebflow) -> None: - expected_response: typing.Any = { - "id": "660eb7a486d1d6e0412292d7", - "cmsLocaleId": "653ad57de882f528b32e810e", - "lastPublished": "2024-04-04T14:24:19Z", - "lastUpdated": "2024-04-04T14:30:19Z", - "createdOn": "2024-04-04T14:22:28Z", - "isArchived": False, - "isDraft": False, - "fieldData": { - "name": "T-Shirt", - "slug": "t-shirt", - "description": "A plain cotton t-shirt.", - "shippable": True, - "sku-properties": [ - { - "id": "Color", - "name": "Color", - "enum": [{"id": "royal-blue", "name": "Royal Blue", "slug": "royal-blue"}], - } - ], - "category": ["category"], - "tax-category": "standard-taxable", - "default-sku": "default-sku", - "ec-product-type": "ff42fee0113744f693a764e3431a9cc2", - }, - } - expected_types: typing.Any = { - "id": None, - "cmsLocaleId": None, - "lastPublished": "datetime", - "lastUpdated": "datetime", - "createdOn": "datetime", - "isArchived": None, - "isDraft": None, - "fieldData": { - "name": None, - "slug": None, - "description": None, - "shippable": None, - "sku-properties": ( - "list", - {0: {"id": None, "name": None, "enum": ("list", {0: {"id": None, "name": None, "slug": None}})}}, - ), - "category": ("list", {0: None}), - "tax-category": None, - "default-sku": None, - "ec-product-type": None, - }, - } - response = client.products.update(site_id="580e63e98c9a982ac9b8b741", product_id="580e63fc8c9a982ac9b8b745") - validate_response(response, expected_response, expected_types) - - async_response = await async_client.products.update( - site_id="580e63e98c9a982ac9b8b741", product_id="580e63fc8c9a982ac9b8b745" - ) - validate_response(async_response, expected_response, expected_types) - - -async def test_create_sku(client: Webflow, async_client: AsyncWebflow) -> None: - expected_response: typing.Any = { - "skus": [ - { - "id": "66072fb71b89448912e2681c", - "cmsLocaleId": "653ad57de882f528b32e810e", - "lastPublished": "2023-03-17T18:47:35Z", - "lastUpdated": "2023-03-17T18:47:35Z", - "createdOn": "2023-03-17T18:47:35Z", - "fieldData": { - "sku-values": {"color": "blue", "size": "small"}, - "name": "Colorful T-shirt - Default", - "slug": "colorful-t-shirt-default", - "price": {"value": 2499, "unit": "USD", "currency": "USD"}, - "main-image": "https://www.example.com/image.jpg", - "sku": "1234567890", - "sku-properties": [ - { - "id": "Color", - "name": "Color", - "enum": [{"id": "royal-blue", "name": "Royal Blue", "slug": "royal-blue"}], - } - ], - }, - } - ] - } - expected_types: typing.Any = { - "skus": ( - "list", - { - 0: { - "id": None, - "cmsLocaleId": None, - "lastPublished": "datetime", - "lastUpdated": "datetime", - "createdOn": "datetime", - "fieldData": { - "sku-values": ("dict", {0: (None, None), 1: (None, None)}), - "name": None, - "slug": None, - "price": {"value": None, "unit": None, "currency": None}, - "main-image": None, - "sku": None, - "sku-properties": ( - "list", - { - 0: { - "id": None, - "name": None, - "enum": ("list", {0: {"id": None, "name": None, "slug": None}}), - } - }, - ), - }, - } - }, - ) - } - response = client.products.create_sku( - site_id="580e63e98c9a982ac9b8b741", - product_id="580e63fc8c9a982ac9b8b745", - skus=[ - Sku( - id="66072fb71b89448912e2681c", - cms_locale_id="653ad57de882f528b32e810e", - last_published=datetime.datetime.fromisoformat("2023-03-17 18:47:35+00:00"), - last_updated=datetime.datetime.fromisoformat("2023-03-17 18:47:35+00:00"), - created_on=datetime.datetime.fromisoformat("2023-03-17 18:47:35+00:00"), - field_data=SkuFieldData( - name="Colorful T-shirt - Default", - slug="colorful-t-shirt-default", - price=SkuFieldDataPrice(value=2499.0, unit="USD", currency="USD"), - ), - ) - ], - ) - validate_response(response, expected_response, expected_types) - - async_response = await async_client.products.create_sku( - site_id="580e63e98c9a982ac9b8b741", - product_id="580e63fc8c9a982ac9b8b745", - skus=[ - Sku( - id="66072fb71b89448912e2681c", - cms_locale_id="653ad57de882f528b32e810e", - last_published=datetime.datetime.fromisoformat("2023-03-17 18:47:35+00:00"), - last_updated=datetime.datetime.fromisoformat("2023-03-17 18:47:35+00:00"), - created_on=datetime.datetime.fromisoformat("2023-03-17 18:47:35+00:00"), - field_data=SkuFieldData( - name="Colorful T-shirt - Default", - slug="colorful-t-shirt-default", - price=SkuFieldDataPrice(value=2499.0, unit="USD", currency="USD"), - ), - ) - ], - ) - validate_response(async_response, expected_response, expected_types) - - -async def test_update_sku(client: Webflow, async_client: AsyncWebflow) -> None: - expected_response: typing.Any = { - "id": "66072fb71b89448912e2681c", - "cmsLocaleId": "653ad57de882f528b32e810e", - "lastPublished": "2023-03-17T18:47:35Z", - "lastUpdated": "2023-03-17T18:47:35Z", - "createdOn": "2023-03-17T18:47:35Z", - "fieldData": { - "sku-values": {"color": "blue", "size": "small"}, - "name": "Colorful T-shirt - Default", - "slug": "colorful-t-shirt-default", - "price": {"value": 2499, "unit": "USD", "currency": "USD"}, - "compare-at-price": {"value": 100, "unit": "USD"}, - "ec-sku-billing-method": "one-time", - "ec-sku-subscription-plan": {"interval": "day", "frequency": 1, "trial": 7, "plans": [{}]}, - "main-image": "https://www.example.com/image.jpg", - "sku": "1234567890", - "sku-properties": [ - { - "id": "Color", - "name": "Color", - "enum": [{"id": "royal-blue", "name": "Royal Blue", "slug": "royal-blue"}], - } - ], - }, - } - expected_types: typing.Any = { - "id": None, - "cmsLocaleId": None, - "lastPublished": "datetime", - "lastUpdated": "datetime", - "createdOn": "datetime", - "fieldData": { - "sku-values": ("dict", {0: (None, None), 1: (None, None)}), - "name": None, - "slug": None, - "price": {"value": None, "unit": None, "currency": None}, - "compare-at-price": {"value": None, "unit": None}, - "ec-sku-billing-method": None, - "ec-sku-subscription-plan": { - "interval": None, - "frequency": None, - "trial": None, - "plans": ("list", {0: {}}), - }, - "main-image": None, - "sku": None, - "sku-properties": ( - "list", - {0: {"id": None, "name": None, "enum": ("list", {0: {"id": None, "name": None, "slug": None}})}}, - ), - }, - } - response = client.products.update_sku( - site_id="580e63e98c9a982ac9b8b741", - product_id="580e63fc8c9a982ac9b8b745", - sku_id="5e8518516e147040726cc415", - sku=Sku( - id="66072fb71b89448912e2681c", - cms_locale_id="653ad57de882f528b32e810e", - last_published=datetime.datetime.fromisoformat("2023-03-17 18:47:35+00:00"), - last_updated=datetime.datetime.fromisoformat("2023-03-17 18:47:35+00:00"), - created_on=datetime.datetime.fromisoformat("2023-03-17 18:47:35+00:00"), - field_data=SkuFieldData( - name="Colorful T-shirt - Default", - slug="colorful-t-shirt-default", - price=SkuFieldDataPrice(value=2499.0, unit="USD", currency="USD"), - ), - ), - ) - validate_response(response, expected_response, expected_types) - - async_response = await async_client.products.update_sku( - site_id="580e63e98c9a982ac9b8b741", - product_id="580e63fc8c9a982ac9b8b745", - sku_id="5e8518516e147040726cc415", - sku=Sku( - id="66072fb71b89448912e2681c", - cms_locale_id="653ad57de882f528b32e810e", - last_published=datetime.datetime.fromisoformat("2023-03-17 18:47:35+00:00"), - last_updated=datetime.datetime.fromisoformat("2023-03-17 18:47:35+00:00"), - created_on=datetime.datetime.fromisoformat("2023-03-17 18:47:35+00:00"), - field_data=SkuFieldData( - name="Colorful T-shirt - Default", - slug="colorful-t-shirt-default", - price=SkuFieldDataPrice(value=2499.0, unit="USD", currency="USD"), - ), - ), - ) - validate_response(async_response, expected_response, expected_types) diff --git a/tests/test_scripts.py b/tests/test_scripts.py deleted file mode 100644 index f81f7fc..0000000 --- a/tests/test_scripts.py +++ /dev/null @@ -1,159 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -from webflow import Webflow -from webflow import AsyncWebflow -import typing -from .utilities import validate_response - - -async def test_list_(client: Webflow, async_client: AsyncWebflow) -> None: - expected_response: typing.Any = { - "registeredScripts": [ - { - "id": "alert", - "canCopy": False, - "displayName": "Alert", - "hostedLocation": "https://cdn.webflow.io/.../alert-0.0.1.js", - "integrityHash": "integrityHash", - "createdOn": "2022-10-26T00:28:54.191Z", - "lastUpdated": "lastUpdated", - "version": "0.0.1", - }, - { - "id": "alert", - "canCopy": False, - "displayName": "Alert", - "hostedLocation": "https://cdn.webflow.io/.../alert-0.0.2.js", - "integrityHash": "integrityHash", - "createdOn": "2022-10-26T00:28:54.191Z", - "lastUpdated": "lastUpdated", - "version": "0.0.2", - }, - { - "id": "cms_slider", - "canCopy": True, - "displayName": "CMS Slider", - "hostedLocation": "https://cdn.jsdelivr.net/.../cms_slider.js", - "integrityHash": "sha384-J+YlJ8v0gpaRoKH7SbFbEmxOZlAxLiwNjfSsBhDooGa5roXlPPpXbEevck4J7YZ+", - "createdOn": "2022-10-26T00:28:54.191Z", - "lastUpdated": "lastUpdated", - "version": "1.0.0", - }, - ], - "pagination": {"limit": 100, "offset": 0, "total": 3}, - } - expected_types: typing.Any = { - "registeredScripts": ( - "list", - { - 0: { - "id": None, - "canCopy": None, - "displayName": None, - "hostedLocation": None, - "integrityHash": None, - "createdOn": None, - "lastUpdated": None, - "version": None, - }, - 1: { - "id": None, - "canCopy": None, - "displayName": None, - "hostedLocation": None, - "integrityHash": None, - "createdOn": None, - "lastUpdated": None, - "version": None, - }, - 2: { - "id": None, - "canCopy": None, - "displayName": None, - "hostedLocation": None, - "integrityHash": None, - "createdOn": None, - "lastUpdated": None, - "version": None, - }, - }, - ), - "pagination": {"limit": "integer", "offset": "integer", "total": "integer"}, - } - response = client.scripts.list(site_id="580e63e98c9a982ac9b8b741") - validate_response(response, expected_response, expected_types) - - async_response = await async_client.scripts.list(site_id="580e63e98c9a982ac9b8b741") - validate_response(async_response, expected_response, expected_types) - - -async def test_register_hosted(client: Webflow, async_client: AsyncWebflow) -> None: - expected_response: typing.Any = { - "id": "cms_slider", - "canCopy": True, - "displayName": "CMS Slider", - "hostedLocation": "https://cdn.jsdelivr.net/.../cmsslider.js", - "integrityHash": "sha384-J+YlJ8v0gpaRoKH7SbFbEmxOZlAxLiwNjfSsBhDooGa5roXlPPpXbEevck4J7YZ+", - "createdOn": "2022-10-26T00:28:54.191Z", - "lastUpdated": "lastUpdated", - "version": "1.0.0", - } - expected_types: typing.Any = { - "id": None, - "canCopy": None, - "displayName": None, - "hostedLocation": None, - "integrityHash": None, - "createdOn": None, - "lastUpdated": None, - "version": None, - } - response = client.scripts.register_hosted( - site_id="580e63e98c9a982ac9b8b741", - hosted_location="hostedLocation", - integrity_hash="integrityHash", - version="version", - display_name="displayName", - ) - validate_response(response, expected_response, expected_types) - - async_response = await async_client.scripts.register_hosted( - site_id="580e63e98c9a982ac9b8b741", - hosted_location="hostedLocation", - integrity_hash="integrityHash", - version="version", - display_name="displayName", - ) - validate_response(async_response, expected_response, expected_types) - - -async def test_register_inline(client: Webflow, async_client: AsyncWebflow) -> None: - expected_response: typing.Any = { - "id": "alert", - "canCopy": False, - "displayName": "Alert", - "hostedLocation": "https://uploads-ssl.webflow.com/6258612d1ee792848f805dcf%2F64b6c769ff52ba6c3d904a91%2F660d6e15b3d1696f2d2b1447%2Falert-0.0.1.js", - "integrityHash": "integrityHash", - "createdOn": "2022-10-26T00:28:54.191Z", - "lastUpdated": "lastUpdated", - "version": "0.0.1", - } - expected_types: typing.Any = { - "id": None, - "canCopy": None, - "displayName": None, - "hostedLocation": None, - "integrityHash": None, - "createdOn": None, - "lastUpdated": None, - "version": None, - } - response = client.scripts.register_inline( - site_id="580e63e98c9a982ac9b8b741", source_code="alert('hello world');", version="0.0.1", display_name="Alert" - ) - validate_response(response, expected_response, expected_types) - - async_response = await async_client.scripts.register_inline( - site_id="580e63e98c9a982ac9b8b741", source_code="alert('hello world');", version="0.0.1", display_name="Alert" - ) - validate_response(async_response, expected_response, expected_types) diff --git a/tests/test_sites.py b/tests/test_sites.py deleted file mode 100644 index d1fc7bc..0000000 --- a/tests/test_sites.py +++ /dev/null @@ -1,645 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -from webflow import Webflow -from webflow import AsyncWebflow -import typing -from .utilities import validate_response - - -async def test_create(client: Webflow, async_client: AsyncWebflow) -> None: - expected_response: typing.Any = { - "id": "670ecf86817e3cc7a510eb6a", - "workspaceId": "625860a7a6c16d624927122f", - "createdOn": "2024-10-15T20:24:38Z", - "displayName": "The Hitchiker's Guide", - "shortName": "hitchikers-guide", - "lastPublished": "2016-10-24T19:43:17Z", - "lastUpdated": "2024-10-15T20:24:38Z", - "previewUrl": "https://dev-assets.website-files.com/580e63e98c9a982ac9b8b741/201610241243.png", - "timeZone": "America/Los_Angeles", - "parentFolderId": "670ece123598db72d9648be1", - "customDomains": [ - {"id": "589a331aa51e760df7ccb89d", "url": "test-api-domain.com", "lastPublished": "2022-12-07T16:51:37Z"} - ], - "locales": { - "primary": { - "id": "653fd9af6a07fc9cfd7a5e57", - "cmsLocaleId": "653ad57de882f528b32e810e", - "enabled": False, - "displayName": "English (United States)", - "displayImageId": "displayImageId", - "redirect": True, - "subdirectory": "", - "tag": "en-US", - }, - "secondary": [ - { - "id": "653fd9af6a07fc9cfd7a5e57", - "cmsLocaleId": "653ad57de882f528b32e810e", - "enabled": False, - "displayName": "English (United States)", - "redirect": True, - "subdirectory": "", - "tag": "en-US", - } - ], - }, - "dataCollectionEnabled": True, - "dataCollectionType": "always", - } - expected_types: typing.Any = { - "id": None, - "workspaceId": None, - "createdOn": "datetime", - "displayName": None, - "shortName": None, - "lastPublished": "datetime", - "lastUpdated": "datetime", - "previewUrl": None, - "timeZone": None, - "parentFolderId": None, - "customDomains": ("list", {0: {"id": None, "url": None, "lastPublished": "datetime"}}), - "locales": { - "primary": { - "id": None, - "cmsLocaleId": None, - "enabled": None, - "displayName": None, - "displayImageId": None, - "redirect": None, - "subdirectory": None, - "tag": None, - }, - "secondary": ( - "list", - { - 0: { - "id": None, - "cmsLocaleId": None, - "enabled": None, - "displayName": None, - "redirect": None, - "subdirectory": None, - "tag": None, - } - }, - ), - }, - "dataCollectionEnabled": None, - "dataCollectionType": None, - } - response = client.sites.create(workspace_id="580e63e98c9a982ac9b8b741", name="The Hitchhiker's Guide to the Galaxy") - validate_response(response, expected_response, expected_types) - - async_response = await async_client.sites.create( - workspace_id="580e63e98c9a982ac9b8b741", name="The Hitchhiker's Guide to the Galaxy" - ) - validate_response(async_response, expected_response, expected_types) - - -async def test_list_(client: Webflow, async_client: AsyncWebflow) -> None: - expected_response: typing.Any = { - "sites": [ - { - "id": "42e63e98c9a982ac9b8b741", - "workspaceId": "42e63fc8c9a982ac9b8b744", - "createdOn": "1979-10-12T12:00:00Z", - "displayName": "Heart of Gold Spaceship", - "shortName": "heart-of-gold", - "lastPublished": "2023-04-02T12:42:00Z", - "lastUpdated": "2016-10-24T19:43:17Z", - "previewUrl": "https://dev-assets.website-files.com/42e63e98c9a982ac9b8b741/197910121200.png", - "timeZone": "DeepSpace/InfiniteImprobability", - "parentFolderId": "1as2d3f4g5h6j7k8l9z0x1c2v3b4n5m6", - "customDomains": [ - { - "id": "589a331aa51e760df7ccb89e", - "url": "heartofgold.galaxy", - "lastPublished": "2022-12-07T16:51:37Z", - } - ], - "locales": { - "primary": { - "id": "653fd9af6a07fc9cfd7a5e57", - "cmsLocaleId": "653ad57de882f528b32e810e", - "enabled": True, - "displayName": "English - Heart of Gold Standard", - "redirect": False, - "subdirectory": "/en", - "tag": "The Ultimate Answer", - }, - "secondary": [ - { - "id": "653fd9af6a07fc9cfd7a5e58", - "cmsLocaleId": "653ad57de882f528b32e810g", - "enabled": True, - "displayName": "Betelgeusian - Vogon Liaison", - "redirect": True, - "subdirectory": "/bet", - "tag": "Vogon", - }, - { - "id": "653fd9af6a07fc9cfd7a5e59", - "cmsLocaleId": "653ad57de882f528b32e810h", - "enabled": False, - "displayName": "Magrathean - Custom Planet Designs", - "redirect": True, - "subdirectory": "/mg", - "tag": "Magrathean", - }, - ], - }, - "dataCollectionEnabled": True, - "dataCollectionType": "always", - }, - { - "id": "42e63e98c9a982ac9b8b742", - "workspaceId": "42e63fc8c9a982ac9b8b745", - "createdOn": "1981-10-12T12:00:00Z", - "displayName": "Marvin's Personal Blog", - "shortName": "paranoid-android", - "lastPublished": "2023-04-02T12:45:00Z", - "lastUpdated": "2016-10-24T19:43:17Z", - "previewUrl": "https://dev-assets.website-files.com/42e63e98c9a982ac9b8b742/198110121200.png", - "timeZone": "DeepSpace/Depression", - "parentFolderId": "1as2d3f4g5h6j7k8l9z0x1c2v3b4n5m6", - "customDomains": [ - {"id": "589a331aa51e760df7ccb89f", "url": "marvin.blog", "lastPublished": "2022-12-07T16:51:37Z"} - ], - "locales": { - "primary": { - "id": "653fd9af6a07fc9cfd7a5e57", - "cmsLocaleId": "653ad57de882f528b32e810e", - "enabled": True, - "displayName": "English - Marvin's Musings", - "redirect": False, - "subdirectory": "/en", - "tag": "English", - }, - "secondary": [ - { - "id": "653fd9af6a07fc9cfd7a5e56", - "cmsLocaleId": "653ad57de882f528b32e810f", - "enabled": True, - "displayName": "Squornshellous - Mattress Speak", - "redirect": True, - "subdirectory": "/sr", - "tag": "Squornshellous", - } - ], - }, - "dataCollectionEnabled": True, - "dataCollectionType": "always", - }, - { - "id": "42e63e98c9a982ac9b8b743", - "workspaceId": "42e63fc8c9a982ac9b8b746", - "createdOn": "1982-10-12T12:00:00Z", - "displayName": "Vogon Poetry Archive", - "shortName": "vogon-poetry", - "lastPublished": "2023-04-02T12:50:00Z", - "lastUpdated": "2016-10-24T19:43:17Z", - "previewUrl": "https://dev-assets.website-files.com/42e63e98c9a982ac9b8b743/198210121200.png", - "timeZone": "Vogsphere/PoetryHall", - "parentFolderId": "1as2d3f4g5h6j7k8l9z0x1c2v3b4n5m6", - "customDomains": [ - { - "id": "589a331aa51e760df7ccb8a0", - "url": "vogonpoetry.galaxy", - "lastPublished": "2022-12-07T16:51:37Z", - } - ], - "locales": { - "primary": { - "id": "653fd9af6a07fc9cfd7a5e55", - "cmsLocaleId": "653ad57de882f528b32e810d", - "enabled": True, - "displayName": "English - Vogon Verse", - "redirect": False, - "subdirectory": "/en", - "tag": "Third Worst Poetry", - }, - "secondary": [ - { - "id": "653fd9af6a07fc9cfd7a5e54", - "cmsLocaleId": "653ad57de882f528b32e810c", - "enabled": True, - "displayName": "Galactic - Universal Language", - "redirect": True, - "subdirectory": "/gl", - "tag": "Pan-Galactic Gargle Blaster", - } - ], - }, - "dataCollectionEnabled": True, - "dataCollectionType": "always", - }, - ] - } - expected_types: typing.Any = { - "sites": ( - "list", - { - 0: { - "id": None, - "workspaceId": None, - "createdOn": "datetime", - "displayName": None, - "shortName": None, - "lastPublished": "datetime", - "lastUpdated": "datetime", - "previewUrl": None, - "timeZone": None, - "parentFolderId": None, - "customDomains": ("list", {0: {"id": None, "url": None, "lastPublished": "datetime"}}), - "locales": { - "primary": { - "id": None, - "cmsLocaleId": None, - "enabled": None, - "displayName": None, - "redirect": None, - "subdirectory": None, - "tag": None, - }, - "secondary": ( - "list", - { - 0: { - "id": None, - "cmsLocaleId": None, - "enabled": None, - "displayName": None, - "redirect": None, - "subdirectory": None, - "tag": None, - }, - 1: { - "id": None, - "cmsLocaleId": None, - "enabled": None, - "displayName": None, - "redirect": None, - "subdirectory": None, - "tag": None, - }, - }, - ), - }, - "dataCollectionEnabled": None, - "dataCollectionType": None, - }, - 1: { - "id": None, - "workspaceId": None, - "createdOn": "datetime", - "displayName": None, - "shortName": None, - "lastPublished": "datetime", - "lastUpdated": "datetime", - "previewUrl": None, - "timeZone": None, - "parentFolderId": None, - "customDomains": ("list", {0: {"id": None, "url": None, "lastPublished": "datetime"}}), - "locales": { - "primary": { - "id": None, - "cmsLocaleId": None, - "enabled": None, - "displayName": None, - "redirect": None, - "subdirectory": None, - "tag": None, - }, - "secondary": ( - "list", - { - 0: { - "id": None, - "cmsLocaleId": None, - "enabled": None, - "displayName": None, - "redirect": None, - "subdirectory": None, - "tag": None, - } - }, - ), - }, - "dataCollectionEnabled": None, - "dataCollectionType": None, - }, - 2: { - "id": None, - "workspaceId": None, - "createdOn": "datetime", - "displayName": None, - "shortName": None, - "lastPublished": "datetime", - "lastUpdated": "datetime", - "previewUrl": None, - "timeZone": None, - "parentFolderId": None, - "customDomains": ("list", {0: {"id": None, "url": None, "lastPublished": "datetime"}}), - "locales": { - "primary": { - "id": None, - "cmsLocaleId": None, - "enabled": None, - "displayName": None, - "redirect": None, - "subdirectory": None, - "tag": None, - }, - "secondary": ( - "list", - { - 0: { - "id": None, - "cmsLocaleId": None, - "enabled": None, - "displayName": None, - "redirect": None, - "subdirectory": None, - "tag": None, - } - }, - ), - }, - "dataCollectionEnabled": None, - "dataCollectionType": None, - }, - }, - ) - } - response = client.sites.list() - validate_response(response, expected_response, expected_types) - - async_response = await async_client.sites.list() - validate_response(async_response, expected_response, expected_types) - - -async def test_get(client: Webflow, async_client: AsyncWebflow) -> None: - expected_response: typing.Any = { - "id": "42e98c9a982ac9b8b742", - "workspaceId": "42e63e98c9a982ac9b8b742", - "createdOn": "1979-10-12T12:00:00Z", - "displayName": "The Hitchhiker's Guide to the Galaxy", - "shortName": "hitchhikers-guide", - "lastPublished": "2023-04-02T12:42:00Z", - "lastUpdated": "2023-04-02T12:42:00Z", - "previewUrl": "https://screenshots.webflow.com/sites/6258612d1ee792848f805dcf/20231219211811_d5990556c743f33b7071300a03bf67e6.png", - "timeZone": "Magrathea/FactoryFloor", - "parentFolderId": "1as2d3f4g5h6j7k8l9z0x1c2v3b4n5m6", - "customDomains": [ - { - "id": "589a331aa51e760df7ccb89d", - "url": "hitchhikersguide.galaxy", - "lastPublished": "2022-12-07T16:51:37Z", - }, - {"id": "589a331aa51e760df7ccb89e", "url": "heartofgold.spaceship", "lastPublished": "2022-12-07T16:51:37Z"}, - ], - "locales": { - "primary": { - "id": "653fd9af6a07fc9cfd7a5e57", - "cmsLocaleId": "653ad57de882f528b32e810e", - "enabled": False, - "displayName": "English (United States)", - "displayImageId": "displayImageId", - "redirect": True, - "subdirectory": "", - "tag": "en-US", - }, - "secondary": [ - { - "id": "653fd9af6a07fc9cfd7a5e57", - "cmsLocaleId": "653ad57de882f528b32e810e", - "enabled": False, - "displayName": "English (United States)", - "redirect": True, - "subdirectory": "", - "tag": "en-US", - } - ], - }, - "dataCollectionEnabled": True, - "dataCollectionType": "always", - } - expected_types: typing.Any = { - "id": None, - "workspaceId": None, - "createdOn": "datetime", - "displayName": None, - "shortName": None, - "lastPublished": "datetime", - "lastUpdated": "datetime", - "previewUrl": None, - "timeZone": None, - "parentFolderId": None, - "customDomains": ( - "list", - { - 0: {"id": None, "url": None, "lastPublished": "datetime"}, - 1: {"id": None, "url": None, "lastPublished": "datetime"}, - }, - ), - "locales": { - "primary": { - "id": None, - "cmsLocaleId": None, - "enabled": None, - "displayName": None, - "displayImageId": None, - "redirect": None, - "subdirectory": None, - "tag": None, - }, - "secondary": ( - "list", - { - 0: { - "id": None, - "cmsLocaleId": None, - "enabled": None, - "displayName": None, - "redirect": None, - "subdirectory": None, - "tag": None, - } - }, - ), - }, - "dataCollectionEnabled": None, - "dataCollectionType": None, - } - response = client.sites.get(site_id="580e63e98c9a982ac9b8b741") - validate_response(response, expected_response, expected_types) - - async_response = await async_client.sites.get(site_id="580e63e98c9a982ac9b8b741") - validate_response(async_response, expected_response, expected_types) - - -async def test_delete(client: Webflow, async_client: AsyncWebflow) -> None: - # Type ignore to avoid mypy complaining about the function not being meant to return a value - assert ( - client.sites.delete(site_id="580e63e98c9a982ac9b8b741") # type: ignore[func-returns-value] - is None - ) - - assert ( - await async_client.sites.delete(site_id="580e63e98c9a982ac9b8b741") # type: ignore[func-returns-value] - is None - ) - - -async def test_update(client: Webflow, async_client: AsyncWebflow) -> None: - expected_response: typing.Any = { - "id": "42e98c9a982ac9b8b742", - "workspaceId": "42e63e98c9a982ac9b8b742", - "createdOn": "1979-10-12T12:00:00Z", - "displayName": "The Hitchhiker's Guide to the Galaxy", - "shortName": "hitchhikers-guide", - "lastPublished": "2023-04-02T12:42:00Z", - "lastUpdated": "2023-04-02T12:42:00Z", - "previewUrl": "https://screenshots.webflow.com/sites/6258612d1ee792848f805dcf/20231219211811_d5990556c743f33b7071300a03bf67e6.png", - "timeZone": "Magrathea/FactoryFloor", - "parentFolderId": "1as2d3f4g5h6j7k8l9z0x1c2v3b4n5m6", - "customDomains": [ - { - "id": "589a331aa51e760df7ccb89d", - "url": "hitchhikersguide.galaxy", - "lastPublished": "2022-12-07T16:51:37Z", - }, - {"id": "589a331aa51e760df7ccb89e", "url": "heartofgold.spaceship", "lastPublished": "2022-12-07T16:51:37Z"}, - ], - "locales": { - "primary": { - "id": "653fd9af6a07fc9cfd7a5e57", - "cmsLocaleId": "653ad57de882f528b32e810e", - "enabled": False, - "displayName": "English (United States)", - "displayImageId": "displayImageId", - "redirect": True, - "subdirectory": "", - "tag": "en-US", - }, - "secondary": [ - { - "id": "653fd9af6a07fc9cfd7a5e57", - "cmsLocaleId": "653ad57de882f528b32e810e", - "enabled": False, - "displayName": "English (United States)", - "redirect": True, - "subdirectory": "", - "tag": "en-US", - } - ], - }, - "dataCollectionEnabled": True, - "dataCollectionType": "always", - } - expected_types: typing.Any = { - "id": None, - "workspaceId": None, - "createdOn": "datetime", - "displayName": None, - "shortName": None, - "lastPublished": "datetime", - "lastUpdated": "datetime", - "previewUrl": None, - "timeZone": None, - "parentFolderId": None, - "customDomains": ( - "list", - { - 0: {"id": None, "url": None, "lastPublished": "datetime"}, - 1: {"id": None, "url": None, "lastPublished": "datetime"}, - }, - ), - "locales": { - "primary": { - "id": None, - "cmsLocaleId": None, - "enabled": None, - "displayName": None, - "displayImageId": None, - "redirect": None, - "subdirectory": None, - "tag": None, - }, - "secondary": ( - "list", - { - 0: { - "id": None, - "cmsLocaleId": None, - "enabled": None, - "displayName": None, - "redirect": None, - "subdirectory": None, - "tag": None, - } - }, - ), - }, - "dataCollectionEnabled": None, - "dataCollectionType": None, - } - response = client.sites.update(site_id="580e63e98c9a982ac9b8b741") - validate_response(response, expected_response, expected_types) - - async_response = await async_client.sites.update(site_id="580e63e98c9a982ac9b8b741") - validate_response(async_response, expected_response, expected_types) - - -async def test_get_custom_domain(client: Webflow, async_client: AsyncWebflow) -> None: - expected_response: typing.Any = { - "customDomains": [ - { - "id": "589a331aa51e760df7ccb89d", - "url": "hitchhikersguide.galaxy", - "lastPublished": "2022-12-07T16:51:37Z", - }, - {"id": "589a331aa51e760df7ccb89e", "url": "heartofgold.spaceship", "lastPublished": "2022-12-07T16:51:37Z"}, - ] - } - expected_types: typing.Any = { - "customDomains": ( - "list", - { - 0: {"id": None, "url": None, "lastPublished": "datetime"}, - 1: {"id": None, "url": None, "lastPublished": "datetime"}, - }, - ) - } - response = client.sites.get_custom_domain(site_id="580e63e98c9a982ac9b8b741") - validate_response(response, expected_response, expected_types) - - async_response = await async_client.sites.get_custom_domain(site_id="580e63e98c9a982ac9b8b741") - validate_response(async_response, expected_response, expected_types) - - -async def test_publish(client: Webflow, async_client: AsyncWebflow) -> None: - expected_response: typing.Any = { - "customDomains": [ - {"id": "589a331aa51e760df7ccb89d", "url": "test-api-domain.com", "lastPublished": "2022-12-07T16:51:37Z"} - ], - "publishToWebflowSubdomain": True, - } - expected_types: typing.Any = { - "customDomains": ("list", {0: {"id": None, "url": None, "lastPublished": "datetime"}}), - "publishToWebflowSubdomain": None, - } - response = client.sites.publish( - site_id="580e63e98c9a982ac9b8b741", - custom_domains=["660c6449dd97ebc7346ac629", "660c6449dd97ebc7346ac62f"], - publish_to_webflow_subdomain=False, - ) - validate_response(response, expected_response, expected_types) - - async_response = await async_client.sites.publish( - site_id="580e63e98c9a982ac9b8b741", - custom_domains=["660c6449dd97ebc7346ac629", "660c6449dd97ebc7346ac62f"], - publish_to_webflow_subdomain=False, - ) - validate_response(async_response, expected_response, expected_types) diff --git a/tests/test_token.py b/tests/test_token.py deleted file mode 100644 index d81bdea..0000000 --- a/tests/test_token.py +++ /dev/null @@ -1,66 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -from webflow import Webflow -from webflow import AsyncWebflow -import typing -from .utilities import validate_response - - -async def test_authorized_by(client: Webflow, async_client: AsyncWebflow) -> None: - expected_response: typing.Any = { - "id": "545bbecb7bdd6769632504a7", - "email": "some@email.com", - "firstName": "Some", - "lastName": "One", - } - expected_types: typing.Any = {"id": None, "email": None, "firstName": None, "lastName": None} - response = client.token.authorized_by() - validate_response(response, expected_response, expected_types) - - async_response = await async_client.token.authorized_by() - validate_response(async_response, expected_response, expected_types) - - -async def test_introspect(client: Webflow, async_client: AsyncWebflow) -> None: - expected_response: typing.Any = { - "authorization": { - "id": "55818d58616600637b9a5786", - "createdOn": "2016-10-03T23:12:00Z", - "lastUsed": "2016-10-10T21:41:12Z", - "grantType": "authorization_code", - "rateLimit": 60, - "scope": "assets:read,assets:write", - "authorizedTo": { - "siteIds": ["62f3b1f7eafac55d0c64ef91"], - "workspaceIds": ["52f3b1f7eafac55d0c64ef91"], - "userIds": ["545bbecb7bdd6769632504a7"], - }, - }, - "application": { - "id": "55131cd036c09f7d07883dfc", - "description": "My Amazing App", - "homepage": "https://webflow.com", - "displayName": "My Amazing App", - }, - } - expected_types: typing.Any = { - "authorization": { - "id": None, - "createdOn": "datetime", - "lastUsed": "datetime", - "grantType": None, - "rateLimit": "integer", - "scope": None, - "authorizedTo": { - "siteIds": ("list", {0: None}), - "workspaceIds": ("list", {0: None}), - "userIds": ("list", {0: None}), - }, - }, - "application": {"id": None, "description": None, "homepage": None, "displayName": None}, - } - response = client.token.introspect() - validate_response(response, expected_response, expected_types) - - async_response = await async_client.token.introspect() - validate_response(async_response, expected_response, expected_types) diff --git a/tests/test_webhooks.py b/tests/test_webhooks.py deleted file mode 100644 index ea9884c..0000000 --- a/tests/test_webhooks.py +++ /dev/null @@ -1,175 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -from webflow import Webflow -from webflow import AsyncWebflow -import typing -from .utilities import validate_response -import datetime - - -async def test_list_(client: Webflow, async_client: AsyncWebflow) -> None: - expected_response: typing.Any = { - "webhooks": [ - { - "id": "57ca0a9e418c504a6e1acbb6", - "triggerType": "form_submission", - "url": "https://webhook.site/7f7f7f7f-7f7f-7f7f-7f7f-7f7f7f7f7f7f", - "workspaceId": "4f4e46fd476ea8c507000001", - "siteId": "562ac0395358780a1f5e6fbd", - "filter": {"name": "Email Form"}, - "lastTriggered": "2023-02-08T23:59:28Z", - "createdOn": "2016-09-02T23:26:22Z", - }, - { - "id": "578d85cce0c47cd2865f4cf2", - "triggerType": "form_submission", - "url": "https://webhook.site/7f7f7f7f-7f7f-7f7f-7f7f-7f7f7f7f7f7f", - "workspaceId": "4f4e46fd476ea8c507000001", - "siteId": "562ac0395358780a1f5e6fbd", - "filter": {"name": "Email Form"}, - "lastTriggered": "2023-02-08T23:59:28Z", - "createdOn": "2016-07-19T01:43:40Z", - }, - { - "id": "578d85cce0c47cd2865f4cf3", - "triggerType": "form_submission", - "url": "https://webhook.site/7f7f7f7f-7f7f-7f7f-7f7f-7f7f7f7f7f7f", - "workspaceId": "4f4e46fd476ea8c507000001", - "siteId": "562ac0395358780a1f5e6fbd", - "filter": {"name": "Email Form"}, - "lastTriggered": "2023-02-08T23:59:28Z", - "createdOn": "2016-07-19T01:43:40Z", - }, - ], - "pagination": {"limit": 100, "offset": 0, "total": 100}, - } - expected_types: typing.Any = { - "webhooks": ( - "list", - { - 0: { - "id": None, - "triggerType": None, - "url": None, - "workspaceId": None, - "siteId": None, - "filter": {"name": None}, - "lastTriggered": "datetime", - "createdOn": "datetime", - }, - 1: { - "id": None, - "triggerType": None, - "url": None, - "workspaceId": None, - "siteId": None, - "filter": {"name": None}, - "lastTriggered": "datetime", - "createdOn": "datetime", - }, - 2: { - "id": None, - "triggerType": None, - "url": None, - "workspaceId": None, - "siteId": None, - "filter": {"name": None}, - "lastTriggered": "datetime", - "createdOn": "datetime", - }, - }, - ), - "pagination": {"limit": "integer", "offset": "integer", "total": "integer"}, - } - response = client.webhooks.list(site_id="580e63e98c9a982ac9b8b741") - validate_response(response, expected_response, expected_types) - - async_response = await async_client.webhooks.list(site_id="580e63e98c9a982ac9b8b741") - validate_response(async_response, expected_response, expected_types) - - -async def test_create(client: Webflow, async_client: AsyncWebflow) -> None: - expected_response: typing.Any = { - "id": "582266e0cd48de0f0e3c6d8b", - "triggerType": "form_submission", - "url": "https://webhook.site/7f7f7f7f-7f7f-7f7f-7f7f-7f7f7f7f7f7f", - "workspaceId": "4f4e46fd476ea8c507000001", - "siteId": "562ac0395358780a1f5e6fbd", - "filter": {"name": "My Form"}, - "lastTriggered": "2023-02-08T23:59:28Z", - "createdOn": "2022-11-08T23:59:28Z", - } - expected_types: typing.Any = { - "id": None, - "triggerType": None, - "url": None, - "workspaceId": None, - "siteId": None, - "filter": {"name": None}, - "lastTriggered": "datetime", - "createdOn": "datetime", - } - response = client.webhooks.create( - site_id_="580e63e98c9a982ac9b8b741", - id="582266e0cd48de0f0e3c6d8b", - trigger_type="form_submission", - url="https://webhook.site/7f7f7f7f-7f7f-7f7f-7f7f-7f7f7f7f7f7f", - workspace_id="4f4e46fd476ea8c507000001", - site_id="562ac0395358780a1f5e6fbd", - last_triggered=datetime.datetime.fromisoformat("2023-02-08 23:59:28+00:00"), - created_on=datetime.datetime.fromisoformat("2022-11-08 23:59:28+00:00"), - ) - validate_response(response, expected_response, expected_types) - - async_response = await async_client.webhooks.create( - site_id_="580e63e98c9a982ac9b8b741", - id="582266e0cd48de0f0e3c6d8b", - trigger_type="form_submission", - url="https://webhook.site/7f7f7f7f-7f7f-7f7f-7f7f-7f7f7f7f7f7f", - workspace_id="4f4e46fd476ea8c507000001", - site_id="562ac0395358780a1f5e6fbd", - last_triggered=datetime.datetime.fromisoformat("2023-02-08 23:59:28+00:00"), - created_on=datetime.datetime.fromisoformat("2022-11-08 23:59:28+00:00"), - ) - validate_response(async_response, expected_response, expected_types) - - -async def test_get(client: Webflow, async_client: AsyncWebflow) -> None: - expected_response: typing.Any = { - "id": "582266e0cd48de0f0e3c6d8b", - "triggerType": "form_submission", - "url": "https://webhook.site/7f7f7f7f-7f7f-7f7f-7f7f-7f7f7f7f7f7f", - "workspaceId": "4f4e46fd476ea8c507000001", - "siteId": "562ac0395358780a1f5e6fbd", - "filter": {"name": "My Form"}, - "lastTriggered": "2023-02-08T23:59:28Z", - "createdOn": "2022-11-08T23:59:28Z", - } - expected_types: typing.Any = { - "id": None, - "triggerType": None, - "url": None, - "workspaceId": None, - "siteId": None, - "filter": {"name": None}, - "lastTriggered": "datetime", - "createdOn": "datetime", - } - response = client.webhooks.get(webhook_id="580e64008c9a982ac9b8b754") - validate_response(response, expected_response, expected_types) - - async_response = await async_client.webhooks.get(webhook_id="580e64008c9a982ac9b8b754") - validate_response(async_response, expected_response, expected_types) - - -async def test_delete(client: Webflow, async_client: AsyncWebflow) -> None: - # Type ignore to avoid mypy complaining about the function not being meant to return a value - assert ( - client.webhooks.delete(webhook_id="580e64008c9a982ac9b8b754") # type: ignore[func-returns-value] - is None - ) - - assert ( - await async_client.webhooks.delete(webhook_id="580e64008c9a982ac9b8b754") # type: ignore[func-returns-value] - is None - ) diff --git a/tests/utilities.py b/tests/utilities.py deleted file mode 100644 index 3d22880..0000000 --- a/tests/utilities.py +++ /dev/null @@ -1,162 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing -import uuid - -from dateutil import parser - -import pydantic - - -def cast_field(json_expectation: typing.Any, type_expectation: typing.Any) -> typing.Any: - # Cast these specific types which come through as string and expect our - # models to cast to the correct type. - if type_expectation == "uuid": - return uuid.UUID(json_expectation) - elif type_expectation == "date": - return parser.parse(json_expectation).date() - elif type_expectation == "datetime": - return parser.parse(json_expectation) - elif type_expectation == "set": - return set(json_expectation) - elif type_expectation == "integer": - # Necessary as we allow numeric keys, but JSON makes them strings - return int(json_expectation) - - return json_expectation - - -def validate_field(response: typing.Any, json_expectation: typing.Any, type_expectation: typing.Any) -> None: - # Allow for an escape hatch if the object cannot be validated - if type_expectation == "no_validate": - return - - is_container_of_complex_type = False - # Parse types in containers, note that dicts are handled within `validate_response` - if isinstance(json_expectation, list): - if isinstance(type_expectation, tuple): - container_expectation = type_expectation[0] - contents_expectation = type_expectation[1] - - cast_json_expectation = [] - for idx, ex in enumerate(json_expectation): - if isinstance(contents_expectation, dict): - entry_expectation = contents_expectation.get(idx) - if isinstance(entry_expectation, dict): - is_container_of_complex_type = True - validate_response( - response=response[idx], - json_expectation=ex, - type_expectations=entry_expectation, - ) - else: - cast_json_expectation.append(cast_field(ex, entry_expectation)) - else: - cast_json_expectation.append(ex) - json_expectation = cast_json_expectation - - # Note that we explicitly do not allow for sets of pydantic models as they are not hashable, so - # if any of the values of the set have a type_expectation of a dict, we're assuming it's a pydantic - # model and keeping it a list. - if container_expectation != "set" or not any( - map( - lambda value: isinstance(value, dict), - list(contents_expectation.values()), - ) - ): - json_expectation = cast_field(json_expectation, container_expectation) - elif isinstance(type_expectation, tuple): - container_expectation = type_expectation[0] - contents_expectation = type_expectation[1] - if isinstance(contents_expectation, dict): - json_expectation = { - cast_field( - key, - contents_expectation.get(idx)[0] # type: ignore - if contents_expectation.get(idx) is not None - else None, - ): cast_field( - value, - contents_expectation.get(idx)[1] # type: ignore - if contents_expectation.get(idx) is not None - else None, - ) - for idx, (key, value) in enumerate(json_expectation.items()) - } - else: - json_expectation = cast_field(json_expectation, container_expectation) - elif type_expectation is not None: - json_expectation = cast_field(json_expectation, type_expectation) - - # When dealing with containers of models, etc. we're validating them implicitly, so no need to check the resultant list - if not is_container_of_complex_type: - assert ( - json_expectation == response - ), "Primitives found, expected: {0} (type: {1}), Actual: {2} (type: {3})".format( - json_expectation, type(json_expectation), response, type(response) - ) - - -# Arg type_expectations is a deeply nested structure that matches the response, but with the values replaced with the expected types -def validate_response(response: typing.Any, json_expectation: typing.Any, type_expectations: typing.Any) -> None: - # Allow for an escape hatch if the object cannot be validated - if type_expectations == "no_validate": - return - - if ( - not isinstance(response, list) - and not isinstance(response, dict) - and not issubclass(type(response), pydantic.BaseModel) - ): - validate_field( - response=response, - json_expectation=json_expectation, - type_expectation=type_expectations, - ) - return - - if isinstance(response, list): - assert len(response) == len(json_expectation), "Length mismatch, expected: {0}, Actual: {1}".format( - len(response), len(json_expectation) - ) - content_expectation = type_expectations - if isinstance(type_expectations, tuple): - content_expectation = type_expectations[1] - for idx, item in enumerate(response): - validate_response( - response=item, - json_expectation=json_expectation[idx], - type_expectations=content_expectation[idx], - ) - else: - response_json = response - if issubclass(type(response), pydantic.BaseModel): - response_json = response.dict(by_alias=True) - - for key, value in json_expectation.items(): - assert key in response_json, "Field {0} not found within the response object: {1}".format( - key, response_json - ) - - type_expectation = None - if type_expectations is not None and isinstance(type_expectations, dict): - type_expectation = type_expectations.get(key) - - # If your type_expectation is a tuple then you have a container field, process it as such - # Otherwise, we're just validating a single field that's a pydantic model. - if isinstance(value, dict) and not isinstance(type_expectation, tuple): - validate_response( - response=response_json[key], - json_expectation=value, - type_expectations=type_expectation, - ) - else: - validate_field( - response=response_json[key], - json_expectation=value, - type_expectation=type_expectation, - ) - - # Ensure there are no additional fields here either - del response_json[key] - assert len(response_json) == 0, "Additional fields found, expected None: {0}".format(response_json) diff --git a/tests/workspaces/__init__.py b/tests/workspaces/__init__.py deleted file mode 100644 index f3ea265..0000000 --- a/tests/workspaces/__init__.py +++ /dev/null @@ -1,2 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - diff --git a/tests/workspaces/test_audit_logs.py b/tests/workspaces/test_audit_logs.py deleted file mode 100644 index eb7ea27..0000000 --- a/tests/workspaces/test_audit_logs.py +++ /dev/null @@ -1,61 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -from webflow import Webflow -from webflow import AsyncWebflow -import typing -import datetime -from ..utilities import validate_response - - -async def test_get_workspace_audit_logs(client: Webflow, async_client: AsyncWebflow) -> None: - expected_response: typing.Any = { - "items": [ - { - "eventSubType": "login", - "eventType": "user_access", - "timestamp": "2025-04-29T20:30:06Z", - "actor": {"id": "6661ccb359b561c69f29d554", "email": "someone@email.com"}, - "workspace": {"id": "6621ccb459b561c69f29d57c", "slug": "hitchhikers-workspace"}, - }, - { - "eventSubType": "user_added", - "eventType": "workspace_membership", - "timestamp": "2025-04-30T20:30:06Z", - "actor": {"id": "60492e55bbddce079561cd7a", "email": "someone@webflow.com"}, - "workspace": {"id": "6621ccb459b561c69f29d57c", "slug": "hitchhikers-workspace"}, - }, - { - "eventSubType": "user_added", - "eventType": "site_membership", - "timestamp": "2025-04-30T00:33:31Z", - "actor": {"id": "671fe00d185fc8c1ad409d37", "email": "someone@webflow.com"}, - "workspace": {"id": "6621ccb459b561c69f29d57c", "slug": "hitchhikers-workspace"}, - }, - ], - "pagination": {"limit": 10, "offset": 0, "total": 3}, - } - expected_types: typing.Any = { - "items": ("list", {0: "no_validate", 1: "no_validate", 2: "no_validate"}), - "pagination": {"limit": "integer", "offset": "integer", "total": "integer"}, - } - response = client.workspaces.audit_logs.get_workspace_audit_logs( - workspace_id_or_slug="hitchhikers-workspace", - limit=1, - offset=1, - sort_order="asc", - event_type="user_access", - from_=datetime.datetime.fromisoformat("2025-06-22 16:00:31+00:00"), - to=datetime.datetime.fromisoformat("2025-07-22 16:00:31+00:00"), - ) - validate_response(response, expected_response, expected_types) - - async_response = await async_client.workspaces.audit_logs.get_workspace_audit_logs( - workspace_id_or_slug="hitchhikers-workspace", - limit=1, - offset=1, - sort_order="asc", - event_type="user_access", - from_=datetime.datetime.fromisoformat("2025-06-22 16:00:31+00:00"), - to=datetime.datetime.fromisoformat("2025-07-22 16:00:31+00:00"), - ) - validate_response(async_response, expected_response, expected_types)