From d39790fde9e3147fcc7ece207a84e05b62c0237e Mon Sep 17 00:00:00 2001 From: fern-api <115122769+fern-api[bot]@users.noreply.github.com> Date: Mon, 13 Jan 2025 16:10:45 +0000 Subject: [PATCH] SDK regeneration --- .mock/definition/__package__.yml | 705 +++-- .mock/definition/accessGroups.yml | 6 +- .mock/definition/assets.yml | 19 +- .mock/definition/collections.yml | 11 +- .mock/definition/collections/fields.yml | 30 +- .mock/definition/collections/items.yml | 190 +- .mock/definition/components.yml | 486 +++ .mock/definition/ecommerce.yml | 4 +- .mock/definition/forms.yml | 13 +- .mock/definition/inventory.yml | 10 +- .mock/definition/orders.yml | 20 +- .mock/definition/pages.yml | 155 +- .mock/definition/pages/scripts.yml | 35 +- .mock/definition/products.yml | 18 +- .mock/definition/scripts.yml | 28 +- .mock/definition/sites.yml | 208 +- .mock/definition/sites/activityLogs.yml | 4 +- .mock/definition/sites/plans.yml | 40 + .mock/definition/sites/redirects.yml | 190 ++ .mock/definition/sites/scripts.yml | 37 +- .mock/definition/token.yml | 9 +- .mock/definition/users.yml | 16 +- .mock/definition/webhooks.yml | 18 +- .mock/fern.config.json | 2 +- package.json | 2 +- reference.md | 2622 ++++++++++++----- src/Client.ts | 7 + src/api/errors/index.ts | 2 +- .../resources/accessGroups/client/Client.ts | 4 +- src/api/resources/assets/client/Client.ts | 37 +- .../resources/collections/client/Client.ts | 19 +- .../resources/fields/client/Client.ts | 12 +- .../resources/fields/types/FieldCreateType.ts | 38 +- .../resources/items/client/Client.ts | 76 +- src/api/resources/components/client/Client.ts | 779 +++++ src/api/resources/components/client/index.ts | 1 + .../client/requests/ComponentDomWrite.ts | 36 + .../requests/ComponentPropertiesWrite.ts | 27 + .../requests/ComponentsGetContentRequest.ts | 29 + .../ComponentsGetPropertiesRequest.ts | 24 + .../client/requests/ComponentsListRequest.ts | 18 + .../components/client/requests/index.ts | 5 + src/api/resources/components/index.ts | 2 + .../types/ComponentDomWriteNodesItem.ts | 7 + .../ComponentPropertiesWritePropertiesItem.ts | 17 + .../types/ComponentsUpdateContentResponse.ts | 8 + .../ComponentsUpdatePropertiesResponse.ts | 8 + src/api/resources/components/types/index.ts | 4 + src/api/resources/ecommerce/client/Client.ts | 4 +- src/api/resources/forms/client/Client.ts | 23 +- src/api/resources/index.ts | 3 + src/api/resources/inventory/client/Client.ts | 12 +- src/api/resources/orders/client/Client.ts | 27 +- src/api/resources/pages/client/Client.ts | 63 +- .../pages/client/requests/DomWrite.ts | 29 - .../pages/client/requests/PageDomWrite.ts | 36 + .../resources/pages/client/requests/index.ts | 2 +- .../pages/resources/scripts/client/Client.ts | 23 +- .../pages/types/PageDomWriteNodesItem.ts | 7 + src/api/resources/pages/types/index.ts | 2 +- src/api/resources/products/client/Client.ts | 35 +- src/api/resources/scripts/client/Client.ts | 18 +- src/api/resources/sites/client/Client.ts | 413 ++- .../client/requests/SitesCreateRequest.ts | 18 + .../client/requests/SitesUpdateRequest.ts | 14 + .../resources/sites/client/requests/index.ts | 2 + .../resources/activityLogs/client/Client.ts | 6 +- src/api/resources/sites/resources/index.ts | 2 + .../sites/resources/plans/client/Client.ts | 153 + .../sites/resources/plans/client/index.ts | 1 + .../resources/sites/resources/plans/index.ts | 1 + .../resources/redirects/client/Client.ts | 547 ++++ .../sites/resources/redirects/client/index.ts | 1 + .../sites/resources/redirects/index.ts | 1 + .../sites/resources/scripts/client/Client.ts | 24 +- src/api/resources/token/client/Client.ts | 11 +- src/api/resources/users/client/Client.ts | 22 +- src/api/resources/webhooks/client/Client.ts | 21 +- src/api/types/Component.ts | 19 + src/api/types/ComponentDom.ts | 15 + ...onentInstanceNodePropertyOverridesWrite.ts | 15 + ...ertyOverridesWritePropertyOverridesItem.ts | 15 + src/api/types/ComponentList.ts | 13 + src/api/types/ComponentNode.ts | 17 + src/api/types/ComponentProperties.ts | 15 + src/api/types/ComponentProperty.ts | 19 + src/api/types/ComponentPropertyType.ts | 14 + src/api/types/Dom.ts | 2 +- src/api/types/Domain.ts | 2 + src/api/types/Error_.ts | 2 +- src/api/types/FieldType.ts | 36 +- src/api/types/ImageNode.ts | 9 +- src/api/types/ImageNodeImage.ts | 8 + src/api/types/Node.ts | 22 +- src/api/types/NodeType.ts | 10 - ...sItem.ts => NotEnterprisePlanWorkspace.ts} | 2 +- src/api/types/ProductFieldData.ts | 2 +- src/api/types/Redirect.ts | 15 + src/api/types/Redirects.ts | 14 + src/api/types/ScriptApply.ts | 2 +- src/api/types/SitePlan.ts | 14 + src/api/types/SitePlanId.ts | 35 + src/api/types/SitePlanName.ts | 23 + src/api/types/Text.ts | 10 + src/api/types/TextNode.ts | 11 +- src/api/types/TextNodeText.ts | 10 + .../TextNodeWrite.ts} | 5 +- src/api/types/TriggerType.ts | 30 +- src/api/types/UserAccessGroupsItem.ts | 5 +- src/api/types/UserAccessGroupsItemType.ts | 5 +- src/api/types/index.ts | 29 +- .../resources/fields/types/FieldCreateType.ts | 38 +- .../resources/components/client/index.ts | 1 + .../client/requests/ComponentDomWrite.ts | 21 + .../requests/ComponentPropertiesWrite.ts | 21 + .../components/client/requests/index.ts | 2 + .../resources/components/index.ts | 2 + .../types/ComponentDomWriteNodesItem.ts | 18 + ...ComponentPropertiesWritePropertiesItem.ts} | 12 +- .../types/ComponentsUpdateContentResponse.ts | 20 + .../ComponentsUpdatePropertiesResponse.ts | 20 + .../resources/components/types/index.ts | 4 + src/serialization/resources/index.ts | 3 + .../pages/client/requests/DomWrite.ts | 21 - .../pages/client/requests/PageDomWrite.ts | 21 + .../resources/pages/client/requests/index.ts | 2 +- .../pages/types/PageDomWriteNodesItem.ts | 18 + .../resources/pages/types/index.ts | 2 +- .../client/requests/SitesCreateRequest.ts | 24 + .../client/requests/SitesUpdateRequest.ts | 22 + .../resources/sites/client/requests/index.ts | 2 + src/serialization/types/Component.ts | 26 + src/serialization/types/ComponentDom.ts | 24 + ...onentInstanceNodePropertyOverridesWrite.ts | 23 + ...ertyOverridesWritePropertyOverridesItem.ts | 22 + src/serialization/types/ComponentList.ts | 22 + src/serialization/types/ComponentNode.ts | 23 + .../types/ComponentProperties.ts | 26 + src/serialization/types/ComponentProperty.ts | 28 + .../types/ComponentPropertyType.ts | 16 + src/serialization/types/Domain.ts | 2 + src/serialization/types/ErrorDetailsItem.ts | 17 - src/serialization/types/Error_.ts | 5 +- src/serialization/types/FieldType.ts | 36 +- src/serialization/types/ImageNode.ts | 11 +- src/serialization/types/ImageNodeImage.ts | 20 + src/serialization/types/Node.ts | 37 +- src/serialization/types/NodeType.ts | 15 - .../types/NotEnterprisePlanWorkspace.ts | 16 + src/serialization/types/Redirect.ts | 22 + src/serialization/types/Redirects.ts | 22 + src/serialization/types/SitePlan.ts | 24 + src/serialization/types/SitePlanId.ts | 39 + src/serialization/types/SitePlanName.ts | 27 + src/serialization/types/Text.ts | 19 + src/serialization/types/TextNode.ts | 11 +- src/serialization/types/TextNodeText.ts | 20 + src/serialization/types/TextNodeWrite.ts | 20 + src/serialization/types/index.ts | 29 +- src/version.ts | 2 +- yarn.lock | 317 +- 161 files changed, 7361 insertions(+), 1838 deletions(-) create mode 100644 .mock/definition/components.yml create mode 100644 .mock/definition/sites/plans.yml create mode 100644 .mock/definition/sites/redirects.yml create mode 100644 src/api/resources/components/client/Client.ts create mode 100644 src/api/resources/components/client/index.ts create mode 100644 src/api/resources/components/client/requests/ComponentDomWrite.ts create mode 100644 src/api/resources/components/client/requests/ComponentPropertiesWrite.ts create mode 100644 src/api/resources/components/client/requests/ComponentsGetContentRequest.ts create mode 100644 src/api/resources/components/client/requests/ComponentsGetPropertiesRequest.ts create mode 100644 src/api/resources/components/client/requests/ComponentsListRequest.ts create mode 100644 src/api/resources/components/client/requests/index.ts create mode 100644 src/api/resources/components/index.ts create mode 100644 src/api/resources/components/types/ComponentDomWriteNodesItem.ts create mode 100644 src/api/resources/components/types/ComponentPropertiesWritePropertiesItem.ts create mode 100644 src/api/resources/components/types/ComponentsUpdateContentResponse.ts create mode 100644 src/api/resources/components/types/ComponentsUpdatePropertiesResponse.ts create mode 100644 src/api/resources/components/types/index.ts delete mode 100644 src/api/resources/pages/client/requests/DomWrite.ts create mode 100644 src/api/resources/pages/client/requests/PageDomWrite.ts create mode 100644 src/api/resources/pages/types/PageDomWriteNodesItem.ts create mode 100644 src/api/resources/sites/client/requests/SitesCreateRequest.ts create mode 100644 src/api/resources/sites/client/requests/SitesUpdateRequest.ts create mode 100644 src/api/resources/sites/resources/plans/client/Client.ts create mode 100644 src/api/resources/sites/resources/plans/client/index.ts create mode 100644 src/api/resources/sites/resources/plans/index.ts create mode 100644 src/api/resources/sites/resources/redirects/client/Client.ts create mode 100644 src/api/resources/sites/resources/redirects/client/index.ts create mode 100644 src/api/resources/sites/resources/redirects/index.ts create mode 100644 src/api/types/Component.ts create mode 100644 src/api/types/ComponentDom.ts create mode 100644 src/api/types/ComponentInstanceNodePropertyOverridesWrite.ts create mode 100644 src/api/types/ComponentInstanceNodePropertyOverridesWritePropertyOverridesItem.ts create mode 100644 src/api/types/ComponentList.ts create mode 100644 src/api/types/ComponentNode.ts create mode 100644 src/api/types/ComponentProperties.ts create mode 100644 src/api/types/ComponentProperty.ts create mode 100644 src/api/types/ComponentPropertyType.ts create mode 100644 src/api/types/ImageNodeImage.ts delete mode 100644 src/api/types/NodeType.ts rename src/api/types/{ErrorDetailsItem.ts => NotEnterprisePlanWorkspace.ts} (53%) create mode 100644 src/api/types/Redirect.ts create mode 100644 src/api/types/Redirects.ts create mode 100644 src/api/types/SitePlan.ts create mode 100644 src/api/types/SitePlanId.ts create mode 100644 src/api/types/SitePlanName.ts create mode 100644 src/api/types/Text.ts create mode 100644 src/api/types/TextNodeText.ts rename src/api/{resources/pages/types/DomWriteNodesItem.ts => types/TextNodeWrite.ts} (81%) create mode 100644 src/serialization/resources/components/client/index.ts create mode 100644 src/serialization/resources/components/client/requests/ComponentDomWrite.ts create mode 100644 src/serialization/resources/components/client/requests/ComponentPropertiesWrite.ts create mode 100644 src/serialization/resources/components/client/requests/index.ts create mode 100644 src/serialization/resources/components/index.ts create mode 100644 src/serialization/resources/components/types/ComponentDomWriteNodesItem.ts rename src/serialization/resources/{pages/types/DomWriteNodesItem.ts => components/types/ComponentPropertiesWritePropertiesItem.ts} (50%) create mode 100644 src/serialization/resources/components/types/ComponentsUpdateContentResponse.ts create mode 100644 src/serialization/resources/components/types/ComponentsUpdatePropertiesResponse.ts create mode 100644 src/serialization/resources/components/types/index.ts delete mode 100644 src/serialization/resources/pages/client/requests/DomWrite.ts create mode 100644 src/serialization/resources/pages/client/requests/PageDomWrite.ts create mode 100644 src/serialization/resources/pages/types/PageDomWriteNodesItem.ts create mode 100644 src/serialization/resources/sites/client/requests/SitesCreateRequest.ts create mode 100644 src/serialization/resources/sites/client/requests/SitesUpdateRequest.ts create mode 100644 src/serialization/types/Component.ts create mode 100644 src/serialization/types/ComponentDom.ts create mode 100644 src/serialization/types/ComponentInstanceNodePropertyOverridesWrite.ts create mode 100644 src/serialization/types/ComponentInstanceNodePropertyOverridesWritePropertyOverridesItem.ts create mode 100644 src/serialization/types/ComponentList.ts create mode 100644 src/serialization/types/ComponentNode.ts create mode 100644 src/serialization/types/ComponentProperties.ts create mode 100644 src/serialization/types/ComponentProperty.ts create mode 100644 src/serialization/types/ComponentPropertyType.ts delete mode 100644 src/serialization/types/ErrorDetailsItem.ts create mode 100644 src/serialization/types/ImageNodeImage.ts delete mode 100644 src/serialization/types/NodeType.ts create mode 100644 src/serialization/types/NotEnterprisePlanWorkspace.ts create mode 100644 src/serialization/types/Redirect.ts create mode 100644 src/serialization/types/Redirects.ts create mode 100644 src/serialization/types/SitePlan.ts create mode 100644 src/serialization/types/SitePlanId.ts create mode 100644 src/serialization/types/SitePlanName.ts create mode 100644 src/serialization/types/Text.ts create mode 100644 src/serialization/types/TextNodeText.ts create mode 100644 src/serialization/types/TextNodeWrite.ts diff --git a/.mock/definition/__package__.yml b/.mock/definition/__package__.yml index 667df1ba..db846366 100644 --- a/.mock/definition/__package__.yml +++ b/.mock/definition/__package__.yml @@ -19,11 +19,24 @@ errors: 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 @@ -43,19 +56,6 @@ errors: - value: code: too_many_requests message: Too many requests - 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' InternalServerError: status-code: 500 type: Error @@ -71,6 +71,9 @@ errors: examples: - value: message: '''Site is published to multiple domains at different times' + - 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. @@ -80,27 +83,27 @@ errors: code: ecommerce_not_enabled message: Ecommerce is not yet initialized types: - BadRequestErrorBody: - discriminated: false - union: - - InvalidDomain - - NoDomains - source: - openapi: ../../../referenced-specs/v2.yml ForbiddenErrorBody: discriminated: false union: - InvalidScopes - UsersNotEnabled source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml + BadRequestErrorBody: + discriminated: false + union: + - InvalidDomain + - NoDomains + source: + openapi: ../../../openapi/referenced-specs/v2.yml ConflictErrorBody: discriminated: false union: - DuplicateUserEmail - UserLimitReached source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml AuthorizedUser: properties: id: @@ -118,7 +121,7 @@ types: type: optional docs: The user's last name source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml ErrorCode: enum: - bad_request @@ -151,16 +154,9 @@ types: - users_not_enabled - validation_error docs: Error code - source: - openapi: ../../../referenced-specs/v2.yml - ErrorDetailsItem: - discriminated: false - union: - - string - - map - source: - openapi: ../../../referenced-specs/v2.yml inline: true + source: + openapi: ../../../openapi/referenced-specs/v2.yml Error: properties: code: @@ -173,10 +169,10 @@ types: type: optional docs: Link to more information details: - type: optional> + type: optional> docs: Array of errors source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml Application: unknown AuthorizationAuthorizationAuthorizedTo: properties: @@ -190,7 +186,7 @@ types: type: optional> docs: Array of Users this app is authorized to source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml inline: true AuthorizationAuthorization: docs: The Authorization object @@ -215,7 +211,7 @@ types: docs: Comma separted list of OAuth scopes corresponding to the Authorization authorizedTo: optional source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml inline: true Authorization: properties: @@ -224,7 +220,7 @@ types: docs: The Authorization object application: optional source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml Domain: properties: id: @@ -233,8 +229,11 @@ types: url: type: optional docs: The registered Domain name + lastPublished: + type: optional + docs: The date the custom domain was last published to source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml Locale: properties: id: @@ -264,7 +263,7 @@ types: A tag or code representing the locale, often following a standard format like 'en-US'. source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml Locales: properties: primary: @@ -274,15 +273,16 @@ types: type: optional> docs: A list of secondary locales available for the site or application. source: - openapi: ../../../referenced-specs/v2.yml + 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: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml Site: properties: id: @@ -326,19 +326,120 @@ types: type: optional docs: The type of data collection enabled for the site. source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml + InvalidScopes: unknown + NotEnterprisePlanWorkspace: unknown Sites: properties: sites: optional> source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml + NotEnterprisePlanSite: unknown Domains: properties: customDomains: optional> source: - openapi: ../../../referenced-specs/v2.yml + 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 + 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 + Pagination: + docs: Pagination object + properties: + limit: + type: optional + docs: The limit used for pagination + offset: + type: optional + docs: The offset used for pagination + total: + type: optional + docs: The total number of records + 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 SiteActivityLogItemEvent: enum: - styles_modified @@ -383,8 +484,9 @@ types: - branch_review_created - branch_review_approved - branch_review_canceled + inline: true source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml SiteActivityLogItemResourceOperation: enum: - CREATED @@ -396,14 +498,15 @@ types: - GROUP_CREATED - GROUP_DELETED - REORDERED + inline: true source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml SiteActivityLogItemUser: properties: id: optional displayName: optional source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml inline: true SiteActivityLogItem: properties: @@ -419,29 +522,13 @@ types: previousValue: optional payload: optional> source: - openapi: ../../../referenced-specs/v2.yml - Pagination: - docs: Pagination object - properties: - limit: - type: optional - docs: The limit used for pagination - offset: - type: optional - docs: The offset used for pagination - total: - type: optional - docs: The total number of records - source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml SiteActivityLogResponse: properties: items: optional> pagination: optional source: - openapi: ../../../referenced-specs/v2.yml - InvalidScopes: unknown - NotEnterprisePlanSite: unknown + openapi: ../../../openapi/referenced-specs/v2.yml CollectionListArrayItem: docs: A collection object properties: @@ -466,32 +553,33 @@ types: type: optional docs: The date the collection was last updated source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml CollectionList: properties: collections: type: optional> docs: An array of Collections source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml FieldType: enum: - - PlainText - - RichText + - Color + - DateTime + - Email + - ExtFileRef - Image - - MultiImage - - Video - Link - - Email - - Phone + - MultiImage - Number - - DateTime + - Phone + - PlainText + - RichText - Switch - - Color - - ExtFileRef + - Video docs: Choose these appropriate field type for your collection data + inline: true source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml Field: docs: The details of a field in a collection properties: @@ -519,7 +607,7 @@ types: type: optional docs: Additional text to help anyone filling out this field source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml Collection: docs: A collection object properties: @@ -547,7 +635,7 @@ types: docs: The list of fields in the Collection type: list source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml CollectionItemFieldData: properties: name: @@ -560,7 +648,7 @@ types: will break all links referencing the old slug. extra-properties: true source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml inline: true CollectionItem: docs: > @@ -603,7 +691,7 @@ types: default: false fieldData: CollectionItemFieldData source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml CollectionItemListPagination: properties: limit: @@ -618,7 +706,7 @@ types: type: optional docs: Total number of items in the collection source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml inline: true CollectionItemList: docs: Results from collection items list @@ -628,7 +716,7 @@ types: docs: List of Items within the collection pagination: optional source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml CollectionItemPostSingleFieldData: properties: name: @@ -641,7 +729,7 @@ types: will break all links referencing the old slug. extra-properties: true source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml inline: true CollectionItemPostSingle: docs: > @@ -684,7 +772,7 @@ types: default: false fieldData: CollectionItemPostSingleFieldData source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml CollectionItemWithIdInputFieldData: properties: name: @@ -697,7 +785,7 @@ types: will break all links referencing the old slug. extra-properties: true source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml inline: true CollectionItemWithIdInput: docs: > @@ -729,7 +817,7 @@ types: docs: Boolean determining if the Item is set to draft fieldData: optional source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml CollectionItemListNoPagination: docs: Results from collection items list properties: @@ -737,7 +825,7 @@ types: type: optional> docs: List of Items within the collection source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml BulkCollectionItemFieldData: properties: name: @@ -750,7 +838,7 @@ types: will break all links referencing the old slug. extra-properties: true source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml inline: true BulkCollectionItem: docs: > @@ -784,7 +872,7 @@ types: default: false fieldData: optional source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml CollectionItemPatchSingleFieldData: properties: name: @@ -797,7 +885,7 @@ types: will break all links referencing the old slug. extra-properties: true source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml inline: true CollectionItemPatchSingle: docs: > @@ -829,7 +917,7 @@ types: docs: Boolean determining if the Item is set to draft fieldData: optional source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml PageSeo: docs: SEO-related fields for the Page properties: @@ -840,7 +928,7 @@ types: type: optional docs: The Page description shown in search engine results source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml inline: true PageOpenGraph: docs: Open Graph fields for the Page @@ -862,7 +950,7 @@ types: description default: true source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml inline: true Page: docs: The Page object @@ -932,25 +1020,47 @@ types: type: optional docs: Relative path of the published page URL source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml PageList: docs: The Page object properties: pages: optional> pagination: optional source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml + TextNodeText: + 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 textual content within the DOM. It contains both the raw text - and its HTML representation, allowing for flexibility in rendering and - processing. Additional attributes can be associated with the text for - styling or other purposes. + 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: - html: optional - text: optional + id: + type: optional + docs: Node UUID + text: optional + attributes: + type: optional> + docs: The custom attributes of the node source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml + ImageNodeImage: + 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, @@ -958,41 +1068,97 @@ types: identifier for fetching the actual image resource. Additional attributes can be associated with the image for styling or other purposes. properties: - alt: optional - assetId: optional + id: + type: optional + docs: Node UUID + image: optional + attributes: + type: optional> + docs: The custom attributes of the node + source: + openapi: ../../../openapi/referenced-specs/v2.yml + Text: + 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: ../../../referenced-specs/v2.yml - NodeType: + openapi: ../../../openapi/referenced-specs/v2.yml + ComponentPropertyType: enum: - - text - - image + - 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: ../../../referenced-specs/v2.yml - Node: + openapi: ../../../openapi/referenced-specs/v2.yml + ComponentProperty: 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. + 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: optional docs: Node UUID - type: optional - text: optional - image: optional - attributes: - type: optional> - docs: The custom attributes of the node + componentId: + type: optional + docs: Component ID + propertyOverrides: + type: optional> + docs: List of component properties with overrides for a component instance. + 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: TextNode + image: ImageNode + component-instance: ComponentNode source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml Dom: docs: > The DOM (Document Object Model) schema represents the content structure of - a web page. It captures various content nodes, such as text and images, - along with their associated attributes. Each node has a unique identifier - and can be of different types like text or image. The schema also provides - pagination details for scenarios where the content nodes are too many to - be fetched in a single request. + 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 @@ -1000,7 +1166,114 @@ types: nodes: optional> pagination: optional source: - openapi: ../../../referenced-specs/v2.yml + 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 + Component: + docs: The Component object + properties: + id: + type: string + docs: Unique identifier for the Component + name: + type: optional + docs: Component Name + group: + type: optional + docs: The group that the component belongs to + description: + type: optional + docs: Component Description + 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. + 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, 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 + properties: optional> + pagination: optional + source: + openapi: ../../../openapi/referenced-specs/v2.yml ScriptApplyLocation: enum: - header @@ -1009,8 +1282,9 @@ types: Location of the script, either in the header or footer of the published site default: header + inline: true source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml ScriptApply: properties: id: @@ -1031,7 +1305,7 @@ types: Developer-specified key/value pairs to be applied as attributes to the script source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml ScriptApplyList: properties: scripts: @@ -1044,7 +1318,7 @@ types: type: optional docs: Date when the Site's scripts were created source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml CustomCodeHostedResponse: docs: Registered custom code for application properties: @@ -1080,13 +1354,13 @@ types: type: optional docs: A Semantic Version (SemVer) string, denoting the version of the script source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml RegisteredScriptList: docs: A list of scripts registered to the site properties: registeredScripts: optional> source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml CustomCodeInlineResponse: docs: Registered custom code for application properties: @@ -1122,7 +1396,7 @@ types: type: optional docs: A Semantic Version (SemVer) string, denoting the version of the script source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml Scripts: docs: A list of scripts applied to a Site or a Page type: list @@ -1131,8 +1405,9 @@ types: - page - site docs: Whether the Custom Code script is applied at the Site-level or Page-level + inline: true source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml CustomCodeBlock: docs: A specific instance of Custom Code applied to a Site or Page properties: @@ -1155,14 +1430,14 @@ types: type: optional docs: The date the Block was most recently updated source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml ListCustomCodeBlocks: docs: Custom Code Blocks corresponding to where scripts were applied properties: blocks: optional> pagination: optional source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml AssetVariant: properties: hostedUrl: @@ -1192,7 +1467,7 @@ types: type: optional docs: Any associated validation errors source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml Asset: properties: id: @@ -1229,13 +1504,13 @@ types: type: optional docs: The visual description of the asset source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml Assets: docs: A list of assets properties: assets: optional> source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml AssetUploadUploadDetails: docs: Metadata for uploading the asset binary properties: @@ -1251,7 +1526,7 @@ types: content-type: optional Cache-Control: optional source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml inline: true AssetUpload: properties: @@ -1289,7 +1564,7 @@ types: type: optional docs: Date the asset metadata was last updated source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml AssetFolder: docs: Asset Folder details properties: @@ -1315,7 +1590,7 @@ types: type: optional docs: Date that the Asset Folder was last updated on source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml AssetFolderList: docs: The Asset Folders object properties: @@ -1324,7 +1599,7 @@ types: docs: A list of Asset folders pagination: optional source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml TriggerType: enum: - form_submission @@ -1384,7 +1659,7 @@ types: * `collection_item_unpublished` - Sends the [collection_item_unpublished](#collection_item_unpublished) event source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml WebhookFilter: docs: >- Only supported for the `form_submission` trigger type. Filter for the form @@ -1394,7 +1669,7 @@ types: type: optional docs: The name of the form you'd like to recieve notifications for. source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml inline: true Webhook: properties: @@ -1423,13 +1698,13 @@ types: type: optional docs: Date the Webhook registration was created source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml WebhookList: properties: pagination: optional webhooks: optional> source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml FormFieldValueType: enum: - Plain @@ -1438,8 +1713,9 @@ types: - Phone - Number docs: The field type + inline: true source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml FormFieldValue: docs: An object containing field info for a specific fieldID. properties: @@ -1456,7 +1732,8 @@ types: type: optional docs: Whether the field is visible to the user source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml + inline: true FormField: type: map docs: A collection of form fields with additional properties. @@ -1476,7 +1753,7 @@ types: type: optional docs: Whether to send an email confirmation to the user source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml inline: true Form: docs: A Webflow form @@ -1518,13 +1795,13 @@ types: type: optional docs: The unique ID of the Workspace the Site belongs to source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml FormList: properties: forms: optional> pagination: optional source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml FormSubmission: properties: id: @@ -1546,13 +1823,13 @@ types: type: optional> docs: The data submitted in the Form source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml FormSubmissionList: properties: formSubmissions: optional> pagination: optional source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml UserDataData: properties: name: @@ -1575,22 +1852,23 @@ types: type: optional docs: Custom user attributes source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml inline: true UserData: docs: An object containing the User's basic info and custom fields properties: data: optional source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml UserStatus: enum: - invited - verified - unverified docs: The status of the user + inline: true source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml UserAccessGroupsItemType: enum: - admin @@ -1599,8 +1877,9 @@ types: The type of access group based on how it was assigned to the user. * `admin` - Assigned to the user via API or in the designer * `ecommerce` - Assigned to the user via an ecommerce purchase + inline: true source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml UserAccessGroupsItem: docs: Access group slugs and types properties: @@ -1614,7 +1893,7 @@ types: * `admin` - Assigned to the user via API or in the designer * `ecommerce` - Assigned to the user via an ecommerce purchase source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml inline: true User: docs: > @@ -1649,7 +1928,7 @@ types: docs: Access groups the user belongs to data: optional source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml UserList: docs: The list users results properties: @@ -1671,7 +1950,7 @@ types: type: optional> docs: List of Users for a Site source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml UsersNotEnabled: unknown DuplicateUserEmail: unknown UserLimitReached: unknown @@ -1697,7 +1976,7 @@ types: type: optional docs: The date the Access Group was created source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml AccessGroupList: docs: The list access groups results properties: @@ -1719,7 +1998,7 @@ types: type: optional> docs: List of Site Access Groups source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml SkuPropertyListEnumItem: docs: Enumerated Product variants/Options for the SKU properties: @@ -1733,7 +2012,7 @@ types: type: string docs: Slug for the Product variant/Option in the Site URL structure source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml inline: true SkuPropertyList: docs: A variant/option type for a SKU @@ -1750,7 +2029,7 @@ types: collection type: list source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml ProductFieldDataTaxCategory: enum: - value: standard-taxable @@ -1811,8 +2090,9 @@ types: - value: service-training name: ServiceTraining docs: Product tax class + inline: true source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml ProductFieldDataEcProductType: enum: - ff42fee0113744f693a764e3431a9cc2 @@ -1824,8 +2104,9 @@ types: href="https://university.webflow.com/lesson/add-and-manage-products-and-categories?topics=ecommerce#how-to-understand-product-types">Product types. Enums reflect the following values in order: Physical, Digital, Service, Advanced" + inline: true source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml ProductFieldData: docs: >- Contains content-specific details for a product, covering both standard @@ -1864,7 +2145,7 @@ types: types. Enums reflect the following values in order: Physical, Digital, Service, Advanced" source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml Product: docs: The Product object properties: @@ -1893,7 +2174,7 @@ types: default: false fieldData: optional source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml SkuValueList: type: map docs: > @@ -1909,7 +2190,7 @@ types: type: optional docs: Currency of Item source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml inline: true SkuFieldDataCompareAtPrice: docs: comparison price of SKU @@ -1921,15 +2202,16 @@ types: type: optional docs: Currency of Item source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml inline: true SkuFieldDataEcSkuBillingMethod: enum: - value: one-time name: OneTime - subscription + inline: true source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml SkuFieldDataEcSkuSubscriptionPlanInterval: enum: - day @@ -1937,16 +2219,18 @@ types: - month - year docs: Interval of subscription renewal + inline: true source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml SkuFieldDataEcSkuSubscriptionPlanPlansItemStatus: enum: - active - inactive - canceled docs: The status of the plan + inline: true source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml SkuFieldDataEcSkuSubscriptionPlanPlansItem: properties: platform: @@ -1959,7 +2243,7 @@ types: type: optional docs: The status of the plan source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml inline: true SkuFieldDataEcSkuSubscriptionPlan: properties: @@ -1974,7 +2258,7 @@ types: docs: Number of days of a trial plans: optional> source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml inline: true SkuFieldData: docs: Standard and Custom fields for a SKU @@ -2004,7 +2288,7 @@ types: type: optional docs: Quantity of SKU that will be tracked as items are ordered. source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml Sku: docs: The SKU object properties: @@ -2025,7 +2309,7 @@ types: docs: The date the Product was created fieldData: optional source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml ProductAndSkUs: docs: A product and its SKUs. properties: @@ -2034,7 +2318,7 @@ types: type: optional> docs: A list of SKU Objects source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml ProductAndSkUsList: docs: Results from product list properties: @@ -2045,7 +2329,7 @@ types: keys for each Item pagination: optional source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml PublishStatus: enum: - staging @@ -2053,7 +2337,7 @@ types: docs: Indicate whether your Product should be set as "staging" or "live" default: staging source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml OrderPrice: properties: unit: @@ -2066,14 +2350,15 @@ types: type: optional docs: The user-facing string representation of the amount source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml OrderAddressType: enum: - shipping - billing docs: The type of the order address (billing or shipping) + inline: true source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml OrderAddressJapanType: enum: - kana @@ -2081,8 +2366,9 @@ types: docs: >- Represents a Japan-only address format. This field will only appear on orders placed from Japan. + inline: true source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml OrderAddress: docs: A customer address properties: @@ -2116,7 +2402,7 @@ types: type: optional docs: The postal code of the address source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml OrderPurchasedItemVariantImageFileVariantsItem: properties: url: @@ -2135,7 +2421,7 @@ types: type: optional docs: The image height in pixels source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml inline: true OrderPurchasedItemVariantImageFile: properties: @@ -2161,7 +2447,7 @@ types: type: optional> docs: Variants of the supplied image source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml inline: true OrderPurchasedItemVariantImage: properties: @@ -2172,7 +2458,7 @@ types: format: uri file: optional source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml inline: true OrderPurchasedItem: docs: An Item that was purchased @@ -2221,7 +2507,7 @@ types: type: optional docs: The physical length of the variant if provided, or null source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml StripeDetails: docs: >- An object with various Stripe IDs, useful for linking into the stripe @@ -2252,7 +2538,7 @@ types: type: optional docs: Stripe-generated refund reason, or null source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml StripeCardBrand: enum: - Visa @@ -2265,8 +2551,9 @@ types: name: DinersClub - Unknown docs: The card's brand (ie. credit card network) + inline: true source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml StripeCardExpires: docs: The card's expiration date. properties: @@ -2277,7 +2564,7 @@ types: type: optional docs: Month that the card expires source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml inline: true StripeCard: docs: > @@ -2297,7 +2584,7 @@ types: type: optional docs: The card's expiration date. source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml PaypalDetails: properties: orderId: @@ -2319,7 +2606,7 @@ types: type: optional docs: PayPal dispute identifier source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml OrderStatus: enum: - pending @@ -2331,8 +2618,9 @@ types: - refunded docs: | The status of the Order + inline: true source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml OrderDisputeLastStatus: enum: - warning_needs_response @@ -2346,8 +2634,9 @@ types: 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: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml OrderCustomerInfo: docs: An object with the keys `fullName` and `email`. properties: @@ -2360,13 +2649,13 @@ types: validation: format: email source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml inline: true OrderMetadata: properties: isBuyNow: optional source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml inline: true OrderTotalsExtrasItemType: enum: @@ -2376,8 +2665,9 @@ types: - shipping - tax docs: The type of extra item this is. + inline: true source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml OrderTotalsExtrasItem: docs: Extra order items, includes discounts, shipping, and taxes. properties: @@ -2394,7 +2684,7 @@ types: type: optional docs: The price for the item source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml inline: true OrderTotals: docs: An object describing various pricing totals @@ -2409,7 +2699,7 @@ types: type: optional docs: The total price source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml inline: true OrderDownloadFilesItem: properties: @@ -2425,7 +2715,7 @@ types: validation: format: uri source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml inline: true Order: properties: @@ -2554,7 +2844,7 @@ types: type: optional> docs: An array of downloadable file objects. source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml OrderList: docs: Results from order list properties: @@ -2563,14 +2853,15 @@ types: docs: List of orders pagination: optional source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml InventoryItemInventoryType: enum: - infinite - finite docs: infinite or finite + inline: true source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml InventoryItem: docs: The availabile inventory for an item properties: @@ -2586,7 +2877,7 @@ types: type: optional docs: infinite or finite source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml EcommerceSettings: docs: Ecommerce settings for a Webflow Site properties: @@ -2600,4 +2891,4 @@ types: type: optional docs: The three-letter ISO currency code for the Site source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml diff --git a/.mock/definition/accessGroups.yml b/.mock/definition/accessGroups.yml index 662d2ed2..d8828f8d 100644 --- a/.mock/definition/accessGroups.yml +++ b/.mock/definition/accessGroups.yml @@ -8,7 +8,7 @@ types: name: CreatedOnDescending docs: Sorts users in descending order based on their created date source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml imports: root: __package__.yml service: @@ -24,7 +24,7 @@ service: Required scope | `users:read` source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml path-parameters: site_id: type: string @@ -77,4 +77,4 @@ service: slug: admin createdOn: '2022-08-01T19:41:48Z' source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml diff --git a/.mock/definition/assets.yml b/.mock/definition/assets.yml index 5614b78b..35392ec3 100644 --- a/.mock/definition/assets.yml +++ b/.mock/definition/assets.yml @@ -13,7 +13,7 @@ service: Required scope | `assets:read` source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml path-parameters: site_id: type: string @@ -78,7 +78,7 @@ service: Required scope | `assets:write` source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml path-parameters: site_id: type: string @@ -150,7 +150,7 @@ service: Required scope | `assets:read` source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml path-parameters: asset_id: type: string @@ -198,7 +198,7 @@ service: Required Scope: `assets: write` source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml path-parameters: asset_id: type: string @@ -222,7 +222,7 @@ service: Required scope | `assets:write` source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml path-parameters: asset_id: type: string @@ -284,7 +284,7 @@ service: Required scope | `assets:read` source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml path-parameters: site_id: type: string @@ -327,7 +327,7 @@ service: Required scope | `assets:write` source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml path-parameters: site_id: type: string @@ -380,7 +380,7 @@ service: Required scope | `assets:read` source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml path-parameters: asset_folder_id: type: string @@ -410,5 +410,6 @@ service: createdOn: '2018-10-14T21:55:49Z' lastUpdated: '2022-12-07T16:51:37Z' source: - openapi: ../../../referenced-specs/v2.yml + 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 index a43baffd..661b54b1 100644 --- a/.mock/definition/collections.yml +++ b/.mock/definition/collections.yml @@ -13,7 +13,7 @@ service: Required scope | `cms:read` source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml path-parameters: site_id: type: string @@ -61,7 +61,7 @@ service: Required scope | `cms:write` source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml path-parameters: site_id: type: string @@ -122,7 +122,7 @@ service: Required scope | `cms:read` source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml path-parameters: collection_id: type: string @@ -165,7 +165,7 @@ service: Required scope | `cms:write` source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml path-parameters: collection_id: type: string @@ -181,5 +181,6 @@ service: - path-parameters: collection_id: 580e63fc8c9a982ac9b8b745 source: - openapi: ../../../referenced-specs/v2.yml + 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 index 210ebcc6..08dc5543 100644 --- a/.mock/definition/collections/fields.yml +++ b/.mock/definition/collections/fields.yml @@ -1,22 +1,24 @@ types: FieldCreateType: enum: - - PlainText - - RichText + - Color + - DateTime + - Email + - ExtFileRef + - File - Image - - MultiImage - - Video - Link - - Email - - Phone + - MultiImage - Number - - DateTime + - Phone + - PlainText + - RichText - Switch - - Color - - File + - Video docs: Choose these appropriate field type for your collection data + inline: true source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml imports: root: ../__package__.yml service: @@ -46,7 +48,7 @@ service: Required scope | `cms:write` source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml path-parameters: collection_id: type: string @@ -106,7 +108,7 @@ service: Required scope | `cms:write` source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml path-parameters: collection_id: type: string @@ -134,7 +136,7 @@ service: Required scope | `cms:write` source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml path-parameters: collection_id: type: string @@ -184,4 +186,4 @@ service: displayName: Post Body helpText: Add the body of your post here source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml diff --git a/.mock/definition/collections/items.yml b/.mock/definition/collections/items.yml index f4bf2439..f765817e 100644 --- a/.mock/definition/collections/items.yml +++ b/.mock/definition/collections/items.yml @@ -5,20 +5,20 @@ types: - name - slug source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml ItemsListItemsRequestSortOrder: enum: - asc - desc source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml Multiple Items: properties: items: type: optional> docs: An array of items to create source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml inline: true ItemsCreateItemRequest: discriminated: false @@ -26,7 +26,7 @@ types: - root.CollectionItemPostSingle - Multiple Items source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml ItemsDeleteItemsRequestItemsItem: properties: id: @@ -36,7 +36,7 @@ types: type: optional> docs: Array of identifiers for the locales where the item will be created source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml inline: true ItemsListItemsLiveRequestSortBy: enum: @@ -44,20 +44,20 @@ types: - name - slug source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml ItemsListItemsLiveRequestSortOrder: enum: - asc - desc source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml Multiple Live Items: properties: items: type: optional> docs: List of collection items to create source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml inline: true ItemsCreateItemLiveRequest: discriminated: false @@ -65,7 +65,7 @@ types: - root.CollectionItem - Multiple Live Items source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml ItemsDeleteItemsLiveRequestItemsItem: properties: itemId: @@ -75,7 +75,7 @@ types: type: optional> docs: Array of identifiers for the locales where the item will be created source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml inline: true Single CMS Item: properties: @@ -91,7 +91,7 @@ types: slug. extra-properties: true source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml inline: true CreateBulkCollectionItemRequestBodyFieldDataItem: docs: A single CMS item to create @@ -108,7 +108,7 @@ types: slug. extra-properties: true source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml inline: true CreateBulkCollectionItemRequestBodyFieldData: discriminated: false @@ -117,14 +117,14 @@ types: - docs: A list of CMS items to create type: list source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml inline: true ItemsPublishItemResponse: properties: publishedItemIds: optional> errors: optional> source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml imports: root: ../__package__.yml service: @@ -140,7 +140,7 @@ service: Required scope | `CMS:read` source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml path-parameters: collection_id: type: string @@ -201,6 +201,8 @@ service: 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' @@ -211,6 +213,8 @@ service: fieldData: name: Product Manager slug: product-manager + url: https://boards.greenhouse.io/webflow/jobs/31234567 + department: Product pagination: limit: 25 offset: 0 @@ -225,12 +229,12 @@ service: To create items across multiple locales, please use [this - endpoint.](/data/v2.0.0/reference/cms/collection-items/bulk-items/create-items) + endpoint.](/v2.0.0/data/reference/cms/collection-items/staged-items/create-items) Required scope | `CMS:write` source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml path-parameters: collection_id: type: string @@ -258,6 +262,9 @@ service: fieldData: name: Pan Galactic Gargle Blaster Recipe slug: pan-galactic-gargle-blaster + date: '2022-11-18T00:00:00.000Z' + featured: true + color: '#db4b68' response: body: id: 42b720ef280c7a7a3be8cabe @@ -270,6 +277,9 @@ service: fieldData: name: Pan Galactic Gargle Blaster Recipe slug: pan-galactic-gargle-blaster + color: '#db4b68' + date: '2022-11-18T00:00:00.000Z' + featured: true - name: MultipleItems path-parameters: collection_id: 580e63fc8c9a982ac9b8b745 @@ -280,11 +290,15 @@ service: 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 @@ -297,6 +311,9 @@ service: 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 @@ -311,7 +328,7 @@ service: Required scope | `CMS:write` source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml path-parameters: collection_id: type: string @@ -348,7 +365,7 @@ service: Required scope | `CMS:write` source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml path-parameters: collection_id: type: string @@ -380,21 +397,25 @@ service: 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: id: id @@ -407,6 +428,9 @@ service: fieldData: name: My new item slug: my-new-item + date: '2022-11-18T00:00:00.000Z' + featured: false + color: '#db4b68' - name: MultipleItems path-parameters: collection_id: 580e63fc8c9a982ac9b8b745 @@ -418,12 +442,16 @@ service: 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: id: id @@ -436,6 +464,9 @@ service: fieldData: name: My new item slug: my-new-item + date: '2022-11-18T00:00:00.000Z' + featured: false + color: '#db4b68' - name: Multiple items updated across multiple locales path-parameters: collection_id: 580e63fc8c9a982ac9b8b745 @@ -446,21 +477,25 @@ service: 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: id: id @@ -473,6 +508,9 @@ service: fieldData: name: My new item slug: my-new-item + date: '2022-11-18T00:00:00.000Z' + featured: false + color: '#db4b68' - name: Mulitple items updated in a single locale path-parameters: collection_id: 580e63fc8c9a982ac9b8b745 @@ -483,21 +521,25 @@ service: 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: id: id @@ -510,6 +552,9 @@ service: fieldData: name: My new item slug: my-new-item + date: '2022-11-18T00:00:00.000Z' + featured: false + color: '#db4b68' list-items-live: path: /collections/{collection_id}/items/live method: GET @@ -519,7 +564,7 @@ service: Required scope | `CMS:read` source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml path-parameters: collection_id: type: string @@ -580,6 +625,8 @@ service: 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' @@ -590,6 +637,8 @@ service: fieldData: name: Product Manager slug: product-manager + url: https://boards.greenhouse.io/webflow/jobs/31234567 + department: Product pagination: limit: 25 offset: 0 @@ -605,13 +654,13 @@ service: To create items across multiple locales, [please use this - endpoint.](/v2.0.0/data/reference/cms/collection-items/bulk-items/create-items) + endpoint.](/v2.0.0/data/reference/cms/collection-items/staged-items/create-items) Required scope | `CMS:write` source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml path-parameters: collection_id: type: string @@ -639,6 +688,9 @@ service: fieldData: name: Pan Galactic Gargle Blaster Recipe slug: pan-galactic-gargle-blaster + date: '2022-11-18T00:00:00.000Z' + featured: true + color: '#db4b68' response: body: id: 42b720ef280c7a7a3be8cabe @@ -651,6 +703,9 @@ service: fieldData: name: Pan Galactic Gargle Blaster Recipe slug: pan-galactic-gargle-blaster + color: '#db4b68' + date: '2022-11-18T00:00:00.000Z' + featured: true - name: MultipleItems path-parameters: collection_id: 580e63fc8c9a982ac9b8b745 @@ -661,11 +716,15 @@ service: 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 @@ -678,6 +737,9 @@ service: fieldData: name: Pan Galactic Gargle Blaster Recipe slug: pan-galactic-gargle-blaster + color: '#db4b68' + date: '2022-11-18T00:00:00.000Z' + featured: true delete-items-live: path: /collections/{collection_id}/items/live method: DELETE @@ -695,7 +757,7 @@ service: Required scope | `CMS:write` source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml path-parameters: collection_id: type: string @@ -732,7 +794,7 @@ service: Required scope | `CMS:write` source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml path-parameters: collection_id: type: string @@ -764,21 +826,25 @@ service: 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: @@ -792,6 +858,7 @@ service: fieldData: name: Ne Paniquez Pas slug: ne-paniquez-pas + featured: false - id: 66f6ed9576ddacf3149d5ea6 cmsLocaleId: 66f6e966c9e1dc700a857ca4 lastPublished: '2023-03-17T18:47:35.560Z' @@ -802,6 +869,7 @@ service: fieldData: name: No Entrar en Pánico slug: no-entrar-en-panico + featured: false - id: 66f6ed9576ddacf3149d5eaa cmsLocaleId: 66f6e966c9e1dc700a857ca5 lastPublished: '2023-03-17T18:47:35.560Z' @@ -812,6 +880,7 @@ service: fieldData: name: Au Revoir et Merci pour Tous les Poissons slug: au-revoir-et-merci + featured: false - id: 66f6ed9576ddacf3149d5eaa cmsLocaleId: 66f6e966c9e1dc700a857ca4 lastPublished: '2023-03-17T18:47:35.560Z' @@ -822,6 +891,7 @@ service: fieldData: name: Hasta Luego y Gracias por Todo el Pescado slug: hasta-luego-y-gracias + featured: false - name: MultipleItems path-parameters: collection_id: 580e63fc8c9a982ac9b8b745 @@ -833,12 +903,16 @@ service: 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: @@ -852,6 +926,7 @@ service: fieldData: name: Ne Paniquez Pas slug: ne-paniquez-pas + featured: false - id: 66f6ed9576ddacf3149d5ea6 cmsLocaleId: 66f6e966c9e1dc700a857ca4 lastPublished: '2023-03-17T18:47:35.560Z' @@ -862,6 +937,7 @@ service: fieldData: name: No Entrar en Pánico slug: no-entrar-en-panico + featured: false - id: 66f6ed9576ddacf3149d5eaa cmsLocaleId: 66f6e966c9e1dc700a857ca5 lastPublished: '2023-03-17T18:47:35.560Z' @@ -872,6 +948,7 @@ service: fieldData: name: Au Revoir et Merci pour Tous les Poissons slug: au-revoir-et-merci + featured: false - id: 66f6ed9576ddacf3149d5eaa cmsLocaleId: 66f6e966c9e1dc700a857ca4 lastPublished: '2023-03-17T18:47:35.560Z' @@ -882,6 +959,7 @@ service: 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 @@ -892,21 +970,25 @@ service: 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: @@ -920,6 +1002,7 @@ service: fieldData: name: Ne Paniquez Pas slug: ne-paniquez-pas + featured: false - id: 66f6ed9576ddacf3149d5ea6 cmsLocaleId: 66f6e966c9e1dc700a857ca4 lastPublished: '2023-03-17T18:47:35.560Z' @@ -930,6 +1013,7 @@ service: fieldData: name: No Entrar en Pánico slug: no-entrar-en-panico + featured: false - id: 66f6ed9576ddacf3149d5eaa cmsLocaleId: 66f6e966c9e1dc700a857ca5 lastPublished: '2023-03-17T18:47:35.560Z' @@ -940,6 +1024,7 @@ service: fieldData: name: Au Revoir et Merci pour Tous les Poissons slug: au-revoir-et-merci + featured: false - id: 66f6ed9576ddacf3149d5eaa cmsLocaleId: 66f6e966c9e1dc700a857ca4 lastPublished: '2023-03-17T18:47:35.560Z' @@ -950,6 +1035,7 @@ service: fieldData: name: Hasta Luego y Gracias por Todo el Pescado slug: hasta-luego-y-gracias + featured: false - name: Mulitple items updated in a single locale path-parameters: collection_id: 580e63fc8c9a982ac9b8b745 @@ -960,21 +1046,25 @@ service: 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: @@ -988,6 +1078,8 @@ service: 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' @@ -998,6 +1090,8 @@ service: 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 @@ -1013,7 +1107,7 @@ service: Required scope | `CMS:write` source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml path-parameters: collection_id: type: string @@ -1076,6 +1170,9 @@ service: 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 multipel locales path-parameters: collection_id: 580e63fc8c9a982ac9b8b745 @@ -1105,6 +1202,9 @@ service: 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 @@ -1133,6 +1233,9 @@ service: 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 @@ -1161,6 +1264,9 @@ service: 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 @@ -1170,7 +1276,7 @@ service: Required scope | `CMS:read` source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml path-parameters: collection_id: type: string @@ -1214,6 +1320,9 @@ service: fieldData: name: Pan Galactic Gargle Blaster Recipe slug: pan-galactic-gargle-blaster + color: '#db4b68' + date: '2022-11-18T00:00:00.000Z' + featured: true delete-item: path: /collections/{collection_id}/items/{item_id} method: DELETE @@ -1225,7 +1334,7 @@ service: Required scope | `CMS:write` source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml path-parameters: collection_id: type: string @@ -1263,7 +1372,7 @@ service: Required scope | `CMS:write` source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml path-parameters: collection_id: type: string @@ -1294,6 +1403,9 @@ service: fieldData: name: Pan Galactic Gargle Blaster Recipe slug: pan-galactic-gargle-blaster + date: '2022-11-18T00:00:00.000Z' + featured: true + color: '#db4b68' response: body: id: 42b720ef280c7a7a3be8cabe @@ -1306,6 +1418,9 @@ service: fieldData: name: Pan Galactic Gargle Blaster Recipe slug: pan-galactic-gargle-blaster + color: '#db4b68' + date: '2022-11-18T00:00:00.000Z' + featured: true get-item-live: path: /collections/{collection_id}/items/{item_id}/live method: GET @@ -1315,7 +1430,7 @@ service: Required scope | `CMS:read` source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml path-parameters: collection_id: type: string @@ -1359,6 +1474,9 @@ service: fieldData: name: Pan Galactic Gargle Blaster Recipe slug: pan-galactic-gargle-blaster + color: '#db4b68' + date: '2022-11-18T00:00:00.000Z' + featured: true delete-item-live: path: /collections/{collection_id}/items/{item_id}/live method: DELETE @@ -1373,7 +1491,7 @@ service: Required scope | `CMS:write` source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml path-parameters: collection_id: type: string @@ -1413,7 +1531,7 @@ service: Required scope | `CMS:write` source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml path-parameters: collection_id: type: string @@ -1444,6 +1562,9 @@ service: fieldData: name: Pan Galactic Gargle Blaster Recipe slug: pan-galactic-gargle-blaster + date: '2022-11-18T00:00:00.000Z' + featured: true + color: '#db4b68' response: body: id: 42b720ef280c7a7a3be8cabe @@ -1456,6 +1577,9 @@ service: fieldData: name: Pan Galactic Gargle Blaster Recipe slug: pan-galactic-gargle-blaster + color: '#db4b68' + date: '2022-11-18T00:00:00.000Z' + featured: true publish-item: path: /collections/{collection_id}/items/publish method: POST @@ -1465,7 +1589,7 @@ service: Required scope | `cms:write` source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml path-parameters: collection_id: type: string @@ -1501,4 +1625,4 @@ service: errors: - Staging item ID 643fd856d66b6528195ee2cf not found. source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml diff --git a/.mock/definition/components.yml b/.mock/definition/components.yml new file mode 100644 index 00000000..b9eb7d63 --- /dev/null +++ b/.mock/definition/components.yml @@ -0,0 +1,486 @@ +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /sites/{site_id}/components + method: GET + auth: true + 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: + 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 + errors: + - root.BadRequestError + - root.UnauthorizedError + - root.NotFoundError + - root.TooManyRequestsError + - root.InternalServerError + examples: + - path-parameters: + site_id: 580e63e98c9a982ac9b8b741 + 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: true + docs: > + Get static content from a component definition. This includes text + nodes, image 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. Applicable, when using + 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.ComponentDom + errors: + - root.BadRequestError + - root.UnauthorizedError + - root.NotFoundError + - root.TooManyRequestsError + - root.InternalServerError + examples: + - name: ComponentDOM + path-parameters: + site_id: 580e63e98c9a982ac9b8b741 + component_id: 8505ba55-ef72-629e-f85c-33e4b703d48b + query-parameters: + localeId: 65427cf400e02b306eaa04a0 + response: + body: + componentId: 69118560-d0bc-15fc-bbf8-b8fe5f6535b5 + nodes: + - type: component-instance + id: a245c12d-995b-55ee-5ec7-aa36a6cad623 + componentId: nodes + propertyOverrides: + - propertyId: 7dd14c08-2e96-8d3d-2b19-b5c03642a0f0 + - type: component-instance + id: a245c12d-995b-55ee-5ec7-aa36a6cad627 + componentId: nodes + propertyOverrides: + - propertyId: 7dd14c08-2e96-8d3d-2b19-b5c03642a0f0 + - type: component-instance + id: a245c12d-995b-55ee-5ec7-aa36a6cad629 + componentId: nodes + propertyOverrides: + - propertyId: 7dd14c08-2e96-8d3d-2b19-b5c03642a0f0 + - type: component-instance + id: a245c12d-995b-55ee-5ec7-aa36a6cad631 + componentId: 6258612d1ee792848f805dcf + propertyOverrides: + - propertyId: a245c12d-995b-55ee-5ec7-aa36a6cad633 + type: Plain Text + text: + text: Don't Panic! + - propertyId: a245c12d-995b-55ee-5ec7-aa36a6cad635 + type: Rich Text + text: + html:

Always know where your towel is.

+ pagination: + limit: 4 + offset: 0 + total: 4 + - name: LocalizedComponentDOM + path-parameters: + site_id: 580e63e98c9a982ac9b8b741 + component_id: 8505ba55-ef72-629e-f85c-33e4b703d48b + query-parameters: + localeId: 65427cf400e02b306eaa04a0 + response: + body: + componentId: 69118560-d0bc-15fc-bbf8-b8fe5f6535b5 + nodes: + - type: component-instance + id: 69118560-d0bc-15fc-bbf8-b8fe5f6535b8 + componentId: nodes + propertyOverrides: + - propertyId: 7dd14c08-2e96-8d3d-2b19-b5c03642a0f0 + - type: component-instance + id: 8ebfb409-7493-3bca-5d48-0e547befb960 + componentId: nodes + propertyOverrides: + - propertyId: 7dd14c08-2e96-8d3d-2b19-b5c03642a0f0 + - type: component-instance + id: 69118560-d0bc-15fc-bbf8-b8fe5f6535c2 + componentId: 69118560-d0bc-15fc-bbf8-b8fe5f6535b5 + propertyOverrides: + - propertyId: a245c12d-995b-55ee-5ec7-aa36a6cad623 + pagination: + limit: 100 + offset: 0 + total: 3 + update-content: + path: /sites/{site_id}/components/{component_id}/dom + method: POST + auth: true + 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 + + + + 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. Applicable, when using + localization. + 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 + 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 + 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-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: true + docs: > + Get the property default values of a component definition. + + + If you do not provide a Locale ID 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. Applicable, when using + 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.ComponentProperties + 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 + 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: true + docs: > + Update the property default 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 available properties + + + The request requires a secondary locale ID. If a locale 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. Applicable, when using + localization. + 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 + 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 + 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: + - root.TextNodeWrite + - root.ComponentInstanceNodePropertyOverridesWrite + 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 index 29529a25..1a2ca95e 100644 --- a/.mock/definition/ecommerce.yml +++ b/.mock/definition/ecommerce.yml @@ -13,7 +13,7 @@ service: Required scope | `ecommerce:read` source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml path-parameters: site_id: type: string @@ -39,4 +39,4 @@ service: createdOn: '2018-10-04T15:21:02Z' defaultCurrency: USD source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml diff --git a/.mock/definition/forms.yml b/.mock/definition/forms.yml index fad8637b..9eac1775 100644 --- a/.mock/definition/forms.yml +++ b/.mock/definition/forms.yml @@ -13,7 +13,7 @@ service: Required scope | `forms:read` source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml path-parameters: site_id: type: string @@ -99,7 +99,7 @@ service: Required scope | `forms:read` source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml path-parameters: form_id: type: string @@ -155,7 +155,7 @@ service: Required scope | `forms:read` source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml path-parameters: form_id: type: string @@ -217,7 +217,7 @@ service: Required scope | `forms:read` source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml path-parameters: form_submission_id: type: string @@ -255,7 +255,7 @@ service: Required scope | `forms:write` source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml path-parameters: form_submission_id: type: string @@ -297,5 +297,6 @@ service: First Name: Arthur Last Name: Dent source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml display-name: Forms +docs: Forms are forms that are created on your Webflow site. diff --git a/.mock/definition/inventory.yml b/.mock/definition/inventory.yml index 14bd5c07..5e69c298 100644 --- a/.mock/definition/inventory.yml +++ b/.mock/definition/inventory.yml @@ -13,7 +13,7 @@ service: Required scope | `ecommerce:read` source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml path-parameters: collection_id: type: string @@ -62,7 +62,7 @@ service: Required scope | `ecommerce:write` source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml path-parameters: collection_id: type: string @@ -108,13 +108,15 @@ service: quantity: 100 inventoryType: finite source: - openapi: ../../../referenced-specs/v2.yml + 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: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml diff --git a/.mock/definition/orders.yml b/.mock/definition/orders.yml index 75be2224..b2802cfd 100644 --- a/.mock/definition/orders.yml +++ b/.mock/definition/orders.yml @@ -9,15 +9,16 @@ types: - disputed - unfulfilled source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml OrdersRefundRequestReason: enum: - duplicate - fraudulent - requested docs: The reason for the refund + inline: true source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml imports: root: __package__.yml service: @@ -33,7 +34,7 @@ service: Required scope | `ecommerce:read` source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml path-parameters: site_id: type: string @@ -423,7 +424,7 @@ service: Required scope | `ecommerce:read` source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml path-parameters: site_id: type: string @@ -647,7 +648,7 @@ service: Required scope | `ecommerce:write` source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml path-parameters: site_id: type: string @@ -887,7 +888,7 @@ service: Required scope | `ecommerce:write` source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml path-parameters: site_id: type: string @@ -1119,7 +1120,7 @@ service: Required scope | `ecommerce:write` source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml path-parameters: site_id: type: string @@ -1342,7 +1343,7 @@ service: Required scope | `ecommerce:write` source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml path-parameters: site_id: type: string @@ -1565,5 +1566,6 @@ service: url: >- https://webflow.com/dashboard/download-digital-product?payload=5d93ba5e38c6b0160ab711d3;e7634a;5eb1aac72912ec06f561278c;5e9a5eba75e0ac242e1b6f63:ka2nehxy:4a1ee0a632feaab94294350087215ed89533f2f530903e3b933b638940e921aa source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml display-name: Orders +docs: Orders are the orders for your Webflow site. diff --git a/.mock/definition/pages.yml b/.mock/definition/pages.yml index b3fdcd1b..62de7dcb 100644 --- a/.mock/definition/pages.yml +++ b/.mock/definition/pages.yml @@ -13,7 +13,7 @@ service: Required scope | `pages:read` source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml path-parameters: site_id: type: string @@ -121,7 +121,7 @@ service: Required scope | `pages:read` source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml path-parameters: page_id: type: string @@ -187,7 +187,7 @@ service: Required scope | `pages:write` source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml path-parameters: page_id: type: string @@ -276,16 +276,23 @@ service: method: GET auth: true docs: > - Get static content from a static page. + Get static content from a static page. This includes text nodes, image + nodes and component instances. + To retrieve the contents of components in the page use the [get + component + content](/data/reference/pages-and-components/components/get-content) + 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. + + 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 | `pages:read` source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml path-parameters: page_id: type: string @@ -318,7 +325,8 @@ service: - root.TooManyRequestsError - root.InternalServerError examples: - - path-parameters: + - name: PageDOM + path-parameters: page_id: 63c720f9347c2139b248e552 query-parameters: localeId: 65427cf400e02b306eaa04a0 @@ -326,65 +334,86 @@ service: body: pageId: 658205daa3e8206a523b5ad4 nodes: - - id: a245c12d-995b-55ee-5ec7-aa36a6cad623 - type: text - text: - html:

The Hitchhiker's Guide to the Galaxy

- text: The Hitchhiker's Guide to the Galaxy - attributes: - key: value - - id: a245c12d-995b-55ee-5ec7-aa36a6cad627 - type: text - text: - html: >- -

Don't Panic!

Always know where your towel - is.

- attributes: - key: value - - id: a245c12d-995b-55ee-5ec7-aa36a6cad629 - type: image - image: - alt: Marvin, the Paranoid Android - assetId: 659595234426a9fcbad57043 - attributes: - key: value + - type: component-instance + id: a245c12d-995b-55ee-5ec7-aa36a6cad623 + componentId: nodes + propertyOverrides: + - propertyId: 7dd14c08-2e96-8d3d-2b19-b5c03642a0f0 + - type: component-instance + id: a245c12d-995b-55ee-5ec7-aa36a6cad627 + componentId: nodes + propertyOverrides: + - propertyId: 7dd14c08-2e96-8d3d-2b19-b5c03642a0f0 + - type: component-instance + id: a245c12d-995b-55ee-5ec7-aa36a6cad629 + componentId: nodes + propertyOverrides: + - propertyId: 7dd14c08-2e96-8d3d-2b19-b5c03642a0f0 + - type: component-instance + id: a245c12d-995b-55ee-5ec7-aa36a6cad631 + componentId: 6258612d1ee792848f805dcf + propertyOverrides: + - propertyId: a245c12d-995b-55ee-5ec7-aa36a6cad633 + type: Plain Text + label: Catchphrase + text: + text: Don't Panic! + - propertyId: a245c12d-995b-55ee-5ec7-aa36a6cad635 + type: Rich Text + label: Tagline + text: + html:

Always know where your towel is.

pagination: - limit: 3 + limit: 4 offset: 0 - total: 3 + total: 4 update-static-content: path: /pages/{page_id}/dom method: POST auth: true docs: > - This endpoint allows for updating static content on a static page within - a secondary locale. It is designed specifically for localized pages and - can handle up to 1000 nodes per request. + 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: -

Note:This - endpoint is specifically for localized pages. Ensure that the locale - specified is a valid secondary locale for the site.

+ 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 + + + + 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: ../../../referenced-specs/v2.yml + 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: DomWrite + name: PageDomWrite query-parameters: localeId: - type: optional - docs: >- - Unique identifier for a specific locale. Applicable, when using - localization. + type: string + docs: The locale identifier. body: properties: - nodes: list + 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 @@ -400,39 +429,37 @@ service: - path-parameters: page_id: 63c720f9347c2139b248e552 query-parameters: - localeId: 65427cf400e02b306eaa04a0 + localeId: localeId request: nodes: - nodeId: a245c12d-995b-55ee-5ec7-aa36a6cad623 - text:

The Hitchhiker’s Guide to the Galaxy

+ text:

The Hitchhiker's Guide to the Galaxy

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

Don’t Panic!

Always know where your towel +

Don't Panic!

Always know where your towel is.

- nodeId: a245c12d-995b-55ee-5ec7-aa36a6cad629 - text: >- - Marvin, the Paranoid Android + 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: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml display-name: Pages +docs: Pages are the pages in your Webflow site. types: - DomWriteNodesItem: - 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. + PageDomWriteNodesItem: + discriminated: false + union: + - root.TextNodeWrite + - root.ComponentInstanceNodePropertyOverridesWrite source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml inline: true UpdateStaticContentResponse: properties: @@ -440,4 +467,4 @@ types: docs: A list of error messages, if any. type: list source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml diff --git a/.mock/definition/pages/scripts.yml b/.mock/definition/pages/scripts.yml index fc0bbe5e..f8ee3287 100644 --- a/.mock/definition/pages/scripts.yml +++ b/.mock/definition/pages/scripts.yml @@ -20,15 +20,14 @@ service: `custom_code` endpoints. -
Access to this - endpoint requires a bearer token from a Data - Client App.
+ + Access to this endpoint requires a bearer token from a [Data + Client App](/data/docs/getting-started-data-clients). Required scope | `custom_code:read` source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml path-parameters: page_id: type: string @@ -70,17 +69,19 @@ service: to a Site via the `registered_scripts` endpoints, and then applied to a Site or Page using the appropriate - `custom_code` endpoints. + `custom_code` endpoints. + -
Access to this - endpoint requires a bearer token from a Data - Client App.
+ A site can have a maximum of 800 registered scripts. + + + Access to this endpoint requires a bearer token from a [Data + Client App](/data/docs/getting-started-data-clients). Required scope | `custom_code:write` source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml path-parameters: page_id: type: string @@ -96,6 +97,7 @@ service: - root.BadRequestError - root.UnauthorizedError - root.NotFoundError + - root.ConflictError - root.TooManyRequestsError - root.InternalServerError examples: @@ -142,15 +144,14 @@ service: `custom_code` endpoints. -
Access to this - endpoint requires a bearer token from a Data - Client App.
+ + Access to this endpoint requires a bearer token from a [Data + Client App](/data/docs/getting-started-data-clients). Required scope | `custom_code:write` source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml path-parameters: page_id: type: string @@ -166,4 +167,4 @@ service: - path-parameters: page_id: 63c720f9347c2139b248e552 source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml diff --git a/.mock/definition/products.yml b/.mock/definition/products.yml index 076b222e..4c6fcd1d 100644 --- a/.mock/definition/products.yml +++ b/.mock/definition/products.yml @@ -21,7 +21,7 @@ service: Required scope | `ecommerce:read` source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml path-parameters: site_id: type: string @@ -112,7 +112,7 @@ service: - A single `sku-property` would be `color`. Within the `color` property, list the various colors of T-shirts as an array of `enum` values: `royal-blue`, `crimson-red`, and `forrest-green`. - Once, you've created a Product and its `sku-properties` with `enum` values, Webflow will create a **default SKU**, which will automatically be a combination of the first `sku-properties` you've created. - In our example, the default SKU will be a Royal Blue T-Shirt, because our first `enum` of our Color `sku-property` is Royal Blue. - - After you've created your product, you can create additional SKUs using the [Create SKU endpoint.](/data/reference/ecommerce/products-sk-us/create-sku) + - After you've created your product, you can create additional SKUs using the [Create SKU 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 @@ -121,7 +121,7 @@ service: Required scope | `ecommerce:write` source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml path-parameters: site_id: type: string @@ -202,7 +202,7 @@ service: Required scope | `ecommerce:read` source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml path-parameters: site_id: type: string @@ -283,7 +283,7 @@ service: Required scope | `ecommerce:write` source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml path-parameters: site_id: type: string @@ -358,7 +358,7 @@ service: Required scope | `ecommerce:write` source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml path-parameters: site_id: type: string @@ -426,7 +426,7 @@ service: Required scope | `ecommerce:write` source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml path-parameters: site_id: type: string @@ -491,10 +491,10 @@ service: track-inventory: true quantity: 10 source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml types: ProductsCreateSkuResponse: properties: skus: optional> source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml diff --git a/.mock/definition/scripts.yml b/.mock/definition/scripts.yml index 7fde1147..8236ed29 100644 --- a/.mock/definition/scripts.yml +++ b/.mock/definition/scripts.yml @@ -23,15 +23,14 @@ service: Additionally, Scripts can be remotely hosted, or registered as inline snippets. -
Access to this - endpoint requires a bearer token from a Data - Client App.
+ + Access to this endpoint requires a bearer token from a [Data + Client App](/data/docs/getting-started-data-clients). Required scope | `custom_code:read` source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml path-parameters: site_id: type: string @@ -96,15 +95,14 @@ service: Additionally, Scripts can be remotely hosted, or registered as inline snippets. -
Access to this - endpoint requires a bearer token from a Data - Client App.
+ + Access to this endpoint requires a bearer token from a [Data + Client App](/data/docs/getting-started-data-clients). Required scope | `custom_code:write` source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml path-parameters: site_id: type: string @@ -183,15 +181,13 @@ service: `custom_code` endpoints. -
Access to this - endpoint requires a bearer token from a Data - Client App.
+ Access to this endpoint requires a bearer token from a [Data + Client App](/data/docs/getting-started-data-clients). Required scope | `custom_code:write` source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml path-parameters: site_id: type: string @@ -254,4 +250,4 @@ service: lastUpdated: lastUpdated version: 0.0.1 source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml diff --git a/.mock/definition/sites.yml b/.mock/definition/sites.yml index 31a7f313..cea89979 100644 --- a/.mock/definition/sites.yml +++ b/.mock/definition/sites.yml @@ -4,6 +4,88 @@ service: auth: false base-path: '' endpoints: + create: + path: /workspaces/{workspace_id}/sites + method: POST + auth: true + 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 + 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://d1otoma47x30pg.cloudfront.net/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: false + dataCollectionType: always list: path: /sites method: GET @@ -13,7 +95,7 @@ service: Required scope | `sites:read` source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml display-name: List Sites response: docs: Request was successful @@ -40,6 +122,7 @@ service: customDomains: - id: 589a331aa51e760df7ccb89e url: heartofgold.galaxy + lastPublished: '2022-12-07T16:51:37Z' locales: primary: id: 653fd9af6a07fc9cfd7a5e57 @@ -80,6 +163,7 @@ service: customDomains: - id: 589a331aa51e760df7ccb89f url: marvin.blog + lastPublished: '2022-12-07T16:51:37Z' locales: primary: id: 653fd9af6a07fc9cfd7a5e57 @@ -113,6 +197,7 @@ service: customDomains: - id: 589a331aa51e760df7ccb8a0 url: vogonpoetry.galaxy + lastPublished: '2022-12-07T16:51:37Z' locales: primary: id: 653fd9af6a07fc9cfd7a5e55 @@ -141,7 +226,7 @@ service: Required scope | `sites:read` source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml path-parameters: site_id: type: string @@ -175,8 +260,115 @@ service: 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: true + 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: true + 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 + 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 @@ -206,7 +398,7 @@ service: Required scope | `sites:read` source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml path-parameters: site_id: type: string @@ -229,8 +421,10 @@ service: 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 @@ -245,7 +439,7 @@ service: Required scope | `sites:write` source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml path-parameters: site_id: type: string @@ -281,10 +475,12 @@ service: customDomains: - id: 589a331aa51e760df7ccb89d url: test-api-domain.com + lastPublished: '2022-12-07T16:51:37Z' publishToWebflowSubdomain: true source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml display-name: Sites +docs: Sites are the sites in your Webflow workspace. types: SitesPublishResponse: properties: @@ -296,4 +492,4 @@ types: docs: Flag for publishing to webflow.io subdomain default: false source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml diff --git a/.mock/definition/sites/activityLogs.yml b/.mock/definition/sites/activityLogs.yml index 1e264119..1468f52e 100644 --- a/.mock/definition/sites/activityLogs.yml +++ b/.mock/definition/sites/activityLogs.yml @@ -12,7 +12,7 @@ service: Retrieve Activity Logs for a specific Site. Requires Site to be on an Enterprise plan.

Required scope | `site_activity:read` source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml path-parameters: site_id: type: string @@ -62,4 +62,4 @@ service: offset: 0 total: 1 source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml diff --git a/.mock/definition/sites/plans.yml b/.mock/definition/sites/plans.yml new file mode 100644 index 00000000..ae9de6dc --- /dev/null +++ b/.mock/definition/sites/plans.yml @@ -0,0 +1,40 @@ +imports: + root: ../__package__.yml +service: + auth: false + base-path: '' + endpoints: + get-site-plan: + path: /sites/{site_id}/plan + method: GET + auth: true + docs: | + Get site plan details for the specified 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 Plan + response: + docs: Request was successful + type: root.SitePlan + 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 new file mode 100644 index 00000000..b104d865 --- /dev/null +++ b/.mock/definition/sites/redirects.yml @@ -0,0 +1,190 @@ +imports: + root: ../__package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /sites/{site_id}/redirects + method: GET + auth: true + docs: > + Fetch a list of all URL 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. + + + + 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 URL redirects + response: + docs: Request was successful + type: root.Redirects + 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: true + docs: > + Add a new URL 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. + + + 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 URL redirect + request: + body: root.Redirect + content-type: application/json + response: + docs: Request was successful + type: root.Redirect + 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: true + docs: > + Remove a URL 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. + + 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 URL redirects + response: + docs: Request was successful + type: root.Redirects + 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: true + docs: | + Update a URL redirection rule from a site. + 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 URL redirect + request: + body: root.Redirect + content-type: application/json + response: + docs: Request was successful + type: root.Redirect + 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/scripts.yml b/.mock/definition/sites/scripts.yml index eef5e634..92ad0e41 100644 --- a/.mock/definition/sites/scripts.yml +++ b/.mock/definition/sites/scripts.yml @@ -11,15 +11,14 @@ service: docs: > Get all registered scripts that have been applied to a specific Site. -
Access to this - endpoint requires a bearer token from a Data - Client App.
+ + Access to this endpoint requires a bearer token from a [Data + Client App](/data/docs/getting-started-data-clients). Required scope | `custom_code:read` source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml path-parameters: site_id: type: string @@ -68,15 +67,14 @@ service: `custom_code` endpoints. -
Access to this - endpoint requires a bearer token from a Data - Client App.
+ + Access to this endpoint requires a bearer token from a [Data + Client App](/data/docs/getting-started-data-clients). Required scope | `custom_code:write` source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml path-parameters: site_id: type: string @@ -130,15 +128,13 @@ service: Delete the custom code block that an app created for a Site -
Access to this - endpoint requires a bearer token from a Data - Client App.
+ Access to this endpoint requires a bearer token from a [Data + Client App](/data/docs/getting-started-data-clients). Required scope | `custom_code:write` source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml path-parameters: site_id: type: string @@ -160,15 +156,14 @@ service: docs: > Get all instances of Custom Code applied to a Site or Pages. -
Access to this - endpoint requires a bearer token from a Data - Client App.
+ + Access to this endpoint requires a bearer token from a [Data + Client App](/data/docs/getting-started-data-clients). Required scope | `custom_code:read` source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml path-parameters: site_id: type: string @@ -225,4 +220,4 @@ service: offset: 0 total: 1 source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml diff --git a/.mock/definition/token.yml b/.mock/definition/token.yml index 17b11888..033c5c36 100644 --- a/.mock/definition/token.yml +++ b/.mock/definition/token.yml @@ -13,7 +13,7 @@ service: Required Scope | `authorized_user:read` source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml display-name: Get Authorization User Info response: docs: Request was successful @@ -35,10 +35,11 @@ service: docs: > Information about the authorization token - Access to this endpoint requires a bearer token from a []>Data + + Access to this endpoint requires a bearer token from a [Data Client App](/data/docs/getting-started-data-clients). source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml display-name: Get Authorization Info response: docs: Request was successful @@ -68,4 +69,4 @@ service: homepage: https://webflow.com displayName: My Amazing App source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml diff --git a/.mock/definition/users.yml b/.mock/definition/users.yml index 6c8b266f..19a17cc3 100644 --- a/.mock/definition/users.yml +++ b/.mock/definition/users.yml @@ -32,7 +32,7 @@ types: name: UpdatedOnDescending docs: Sorts users in descending order based on their update date source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml UsersUpdateRequestData: properties: name: @@ -48,7 +48,7 @@ types: docs: | Boolean indicating if the user has accepted to receive communications source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml inline: true imports: root: __package__.yml @@ -65,7 +65,7 @@ service: Required scope | `users:read` source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml path-parameters: site_id: type: string @@ -169,7 +169,7 @@ service: Required scope | `users:read` source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml path-parameters: site_id: type: string @@ -220,7 +220,7 @@ service: Required scope | `users:write` source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml path-parameters: site_id: type: string @@ -252,7 +252,7 @@ service: The email and password fields cannot be updated using this endpoint source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml path-parameters: site_id: type: string @@ -329,7 +329,7 @@ service: Required scope | `users:write` source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml path-parameters: site_id: type: string @@ -389,4 +389,4 @@ service: accept-communications: true additionalProperties: additionalProperties source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml diff --git a/.mock/definition/webhooks.yml b/.mock/definition/webhooks.yml index e32db3df..d40e3e4c 100644 --- a/.mock/definition/webhooks.yml +++ b/.mock/definition/webhooks.yml @@ -13,7 +13,7 @@ service: Required scope | `sites:read` source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml path-parameters: site_id: type: string @@ -75,14 +75,13 @@ service: Limit of 75 registrations per `triggerType`, per site. -
Access to this - endpoint requires a bearer token from a Data - Client App.
+ + 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: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml path-parameters: site_id: type: string @@ -131,7 +130,7 @@ service: Required scope: `sites:read` source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml path-parameters: webhook_id: type: string @@ -169,7 +168,7 @@ service: Required scope: `sites:read` source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml path-parameters: webhook_id: type: string @@ -185,5 +184,6 @@ service: - path-parameters: webhook_id: 580e64008c9a982ac9b8b754 source: - openapi: ../../../referenced-specs/v2.yml + openapi: ../../../openapi/referenced-specs/v2.yml display-name: Webhooks +docs: Webhooks are the webhooks in your Webflow site. diff --git a/.mock/fern.config.json b/.mock/fern.config.json index 757dd2f7..8b3316e9 100644 --- a/.mock/fern.config.json +++ b/.mock/fern.config.json @@ -1,4 +1,4 @@ { "organization" : "webflow", - "version" : "0.45.3" + "version" : "0.46.19" } \ No newline at end of file diff --git a/package.json b/package.json index 28450eea..47be4ea6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "webflow-api", - "version": "3.0.2", + "version": "3.1.0", "private": false, "repository": "https://github.com/webflow/js-webflow-api", "main": "./index.js", diff --git a/reference.md b/reference.md index bf9f6049..1779f435 100644 --- a/reference.md +++ b/reference.md @@ -72,7 +72,8 @@ await client.token.authorizedBy();
Information about the authorization token -Access to this endpoint requires a bearer token from a []>Data Client App](/data/docs/getting-started-data-clients). + +Access to this endpoint requires a bearer token from a [Data Client App](/data/docs/getting-started-data-clients).
@@ -117,6 +118,81 @@ await client.token.introspect(); ## Sites +
client.sites.create(workspaceId, { ...params }) -> Webflow.Site +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Create a site. This endpoint requires an Enterprise workspace. + +Required scope | `workspace:write` + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.sites.create("580e63e98c9a982ac9b8b741", { + name: "The Hitchhiker's Guide to the Galaxy", +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**workspaceId:** `string` — Unique identifier for a Workspace + +
+
+ +
+
+ +**request:** `Webflow.SitesCreateRequest` + +
+
+ +
+
+ +**requestOptions:** `Sites.RequestOptions` + +
+
+
+
+ +
+
+
+
client.sites.list() -> Webflow.Sites
@@ -239,6 +315,144 @@ await client.sites.get("580e63e98c9a982ac9b8b741");
+
client.sites.delete(siteId) -> void +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Delete a site. This endpoint requires an Enterprise workspace. + +Required scope | `sites:write` + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.sites.delete("580e63e98c9a982ac9b8b741"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**siteId:** `string` — Unique identifier for a Site + +
+
+ +
+
+ +**requestOptions:** `Sites.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.sites.update(siteId, { ...params }) -> Webflow.Site +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Update a site. This endpoint requires an Enterprise workspace. + +Required scope | `sites:write` + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.sites.update("580e63e98c9a982ac9b8b741"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**siteId:** `string` — Unique identifier for a Site + +
+
+ +
+
+ +**request:** `Webflow.SitesUpdateRequest` + +
+
+ +
+
+ +**requestOptions:** `Sites.RequestOptions` + +
+
+
+
+ +
+
+
+
client.sites.getCustomDomain(siteId) -> Webflow.Domains
@@ -917,9 +1131,10 @@ await client.pages.updatePageSettings("63c720f9347c2139b248e552", {
-Get static content from a static page. +Get static content from a static page. This includes text nodes, image nodes and component instances. +To retrieve the contents of components in the page use the [get component content](/data/reference/pages-and-components/components/get-content) 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. +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 | `pages:read` @@ -994,9 +1209,16 @@ await client.pages.getContent("63c720f9347c2139b248e552", {
-This endpoint allows for updating static content on a static page within a secondary locale. It is designed specifically for localized pages and can handle up to 1000 nodes per request. +This endpoint updates content on a static page in **secondary locales**. It supports updating up to 1000 nodes in a single request. -

Note:This endpoint is specifically for localized pages. Ensure that the locale specified is a valid secondary locale for the site.

+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 + + + 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` @@ -1015,19 +1237,28 @@ Required scope | `pages:write` ```typescript await client.pages.updateStaticContent("63c720f9347c2139b248e552", { - localeId: "65427cf400e02b306eaa04a0", + localeId: "localeId", nodes: [ { nodeId: "a245c12d-995b-55ee-5ec7-aa36a6cad623", - text: "

The Hitchhiker\u2019s Guide to the Galaxy

", + text: "

The Hitchhiker's Guide to the Galaxy

", }, { nodeId: "a245c12d-995b-55ee-5ec7-aa36a6cad627", - text: "

Don\u2019t Panic!

Always know where your towel is.

", + text: "

Don't Panic!

Always know where your towel is.

", }, { nodeId: "a245c12d-995b-55ee-5ec7-aa36a6cad629", - text: 'Marvin, the Paranoid Android', + propertyOverrides: [ + { + propertyId: "7dd14c08-2e96-8d3d-2b19-b5c03642a0f0", + text: "

Time is an illusion

", + }, + { + propertyId: "7dd14c08-2e96-8d3d-2b19-b5c03642a0f1", + text: "Life, the Universe and Everything", + }, + ], }, ], }); @@ -1054,7 +1285,7 @@ await client.pages.updateStaticContent("63c720f9347c2139b248e552", {
-**request:** `Webflow.DomWrite` +**request:** `Webflow.PageDomWrite`
@@ -1073,9 +1304,9 @@ await client.pages.updateStaticContent("63c720f9347c2139b248e552", {
-## Scripts +## Components -
client.scripts.list(siteId) -> Webflow.RegisteredScriptList +
client.components.list(siteId, { ...params }) -> Webflow.ComponentList
@@ -1087,16 +1318,9 @@ await client.pages.updateStaticContent("63c720f9347c2139b248e552", {
-List of scripts registered to a Site. - -In order to use the Custom Code APIs for Sites and Pages, Custom Code Scripts must first be registered -to a Site via the `registered_scripts` endpoints, and then applied to a Site or Page using the appropriate -`custom_code` endpoints. -Additionally, Scripts can be remotely hosted, or registered as inline snippets. - -
Access to this endpoint requires a bearer token from a Data Client App.
+List of all components for a site. -Required scope | `custom_code:read` +Required scope | `components:read`
@@ -1112,7 +1336,7 @@ Required scope | `custom_code:read`
```typescript -await client.scripts.list("580e63e98c9a982ac9b8b741"); +await client.components.list("580e63e98c9a982ac9b8b741"); ```
@@ -1136,7 +1360,15 @@ await client.scripts.list("580e63e98c9a982ac9b8b741");
-**requestOptions:** `Scripts.RequestOptions` +**request:** `Webflow.ComponentsListRequest` + +
+
+ +
+
+ +**requestOptions:** `Components.RequestOptions`
@@ -1147,7 +1379,7 @@ await client.scripts.list("580e63e98c9a982ac9b8b741");
-
client.scripts.registerHosted(siteId, { ...params }) -> Webflow.CustomCodeHostedResponse +
client.components.getContent(siteId, componentId, { ...params }) -> Webflow.ComponentDom
@@ -1159,16 +1391,12 @@ await client.scripts.list("580e63e98c9a982ac9b8b741");
-Add a script to a Site's Custom Code registry. - -In order to use the Custom Code APIs for Sites and Pages, Custom Code Scripts must first be registered -to a Site via the `registered_scripts` endpoints, and then applied to a Site or Page using the appropriate -`custom_code` endpoints. -Additionally, Scripts can be remotely hosted, or registered as inline snippets. +Get static content from a component definition. This includes text nodes, image 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. -
Access to this endpoint requires a bearer token from a Data Client App.
+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 | `custom_code:write` +Required scope | `components:read`
@@ -1184,11 +1412,8 @@ Required scope | `custom_code:write`
```typescript -await client.scripts.registerHosted("580e63e98c9a982ac9b8b741", { - hostedLocation: "hostedLocation", - integrityHash: "integrityHash", - version: "version", - displayName: "displayName", +await client.components.getContent("580e63e98c9a982ac9b8b741", "8505ba55-ef72-629e-f85c-33e4b703d48b", { + localeId: "65427cf400e02b306eaa04a0", }); ``` @@ -1213,7 +1438,7 @@ await client.scripts.registerHosted("580e63e98c9a982ac9b8b741", {
-**request:** `Webflow.CustomCodeHostedRequest` +**componentId:** `string` — Unique identifier for a Component
@@ -1221,7 +1446,15 @@ await client.scripts.registerHosted("580e63e98c9a982ac9b8b741", {
-**requestOptions:** `Scripts.RequestOptions` +**request:** `Webflow.ComponentsGetContentRequest` + +
+
+ +
+
+ +**requestOptions:** `Components.RequestOptions`
@@ -1232,7 +1465,7 @@ await client.scripts.registerHosted("580e63e98c9a982ac9b8b741", {
-
client.scripts.registerInline(siteId, { ...params }) -> Webflow.CustomCodeInlineResponse +
client.components.updateContent(siteId, componentId, { ...params }) -> Webflow.ComponentsUpdateContentResponse
@@ -1244,15 +1477,18 @@ await client.scripts.registerHosted("580e63e98c9a982ac9b8b741", {
-Add a script to a Site's Custom Code registry. Inline scripts can be between 1 and 2000 characters. +This endpoint updates content within a component defintion for **secondary locales**. It supports updating up to 1000 nodes in a single request. -In order to use the Custom Code APIs for Sites and Pages, Custom Code Scripts must first be registered -to a Site via the `registered_scripts` endpoints, and then applied to a Site or Page using the appropriate -`custom_code` endpoints. +Before making updates: -
Access to this endpoint requires a bearer token from a Data Client App.
+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 -Required scope | `custom_code:write` + + 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`
@@ -1268,10 +1504,31 @@ Required scope | `custom_code:write`
```typescript -await client.scripts.registerInline("580e63e98c9a982ac9b8b741", { - sourceCode: "alert('hello world');", - version: "0.0.1", - displayName: "Alert", +await client.components.updateContent("580e63e98c9a982ac9b8b741", "8505ba55-ef72-629e-f85c-33e4b703d48b", { + localeId: "65427cf400e02b306eaa04a0", + 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-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", + }, + ], + }, + ], }); ``` @@ -1296,7 +1553,7 @@ await client.scripts.registerInline("580e63e98c9a982ac9b8b741", {
-**request:** `Webflow.CustomCodeInlineRequest` +**componentId:** `string` — Unique identifier for a Component
@@ -1304,7 +1561,15 @@ await client.scripts.registerInline("580e63e98c9a982ac9b8b741", {
-**requestOptions:** `Scripts.RequestOptions` +**request:** `Webflow.ComponentDomWrite` + +
+
+ +
+
+ +**requestOptions:** `Components.RequestOptions`
@@ -1315,9 +1580,7 @@ await client.scripts.registerInline("580e63e98c9a982ac9b8b741", {
-## Assets - -
client.assets.list(siteId) -> Webflow.Assets +
client.components.getProperties(siteId, componentId, { ...params }) -> Webflow.ComponentProperties
@@ -1329,9 +1592,11 @@ await client.scripts.registerInline("580e63e98c9a982ac9b8b741", {
-List assets for a given site +Get the property default values of a component definition. -Required scope | `assets:read` +If you do not provide a Locale ID in your request, the response will return any properties that can be localized from the Primary locale. + +Required scope | `components:read`
@@ -1347,7 +1612,9 @@ Required scope | `assets:read`
```typescript -await client.assets.list("580e63e98c9a982ac9b8b741"); +await client.components.getProperties("580e63e98c9a982ac9b8b741", "8505ba55-ef72-629e-f85c-33e4b703d48b", { + localeId: "65427cf400e02b306eaa04a0", +}); ```
@@ -1371,7 +1638,23 @@ await client.assets.list("580e63e98c9a982ac9b8b741");
-**requestOptions:** `Assets.RequestOptions` +**componentId:** `string` — Unique identifier for a Component + +
+
+ +
+
+ +**request:** `Webflow.ComponentsGetPropertiesRequest` + +
+
+ +
+
+ +**requestOptions:** `Components.RequestOptions`
@@ -1382,7 +1665,7 @@ await client.assets.list("580e63e98c9a982ac9b8b741");
-
client.assets.create(siteId, { ...params }) -> Webflow.AssetUpload +
client.components.updateProperties(siteId, componentId, { ...params }) -> Webflow.ComponentsUpdatePropertiesResponse
@@ -1394,13 +1677,15 @@ await client.assets.list("580e63e98c9a982ac9b8b741");
-Create a new asset entry. +Update the property default values of a component definition in a specificed locale. -This endpoint generates a response with the following information: `uploadUrl` and `uploadDetails`. -You can use these two properties to [upload the file to Amazon s3 by making a POST](https://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectPOST.html) -request to the `uploadUrl` with the `uploadDetails` object as your header information in the request. +Before making updates: -Required scope | `assets:write` +1. Use the [get component properties](/data/reference/pages-and-components/components/get-properties) endpoint to identify available properties + +The request requires a secondary locale ID. If a locale is missing, the request will not be processed and will result in an error. + +Required scope | `components:write`
@@ -1416,9 +1701,18 @@ Required scope | `assets:write`
```typescript -await client.assets.create("580e63e98c9a982ac9b8b741", { - fileName: "file.png", - fileHash: "3c7d87c9575702bc3b1e991f4d3c638e", +await client.components.updateProperties("580e63e98c9a982ac9b8b741", "8505ba55-ef72-629e-f85c-33e4b703d48b", { + localeId: "65427cf400e02b306eaa04a0", + properties: [ + { + propertyId: "a245c12d-995b-55ee-5ec7-aa36a6cad623", + text: "The Hitchhiker\u2019s Guide to the Galaxy", + }, + { + propertyId: "a245c12d-995b-55ee-5ec7-aa36a6cad627", + text: "

Dont Panic!

Always know where your towel is.

", + }, + ], }); ``` @@ -1443,7 +1737,7 @@ await client.assets.create("580e63e98c9a982ac9b8b741", {
-**request:** `Webflow.AssetsCreateRequest` +**componentId:** `string` — Unique identifier for a Component
@@ -1451,7 +1745,15 @@ await client.assets.create("580e63e98c9a982ac9b8b741", {
-**requestOptions:** `Assets.RequestOptions` +**request:** `Webflow.ComponentPropertiesWrite` + +
+
+ +
+
+ +**requestOptions:** `Components.RequestOptions`
@@ -1462,7 +1764,9 @@ await client.assets.create("580e63e98c9a982ac9b8b741", {
-
client.assets.get(assetId) -> Webflow.Asset +## Scripts + +
client.scripts.list(siteId) -> Webflow.RegisteredScriptList
@@ -1474,9 +1778,16 @@ await client.assets.create("580e63e98c9a982ac9b8b741", {
-Get an Asset +List of scripts registered to a Site. -Required scope | `assets:read` +In order to use the Custom Code APIs for Sites and Pages, Custom Code Scripts must first be registered +to a Site via the `registered_scripts` endpoints, and then applied to a Site or Page using the appropriate +`custom_code` endpoints. +Additionally, Scripts can be remotely hosted, or registered as inline snippets. + +Access to this endpoint requires a bearer token from a [Data Client App](/data/docs/getting-started-data-clients). + +Required scope | `custom_code:read`
@@ -1492,7 +1803,7 @@ Required scope | `assets:read`
```typescript -await client.assets.get("580e63fc8c9a982ac9b8b745"); +await client.scripts.list("580e63e98c9a982ac9b8b741"); ```
@@ -1508,7 +1819,7 @@ await client.assets.get("580e63fc8c9a982ac9b8b745");
-**assetId:** `string` — Unique identifier for an Asset on a site +**siteId:** `string` — Unique identifier for a Site
@@ -1516,7 +1827,7 @@ await client.assets.get("580e63fc8c9a982ac9b8b745");
-**requestOptions:** `Assets.RequestOptions` +**requestOptions:** `Scripts.RequestOptions`
@@ -1527,7 +1838,7 @@ await client.assets.get("580e63fc8c9a982ac9b8b745");
-
client.assets.delete(assetId) -> void +
client.scripts.registerHosted(siteId, { ...params }) -> Webflow.CustomCodeHostedResponse
@@ -1539,9 +1850,16 @@ await client.assets.get("580e63fc8c9a982ac9b8b745");
-Delete an Asset +Add a script to a Site's Custom Code registry. -Required Scope: `assets: write` +In order to use the Custom Code APIs for Sites and Pages, Custom Code Scripts must first be registered +to a Site via the `registered_scripts` endpoints, and then applied to a Site or Page using the appropriate +`custom_code` endpoints. +Additionally, Scripts can be remotely hosted, or registered as inline snippets. + +Access to this endpoint requires a bearer token from a [Data Client App](/data/docs/getting-started-data-clients). + +Required scope | `custom_code:write`
@@ -1557,7 +1875,12 @@ Required Scope: `assets: write`
```typescript -await client.assets.delete("580e63fc8c9a982ac9b8b745"); +await client.scripts.registerHosted("580e63e98c9a982ac9b8b741", { + hostedLocation: "hostedLocation", + integrityHash: "integrityHash", + version: "version", + displayName: "displayName", +}); ```
@@ -1573,7 +1896,7 @@ await client.assets.delete("580e63fc8c9a982ac9b8b745");
-**assetId:** `string` — Unique identifier for an Asset on a site +**siteId:** `string` — Unique identifier for a Site
@@ -1581,7 +1904,15 @@ await client.assets.delete("580e63fc8c9a982ac9b8b745");
-**requestOptions:** `Assets.RequestOptions` +**request:** `Webflow.CustomCodeHostedRequest` + +
+
+ +
+
+ +**requestOptions:** `Scripts.RequestOptions`
@@ -1592,7 +1923,7 @@ await client.assets.delete("580e63fc8c9a982ac9b8b745");
-
client.assets.update(assetId, { ...params }) -> Webflow.Asset +
client.scripts.registerInline(siteId, { ...params }) -> Webflow.CustomCodeInlineResponse
@@ -1604,9 +1935,15 @@ await client.assets.delete("580e63fc8c9a982ac9b8b745");
-Update an Asset +Add a script to a Site's Custom Code registry. Inline scripts can be between 1 and 2000 characters. -Required scope | `assets:write` +In order to use the Custom Code APIs for Sites and Pages, Custom Code Scripts must first be registered +to a Site via the `registered_scripts` endpoints, and then applied to a Site or Page using the appropriate +`custom_code` endpoints. + +Access to this endpoint requires a bearer token from a [Data Client App](/data/docs/getting-started-data-clients). + +Required scope | `custom_code:write`
@@ -1622,7 +1959,11 @@ Required scope | `assets:write`
```typescript -await client.assets.update("580e63fc8c9a982ac9b8b745"); +await client.scripts.registerInline("580e63e98c9a982ac9b8b741", { + sourceCode: "alert('hello world');", + version: "0.0.1", + displayName: "Alert", +}); ```
@@ -1638,7 +1979,7 @@ await client.assets.update("580e63fc8c9a982ac9b8b745");
-**assetId:** `string` — Unique identifier for an Asset on a site +**siteId:** `string` — Unique identifier for a Site
@@ -1646,7 +1987,7 @@ await client.assets.update("580e63fc8c9a982ac9b8b745");
-**request:** `Webflow.AssetsUpdateRequest` +**request:** `Webflow.CustomCodeInlineRequest`
@@ -1654,7 +1995,7 @@ await client.assets.update("580e63fc8c9a982ac9b8b745");
-**requestOptions:** `Assets.RequestOptions` +**requestOptions:** `Scripts.RequestOptions`
@@ -1665,7 +2006,9 @@ await client.assets.update("580e63fc8c9a982ac9b8b745");
-
client.assets.listFolders(siteId) -> Webflow.AssetFolderList +## Assets + +
client.assets.list(siteId) -> Webflow.Assets
@@ -1677,7 +2020,7 @@ await client.assets.update("580e63fc8c9a982ac9b8b745");
-List Asset Folders within a given site +List assets for a given site Required scope | `assets:read` @@ -1695,7 +2038,7 @@ Required scope | `assets:read`
```typescript -await client.assets.listFolders("580e63e98c9a982ac9b8b741"); +await client.assets.list("580e63e98c9a982ac9b8b741"); ```
@@ -1730,7 +2073,7 @@ await client.assets.listFolders("580e63e98c9a982ac9b8b741");
-
client.assets.createFolder(siteId, { ...params }) -> Webflow.AssetFolder +
client.assets.create(siteId, { ...params }) -> Webflow.AssetUpload
@@ -1742,7 +2085,11 @@ await client.assets.listFolders("580e63e98c9a982ac9b8b741");
-Create an Asset Folder within a given site +Create a new asset entry. + +This endpoint generates a response with the following information: `uploadUrl` and `uploadDetails`. +You can use these two properties to [upload the file to Amazon s3 by making a POST](https://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectPOST.html) +request to the `uploadUrl` with the `uploadDetails` object as your header information in the request. Required scope | `assets:write` @@ -1760,8 +2107,9 @@ Required scope | `assets:write`
```typescript -await client.assets.createFolder("580e63e98c9a982ac9b8b741", { - displayName: "my asset folder", +await client.assets.create("580e63e98c9a982ac9b8b741", { + fileName: "file.png", + fileHash: "3c7d87c9575702bc3b1e991f4d3c638e", }); ``` @@ -1786,7 +2134,7 @@ await client.assets.createFolder("580e63e98c9a982ac9b8b741", {
-**request:** `Webflow.AssetsCreateFolderRequest` +**request:** `Webflow.AssetsCreateRequest`
@@ -1805,7 +2153,7 @@ await client.assets.createFolder("580e63e98c9a982ac9b8b741", {
-
client.assets.getFolder(assetFolderId) -> Webflow.AssetFolder +
client.assets.get(assetId) -> Webflow.Asset
@@ -1817,7 +2165,7 @@ await client.assets.createFolder("580e63e98c9a982ac9b8b741", {
-Get details about a specific Asset Folder +Get an Asset Required scope | `assets:read` @@ -1835,7 +2183,7 @@ Required scope | `assets:read`
```typescript -await client.assets.getFolder("6390c49774a71f0e3c1a08ee"); +await client.assets.get("580e63fc8c9a982ac9b8b745"); ```
@@ -1851,7 +2199,7 @@ await client.assets.getFolder("6390c49774a71f0e3c1a08ee");
-**assetFolderId:** `string` — Unique identifier for an Asset Folder +**assetId:** `string` — Unique identifier for an Asset on a site
@@ -1870,9 +2218,7 @@ await client.assets.getFolder("6390c49774a71f0e3c1a08ee");
-## Webhooks - -
client.webhooks.list(siteId) -> Webflow.WebhookList +
client.assets.delete(assetId) -> void
@@ -1884,9 +2230,9 @@ await client.assets.getFolder("6390c49774a71f0e3c1a08ee");
-List all App-created Webhooks registered for a given site +Delete an Asset -Required scope | `sites:read` +Required Scope: `assets: write`
@@ -1902,7 +2248,7 @@ Required scope | `sites:read`
```typescript -await client.webhooks.list("580e63e98c9a982ac9b8b741"); +await client.assets.delete("580e63fc8c9a982ac9b8b745"); ```
@@ -1918,7 +2264,7 @@ await client.webhooks.list("580e63e98c9a982ac9b8b741");
-**siteId:** `string` — Unique identifier for a Site +**assetId:** `string` — Unique identifier for an Asset on a site
@@ -1926,7 +2272,7 @@ await client.webhooks.list("580e63e98c9a982ac9b8b741");
-**requestOptions:** `Webhooks.RequestOptions` +**requestOptions:** `Assets.RequestOptions`
@@ -1937,7 +2283,7 @@ await client.webhooks.list("580e63e98c9a982ac9b8b741");
-
client.webhooks.create(siteId, { ...params }) -> Webflow.Webhook +
client.assets.update(assetId, { ...params }) -> Webflow.Asset
@@ -1949,12 +2295,10 @@ await client.webhooks.list("580e63e98c9a982ac9b8b741");
-Create a new Webhook. +Update an Asset -Limit of 75 registrations per `triggerType`, per site. +Required scope | `assets:write` -
Access to this endpoint requires a bearer token from a Data Client App.
-Required scope | `sites:write`
@@ -1969,15 +2313,7 @@ Required scope | `sites:write`
```typescript -await client.webhooks.create("580e63e98c9a982ac9b8b741", { - 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", -}); +await client.assets.update("580e63fc8c9a982ac9b8b745"); ```
@@ -1993,7 +2329,7 @@ await client.webhooks.create("580e63e98c9a982ac9b8b741", {
-**siteId:** `string` — Unique identifier for a Site +**assetId:** `string` — Unique identifier for an Asset on a site
@@ -2001,7 +2337,7 @@ await client.webhooks.create("580e63e98c9a982ac9b8b741", {
-**request:** `Webflow.Webhook` +**request:** `Webflow.AssetsUpdateRequest`
@@ -2009,7 +2345,7 @@ await client.webhooks.create("580e63e98c9a982ac9b8b741", {
-**requestOptions:** `Webhooks.RequestOptions` +**requestOptions:** `Assets.RequestOptions`
@@ -2020,7 +2356,7 @@ await client.webhooks.create("580e63e98c9a982ac9b8b741", {
-
client.webhooks.get(webhookId) -> Webflow.Webhook +
client.assets.listFolders(siteId) -> Webflow.AssetFolderList
@@ -2032,9 +2368,9 @@ await client.webhooks.create("580e63e98c9a982ac9b8b741", {
-Get a specific Webhook instance +List Asset Folders within a given site -Required scope: `sites:read` +Required scope | `assets:read`
@@ -2050,7 +2386,7 @@ Required scope: `sites:read`
```typescript -await client.webhooks.get("580e64008c9a982ac9b8b754"); +await client.assets.listFolders("580e63e98c9a982ac9b8b741"); ```
@@ -2066,7 +2402,7 @@ await client.webhooks.get("580e64008c9a982ac9b8b754");
-**webhookId:** `string` — Unique identifier for a Webhook +**siteId:** `string` — Unique identifier for a Site
@@ -2074,7 +2410,7 @@ await client.webhooks.get("580e64008c9a982ac9b8b754");
-**requestOptions:** `Webhooks.RequestOptions` +**requestOptions:** `Assets.RequestOptions`
@@ -2085,7 +2421,7 @@ await client.webhooks.get("580e64008c9a982ac9b8b754");
-
client.webhooks.delete(webhookId) -> void +
client.assets.createFolder(siteId, { ...params }) -> Webflow.AssetFolder
@@ -2097,9 +2433,9 @@ await client.webhooks.get("580e64008c9a982ac9b8b754");
-Remove a Webhook +Create an Asset Folder within a given site -Required scope: `sites:read` +Required scope | `assets:write`
@@ -2115,7 +2451,9 @@ Required scope: `sites:read`
```typescript -await client.webhooks.delete("580e64008c9a982ac9b8b754"); +await client.assets.createFolder("580e63e98c9a982ac9b8b741", { + displayName: "my asset folder", +}); ```
@@ -2131,7 +2469,7 @@ await client.webhooks.delete("580e64008c9a982ac9b8b754");
-**webhookId:** `string` — Unique identifier for a Webhook +**siteId:** `string` — Unique identifier for a Site
@@ -2139,7 +2477,15 @@ await client.webhooks.delete("580e64008c9a982ac9b8b754");
-**requestOptions:** `Webhooks.RequestOptions` +**request:** `Webflow.AssetsCreateFolderRequest` + +
+
+ +
+
+ +**requestOptions:** `Assets.RequestOptions`
@@ -2150,9 +2496,7 @@ await client.webhooks.delete("580e64008c9a982ac9b8b754");
-## Forms - -
client.forms.list(siteId, { ...params }) -> Webflow.FormList +
client.assets.getFolder(assetFolderId) -> Webflow.AssetFolder
@@ -2164,9 +2508,9 @@ await client.webhooks.delete("580e64008c9a982ac9b8b754");
-List forms for a given site. +Get details about a specific Asset Folder -Required scope | `forms:read` +Required scope | `assets:read`
@@ -2182,7 +2526,7 @@ Required scope | `forms:read`
```typescript -await client.forms.list("580e63e98c9a982ac9b8b741"); +await client.assets.getFolder("6390c49774a71f0e3c1a08ee"); ```
@@ -2198,15 +2542,7 @@ await client.forms.list("580e63e98c9a982ac9b8b741");
-**siteId:** `string` — Unique identifier for a Site - -
-
- -
-
- -**request:** `Webflow.FormsListRequest` +**assetFolderId:** `string` — Unique identifier for an Asset Folder
@@ -2214,7 +2550,7 @@ await client.forms.list("580e63e98c9a982ac9b8b741");
-**requestOptions:** `Forms.RequestOptions` +**requestOptions:** `Assets.RequestOptions`
@@ -2225,7 +2561,9 @@ await client.forms.list("580e63e98c9a982ac9b8b741");
-
client.forms.get(formId) -> Webflow.Form +## Webhooks + +
client.webhooks.list(siteId) -> Webflow.WebhookList
@@ -2237,9 +2575,9 @@ await client.forms.list("580e63e98c9a982ac9b8b741");
-Get information about a given form. +List all App-created Webhooks registered for a given site -Required scope | `forms:read` +Required scope | `sites:read`
@@ -2255,7 +2593,7 @@ Required scope | `forms:read`
```typescript -await client.forms.get("580e63e98c9a982ac9b8b741"); +await client.webhooks.list("580e63e98c9a982ac9b8b741"); ```
@@ -2271,7 +2609,7 @@ await client.forms.get("580e63e98c9a982ac9b8b741");
-**formId:** `string` — Unique identifier for a Form +**siteId:** `string` — Unique identifier for a Site
@@ -2279,7 +2617,7 @@ await client.forms.get("580e63e98c9a982ac9b8b741");
-**requestOptions:** `Forms.RequestOptions` +**requestOptions:** `Webhooks.RequestOptions`
@@ -2290,7 +2628,7 @@ await client.forms.get("580e63e98c9a982ac9b8b741");
-
client.forms.listSubmissions(formId, { ...params }) -> Webflow.FormSubmissionList +
client.webhooks.create(siteId, { ...params }) -> Webflow.Webhook
@@ -2302,9 +2640,12 @@ await client.forms.get("580e63e98c9a982ac9b8b741");
-List form submissions for a given form +Create a new Webhook. -Required scope | `forms:read` +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`
@@ -2320,7 +2661,15 @@ Required scope | `forms:read`
```typescript -await client.forms.listSubmissions("580e63e98c9a982ac9b8b741"); +await client.webhooks.create("580e63e98c9a982ac9b8b741", { + 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", +}); ```
@@ -2336,7 +2685,7 @@ await client.forms.listSubmissions("580e63e98c9a982ac9b8b741");
-**formId:** `string` — Unique identifier for a Form +**siteId:** `string` — Unique identifier for a Site
@@ -2344,7 +2693,7 @@ await client.forms.listSubmissions("580e63e98c9a982ac9b8b741");
-**request:** `Webflow.FormsListSubmissionsRequest` +**request:** `Webflow.Webhook`
@@ -2352,7 +2701,7 @@ await client.forms.listSubmissions("580e63e98c9a982ac9b8b741");
-**requestOptions:** `Forms.RequestOptions` +**requestOptions:** `Webhooks.RequestOptions`
@@ -2363,7 +2712,7 @@ await client.forms.listSubmissions("580e63e98c9a982ac9b8b741");
-
client.forms.getSubmission(formSubmissionId) -> Webflow.FormSubmission +
client.webhooks.get(webhookId) -> Webflow.Webhook
@@ -2375,9 +2724,9 @@ await client.forms.listSubmissions("580e63e98c9a982ac9b8b741");
-Get information about a given form submissio. +Get a specific Webhook instance -Required scope | `forms:read` +Required scope: `sites:read`
@@ -2393,7 +2742,7 @@ Required scope | `forms:read`
```typescript -await client.forms.getSubmission("580e63e98c9a982ac9b8b741"); +await client.webhooks.get("580e64008c9a982ac9b8b754"); ```
@@ -2409,7 +2758,7 @@ await client.forms.getSubmission("580e63e98c9a982ac9b8b741");
-**formSubmissionId:** `string` — Unique identifier for a Form Submission +**webhookId:** `string` — Unique identifier for a Webhook
@@ -2417,7 +2766,7 @@ await client.forms.getSubmission("580e63e98c9a982ac9b8b741");
-**requestOptions:** `Forms.RequestOptions` +**requestOptions:** `Webhooks.RequestOptions`
@@ -2428,7 +2777,7 @@ await client.forms.getSubmission("580e63e98c9a982ac9b8b741");
-
client.forms.updateSubmission(formSubmissionId, { ...params }) -> Webflow.FormSubmission +
client.webhooks.delete(webhookId) -> void
@@ -2440,9 +2789,9 @@ await client.forms.getSubmission("580e63e98c9a982ac9b8b741");
-Update hidden fields on a form submission +Remove a Webhook -Required scope | `forms:write` +Required scope: `sites:read`
@@ -2458,7 +2807,7 @@ Required scope | `forms:write`
```typescript -await client.forms.updateSubmission("580e63e98c9a982ac9b8b741"); +await client.webhooks.delete("580e64008c9a982ac9b8b754"); ```
@@ -2474,15 +2823,7 @@ await client.forms.updateSubmission("580e63e98c9a982ac9b8b741");
-**formSubmissionId:** `string` — Unique identifier for a Form Submission - -
-
- -
-
- -**request:** `Webflow.FormsUpdateSubmissionRequest` +**webhookId:** `string` — Unique identifier for a Webhook
@@ -2490,7 +2831,7 @@ await client.forms.updateSubmission("580e63e98c9a982ac9b8b741");
-**requestOptions:** `Forms.RequestOptions` +**requestOptions:** `Webhooks.RequestOptions`
@@ -2501,9 +2842,9 @@ await client.forms.updateSubmission("580e63e98c9a982ac9b8b741");
-## Users +## Forms -
client.users.list(siteId, { ...params }) -> Webflow.UserList +
client.forms.list(siteId, { ...params }) -> Webflow.FormList
@@ -2515,9 +2856,9 @@ await client.forms.updateSubmission("580e63e98c9a982ac9b8b741");
-Get a list of users for a site +List forms for a given site. -Required scope | `users:read` +Required scope | `forms:read`
@@ -2533,7 +2874,7 @@ Required scope | `users:read`
```typescript -await client.users.list("580e63e98c9a982ac9b8b741"); +await client.forms.list("580e63e98c9a982ac9b8b741"); ```
@@ -2557,7 +2898,7 @@ await client.users.list("580e63e98c9a982ac9b8b741");
-**request:** `Webflow.UsersListRequest` +**request:** `Webflow.FormsListRequest`
@@ -2565,7 +2906,7 @@ await client.users.list("580e63e98c9a982ac9b8b741");
-**requestOptions:** `Users.RequestOptions` +**requestOptions:** `Forms.RequestOptions`
@@ -2576,7 +2917,7 @@ await client.users.list("580e63e98c9a982ac9b8b741");
-
client.users.get(siteId, userId) -> Webflow.User +
client.forms.get(formId) -> Webflow.Form
@@ -2588,9 +2929,9 @@ await client.users.list("580e63e98c9a982ac9b8b741");
-Get a User by ID +Get information about a given form. -Required scope | `users:read` +Required scope | `forms:read`
@@ -2606,7 +2947,7 @@ Required scope | `users:read`
```typescript -await client.users.get("580e63e98c9a982ac9b8b741", "580e63e98c9a982ac9b8b741"); +await client.forms.get("580e63e98c9a982ac9b8b741"); ```
@@ -2622,15 +2963,7 @@ await client.users.get("580e63e98c9a982ac9b8b741", "580e63e98c9a982ac9b8b741");
-**siteId:** `string` — Unique identifier for a Site - -
-
- -
-
- -**userId:** `string` — Unique identifier for a User +**formId:** `string` — Unique identifier for a Form
@@ -2638,7 +2971,7 @@ await client.users.get("580e63e98c9a982ac9b8b741", "580e63e98c9a982ac9b8b741");
-**requestOptions:** `Users.RequestOptions` +**requestOptions:** `Forms.RequestOptions`
@@ -2649,7 +2982,7 @@ await client.users.get("580e63e98c9a982ac9b8b741", "580e63e98c9a982ac9b8b741");
-
client.users.delete(siteId, userId) -> void +
client.forms.listSubmissions(formId, { ...params }) -> Webflow.FormSubmissionList
@@ -2661,9 +2994,9 @@ await client.users.get("580e63e98c9a982ac9b8b741", "580e63e98c9a982ac9b8b741");
-Delete a User by ID +List form submissions for a given form -Required scope | `users:write` +Required scope | `forms:read`
@@ -2679,7 +3012,7 @@ Required scope | `users:write`
```typescript -await client.users.delete("580e63e98c9a982ac9b8b741", "580e63e98c9a982ac9b8b741"); +await client.forms.listSubmissions("580e63e98c9a982ac9b8b741"); ```
@@ -2695,7 +3028,7 @@ await client.users.delete("580e63e98c9a982ac9b8b741", "580e63e98c9a982ac9b8b741"
-**siteId:** `string` — Unique identifier for a Site +**formId:** `string` — Unique identifier for a Form
@@ -2703,7 +3036,7 @@ await client.users.delete("580e63e98c9a982ac9b8b741", "580e63e98c9a982ac9b8b741"
-**userId:** `string` — Unique identifier for a User +**request:** `Webflow.FormsListSubmissionsRequest`
@@ -2711,7 +3044,7 @@ await client.users.delete("580e63e98c9a982ac9b8b741", "580e63e98c9a982ac9b8b741"
-**requestOptions:** `Users.RequestOptions` +**requestOptions:** `Forms.RequestOptions`
@@ -2722,7 +3055,7 @@ await client.users.delete("580e63e98c9a982ac9b8b741", "580e63e98c9a982ac9b8b741"
-
client.users.update(siteId, userId, { ...params }) -> Webflow.User +
client.forms.getSubmission(formSubmissionId) -> Webflow.FormSubmission
@@ -2734,12 +3067,9 @@ await client.users.delete("580e63e98c9a982ac9b8b741", "580e63e98c9a982ac9b8b741"
-Update a User by ID - -Required scope | `users:write` +Get information about a given form submissio. -The email and password -fields cannot be updated using this endpoint +Required scope | `forms:read`
@@ -2755,14 +3085,7 @@ fields cannot be updated using this endpoint
```typescript -await client.users.update("580e63e98c9a982ac9b8b741", "580e63e98c9a982ac9b8b741", { - data: { - name: "Some One", - acceptPrivacy: false, - acceptCommunications: false, - }, - accessGroups: ["webflowers", "platinum", "free-tier"], -}); +await client.forms.getSubmission("580e63e98c9a982ac9b8b741"); ```
@@ -2778,23 +3101,7 @@ await client.users.update("580e63e98c9a982ac9b8b741", "580e63e98c9a982ac9b8b741"
-**siteId:** `string` — Unique identifier for a Site - -
-
- -
-
- -**userId:** `string` — Unique identifier for a User - -
-
- -
-
- -**request:** `Webflow.UsersUpdateRequest` +**formSubmissionId:** `string` — Unique identifier for a Form Submission
@@ -2802,7 +3109,7 @@ await client.users.update("580e63e98c9a982ac9b8b741", "580e63e98c9a982ac9b8b741"
-**requestOptions:** `Users.RequestOptions` +**requestOptions:** `Forms.RequestOptions`
@@ -2813,7 +3120,7 @@ await client.users.update("580e63e98c9a982ac9b8b741", "580e63e98c9a982ac9b8b741"
-
client.users.invite(siteId, { ...params }) -> Webflow.User +
client.forms.updateSubmission(formSubmissionId, { ...params }) -> Webflow.FormSubmission
@@ -2825,11 +3132,9 @@ await client.users.update("580e63e98c9a982ac9b8b741", "580e63e98c9a982ac9b8b741"
-Create and invite a user with an email address. - -The user will be sent and invite via email, which they will need to accept in order to join paid any paid access group. +Update hidden fields on a form submission -Required scope | `users:write` +Required scope | `forms:write`
@@ -2845,10 +3150,7 @@ Required scope | `users:write`
```typescript -await client.users.invite("580e63e98c9a982ac9b8b741", { - email: "some.one@home.com", - accessGroups: ["webflowers"], -}); +await client.forms.updateSubmission("580e63e98c9a982ac9b8b741"); ```
@@ -2864,7 +3166,7 @@ await client.users.invite("580e63e98c9a982ac9b8b741", {
-**siteId:** `string` — Unique identifier for a Site +**formSubmissionId:** `string` — Unique identifier for a Form Submission
@@ -2872,7 +3174,7 @@ await client.users.invite("580e63e98c9a982ac9b8b741", {
-**request:** `Webflow.UsersInviteRequest` +**request:** `Webflow.FormsUpdateSubmissionRequest`
@@ -2880,7 +3182,7 @@ await client.users.invite("580e63e98c9a982ac9b8b741", {
-**requestOptions:** `Users.RequestOptions` +**requestOptions:** `Forms.RequestOptions`
@@ -2891,9 +3193,9 @@ await client.users.invite("580e63e98c9a982ac9b8b741", {
-## AccessGroups +## Users -
client.accessGroups.list(siteId, { ...params }) -> Webflow.AccessGroupList +
client.users.list(siteId, { ...params }) -> Webflow.UserList
@@ -2905,7 +3207,7 @@ await client.users.invite("580e63e98c9a982ac9b8b741", {
-Get a list of access groups for a site +Get a list of users for a site Required scope | `users:read` @@ -2923,7 +3225,7 @@ Required scope | `users:read`
```typescript -await client.accessGroups.list("580e63e98c9a982ac9b8b741"); +await client.users.list("580e63e98c9a982ac9b8b741"); ```
@@ -2947,7 +3249,7 @@ await client.accessGroups.list("580e63e98c9a982ac9b8b741");
-**request:** `Webflow.AccessGroupsListRequest` +**request:** `Webflow.UsersListRequest`
@@ -2955,7 +3257,7 @@ await client.accessGroups.list("580e63e98c9a982ac9b8b741");
-**requestOptions:** `AccessGroups.RequestOptions` +**requestOptions:** `Users.RequestOptions`
@@ -2966,9 +3268,7 @@ await client.accessGroups.list("580e63e98c9a982ac9b8b741");
-## Products - -
client.products.list(siteId, { ...params }) -> Webflow.ProductAndSkUsList +
client.users.get(siteId, userId) -> Webflow.User
@@ -2980,12 +3280,9 @@ await client.accessGroups.list("580e63e98c9a982ac9b8b741");
-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. +Get a User by ID -Required scope | `ecommerce:read` +Required scope | `users:read`
@@ -3001,7 +3298,7 @@ Required scope | `ecommerce:read`
```typescript -await client.products.list("580e63e98c9a982ac9b8b741"); +await client.users.get("580e63e98c9a982ac9b8b741", "580e63e98c9a982ac9b8b741"); ```
@@ -3025,7 +3322,7 @@ await client.products.list("580e63e98c9a982ac9b8b741");
-**request:** `Webflow.ProductsListRequest` +**userId:** `string` — Unique identifier for a User
@@ -3033,7 +3330,7 @@ await client.products.list("580e63e98c9a982ac9b8b741");
-**requestOptions:** `Products.RequestOptions` +**requestOptions:** `Users.RequestOptions`
@@ -3044,7 +3341,7 @@ await client.products.list("580e63e98c9a982ac9b8b741");
-
client.products.create(siteId, { ...params }) -> Webflow.ProductAndSkUs +
client.users.delete(siteId, userId) -> void
@@ -3056,21 +3353,9 @@ await client.products.list("580e63e98c9a982ac9b8b741");
-Create a new product and SKU. - -When you create a product, you will always create a SKU, since a Product Item must have, at minimum, a single SKU. - -To create a Product with multiple SKUs - for example a T-shirt in sizes small, medium and large: - -- Create parameters in `sku-properties`, also known as [product options and variants.](https://help.webflow.com/hc/en-us/articles/33961334531347-Create-product-options-and-variants). -- A single `sku-property` would be `color`. Within the `color` property, list the various colors of T-shirts as an array of `enum` values: `royal-blue`, `crimson-red`, and `forrest-green`. -- Once, you've created a Product and its `sku-properties` with `enum` values, Webflow will create a **default SKU**, which will automatically be a combination of the first `sku-properties` you've created. -- In our example, the default SKU will be a Royal Blue T-Shirt, because our first `enum` of our Color `sku-property` is Royal Blue. -- After you've created your product, you can create additional SKUs using the [Create SKU endpoint.](/data/reference/ecommerce/products-sk-us/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. +Delete a User by ID -Required scope | `ecommerce:write` +Required scope | `users:write`
@@ -3086,7 +3371,7 @@ Required scope | `ecommerce:write`
```typescript -await client.products.create("580e63e98c9a982ac9b8b741"); +await client.users.delete("580e63e98c9a982ac9b8b741", "580e63e98c9a982ac9b8b741"); ```
@@ -3110,7 +3395,7 @@ await client.products.create("580e63e98c9a982ac9b8b741");
-**request:** `Webflow.ProductSkuCreate` +**userId:** `string` — Unique identifier for a User
@@ -3118,7 +3403,7 @@ await client.products.create("580e63e98c9a982ac9b8b741");
-**requestOptions:** `Products.RequestOptions` +**requestOptions:** `Users.RequestOptions`
@@ -3129,7 +3414,7 @@ await client.products.create("580e63e98c9a982ac9b8b741");
-
client.products.get(siteId, productId) -> Webflow.ProductAndSkUs +
client.users.update(siteId, userId, { ...params }) -> Webflow.User
@@ -3141,10 +3426,12 @@ await client.products.create("580e63e98c9a982ac9b8b741");
-Retrieve a single product by its ID. All of its SKUs will also be -retrieved. +Update a User by ID -Required scope | `ecommerce:read` +Required scope | `users:write` + +The email and password +fields cannot be updated using this endpoint
@@ -3160,12 +3447,19 @@ Required scope | `ecommerce:read`
```typescript -await client.products.get("580e63e98c9a982ac9b8b741", "580e63fc8c9a982ac9b8b745"); -``` - -
-
- +await client.users.update("580e63e98c9a982ac9b8b741", "580e63e98c9a982ac9b8b741", { + data: { + name: "Some One", + acceptPrivacy: false, + acceptCommunications: false, + }, + accessGroups: ["webflowers", "platinum", "free-tier"], +}); +``` + + + + #### ⚙️ Parameters @@ -3184,7 +3478,7 @@ await client.products.get("580e63e98c9a982ac9b8b741", "580e63fc8c9a982ac9b8b745"
-**productId:** `string` — Unique identifier for a Product +**userId:** `string` — Unique identifier for a User
@@ -3192,7 +3486,15 @@ await client.products.get("580e63e98c9a982ac9b8b741", "580e63fc8c9a982ac9b8b745"
-**requestOptions:** `Products.RequestOptions` +**request:** `Webflow.UsersUpdateRequest` + +
+
+ +
+
+ +**requestOptions:** `Users.RequestOptions`
@@ -3203,7 +3505,7 @@ await client.products.get("580e63e98c9a982ac9b8b741", "580e63fc8c9a982ac9b8b745"
-
client.products.update(siteId, productId, { ...params }) -> Webflow.Product +
client.users.invite(siteId, { ...params }) -> Webflow.User
@@ -3215,11 +3517,11 @@ await client.products.get("580e63e98c9a982ac9b8b741", "580e63fc8c9a982ac9b8b745"
-Update an existing Product. +Create and invite a user with an email address. -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. +The user will be sent and invite via email, which they will need to accept in order to join paid any paid access group. -Required scope | `ecommerce:write` +Required scope | `users:write`
@@ -3235,7 +3537,10 @@ Required scope | `ecommerce:write`
```typescript -await client.products.update("580e63e98c9a982ac9b8b741", "580e63fc8c9a982ac9b8b745"); +await client.users.invite("580e63e98c9a982ac9b8b741", { + email: "some.one@home.com", + accessGroups: ["webflowers"], +}); ```
@@ -3259,15 +3564,7 @@ await client.products.update("580e63e98c9a982ac9b8b741", "580e63fc8c9a982ac9b8b7
-**productId:** `string` — Unique identifier for a Product - -
-
- -
-
- -**request:** `Webflow.ProductSkuUpdate` +**request:** `Webflow.UsersInviteRequest`
@@ -3275,7 +3572,7 @@ await client.products.update("580e63e98c9a982ac9b8b741", "580e63fc8c9a982ac9b8b7
-**requestOptions:** `Products.RequestOptions` +**requestOptions:** `Users.RequestOptions`
@@ -3286,7 +3583,9 @@ await client.products.update("580e63e98c9a982ac9b8b741", "580e63fc8c9a982ac9b8b7
-
client.products.createSku(siteId, productId, { ...params }) -> Webflow.ProductsCreateSkuResponse +## AccessGroups + +
client.accessGroups.list(siteId, { ...params }) -> Webflow.AccessGroupList
@@ -3298,11 +3597,9 @@ await client.products.update("580e63e98c9a982ac9b8b741", "580e63fc8c9a982ac9b8b7
-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. +Get a list of access groups for a site -Required scope | `ecommerce:write` +Required scope | `users:read`
@@ -3318,9 +3615,7 @@ Required scope | `ecommerce:write`
```typescript -await client.products.createSku("580e63e98c9a982ac9b8b741", "580e63fc8c9a982ac9b8b745", { - skus: [{}], -}); +await client.accessGroups.list("580e63e98c9a982ac9b8b741"); ```
@@ -3344,15 +3639,7 @@ await client.products.createSku("580e63e98c9a982ac9b8b741", "580e63fc8c9a982ac9b
-**productId:** `string` — Unique identifier for a Product - -
-
- -
-
- -**request:** `Webflow.ProductsCreateSkuRequest` +**request:** `Webflow.AccessGroupsListRequest`
@@ -3360,7 +3647,7 @@ await client.products.createSku("580e63e98c9a982ac9b8b741", "580e63fc8c9a982ac9b
-**requestOptions:** `Products.RequestOptions` +**requestOptions:** `AccessGroups.RequestOptions`
@@ -3371,7 +3658,9 @@ await client.products.createSku("580e63e98c9a982ac9b8b741", "580e63fc8c9a982ac9b
-
client.products.updateSku(siteId, productId, skuId, { ...params }) -> Webflow.Sku +## Products + +
client.products.list(siteId, { ...params }) -> Webflow.ProductAndSkUsList
@@ -3383,11 +3672,12 @@ await client.products.createSku("580e63e98c9a982ac9b8b741", "580e63fc8c9a982ac9b
-Update a specified SKU. +Retrieve all products for a site. -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. +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:write` +Required scope | `ecommerce:read`
@@ -3403,9 +3693,7 @@ Required scope | `ecommerce:write`
```typescript -await client.products.updateSku("580e63e98c9a982ac9b8b741", "580e63fc8c9a982ac9b8b745", "5e8518516e147040726cc415", { - sku: {}, -}); +await client.products.list("580e63e98c9a982ac9b8b741"); ```
@@ -3429,23 +3717,7 @@ await client.products.updateSku("580e63e98c9a982ac9b8b741", "580e63fc8c9a982ac9b
-**productId:** `string` — Unique identifier for a Product - -
-
- -
-
- -**skuId:** `string` — Unique identifier for a SKU - -
-
- -
-
- -**request:** `Webflow.ProductsUpdateSkuRequest` +**request:** `Webflow.ProductsListRequest`
@@ -3464,9 +3736,7 @@ await client.products.updateSku("580e63e98c9a982ac9b8b741", "580e63fc8c9a982ac9b
-## Orders - -
client.orders.list(siteId, { ...params }) -> Webflow.OrderList +
client.products.create(siteId, { ...params }) -> Webflow.ProductAndSkUs
@@ -3478,9 +3748,21 @@ await client.products.updateSku("580e63e98c9a982ac9b8b741", "580e63fc8c9a982ac9b
-List all orders created for a given site. +Create a new product and SKU. -Required scope | `ecommerce:read` +When you create a product, you will always create a SKU, since a Product Item must have, at minimum, a single SKU. + +To create a Product with multiple SKUs - for example a T-shirt in sizes small, medium and large: + +- Create parameters in `sku-properties`, also known as [product options and variants.](https://help.webflow.com/hc/en-us/articles/33961334531347-Create-product-options-and-variants). +- A single `sku-property` would be `color`. Within the `color` property, list the various colors of T-shirts as an array of `enum` values: `royal-blue`, `crimson-red`, and `forrest-green`. +- Once, you've created a Product and its `sku-properties` with `enum` values, Webflow will create a **default SKU**, which will automatically be a combination of the first `sku-properties` you've created. +- In our example, the default SKU will be a Royal Blue T-Shirt, because our first `enum` of our Color `sku-property` is Royal Blue. +- After you've created your product, you can create additional SKUs using the [Create SKU 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`
@@ -3496,7 +3778,7 @@ Required scope | `ecommerce:read`
```typescript -await client.orders.list("580e63e98c9a982ac9b8b741"); +await client.products.create("580e63e98c9a982ac9b8b741"); ```
@@ -3520,7 +3802,7 @@ await client.orders.list("580e63e98c9a982ac9b8b741");
-**request:** `Webflow.OrdersListRequest` +**request:** `Webflow.ProductSkuCreate`
@@ -3528,7 +3810,7 @@ await client.orders.list("580e63e98c9a982ac9b8b741");
-**requestOptions:** `Orders.RequestOptions` +**requestOptions:** `Products.RequestOptions`
@@ -3539,7 +3821,7 @@ await client.orders.list("580e63e98c9a982ac9b8b741");
-
client.orders.get(siteId, orderId) -> Webflow.Order +
client.products.get(siteId, productId) -> Webflow.ProductAndSkUs
@@ -3570,7 +3852,7 @@ Required scope | `ecommerce:read`
```typescript -await client.orders.get("580e63e98c9a982ac9b8b741", "5e8518516e147040726cc415"); +await client.products.get("580e63e98c9a982ac9b8b741", "580e63fc8c9a982ac9b8b745"); ```
@@ -3594,7 +3876,7 @@ await client.orders.get("580e63e98c9a982ac9b8b741", "5e8518516e147040726cc415");
-**orderId:** `string` — Unique identifier for an Order +**productId:** `string` — Unique identifier for a Product
@@ -3602,7 +3884,7 @@ await client.orders.get("580e63e98c9a982ac9b8b741", "5e8518516e147040726cc415");
-**requestOptions:** `Orders.RequestOptions` +**requestOptions:** `Products.RequestOptions`
@@ -3613,7 +3895,7 @@ await client.orders.get("580e63e98c9a982ac9b8b741", "5e8518516e147040726cc415");
-
client.orders.update(siteId, orderId, { ...params }) -> Webflow.Order +
client.products.update(siteId, productId, { ...params }) -> Webflow.Product
@@ -3625,9 +3907,9 @@ await client.orders.get("580e63e98c9a982ac9b8b741", "5e8518516e147040726cc415");
-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. +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` @@ -3645,7 +3927,7 @@ Required scope | `ecommerce:write`
```typescript -await client.orders.update("580e63e98c9a982ac9b8b741", "5e8518516e147040726cc415"); +await client.products.update("580e63e98c9a982ac9b8b741", "580e63fc8c9a982ac9b8b745"); ```
@@ -3669,7 +3951,7 @@ await client.orders.update("580e63e98c9a982ac9b8b741", "5e8518516e147040726cc415
-**orderId:** `string` — Unique identifier for an Order +**productId:** `string` — Unique identifier for a Product
@@ -3677,7 +3959,7 @@ await client.orders.update("580e63e98c9a982ac9b8b741", "5e8518516e147040726cc415
-**request:** `Webflow.OrdersUpdateRequest` +**request:** `Webflow.ProductSkuUpdate`
@@ -3685,7 +3967,7 @@ await client.orders.update("580e63e98c9a982ac9b8b741", "5e8518516e147040726cc415
-**requestOptions:** `Orders.RequestOptions` +**requestOptions:** `Products.RequestOptions`
@@ -3696,7 +3978,7 @@ await client.orders.update("580e63e98c9a982ac9b8b741", "5e8518516e147040726cc415
-
client.orders.updateFulfill(siteId, orderId, { ...params }) -> Webflow.Order +
client.products.createSku(siteId, productId, { ...params }) -> Webflow.ProductsCreateSkuResponse
@@ -3708,7 +3990,9 @@ await client.orders.update("580e63e98c9a982ac9b8b741", "5e8518516e147040726cc415
-Updates an order's status to fulfilled +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` @@ -3726,7 +4010,9 @@ Required scope | `ecommerce:write`
```typescript -await client.orders.updateFulfill("580e63e98c9a982ac9b8b741", "5e8518516e147040726cc415"); +await client.products.createSku("580e63e98c9a982ac9b8b741", "580e63fc8c9a982ac9b8b745", { + skus: [{}], +}); ```
@@ -3750,7 +4036,7 @@ await client.orders.updateFulfill("580e63e98c9a982ac9b8b741", "5e8518516e1470407
-**orderId:** `string` — Unique identifier for an Order +**productId:** `string` — Unique identifier for a Product
@@ -3758,7 +4044,7 @@ await client.orders.updateFulfill("580e63e98c9a982ac9b8b741", "5e8518516e1470407
-**request:** `Webflow.OrdersUpdateFulfillRequest` +**request:** `Webflow.ProductsCreateSkuRequest`
@@ -3766,7 +4052,7 @@ await client.orders.updateFulfill("580e63e98c9a982ac9b8b741", "5e8518516e1470407
-**requestOptions:** `Orders.RequestOptions` +**requestOptions:** `Products.RequestOptions`
@@ -3777,7 +4063,7 @@ await client.orders.updateFulfill("580e63e98c9a982ac9b8b741", "5e8518516e1470407
-
client.orders.updateUnfulfill(siteId, orderId) -> Webflow.Order +
client.products.updateSku(siteId, productId, skuId, { ...params }) -> Webflow.Sku
@@ -3789,7 +4075,9 @@ await client.orders.updateFulfill("580e63e98c9a982ac9b8b741", "5e8518516e1470407
-Updates an order's status to unfulfilled +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` @@ -3807,7 +4095,9 @@ Required scope | `ecommerce:write`
```typescript -await client.orders.updateUnfulfill("580e63e98c9a982ac9b8b741", "5e8518516e147040726cc415"); +await client.products.updateSku("580e63e98c9a982ac9b8b741", "580e63fc8c9a982ac9b8b745", "5e8518516e147040726cc415", { + sku: {}, +}); ```
@@ -3831,7 +4121,7 @@ await client.orders.updateUnfulfill("580e63e98c9a982ac9b8b741", "5e8518516e14704
-**orderId:** `string` — Unique identifier for an Order +**productId:** `string` — Unique identifier for a Product
@@ -3839,7 +4129,23 @@ await client.orders.updateUnfulfill("580e63e98c9a982ac9b8b741", "5e8518516e14704
-**requestOptions:** `Orders.RequestOptions` +**skuId:** `string` — Unique identifier for a SKU + +
+
+ +
+
+ +**request:** `Webflow.ProductsUpdateSkuRequest` + +
+
+ +
+
+ +**requestOptions:** `Products.RequestOptions`
@@ -3850,7 +4156,9 @@ await client.orders.updateUnfulfill("580e63e98c9a982ac9b8b741", "5e8518516e14704
-
client.orders.refund(siteId, orderId, { ...params }) -> Webflow.Order +## Orders + +
client.orders.list(siteId, { ...params }) -> Webflow.OrderList
@@ -3862,10 +4170,9 @@ await client.orders.updateUnfulfill("580e63e98c9a982ac9b8b741", "5e8518516e14704
-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`. +List all orders created for a given site. -Required scope | `ecommerce:write` +Required scope | `ecommerce:read`
@@ -3881,7 +4188,7 @@ Required scope | `ecommerce:write`
```typescript -await client.orders.refund("580e63e98c9a982ac9b8b741", "5e8518516e147040726cc415"); +await client.orders.list("580e63e98c9a982ac9b8b741"); ```
@@ -3905,15 +4212,7 @@ await client.orders.refund("580e63e98c9a982ac9b8b741", "5e8518516e147040726cc415
-**orderId:** `string` — Unique identifier for an Order - -
-
- -
-
- -**request:** `Webflow.OrdersRefundRequest` +**request:** `Webflow.OrdersListRequest`
@@ -3932,9 +4231,7 @@ await client.orders.refund("580e63e98c9a982ac9b8b741", "5e8518516e147040726cc415
-## Inventory - -
client.inventory.list(collectionId, itemId) -> Webflow.InventoryItem +
client.orders.get(siteId, orderId) -> Webflow.Order
@@ -3946,7 +4243,8 @@ await client.orders.refund("580e63e98c9a982ac9b8b741", "5e8518516e147040726cc415
-List the current inventory levels for a particular SKU item. +Retrieve a single product by its ID. All of its SKUs will also be +retrieved. Required scope | `ecommerce:read` @@ -3964,7 +4262,7 @@ Required scope | `ecommerce:read`
```typescript -await client.inventory.list("580e63fc8c9a982ac9b8b745", "580e64008c9a982ac9b8b754"); +await client.orders.get("580e63e98c9a982ac9b8b741", "5e8518516e147040726cc415"); ```
@@ -3980,7 +4278,7 @@ await client.inventory.list("580e63fc8c9a982ac9b8b745", "580e64008c9a982ac9b8b75
-**collectionId:** `string` — Unique identifier for a Collection +**siteId:** `string` — Unique identifier for a Site
@@ -3988,7 +4286,7 @@ await client.inventory.list("580e63fc8c9a982ac9b8b745", "580e64008c9a982ac9b8b75
-**itemId:** `string` — Unique identifier for an Item +**orderId:** `string` — Unique identifier for an Order
@@ -3996,7 +4294,7 @@ await client.inventory.list("580e63fc8c9a982ac9b8b745", "580e64008c9a982ac9b8b75
-**requestOptions:** `Inventory.RequestOptions` +**requestOptions:** `Orders.RequestOptions`
@@ -4007,7 +4305,7 @@ await client.inventory.list("580e63fc8c9a982ac9b8b745", "580e64008c9a982ac9b8b75
-
client.inventory.update(collectionId, itemId, { ...params }) -> Webflow.InventoryItem +
client.orders.update(siteId, orderId, { ...params }) -> Webflow.Order
@@ -4019,12 +4317,9 @@ await client.inventory.list("580e63fc8c9a982ac9b8b745", "580e64008c9a982ac9b8b75
-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. +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` @@ -4042,9 +4337,7 @@ Required scope | `ecommerce:write`
```typescript -await client.inventory.update("580e63fc8c9a982ac9b8b745", "580e64008c9a982ac9b8b754", { - inventoryType: "infinite", -}); +await client.orders.update("580e63e98c9a982ac9b8b741", "5e8518516e147040726cc415"); ```
@@ -4060,7 +4353,7 @@ await client.inventory.update("580e63fc8c9a982ac9b8b745", "580e64008c9a982ac9b8b
-**collectionId:** `string` — Unique identifier for a Collection +**siteId:** `string` — Unique identifier for a Site
@@ -4068,7 +4361,7 @@ await client.inventory.update("580e63fc8c9a982ac9b8b745", "580e64008c9a982ac9b8b
-**itemId:** `string` — Unique identifier for an Item +**orderId:** `string` — Unique identifier for an Order
@@ -4076,7 +4369,7 @@ await client.inventory.update("580e63fc8c9a982ac9b8b745", "580e64008c9a982ac9b8b
-**request:** `Webflow.InventoryUpdateRequest` +**request:** `Webflow.OrdersUpdateRequest`
@@ -4084,7 +4377,7 @@ await client.inventory.update("580e63fc8c9a982ac9b8b745", "580e64008c9a982ac9b8b
-**requestOptions:** `Inventory.RequestOptions` +**requestOptions:** `Orders.RequestOptions`
@@ -4095,9 +4388,7 @@ await client.inventory.update("580e63fc8c9a982ac9b8b745", "580e64008c9a982ac9b8b
-## Ecommerce - -
client.ecommerce.getSettings(siteId) -> Webflow.EcommerceSettings +
client.orders.updateFulfill(siteId, orderId, { ...params }) -> Webflow.Order
@@ -4109,9 +4400,9 @@ await client.inventory.update("580e63fc8c9a982ac9b8b745", "580e64008c9a982ac9b8b
-Retrieve ecommerce settings for a site. +Updates an order's status to fulfilled -Required scope | `ecommerce:read` +Required scope | `ecommerce:write`
@@ -4127,7 +4418,7 @@ Required scope | `ecommerce:read`
```typescript -await client.ecommerce.getSettings("580e63e98c9a982ac9b8b741"); +await client.orders.updateFulfill("580e63e98c9a982ac9b8b741", "5e8518516e147040726cc415"); ```
@@ -4151,20 +4442,34 @@ await client.ecommerce.getSettings("580e63e98c9a982ac9b8b741");
-**requestOptions:** `Ecommerce.RequestOptions` +**orderId:** `string` — Unique identifier for an Order
+ +
+
+ +**request:** `Webflow.OrdersUpdateFulfillRequest` +
+
+
+ +**requestOptions:** `Orders.RequestOptions` + +
+
-
-## Collections Fields + + +
-
client.collections.fields.create(collectionId, { ...params }) -> Webflow.Field +
client.orders.updateUnfulfill(siteId, orderId) -> Webflow.Order
@@ -4176,16 +4481,9 @@ await client.ecommerce.getSettings("580e63e98c9a982ac9b8b741");
-Create a custom field in a collection. - -Slugs must be all lowercase letters without spaces. -If you pass a string with uppercase letters and/or spaces to the "Slug" property, Webflow will -convert the slug to lowercase and replace spaces with "-." - -Only some field types can be created through the API. -This endpoint does not currently support bulk creation. +Updates an order's status to unfulfilled -Required scope | `cms:write` +Required scope | `ecommerce:write`
@@ -4201,12 +4499,7 @@ Required scope | `cms:write`
```typescript -await client.collections.fields.create("580e63fc8c9a982ac9b8b745", { - isRequired: false, - type: "RichText", - displayName: "Post Body", - helpText: "Add the body of your post here", -}); +await client.orders.updateUnfulfill("580e63e98c9a982ac9b8b741", "5e8518516e147040726cc415"); ```
@@ -4222,7 +4515,7 @@ await client.collections.fields.create("580e63fc8c9a982ac9b8b745", {
-**collectionId:** `string` — Unique identifier for a Collection +**siteId:** `string` — Unique identifier for a Site
@@ -4230,7 +4523,7 @@ await client.collections.fields.create("580e63fc8c9a982ac9b8b745", {
-**request:** `Webflow.collections.FieldCreate` +**orderId:** `string` — Unique identifier for an Order
@@ -4238,7 +4531,7 @@ await client.collections.fields.create("580e63fc8c9a982ac9b8b745", {
-**requestOptions:** `Fields.RequestOptions` +**requestOptions:** `Orders.RequestOptions`
@@ -4249,7 +4542,7 @@ await client.collections.fields.create("580e63fc8c9a982ac9b8b745", {
-
client.collections.fields.delete(collectionId, fieldId) -> void +
client.orders.refund(siteId, orderId, { ...params }) -> Webflow.Order
@@ -4261,9 +4554,10 @@ await client.collections.fields.create("580e63fc8c9a982ac9b8b745", {
-Delete a custom field in a collection. This endpoint does not currently support bulk deletion. +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 | `cms:write` +Required scope | `ecommerce:write`
@@ -4279,7 +4573,7 @@ Required scope | `cms:write`
```typescript -await client.collections.fields.delete("580e63fc8c9a982ac9b8b745", "580e63fc8c9a982ac9b8b745"); +await client.orders.refund("580e63e98c9a982ac9b8b741", "5e8518516e147040726cc415"); ```
@@ -4295,7 +4589,7 @@ await client.collections.fields.delete("580e63fc8c9a982ac9b8b745", "580e63fc8c9a
-**collectionId:** `string` — Unique identifier for a Collection +**siteId:** `string` — Unique identifier for a Site
@@ -4303,7 +4597,7 @@ await client.collections.fields.delete("580e63fc8c9a982ac9b8b745", "580e63fc8c9a
-**fieldId:** `string` — Unique identifier for a Field in a collection +**orderId:** `string` — Unique identifier for an Order
@@ -4311,7 +4605,15 @@ await client.collections.fields.delete("580e63fc8c9a982ac9b8b745", "580e63fc8c9a
-**requestOptions:** `Fields.RequestOptions` +**request:** `Webflow.OrdersRefundRequest` + +
+
+ +
+
+ +**requestOptions:** `Orders.RequestOptions`
@@ -4322,7 +4624,9 @@ await client.collections.fields.delete("580e63fc8c9a982ac9b8b745", "580e63fc8c9a
-
client.collections.fields.update(collectionId, fieldId, { ...params }) -> Webflow.Field +## Inventory + +
client.inventory.list(collectionId, itemId) -> Webflow.InventoryItem
@@ -4334,9 +4638,9 @@ await client.collections.fields.delete("580e63fc8c9a982ac9b8b745", "580e63fc8c9a
-Update a custom field in a collection. +List the current inventory levels for a particular SKU item. -Required scope | `cms:write` +Required scope | `ecommerce:read`
@@ -4352,11 +4656,7 @@ Required scope | `cms:write`
```typescript -await client.collections.fields.update("580e63fc8c9a982ac9b8b745", "580e63fc8c9a982ac9b8b745", { - isRequired: false, - displayName: "Post Body", - helpText: "Add the body of your post here", -}); +await client.inventory.list("580e63fc8c9a982ac9b8b745", "580e64008c9a982ac9b8b754"); ```
@@ -4380,15 +4680,7 @@ await client.collections.fields.update("580e63fc8c9a982ac9b8b745", "580e63fc8c9a
-**fieldId:** `string` — Unique identifier for a Field in a collection - -
-
- -
-
- -**request:** `Webflow.collections.FieldUpdate` +**itemId:** `string` — Unique identifier for an Item
@@ -4396,7 +4688,7 @@ await client.collections.fields.update("580e63fc8c9a982ac9b8b745", "580e63fc8c9a
-**requestOptions:** `Fields.RequestOptions` +**requestOptions:** `Inventory.RequestOptions`
@@ -4407,9 +4699,7 @@ await client.collections.fields.update("580e63fc8c9a982ac9b8b745", "580e63fc8c9a
-## Collections Items - -
client.collections.items.listItems(collectionId, { ...params }) -> Webflow.CollectionItemList +
client.inventory.update(collectionId, itemId, { ...params }) -> Webflow.InventoryItem
@@ -4421,9 +4711,14 @@ await client.collections.fields.update("580e63fc8c9a982ac9b8b745", "580e63fc8c9a
-List of all Items within a Collection. +Updates the current inventory levels for a particular SKU item. -Required scope | `CMS:read` +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`
@@ -4439,7 +4734,9 @@ Required scope | `CMS:read`
```typescript -await client.collections.items.listItems("580e63fc8c9a982ac9b8b745"); +await client.inventory.update("580e63fc8c9a982ac9b8b745", "580e64008c9a982ac9b8b754", { + inventoryType: "infinite", +}); ```
@@ -4463,7 +4760,7 @@ await client.collections.items.listItems("580e63fc8c9a982ac9b8b745");
-**request:** `Webflow.collections.ItemsListItemsRequest` +**itemId:** `string` — Unique identifier for an Item
@@ -4471,7 +4768,15 @@ await client.collections.items.listItems("580e63fc8c9a982ac9b8b745");
-**requestOptions:** `Items.RequestOptions` +**request:** `Webflow.InventoryUpdateRequest` + +
+
+ +
+
+ +**requestOptions:** `Inventory.RequestOptions`
@@ -4482,7 +4787,9 @@ await client.collections.items.listItems("580e63fc8c9a982ac9b8b745");
-
client.collections.items.createItem(collectionId, { ...params }) -> Webflow.CollectionItem +## Ecommerce + +
client.ecommerce.getSettings(siteId) -> Webflow.EcommerceSettings
@@ -4494,11 +4801,9 @@ await client.collections.items.listItems("580e63fc8c9a982ac9b8b745");
-Create Item(s) in a Collection. - -To create items across multiple locales, please use [this endpoint.](/data/v2.0.0/reference/cms/collection-items/bulk-items/create-items) +Retrieve ecommerce settings for a site. -Required scope | `CMS:write` +Required scope | `ecommerce:read`
@@ -4514,14 +4819,7 @@ Required scope | `CMS:write`
```typescript -await client.collections.items.createItem("580e63fc8c9a982ac9b8b745", { - isArchived: false, - isDraft: false, - fieldData: { - name: "Pan Galactic Gargle Blaster Recipe", - slug: "pan-galactic-gargle-blaster", - }, -}); +await client.ecommerce.getSettings("580e63e98c9a982ac9b8b741"); ```
@@ -4537,15 +4835,7 @@ await client.collections.items.createItem("580e63fc8c9a982ac9b8b745", {
-**collectionId:** `string` — Unique identifier for a Collection - -
-
- -
-
- -**request:** `Webflow.ItemsCreateItemRequest` +**siteId:** `string` — Unique identifier for a Site
@@ -4553,7 +4843,7 @@ await client.collections.items.createItem("580e63fc8c9a982ac9b8b745", {
-**requestOptions:** `Items.RequestOptions` +**requestOptions:** `Ecommerce.RequestOptions`
@@ -4564,7 +4854,9 @@ await client.collections.items.createItem("580e63fc8c9a982ac9b8b745", {
-
client.collections.items.deleteItems(collectionId, { ...params }) -> void +## Collections Fields + +
client.collections.fields.create(collectionId, { ...params }) -> Webflow.Field
@@ -4576,11 +4868,16 @@ await client.collections.items.createItem("580e63fc8c9a982ac9b8b745", {
-Delete Items from a Collection. +Create a custom field in a collection. -**Note:** If the `cmsLocaleId` parameter is undefined or empty and the items are localized, items will be deleted only in the primary locale. +Slugs must be all lowercase letters without spaces. +If you pass a string with uppercase letters and/or spaces to the "Slug" property, Webflow will +convert the slug to lowercase and replace spaces with "-." -Required scope | `CMS:write` +Only some field types can be created through the API. +This endpoint does not currently support bulk creation. + +Required scope | `cms:write`
@@ -4596,7 +4893,12 @@ Required scope | `CMS:write`
```typescript -await client.collections.items.deleteItems("580e63fc8c9a982ac9b8b745"); +await client.collections.fields.create("580e63fc8c9a982ac9b8b745", { + isRequired: false, + type: "RichText", + displayName: "Post Body", + helpText: "Add the body of your post here", +}); ```
@@ -4620,7 +4922,7 @@ await client.collections.items.deleteItems("580e63fc8c9a982ac9b8b745");
-**request:** `Webflow.collections.ItemsDeleteItemsRequest` +**request:** `Webflow.collections.FieldCreate`
@@ -4628,7 +4930,7 @@ await client.collections.items.deleteItems("580e63fc8c9a982ac9b8b745");
-**requestOptions:** `Items.RequestOptions` +**requestOptions:** `Fields.RequestOptions`
@@ -4639,7 +4941,7 @@ await client.collections.items.deleteItems("580e63fc8c9a982ac9b8b745");
-
client.collections.items.updateItems(collectionId, { ...params }) -> Webflow.CollectionItem +
client.collections.fields.delete(collectionId, fieldId) -> void
@@ -4651,11 +4953,9 @@ await client.collections.items.deleteItems("580e63fc8c9a982ac9b8b745");
-Update a single item or multiple items (up to 100) in a Collection. - -**Note:** If the `cmsLocaleId` parameter is undefined or empty and the items are localized, items will be updated only in the primary locale. +Delete a custom field in a collection. This endpoint does not currently support bulk deletion. -Required scope | `CMS:write` +Required scope | `cms:write`
@@ -4671,42 +4971,7 @@ Required scope | `CMS:write`
```typescript -await client.collections.items.updateItems("580e63fc8c9a982ac9b8b745", { - items: [ - { - id: "66f6ed9576ddacf3149d5ea6", - cmsLocaleId: "66f6e966c9e1dc700a857ca5", - fieldData: { - name: "Ne Paniquez Pas", - slug: "ne-paniquez-pas", - }, - }, - { - id: "66f6ed9576ddacf3149d5ea6", - cmsLocaleId: "66f6e966c9e1dc700a857ca4", - fieldData: { - name: "No Entrar en P\u00E1nico", - slug: "no-entrar-en-panico", - }, - }, - { - id: "66f6ed9576ddacf3149d5eaa", - cmsLocaleId: "66f6e966c9e1dc700a857ca5", - fieldData: { - name: "Au Revoir et Merci pour Tous les Poissons", - slug: "au-revoir-et-merci", - }, - }, - { - id: "66f6ed9576ddacf3149d5eaa", - cmsLocaleId: "66f6e966c9e1dc700a857ca4", - fieldData: { - name: "Hasta Luego y Gracias por Todo el Pescado", - slug: "hasta-luego-y-gracias", - }, - }, - ], -}); +await client.collections.fields.delete("580e63fc8c9a982ac9b8b745", "580e63fc8c9a982ac9b8b745"); ```
@@ -4730,7 +4995,7 @@ await client.collections.items.updateItems("580e63fc8c9a982ac9b8b745", {
-**request:** `Webflow.collections.ItemsUpdateItemsRequest` +**fieldId:** `string` — Unique identifier for a Field in a collection
@@ -4738,7 +5003,7 @@ await client.collections.items.updateItems("580e63fc8c9a982ac9b8b745", {
-**requestOptions:** `Items.RequestOptions` +**requestOptions:** `Fields.RequestOptions`
@@ -4749,7 +5014,7 @@ await client.collections.items.updateItems("580e63fc8c9a982ac9b8b745", {
-
client.collections.items.listItemsLive(collectionId, { ...params }) -> Webflow.CollectionItemList +
client.collections.fields.update(collectionId, fieldId, { ...params }) -> Webflow.Field
@@ -4761,9 +5026,9 @@ await client.collections.items.updateItems("580e63fc8c9a982ac9b8b745", {
-List of all live Items within a Collection. +Update a custom field in a collection. -Required scope | `CMS:read` +Required scope | `cms:write`
@@ -4779,10 +5044,14 @@ Required scope | `CMS:read`
```typescript -await client.collections.items.listItemsLive("580e63fc8c9a982ac9b8b745"); -``` - -
+await client.collections.fields.update("580e63fc8c9a982ac9b8b745", "580e63fc8c9a982ac9b8b745", { + isRequired: false, + displayName: "Post Body", + helpText: "Add the body of your post here", +}); +``` + +
@@ -4803,7 +5072,90 @@ await client.collections.items.listItemsLive("580e63fc8c9a982ac9b8b745");
-**request:** `Webflow.collections.ItemsListItemsLiveRequest` +**fieldId:** `string` — Unique identifier for a Field in a collection + +
+
+ +
+
+ +**request:** `Webflow.collections.FieldUpdate` + +
+
+ +
+
+ +**requestOptions:** `Fields.RequestOptions` + +
+
+ + + + + +
+ +## Collections Items + +
client.collections.items.listItems(collectionId, { ...params }) -> Webflow.CollectionItemList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +List of all Items within a Collection. + +Required scope | `CMS:read` + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.collections.items.listItems("580e63fc8c9a982ac9b8b745"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**collectionId:** `string` — Unique identifier for a Collection + +
+
+ +
+
+ +**request:** `Webflow.collections.ItemsListItemsRequest`
@@ -4822,7 +5174,7 @@ await client.collections.items.listItemsLive("580e63fc8c9a982ac9b8b745");
-
client.collections.items.createItemLive(collectionId, { ...params }) -> Webflow.CollectionItem +
client.collections.items.createItem(collectionId, { ...params }) -> Webflow.CollectionItem
@@ -4834,9 +5186,9 @@ await client.collections.items.listItemsLive("580e63fc8c9a982ac9b8b745");
-Create live Item(s) in a Collection. The Item(s) will be published to the live site. +Create Item(s) in a Collection. -To create items across multiple locales, [please use this endpoint.](/v2.0.0/data/reference/cms/collection-items/bulk-items/create-items) +To create items across multiple locales, please use [this endpoint.](/v2.0.0/data/reference/cms/collection-items/staged-items/create-items) Required scope | `CMS:write` @@ -4854,7 +5206,7 @@ Required scope | `CMS:write`
```typescript -await client.collections.items.createItemLive("580e63fc8c9a982ac9b8b745", { +await client.collections.items.createItem("580e63fc8c9a982ac9b8b745", { isArchived: false, isDraft: false, fieldData: { @@ -4885,7 +5237,7 @@ await client.collections.items.createItemLive("580e63fc8c9a982ac9b8b745", {
-**request:** `Webflow.ItemsCreateItemLiveRequest` +**request:** `Webflow.ItemsCreateItemRequest`
@@ -4904,7 +5256,7 @@ await client.collections.items.createItemLive("580e63fc8c9a982ac9b8b745", {
-
client.collections.items.deleteItemsLive(collectionId, { ...params }) -> void +
client.collections.items.deleteItems(collectionId, { ...params }) -> void
@@ -4916,9 +5268,9 @@ await client.collections.items.createItemLive("580e63fc8c9a982ac9b8b745", {
-Remove an item or multiple items (up to 100 items) from the live site. Deleting published items will unpublish the items from the live site and set them to draft. +Delete Items from a Collection. -**Note:** If the `cmsLocaleId` parameter is undefined or empty and the items are localized, items will be unpublished only in the primary locale. +**Note:** If the `cmsLocaleId` parameter is undefined or empty and the items are localized, items will be deleted only in the primary locale. Required scope | `CMS:write` @@ -4936,7 +5288,7 @@ Required scope | `CMS:write`
```typescript -await client.collections.items.deleteItemsLive("580e63fc8c9a982ac9b8b745"); +await client.collections.items.deleteItems("580e63fc8c9a982ac9b8b745"); ```
@@ -4960,7 +5312,7 @@ await client.collections.items.deleteItemsLive("580e63fc8c9a982ac9b8b745");
-**request:** `Webflow.collections.ItemsDeleteItemsLiveRequest` +**request:** `Webflow.collections.ItemsDeleteItemsRequest`
@@ -4979,7 +5331,7 @@ await client.collections.items.deleteItemsLive("580e63fc8c9a982ac9b8b745");
-
client.collections.items.updateItemsLive(collectionId, { ...params }) -> Webflow.CollectionItemListNoPagination +
client.collections.items.updateItems(collectionId, { ...params }) -> Webflow.CollectionItem
@@ -4991,7 +5343,7 @@ await client.collections.items.deleteItemsLive("580e63fc8c9a982ac9b8b745");
-Update a single live item or multiple live items (up to 100) in a Collection +Update a single item or multiple items (up to 100) in a Collection. **Note:** If the `cmsLocaleId` parameter is undefined or empty and the items are localized, items will be updated only in the primary locale. @@ -5011,7 +5363,7 @@ Required scope | `CMS:write`
```typescript -await client.collections.items.updateItemsLive("580e63fc8c9a982ac9b8b745", { +await client.collections.items.updateItems("580e63fc8c9a982ac9b8b745", { items: [ { id: "66f6ed9576ddacf3149d5ea6", @@ -5070,7 +5422,7 @@ await client.collections.items.updateItemsLive("580e63fc8c9a982ac9b8b745", {
-**request:** `Webflow.collections.ItemsUpdateItemsLiveRequest` +**request:** `Webflow.collections.ItemsUpdateItemsRequest`
@@ -5089,7 +5441,7 @@ await client.collections.items.updateItemsLive("580e63fc8c9a982ac9b8b745", {
-
client.collections.items.createItems(collectionId, { ...params }) -> Webflow.BulkCollectionItem +
client.collections.items.listItemsLive(collectionId, { ...params }) -> Webflow.CollectionItemList
@@ -5101,12 +5453,82 @@ await client.collections.items.updateItemsLive("580e63fc8c9a982ac9b8b745", {
-Create an item or multiple items in a CMS Collection across multiple corresponding locales. +List of all live Items within a Collection. -**Notes:** +Required scope | `CMS:read` -- This endpoint can create up to 100 items in a request. -- If the `cmsLocaleIds` parameter is undefined or empty and localization is enabled, items will only be created in the primary locale. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.collections.items.listItemsLive("580e63fc8c9a982ac9b8b745"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**collectionId:** `string` — Unique identifier for a Collection + +
+
+ +
+
+ +**request:** `Webflow.collections.ItemsListItemsLiveRequest` + +
+
+ +
+
+ +**requestOptions:** `Items.RequestOptions` + +
+
+
+
+ + + +
+ +
client.collections.items.createItemLive(collectionId, { ...params }) -> Webflow.CollectionItem +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Create live Item(s) in a Collection. The Item(s) will be published to the live site. + +To create items across multiple locales, [please use this endpoint.](/v2.0.0/data/reference/cms/collection-items/staged-items/create-items) Required scope | `CMS:write` @@ -5124,13 +5546,12 @@ Required scope | `CMS:write`
```typescript -await client.collections.items.createItems("580e63fc8c9a982ac9b8b745", { - cmsLocaleIds: ["66f6e966c9e1dc700a857ca3", "66f6e966c9e1dc700a857ca4", "66f6e966c9e1dc700a857ca5"], +await client.collections.items.createItemLive("580e63fc8c9a982ac9b8b745", { isArchived: false, isDraft: false, fieldData: { - name: "Don\u2019t Panic", - slug: "dont-panic", + name: "Pan Galactic Gargle Blaster Recipe", + slug: "pan-galactic-gargle-blaster", }, }); ``` @@ -5156,7 +5577,7 @@ await client.collections.items.createItems("580e63fc8c9a982ac9b8b745", {
-**request:** `Webflow.collections.CreateBulkCollectionItemRequestBody` +**request:** `Webflow.ItemsCreateItemLiveRequest`
@@ -5175,7 +5596,7 @@ await client.collections.items.createItems("580e63fc8c9a982ac9b8b745", {
-
client.collections.items.getItem(collectionId, itemId, { ...params }) -> Webflow.CollectionItem +
client.collections.items.deleteItemsLive(collectionId, { ...params }) -> void
@@ -5187,9 +5608,11 @@ await client.collections.items.createItems("580e63fc8c9a982ac9b8b745", {
-Get details of a selected Collection Item. +Remove an item or multiple items (up to 100 items) from the live site. Deleting published items will unpublish the items from the live site and set them to draft. -Required scope | `CMS:read` +**Note:** If the `cmsLocaleId` parameter is undefined or empty and the items are localized, items will be unpublished only in the primary locale. + +Required scope | `CMS:write`
@@ -5205,7 +5628,697 @@ Required scope | `CMS:read`
```typescript -await client.collections.items.getItem("580e63fc8c9a982ac9b8b745", "580e64008c9a982ac9b8b754"); +await client.collections.items.deleteItemsLive("580e63fc8c9a982ac9b8b745"); +``` + +
+
+ + + +#### ⚙️ Parameters + +
+
+ +
+
+ +**collectionId:** `string` — Unique identifier for a Collection + +
+
+ +
+
+ +**request:** `Webflow.collections.ItemsDeleteItemsLiveRequest` + +
+
+ +
+
+ +**requestOptions:** `Items.RequestOptions` + +
+
+
+
+ + + +
+ +
client.collections.items.updateItemsLive(collectionId, { ...params }) -> Webflow.CollectionItemListNoPagination +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Update a single live item or multiple live items (up to 100) in a Collection + +**Note:** If the `cmsLocaleId` parameter is undefined or empty and the items are localized, items will be updated only in the primary locale. + +Required scope | `CMS:write` + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.collections.items.updateItemsLive("580e63fc8c9a982ac9b8b745", { + items: [ + { + id: "66f6ed9576ddacf3149d5ea6", + cmsLocaleId: "66f6e966c9e1dc700a857ca5", + fieldData: { + name: "Ne Paniquez Pas", + slug: "ne-paniquez-pas", + }, + }, + { + id: "66f6ed9576ddacf3149d5ea6", + cmsLocaleId: "66f6e966c9e1dc700a857ca4", + fieldData: { + name: "No Entrar en P\u00E1nico", + slug: "no-entrar-en-panico", + }, + }, + { + id: "66f6ed9576ddacf3149d5eaa", + cmsLocaleId: "66f6e966c9e1dc700a857ca5", + fieldData: { + name: "Au Revoir et Merci pour Tous les Poissons", + slug: "au-revoir-et-merci", + }, + }, + { + id: "66f6ed9576ddacf3149d5eaa", + cmsLocaleId: "66f6e966c9e1dc700a857ca4", + fieldData: { + name: "Hasta Luego y Gracias por Todo el Pescado", + slug: "hasta-luego-y-gracias", + }, + }, + ], +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**collectionId:** `string` — Unique identifier for a Collection + +
+
+ +
+
+ +**request:** `Webflow.collections.ItemsUpdateItemsLiveRequest` + +
+
+ +
+
+ +**requestOptions:** `Items.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.collections.items.createItems(collectionId, { ...params }) -> Webflow.BulkCollectionItem +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Create an item or multiple items in a CMS Collection across multiple corresponding locales. + +**Notes:** + +- This endpoint can create up to 100 items in a request. +- If the `cmsLocaleIds` parameter is undefined or empty and localization is enabled, items will only be created in the primary locale. + +Required scope | `CMS:write` + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.collections.items.createItems("580e63fc8c9a982ac9b8b745", { + cmsLocaleIds: ["66f6e966c9e1dc700a857ca3", "66f6e966c9e1dc700a857ca4", "66f6e966c9e1dc700a857ca5"], + isArchived: false, + isDraft: false, + fieldData: { + name: "Don\u2019t Panic", + slug: "dont-panic", + }, +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**collectionId:** `string` — Unique identifier for a Collection + +
+
+ +
+
+ +**request:** `Webflow.collections.CreateBulkCollectionItemRequestBody` + +
+
+ +
+
+ +**requestOptions:** `Items.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.collections.items.getItem(collectionId, itemId, { ...params }) -> Webflow.CollectionItem +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Get details of a selected Collection Item. + +Required scope | `CMS:read` + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.collections.items.getItem("580e63fc8c9a982ac9b8b745", "580e64008c9a982ac9b8b754"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**collectionId:** `string` — Unique identifier for a Collection + +
+
+ +
+
+ +**itemId:** `string` — Unique identifier for an Item + +
+
+ +
+
+ +**request:** `Webflow.collections.ItemsGetItemRequest` + +
+
+ +
+
+ +**requestOptions:** `Items.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.collections.items.deleteItem(collectionId, itemId, { ...params }) -> void +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Delete an Item from a Collection. This endpoint does not currently support bulk deletion. + +Required scope | `CMS:write` + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.collections.items.deleteItem("580e63fc8c9a982ac9b8b745", "580e64008c9a982ac9b8b754"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**collectionId:** `string` — Unique identifier for a Collection + +
+
+ +
+
+ +**itemId:** `string` — Unique identifier for an Item + +
+
+ +
+
+ +**request:** `Webflow.collections.ItemsDeleteItemRequest` + +
+
+ +
+
+ +**requestOptions:** `Items.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.collections.items.updateItem(collectionId, itemId, { ...params }) -> Webflow.CollectionItem +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Update a selected Item in a Collection. + +Required scope | `CMS:write` + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.collections.items.updateItem("580e63fc8c9a982ac9b8b745", "580e64008c9a982ac9b8b754", { + isArchived: false, + isDraft: false, + fieldData: { + name: "Pan Galactic Gargle Blaster Recipe", + slug: "pan-galactic-gargle-blaster", + }, +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**collectionId:** `string` — Unique identifier for a Collection + +
+
+ +
+
+ +**itemId:** `string` — Unique identifier for an Item + +
+
+ +
+
+ +**request:** `Webflow.CollectionItemPatchSingle` + +
+
+ +
+
+ +**requestOptions:** `Items.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.collections.items.getItemLive(collectionId, itemId, { ...params }) -> Webflow.CollectionItem +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Get details of a selected Collection live Item. + +Required scope | `CMS:read` + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.collections.items.getItemLive("580e63fc8c9a982ac9b8b745", "580e64008c9a982ac9b8b754"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**collectionId:** `string` — Unique identifier for a Collection + +
+
+ +
+
+ +**itemId:** `string` — Unique identifier for an Item + +
+
+ +
+
+ +**request:** `Webflow.collections.ItemsGetItemLiveRequest` + +
+
+ +
+
+ +**requestOptions:** `Items.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.collections.items.deleteItemLive(collectionId, itemId, { ...params }) -> void +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Remove a live item from the site. Removing a published item will unpublish the item from the live site and set it to draft. + +This endpoint does not currently support bulk deletion. + +Required scope | `CMS:write` + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.collections.items.deleteItemLive("580e63fc8c9a982ac9b8b745", "580e64008c9a982ac9b8b754"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**collectionId:** `string` — Unique identifier for a Collection + +
+
+ +
+
+ +**itemId:** `string` — Unique identifier for an Item + +
+
+ +
+
+ +**request:** `Webflow.collections.ItemsDeleteItemLiveRequest` + +
+
+ +
+
+ +**requestOptions:** `Items.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.collections.items.updateItemLive(collectionId, itemId, { ...params }) -> Webflow.CollectionItem +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Update a selected live Item in a Collection. The updates for this Item will be published to the live site. + +Required scope | `CMS:write` + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.collections.items.updateItemLive("580e63fc8c9a982ac9b8b745", "580e64008c9a982ac9b8b754", { + isArchived: false, + isDraft: false, + fieldData: { + name: "Pan Galactic Gargle Blaster Recipe", + slug: "pan-galactic-gargle-blaster", + }, +}); ```
@@ -5237,7 +6350,7 @@ await client.collections.items.getItem("580e63fc8c9a982ac9b8b745", "580e64008c9a
-**request:** `Webflow.collections.ItemsGetItemRequest` +**request:** `Webflow.CollectionItemPatchSingle`
@@ -5256,7 +6369,7 @@ await client.collections.items.getItem("580e63fc8c9a982ac9b8b745", "580e64008c9a
-
client.collections.items.deleteItem(collectionId, itemId, { ...params }) -> void +
client.collections.items.publishItem(collectionId, { ...params }) -> Webflow.ItemsPublishItemResponse
@@ -5268,9 +6381,9 @@ await client.collections.items.getItem("580e63fc8c9a982ac9b8b745", "580e64008c9a
-Delete an Item from a Collection. This endpoint does not currently support bulk deletion. +Publish an item or multiple items. -Required scope | `CMS:write` +Required scope | `cms:write`
@@ -5286,7 +6399,9 @@ Required scope | `CMS:write`
```typescript -await client.collections.items.deleteItem("580e63fc8c9a982ac9b8b745", "580e64008c9a982ac9b8b754"); +await client.collections.items.publishItem("580e63fc8c9a982ac9b8b745", { + itemIds: ["itemIds"], +}); ```
@@ -5310,15 +6425,7 @@ await client.collections.items.deleteItem("580e63fc8c9a982ac9b8b745", "580e64008
-**itemId:** `string` — Unique identifier for an Item - -
-
- -
-
- -**request:** `Webflow.collections.ItemsDeleteItemRequest` +**request:** `Webflow.collections.ItemsPublishItemRequest`
@@ -5337,7 +6444,9 @@ await client.collections.items.deleteItem("580e63fc8c9a982ac9b8b745", "580e64008
-
client.collections.items.updateItem(collectionId, itemId, { ...params }) -> Webflow.CollectionItem +## Pages Scripts + +
client.pages.scripts.getCustomCode(pageId) -> Webflow.ScriptApplyList
@@ -5349,9 +6458,15 @@ await client.collections.items.deleteItem("580e63fc8c9a982ac9b8b745", "580e64008
-Update a selected Item in a Collection. +Get all registered scripts that have been applied to a specific Page. -Required scope | `CMS:write` +In order to use the Custom Code APIs for Sites and Pages, Custom Code Scripts must first be registered +to a Site via the `registered_scripts` endpoints, and then applied to a Site or Page using the appropriate +`custom_code` endpoints. + +Access to this endpoint requires a bearer token from a [Data Client App](/data/docs/getting-started-data-clients). + +Required scope | `custom_code:read`
@@ -5367,14 +6482,7 @@ Required scope | `CMS:write`
```typescript -await client.collections.items.updateItem("580e63fc8c9a982ac9b8b745", "580e64008c9a982ac9b8b754", { - isArchived: false, - isDraft: false, - fieldData: { - name: "Pan Galactic Gargle Blaster Recipe", - slug: "pan-galactic-gargle-blaster", - }, -}); +await client.pages.scripts.getCustomCode("63c720f9347c2139b248e552"); ```
@@ -5390,23 +6498,7 @@ await client.collections.items.updateItem("580e63fc8c9a982ac9b8b745", "580e64008
-**collectionId:** `string` — Unique identifier for a Collection - -
-
- -
-
- -**itemId:** `string` — Unique identifier for an Item - -
-
- -
-
- -**request:** `Webflow.CollectionItemPatchSingle` +**pageId:** `string` — Unique identifier for a Page
@@ -5414,7 +6506,7 @@ await client.collections.items.updateItem("580e63fc8c9a982ac9b8b745", "580e64008
-**requestOptions:** `Items.RequestOptions` +**requestOptions:** `Scripts.RequestOptions`
@@ -5425,7 +6517,7 @@ await client.collections.items.updateItem("580e63fc8c9a982ac9b8b745", "580e64008
-
client.collections.items.getItemLive(collectionId, itemId, { ...params }) -> Webflow.CollectionItem +
client.pages.scripts.upsertCustomCode(pageId, { ...params }) -> Webflow.ScriptApplyList
@@ -5437,9 +6529,17 @@ await client.collections.items.updateItem("580e63fc8c9a982ac9b8b745", "580e64008
-Get details of a selected Collection live Item. +Add a registered script to a Page. -Required scope | `CMS:read` +In order to use the Custom Code APIs for Sites and Pages, Custom Code Scripts must first be registered +to a Site via the `registered_scripts` endpoints, and then applied to a Site or Page using the appropriate +`custom_code` endpoints. + +A site can have a maximum of 800 registered scripts. + +Access to this endpoint requires a bearer token from a [Data Client App](/data/docs/getting-started-data-clients). + +Required scope | `custom_code:write`
@@ -5455,7 +6555,23 @@ Required scope | `CMS:read`
```typescript -await client.collections.items.getItemLive("580e63fc8c9a982ac9b8b745", "580e64008c9a982ac9b8b754"); +await client.pages.scripts.upsertCustomCode("63c720f9347c2139b248e552", { + scripts: [ + { + id: "cms_slider", + location: "header", + version: "1.0.0", + attributes: { + "my-attribute": "some-value", + }, + }, + { + id: "alert", + location: "header", + version: "0.0.1", + }, + ], +}); ```
@@ -5471,15 +6587,7 @@ await client.collections.items.getItemLive("580e63fc8c9a982ac9b8b745", "580e6400
-**collectionId:** `string` — Unique identifier for a Collection - -
-
- -
-
- -**itemId:** `string` — Unique identifier for an Item +**pageId:** `string` — Unique identifier for a Page
@@ -5487,7 +6595,7 @@ await client.collections.items.getItemLive("580e63fc8c9a982ac9b8b745", "580e6400
-**request:** `Webflow.collections.ItemsGetItemLiveRequest` +**request:** `Webflow.ScriptApplyList`
@@ -5495,7 +6603,7 @@ await client.collections.items.getItemLive("580e63fc8c9a982ac9b8b745", "580e6400
-**requestOptions:** `Items.RequestOptions` +**requestOptions:** `Scripts.RequestOptions`
@@ -5506,7 +6614,7 @@ await client.collections.items.getItemLive("580e63fc8c9a982ac9b8b745", "580e6400
-
client.collections.items.deleteItemLive(collectionId, itemId, { ...params }) -> void +
client.pages.scripts.deleteCustomCode(pageId) -> void
@@ -5518,11 +6626,15 @@ await client.collections.items.getItemLive("580e63fc8c9a982ac9b8b745", "580e6400
-Remove a live item from the site. Removing a published item will unpublish the item from the live site and set it to draft. +Delete the custom code block that an app has created for a page -This endpoint does not currently support bulk deletion. +In order to use the Custom Code APIs for Sites and Pages, Custom Code Scripts must first be registered +to a Site via the `registered_scripts` endpoints, and then applied to a Site or Page using the appropriate +`custom_code` endpoints. -Required scope | `CMS:write` +Access to this endpoint requires a bearer token from a [Data Client App](/data/docs/getting-started-data-clients). + +Required scope | `custom_code:write`
@@ -5538,7 +6650,7 @@ Required scope | `CMS:write`
```typescript -await client.collections.items.deleteItemLive("580e63fc8c9a982ac9b8b745", "580e64008c9a982ac9b8b754"); +await client.pages.scripts.deleteCustomCode("63c720f9347c2139b248e552"); ```
@@ -5554,23 +6666,7 @@ await client.collections.items.deleteItemLive("580e63fc8c9a982ac9b8b745", "580e6
-**collectionId:** `string` — Unique identifier for a Collection - -
-
- -
-
- -**itemId:** `string` — Unique identifier for an Item - -
-
- -
-
- -**request:** `Webflow.collections.ItemsDeleteItemLiveRequest` +**pageId:** `string` — Unique identifier for a Page
@@ -5578,7 +6674,7 @@ await client.collections.items.deleteItemLive("580e63fc8c9a982ac9b8b745", "580e6
-**requestOptions:** `Items.RequestOptions` +**requestOptions:** `Scripts.RequestOptions`
@@ -5589,7 +6685,9 @@ await client.collections.items.deleteItemLive("580e63fc8c9a982ac9b8b745", "580e6
-
client.collections.items.updateItemLive(collectionId, itemId, { ...params }) -> Webflow.CollectionItem +## Sites Redirects + +
client.sites.redirects.list(siteId) -> Webflow.Redirects
@@ -5601,9 +6699,11 @@ await client.collections.items.deleteItemLive("580e63fc8c9a982ac9b8b745", "580e6
-Update a selected live Item in a Collection. The updates for this Item will be published to the live site. +Fetch a list of all URL redirect rules configured for a specific site. -Required scope | `CMS:write` +Use this endpoint to review, audit, or manage the redirection rules that control how traffic is rerouted on your site. + +Required scope: `sites:read`
@@ -5619,14 +6719,7 @@ Required scope | `CMS:write`
```typescript -await client.collections.items.updateItemLive("580e63fc8c9a982ac9b8b745", "580e64008c9a982ac9b8b754", { - isArchived: false, - isDraft: false, - fieldData: { - name: "Pan Galactic Gargle Blaster Recipe", - slug: "pan-galactic-gargle-blaster", - }, -}); +await client.sites.redirects.list("580e63e98c9a982ac9b8b741"); ```
@@ -5642,23 +6735,7 @@ await client.collections.items.updateItemLive("580e63fc8c9a982ac9b8b745", "580e6
-**collectionId:** `string` — Unique identifier for a Collection - -
-
- -
-
- -**itemId:** `string` — Unique identifier for an Item - -
-
- -
-
- -**request:** `Webflow.CollectionItemPatchSingle` +**siteId:** `string` — Unique identifier for a Site
@@ -5666,7 +6743,7 @@ await client.collections.items.updateItemLive("580e63fc8c9a982ac9b8b745", "580e6
-**requestOptions:** `Items.RequestOptions` +**requestOptions:** `Redirects.RequestOptions`
@@ -5677,7 +6754,7 @@ await client.collections.items.updateItemLive("580e63fc8c9a982ac9b8b745", "580e6
-
client.collections.items.publishItem(collectionId, { ...params }) -> Webflow.ItemsPublishItemResponse +
client.sites.redirects.create(siteId, { ...params }) -> Webflow.Redirect
@@ -5689,9 +6766,11 @@ await client.collections.items.updateItemLive("580e63fc8c9a982ac9b8b745", "580e6
-Publish an item or multiple items. +Add a new URL redirection rule to a site. -Required scope | `cms:write` +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. + +Required scope: `sites:write`
@@ -5707,8 +6786,10 @@ Required scope | `cms:write`
```typescript -await client.collections.items.publishItem("580e63fc8c9a982ac9b8b745", { - itemIds: ["itemIds"], +await client.sites.redirects.create("580e63e98c9a982ac9b8b741", { + id: "42e1a2b7aa1a13f768a0042a", + fromUrl: "/mostly-harmless", + toUrl: "/earth", }); ``` @@ -5725,7 +6806,7 @@ await client.collections.items.publishItem("580e63fc8c9a982ac9b8b745", {
-**collectionId:** `string` — Unique identifier for a Collection +**siteId:** `string` — Unique identifier for a Site
@@ -5733,7 +6814,7 @@ await client.collections.items.publishItem("580e63fc8c9a982ac9b8b745", {
-**request:** `Webflow.collections.ItemsPublishItemRequest` +**request:** `Webflow.Redirect`
@@ -5741,7 +6822,7 @@ await client.collections.items.publishItem("580e63fc8c9a982ac9b8b745", {
-**requestOptions:** `Items.RequestOptions` +**requestOptions:** `Redirects.RequestOptions`
@@ -5752,9 +6833,7 @@ await client.collections.items.publishItem("580e63fc8c9a982ac9b8b745", {
-## Pages Scripts - -
client.pages.scripts.getCustomCode(pageId) -> Webflow.ScriptApplyList +
client.sites.redirects.delete(siteId, redirectId) -> Webflow.Redirects
@@ -5766,15 +6845,9 @@ await client.collections.items.publishItem("580e63fc8c9a982ac9b8b745", {
-Get all registered scripts that have been applied to a specific Page. - -In order to use the Custom Code APIs for Sites and Pages, Custom Code Scripts must first be registered -to a Site via the `registered_scripts` endpoints, and then applied to a Site or Page using the appropriate -`custom_code` endpoints. - -
Access to this endpoint requires a bearer token from a Data Client App.
- -Required scope | `custom_code:read` +Remove a URL 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. +Required scope: `sites:write`
@@ -5790,7 +6863,7 @@ Required scope | `custom_code:read`
```typescript -await client.pages.scripts.getCustomCode("63c720f9347c2139b248e552"); +await client.sites.redirects.delete("580e63e98c9a982ac9b8b741", "66c4cb9a20cac35ed19500e6"); ```
@@ -5806,7 +6879,7 @@ await client.pages.scripts.getCustomCode("63c720f9347c2139b248e552");
-**pageId:** `string` — Unique identifier for a Page +**siteId:** `string` — Unique identifier for a Site
@@ -5814,7 +6887,15 @@ await client.pages.scripts.getCustomCode("63c720f9347c2139b248e552");
-**requestOptions:** `Scripts.RequestOptions` +**redirectId:** `string` — Unique identifier site rediect + +
+
+ +
+
+ +**requestOptions:** `Redirects.RequestOptions`
@@ -5825,7 +6906,7 @@ await client.pages.scripts.getCustomCode("63c720f9347c2139b248e552");
-
client.pages.scripts.upsertCustomCode(pageId, { ...params }) -> Webflow.ScriptApplyList +
client.sites.redirects.update(siteId, redirectId, { ...params }) -> Webflow.Redirect
@@ -5837,15 +6918,8 @@ await client.pages.scripts.getCustomCode("63c720f9347c2139b248e552");
-Add a registered script to a Page. - -In order to use the Custom Code APIs for Sites and Pages, Custom Code Scripts must first be registered -to a Site via the `registered_scripts` endpoints, and then applied to a Site or Page using the appropriate -`custom_code` endpoints. - -
Access to this endpoint requires a bearer token from a Data Client App.
- -Required scope | `custom_code:write` +Update a URL redirection rule from a site. +Required scope: `sites:write`
@@ -5861,22 +6935,10 @@ Required scope | `custom_code:write`
```typescript -await client.pages.scripts.upsertCustomCode("63c720f9347c2139b248e552", { - scripts: [ - { - id: "cms_slider", - location: "header", - version: "1.0.0", - attributes: { - "my-attribute": "some-value", - }, - }, - { - id: "alert", - location: "header", - version: "0.0.1", - }, - ], +await client.sites.redirects.update("580e63e98c9a982ac9b8b741", "66c4cb9a20cac35ed19500e6", { + id: "42e1a2b7aa1a13f768a0042a", + fromUrl: "/mostly-harmless", + toUrl: "/earth", }); ``` @@ -5893,7 +6955,7 @@ await client.pages.scripts.upsertCustomCode("63c720f9347c2139b248e552", {
-**pageId:** `string` — Unique identifier for a Page +**siteId:** `string` — Unique identifier for a Site
@@ -5901,7 +6963,7 @@ await client.pages.scripts.upsertCustomCode("63c720f9347c2139b248e552", {
-**request:** `Webflow.ScriptApplyList` +**redirectId:** `string` — Unique identifier site rediect
@@ -5909,7 +6971,15 @@ await client.pages.scripts.upsertCustomCode("63c720f9347c2139b248e552", {
-**requestOptions:** `Scripts.RequestOptions` +**request:** `Webflow.Redirect` + +
+
+ +
+
+ +**requestOptions:** `Redirects.RequestOptions`
@@ -5920,7 +6990,9 @@ await client.pages.scripts.upsertCustomCode("63c720f9347c2139b248e552", {
-
client.pages.scripts.deleteCustomCode(pageId) -> void +## Sites Plans + +
client.sites.plans.getSitePlan(siteId) -> Webflow.SitePlan
@@ -5932,15 +7004,9 @@ await client.pages.scripts.upsertCustomCode("63c720f9347c2139b248e552", {
-Delete the custom code block that an app has created for a page - -In order to use the Custom Code APIs for Sites and Pages, Custom Code Scripts must first be registered -to a Site via the `registered_scripts` endpoints, and then applied to a Site or Page using the appropriate -`custom_code` endpoints. - -
Access to this endpoint requires a bearer token from a Data Client App.
+Get site plan details for the specified Site. -Required scope | `custom_code:write` +Required scope | `sites:read`
@@ -5956,7 +7022,7 @@ Required scope | `custom_code:write`
```typescript -await client.pages.scripts.deleteCustomCode("63c720f9347c2139b248e552"); +await client.sites.plans.getSitePlan("580e63e98c9a982ac9b8b741"); ```
@@ -5972,7 +7038,7 @@ await client.pages.scripts.deleteCustomCode("63c720f9347c2139b248e552");
-**pageId:** `string` — Unique identifier for a Page +**siteId:** `string` — Unique identifier for a Site
@@ -5980,7 +7046,7 @@ await client.pages.scripts.deleteCustomCode("63c720f9347c2139b248e552");
-**requestOptions:** `Scripts.RequestOptions` +**requestOptions:** `Plans.RequestOptions`
@@ -6080,7 +7146,7 @@ await client.sites.activityLogs.list("580e63e98c9a982ac9b8b741"); Get all registered scripts that have been applied to a specific Site. -
Access to this endpoint requires a bearer token from a Data Client App.
+Access to this endpoint requires a bearer token from a [Data Client App](/data/docs/getting-started-data-clients). Required scope | `custom_code:read` @@ -6151,7 +7217,7 @@ In order to use the Custom Code APIs for Sites and Pages, Custom Code Scripts mu to a Site via the `registered_scripts` endpoints, and then applied to a Site or Page using the appropriate `custom_code` endpoints. -
Access to this endpoint requires a bearer token from a Data Client App.
+Access to this endpoint requires a bearer token from a [Data Client App](/data/docs/getting-started-data-clients). Required scope | `custom_code:write` @@ -6242,7 +7308,7 @@ await client.sites.scripts.upsertCustomCode("580e63e98c9a982ac9b8b741", { Delete the custom code block that an app created for a Site -
Access to this endpoint requires a bearer token from a Data Client App.
+Access to this endpoint requires a bearer token from a [Data Client App](/data/docs/getting-started-data-clients). Required scope | `custom_code:write` @@ -6309,7 +7375,7 @@ await client.sites.scripts.deleteCustomCode("580e63e98c9a982ac9b8b741"); Get all instances of Custom Code applied to a Site or Pages. -
Access to this endpoint requires a bearer token from a Data Client App.
+Access to this endpoint requires a bearer token from a [Data Client App](/data/docs/getting-started-data-clients). Required scope | `custom_code:read` diff --git a/src/Client.ts b/src/Client.ts index e4cb5550..8794a022 100644 --- a/src/Client.ts +++ b/src/Client.ts @@ -8,6 +8,7 @@ import { Token } from "./api/resources/token/client/Client"; import { Sites } from "./api/resources/sites/client/Client"; import { Collections } from "./api/resources/collections/client/Client"; import { Pages } from "./api/resources/pages/client/Client"; +import { Components } from "./api/resources/components/client/Client"; import { Scripts } from "./api/resources/scripts/client/Client"; import { Assets } from "./api/resources/assets/client/Client"; import { Webhooks } from "./api/resources/webhooks/client/Client"; @@ -64,6 +65,12 @@ export class WebflowClient { return (this._pages ??= new Pages(this._options)); } + protected _components: Components | undefined; + + public get components(): Components { + return (this._components ??= new Components(this._options)); + } + protected _scripts: Scripts | undefined; public get scripts(): Scripts { diff --git a/src/api/errors/index.ts b/src/api/errors/index.ts index 12de3c09..764085c5 100644 --- a/src/api/errors/index.ts +++ b/src/api/errors/index.ts @@ -1,7 +1,7 @@ export * from "./UnauthorizedError"; export * from "./ForbiddenError"; +export * from "./BadRequestError"; export * from "./NotFoundError"; export * from "./TooManyRequestsError"; -export * from "./BadRequestError"; export * from "./InternalServerError"; export * from "./ConflictError"; diff --git a/src/api/resources/accessGroups/client/Client.ts b/src/api/resources/accessGroups/client/Client.ts index 350ef95e..9dd71ce2 100644 --- a/src/api/resources/accessGroups/client/Client.ts +++ b/src/api/resources/accessGroups/client/Client.ts @@ -78,8 +78,8 @@ export class AccessGroups { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "3.0.2", - "User-Agent": "webflow-api/3.0.2", + "X-Fern-SDK-Version": "3.1.0", + "User-Agent": "webflow-api/3.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, diff --git a/src/api/resources/assets/client/Client.ts b/src/api/resources/assets/client/Client.ts index 54cc69d7..5e0b591a 100644 --- a/src/api/resources/assets/client/Client.ts +++ b/src/api/resources/assets/client/Client.ts @@ -27,6 +27,9 @@ export declare namespace Assets { } } +/** + * Assets are files that are uploaded to your Webflow account. + */ export class Assets { constructor(protected readonly _options: Assets.Options) {} @@ -58,8 +61,8 @@ export class Assets { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "3.0.2", - "User-Agent": "webflow-api/3.0.2", + "X-Fern-SDK-Version": "3.1.0", + "User-Agent": "webflow-api/3.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -150,10 +153,12 @@ export class Assets { /** * Create a new asset entry. * + * * This endpoint generates a response with the following information: `uploadUrl` and `uploadDetails`. * You can use these two properties to [upload the file to Amazon s3 by making a POST](https://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectPOST.html) * request to the `uploadUrl` with the `uploadDetails` object as your header information in the request. * + * * Required scope | `assets:write` * * @param {string} siteId - Unique identifier for a Site @@ -187,8 +192,8 @@ export class Assets { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "3.0.2", - "User-Agent": "webflow-api/3.0.2", + "X-Fern-SDK-Version": "3.1.0", + "User-Agent": "webflow-api/3.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -309,8 +314,8 @@ export class Assets { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "3.0.2", - "User-Agent": "webflow-api/3.0.2", + "X-Fern-SDK-Version": "3.1.0", + "User-Agent": "webflow-api/3.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -426,8 +431,8 @@ export class Assets { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "3.0.2", - "User-Agent": "webflow-api/3.0.2", + "X-Fern-SDK-Version": "3.1.0", + "User-Agent": "webflow-api/3.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -542,8 +547,8 @@ export class Assets { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "3.0.2", - "User-Agent": "webflow-api/3.0.2", + "X-Fern-SDK-Version": "3.1.0", + "User-Agent": "webflow-api/3.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -664,8 +669,8 @@ export class Assets { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "3.0.2", - "User-Agent": "webflow-api/3.0.2", + "X-Fern-SDK-Version": "3.1.0", + "User-Agent": "webflow-api/3.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -790,8 +795,8 @@ export class Assets { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "3.0.2", - "User-Agent": "webflow-api/3.0.2", + "X-Fern-SDK-Version": "3.1.0", + "User-Agent": "webflow-api/3.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -917,8 +922,8 @@ export class Assets { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "3.0.2", - "User-Agent": "webflow-api/3.0.2", + "X-Fern-SDK-Version": "3.1.0", + "User-Agent": "webflow-api/3.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, diff --git a/src/api/resources/collections/client/Client.ts b/src/api/resources/collections/client/Client.ts index 5b27a92e..b9d4c44d 100644 --- a/src/api/resources/collections/client/Client.ts +++ b/src/api/resources/collections/client/Client.ts @@ -29,6 +29,9 @@ export declare namespace Collections { } } +/** + * Collections are CMS collections of items. + */ export class Collections { constructor(protected readonly _options: Collections.Options) {} @@ -60,8 +63,8 @@ export class Collections { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "3.0.2", - "User-Agent": "webflow-api/3.0.2", + "X-Fern-SDK-Version": "3.1.0", + "User-Agent": "webflow-api/3.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -186,8 +189,8 @@ export class Collections { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "3.0.2", - "User-Agent": "webflow-api/3.0.2", + "X-Fern-SDK-Version": "3.1.0", + "User-Agent": "webflow-api/3.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -310,8 +313,8 @@ export class Collections { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "3.0.2", - "User-Agent": "webflow-api/3.0.2", + "X-Fern-SDK-Version": "3.1.0", + "User-Agent": "webflow-api/3.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -427,8 +430,8 @@ export class Collections { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "3.0.2", - "User-Agent": "webflow-api/3.0.2", + "X-Fern-SDK-Version": "3.1.0", + "User-Agent": "webflow-api/3.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, diff --git a/src/api/resources/collections/resources/fields/client/Client.ts b/src/api/resources/collections/resources/fields/client/Client.ts index 40b73f6a..55cb19eb 100644 --- a/src/api/resources/collections/resources/fields/client/Client.ts +++ b/src/api/resources/collections/resources/fields/client/Client.ts @@ -75,8 +75,8 @@ export class Fields { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "3.0.2", - "User-Agent": "webflow-api/3.0.2", + "X-Fern-SDK-Version": "3.1.0", + "User-Agent": "webflow-api/3.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -200,8 +200,8 @@ export class Fields { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "3.0.2", - "User-Agent": "webflow-api/3.0.2", + "X-Fern-SDK-Version": "3.1.0", + "User-Agent": "webflow-api/3.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -324,8 +324,8 @@ export class Fields { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "3.0.2", - "User-Agent": "webflow-api/3.0.2", + "X-Fern-SDK-Version": "3.1.0", + "User-Agent": "webflow-api/3.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, diff --git a/src/api/resources/collections/resources/fields/types/FieldCreateType.ts b/src/api/resources/collections/resources/fields/types/FieldCreateType.ts index af640e8b..0ff0ecfb 100644 --- a/src/api/resources/collections/resources/fields/types/FieldCreateType.ts +++ b/src/api/resources/collections/resources/fields/types/FieldCreateType.ts @@ -6,32 +6,34 @@ * Choose these appropriate field type for your collection data */ export type FieldCreateType = - | "PlainText" - | "RichText" + | "Color" + | "DateTime" + | "Email" + | "ExtFileRef" + | "File" | "Image" - | "MultiImage" - | "Video" | "Link" - | "Email" - | "Phone" + | "MultiImage" | "Number" - | "DateTime" + | "Phone" + | "PlainText" + | "RichText" | "Switch" - | "Color" - | "File"; + | "Video"; export const FieldCreateType = { - PlainText: "PlainText", - RichText: "RichText", + Color: "Color", + DateTime: "DateTime", + Email: "Email", + ExtFileRef: "ExtFileRef", + File: "File", Image: "Image", - MultiImage: "MultiImage", - Video: "Video", Link: "Link", - Email: "Email", - Phone: "Phone", + MultiImage: "MultiImage", Number: "Number", - DateTime: "DateTime", + Phone: "Phone", + PlainText: "PlainText", + RichText: "RichText", Switch: "Switch", - Color: "Color", - File: "File", + Video: "Video", } as const; diff --git a/src/api/resources/collections/resources/items/client/Client.ts b/src/api/resources/collections/resources/items/client/Client.ts index dcbe7333..24db1b53 100644 --- a/src/api/resources/collections/resources/items/client/Client.ts +++ b/src/api/resources/collections/resources/items/client/Client.ts @@ -93,8 +93,8 @@ export class Items { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "3.0.2", - "User-Agent": "webflow-api/3.0.2", + "X-Fern-SDK-Version": "3.1.0", + "User-Agent": "webflow-api/3.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -188,7 +188,8 @@ export class Items { /** * Create Item(s) in a Collection. * - * To create items across multiple locales, please use [this endpoint.](/data/v2.0.0/reference/cms/collection-items/bulk-items/create-items) + * + * To create items across multiple locales, please use [this endpoint.](/v2.0.0/data/reference/cms/collection-items/staged-items/create-items) * * Required scope | `CMS:write` * @@ -246,8 +247,8 @@ export class Items { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "3.0.2", - "User-Agent": "webflow-api/3.0.2", + "X-Fern-SDK-Version": "3.1.0", + "User-Agent": "webflow-api/3.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -378,8 +379,8 @@ export class Items { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "3.0.2", - "User-Agent": "webflow-api/3.0.2", + "X-Fern-SDK-Version": "3.1.0", + "User-Agent": "webflow-api/3.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -556,8 +557,8 @@ export class Items { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "3.0.2", - "User-Agent": "webflow-api/3.0.2", + "X-Fern-SDK-Version": "3.1.0", + "User-Agent": "webflow-api/3.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -715,8 +716,8 @@ export class Items { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "3.0.2", - "User-Agent": "webflow-api/3.0.2", + "X-Fern-SDK-Version": "3.1.0", + "User-Agent": "webflow-api/3.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -810,7 +811,9 @@ export class Items { /** * Create live Item(s) in a Collection. The Item(s) will be published to the live site. * - * To create items across multiple locales, [please use this endpoint.](/v2.0.0/data/reference/cms/collection-items/bulk-items/create-items) + * + * To create items across multiple locales, [please use this endpoint.](/v2.0.0/data/reference/cms/collection-items/staged-items/create-items) + * * * Required scope | `CMS:write` * @@ -868,8 +871,8 @@ export class Items { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "3.0.2", - "User-Agent": "webflow-api/3.0.2", + "X-Fern-SDK-Version": "3.1.0", + "User-Agent": "webflow-api/3.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -999,8 +1002,8 @@ export class Items { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "3.0.2", - "User-Agent": "webflow-api/3.0.2", + "X-Fern-SDK-Version": "3.1.0", + "User-Agent": "webflow-api/3.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -1175,8 +1178,8 @@ export class Items { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "3.0.2", - "User-Agent": "webflow-api/3.0.2", + "X-Fern-SDK-Version": "3.1.0", + "User-Agent": "webflow-api/3.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -1275,9 +1278,8 @@ export class Items { * Create an item or multiple items in a CMS Collection across multiple corresponding locales. * * **Notes:** - * - * - This endpoint can create up to 100 items in a request. - * - If the `cmsLocaleIds` parameter is undefined or empty and localization is enabled, items will only be created in the primary locale. + * - This endpoint can create up to 100 items in a request. + * - If the `cmsLocaleIds` parameter is undefined or empty and localization is enabled, items will only be created in the primary locale. * * Required scope | `CMS:write` * @@ -1331,8 +1333,8 @@ export class Items { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "3.0.2", - "User-Agent": "webflow-api/3.0.2", + "X-Fern-SDK-Version": "3.1.0", + "User-Agent": "webflow-api/3.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -1468,8 +1470,8 @@ export class Items { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "3.0.2", - "User-Agent": "webflow-api/3.0.2", + "X-Fern-SDK-Version": "3.1.0", + "User-Agent": "webflow-api/3.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -1601,8 +1603,8 @@ export class Items { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "3.0.2", - "User-Agent": "webflow-api/3.0.2", + "X-Fern-SDK-Version": "3.1.0", + "User-Agent": "webflow-api/3.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -1729,8 +1731,8 @@ export class Items { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "3.0.2", - "User-Agent": "webflow-api/3.0.2", + "X-Fern-SDK-Version": "3.1.0", + "User-Agent": "webflow-api/3.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -1866,8 +1868,8 @@ export class Items { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "3.0.2", - "User-Agent": "webflow-api/3.0.2", + "X-Fern-SDK-Version": "3.1.0", + "User-Agent": "webflow-api/3.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -2001,8 +2003,8 @@ export class Items { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "3.0.2", - "User-Agent": "webflow-api/3.0.2", + "X-Fern-SDK-Version": "3.1.0", + "User-Agent": "webflow-api/3.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -2129,8 +2131,8 @@ export class Items { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "3.0.2", - "User-Agent": "webflow-api/3.0.2", + "X-Fern-SDK-Version": "3.1.0", + "User-Agent": "webflow-api/3.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -2261,8 +2263,8 @@ export class Items { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "3.0.2", - "User-Agent": "webflow-api/3.0.2", + "X-Fern-SDK-Version": "3.1.0", + "User-Agent": "webflow-api/3.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, diff --git a/src/api/resources/components/client/Client.ts b/src/api/resources/components/client/Client.ts new file mode 100644 index 00000000..cadf8c75 --- /dev/null +++ b/src/api/resources/components/client/Client.ts @@ -0,0 +1,779 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as environments from "../../../../environments"; +import * as core from "../../../../core"; +import * as Webflow from "../../../index"; +import urlJoin from "url-join"; +import * as serializers from "../../../../serialization/index"; +import * as errors from "../../../../errors/index"; + +export declare namespace Components { + interface Options { + environment?: core.Supplier; + accessToken: core.Supplier; + } + + interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ + timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ + maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Additional headers to include in the request. */ + headers?: Record; + } +} + +export class Components { + constructor(protected readonly _options: Components.Options) {} + + /** + * List of all components for a site. + * + * Required scope | `components:read` + * + * @param {string} siteId - Unique identifier for a Site + * @param {Webflow.ComponentsListRequest} request + * @param {Components.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Webflow.BadRequestError} + * @throws {@link Webflow.UnauthorizedError} + * @throws {@link Webflow.NotFoundError} + * @throws {@link Webflow.TooManyRequestsError} + * @throws {@link Webflow.InternalServerError} + * + * @example + * await client.components.list("580e63e98c9a982ac9b8b741") + */ + public async list( + siteId: string, + request: Webflow.ComponentsListRequest = {}, + requestOptions?: Components.RequestOptions + ): Promise { + const { limit, offset } = request; + const _queryParams: Record = {}; + if (limit != null) { + _queryParams["limit"] = limit.toString(); + } + + if (offset != null) { + _queryParams["offset"] = offset.toString(); + } + + const _response = await core.fetcher({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + `sites/${encodeURIComponent(siteId)}/components` + ), + method: "GET", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "webflow-api", + "X-Fern-SDK-Version": "3.1.0", + "User-Agent": "webflow-api/3.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, + }, + contentType: "application/json", + queryParameters: _queryParams, + requestType: "json", + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return serializers.ComponentList.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }); + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 400: + throw new Webflow.BadRequestError(_response.error.body); + case 401: + throw new Webflow.UnauthorizedError( + serializers.Error_.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 404: + throw new Webflow.NotFoundError( + serializers.Error_.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 429: + throw new Webflow.TooManyRequestsError( + serializers.Error_.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 500: + throw new Webflow.InternalServerError( + serializers.Error_.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + default: + throw new errors.WebflowError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.WebflowError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.WebflowTimeoutError("Timeout exceeded when calling GET /sites/{site_id}/components."); + case "unknown": + throw new errors.WebflowError({ + message: _response.error.errorMessage, + }); + } + } + + /** + * Get static content from a component definition. This includes text nodes, image 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` + * + * @param {string} siteId - Unique identifier for a Site + * @param {string} componentId - Unique identifier for a Component + * @param {Webflow.ComponentsGetContentRequest} request + * @param {Components.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Webflow.BadRequestError} + * @throws {@link Webflow.UnauthorizedError} + * @throws {@link Webflow.NotFoundError} + * @throws {@link Webflow.TooManyRequestsError} + * @throws {@link Webflow.InternalServerError} + * + * @example + * await client.components.getContent("580e63e98c9a982ac9b8b741", "8505ba55-ef72-629e-f85c-33e4b703d48b", { + * localeId: "65427cf400e02b306eaa04a0" + * }) + */ + public async getContent( + siteId: string, + componentId: string, + request: Webflow.ComponentsGetContentRequest = {}, + requestOptions?: Components.RequestOptions + ): Promise { + const { localeId, limit, offset } = request; + const _queryParams: Record = {}; + if (localeId != null) { + _queryParams["localeId"] = localeId; + } + + if (limit != null) { + _queryParams["limit"] = limit.toString(); + } + + if (offset != null) { + _queryParams["offset"] = offset.toString(); + } + + const _response = await core.fetcher({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + `sites/${encodeURIComponent(siteId)}/components/${encodeURIComponent(componentId)}/dom` + ), + method: "GET", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "webflow-api", + "X-Fern-SDK-Version": "3.1.0", + "User-Agent": "webflow-api/3.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, + }, + contentType: "application/json", + queryParameters: _queryParams, + requestType: "json", + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return serializers.ComponentDom.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }); + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 400: + throw new Webflow.BadRequestError(_response.error.body); + case 401: + throw new Webflow.UnauthorizedError( + serializers.Error_.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 404: + throw new Webflow.NotFoundError( + serializers.Error_.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 429: + throw new Webflow.TooManyRequestsError( + serializers.Error_.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 500: + throw new Webflow.InternalServerError( + serializers.Error_.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + default: + throw new errors.WebflowError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.WebflowError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.WebflowTimeoutError( + "Timeout exceeded when calling GET /sites/{site_id}/components/{component_id}/dom." + ); + case "unknown": + throw new errors.WebflowError({ + message: _response.error.errorMessage, + }); + } + } + + /** + * 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 + * + * + * 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` + * + * @param {string} siteId - Unique identifier for a Site + * @param {string} componentId - Unique identifier for a Component + * @param {Webflow.ComponentDomWrite} request + * @param {Components.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Webflow.BadRequestError} + * @throws {@link Webflow.UnauthorizedError} + * @throws {@link Webflow.ForbiddenError} + * @throws {@link Webflow.NotFoundError} + * @throws {@link Webflow.TooManyRequestsError} + * @throws {@link Webflow.InternalServerError} + * + * @example + * await client.components.updateContent("580e63e98c9a982ac9b8b741", "8505ba55-ef72-629e-f85c-33e4b703d48b", { + * localeId: "65427cf400e02b306eaa04a0", + * 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-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" + * }] + * }] + * }) + */ + public async updateContent( + siteId: string, + componentId: string, + request: Webflow.ComponentDomWrite, + requestOptions?: Components.RequestOptions + ): Promise { + const { localeId, ..._body } = request; + const _queryParams: Record = {}; + if (localeId != null) { + _queryParams["localeId"] = localeId; + } + + const _response = await core.fetcher({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + `sites/${encodeURIComponent(siteId)}/components/${encodeURIComponent(componentId)}/dom` + ), + method: "POST", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "webflow-api", + "X-Fern-SDK-Version": "3.1.0", + "User-Agent": "webflow-api/3.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, + }, + contentType: "application/json", + queryParameters: _queryParams, + requestType: "json", + body: serializers.ComponentDomWrite.jsonOrThrow(_body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + }), + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return serializers.ComponentsUpdateContentResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }); + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 400: + throw new Webflow.BadRequestError(_response.error.body); + case 401: + throw new Webflow.UnauthorizedError( + serializers.Error_.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 403: + throw new Webflow.ForbiddenError(_response.error.body); + case 404: + throw new Webflow.NotFoundError( + serializers.Error_.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 429: + throw new Webflow.TooManyRequestsError( + serializers.Error_.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 500: + throw new Webflow.InternalServerError( + serializers.Error_.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + default: + throw new errors.WebflowError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.WebflowError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.WebflowTimeoutError( + "Timeout exceeded when calling POST /sites/{site_id}/components/{component_id}/dom." + ); + case "unknown": + throw new errors.WebflowError({ + message: _response.error.errorMessage, + }); + } + } + + /** + * Get the property default values of a component definition. + * + * If you do not provide a Locale ID in your request, the response will return any properties that can be localized from the Primary locale. + * + * Required scope | `components:read` + * + * @param {string} siteId - Unique identifier for a Site + * @param {string} componentId - Unique identifier for a Component + * @param {Webflow.ComponentsGetPropertiesRequest} request + * @param {Components.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Webflow.BadRequestError} + * @throws {@link Webflow.UnauthorizedError} + * @throws {@link Webflow.NotFoundError} + * @throws {@link Webflow.TooManyRequestsError} + * @throws {@link Webflow.InternalServerError} + * + * @example + * await client.components.getProperties("580e63e98c9a982ac9b8b741", "8505ba55-ef72-629e-f85c-33e4b703d48b", { + * localeId: "65427cf400e02b306eaa04a0" + * }) + */ + public async getProperties( + siteId: string, + componentId: string, + request: Webflow.ComponentsGetPropertiesRequest = {}, + requestOptions?: Components.RequestOptions + ): Promise { + const { localeId, limit, offset } = request; + const _queryParams: Record = {}; + if (localeId != null) { + _queryParams["localeId"] = localeId; + } + + if (limit != null) { + _queryParams["limit"] = limit.toString(); + } + + if (offset != null) { + _queryParams["offset"] = offset.toString(); + } + + const _response = await core.fetcher({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + `sites/${encodeURIComponent(siteId)}/components/${encodeURIComponent(componentId)}/properties` + ), + method: "GET", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "webflow-api", + "X-Fern-SDK-Version": "3.1.0", + "User-Agent": "webflow-api/3.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, + }, + contentType: "application/json", + queryParameters: _queryParams, + requestType: "json", + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return serializers.ComponentProperties.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }); + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 400: + throw new Webflow.BadRequestError(_response.error.body); + case 401: + throw new Webflow.UnauthorizedError( + serializers.Error_.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 404: + throw new Webflow.NotFoundError( + serializers.Error_.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 429: + throw new Webflow.TooManyRequestsError( + serializers.Error_.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 500: + throw new Webflow.InternalServerError( + serializers.Error_.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + default: + throw new errors.WebflowError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.WebflowError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.WebflowTimeoutError( + "Timeout exceeded when calling GET /sites/{site_id}/components/{component_id}/properties." + ); + case "unknown": + throw new errors.WebflowError({ + message: _response.error.errorMessage, + }); + } + } + + /** + * Update the property default 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 available properties + * + * The request requires a secondary locale ID. If a locale is missing, the request will not be processed and will result in an error. + * + * Required scope | `components:write` + * + * @param {string} siteId - Unique identifier for a Site + * @param {string} componentId - Unique identifier for a Component + * @param {Webflow.ComponentPropertiesWrite} request + * @param {Components.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Webflow.BadRequestError} + * @throws {@link Webflow.UnauthorizedError} + * @throws {@link Webflow.NotFoundError} + * @throws {@link Webflow.TooManyRequestsError} + * @throws {@link Webflow.InternalServerError} + * + * @example + * await client.components.updateProperties("580e63e98c9a982ac9b8b741", "8505ba55-ef72-629e-f85c-33e4b703d48b", { + * localeId: "65427cf400e02b306eaa04a0", + * properties: [{ + * propertyId: "a245c12d-995b-55ee-5ec7-aa36a6cad623", + * text: "The Hitchhiker\u2019s Guide to the Galaxy" + * }, { + * propertyId: "a245c12d-995b-55ee-5ec7-aa36a6cad627", + * text: "

Dont Panic!

Always know where your towel is.

" + * }] + * }) + */ + public async updateProperties( + siteId: string, + componentId: string, + request: Webflow.ComponentPropertiesWrite, + requestOptions?: Components.RequestOptions + ): Promise { + const { localeId, ..._body } = request; + const _queryParams: Record = {}; + if (localeId != null) { + _queryParams["localeId"] = localeId; + } + + const _response = await core.fetcher({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + `sites/${encodeURIComponent(siteId)}/components/${encodeURIComponent(componentId)}/properties` + ), + method: "POST", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "webflow-api", + "X-Fern-SDK-Version": "3.1.0", + "User-Agent": "webflow-api/3.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, + }, + contentType: "application/json", + queryParameters: _queryParams, + requestType: "json", + body: serializers.ComponentPropertiesWrite.jsonOrThrow(_body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + }), + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return serializers.ComponentsUpdatePropertiesResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }); + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 400: + throw new Webflow.BadRequestError(_response.error.body); + case 401: + throw new Webflow.UnauthorizedError( + serializers.Error_.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 404: + throw new Webflow.NotFoundError( + serializers.Error_.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 429: + throw new Webflow.TooManyRequestsError( + serializers.Error_.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 500: + throw new Webflow.InternalServerError( + serializers.Error_.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + default: + throw new errors.WebflowError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.WebflowError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.WebflowTimeoutError( + "Timeout exceeded when calling POST /sites/{site_id}/components/{component_id}/properties." + ); + case "unknown": + throw new errors.WebflowError({ + message: _response.error.errorMessage, + }); + } + } + + protected async _getAuthorizationHeader(): Promise { + return `Bearer ${await core.Supplier.get(this._options.accessToken)}`; + } +} diff --git a/src/api/resources/components/client/index.ts b/src/api/resources/components/client/index.ts new file mode 100644 index 00000000..415726b7 --- /dev/null +++ b/src/api/resources/components/client/index.ts @@ -0,0 +1 @@ +export * from "./requests"; diff --git a/src/api/resources/components/client/requests/ComponentDomWrite.ts b/src/api/resources/components/client/requests/ComponentDomWrite.ts new file mode 100644 index 00000000..0a7b7b99 --- /dev/null +++ b/src/api/resources/components/client/requests/ComponentDomWrite.ts @@ -0,0 +1,36 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Webflow from "../../../../index"; + +/** + * @example + * { + * localeId: "65427cf400e02b306eaa04a0", + * 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-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" + * }] + * }] + * } + */ +export interface ComponentDomWrite { + /** + * Unique identifier for a specific locale. Applicable, when using localization. + */ + localeId?: string; + /** List of DOM Nodes with the new content that will be updated in each node. */ + nodes: Webflow.ComponentDomWriteNodesItem[]; +} diff --git a/src/api/resources/components/client/requests/ComponentPropertiesWrite.ts b/src/api/resources/components/client/requests/ComponentPropertiesWrite.ts new file mode 100644 index 00000000..9c64e279 --- /dev/null +++ b/src/api/resources/components/client/requests/ComponentPropertiesWrite.ts @@ -0,0 +1,27 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Webflow from "../../../../index"; + +/** + * @example + * { + * localeId: "65427cf400e02b306eaa04a0", + * properties: [{ + * propertyId: "a245c12d-995b-55ee-5ec7-aa36a6cad623", + * text: "The Hitchhiker\u2019s Guide to the Galaxy" + * }, { + * propertyId: "a245c12d-995b-55ee-5ec7-aa36a6cad627", + * text: "

Dont Panic!

Always know where your towel is.

" + * }] + * } + */ +export interface ComponentPropertiesWrite { + /** + * Unique identifier for a specific locale. Applicable, when using localization. + */ + localeId?: string; + /** A list of component properties to update within the specified secondary locale. */ + properties: Webflow.ComponentPropertiesWritePropertiesItem[]; +} diff --git a/src/api/resources/components/client/requests/ComponentsGetContentRequest.ts b/src/api/resources/components/client/requests/ComponentsGetContentRequest.ts new file mode 100644 index 00000000..043c8f2b --- /dev/null +++ b/src/api/resources/components/client/requests/ComponentsGetContentRequest.ts @@ -0,0 +1,29 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * @example + * { + * localeId: "65427cf400e02b306eaa04a0" + * } + * + * @example + * { + * localeId: "65427cf400e02b306eaa04a0" + * } + */ +export interface ComponentsGetContentRequest { + /** + * Unique identifier for a specific locale. Applicable, when using localization. + */ + localeId?: string; + /** + * Maximum number of records to be returned (max limit: 100) + */ + limit?: number; + /** + * Offset used for pagination if the results have more than limit records + */ + offset?: number; +} diff --git a/src/api/resources/components/client/requests/ComponentsGetPropertiesRequest.ts b/src/api/resources/components/client/requests/ComponentsGetPropertiesRequest.ts new file mode 100644 index 00000000..d8d9ce7d --- /dev/null +++ b/src/api/resources/components/client/requests/ComponentsGetPropertiesRequest.ts @@ -0,0 +1,24 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * @example + * { + * localeId: "65427cf400e02b306eaa04a0" + * } + */ +export interface ComponentsGetPropertiesRequest { + /** + * Unique identifier for a specific locale. Applicable, when using localization. + */ + localeId?: string; + /** + * Maximum number of records to be returned (max limit: 100) + */ + limit?: number; + /** + * Offset used for pagination if the results have more than limit records + */ + offset?: number; +} diff --git a/src/api/resources/components/client/requests/ComponentsListRequest.ts b/src/api/resources/components/client/requests/ComponentsListRequest.ts new file mode 100644 index 00000000..c1090ce9 --- /dev/null +++ b/src/api/resources/components/client/requests/ComponentsListRequest.ts @@ -0,0 +1,18 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * @example + * {} + */ +export interface ComponentsListRequest { + /** + * Maximum number of records to be returned (max limit: 100) + */ + limit?: number; + /** + * Offset used for pagination if the results have more than limit records + */ + offset?: number; +} diff --git a/src/api/resources/components/client/requests/index.ts b/src/api/resources/components/client/requests/index.ts new file mode 100644 index 00000000..c8f88ea5 --- /dev/null +++ b/src/api/resources/components/client/requests/index.ts @@ -0,0 +1,5 @@ +export { type ComponentsListRequest } from "./ComponentsListRequest"; +export { type ComponentsGetContentRequest } from "./ComponentsGetContentRequest"; +export { type ComponentDomWrite } from "./ComponentDomWrite"; +export { type ComponentsGetPropertiesRequest } from "./ComponentsGetPropertiesRequest"; +export { type ComponentPropertiesWrite } from "./ComponentPropertiesWrite"; diff --git a/src/api/resources/components/index.ts b/src/api/resources/components/index.ts new file mode 100644 index 00000000..c9240f83 --- /dev/null +++ b/src/api/resources/components/index.ts @@ -0,0 +1,2 @@ +export * from "./types"; +export * from "./client"; diff --git a/src/api/resources/components/types/ComponentDomWriteNodesItem.ts b/src/api/resources/components/types/ComponentDomWriteNodesItem.ts new file mode 100644 index 00000000..f9884a29 --- /dev/null +++ b/src/api/resources/components/types/ComponentDomWriteNodesItem.ts @@ -0,0 +1,7 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Webflow from "../../../index"; + +export type ComponentDomWriteNodesItem = Webflow.TextNodeWrite | Webflow.ComponentInstanceNodePropertyOverridesWrite; diff --git a/src/api/resources/components/types/ComponentPropertiesWritePropertiesItem.ts b/src/api/resources/components/types/ComponentPropertiesWritePropertiesItem.ts new file mode 100644 index 00000000..dac54dc0 --- /dev/null +++ b/src/api/resources/components/types/ComponentPropertiesWritePropertiesItem.ts @@ -0,0 +1,17 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export interface ComponentPropertiesWritePropertiesItem { + /** The ID of the property. */ + propertyId: string; + /** + * 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. + */ + text: string; +} diff --git a/src/api/resources/components/types/ComponentsUpdateContentResponse.ts b/src/api/resources/components/types/ComponentsUpdateContentResponse.ts new file mode 100644 index 00000000..3bb712bd --- /dev/null +++ b/src/api/resources/components/types/ComponentsUpdateContentResponse.ts @@ -0,0 +1,8 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export interface ComponentsUpdateContentResponse { + /** A list of error messages, if any. */ + errors: string[]; +} diff --git a/src/api/resources/components/types/ComponentsUpdatePropertiesResponse.ts b/src/api/resources/components/types/ComponentsUpdatePropertiesResponse.ts new file mode 100644 index 00000000..8c1f4142 --- /dev/null +++ b/src/api/resources/components/types/ComponentsUpdatePropertiesResponse.ts @@ -0,0 +1,8 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export interface ComponentsUpdatePropertiesResponse { + /** A list of error messages, if any. */ + errors: string[]; +} diff --git a/src/api/resources/components/types/index.ts b/src/api/resources/components/types/index.ts new file mode 100644 index 00000000..1bdf297c --- /dev/null +++ b/src/api/resources/components/types/index.ts @@ -0,0 +1,4 @@ +export * from "./ComponentDomWriteNodesItem"; +export * from "./ComponentsUpdateContentResponse"; +export * from "./ComponentPropertiesWritePropertiesItem"; +export * from "./ComponentsUpdatePropertiesResponse"; diff --git a/src/api/resources/ecommerce/client/Client.ts b/src/api/resources/ecommerce/client/Client.ts index 8ef13eca..f9ab600f 100644 --- a/src/api/resources/ecommerce/client/Client.ts +++ b/src/api/resources/ecommerce/client/Client.ts @@ -63,8 +63,8 @@ export class Ecommerce { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "3.0.2", - "User-Agent": "webflow-api/3.0.2", + "X-Fern-SDK-Version": "3.1.0", + "User-Agent": "webflow-api/3.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, diff --git a/src/api/resources/forms/client/Client.ts b/src/api/resources/forms/client/Client.ts index ac032aa3..3fce3937 100644 --- a/src/api/resources/forms/client/Client.ts +++ b/src/api/resources/forms/client/Client.ts @@ -27,6 +27,9 @@ export declare namespace Forms { } } +/** + * Forms are forms that are created on your Webflow site. + */ export class Forms { constructor(protected readonly _options: Forms.Options) {} @@ -75,8 +78,8 @@ export class Forms { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "3.0.2", - "User-Agent": "webflow-api/3.0.2", + "X-Fern-SDK-Version": "3.1.0", + "User-Agent": "webflow-api/3.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -198,8 +201,8 @@ export class Forms { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "3.0.2", - "User-Agent": "webflow-api/3.0.2", + "X-Fern-SDK-Version": "3.1.0", + "User-Agent": "webflow-api/3.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -333,8 +336,8 @@ export class Forms { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "3.0.2", - "User-Agent": "webflow-api/3.0.2", + "X-Fern-SDK-Version": "3.1.0", + "User-Agent": "webflow-api/3.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -457,8 +460,8 @@ export class Forms { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "3.0.2", - "User-Agent": "webflow-api/3.0.2", + "X-Fern-SDK-Version": "3.1.0", + "User-Agent": "webflow-api/3.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -585,8 +588,8 @@ export class Forms { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "3.0.2", - "User-Agent": "webflow-api/3.0.2", + "X-Fern-SDK-Version": "3.1.0", + "User-Agent": "webflow-api/3.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, diff --git a/src/api/resources/index.ts b/src/api/resources/index.ts index 45832f7c..b099c929 100644 --- a/src/api/resources/index.ts +++ b/src/api/resources/index.ts @@ -2,6 +2,8 @@ export * as sites from "./sites"; export * from "./sites/types"; export * as pages from "./pages"; export * from "./pages/types"; +export * as components from "./components"; +export * from "./components/types"; export * as users from "./users"; export * from "./users/types"; export * as accessGroups from "./accessGroups"; @@ -22,6 +24,7 @@ export * as ecommerce from "./ecommerce"; export * from "./sites/client/requests"; export * from "./collections/client/requests"; export * from "./pages/client/requests"; +export * from "./components/client/requests"; export * from "./scripts/client/requests"; export * from "./assets/client/requests"; export * from "./forms/client/requests"; diff --git a/src/api/resources/inventory/client/Client.ts b/src/api/resources/inventory/client/Client.ts index fa344820..16cfd35c 100644 --- a/src/api/resources/inventory/client/Client.ts +++ b/src/api/resources/inventory/client/Client.ts @@ -27,6 +27,9 @@ export declare namespace Inventory { } } +/** + * Inventory is the stock of e-commerce items in your Webflow site. + */ export class Inventory { constructor(protected readonly _options: Inventory.Options) {} @@ -65,8 +68,8 @@ export class Inventory { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "3.0.2", - "User-Agent": "webflow-api/3.0.2", + "X-Fern-SDK-Version": "3.1.0", + "User-Agent": "webflow-api/3.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -164,7 +167,6 @@ export class Inventory { * 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. * @@ -204,8 +206,8 @@ export class Inventory { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "3.0.2", - "User-Agent": "webflow-api/3.0.2", + "X-Fern-SDK-Version": "3.1.0", + "User-Agent": "webflow-api/3.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, diff --git a/src/api/resources/orders/client/Client.ts b/src/api/resources/orders/client/Client.ts index 3ab1064e..58d80693 100644 --- a/src/api/resources/orders/client/Client.ts +++ b/src/api/resources/orders/client/Client.ts @@ -27,6 +27,9 @@ export declare namespace Orders { } } +/** + * Orders are the orders for your Webflow site. + */ export class Orders { constructor(protected readonly _options: Orders.Options) {} @@ -79,8 +82,8 @@ export class Orders { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "3.0.2", - "User-Agent": "webflow-api/3.0.2", + "X-Fern-SDK-Version": "3.1.0", + "User-Agent": "webflow-api/3.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -205,8 +208,8 @@ export class Orders { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "3.0.2", - "User-Agent": "webflow-api/3.0.2", + "X-Fern-SDK-Version": "3.1.0", + "User-Agent": "webflow-api/3.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -339,8 +342,8 @@ export class Orders { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "3.0.2", - "User-Agent": "webflow-api/3.0.2", + "X-Fern-SDK-Version": "3.1.0", + "User-Agent": "webflow-api/3.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -476,8 +479,8 @@ export class Orders { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "3.0.2", - "User-Agent": "webflow-api/3.0.2", + "X-Fern-SDK-Version": "3.1.0", + "User-Agent": "webflow-api/3.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -611,8 +614,8 @@ export class Orders { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "3.0.2", - "User-Agent": "webflow-api/3.0.2", + "X-Fern-SDK-Version": "3.1.0", + "User-Agent": "webflow-api/3.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -744,8 +747,8 @@ export class Orders { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "3.0.2", - "User-Agent": "webflow-api/3.0.2", + "X-Fern-SDK-Version": "3.1.0", + "User-Agent": "webflow-api/3.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, diff --git a/src/api/resources/pages/client/Client.ts b/src/api/resources/pages/client/Client.ts index 8181172e..f54b5455 100644 --- a/src/api/resources/pages/client/Client.ts +++ b/src/api/resources/pages/client/Client.ts @@ -28,6 +28,9 @@ export declare namespace Pages { } } +/** + * Pages are the pages in your Webflow site. + */ export class Pages { constructor(protected readonly _options: Pages.Options) {} @@ -80,8 +83,8 @@ export class Pages { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "3.0.2", - "User-Agent": "webflow-api/3.0.2", + "X-Fern-SDK-Version": "3.1.0", + "User-Agent": "webflow-api/3.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -211,8 +214,8 @@ export class Pages { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "3.0.2", - "User-Agent": "webflow-api/3.0.2", + "X-Fern-SDK-Version": "3.1.0", + "User-Agent": "webflow-api/3.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -366,8 +369,8 @@ export class Pages { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "3.0.2", - "User-Agent": "webflow-api/3.0.2", + "X-Fern-SDK-Version": "3.1.0", + "User-Agent": "webflow-api/3.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -462,9 +465,10 @@ export class Pages { } /** - * Get static content from a static page. + * Get static content from a static page. This includes text nodes, image nodes and component instances. + * To retrieve the contents of components in the page use the [get component content](/data/reference/pages-and-components/components/get-content) 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. + * 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 | `pages:read` * @@ -513,8 +517,8 @@ export class Pages { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "3.0.2", - "User-Agent": "webflow-api/3.0.2", + "X-Fern-SDK-Version": "3.1.0", + "User-Agent": "webflow-api/3.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -606,14 +610,20 @@ export class Pages { } /** - * This endpoint allows for updating static content on a static page within a secondary locale. It is designed specifically for localized pages and can handle up to 1000 nodes per request. + * This endpoint updates content on a static page in **secondary locales**. It supports updating up to 1000 nodes in a single request. * - *

Note:This endpoint is specifically for localized pages. Ensure that the locale specified is a valid secondary locale for the site.

+ * 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 + * + * + * 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` * * @param {string} pageId - Unique identifier for a Page - * @param {Webflow.DomWrite} request + * @param {Webflow.PageDomWrite} request * @param {Pages.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Webflow.BadRequestError} @@ -625,30 +635,33 @@ export class Pages { * * @example * await client.pages.updateStaticContent("63c720f9347c2139b248e552", { - * localeId: "65427cf400e02b306eaa04a0", + * localeId: "localeId", * nodes: [{ * nodeId: "a245c12d-995b-55ee-5ec7-aa36a6cad623", - * text: "

The Hitchhiker\u2019s Guide to the Galaxy

" + * text: "

The Hitchhiker's Guide to the Galaxy

" * }, { * nodeId: "a245c12d-995b-55ee-5ec7-aa36a6cad627", - * text: "

Don\u2019t Panic!

Always know where your towel is.

" + * text: "

Don't Panic!

Always know where your towel is.

" * }, { * nodeId: "a245c12d-995b-55ee-5ec7-aa36a6cad629", - * text: "\"Marvin," + * propertyOverrides: [{ + * propertyId: "7dd14c08-2e96-8d3d-2b19-b5c03642a0f0", + * text: "

Time is an illusion

" + * }, { + * propertyId: "7dd14c08-2e96-8d3d-2b19-b5c03642a0f1", + * text: "Life, the Universe and Everything" + * }] * }] * }) */ public async updateStaticContent( pageId: string, - request: Webflow.DomWrite, + request: Webflow.PageDomWrite, requestOptions?: Pages.RequestOptions ): Promise { const { localeId, ..._body } = request; const _queryParams: Record = {}; - if (localeId != null) { - _queryParams["localeId"] = localeId; - } - + _queryParams["localeId"] = localeId; const _response = await core.fetcher({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, @@ -659,8 +672,8 @@ export class Pages { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "3.0.2", - "User-Agent": "webflow-api/3.0.2", + "X-Fern-SDK-Version": "3.1.0", + "User-Agent": "webflow-api/3.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -668,7 +681,7 @@ export class Pages { contentType: "application/json", queryParameters: _queryParams, requestType: "json", - body: serializers.DomWrite.jsonOrThrow(_body, { + body: serializers.PageDomWrite.jsonOrThrow(_body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, diff --git a/src/api/resources/pages/client/requests/DomWrite.ts b/src/api/resources/pages/client/requests/DomWrite.ts deleted file mode 100644 index 0f0d95ff..00000000 --- a/src/api/resources/pages/client/requests/DomWrite.ts +++ /dev/null @@ -1,29 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Webflow from "../../../../index"; - -/** - * @example - * { - * localeId: "65427cf400e02b306eaa04a0", - * nodes: [{ - * nodeId: "a245c12d-995b-55ee-5ec7-aa36a6cad623", - * text: "

The Hitchhiker\u2019s Guide to the Galaxy

" - * }, { - * nodeId: "a245c12d-995b-55ee-5ec7-aa36a6cad627", - * text: "

Don\u2019t Panic!

Always know where your towel is.

" - * }, { - * nodeId: "a245c12d-995b-55ee-5ec7-aa36a6cad629", - * text: "\"Marvin," - * }] - * } - */ -export interface DomWrite { - /** - * Unique identifier for a specific locale. Applicable, when using localization. - */ - localeId?: string; - nodes: Webflow.DomWriteNodesItem[]; -} diff --git a/src/api/resources/pages/client/requests/PageDomWrite.ts b/src/api/resources/pages/client/requests/PageDomWrite.ts new file mode 100644 index 00000000..9a4c0adc --- /dev/null +++ b/src/api/resources/pages/client/requests/PageDomWrite.ts @@ -0,0 +1,36 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Webflow from "../../../../index"; + +/** + * @example + * { + * localeId: "localeId", + * 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-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" + * }] + * }] + * } + */ +export interface PageDomWrite { + /** + * The locale identifier. + */ + localeId: string; + /** List of DOM Nodes with the new content that will be updated in each node. */ + nodes: Webflow.PageDomWriteNodesItem[]; +} diff --git a/src/api/resources/pages/client/requests/index.ts b/src/api/resources/pages/client/requests/index.ts index f979def7..93bd2381 100644 --- a/src/api/resources/pages/client/requests/index.ts +++ b/src/api/resources/pages/client/requests/index.ts @@ -2,4 +2,4 @@ export { type PagesListRequest } from "./PagesListRequest"; export { type PagesGetMetadataRequest } from "./PagesGetMetadataRequest"; export { type UpdatePageSettingsRequest } from "./UpdatePageSettingsRequest"; export { type PagesGetContentRequest } from "./PagesGetContentRequest"; -export { type DomWrite } from "./DomWrite"; +export { type PageDomWrite } from "./PageDomWrite"; diff --git a/src/api/resources/pages/resources/scripts/client/Client.ts b/src/api/resources/pages/resources/scripts/client/Client.ts index e1ff1f19..d8285336 100644 --- a/src/api/resources/pages/resources/scripts/client/Client.ts +++ b/src/api/resources/pages/resources/scripts/client/Client.ts @@ -37,7 +37,7 @@ export class Scripts { * to a Site via the `registered_scripts` endpoints, and then applied to a Site or Page using the appropriate * `custom_code` endpoints. * - *
Access to this endpoint requires a bearer token from a Data Client App.
+ * Access to this endpoint requires a bearer token from a [Data Client App](/data/docs/getting-started-data-clients). * * Required scope | `custom_code:read` * @@ -67,8 +67,8 @@ export class Scripts { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "3.0.2", - "User-Agent": "webflow-api/3.0.2", + "X-Fern-SDK-Version": "3.1.0", + "User-Agent": "webflow-api/3.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -163,7 +163,9 @@ export class Scripts { * to a Site via the `registered_scripts` endpoints, and then applied to a Site or Page using the appropriate * `custom_code` endpoints. * - *
Access to this endpoint requires a bearer token from a Data Client App.
+ * A site can have a maximum of 800 registered scripts. + * + * Access to this endpoint requires a bearer token from a [Data Client App](/data/docs/getting-started-data-clients). * * Required scope | `custom_code:write` * @@ -174,6 +176,7 @@ export class Scripts { * @throws {@link Webflow.BadRequestError} * @throws {@link Webflow.UnauthorizedError} * @throws {@link Webflow.NotFoundError} + * @throws {@link Webflow.ConflictError} * @throws {@link Webflow.TooManyRequestsError} * @throws {@link Webflow.InternalServerError} * @@ -208,8 +211,8 @@ export class Scripts { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "3.0.2", - "User-Agent": "webflow-api/3.0.2", + "X-Fern-SDK-Version": "3.1.0", + "User-Agent": "webflow-api/3.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -259,6 +262,8 @@ export class Scripts { breadcrumbsPrefix: ["response"], }) ); + case 409: + throw new Webflow.ConflictError(_response.error.body); case 429: throw new Webflow.TooManyRequestsError( serializers.Error_.parseOrThrow(_response.error.body, { @@ -309,7 +314,7 @@ export class Scripts { * to a Site via the `registered_scripts` endpoints, and then applied to a Site or Page using the appropriate * `custom_code` endpoints. * - *
Access to this endpoint requires a bearer token from a Data Client App.
+ * Access to this endpoint requires a bearer token from a [Data Client App](/data/docs/getting-started-data-clients). * * Required scope | `custom_code:write` * @@ -336,8 +341,8 @@ export class Scripts { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "3.0.2", - "User-Agent": "webflow-api/3.0.2", + "X-Fern-SDK-Version": "3.1.0", + "User-Agent": "webflow-api/3.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, diff --git a/src/api/resources/pages/types/PageDomWriteNodesItem.ts b/src/api/resources/pages/types/PageDomWriteNodesItem.ts new file mode 100644 index 00000000..037cfcbf --- /dev/null +++ b/src/api/resources/pages/types/PageDomWriteNodesItem.ts @@ -0,0 +1,7 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Webflow from "../../../index"; + +export type PageDomWriteNodesItem = Webflow.TextNodeWrite | Webflow.ComponentInstanceNodePropertyOverridesWrite; diff --git a/src/api/resources/pages/types/index.ts b/src/api/resources/pages/types/index.ts index 943c3715..b9ce1b58 100644 --- a/src/api/resources/pages/types/index.ts +++ b/src/api/resources/pages/types/index.ts @@ -1,2 +1,2 @@ -export * from "./DomWriteNodesItem"; +export * from "./PageDomWriteNodesItem"; export * from "./UpdateStaticContentResponse"; diff --git a/src/api/resources/products/client/Client.ts b/src/api/resources/products/client/Client.ts index e75102c0..948759d8 100644 --- a/src/api/resources/products/client/Client.ts +++ b/src/api/resources/products/client/Client.ts @@ -78,8 +78,8 @@ export class Products { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "3.0.2", - "User-Agent": "webflow-api/3.0.2", + "X-Fern-SDK-Version": "3.1.0", + "User-Agent": "webflow-api/3.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -178,12 +178,11 @@ export class Products { * When you create a product, you will always create a SKU, since a Product Item must have, at minimum, a single SKU. * * To create a Product with multiple SKUs - for example a T-shirt in sizes small, medium and large: - * - * - Create parameters in `sku-properties`, also known as [product options and variants.](https://help.webflow.com/hc/en-us/articles/33961334531347-Create-product-options-and-variants). - * - A single `sku-property` would be `color`. Within the `color` property, list the various colors of T-shirts as an array of `enum` values: `royal-blue`, `crimson-red`, and `forrest-green`. - * - Once, you've created a Product and its `sku-properties` with `enum` values, Webflow will create a **default SKU**, which will automatically be a combination of the first `sku-properties` you've created. - * - In our example, the default SKU will be a Royal Blue T-Shirt, because our first `enum` of our Color `sku-property` is Royal Blue. - * - After you've created your product, you can create additional SKUs using the [Create SKU endpoint.](/data/reference/ecommerce/products-sk-us/create-sku) + * - Create parameters in `sku-properties`, also known as [product options and variants.](https://help.webflow.com/hc/en-us/articles/33961334531347-Create-product-options-and-variants). + * - A single `sku-property` would be `color`. Within the `color` property, list the various colors of T-shirts as an array of `enum` values: `royal-blue`, `crimson-red`, and `forrest-green`. + * - Once, you've created a Product and its `sku-properties` with `enum` values, Webflow will create a **default SKU**, which will automatically be a combination of the first `sku-properties` you've created. + * - In our example, the default SKU will be a Royal Blue T-Shirt, because our first `enum` of our Color `sku-property` is Royal Blue. + * - After you've created your product, you can create additional SKUs using the [Create SKU 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. * @@ -219,8 +218,8 @@ export class Products { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "3.0.2", - "User-Agent": "webflow-api/3.0.2", + "X-Fern-SDK-Version": "3.1.0", + "User-Agent": "webflow-api/3.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -353,8 +352,8 @@ export class Products { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "3.0.2", - "User-Agent": "webflow-api/3.0.2", + "X-Fern-SDK-Version": "3.1.0", + "User-Agent": "webflow-api/3.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -487,8 +486,8 @@ export class Products { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "3.0.2", - "User-Agent": "webflow-api/3.0.2", + "X-Fern-SDK-Version": "3.1.0", + "User-Agent": "webflow-api/3.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -628,8 +627,8 @@ export class Products { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "3.0.2", - "User-Agent": "webflow-api/3.0.2", + "X-Fern-SDK-Version": "3.1.0", + "User-Agent": "webflow-api/3.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -773,8 +772,8 @@ export class Products { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "3.0.2", - "User-Agent": "webflow-api/3.0.2", + "X-Fern-SDK-Version": "3.1.0", + "User-Agent": "webflow-api/3.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, diff --git a/src/api/resources/scripts/client/Client.ts b/src/api/resources/scripts/client/Client.ts index 5c476ab4..bd1df6f1 100644 --- a/src/api/resources/scripts/client/Client.ts +++ b/src/api/resources/scripts/client/Client.ts @@ -38,7 +38,7 @@ export class Scripts { * `custom_code` endpoints. * Additionally, Scripts can be remotely hosted, or registered as inline snippets. * - *
Access to this endpoint requires a bearer token from a Data Client App.
+ * Access to this endpoint requires a bearer token from a [Data Client App](/data/docs/getting-started-data-clients). * * Required scope | `custom_code:read` * @@ -65,8 +65,8 @@ export class Scripts { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "3.0.2", - "User-Agent": "webflow-api/3.0.2", + "X-Fern-SDK-Version": "3.1.0", + "User-Agent": "webflow-api/3.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -164,7 +164,7 @@ export class Scripts { * `custom_code` endpoints. * Additionally, Scripts can be remotely hosted, or registered as inline snippets. * - *
Access to this endpoint requires a bearer token from a Data Client App.
+ * Access to this endpoint requires a bearer token from a [Data Client App](/data/docs/getting-started-data-clients). * * Required scope | `custom_code:write` * @@ -201,8 +201,8 @@ export class Scripts { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "3.0.2", - "User-Agent": "webflow-api/3.0.2", + "X-Fern-SDK-Version": "3.1.0", + "User-Agent": "webflow-api/3.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -304,7 +304,7 @@ export class Scripts { * to a Site via the `registered_scripts` endpoints, and then applied to a Site or Page using the appropriate * `custom_code` endpoints. * - *
Access to this endpoint requires a bearer token from a Data Client App.
+ * Access to this endpoint requires a bearer token from a [Data Client App](/data/docs/getting-started-data-clients). * * Required scope | `custom_code:write` * @@ -340,8 +340,8 @@ export class Scripts { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "3.0.2", - "User-Agent": "webflow-api/3.0.2", + "X-Fern-SDK-Version": "3.1.0", + "User-Agent": "webflow-api/3.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, diff --git a/src/api/resources/sites/client/Client.ts b/src/api/resources/sites/client/Client.ts index 9e04812e..80e34e14 100644 --- a/src/api/resources/sites/client/Client.ts +++ b/src/api/resources/sites/client/Client.ts @@ -5,9 +5,11 @@ import * as environments from "../../../../environments"; import * as core from "../../../../core"; import * as Webflow from "../../../index"; -import urlJoin from "url-join"; import * as serializers from "../../../../serialization/index"; +import urlJoin from "url-join"; import * as errors from "../../../../errors/index"; +import { Redirects } from "../resources/redirects/client/Client"; +import { Plans } from "../resources/plans/client/Client"; import { ActivityLogs } from "../resources/activityLogs/client/Client"; import { Scripts } from "../resources/scripts/client/Client"; @@ -29,9 +31,146 @@ export declare namespace Sites { } } +/** + * Sites are the sites in your Webflow workspace. + */ export class Sites { constructor(protected readonly _options: Sites.Options) {} + /** + * Create a site. This endpoint requires an Enterprise workspace. + * + * Required scope | `workspace:write` + * + * @param {string} workspaceId - Unique identifier for a Workspace + * @param {Webflow.SitesCreateRequest} request + * @param {Sites.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Webflow.BadRequestError} + * @throws {@link Webflow.UnauthorizedError} + * @throws {@link Webflow.ForbiddenError} + * @throws {@link Webflow.NotFoundError} + * @throws {@link Webflow.TooManyRequestsError} + * @throws {@link Webflow.InternalServerError} + * + * @example + * await client.sites.create("580e63e98c9a982ac9b8b741", { + * name: "The Hitchhiker's Guide to the Galaxy" + * }) + */ + public async create( + workspaceId: string, + request: Webflow.SitesCreateRequest, + requestOptions?: Sites.RequestOptions + ): Promise { + const _response = await core.fetcher({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + `workspaces/${encodeURIComponent(workspaceId)}/sites` + ), + method: "POST", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "webflow-api", + "X-Fern-SDK-Version": "3.1.0", + "User-Agent": "webflow-api/3.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, + }, + contentType: "application/json", + requestType: "json", + body: serializers.SitesCreateRequest.jsonOrThrow(request, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + }), + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return serializers.Site.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }); + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 400: + throw new Webflow.BadRequestError(_response.error.body); + case 401: + throw new Webflow.UnauthorizedError( + serializers.Error_.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 403: + throw new Webflow.ForbiddenError(_response.error.body); + case 404: + throw new Webflow.NotFoundError( + serializers.Error_.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 429: + throw new Webflow.TooManyRequestsError( + serializers.Error_.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 500: + throw new Webflow.InternalServerError( + serializers.Error_.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + default: + throw new errors.WebflowError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.WebflowError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.WebflowTimeoutError( + "Timeout exceeded when calling POST /workspaces/{workspace_id}/sites." + ); + case "unknown": + throw new errors.WebflowError({ + message: _response.error.errorMessage, + }); + } + } + /** * List of all sites the provided access token is able to access. * @@ -57,8 +196,8 @@ export class Sites { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "3.0.2", - "User-Agent": "webflow-api/3.0.2", + "X-Fern-SDK-Version": "3.1.0", + "User-Agent": "webflow-api/3.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -162,8 +301,8 @@ export class Sites { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "3.0.2", - "User-Agent": "webflow-api/3.0.2", + "X-Fern-SDK-Version": "3.1.0", + "User-Agent": "webflow-api/3.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -251,6 +390,250 @@ export class Sites { } } + /** + * Delete a site. This endpoint requires an Enterprise workspace. + * + * Required scope | `sites:write` + * + * @param {string} siteId - Unique identifier for a Site + * @param {Sites.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Webflow.BadRequestError} + * @throws {@link Webflow.UnauthorizedError} + * @throws {@link Webflow.ForbiddenError} + * @throws {@link Webflow.NotFoundError} + * @throws {@link Webflow.TooManyRequestsError} + * @throws {@link Webflow.InternalServerError} + * + * @example + * await client.sites.delete("580e63e98c9a982ac9b8b741") + */ + public async delete(siteId: string, requestOptions?: Sites.RequestOptions): Promise { + const _response = await core.fetcher({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + `sites/${encodeURIComponent(siteId)}` + ), + method: "DELETE", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "webflow-api", + "X-Fern-SDK-Version": "3.1.0", + "User-Agent": "webflow-api/3.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, + }, + contentType: "application/json", + requestType: "json", + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return; + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 400: + throw new Webflow.BadRequestError(_response.error.body); + case 401: + throw new Webflow.UnauthorizedError( + serializers.Error_.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 403: + throw new Webflow.ForbiddenError(_response.error.body); + case 404: + throw new Webflow.NotFoundError( + serializers.Error_.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 429: + throw new Webflow.TooManyRequestsError( + serializers.Error_.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 500: + throw new Webflow.InternalServerError( + serializers.Error_.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + default: + throw new errors.WebflowError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.WebflowError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.WebflowTimeoutError("Timeout exceeded when calling DELETE /sites/{site_id}."); + case "unknown": + throw new errors.WebflowError({ + message: _response.error.errorMessage, + }); + } + } + + /** + * Update a site. This endpoint requires an Enterprise workspace. + * + * Required scope | `sites:write` + * + * @param {string} siteId - Unique identifier for a Site + * @param {Webflow.SitesUpdateRequest} request + * @param {Sites.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Webflow.BadRequestError} + * @throws {@link Webflow.UnauthorizedError} + * @throws {@link Webflow.ForbiddenError} + * @throws {@link Webflow.NotFoundError} + * @throws {@link Webflow.TooManyRequestsError} + * @throws {@link Webflow.InternalServerError} + * + * @example + * await client.sites.update("580e63e98c9a982ac9b8b741") + */ + public async update( + siteId: string, + request: Webflow.SitesUpdateRequest = {}, + requestOptions?: Sites.RequestOptions + ): Promise { + const _response = await core.fetcher({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + `sites/${encodeURIComponent(siteId)}` + ), + method: "PATCH", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "webflow-api", + "X-Fern-SDK-Version": "3.1.0", + "User-Agent": "webflow-api/3.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, + }, + contentType: "application/json", + requestType: "json", + body: serializers.SitesUpdateRequest.jsonOrThrow(request, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + }), + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return serializers.Site.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }); + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 400: + throw new Webflow.BadRequestError(_response.error.body); + case 401: + throw new Webflow.UnauthorizedError( + serializers.Error_.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 403: + throw new Webflow.ForbiddenError(_response.error.body); + case 404: + throw new Webflow.NotFoundError( + serializers.Error_.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 429: + throw new Webflow.TooManyRequestsError( + serializers.Error_.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 500: + throw new Webflow.InternalServerError( + serializers.Error_.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + default: + throw new errors.WebflowError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.WebflowError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.WebflowTimeoutError("Timeout exceeded when calling PATCH /sites/{site_id}."); + case "unknown": + throw new errors.WebflowError({ + message: _response.error.errorMessage, + }); + } + } + /** * Get a list of all custom domains related to site. * @@ -279,8 +662,8 @@ export class Sites { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "3.0.2", - "User-Agent": "webflow-api/3.0.2", + "X-Fern-SDK-Version": "3.1.0", + "User-Agent": "webflow-api/3.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -405,8 +788,8 @@ export class Sites { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "3.0.2", - "User-Agent": "webflow-api/3.0.2", + "X-Fern-SDK-Version": "3.1.0", + "User-Agent": "webflow-api/3.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -491,6 +874,18 @@ export class Sites { } } + protected _redirects: Redirects | undefined; + + public get redirects(): Redirects { + return (this._redirects ??= new Redirects(this._options)); + } + + protected _plans: Plans | undefined; + + public get plans(): Plans { + return (this._plans ??= new Plans(this._options)); + } + protected _activityLogs: ActivityLogs | undefined; public get activityLogs(): ActivityLogs { diff --git a/src/api/resources/sites/client/requests/SitesCreateRequest.ts b/src/api/resources/sites/client/requests/SitesCreateRequest.ts new file mode 100644 index 00000000..c7911a56 --- /dev/null +++ b/src/api/resources/sites/client/requests/SitesCreateRequest.ts @@ -0,0 +1,18 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * @example + * { + * name: "The Hitchhiker's Guide to the Galaxy" + * } + */ +export interface SitesCreateRequest { + /** The name of the site */ + name: string; + /** The workspace or marketplace template to use */ + templateName?: string; + /** MegaDodo Publications - Potential Book Ideas */ + parentFolderId?: string; +} diff --git a/src/api/resources/sites/client/requests/SitesUpdateRequest.ts b/src/api/resources/sites/client/requests/SitesUpdateRequest.ts new file mode 100644 index 00000000..99058677 --- /dev/null +++ b/src/api/resources/sites/client/requests/SitesUpdateRequest.ts @@ -0,0 +1,14 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * @example + * {} + */ +export interface SitesUpdateRequest { + /** The name of the site */ + name?: string; + /** The parent folder ID of the site */ + parentFolderId?: string; +} diff --git a/src/api/resources/sites/client/requests/index.ts b/src/api/resources/sites/client/requests/index.ts index 9dc259ab..b802fad3 100644 --- a/src/api/resources/sites/client/requests/index.ts +++ b/src/api/resources/sites/client/requests/index.ts @@ -1 +1,3 @@ +export { type SitesCreateRequest } from "./SitesCreateRequest"; +export { type SitesUpdateRequest } from "./SitesUpdateRequest"; export { type SitesPublishRequest } from "./SitesPublishRequest"; diff --git a/src/api/resources/sites/resources/activityLogs/client/Client.ts b/src/api/resources/sites/resources/activityLogs/client/Client.ts index d8ca510e..5688fbea 100644 --- a/src/api/resources/sites/resources/activityLogs/client/Client.ts +++ b/src/api/resources/sites/resources/activityLogs/client/Client.ts @@ -31,7 +31,7 @@ export class ActivityLogs { constructor(protected readonly _options: ActivityLogs.Options) {} /** - * Retrieve Activity Logs for a specific Site. Requires Site to be on an Enterprise plan.

Required scope | `site_activity:read` + * Retrieve Activity Logs for a specific Site. Requires Site to be on an Enterprise plan.

Required scope | `site_activity:read` * * @param {string} siteId - Unique identifier for a Site * @param {Webflow.sites.ActivityLogsListRequest} request @@ -70,8 +70,8 @@ export class ActivityLogs { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "3.0.2", - "User-Agent": "webflow-api/3.0.2", + "X-Fern-SDK-Version": "3.1.0", + "User-Agent": "webflow-api/3.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, diff --git a/src/api/resources/sites/resources/index.ts b/src/api/resources/sites/resources/index.ts index 9d23d5e4..7ec6b656 100644 --- a/src/api/resources/sites/resources/index.ts +++ b/src/api/resources/sites/resources/index.ts @@ -1,3 +1,5 @@ +export * as redirects from "./redirects"; +export * as plans from "./plans"; export * as activityLogs from "./activityLogs"; export * as scripts from "./scripts"; export * from "./activityLogs/client/requests"; diff --git a/src/api/resources/sites/resources/plans/client/Client.ts b/src/api/resources/sites/resources/plans/client/Client.ts new file mode 100644 index 00000000..3bf88255 --- /dev/null +++ b/src/api/resources/sites/resources/plans/client/Client.ts @@ -0,0 +1,153 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as environments from "../../../../../../environments"; +import * as core from "../../../../../../core"; +import * as Webflow from "../../../../../index"; +import urlJoin from "url-join"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; + +export declare namespace Plans { + interface Options { + environment?: core.Supplier; + accessToken: core.Supplier; + } + + interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ + timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ + maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Additional headers to include in the request. */ + headers?: Record; + } +} + +export class Plans { + constructor(protected readonly _options: Plans.Options) {} + + /** + * Get site plan details for the specified Site. + * + * Required scope | `sites:read` + * + * @param {string} siteId - Unique identifier for a Site + * @param {Plans.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Webflow.BadRequestError} + * @throws {@link Webflow.UnauthorizedError} + * @throws {@link Webflow.NotFoundError} + * @throws {@link Webflow.TooManyRequestsError} + * @throws {@link Webflow.InternalServerError} + * + * @example + * await client.sites.plans.getSitePlan("580e63e98c9a982ac9b8b741") + */ + public async getSitePlan(siteId: string, requestOptions?: Plans.RequestOptions): Promise { + const _response = await core.fetcher({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + `sites/${encodeURIComponent(siteId)}/plan` + ), + method: "GET", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "webflow-api", + "X-Fern-SDK-Version": "3.1.0", + "User-Agent": "webflow-api/3.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, + }, + contentType: "application/json", + requestType: "json", + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return serializers.SitePlan.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }); + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 400: + throw new Webflow.BadRequestError(_response.error.body); + case 401: + throw new Webflow.UnauthorizedError( + serializers.Error_.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 404: + throw new Webflow.NotFoundError( + serializers.Error_.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 429: + throw new Webflow.TooManyRequestsError( + serializers.Error_.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 500: + throw new Webflow.InternalServerError( + serializers.Error_.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + default: + throw new errors.WebflowError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.WebflowError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.WebflowTimeoutError("Timeout exceeded when calling GET /sites/{site_id}/plan."); + case "unknown": + throw new errors.WebflowError({ + message: _response.error.errorMessage, + }); + } + } + + protected async _getAuthorizationHeader(): Promise { + return `Bearer ${await core.Supplier.get(this._options.accessToken)}`; + } +} diff --git a/src/api/resources/sites/resources/plans/client/index.ts b/src/api/resources/sites/resources/plans/client/index.ts new file mode 100644 index 00000000..cb0ff5c3 --- /dev/null +++ b/src/api/resources/sites/resources/plans/client/index.ts @@ -0,0 +1 @@ +export {}; diff --git a/src/api/resources/sites/resources/plans/index.ts b/src/api/resources/sites/resources/plans/index.ts new file mode 100644 index 00000000..5ec76921 --- /dev/null +++ b/src/api/resources/sites/resources/plans/index.ts @@ -0,0 +1 @@ +export * from "./client"; diff --git a/src/api/resources/sites/resources/redirects/client/Client.ts b/src/api/resources/sites/resources/redirects/client/Client.ts new file mode 100644 index 00000000..c3ba71b4 --- /dev/null +++ b/src/api/resources/sites/resources/redirects/client/Client.ts @@ -0,0 +1,547 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as environments from "../../../../../../environments"; +import * as core from "../../../../../../core"; +import * as Webflow from "../../../../../index"; +import urlJoin from "url-join"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; + +export declare namespace Redirects { + interface Options { + environment?: core.Supplier; + accessToken: core.Supplier; + } + + interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ + timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ + maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Additional headers to include in the request. */ + headers?: Record; + } +} + +export class Redirects { + constructor(protected readonly _options: Redirects.Options) {} + + /** + * Fetch a list of all URL 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. + * + * + * Required scope: `sites:read` + * + * @param {string} siteId - Unique identifier for a Site + * @param {Redirects.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Webflow.BadRequestError} + * @throws {@link Webflow.UnauthorizedError} + * @throws {@link Webflow.NotFoundError} + * @throws {@link Webflow.TooManyRequestsError} + * @throws {@link Webflow.InternalServerError} + * + * @example + * await client.sites.redirects.list("580e63e98c9a982ac9b8b741") + */ + public async list(siteId: string, requestOptions?: Redirects.RequestOptions): Promise { + const _response = await core.fetcher({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + `sites/${encodeURIComponent(siteId)}/redirects` + ), + method: "GET", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "webflow-api", + "X-Fern-SDK-Version": "3.1.0", + "User-Agent": "webflow-api/3.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, + }, + contentType: "application/json", + requestType: "json", + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return serializers.Redirects.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }); + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 400: + throw new Webflow.BadRequestError(_response.error.body); + case 401: + throw new Webflow.UnauthorizedError( + serializers.Error_.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 404: + throw new Webflow.NotFoundError( + serializers.Error_.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 429: + throw new Webflow.TooManyRequestsError( + serializers.Error_.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 500: + throw new Webflow.InternalServerError( + serializers.Error_.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + default: + throw new errors.WebflowError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.WebflowError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.WebflowTimeoutError("Timeout exceeded when calling GET /sites/{site_id}/redirects."); + case "unknown": + throw new errors.WebflowError({ + message: _response.error.errorMessage, + }); + } + } + + /** + * Add a new URL 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. + * + * Required scope: `sites:write` + * + * @param {string} siteId - Unique identifier for a Site + * @param {Webflow.Redirect} request + * @param {Redirects.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Webflow.BadRequestError} + * @throws {@link Webflow.UnauthorizedError} + * @throws {@link Webflow.NotFoundError} + * @throws {@link Webflow.TooManyRequestsError} + * @throws {@link Webflow.InternalServerError} + * + * @example + * await client.sites.redirects.create("580e63e98c9a982ac9b8b741", { + * id: "42e1a2b7aa1a13f768a0042a", + * fromUrl: "/mostly-harmless", + * toUrl: "/earth" + * }) + */ + public async create( + siteId: string, + request: Webflow.Redirect, + requestOptions?: Redirects.RequestOptions + ): Promise { + const _response = await core.fetcher({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + `sites/${encodeURIComponent(siteId)}/redirects` + ), + method: "POST", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "webflow-api", + "X-Fern-SDK-Version": "3.1.0", + "User-Agent": "webflow-api/3.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, + }, + contentType: "application/json", + requestType: "json", + body: serializers.Redirect.jsonOrThrow(request, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + }), + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return serializers.Redirect.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }); + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 400: + throw new Webflow.BadRequestError(_response.error.body); + case 401: + throw new Webflow.UnauthorizedError( + serializers.Error_.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 404: + throw new Webflow.NotFoundError( + serializers.Error_.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 429: + throw new Webflow.TooManyRequestsError( + serializers.Error_.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 500: + throw new Webflow.InternalServerError( + serializers.Error_.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + default: + throw new errors.WebflowError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.WebflowError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.WebflowTimeoutError("Timeout exceeded when calling POST /sites/{site_id}/redirects."); + case "unknown": + throw new errors.WebflowError({ + message: _response.error.errorMessage, + }); + } + } + + /** + * Remove a URL 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. + * Required scope: `sites:write` + * + * @param {string} siteId - Unique identifier for a Site + * @param {string} redirectId - Unique identifier site rediect + * @param {Redirects.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Webflow.BadRequestError} + * @throws {@link Webflow.UnauthorizedError} + * @throws {@link Webflow.NotFoundError} + * @throws {@link Webflow.TooManyRequestsError} + * @throws {@link Webflow.InternalServerError} + * + * @example + * await client.sites.redirects.delete("580e63e98c9a982ac9b8b741", "66c4cb9a20cac35ed19500e6") + */ + public async delete( + siteId: string, + redirectId: string, + requestOptions?: Redirects.RequestOptions + ): Promise { + const _response = await core.fetcher({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + `sites/${encodeURIComponent(siteId)}/redirects/${encodeURIComponent(redirectId)}` + ), + method: "DELETE", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "webflow-api", + "X-Fern-SDK-Version": "3.1.0", + "User-Agent": "webflow-api/3.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, + }, + contentType: "application/json", + requestType: "json", + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return serializers.Redirects.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }); + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 400: + throw new Webflow.BadRequestError(_response.error.body); + case 401: + throw new Webflow.UnauthorizedError( + serializers.Error_.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 404: + throw new Webflow.NotFoundError( + serializers.Error_.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 429: + throw new Webflow.TooManyRequestsError( + serializers.Error_.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 500: + throw new Webflow.InternalServerError( + serializers.Error_.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + default: + throw new errors.WebflowError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.WebflowError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.WebflowTimeoutError( + "Timeout exceeded when calling DELETE /sites/{site_id}/redirects/{redirect_id}." + ); + case "unknown": + throw new errors.WebflowError({ + message: _response.error.errorMessage, + }); + } + } + + /** + * Update a URL redirection rule from a site. + * Required scope: `sites:write` + * + * @param {string} siteId - Unique identifier for a Site + * @param {string} redirectId - Unique identifier site rediect + * @param {Webflow.Redirect} request + * @param {Redirects.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Webflow.BadRequestError} + * @throws {@link Webflow.UnauthorizedError} + * @throws {@link Webflow.NotFoundError} + * @throws {@link Webflow.TooManyRequestsError} + * @throws {@link Webflow.InternalServerError} + * + * @example + * await client.sites.redirects.update("580e63e98c9a982ac9b8b741", "66c4cb9a20cac35ed19500e6", { + * id: "42e1a2b7aa1a13f768a0042a", + * fromUrl: "/mostly-harmless", + * toUrl: "/earth" + * }) + */ + public async update( + siteId: string, + redirectId: string, + request: Webflow.Redirect, + requestOptions?: Redirects.RequestOptions + ): Promise { + const _response = await core.fetcher({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + `sites/${encodeURIComponent(siteId)}/redirects/${encodeURIComponent(redirectId)}` + ), + method: "PATCH", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "webflow-api", + "X-Fern-SDK-Version": "3.1.0", + "User-Agent": "webflow-api/3.1.0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, + }, + contentType: "application/json", + requestType: "json", + body: serializers.Redirect.jsonOrThrow(request, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + }), + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return serializers.Redirect.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }); + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 400: + throw new Webflow.BadRequestError(_response.error.body); + case 401: + throw new Webflow.UnauthorizedError( + serializers.Error_.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 404: + throw new Webflow.NotFoundError( + serializers.Error_.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 429: + throw new Webflow.TooManyRequestsError( + serializers.Error_.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 500: + throw new Webflow.InternalServerError( + serializers.Error_.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + default: + throw new errors.WebflowError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.WebflowError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.WebflowTimeoutError( + "Timeout exceeded when calling PATCH /sites/{site_id}/redirects/{redirect_id}." + ); + case "unknown": + throw new errors.WebflowError({ + message: _response.error.errorMessage, + }); + } + } + + protected async _getAuthorizationHeader(): Promise { + return `Bearer ${await core.Supplier.get(this._options.accessToken)}`; + } +} diff --git a/src/api/resources/sites/resources/redirects/client/index.ts b/src/api/resources/sites/resources/redirects/client/index.ts new file mode 100644 index 00000000..cb0ff5c3 --- /dev/null +++ b/src/api/resources/sites/resources/redirects/client/index.ts @@ -0,0 +1 @@ +export {}; diff --git a/src/api/resources/sites/resources/redirects/index.ts b/src/api/resources/sites/resources/redirects/index.ts new file mode 100644 index 00000000..5ec76921 --- /dev/null +++ b/src/api/resources/sites/resources/redirects/index.ts @@ -0,0 +1 @@ +export * from "./client"; diff --git a/src/api/resources/sites/resources/scripts/client/Client.ts b/src/api/resources/sites/resources/scripts/client/Client.ts index 04d7f9e7..660476ba 100644 --- a/src/api/resources/sites/resources/scripts/client/Client.ts +++ b/src/api/resources/sites/resources/scripts/client/Client.ts @@ -33,7 +33,7 @@ export class Scripts { /** * Get all registered scripts that have been applied to a specific Site. * - *
Access to this endpoint requires a bearer token from a Data Client App.
+ * Access to this endpoint requires a bearer token from a [Data Client App](/data/docs/getting-started-data-clients). * * Required scope | `custom_code:read` * @@ -63,8 +63,8 @@ export class Scripts { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "3.0.2", - "User-Agent": "webflow-api/3.0.2", + "X-Fern-SDK-Version": "3.1.0", + "User-Agent": "webflow-api/3.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -159,7 +159,7 @@ export class Scripts { * to a Site via the `registered_scripts` endpoints, and then applied to a Site or Page using the appropriate * `custom_code` endpoints. * - *
Access to this endpoint requires a bearer token from a Data Client App.
+ * Access to this endpoint requires a bearer token from a [Data Client App](/data/docs/getting-started-data-clients). * * Required scope | `custom_code:write` * @@ -204,8 +204,8 @@ export class Scripts { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "3.0.2", - "User-Agent": "webflow-api/3.0.2", + "X-Fern-SDK-Version": "3.1.0", + "User-Agent": "webflow-api/3.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -301,7 +301,7 @@ export class Scripts { /** * Delete the custom code block that an app created for a Site * - *
Access to this endpoint requires a bearer token from a Data Client App.
+ * Access to this endpoint requires a bearer token from a [Data Client App](/data/docs/getting-started-data-clients). * * Required scope | `custom_code:write` * @@ -328,8 +328,8 @@ export class Scripts { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "3.0.2", - "User-Agent": "webflow-api/3.0.2", + "X-Fern-SDK-Version": "3.1.0", + "User-Agent": "webflow-api/3.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -416,7 +416,7 @@ export class Scripts { /** * Get all instances of Custom Code applied to a Site or Pages. * - *
Access to this endpoint requires a bearer token from a Data Client App.
+ * Access to this endpoint requires a bearer token from a [Data Client App](/data/docs/getting-started-data-clients). * * Required scope | `custom_code:read` * @@ -458,8 +458,8 @@ export class Scripts { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "3.0.2", - "User-Agent": "webflow-api/3.0.2", + "X-Fern-SDK-Version": "3.1.0", + "User-Agent": "webflow-api/3.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, diff --git a/src/api/resources/token/client/Client.ts b/src/api/resources/token/client/Client.ts index 0eeec4fe..c4d8baca 100644 --- a/src/api/resources/token/client/Client.ts +++ b/src/api/resources/token/client/Client.ts @@ -54,8 +54,8 @@ export class Token { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "3.0.2", - "User-Agent": "webflow-api/3.0.2", + "X-Fern-SDK-Version": "3.1.0", + "User-Agent": "webflow-api/3.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -115,7 +115,8 @@ export class Token { /** * Information about the authorization token - * Access to this endpoint requires a bearer token from a []>Data Client App](/data/docs/getting-started-data-clients). + * + * Access to this endpoint requires a bearer token from a [Data Client App](/data/docs/getting-started-data-clients). * * @param {Token.RequestOptions} requestOptions - Request-specific configuration. * @@ -135,8 +136,8 @@ export class Token { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "3.0.2", - "User-Agent": "webflow-api/3.0.2", + "X-Fern-SDK-Version": "3.1.0", + "User-Agent": "webflow-api/3.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, diff --git a/src/api/resources/users/client/Client.ts b/src/api/resources/users/client/Client.ts index 451c894e..ddef4f9d 100644 --- a/src/api/resources/users/client/Client.ts +++ b/src/api/resources/users/client/Client.ts @@ -78,8 +78,8 @@ export class Users { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "3.0.2", - "User-Agent": "webflow-api/3.0.2", + "X-Fern-SDK-Version": "3.1.0", + "User-Agent": "webflow-api/3.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -200,8 +200,8 @@ export class Users { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "3.0.2", - "User-Agent": "webflow-api/3.0.2", + "X-Fern-SDK-Version": "3.1.0", + "User-Agent": "webflow-api/3.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -323,8 +323,8 @@ export class Users { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "3.0.2", - "User-Agent": "webflow-api/3.0.2", + "X-Fern-SDK-Version": "3.1.0", + "User-Agent": "webflow-api/3.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -413,7 +413,7 @@ export class Users { /** * Update a User by ID * - * Required scope | `users:write` + * Required scope | `users:write` * * The email and password * fields cannot be updated using this endpoint @@ -456,8 +456,8 @@ export class Users { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "3.0.2", - "User-Agent": "webflow-api/3.0.2", + "X-Fern-SDK-Version": "3.1.0", + "User-Agent": "webflow-api/3.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -594,8 +594,8 @@ export class Users { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "3.0.2", - "User-Agent": "webflow-api/3.0.2", + "X-Fern-SDK-Version": "3.1.0", + "User-Agent": "webflow-api/3.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, diff --git a/src/api/resources/webhooks/client/Client.ts b/src/api/resources/webhooks/client/Client.ts index ea8c6c05..0d14fee9 100644 --- a/src/api/resources/webhooks/client/Client.ts +++ b/src/api/resources/webhooks/client/Client.ts @@ -27,6 +27,9 @@ export declare namespace Webhooks { } } +/** + * Webhooks are the webhooks in your Webflow site. + */ export class Webhooks { constructor(protected readonly _options: Webhooks.Options) {} @@ -58,8 +61,8 @@ export class Webhooks { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "3.0.2", - "User-Agent": "webflow-api/3.0.2", + "X-Fern-SDK-Version": "3.1.0", + "User-Agent": "webflow-api/3.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -152,7 +155,7 @@ export class Webhooks { * * Limit of 75 registrations per `triggerType`, per site. * - *
Access to this endpoint requires a bearer token from a Data Client App.
+ * Access to this endpoint requires a bearer token from a [Data Client App](/data/docs/getting-started-data-clients). * Required scope | `sites:write` * * @param {string} siteId - Unique identifier for a Site @@ -191,8 +194,8 @@ export class Webhooks { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "3.0.2", - "User-Agent": "webflow-api/3.0.2", + "X-Fern-SDK-Version": "3.1.0", + "User-Agent": "webflow-api/3.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -313,8 +316,8 @@ export class Webhooks { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "3.0.2", - "User-Agent": "webflow-api/3.0.2", + "X-Fern-SDK-Version": "3.1.0", + "User-Agent": "webflow-api/3.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -430,8 +433,8 @@ export class Webhooks { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "3.0.2", - "User-Agent": "webflow-api/3.0.2", + "X-Fern-SDK-Version": "3.1.0", + "User-Agent": "webflow-api/3.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, diff --git a/src/api/types/Component.ts b/src/api/types/Component.ts new file mode 100644 index 00000000..f90eff53 --- /dev/null +++ b/src/api/types/Component.ts @@ -0,0 +1,19 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * The Component object + */ +export interface Component { + /** Unique identifier for the Component */ + id: string; + /** Component Name */ + name?: string; + /** The group that the component belongs to */ + group?: string; + /** Component Description */ + description?: string; + /** 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. */ + readonly?: boolean; +} diff --git a/src/api/types/ComponentDom.ts b/src/api/types/ComponentDom.ts new file mode 100644 index 00000000..aaf5e2a8 --- /dev/null +++ b/src/api/types/ComponentDom.ts @@ -0,0 +1,15 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Webflow from "../index"; + +/** + * 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, or nested component instances. + */ +export interface ComponentDom { + /** Component ID */ + componentId?: string; + nodes?: Webflow.Node[]; + pagination?: Webflow.Pagination; +} diff --git a/src/api/types/ComponentInstanceNodePropertyOverridesWrite.ts b/src/api/types/ComponentInstanceNodePropertyOverridesWrite.ts new file mode 100644 index 00000000..2fe7cd3b --- /dev/null +++ b/src/api/types/ComponentInstanceNodePropertyOverridesWrite.ts @@ -0,0 +1,15 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Webflow from "../index"; + +/** + * Update text property overrides of a component instance + */ +export interface ComponentInstanceNodePropertyOverridesWrite { + /** Node UUID */ + nodeId: string; + /** A list of component instance properties to override within the specified secondary locale. */ + propertyOverrides: Webflow.ComponentInstanceNodePropertyOverridesWritePropertyOverridesItem[]; +} diff --git a/src/api/types/ComponentInstanceNodePropertyOverridesWritePropertyOverridesItem.ts b/src/api/types/ComponentInstanceNodePropertyOverridesWritePropertyOverridesItem.ts new file mode 100644 index 00000000..a69d7028 --- /dev/null +++ b/src/api/types/ComponentInstanceNodePropertyOverridesWritePropertyOverridesItem.ts @@ -0,0 +1,15 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export interface ComponentInstanceNodePropertyOverridesWritePropertyOverridesItem { + /** The ID of the property. */ + propertyId: string; + /** + * 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. + */ + text: string; +} diff --git a/src/api/types/ComponentList.ts b/src/api/types/ComponentList.ts new file mode 100644 index 00000000..8af4f455 --- /dev/null +++ b/src/api/types/ComponentList.ts @@ -0,0 +1,13 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Webflow from "../index"; + +/** + * List of Components on a site. + */ +export interface ComponentList { + components?: Webflow.Component[]; + pagination?: Webflow.Pagination; +} diff --git a/src/api/types/ComponentNode.ts b/src/api/types/ComponentNode.ts new file mode 100644 index 00000000..052cbab9 --- /dev/null +++ b/src/api/types/ComponentNode.ts @@ -0,0 +1,17 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Webflow from "../index"; + +/** + * Represents a component instance within the DOM. It contains details about the component instance, such as its type and properties. + */ +export interface ComponentNode { + /** Node UUID */ + id?: string; + /** Component ID */ + componentId?: string; + /** List of component properties with overrides for a component instance. */ + propertyOverrides?: Webflow.ComponentProperty[]; +} diff --git a/src/api/types/ComponentProperties.ts b/src/api/types/ComponentProperties.ts new file mode 100644 index 00000000..e2e33ecb --- /dev/null +++ b/src/api/types/ComponentProperties.ts @@ -0,0 +1,15 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Webflow from "../index"; + +/** + * 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. + */ +export interface ComponentProperties { + /** Component ID */ + componentId?: string; + properties?: Webflow.ComponentProperty[]; + pagination?: Webflow.Pagination; +} diff --git a/src/api/types/ComponentProperty.ts b/src/api/types/ComponentProperty.ts new file mode 100644 index 00000000..fffc0323 --- /dev/null +++ b/src/api/types/ComponentProperty.ts @@ -0,0 +1,19 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Webflow from "../index"; + +/** + * 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. + */ +export interface ComponentProperty { + /** The ID of the property. */ + propertyId?: string; + /** The type of the property. */ + type?: Webflow.ComponentPropertyType; + /** The label of the property in the UI. */ + label?: string; + /** Represents text content within the DOM. It contains both the raw text and its HTML representation. */ + text?: Webflow.Text; +} diff --git a/src/api/types/ComponentPropertyType.ts b/src/api/types/ComponentPropertyType.ts new file mode 100644 index 00000000..68a03600 --- /dev/null +++ b/src/api/types/ComponentPropertyType.ts @@ -0,0 +1,14 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * The type of the property. + */ +export type ComponentPropertyType = "Plain Text" | "Rich Text" | "Alt Text"; + +export const ComponentPropertyType = { + PlainText: "Plain Text", + RichText: "Rich Text", + AltText: "Alt Text", +} as const; diff --git a/src/api/types/Dom.ts b/src/api/types/Dom.ts index ff5f7c0b..b02c0628 100644 --- a/src/api/types/Dom.ts +++ b/src/api/types/Dom.ts @@ -5,7 +5,7 @@ import * as Webflow from "../index"; /** - * The DOM (Document Object Model) schema represents the content structure of a web page. It captures various content nodes, such as text and images, along with their associated attributes. Each node has a unique identifier and can be of different types like text or image. The schema also provides pagination details for scenarios where the content nodes are too many to be fetched in a single request. + * 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. */ export interface Dom { /** Page ID */ diff --git a/src/api/types/Domain.ts b/src/api/types/Domain.ts index 64c69d4a..04e9bb96 100644 --- a/src/api/types/Domain.ts +++ b/src/api/types/Domain.ts @@ -7,4 +7,6 @@ export interface Domain { id: string; /** The registered Domain name */ url?: string; + /** The date the custom domain was last published to */ + lastPublished?: Date; } diff --git a/src/api/types/Error_.ts b/src/api/types/Error_.ts index 9a223848..6295f0e4 100644 --- a/src/api/types/Error_.ts +++ b/src/api/types/Error_.ts @@ -12,5 +12,5 @@ export interface Error_ { /** Link to more information */ externalReference?: string; /** Array of errors */ - details?: Webflow.ErrorDetailsItem[]; + details?: unknown[]; } diff --git a/src/api/types/FieldType.ts b/src/api/types/FieldType.ts index e495a8d3..86363689 100644 --- a/src/api/types/FieldType.ts +++ b/src/api/types/FieldType.ts @@ -6,32 +6,32 @@ * Choose these appropriate field type for your collection data */ export type FieldType = - | "PlainText" - | "RichText" + | "Color" + | "DateTime" + | "Email" + | "ExtFileRef" | "Image" - | "MultiImage" - | "Video" | "Link" - | "Email" - | "Phone" + | "MultiImage" | "Number" - | "DateTime" + | "Phone" + | "PlainText" + | "RichText" | "Switch" - | "Color" - | "ExtFileRef"; + | "Video"; export const FieldType = { - PlainText: "PlainText", - RichText: "RichText", + Color: "Color", + DateTime: "DateTime", + Email: "Email", + ExtFileRef: "ExtFileRef", Image: "Image", - MultiImage: "MultiImage", - Video: "Video", Link: "Link", - Email: "Email", - Phone: "Phone", + MultiImage: "MultiImage", Number: "Number", - DateTime: "DateTime", + Phone: "Phone", + PlainText: "PlainText", + RichText: "RichText", Switch: "Switch", - Color: "Color", - ExtFileRef: "ExtFileRef", + Video: "Video", } as const; diff --git a/src/api/types/ImageNode.ts b/src/api/types/ImageNode.ts index 11ff84db..d1b45fc7 100644 --- a/src/api/types/ImageNode.ts +++ b/src/api/types/ImageNode.ts @@ -2,10 +2,15 @@ * This file was auto-generated by Fern from our API Definition. */ +import * as Webflow from "../index"; + /** * 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. */ export interface ImageNode { - alt?: string; - assetId?: string; + /** Node UUID */ + id?: string; + image?: Webflow.ImageNodeImage; + /** The custom attributes of the node */ + attributes?: Record; } diff --git a/src/api/types/ImageNodeImage.ts b/src/api/types/ImageNodeImage.ts new file mode 100644 index 00000000..74f51a90 --- /dev/null +++ b/src/api/types/ImageNodeImage.ts @@ -0,0 +1,8 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export interface ImageNodeImage { + alt?: string; + assetId?: string; +} diff --git a/src/api/types/Node.ts b/src/api/types/Node.ts index 4f8f21c3..74e961bd 100644 --- a/src/api/types/Node.ts +++ b/src/api/types/Node.ts @@ -7,12 +7,18 @@ import * as Webflow from "../index"; /** * 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. */ -export interface Node { - /** Node UUID */ - id?: string; - type?: Webflow.NodeType; - text?: Webflow.TextNode; - image?: Webflow.ImageNode; - /** The custom attributes of the node */ - attributes?: Record; +export type Node = Webflow.Node.Text | Webflow.Node.Image | Webflow.Node.ComponentInstance; + +export declare namespace Node { + interface Text extends Webflow.TextNode { + type: "text"; + } + + interface Image extends Webflow.ImageNode { + type: "image"; + } + + interface ComponentInstance extends Webflow.ComponentNode { + type: "component-instance"; + } } diff --git a/src/api/types/NodeType.ts b/src/api/types/NodeType.ts deleted file mode 100644 index 30b5f886..00000000 --- a/src/api/types/NodeType.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -export type NodeType = "text" | "image"; - -export const NodeType = { - Text: "text", - Image: "image", -} as const; diff --git a/src/api/types/ErrorDetailsItem.ts b/src/api/types/NotEnterprisePlanWorkspace.ts similarity index 53% rename from src/api/types/ErrorDetailsItem.ts rename to src/api/types/NotEnterprisePlanWorkspace.ts index d02087ac..fbd758af 100644 --- a/src/api/types/ErrorDetailsItem.ts +++ b/src/api/types/NotEnterprisePlanWorkspace.ts @@ -2,4 +2,4 @@ * This file was auto-generated by Fern from our API Definition. */ -export type ErrorDetailsItem = string | Record; +export type NotEnterprisePlanWorkspace = unknown; diff --git a/src/api/types/ProductFieldData.ts b/src/api/types/ProductFieldData.ts index a8c49373..977fe806 100644 --- a/src/api/types/ProductFieldData.ts +++ b/src/api/types/ProductFieldData.ts @@ -5,7 +5,7 @@ import * as Webflow from "../index"; /** - * 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. */ export interface ProductFieldData { /** Name of the Product */ diff --git a/src/api/types/Redirect.ts b/src/api/types/Redirect.ts new file mode 100644 index 00000000..d0a7a9fc --- /dev/null +++ b/src/api/types/Redirect.ts @@ -0,0 +1,15 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * A single redirection rule, specifying a source URL and a destination URL. + */ +export interface Redirect { + /** The ID of the specific redirect rule */ + id?: string; + /** The source URL path that will be redirected. */ + fromUrl?: string; + /** The target URL path where the user or client will be redirected. */ + toUrl?: string; +} diff --git a/src/api/types/Redirects.ts b/src/api/types/Redirects.ts new file mode 100644 index 00000000..f6da48d3 --- /dev/null +++ b/src/api/types/Redirects.ts @@ -0,0 +1,14 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Webflow from "../index"; + +/** + * Site redirects response + */ +export interface Redirects { + /** List of redirects for a given site */ + redirects?: Webflow.Redirect[]; + pagination?: Webflow.Pagination; +} diff --git a/src/api/types/ScriptApply.ts b/src/api/types/ScriptApply.ts index bc8c0d7f..309a6bc0 100644 --- a/src/api/types/ScriptApply.ts +++ b/src/api/types/ScriptApply.ts @@ -9,7 +9,7 @@ export interface ScriptApply { id: string; /** Location of the script, either in the header or footer of the published site */ location: Webflow.ScriptApplyLocation; - /** Semantic Version String for the registered script _e.g. 0.0.1_ */ + /** Semantic Version String for the registered script *e.g. 0.0.1* */ version: string; /** Developer-specified key/value pairs to be applied as attributes to the script */ attributes?: Record; diff --git a/src/api/types/SitePlan.ts b/src/api/types/SitePlan.ts new file mode 100644 index 00000000..3a1c50cf --- /dev/null +++ b/src/api/types/SitePlan.ts @@ -0,0 +1,14 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Webflow from "../index"; + +export interface SitePlan { + /** ID of the hosting plan. */ + id?: Webflow.SitePlanId; + /** Name of the hosting plan. */ + name?: Webflow.SitePlanName; + /** URL for more information about Webflow hosting plan pricing. */ + pricingInfo?: string; +} diff --git a/src/api/types/SitePlanId.ts b/src/api/types/SitePlanId.ts new file mode 100644 index 00000000..9d65463a --- /dev/null +++ b/src/api/types/SitePlanId.ts @@ -0,0 +1,35 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * ID of the hosting plan. + */ +export type SitePlanId = + | "hosting-basic-v3" + | "hosting-cms-v3" + | "hosting-business-v3" + | "hosting-ecommerce-standard-v2" + | "hosting-ecommerce-plus-v2" + | "hosting-ecommerce-advanced-v2" + | "hosting-basic-v4" + | "hosting-cms-v4" + | "hosting-business-v4" + | "hosting-ecommerce-standard-v3" + | "hosting-ecommerce-plus-v3" + | "hosting-ecommerce-advanced-v3"; + +export const SitePlanId = { + HostingBasicV3: "hosting-basic-v3", + HostingCmsV3: "hosting-cms-v3", + HostingBusinessV3: "hosting-business-v3", + HostingEcommerceStandardV2: "hosting-ecommerce-standard-v2", + HostingEcommercePlusV2: "hosting-ecommerce-plus-v2", + HostingEcommerceAdvancedV2: "hosting-ecommerce-advanced-v2", + HostingBasicV4: "hosting-basic-v4", + HostingCmsV4: "hosting-cms-v4", + HostingBusinessV4: "hosting-business-v4", + HostingEcommerceStandardV3: "hosting-ecommerce-standard-v3", + HostingEcommercePlusV3: "hosting-ecommerce-plus-v3", + HostingEcommerceAdvancedV3: "hosting-ecommerce-advanced-v3", +} as const; diff --git a/src/api/types/SitePlanName.ts b/src/api/types/SitePlanName.ts new file mode 100644 index 00000000..925eaa9b --- /dev/null +++ b/src/api/types/SitePlanName.ts @@ -0,0 +1,23 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * Name of the hosting plan. + */ +export type SitePlanName = + | "Basic Hosting" + | "CMS Hosting" + | "Business Hosting" + | "ECommerce Standard Hosting" + | "ECommerce Plus Hosting" + | "ECommerce Advanced Hosting"; + +export const SitePlanName = { + BasicHosting: "Basic Hosting", + CmsHosting: "CMS Hosting", + BusinessHosting: "Business Hosting", + ECommerceStandardHosting: "ECommerce Standard Hosting", + ECommercePlusHosting: "ECommerce Plus Hosting", + ECommerceAdvancedHosting: "ECommerce Advanced Hosting", +} as const; diff --git a/src/api/types/Text.ts b/src/api/types/Text.ts new file mode 100644 index 00000000..3bb0c2ab --- /dev/null +++ b/src/api/types/Text.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export interface Text { + /** The HTML content of the text node. */ + html?: string; + /** The raw text content of the text node. */ + text?: string; +} diff --git a/src/api/types/TextNode.ts b/src/api/types/TextNode.ts index d40e72c5..d3bb2e5f 100644 --- a/src/api/types/TextNode.ts +++ b/src/api/types/TextNode.ts @@ -2,10 +2,15 @@ * This file was auto-generated by Fern from our API Definition. */ +import * as Webflow from "../index"; + /** - * Represents textual content within the DOM. It contains both the raw text and its HTML representation, allowing for flexibility in rendering and processing. Additional attributes can be associated with the text for styling or other purposes. + * 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. */ export interface TextNode { - html?: string; - text?: string; + /** Node UUID */ + id?: string; + text?: Webflow.TextNodeText; + /** The custom attributes of the node */ + attributes?: Record; } diff --git a/src/api/types/TextNodeText.ts b/src/api/types/TextNodeText.ts new file mode 100644 index 00000000..b65c6adf --- /dev/null +++ b/src/api/types/TextNodeText.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export interface TextNodeText { + /** The HTML content of the text node. */ + html?: string; + /** The raw text content of the text node. */ + text?: string; +} diff --git a/src/api/resources/pages/types/DomWriteNodesItem.ts b/src/api/types/TextNodeWrite.ts similarity index 81% rename from src/api/resources/pages/types/DomWriteNodesItem.ts rename to src/api/types/TextNodeWrite.ts index 907de6eb..0c52cf2c 100644 --- a/src/api/resources/pages/types/DomWriteNodesItem.ts +++ b/src/api/types/TextNodeWrite.ts @@ -2,7 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ -export interface DomWriteNodesItem { +/** + * Update a text node + */ +export interface TextNodeWrite { /** Node UUID */ nodeId: string; /** 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. */ diff --git a/src/api/types/TriggerType.ts b/src/api/types/TriggerType.ts index 771c4e92..345bf260 100644 --- a/src/api/types/TriggerType.ts +++ b/src/api/types/TriggerType.ts @@ -3,21 +3,21 @@ */ /** - * - `form_submission` - Sends the [form_submission](#form_submission) event - * - `site_publish` - Sends a [site_publish](#site_publish) event - * - `page_created` - Send the [page_created](#page_created) event - * - `page_metadata_updated` - Sends the [page_metadata_updated](#page_metadata_updated) event - * - `page_deleted` - Sends the [page_deleted](#page_deleted) event - * - `ecomm_new_order` - Sends the new [ecomm_new_order](#ecomm_new_order) event - * - `ecomm_order_changed` - Sends the [ecomm_order_changed](#ecomm_order_changed) event - * - `ecomm_inventory_changed` - Sends the [ecomm_inventory_changed](#ecomm_inventory_changed) event - * - `user_account_added` - Sends the [user_account_added](#user_account_added) event - * - `user_account_updated` - Sends the [user_account_updated](#user_account_updated) event - * - `user_account_deleted` - Sends the [user_account_deleted](#user_account_deleted) event - * - `collection_item_created` - Sends the [collection_item_created](#collection_item_created) event - * - `collection_item_changed` - Sends the [collection_item_changed](#collection_item_changed) event - * - `collection_item_deleted` - Sends the [collection_item_deleted](#collection_item_deleted) event - * - `collection_item_unpublished` - Sends the [collection_item_unpublished](#collection_item_unpublished) event + * * `form_submission` - Sends the [form_submission](#form_submission) event + * * `site_publish` - Sends a [site_publish](#site_publish) event + * * `page_created` - Send the [page_created](#page_created) event + * * `page_metadata_updated` - Sends the [page_metadata_updated](#page_metadata_updated) event + * * `page_deleted` - Sends the [page_deleted](#page_deleted) event + * * `ecomm_new_order` - Sends the new [ecomm_new_order](#ecomm_new_order) event + * * `ecomm_order_changed` - Sends the [ecomm_order_changed](#ecomm_order_changed) event + * * `ecomm_inventory_changed` - Sends the [ecomm_inventory_changed](#ecomm_inventory_changed) event + * * `user_account_added` - Sends the [user_account_added](#user_account_added) event + * * `user_account_updated` - Sends the [user_account_updated](#user_account_updated) event + * * `user_account_deleted` - Sends the [user_account_deleted](#user_account_deleted) event + * * `collection_item_created` - Sends the [collection_item_created](#collection_item_created) event + * * `collection_item_changed` - Sends the [collection_item_changed](#collection_item_changed) event + * * `collection_item_deleted` - Sends the [collection_item_deleted](#collection_item_deleted) event + * * `collection_item_unpublished` - Sends the [collection_item_unpublished](#collection_item_unpublished) event */ export type TriggerType = | "form_submission" diff --git a/src/api/types/UserAccessGroupsItem.ts b/src/api/types/UserAccessGroupsItem.ts index 80ae6d9f..637d39f3 100644 --- a/src/api/types/UserAccessGroupsItem.ts +++ b/src/api/types/UserAccessGroupsItem.ts @@ -12,9 +12,8 @@ export interface UserAccessGroupsItem { slug?: string; /** * The type of access group based on how it was assigned to the user. - * - * - `admin` - Assigned to the user via API or in the designer - * - `ecommerce` - Assigned to the user via an ecommerce purchase + * * `admin` - Assigned to the user via API or in the designer + * * `ecommerce` - Assigned to the user via an ecommerce purchase */ type?: Webflow.UserAccessGroupsItemType; } diff --git a/src/api/types/UserAccessGroupsItemType.ts b/src/api/types/UserAccessGroupsItemType.ts index 0057bea9..aa4eda82 100644 --- a/src/api/types/UserAccessGroupsItemType.ts +++ b/src/api/types/UserAccessGroupsItemType.ts @@ -4,9 +4,8 @@ /** * The type of access group based on how it was assigned to the user. - * - * - `admin` - Assigned to the user via API or in the designer - * - `ecommerce` - Assigned to the user via an ecommerce purchase + * * `admin` - Assigned to the user via API or in the designer + * * `ecommerce` - Assigned to the user via an ecommerce purchase */ export type UserAccessGroupsItemType = "admin" | "ecommerce"; diff --git a/src/api/types/index.ts b/src/api/types/index.ts index cd6788c7..7e2d33ff 100644 --- a/src/api/types/index.ts +++ b/src/api/types/index.ts @@ -1,9 +1,8 @@ -export * from "./BadRequestErrorBody"; export * from "./ForbiddenErrorBody"; +export * from "./BadRequestErrorBody"; export * from "./ConflictErrorBody"; export * from "./AuthorizedUser"; export * from "./ErrorCode"; -export * from "./ErrorDetailsItem"; export * from "./Error_"; export * from "./Application"; export * from "./AuthorizationAuthorizationAuthorizedTo"; @@ -14,18 +13,24 @@ export * from "./Locale"; export * from "./Locales"; export * from "./SiteDataCollectionType"; export * from "./Site"; +export * from "./InvalidScopes"; +export * from "./NotEnterprisePlanWorkspace"; export * from "./Sites"; +export * from "./NotEnterprisePlanSite"; export * from "./Domains"; export * from "./InvalidDomain"; export * from "./NoDomains"; +export * from "./Redirect"; +export * from "./Pagination"; +export * from "./Redirects"; +export * from "./SitePlanId"; +export * from "./SitePlanName"; +export * from "./SitePlan"; export * from "./SiteActivityLogItemEvent"; export * from "./SiteActivityLogItemResourceOperation"; export * from "./SiteActivityLogItemUser"; export * from "./SiteActivityLogItem"; -export * from "./Pagination"; export * from "./SiteActivityLogResponse"; -export * from "./InvalidScopes"; -export * from "./NotEnterprisePlanSite"; export * from "./CollectionListArrayItem"; export * from "./CollectionList"; export * from "./FieldType"; @@ -48,11 +53,23 @@ export * from "./PageSeo"; export * from "./PageOpenGraph"; export * from "./Page"; export * from "./PageList"; +export * from "./TextNodeText"; export * from "./TextNode"; +export * from "./ImageNodeImage"; export * from "./ImageNode"; -export * from "./NodeType"; +export * from "./Text"; +export * from "./ComponentPropertyType"; +export * from "./ComponentProperty"; +export * from "./ComponentNode"; export * from "./Node"; export * from "./Dom"; +export * from "./TextNodeWrite"; +export * from "./ComponentInstanceNodePropertyOverridesWritePropertyOverridesItem"; +export * from "./ComponentInstanceNodePropertyOverridesWrite"; +export * from "./Component"; +export * from "./ComponentList"; +export * from "./ComponentDom"; +export * from "./ComponentProperties"; export * from "./ScriptApplyLocation"; export * from "./ScriptApply"; export * from "./ScriptApplyList"; diff --git a/src/serialization/resources/collections/resources/fields/types/FieldCreateType.ts b/src/serialization/resources/collections/resources/fields/types/FieldCreateType.ts index 36927784..8acbaab4 100644 --- a/src/serialization/resources/collections/resources/fields/types/FieldCreateType.ts +++ b/src/serialization/resources/collections/resources/fields/types/FieldCreateType.ts @@ -10,34 +10,36 @@ export const FieldCreateType: core.serialization.Schema< serializers.collections.FieldCreateType.Raw, Webflow.collections.FieldCreateType > = core.serialization.enum_([ - "PlainText", - "RichText", + "Color", + "DateTime", + "Email", + "ExtFileRef", + "File", "Image", - "MultiImage", - "Video", "Link", - "Email", - "Phone", + "MultiImage", "Number", - "DateTime", + "Phone", + "PlainText", + "RichText", "Switch", - "Color", - "File", + "Video", ]); export declare namespace FieldCreateType { type Raw = - | "PlainText" - | "RichText" + | "Color" + | "DateTime" + | "Email" + | "ExtFileRef" + | "File" | "Image" - | "MultiImage" - | "Video" | "Link" - | "Email" - | "Phone" + | "MultiImage" | "Number" - | "DateTime" + | "Phone" + | "PlainText" + | "RichText" | "Switch" - | "Color" - | "File"; + | "Video"; } diff --git a/src/serialization/resources/components/client/index.ts b/src/serialization/resources/components/client/index.ts new file mode 100644 index 00000000..415726b7 --- /dev/null +++ b/src/serialization/resources/components/client/index.ts @@ -0,0 +1 @@ +export * from "./requests"; diff --git a/src/serialization/resources/components/client/requests/ComponentDomWrite.ts b/src/serialization/resources/components/client/requests/ComponentDomWrite.ts new file mode 100644 index 00000000..efcca33f --- /dev/null +++ b/src/serialization/resources/components/client/requests/ComponentDomWrite.ts @@ -0,0 +1,21 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../../../../index"; +import * as Webflow from "../../../../../api/index"; +import * as core from "../../../../../core"; +import { ComponentDomWriteNodesItem } from "../../types/ComponentDomWriteNodesItem"; + +export const ComponentDomWrite: core.serialization.Schema< + serializers.ComponentDomWrite.Raw, + Omit +> = core.serialization.object({ + nodes: core.serialization.list(ComponentDomWriteNodesItem), +}); + +export declare namespace ComponentDomWrite { + interface Raw { + nodes: ComponentDomWriteNodesItem.Raw[]; + } +} diff --git a/src/serialization/resources/components/client/requests/ComponentPropertiesWrite.ts b/src/serialization/resources/components/client/requests/ComponentPropertiesWrite.ts new file mode 100644 index 00000000..0b5ace7a --- /dev/null +++ b/src/serialization/resources/components/client/requests/ComponentPropertiesWrite.ts @@ -0,0 +1,21 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../../../../index"; +import * as Webflow from "../../../../../api/index"; +import * as core from "../../../../../core"; +import { ComponentPropertiesWritePropertiesItem } from "../../types/ComponentPropertiesWritePropertiesItem"; + +export const ComponentPropertiesWrite: core.serialization.Schema< + serializers.ComponentPropertiesWrite.Raw, + Omit +> = core.serialization.object({ + properties: core.serialization.list(ComponentPropertiesWritePropertiesItem), +}); + +export declare namespace ComponentPropertiesWrite { + interface Raw { + properties: ComponentPropertiesWritePropertiesItem.Raw[]; + } +} diff --git a/src/serialization/resources/components/client/requests/index.ts b/src/serialization/resources/components/client/requests/index.ts new file mode 100644 index 00000000..ce5a0aaf --- /dev/null +++ b/src/serialization/resources/components/client/requests/index.ts @@ -0,0 +1,2 @@ +export { ComponentDomWrite } from "./ComponentDomWrite"; +export { ComponentPropertiesWrite } from "./ComponentPropertiesWrite"; diff --git a/src/serialization/resources/components/index.ts b/src/serialization/resources/components/index.ts new file mode 100644 index 00000000..c9240f83 --- /dev/null +++ b/src/serialization/resources/components/index.ts @@ -0,0 +1,2 @@ +export * from "./types"; +export * from "./client"; diff --git a/src/serialization/resources/components/types/ComponentDomWriteNodesItem.ts b/src/serialization/resources/components/types/ComponentDomWriteNodesItem.ts new file mode 100644 index 00000000..5aaf2383 --- /dev/null +++ b/src/serialization/resources/components/types/ComponentDomWriteNodesItem.ts @@ -0,0 +1,18 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../../../index"; +import * as Webflow from "../../../../api/index"; +import * as core from "../../../../core"; +import { TextNodeWrite } from "../../../types/TextNodeWrite"; +import { ComponentInstanceNodePropertyOverridesWrite } from "../../../types/ComponentInstanceNodePropertyOverridesWrite"; + +export const ComponentDomWriteNodesItem: core.serialization.Schema< + serializers.ComponentDomWriteNodesItem.Raw, + Webflow.ComponentDomWriteNodesItem +> = core.serialization.undiscriminatedUnion([TextNodeWrite, ComponentInstanceNodePropertyOverridesWrite]); + +export declare namespace ComponentDomWriteNodesItem { + type Raw = TextNodeWrite.Raw | ComponentInstanceNodePropertyOverridesWrite.Raw; +} diff --git a/src/serialization/resources/pages/types/DomWriteNodesItem.ts b/src/serialization/resources/components/types/ComponentPropertiesWritePropertiesItem.ts similarity index 50% rename from src/serialization/resources/pages/types/DomWriteNodesItem.ts rename to src/serialization/resources/components/types/ComponentPropertiesWritePropertiesItem.ts index 507c8108..cc1b20e8 100644 --- a/src/serialization/resources/pages/types/DomWriteNodesItem.ts +++ b/src/serialization/resources/components/types/ComponentPropertiesWritePropertiesItem.ts @@ -6,17 +6,17 @@ import * as serializers from "../../../index"; import * as Webflow from "../../../../api/index"; import * as core from "../../../../core"; -export const DomWriteNodesItem: core.serialization.ObjectSchema< - serializers.DomWriteNodesItem.Raw, - Webflow.DomWriteNodesItem +export const ComponentPropertiesWritePropertiesItem: core.serialization.ObjectSchema< + serializers.ComponentPropertiesWritePropertiesItem.Raw, + Webflow.ComponentPropertiesWritePropertiesItem > = core.serialization.object({ - nodeId: core.serialization.string(), + propertyId: core.serialization.string(), text: core.serialization.string(), }); -export declare namespace DomWriteNodesItem { +export declare namespace ComponentPropertiesWritePropertiesItem { interface Raw { - nodeId: string; + propertyId: string; text: string; } } diff --git a/src/serialization/resources/components/types/ComponentsUpdateContentResponse.ts b/src/serialization/resources/components/types/ComponentsUpdateContentResponse.ts new file mode 100644 index 00000000..418f1082 --- /dev/null +++ b/src/serialization/resources/components/types/ComponentsUpdateContentResponse.ts @@ -0,0 +1,20 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../../../index"; +import * as Webflow from "../../../../api/index"; +import * as core from "../../../../core"; + +export const ComponentsUpdateContentResponse: core.serialization.ObjectSchema< + serializers.ComponentsUpdateContentResponse.Raw, + Webflow.ComponentsUpdateContentResponse +> = core.serialization.object({ + errors: core.serialization.list(core.serialization.string()), +}); + +export declare namespace ComponentsUpdateContentResponse { + interface Raw { + errors: string[]; + } +} diff --git a/src/serialization/resources/components/types/ComponentsUpdatePropertiesResponse.ts b/src/serialization/resources/components/types/ComponentsUpdatePropertiesResponse.ts new file mode 100644 index 00000000..2d25e7d7 --- /dev/null +++ b/src/serialization/resources/components/types/ComponentsUpdatePropertiesResponse.ts @@ -0,0 +1,20 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../../../index"; +import * as Webflow from "../../../../api/index"; +import * as core from "../../../../core"; + +export const ComponentsUpdatePropertiesResponse: core.serialization.ObjectSchema< + serializers.ComponentsUpdatePropertiesResponse.Raw, + Webflow.ComponentsUpdatePropertiesResponse +> = core.serialization.object({ + errors: core.serialization.list(core.serialization.string()), +}); + +export declare namespace ComponentsUpdatePropertiesResponse { + interface Raw { + errors: string[]; + } +} diff --git a/src/serialization/resources/components/types/index.ts b/src/serialization/resources/components/types/index.ts new file mode 100644 index 00000000..1bdf297c --- /dev/null +++ b/src/serialization/resources/components/types/index.ts @@ -0,0 +1,4 @@ +export * from "./ComponentDomWriteNodesItem"; +export * from "./ComponentsUpdateContentResponse"; +export * from "./ComponentPropertiesWritePropertiesItem"; +export * from "./ComponentsUpdatePropertiesResponse"; diff --git a/src/serialization/resources/index.ts b/src/serialization/resources/index.ts index 54a413ab..daa4176c 100644 --- a/src/serialization/resources/index.ts +++ b/src/serialization/resources/index.ts @@ -2,6 +2,8 @@ export * as sites from "./sites"; export * from "./sites/types"; export * as pages from "./pages"; export * from "./pages/types"; +export * as components from "./components"; +export * from "./components/types"; export * as users from "./users"; export * from "./users/types"; export * as accessGroups from "./accessGroups"; @@ -16,6 +18,7 @@ export * as collections from "./collections"; export * from "./sites/client/requests"; export * from "./collections/client/requests"; export * from "./pages/client/requests"; +export * from "./components/client/requests"; export * as scripts from "./scripts"; export * from "./scripts/client/requests"; export * as assets from "./assets"; diff --git a/src/serialization/resources/pages/client/requests/DomWrite.ts b/src/serialization/resources/pages/client/requests/DomWrite.ts deleted file mode 100644 index 7ec432f7..00000000 --- a/src/serialization/resources/pages/client/requests/DomWrite.ts +++ /dev/null @@ -1,21 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as serializers from "../../../../index"; -import * as Webflow from "../../../../../api/index"; -import * as core from "../../../../../core"; -import { DomWriteNodesItem } from "../../types/DomWriteNodesItem"; - -export const DomWrite: core.serialization.Schema< - serializers.DomWrite.Raw, - Omit -> = core.serialization.object({ - nodes: core.serialization.list(DomWriteNodesItem), -}); - -export declare namespace DomWrite { - interface Raw { - nodes: DomWriteNodesItem.Raw[]; - } -} diff --git a/src/serialization/resources/pages/client/requests/PageDomWrite.ts b/src/serialization/resources/pages/client/requests/PageDomWrite.ts new file mode 100644 index 00000000..6d1e1b76 --- /dev/null +++ b/src/serialization/resources/pages/client/requests/PageDomWrite.ts @@ -0,0 +1,21 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../../../../index"; +import * as Webflow from "../../../../../api/index"; +import * as core from "../../../../../core"; +import { PageDomWriteNodesItem } from "../../types/PageDomWriteNodesItem"; + +export const PageDomWrite: core.serialization.Schema< + serializers.PageDomWrite.Raw, + Omit +> = core.serialization.object({ + nodes: core.serialization.list(PageDomWriteNodesItem), +}); + +export declare namespace PageDomWrite { + interface Raw { + nodes: PageDomWriteNodesItem.Raw[]; + } +} diff --git a/src/serialization/resources/pages/client/requests/index.ts b/src/serialization/resources/pages/client/requests/index.ts index a4b8aef6..ce50f647 100644 --- a/src/serialization/resources/pages/client/requests/index.ts +++ b/src/serialization/resources/pages/client/requests/index.ts @@ -1 +1 @@ -export { DomWrite } from "./DomWrite"; +export { PageDomWrite } from "./PageDomWrite"; diff --git a/src/serialization/resources/pages/types/PageDomWriteNodesItem.ts b/src/serialization/resources/pages/types/PageDomWriteNodesItem.ts new file mode 100644 index 00000000..4d32f518 --- /dev/null +++ b/src/serialization/resources/pages/types/PageDomWriteNodesItem.ts @@ -0,0 +1,18 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../../../index"; +import * as Webflow from "../../../../api/index"; +import * as core from "../../../../core"; +import { TextNodeWrite } from "../../../types/TextNodeWrite"; +import { ComponentInstanceNodePropertyOverridesWrite } from "../../../types/ComponentInstanceNodePropertyOverridesWrite"; + +export const PageDomWriteNodesItem: core.serialization.Schema< + serializers.PageDomWriteNodesItem.Raw, + Webflow.PageDomWriteNodesItem +> = core.serialization.undiscriminatedUnion([TextNodeWrite, ComponentInstanceNodePropertyOverridesWrite]); + +export declare namespace PageDomWriteNodesItem { + type Raw = TextNodeWrite.Raw | ComponentInstanceNodePropertyOverridesWrite.Raw; +} diff --git a/src/serialization/resources/pages/types/index.ts b/src/serialization/resources/pages/types/index.ts index 943c3715..b9ce1b58 100644 --- a/src/serialization/resources/pages/types/index.ts +++ b/src/serialization/resources/pages/types/index.ts @@ -1,2 +1,2 @@ -export * from "./DomWriteNodesItem"; +export * from "./PageDomWriteNodesItem"; export * from "./UpdateStaticContentResponse"; diff --git a/src/serialization/resources/sites/client/requests/SitesCreateRequest.ts b/src/serialization/resources/sites/client/requests/SitesCreateRequest.ts new file mode 100644 index 00000000..83339694 --- /dev/null +++ b/src/serialization/resources/sites/client/requests/SitesCreateRequest.ts @@ -0,0 +1,24 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../../../../index"; +import * as Webflow from "../../../../../api/index"; +import * as core from "../../../../../core"; + +export const SitesCreateRequest: core.serialization.Schema< + serializers.SitesCreateRequest.Raw, + Webflow.SitesCreateRequest +> = core.serialization.object({ + name: core.serialization.string(), + templateName: core.serialization.string().optional(), + parentFolderId: core.serialization.string().optional(), +}); + +export declare namespace SitesCreateRequest { + interface Raw { + name: string; + templateName?: string | null; + parentFolderId?: string | null; + } +} diff --git a/src/serialization/resources/sites/client/requests/SitesUpdateRequest.ts b/src/serialization/resources/sites/client/requests/SitesUpdateRequest.ts new file mode 100644 index 00000000..5b3291a3 --- /dev/null +++ b/src/serialization/resources/sites/client/requests/SitesUpdateRequest.ts @@ -0,0 +1,22 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../../../../index"; +import * as Webflow from "../../../../../api/index"; +import * as core from "../../../../../core"; + +export const SitesUpdateRequest: core.serialization.Schema< + serializers.SitesUpdateRequest.Raw, + Webflow.SitesUpdateRequest +> = core.serialization.object({ + name: core.serialization.string().optional(), + parentFolderId: core.serialization.string().optional(), +}); + +export declare namespace SitesUpdateRequest { + interface Raw { + name?: string | null; + parentFolderId?: string | null; + } +} diff --git a/src/serialization/resources/sites/client/requests/index.ts b/src/serialization/resources/sites/client/requests/index.ts index dddc2657..1a807906 100644 --- a/src/serialization/resources/sites/client/requests/index.ts +++ b/src/serialization/resources/sites/client/requests/index.ts @@ -1 +1,3 @@ +export { SitesCreateRequest } from "./SitesCreateRequest"; +export { SitesUpdateRequest } from "./SitesUpdateRequest"; export { SitesPublishRequest } from "./SitesPublishRequest"; diff --git a/src/serialization/types/Component.ts b/src/serialization/types/Component.ts new file mode 100644 index 00000000..2f2366aa --- /dev/null +++ b/src/serialization/types/Component.ts @@ -0,0 +1,26 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Webflow from "../../api/index"; +import * as core from "../../core"; + +export const Component: core.serialization.ObjectSchema = + core.serialization.object({ + id: core.serialization.string(), + name: core.serialization.string().optional(), + group: core.serialization.string().optional(), + description: core.serialization.string().optional(), + readonly: core.serialization.boolean().optional(), + }); + +export declare namespace Component { + interface Raw { + id: string; + name?: string | null; + group?: string | null; + description?: string | null; + readonly?: boolean | null; + } +} diff --git a/src/serialization/types/ComponentDom.ts b/src/serialization/types/ComponentDom.ts new file mode 100644 index 00000000..80a30810 --- /dev/null +++ b/src/serialization/types/ComponentDom.ts @@ -0,0 +1,24 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Webflow from "../../api/index"; +import * as core from "../../core"; +import { Node } from "./Node"; +import { Pagination } from "./Pagination"; + +export const ComponentDom: core.serialization.ObjectSchema = + core.serialization.object({ + componentId: core.serialization.string().optional(), + nodes: core.serialization.list(Node).optional(), + pagination: Pagination.optional(), + }); + +export declare namespace ComponentDom { + interface Raw { + componentId?: string | null; + nodes?: Node.Raw[] | null; + pagination?: Pagination.Raw | null; + } +} diff --git a/src/serialization/types/ComponentInstanceNodePropertyOverridesWrite.ts b/src/serialization/types/ComponentInstanceNodePropertyOverridesWrite.ts new file mode 100644 index 00000000..d87995d2 --- /dev/null +++ b/src/serialization/types/ComponentInstanceNodePropertyOverridesWrite.ts @@ -0,0 +1,23 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Webflow from "../../api/index"; +import * as core from "../../core"; +import { ComponentInstanceNodePropertyOverridesWritePropertyOverridesItem } from "./ComponentInstanceNodePropertyOverridesWritePropertyOverridesItem"; + +export const ComponentInstanceNodePropertyOverridesWrite: core.serialization.ObjectSchema< + serializers.ComponentInstanceNodePropertyOverridesWrite.Raw, + Webflow.ComponentInstanceNodePropertyOverridesWrite +> = core.serialization.object({ + nodeId: core.serialization.string(), + propertyOverrides: core.serialization.list(ComponentInstanceNodePropertyOverridesWritePropertyOverridesItem), +}); + +export declare namespace ComponentInstanceNodePropertyOverridesWrite { + interface Raw { + nodeId: string; + propertyOverrides: ComponentInstanceNodePropertyOverridesWritePropertyOverridesItem.Raw[]; + } +} diff --git a/src/serialization/types/ComponentInstanceNodePropertyOverridesWritePropertyOverridesItem.ts b/src/serialization/types/ComponentInstanceNodePropertyOverridesWritePropertyOverridesItem.ts new file mode 100644 index 00000000..0648f7db --- /dev/null +++ b/src/serialization/types/ComponentInstanceNodePropertyOverridesWritePropertyOverridesItem.ts @@ -0,0 +1,22 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Webflow from "../../api/index"; +import * as core from "../../core"; + +export const ComponentInstanceNodePropertyOverridesWritePropertyOverridesItem: core.serialization.ObjectSchema< + serializers.ComponentInstanceNodePropertyOverridesWritePropertyOverridesItem.Raw, + Webflow.ComponentInstanceNodePropertyOverridesWritePropertyOverridesItem +> = core.serialization.object({ + propertyId: core.serialization.string(), + text: core.serialization.string(), +}); + +export declare namespace ComponentInstanceNodePropertyOverridesWritePropertyOverridesItem { + interface Raw { + propertyId: string; + text: string; + } +} diff --git a/src/serialization/types/ComponentList.ts b/src/serialization/types/ComponentList.ts new file mode 100644 index 00000000..54f963af --- /dev/null +++ b/src/serialization/types/ComponentList.ts @@ -0,0 +1,22 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Webflow from "../../api/index"; +import * as core from "../../core"; +import { Component } from "./Component"; +import { Pagination } from "./Pagination"; + +export const ComponentList: core.serialization.ObjectSchema = + core.serialization.object({ + components: core.serialization.list(Component).optional(), + pagination: Pagination.optional(), + }); + +export declare namespace ComponentList { + interface Raw { + components?: Component.Raw[] | null; + pagination?: Pagination.Raw | null; + } +} diff --git a/src/serialization/types/ComponentNode.ts b/src/serialization/types/ComponentNode.ts new file mode 100644 index 00000000..4118e39d --- /dev/null +++ b/src/serialization/types/ComponentNode.ts @@ -0,0 +1,23 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Webflow from "../../api/index"; +import * as core from "../../core"; +import { ComponentProperty } from "./ComponentProperty"; + +export const ComponentNode: core.serialization.ObjectSchema = + core.serialization.object({ + id: core.serialization.string().optional(), + componentId: core.serialization.string().optional(), + propertyOverrides: core.serialization.list(ComponentProperty).optional(), + }); + +export declare namespace ComponentNode { + interface Raw { + id?: string | null; + componentId?: string | null; + propertyOverrides?: ComponentProperty.Raw[] | null; + } +} diff --git a/src/serialization/types/ComponentProperties.ts b/src/serialization/types/ComponentProperties.ts new file mode 100644 index 00000000..f347c485 --- /dev/null +++ b/src/serialization/types/ComponentProperties.ts @@ -0,0 +1,26 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Webflow from "../../api/index"; +import * as core from "../../core"; +import { ComponentProperty } from "./ComponentProperty"; +import { Pagination } from "./Pagination"; + +export const ComponentProperties: core.serialization.ObjectSchema< + serializers.ComponentProperties.Raw, + Webflow.ComponentProperties +> = core.serialization.object({ + componentId: core.serialization.string().optional(), + properties: core.serialization.list(ComponentProperty).optional(), + pagination: Pagination.optional(), +}); + +export declare namespace ComponentProperties { + interface Raw { + componentId?: string | null; + properties?: ComponentProperty.Raw[] | null; + pagination?: Pagination.Raw | null; + } +} diff --git a/src/serialization/types/ComponentProperty.ts b/src/serialization/types/ComponentProperty.ts new file mode 100644 index 00000000..2955104c --- /dev/null +++ b/src/serialization/types/ComponentProperty.ts @@ -0,0 +1,28 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Webflow from "../../api/index"; +import * as core from "../../core"; +import { ComponentPropertyType } from "./ComponentPropertyType"; +import { Text } from "./Text"; + +export const ComponentProperty: core.serialization.ObjectSchema< + serializers.ComponentProperty.Raw, + Webflow.ComponentProperty +> = core.serialization.object({ + propertyId: core.serialization.string().optional(), + type: ComponentPropertyType.optional(), + label: core.serialization.string().optional(), + text: Text.optional(), +}); + +export declare namespace ComponentProperty { + interface Raw { + propertyId?: string | null; + type?: ComponentPropertyType.Raw | null; + label?: string | null; + text?: Text.Raw | null; + } +} diff --git a/src/serialization/types/ComponentPropertyType.ts b/src/serialization/types/ComponentPropertyType.ts new file mode 100644 index 00000000..5ace7091 --- /dev/null +++ b/src/serialization/types/ComponentPropertyType.ts @@ -0,0 +1,16 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Webflow from "../../api/index"; +import * as core from "../../core"; + +export const ComponentPropertyType: core.serialization.Schema< + serializers.ComponentPropertyType.Raw, + Webflow.ComponentPropertyType +> = core.serialization.enum_(["Plain Text", "Rich Text", "Alt Text"]); + +export declare namespace ComponentPropertyType { + type Raw = "Plain Text" | "Rich Text" | "Alt Text"; +} diff --git a/src/serialization/types/Domain.ts b/src/serialization/types/Domain.ts index 457b0478..015dd2bb 100644 --- a/src/serialization/types/Domain.ts +++ b/src/serialization/types/Domain.ts @@ -10,11 +10,13 @@ export const Domain: core.serialization.ObjectSchema = - core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.record(core.serialization.string(), core.serialization.unknown()), - ]); - -export declare namespace ErrorDetailsItem { - type Raw = string | Record; -} diff --git a/src/serialization/types/Error_.ts b/src/serialization/types/Error_.ts index 604d9399..a07108ba 100644 --- a/src/serialization/types/Error_.ts +++ b/src/serialization/types/Error_.ts @@ -6,14 +6,13 @@ import * as serializers from "../index"; import * as Webflow from "../../api/index"; import * as core from "../../core"; import { ErrorCode } from "./ErrorCode"; -import { ErrorDetailsItem } from "./ErrorDetailsItem"; export const Error_: core.serialization.ObjectSchema = core.serialization.object({ code: ErrorCode.optional(), message: core.serialization.string().optional(), externalReference: core.serialization.string().optional(), - details: core.serialization.list(ErrorDetailsItem).optional(), + details: core.serialization.list(core.serialization.unknown()).optional(), }); export declare namespace Error_ { @@ -21,6 +20,6 @@ export declare namespace Error_ { code?: ErrorCode.Raw | null; message?: string | null; externalReference?: string | null; - details?: ErrorDetailsItem.Raw[] | null; + details?: unknown[] | null; } } diff --git a/src/serialization/types/FieldType.ts b/src/serialization/types/FieldType.ts index 62bfe5f5..0dbb2521 100644 --- a/src/serialization/types/FieldType.ts +++ b/src/serialization/types/FieldType.ts @@ -8,34 +8,34 @@ import * as core from "../../core"; export const FieldType: core.serialization.Schema = core.serialization.enum_([ - "PlainText", - "RichText", + "Color", + "DateTime", + "Email", + "ExtFileRef", "Image", - "MultiImage", - "Video", "Link", - "Email", - "Phone", + "MultiImage", "Number", - "DateTime", + "Phone", + "PlainText", + "RichText", "Switch", - "Color", - "ExtFileRef", + "Video", ]); export declare namespace FieldType { type Raw = - | "PlainText" - | "RichText" + | "Color" + | "DateTime" + | "Email" + | "ExtFileRef" | "Image" - | "MultiImage" - | "Video" | "Link" - | "Email" - | "Phone" + | "MultiImage" | "Number" - | "DateTime" + | "Phone" + | "PlainText" + | "RichText" | "Switch" - | "Color" - | "ExtFileRef"; + | "Video"; } diff --git a/src/serialization/types/ImageNode.ts b/src/serialization/types/ImageNode.ts index 0f059779..b83e26f9 100644 --- a/src/serialization/types/ImageNode.ts +++ b/src/serialization/types/ImageNode.ts @@ -5,16 +5,19 @@ import * as serializers from "../index"; import * as Webflow from "../../api/index"; import * as core from "../../core"; +import { ImageNodeImage } from "./ImageNodeImage"; export const ImageNode: core.serialization.ObjectSchema = core.serialization.object({ - alt: core.serialization.string().optional(), - assetId: core.serialization.string().optional(), + id: core.serialization.string().optional(), + image: ImageNodeImage.optional(), + attributes: core.serialization.record(core.serialization.string(), core.serialization.string()).optional(), }); export declare namespace ImageNode { interface Raw { - alt?: string | null; - assetId?: string | null; + id?: string | null; + image?: ImageNodeImage.Raw | null; + attributes?: Record | null; } } diff --git a/src/serialization/types/ImageNodeImage.ts b/src/serialization/types/ImageNodeImage.ts new file mode 100644 index 00000000..05cd07c2 --- /dev/null +++ b/src/serialization/types/ImageNodeImage.ts @@ -0,0 +1,20 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Webflow from "../../api/index"; +import * as core from "../../core"; + +export const ImageNodeImage: core.serialization.ObjectSchema = + core.serialization.object({ + alt: core.serialization.string().optional(), + assetId: core.serialization.string().optional(), + }); + +export declare namespace ImageNodeImage { + interface Raw { + alt?: string | null; + assetId?: string | null; + } +} diff --git a/src/serialization/types/Node.ts b/src/serialization/types/Node.ts index 49a8f26b..311ff02b 100644 --- a/src/serialization/types/Node.ts +++ b/src/serialization/types/Node.ts @@ -5,24 +5,33 @@ import * as serializers from "../index"; import * as Webflow from "../../api/index"; import * as core from "../../core"; -import { NodeType } from "./NodeType"; import { TextNode } from "./TextNode"; import { ImageNode } from "./ImageNode"; +import { ComponentNode } from "./ComponentNode"; -export const Node: core.serialization.ObjectSchema = core.serialization.object({ - id: core.serialization.string().optional(), - type: NodeType.optional(), - text: TextNode.optional(), - image: ImageNode.optional(), - attributes: core.serialization.record(core.serialization.string(), core.serialization.string()).optional(), -}); +export const Node: core.serialization.Schema = core.serialization + .union("type", { + text: TextNode, + image: ImageNode, + "component-instance": ComponentNode, + }) + .transform({ + transform: (value) => value, + untransform: (value) => value, + }); export declare namespace Node { - interface Raw { - id?: string | null; - type?: NodeType.Raw | null; - text?: TextNode.Raw | null; - image?: ImageNode.Raw | null; - attributes?: Record | null; + type Raw = Node.Text | Node.Image | Node.ComponentInstance; + + interface Text extends TextNode.Raw { + type: "text"; + } + + interface Image extends ImageNode.Raw { + type: "image"; + } + + interface ComponentInstance extends ComponentNode.Raw { + type: "component-instance"; } } diff --git a/src/serialization/types/NodeType.ts b/src/serialization/types/NodeType.ts deleted file mode 100644 index e3e70f16..00000000 --- a/src/serialization/types/NodeType.ts +++ /dev/null @@ -1,15 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as serializers from "../index"; -import * as Webflow from "../../api/index"; -import * as core from "../../core"; - -export const NodeType: core.serialization.Schema = core.serialization.enum_( - ["text", "image"] -); - -export declare namespace NodeType { - type Raw = "text" | "image"; -} diff --git a/src/serialization/types/NotEnterprisePlanWorkspace.ts b/src/serialization/types/NotEnterprisePlanWorkspace.ts new file mode 100644 index 00000000..23ba9a43 --- /dev/null +++ b/src/serialization/types/NotEnterprisePlanWorkspace.ts @@ -0,0 +1,16 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Webflow from "../../api/index"; +import * as core from "../../core"; + +export const NotEnterprisePlanWorkspace: core.serialization.Schema< + serializers.NotEnterprisePlanWorkspace.Raw, + Webflow.NotEnterprisePlanWorkspace +> = core.serialization.unknown(); + +export declare namespace NotEnterprisePlanWorkspace { + type Raw = unknown; +} diff --git a/src/serialization/types/Redirect.ts b/src/serialization/types/Redirect.ts new file mode 100644 index 00000000..1f7e72cf --- /dev/null +++ b/src/serialization/types/Redirect.ts @@ -0,0 +1,22 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Webflow from "../../api/index"; +import * as core from "../../core"; + +export const Redirect: core.serialization.ObjectSchema = + core.serialization.object({ + id: core.serialization.string().optional(), + fromUrl: core.serialization.string().optional(), + toUrl: core.serialization.string().optional(), + }); + +export declare namespace Redirect { + interface Raw { + id?: string | null; + fromUrl?: string | null; + toUrl?: string | null; + } +} diff --git a/src/serialization/types/Redirects.ts b/src/serialization/types/Redirects.ts new file mode 100644 index 00000000..b8481248 --- /dev/null +++ b/src/serialization/types/Redirects.ts @@ -0,0 +1,22 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Webflow from "../../api/index"; +import * as core from "../../core"; +import { Redirect } from "./Redirect"; +import { Pagination } from "./Pagination"; + +export const Redirects: core.serialization.ObjectSchema = + core.serialization.object({ + redirects: core.serialization.list(Redirect).optional(), + pagination: Pagination.optional(), + }); + +export declare namespace Redirects { + interface Raw { + redirects?: Redirect.Raw[] | null; + pagination?: Pagination.Raw | null; + } +} diff --git a/src/serialization/types/SitePlan.ts b/src/serialization/types/SitePlan.ts new file mode 100644 index 00000000..37dca864 --- /dev/null +++ b/src/serialization/types/SitePlan.ts @@ -0,0 +1,24 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Webflow from "../../api/index"; +import * as core from "../../core"; +import { SitePlanId } from "./SitePlanId"; +import { SitePlanName } from "./SitePlanName"; + +export const SitePlan: core.serialization.ObjectSchema = + core.serialization.object({ + id: SitePlanId.optional(), + name: SitePlanName.optional(), + pricingInfo: core.serialization.string().optional(), + }); + +export declare namespace SitePlan { + interface Raw { + id?: SitePlanId.Raw | null; + name?: SitePlanName.Raw | null; + pricingInfo?: string | null; + } +} diff --git a/src/serialization/types/SitePlanId.ts b/src/serialization/types/SitePlanId.ts new file mode 100644 index 00000000..f6c32dd5 --- /dev/null +++ b/src/serialization/types/SitePlanId.ts @@ -0,0 +1,39 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Webflow from "../../api/index"; +import * as core from "../../core"; + +export const SitePlanId: core.serialization.Schema = + core.serialization.enum_([ + "hosting-basic-v3", + "hosting-cms-v3", + "hosting-business-v3", + "hosting-ecommerce-standard-v2", + "hosting-ecommerce-plus-v2", + "hosting-ecommerce-advanced-v2", + "hosting-basic-v4", + "hosting-cms-v4", + "hosting-business-v4", + "hosting-ecommerce-standard-v3", + "hosting-ecommerce-plus-v3", + "hosting-ecommerce-advanced-v3", + ]); + +export declare namespace SitePlanId { + type Raw = + | "hosting-basic-v3" + | "hosting-cms-v3" + | "hosting-business-v3" + | "hosting-ecommerce-standard-v2" + | "hosting-ecommerce-plus-v2" + | "hosting-ecommerce-advanced-v2" + | "hosting-basic-v4" + | "hosting-cms-v4" + | "hosting-business-v4" + | "hosting-ecommerce-standard-v3" + | "hosting-ecommerce-plus-v3" + | "hosting-ecommerce-advanced-v3"; +} diff --git a/src/serialization/types/SitePlanName.ts b/src/serialization/types/SitePlanName.ts new file mode 100644 index 00000000..870550ad --- /dev/null +++ b/src/serialization/types/SitePlanName.ts @@ -0,0 +1,27 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Webflow from "../../api/index"; +import * as core from "../../core"; + +export const SitePlanName: core.serialization.Schema = + core.serialization.enum_([ + "Basic Hosting", + "CMS Hosting", + "Business Hosting", + "ECommerce Standard Hosting", + "ECommerce Plus Hosting", + "ECommerce Advanced Hosting", + ]); + +export declare namespace SitePlanName { + type Raw = + | "Basic Hosting" + | "CMS Hosting" + | "Business Hosting" + | "ECommerce Standard Hosting" + | "ECommerce Plus Hosting" + | "ECommerce Advanced Hosting"; +} diff --git a/src/serialization/types/Text.ts b/src/serialization/types/Text.ts new file mode 100644 index 00000000..df4ffe6b --- /dev/null +++ b/src/serialization/types/Text.ts @@ -0,0 +1,19 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Webflow from "../../api/index"; +import * as core from "../../core"; + +export const Text: core.serialization.ObjectSchema = core.serialization.object({ + html: core.serialization.string().optional(), + text: core.serialization.string().optional(), +}); + +export declare namespace Text { + interface Raw { + html?: string | null; + text?: string | null; + } +} diff --git a/src/serialization/types/TextNode.ts b/src/serialization/types/TextNode.ts index abf03e06..b97e6956 100644 --- a/src/serialization/types/TextNode.ts +++ b/src/serialization/types/TextNode.ts @@ -5,16 +5,19 @@ import * as serializers from "../index"; import * as Webflow from "../../api/index"; import * as core from "../../core"; +import { TextNodeText } from "./TextNodeText"; export const TextNode: core.serialization.ObjectSchema = core.serialization.object({ - html: core.serialization.string().optional(), - text: core.serialization.string().optional(), + id: core.serialization.string().optional(), + text: TextNodeText.optional(), + attributes: core.serialization.record(core.serialization.string(), core.serialization.string()).optional(), }); export declare namespace TextNode { interface Raw { - html?: string | null; - text?: string | null; + id?: string | null; + text?: TextNodeText.Raw | null; + attributes?: Record | null; } } diff --git a/src/serialization/types/TextNodeText.ts b/src/serialization/types/TextNodeText.ts new file mode 100644 index 00000000..d83f5aae --- /dev/null +++ b/src/serialization/types/TextNodeText.ts @@ -0,0 +1,20 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Webflow from "../../api/index"; +import * as core from "../../core"; + +export const TextNodeText: core.serialization.ObjectSchema = + core.serialization.object({ + html: core.serialization.string().optional(), + text: core.serialization.string().optional(), + }); + +export declare namespace TextNodeText { + interface Raw { + html?: string | null; + text?: string | null; + } +} diff --git a/src/serialization/types/TextNodeWrite.ts b/src/serialization/types/TextNodeWrite.ts new file mode 100644 index 00000000..2c961026 --- /dev/null +++ b/src/serialization/types/TextNodeWrite.ts @@ -0,0 +1,20 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Webflow from "../../api/index"; +import * as core from "../../core"; + +export const TextNodeWrite: core.serialization.ObjectSchema = + core.serialization.object({ + nodeId: core.serialization.string(), + text: core.serialization.string(), + }); + +export declare namespace TextNodeWrite { + interface Raw { + nodeId: string; + text: string; + } +} diff --git a/src/serialization/types/index.ts b/src/serialization/types/index.ts index cd6788c7..7e2d33ff 100644 --- a/src/serialization/types/index.ts +++ b/src/serialization/types/index.ts @@ -1,9 +1,8 @@ -export * from "./BadRequestErrorBody"; export * from "./ForbiddenErrorBody"; +export * from "./BadRequestErrorBody"; export * from "./ConflictErrorBody"; export * from "./AuthorizedUser"; export * from "./ErrorCode"; -export * from "./ErrorDetailsItem"; export * from "./Error_"; export * from "./Application"; export * from "./AuthorizationAuthorizationAuthorizedTo"; @@ -14,18 +13,24 @@ export * from "./Locale"; export * from "./Locales"; export * from "./SiteDataCollectionType"; export * from "./Site"; +export * from "./InvalidScopes"; +export * from "./NotEnterprisePlanWorkspace"; export * from "./Sites"; +export * from "./NotEnterprisePlanSite"; export * from "./Domains"; export * from "./InvalidDomain"; export * from "./NoDomains"; +export * from "./Redirect"; +export * from "./Pagination"; +export * from "./Redirects"; +export * from "./SitePlanId"; +export * from "./SitePlanName"; +export * from "./SitePlan"; export * from "./SiteActivityLogItemEvent"; export * from "./SiteActivityLogItemResourceOperation"; export * from "./SiteActivityLogItemUser"; export * from "./SiteActivityLogItem"; -export * from "./Pagination"; export * from "./SiteActivityLogResponse"; -export * from "./InvalidScopes"; -export * from "./NotEnterprisePlanSite"; export * from "./CollectionListArrayItem"; export * from "./CollectionList"; export * from "./FieldType"; @@ -48,11 +53,23 @@ export * from "./PageSeo"; export * from "./PageOpenGraph"; export * from "./Page"; export * from "./PageList"; +export * from "./TextNodeText"; export * from "./TextNode"; +export * from "./ImageNodeImage"; export * from "./ImageNode"; -export * from "./NodeType"; +export * from "./Text"; +export * from "./ComponentPropertyType"; +export * from "./ComponentProperty"; +export * from "./ComponentNode"; export * from "./Node"; export * from "./Dom"; +export * from "./TextNodeWrite"; +export * from "./ComponentInstanceNodePropertyOverridesWritePropertyOverridesItem"; +export * from "./ComponentInstanceNodePropertyOverridesWrite"; +export * from "./Component"; +export * from "./ComponentList"; +export * from "./ComponentDom"; +export * from "./ComponentProperties"; export * from "./ScriptApplyLocation"; export * from "./ScriptApply"; export * from "./ScriptApplyList"; diff --git a/src/version.ts b/src/version.ts index af16f128..8bccdd42 100644 --- a/src/version.ts +++ b/src/version.ts @@ -1 +1 @@ -export const SDK_VERSION = "3.0.2"; +export const SDK_VERSION = "3.1.0"; diff --git a/yarn.lock b/yarn.lock index 525154e7..85689b11 100644 --- a/yarn.lock +++ b/yarn.lock @@ -19,10 +19,10 @@ js-tokens "^4.0.0" picocolors "^1.0.0" -"@babel/compat-data@^7.25.9": - version "7.26.3" - resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.26.3.tgz#99488264a56b2aded63983abd6a417f03b92ed02" - integrity sha512-nHIxvKPniQXpmQLb0vhY3VaFb3S0YrTAwpOWJZh1wn3oJPjJk9Asva204PsBdmAE8vpzfHudT8DB0scYvy9q0g== +"@babel/compat-data@^7.26.5": + version "7.26.5" + resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.26.5.tgz#df93ac37f4417854130e21d72c66ff3d4b897fc7" + integrity sha512-XvcZi1KWf88RVbF9wn8MN6tYFloU5qX8KjuF3E1PVBmJ9eypXfs4GRiJwLuTZL0iSnJUKn1BFPa5BPZZJyFzPg== "@babel/core@^7.11.6", "@babel/core@^7.12.3", "@babel/core@^7.23.9": version "7.26.0" @@ -45,23 +45,23 @@ json5 "^2.2.3" semver "^6.3.1" -"@babel/generator@^7.26.0", "@babel/generator@^7.26.3", "@babel/generator@^7.7.2": - version "7.26.3" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.26.3.tgz#ab8d4360544a425c90c248df7059881f4b2ce019" - integrity sha512-6FF/urZvD0sTeO7k6/B15pMLC4CHUv1426lzr3N01aHJTl046uCAh9LXW/fzeXXjPNCJ6iABW5XaWOsIZB93aQ== +"@babel/generator@^7.26.0", "@babel/generator@^7.26.5", "@babel/generator@^7.7.2": + version "7.26.5" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.26.5.tgz#e44d4ab3176bbcaf78a5725da5f1dc28802a9458" + integrity sha512-2caSP6fN9I7HOe6nqhtft7V4g7/V/gfDsC3Ag4W7kEzzvRGKqiv0pu0HogPiZ3KaVSoNDhUws6IJjDjpfmYIXw== dependencies: - "@babel/parser" "^7.26.3" - "@babel/types" "^7.26.3" + "@babel/parser" "^7.26.5" + "@babel/types" "^7.26.5" "@jridgewell/gen-mapping" "^0.3.5" "@jridgewell/trace-mapping" "^0.3.25" jsesc "^3.0.2" "@babel/helper-compilation-targets@^7.25.9": - version "7.25.9" - resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.25.9.tgz#55af025ce365be3cdc0c1c1e56c6af617ce88875" - integrity sha512-j9Db8Suy6yV/VHa4qzrj9yZfZxhLWQdVnRlXxmKLYlhWUVB1sB2G5sxuWYXk/whHD9iW76PmNzxZ4UCnTQTVEQ== + version "7.26.5" + resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.26.5.tgz#75d92bb8d8d51301c0d49e52a65c9a7fe94514d8" + integrity sha512-IXuyn5EkouFJscIDuFF5EsiSolseme1s0CZB+QxVugqJLYmKdxI1VfIBOst0SUu4rnk2Z7kqTwmoO1lp3HIfnA== dependencies: - "@babel/compat-data" "^7.25.9" + "@babel/compat-data" "^7.26.5" "@babel/helper-validator-option" "^7.25.9" browserslist "^4.24.0" lru-cache "^5.1.1" @@ -85,9 +85,9 @@ "@babel/traverse" "^7.25.9" "@babel/helper-plugin-utils@^7.0.0", "@babel/helper-plugin-utils@^7.10.4", "@babel/helper-plugin-utils@^7.12.13", "@babel/helper-plugin-utils@^7.14.5", "@babel/helper-plugin-utils@^7.25.9", "@babel/helper-plugin-utils@^7.8.0": - version "7.25.9" - resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.25.9.tgz#9cbdd63a9443a2c92a725cca7ebca12cc8dd9f46" - integrity sha512-kSMlyUVdWe25rEsRGviIgOWnoT/nfABVWlqt9N19/dIPWViAOW2s9wznP5tURbs/IDuNk4gPy3YdYRgH3uxhBw== + version "7.26.5" + resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.26.5.tgz#18580d00c9934117ad719392c4f6585c9333cc35" + integrity sha512-RS+jZcRdZdRFzMyr+wcsaqOmld1/EqTghfaBGQQd/WnRdzdlvSZ//kF7U8VQTxf1ynZ4cjUcYgjVGx13ewNPMg== "@babel/helper-string-parser@^7.25.9": version "7.25.9" @@ -112,12 +112,12 @@ "@babel/template" "^7.25.9" "@babel/types" "^7.26.0" -"@babel/parser@^7.1.0", "@babel/parser@^7.14.7", "@babel/parser@^7.20.7", "@babel/parser@^7.23.9", "@babel/parser@^7.25.9", "@babel/parser@^7.26.0", "@babel/parser@^7.26.3": - version "7.26.3" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.26.3.tgz#8c51c5db6ddf08134af1ddbacf16aaab48bac234" - integrity sha512-WJ/CvmY8Mea8iDXo6a7RK2wbmJITT5fN3BEkRuFlxVyNx8jOKIIhmC4fSkTcPcf8JyavbBwIe6OpiCOBXt/IcA== +"@babel/parser@^7.1.0", "@babel/parser@^7.14.7", "@babel/parser@^7.20.7", "@babel/parser@^7.23.9", "@babel/parser@^7.25.9", "@babel/parser@^7.26.0", "@babel/parser@^7.26.5": + version "7.26.5" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.26.5.tgz#6fec9aebddef25ca57a935c86dbb915ae2da3e1f" + integrity sha512-SRJ4jYmXRqV1/Xc+TIVG84WjHBXKlxO9sHQnA2Pf12QQEAp1LOh6kDzNHXcUnbH1QI0FDoPPVOt+vyUDucxpaw== dependencies: - "@babel/types" "^7.26.3" + "@babel/types" "^7.26.5" "@babel/plugin-syntax-async-generators@^7.8.4": version "7.8.4" @@ -248,22 +248,22 @@ "@babel/types" "^7.25.9" "@babel/traverse@^7.25.9": - version "7.26.4" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.26.4.tgz#ac3a2a84b908dde6d463c3bfa2c5fdc1653574bd" - integrity sha512-fH+b7Y4p3yqvApJALCPJcwb0/XaOSgtK4pzV6WVjPR5GLFQBRI7pfoX2V2iM48NXvX07NUxxm1Vw98YjqTcU5w== + version "7.26.5" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.26.5.tgz#6d0be3e772ff786456c1a37538208286f6e79021" + integrity sha512-rkOSPOw+AXbgtwUga3U4u8RpoK9FEFWBNAlTpcnkLFjL5CT+oyHNuUUC/xx6XefEJ16r38r8Bc/lfp6rYuHeJQ== dependencies: "@babel/code-frame" "^7.26.2" - "@babel/generator" "^7.26.3" - "@babel/parser" "^7.26.3" + "@babel/generator" "^7.26.5" + "@babel/parser" "^7.26.5" "@babel/template" "^7.25.9" - "@babel/types" "^7.26.3" + "@babel/types" "^7.26.5" debug "^4.3.1" globals "^11.1.0" -"@babel/types@^7.0.0", "@babel/types@^7.20.7", "@babel/types@^7.25.9", "@babel/types@^7.26.0", "@babel/types@^7.26.3", "@babel/types@^7.3.3": - version "7.26.3" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.26.3.tgz#37e79830f04c2b5687acc77db97fbc75fb81f3c0" - integrity sha512-vN5p+1kl59GVKMvTHt55NzzmYVxprfJD+ql7U9NFIfKCBkYE55LYtS+WtPlaYOyzydrKI8Nezd+aZextrd+FMA== +"@babel/types@^7.0.0", "@babel/types@^7.20.7", "@babel/types@^7.25.9", "@babel/types@^7.26.0", "@babel/types@^7.26.5", "@babel/types@^7.3.3": + version "7.26.5" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.26.5.tgz#7a1e1c01d28e26d1fe7f8ec9567b3b92b9d07747" + integrity sha512-L6mZmwFDK6Cjh1nRCLXpa6no13ZIioJDz7mdkzHv399pThrTa/k0nUlNaenOeh2kWu/iaOQYElEpKPUswUa9Vg== dependencies: "@babel/helper-string-parser" "^7.25.9" "@babel/helper-validator-identifier" "^7.25.9" @@ -513,7 +513,7 @@ resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz#3188bcb273a414b0d215fd22a58540b989b9409a" integrity sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ== -"@jridgewell/trace-mapping@^0.3.12", "@jridgewell/trace-mapping@^0.3.18", "@jridgewell/trace-mapping@^0.3.20", "@jridgewell/trace-mapping@^0.3.24", "@jridgewell/trace-mapping@^0.3.25": +"@jridgewell/trace-mapping@^0.3.12", "@jridgewell/trace-mapping@^0.3.18", "@jridgewell/trace-mapping@^0.3.24", "@jridgewell/trace-mapping@^0.3.25": version "0.3.25" resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz#15f190e98895f3fc23276ee14bc76b675c2e50f0" integrity sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ== @@ -642,7 +642,7 @@ "@types/tough-cookie" "*" parse5 "^7.0.0" -"@types/json-schema@*", "@types/json-schema@^7.0.8": +"@types/json-schema@*", "@types/json-schema@^7.0.8", "@types/json-schema@^7.0.9": version "7.0.15" resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.15.tgz#596a1747233694d50f6ad8a7869fcb6f56cf5841" integrity sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA== @@ -656,9 +656,9 @@ form-data "^4.0.0" "@types/node@*": - version "22.10.2" - resolved "https://registry.yarnpkg.com/@types/node/-/node-22.10.2.tgz#a485426e6d1fdafc7b0d4c7b24e2c78182ddabb9" - integrity sha512-Xxr6BBRCAOQixvonOye19wnzyDiUtTeqldOOmj3CkeblonbccA12PFwlufvRdrpjXxqnmUaeiU5EOA+7s5diUQ== + version "22.10.5" + resolved "https://registry.yarnpkg.com/@types/node/-/node-22.10.5.tgz#95af89a3fb74a2bb41ef9927f206e6472026e48b" + integrity sha512-F8Q+SeGimwOo86fiovQh8qiXfFEh2/ocYv7tU5pJ3EXMSSxk1Joj5wefpFK2fHTf/N6HKGSxIDBT9f3gCxXPkQ== dependencies: undici-types "~6.20.0" @@ -877,11 +877,25 @@ agent-base@6: dependencies: debug "4" +ajv-formats@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/ajv-formats/-/ajv-formats-2.1.1.tgz#6e669400659eb74973bbf2e33327180a0996b520" + integrity sha512-Wx0Kx52hxE7C18hkMEggYlEifqWZtYaRgouJor+WMdPnQyEK13vgEWyVNup7SoeeoLMsr4kf5h6dOW11I15MUA== + dependencies: + ajv "^8.0.0" + ajv-keywords@^3.5.2: version "3.5.2" resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-3.5.2.tgz#31f29da5ab6e00d1c2d329acf7b5929614d5014d" integrity sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ== +ajv-keywords@^5.1.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-5.1.0.tgz#69d4d385a4733cdbeab44964a1170a88f87f0e16" + integrity sha512-YCS/JNFAUyr5vAuhk1DWm1CBxRHW9LbJ2ozWeemrIqpbsqKjHVxYPyi5GC0rjZIT5JxJ3virVTS8wk4i/Z+krw== + dependencies: + fast-deep-equal "^3.1.3" + ajv@^6.12.5: version "6.12.6" resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4" @@ -892,6 +906,16 @@ ajv@^6.12.5: json-schema-traverse "^0.4.1" uri-js "^4.2.2" +ajv@^8.0.0, ajv@^8.9.0: + version "8.17.1" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-8.17.1.tgz#37d9a5c776af6bc92d7f4f9510eba4c0a60d11a6" + integrity sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g== + dependencies: + fast-deep-equal "^3.1.3" + fast-uri "^3.0.1" + json-schema-traverse "^1.0.0" + require-from-string "^2.0.2" + ansi-escapes@^4.2.1: version "4.3.2" resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-4.3.2.tgz#6b2291d1db7d98b6521d5f1efa42d0f3a9feb65e" @@ -1025,13 +1049,13 @@ braces@^3.0.3: fill-range "^7.1.1" browserslist@^4.24.0: - version "4.24.2" - resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.24.2.tgz#f5845bc91069dbd55ee89faf9822e1d885d16580" - integrity sha512-ZIc+Q62revdMcqC6aChtW4jz3My3klmCO1fEmINZY/8J3EpBg5/A/D0AKmBveUh6pgoeycoMkVMko84tuYS+Gg== + version "4.24.4" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.24.4.tgz#c6b2865a3f08bcb860a0e827389003b9fe686e4b" + integrity sha512-KDi1Ny1gSePi1vm0q4oxSF8b4DR44GF4BbmS2YdhPLOEqd8pDviZOGH/GsmRwoWJ2+5Lr085X7naowMwKHDG1A== dependencies: - caniuse-lite "^1.0.30001669" - electron-to-chromium "^1.5.41" - node-releases "^2.0.18" + caniuse-lite "^1.0.30001688" + electron-to-chromium "^1.5.73" + node-releases "^2.0.19" update-browserslist-db "^1.1.1" bs-logger@0.x: @@ -1061,7 +1085,7 @@ buffer@^6.0.3: base64-js "^1.3.1" ieee754 "^1.2.1" -call-bind-apply-helpers@^1.0.0, call-bind-apply-helpers@^1.0.1: +call-bind-apply-helpers@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.1.tgz#32e5892e6361b29b0b545ba6f7763378daca2840" integrity sha512-BhYE+WDaywFg2TBWYNXAE+8B1ATnThNBqXHP5nQu0jWJdVvY2hvkpyB3qOmtmDePiS5/BDQ8wASEWGMWRG148g== @@ -1069,23 +1093,13 @@ call-bind-apply-helpers@^1.0.0, call-bind-apply-helpers@^1.0.1: es-errors "^1.3.0" function-bind "^1.1.2" -call-bind@^1.0.8: - version "1.0.8" - resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.8.tgz#0736a9660f537e3388826f440d5ec45f744eaa4c" - integrity sha512-oKlSFMcMwpUg2ednkhQ454wfWiU/ul3CkJe/PEHcTKuiX6RpbehUiFMXu13HalGZxfUwCQzZG747YXBn1im9ww== - dependencies: - call-bind-apply-helpers "^1.0.0" - es-define-property "^1.0.0" - get-intrinsic "^1.2.4" - set-function-length "^1.2.2" - call-bound@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/call-bound/-/call-bound-1.0.2.tgz#9dbd4daf9f5f753bec3e4c8fbb8a2ecc4de6c39b" - integrity sha512-0lk0PHFe/uz0vl527fG9CgdE9WdafjDbCXvBbs+LUv000TVt2Jjhqbs4Jwm8gz070w8xXyEAxrPOMullsxXeGg== + version "1.0.3" + resolved "https://registry.yarnpkg.com/call-bound/-/call-bound-1.0.3.tgz#41cfd032b593e39176a71533ab4f384aa04fd681" + integrity sha512-YTd+6wGlNlPxSuri7Y6X8tY2dmm12UMH66RpKMhiX6rsk5wXXnYgbUcOt8kiS31/AjfoTOvCsE+w8nZQLQnzHA== dependencies: - call-bind "^1.0.8" - get-intrinsic "^1.2.5" + call-bind-apply-helpers "^1.0.1" + get-intrinsic "^1.2.6" callsites@^3.0.0: version "3.1.0" @@ -1102,10 +1116,10 @@ camelcase@^6.2.0: resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.3.0.tgz#5685b95eb209ac9c0c177467778c9c84df58ba9a" integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA== -caniuse-lite@^1.0.30001669: - version "1.0.30001688" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001688.tgz#f9d3ede749f083ce0db4c13db9d828adaf2e8d0a" - integrity sha512-Nmqpru91cuABu/DTCXbM2NSRHzM2uVHfPnhJ/1zEAJx/ILBRVmz3pzH4N7DZqbdG0gWClsCC05Oj0mJ/1AWMbA== +caniuse-lite@^1.0.30001688: + version "1.0.30001692" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001692.tgz#4585729d95e6b95be5b439da6ab55250cd125bf9" + integrity sha512-A95VKan0kdtrsnMubMKxEKUKImOPSuCpYgxSQBo036P5YYgVIcOYJEgt/txJWqObiRQeISNCfef9nvlQ0vbV7A== chalk@^4.0.0, chalk@^4.1.0: version "4.1.2" @@ -1258,15 +1272,6 @@ deepmerge@^4.2.2: resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-4.3.1.tgz#44b5f2147cd3b00d4b56137685966f26fd25dd4a" integrity sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A== -define-data-property@^1.1.4: - version "1.1.4" - resolved "https://registry.yarnpkg.com/define-data-property/-/define-data-property-1.1.4.tgz#894dc141bb7d3060ae4366f6a0107e68fbe48c5e" - integrity sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A== - dependencies: - es-define-property "^1.0.0" - es-errors "^1.3.0" - gopd "^1.0.1" - delayed-stream@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" @@ -1289,19 +1294,19 @@ domexception@^4.0.0: dependencies: webidl-conversions "^7.0.0" -dunder-proto@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/dunder-proto/-/dunder-proto-1.0.0.tgz#c2fce098b3c8f8899554905f4377b6d85dabaa80" - integrity sha512-9+Sj30DIu+4KvHqMfLUGLFYL2PkURSYMVXJyXe92nFRvlYq5hBjLEhblKB+vkd/WVlUYMWigiY07T91Fkk0+4A== +dunder-proto@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/dunder-proto/-/dunder-proto-1.0.1.tgz#d7ae667e1dc83482f8b70fd0f6eefc50da30f58a" + integrity sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A== dependencies: - call-bind-apply-helpers "^1.0.0" + call-bind-apply-helpers "^1.0.1" es-errors "^1.3.0" gopd "^1.2.0" -electron-to-chromium@^1.5.41: - version "1.5.73" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.5.73.tgz#f32956ce40947fa3c8606726a96cd8fb5bb5f720" - integrity sha512-8wGNxG9tAG5KhGd3eeA0o6ixhiNdgr0DcHWm85XPCphwZgD1lIEoi6t3VERayWao7SF7AAZTw6oARGJeVjH8Kg== +electron-to-chromium@^1.5.73: + version "1.5.80" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.5.80.tgz#ca7a8361d7305f0ec9e203ce4e633cbb8a8ef1b1" + integrity sha512-LTrKpW0AqIuHwmlVNV+cjFYTnXtM9K37OGhpe0ZI10ScPSxqVSryZHIY3WnCS5NSYbBODRTZyhRMS2h5FAEqAw== emittery@^0.13.1: version "0.13.1" @@ -1314,9 +1319,9 @@ emoji-regex@^8.0.0: integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== enhanced-resolve@^5.0.0, enhanced-resolve@^5.17.1: - version "5.17.1" - resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.17.1.tgz#67bfbbcc2f81d511be77d686a90267ef7f898a15" - integrity sha512-LMHl3dXhTcfv8gM4kEzIUeTQ+7fpdA0l2tUf34BddXPkz2A5xJ5L/Pchd5BL6rdccM9QGvu0sWZzK1Z1t4wwyg== + version "5.18.0" + resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.18.0.tgz#91eb1db193896b9801251eeff1c6980278b1e404" + integrity sha512-0/r0MySGYG8YqlayBZ6MuCfECmHFdJ5qyPh8s8wa5Hnm6SaFLSK1VYCbj+NKp090Nm1caZhD+QTnmxO7esYGyQ== dependencies: graceful-fs "^4.2.4" tapable "^2.2.0" @@ -1333,7 +1338,7 @@ error-ex@^1.3.1: dependencies: is-arrayish "^0.2.1" -es-define-property@^1.0.0, es-define-property@^1.0.1: +es-define-property@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/es-define-property/-/es-define-property-1.0.1.tgz#983eb2f9a6724e9303f61addf011c72e09e0b0fa" integrity sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g== @@ -1344,9 +1349,9 @@ es-errors@^1.3.0: integrity sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw== es-module-lexer@^1.2.1: - version "1.5.4" - resolved "https://registry.yarnpkg.com/es-module-lexer/-/es-module-lexer-1.5.4.tgz#a8efec3a3da991e60efa6b633a7cad6ab8d26b78" - integrity sha512-MVNK56NiMrOwitFB7cqDwq0CQutbw+0BvLshJSse0MUNU+y1FC3bUS/AQg7oUng+/wKrrki7JfmwtVHkVfPLlw== + version "1.6.0" + resolved "https://registry.yarnpkg.com/es-module-lexer/-/es-module-lexer-1.6.0.tgz#da49f587fd9e68ee2404fe4e256c0c7d3a81be21" + integrity sha512-qqnD1yMU6tk/jnaMosogGySTZP8YtUgAffA9nMN+E/rjxcfRQ6IEk7IiozUjgxKoFHBGjTLnrHB/YC45r/59EQ== es-object-atoms@^1.0.0: version "1.0.0" @@ -1452,7 +1457,7 @@ expect@^29.0.0, expect@^29.7.0: jest-message-util "^29.7.0" jest-util "^29.7.0" -fast-deep-equal@^3.1.1: +fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3: version "3.1.3" resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== @@ -1462,6 +1467,11 @@ fast-json-stable-stringify@2.x, fast-json-stable-stringify@^2.0.0, fast-json-sta resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== +fast-uri@^3.0.1: + version "3.0.5" + resolved "https://registry.yarnpkg.com/fast-uri/-/fast-uri-3.0.5.tgz#19f5f9691d0dab9b85861a7bb5d98fca961da9cd" + integrity sha512-5JnBCWpFlMo0a3ciDy/JckMzzv1U9coZrIhedq+HXxxUfDTAiS0LA8OKVao4G9BxmCVck/jtA5r3KAtRWEyD8Q== + fb-watchman@^2.0.0: version "2.0.2" resolved "https://registry.yarnpkg.com/fb-watchman/-/fb-watchman-2.0.2.tgz#e9524ee6b5c77e9e5001af0f85f3adbb8623255c" @@ -1523,27 +1533,35 @@ get-caller-file@^2.0.5: resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== -get-intrinsic@^1.2.4, get-intrinsic@^1.2.5: - version "1.2.6" - resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.2.6.tgz#43dd3dd0e7b49b82b2dfcad10dc824bf7fc265d5" - integrity sha512-qxsEs+9A+u85HhllWJJFicJfPDhRmjzoYdl64aMWW9yRIJmSyxdn8IEkuIM530/7T+lv0TIHd8L6Q/ra0tEoeA== +get-intrinsic@^1.2.5, get-intrinsic@^1.2.6: + version "1.2.7" + resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.2.7.tgz#dcfcb33d3272e15f445d15124bc0a216189b9044" + integrity sha512-VW6Pxhsrk0KAOqs3WEd0klDiF/+V7gQOpAvY1jVU/LHmaD/kQO4523aiJuikX/QAKYiW6x8Jh+RJej1almdtCA== dependencies: call-bind-apply-helpers "^1.0.1" - dunder-proto "^1.0.0" es-define-property "^1.0.1" es-errors "^1.3.0" es-object-atoms "^1.0.0" function-bind "^1.1.2" + get-proto "^1.0.0" gopd "^1.2.0" has-symbols "^1.1.0" hasown "^2.0.2" - math-intrinsics "^1.0.0" + math-intrinsics "^1.1.0" get-package-type@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/get-package-type/-/get-package-type-0.1.0.tgz#8de2d803cff44df3bc6c456e6668b36c3926e11a" integrity sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q== +get-proto@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/get-proto/-/get-proto-1.0.1.tgz#150b3f2743869ef3e851ec0c49d15b1d14d00ee1" + integrity sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g== + dependencies: + dunder-proto "^1.0.1" + es-object-atoms "^1.0.0" + get-stream@^6.0.0: version "6.0.1" resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-6.0.1.tgz#a262d8eef67aced57c2852ad6167526a43cbf7b7" @@ -1571,7 +1589,7 @@ globals@^11.1.0: resolved "https://registry.yarnpkg.com/globals/-/globals-11.12.0.tgz#ab8795338868a0babd8525758018c2a7eb95c42e" integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA== -gopd@^1.0.1, gopd@^1.2.0: +gopd@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/gopd/-/gopd-1.2.0.tgz#89f56b8217bdbc8802bd299df6d7f1081d7e51a1" integrity sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg== @@ -1586,13 +1604,6 @@ has-flag@^4.0.0: resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== -has-property-descriptors@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz#963ed7d071dc7bf5f084c5bfbe0d1b6222586854" - integrity sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg== - dependencies: - es-define-property "^1.0.0" - has-symbols@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.1.0.tgz#fc9c6a783a084951d0b971fe1018de813707a338" @@ -1682,10 +1693,10 @@ is-arrayish@^0.2.1: resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" integrity sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg== -is-core-module@^2.13.0: - version "2.15.1" - resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.15.1.tgz#a7363a25bee942fefab0de13bf6aa372c82dcc37" - integrity sha512-z0vtXSwucUJtANQWldhbtbt7BnL0vxiFjIdDLAatwhDYty2bad6s+rijD6Ri4YuYJubLzIJLUidCh09e1djEVQ== +is-core-module@^2.16.0: + version "2.16.1" + resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.16.1.tgz#2a98801a849f43e2add644fbb6bc6229b19a4ef4" + integrity sha512-UfoeMA6fIJ8wTYFEUjelnaGI67v6+N7qXJEvQuIGa99l4xsCruSYOVSQ0uPANn4dAzm8lkYPaKLrrijLq7x23w== dependencies: hasown "^2.0.2" @@ -2218,6 +2229,11 @@ json-schema-traverse@^0.4.1: resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg== +json-schema-traverse@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz#ae7bcb3656ab77a73ba5c49bf654f38e6b6860e2" + integrity sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug== + json5@^2.2.3: version "2.2.3" resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.3.tgz#78cd6f1a19bdc12b73db5ad0c61efd66c1e29283" @@ -2281,10 +2297,10 @@ makeerror@1.0.12: dependencies: tmpl "1.0.5" -math-intrinsics@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/math-intrinsics/-/math-intrinsics-1.0.0.tgz#4e04bf87c85aa51e90d078dac2252b4eb5260817" - integrity sha512-4MqMiKP90ybymYvsut0CH2g4XWbfLtmlCkXmtmdcDCxNB+mQcu1w/1+L/VD7vi/PSv7X2JYV7SCcR+jiPXnQtA== +math-intrinsics@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/math-intrinsics/-/math-intrinsics-1.1.0.tgz#a0dd74be81e2aa5c2f27e65ce283605ee4e2b7f9" + integrity sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g== merge-stream@^2.0.0: version "2.0.0" @@ -2350,7 +2366,7 @@ node-int64@^0.4.0: resolved "https://registry.yarnpkg.com/node-int64/-/node-int64-0.4.0.tgz#87a9065cdb355d3182d8f94ce11188b825c68a3b" integrity sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw== -node-releases@^2.0.18: +node-releases@^2.0.19: version "2.0.19" resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.19.tgz#9e445a52950951ec4d177d843af370b411caf314" integrity sha512-xxOWJsBKtzAq7DY0J+DTzuz58K8e7sJbdgwkbMWQe8UYB6ekmsQ45q0M/tJDsGaZmbC+l7n57UV8Hl5tHxO9uw== @@ -2454,7 +2470,7 @@ path-parse@^1.0.7: resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735" integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw== -picocolors@^1.0.0, picocolors@^1.1.0: +picocolors@^1.0.0, picocolors@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.1.1.tgz#3d321af3eab939b083c8f929a1d12cda81c26b6b" integrity sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA== @@ -2545,9 +2561,9 @@ react-is@^18.0.0: integrity sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg== readable-stream@^4.5.2: - version "4.5.2" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-4.5.2.tgz#9e7fc4c45099baeed934bff6eb97ba6cf2729e09" - integrity sha512-yjavECdqeZ3GLXNgRXgeQEdz9fvDDkNKyHnbHRFtOr7/LcfgBcmct7t/ET+HaCTqfh06OzoAxrkN/IfjJBVe+g== + version "4.7.0" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-4.7.0.tgz#cedbd8a1146c13dfff8dab14068028d58c15ac91" + integrity sha512-oIGGmcpTLwPga8Bn6/Z75SVaH1z5dUut2ibSyAMVhmUggWpmDn2dapB0n7f8nwaSiRtepAsfJyfXIO5DCVAODg== dependencies: abort-controller "^3.0.0" buffer "^6.0.3" @@ -2560,6 +2576,11 @@ require-directory@^2.1.1: resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" integrity sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q== +require-from-string@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/require-from-string/-/require-from-string-2.0.2.tgz#89a7fdd938261267318eafe14f9c32e598c36909" + integrity sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw== + requires-port@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/requires-port/-/requires-port-1.0.0.tgz#925d2601d39ac485e091cf0da5c6e694dc3dcaff" @@ -2583,11 +2604,11 @@ resolve.exports@^2.0.0: integrity sha512-OcXjMsGdhL4XnbShKpAcSqPMzQoYkYyhbEaeSko47MjRP9NfEQMhZkXL1DoFlt9LWQn4YttrdnV6X2OiyzBi+A== resolve@^1.20.0: - version "1.22.8" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.8.tgz#b6c87a9f2aa06dfab52e3d70ac8cde321fa5a48d" - integrity sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw== + version "1.22.10" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.10.tgz#b663e83ffb09bbf2386944736baae803029b8b39" + integrity sha512-NPRy+/ncIMeDlTAsuqwKIiferiawhefFJtkNSW0qZJEqMEb+qBt/77B/jGeeek+F0uOeN05CDa6HXbbIgtVX4w== dependencies: - is-core-module "^2.13.0" + is-core-module "^2.16.0" path-parse "^1.0.7" supports-preserve-symlinks-flag "^1.0.0" @@ -2613,7 +2634,7 @@ saxes@^6.0.0: dependencies: xmlchars "^2.2.0" -schema-utils@^3.1.1, schema-utils@^3.2.0: +schema-utils@^3.2.0: version "3.3.0" resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-3.3.0.tgz#f50a88877c3c01652a15b622ae9e9795df7a60fe" integrity sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg== @@ -2622,6 +2643,16 @@ schema-utils@^3.1.1, schema-utils@^3.2.0: ajv "^6.12.5" ajv-keywords "^3.5.2" +schema-utils@^4.3.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-4.3.0.tgz#3b669f04f71ff2dfb5aba7ce2d5a9d79b35622c0" + integrity sha512-Gf9qqc58SpCA/xdziiHz35F4GNIWYWZrEshUc/G/r5BnLph6xpKuLeoJoQuj5WfBIx/eQLf+hmVPYHaxJu7V2g== + dependencies: + "@types/json-schema" "^7.0.9" + ajv "^8.9.0" + ajv-formats "^2.1.1" + ajv-keywords "^5.1.0" + semver@^6.3.0, semver@^6.3.1: version "6.3.1" resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.1.tgz#556d2ef8689146e46dcea4bfdd095f3434dffcb4" @@ -2632,25 +2663,13 @@ semver@^7.3.4, semver@^7.5.3, semver@^7.5.4: resolved "https://registry.yarnpkg.com/semver/-/semver-7.6.3.tgz#980f7b5550bc175fb4dc09403085627f9eb33143" integrity sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A== -serialize-javascript@^6.0.1: +serialize-javascript@^6.0.2: version "6.0.2" resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-6.0.2.tgz#defa1e055c83bf6d59ea805d8da862254eb6a6c2" integrity sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g== dependencies: randombytes "^2.1.0" -set-function-length@^1.2.2: - version "1.2.2" - resolved "https://registry.yarnpkg.com/set-function-length/-/set-function-length-1.2.2.tgz#aac72314198eaed975cf77b2c3b6b880695e5449" - integrity sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg== - dependencies: - define-data-property "^1.1.4" - es-errors "^1.3.0" - function-bind "^1.1.2" - get-intrinsic "^1.2.4" - gopd "^1.0.1" - has-property-descriptors "^1.0.2" - shebang-command@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-2.0.0.tgz#ccd0af4f8835fbdc265b82461aaf0c36663f34ea" @@ -2832,17 +2851,17 @@ tapable@^2.1.1, tapable@^2.2.0: integrity sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ== terser-webpack-plugin@^5.3.10: - version "5.3.10" - resolved "https://registry.yarnpkg.com/terser-webpack-plugin/-/terser-webpack-plugin-5.3.10.tgz#904f4c9193c6fd2a03f693a2150c62a92f40d199" - integrity sha512-BKFPWlPDndPs+NGGCr1U59t0XScL5317Y0UReNrHaw9/FwhPENlq6bfgs+4yPfyP51vqC1bQ4rp1EfXW5ZSH9w== + version "5.3.11" + resolved "https://registry.yarnpkg.com/terser-webpack-plugin/-/terser-webpack-plugin-5.3.11.tgz#93c21f44ca86634257cac176f884f942b7ba3832" + integrity sha512-RVCsMfuD0+cTt3EwX8hSl2Ks56EbFHWmhluwcqoPKtBnfjiT6olaq7PRIRfhyU8nnC2MrnDrBLfrD/RGE+cVXQ== dependencies: - "@jridgewell/trace-mapping" "^0.3.20" + "@jridgewell/trace-mapping" "^0.3.25" jest-worker "^27.4.5" - schema-utils "^3.1.1" - serialize-javascript "^6.0.1" - terser "^5.26.0" + schema-utils "^4.3.0" + serialize-javascript "^6.0.2" + terser "^5.31.1" -terser@^5.26.0: +terser@^5.31.1: version "5.37.0" resolved "https://registry.yarnpkg.com/terser/-/terser-5.37.0.tgz#38aa66d1cfc43d0638fab54e43ff8a4f72a21ba3" integrity sha512-B8wRRkmre4ERucLM/uXx4MOV5cbnOlVAqUst+1+iLKPI0dOgFO28f84ptoQt9HEI537PMzfYa/d+GEPKTRXmYA== @@ -2910,9 +2929,9 @@ ts-jest@29.1.1: yargs-parser "^21.0.1" ts-loader@^9.3.1: - version "9.5.1" - resolved "https://registry.yarnpkg.com/ts-loader/-/ts-loader-9.5.1.tgz#63d5912a86312f1fbe32cef0859fb8b2193d9b89" - integrity sha512-rNH3sK9kGZcH9dYzC7CewQm4NtxJTjSEVRJ2DyBZR7f8/wcta+iV44UPCXc5+nzDzivKtlzV6c9P4e+oFhDLYg== + version "9.5.2" + resolved "https://registry.yarnpkg.com/ts-loader/-/ts-loader-9.5.2.tgz#1f3d7f4bb709b487aaa260e8f19b301635d08020" + integrity sha512-Qo4piXvOTWcMGIgRiuFa6nHNm+54HbYaZCKqc9eeZCLRy3XqafQgwX2F7mofrbJG3g7EEb+lkiR+z2Lic2s3Zw== dependencies: chalk "^4.1.0" enhanced-resolve "^5.0.0" @@ -2946,12 +2965,12 @@ universalify@^0.2.0: integrity sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg== update-browserslist-db@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.1.1.tgz#80846fba1d79e82547fb661f8d141e0945755fe5" - integrity sha512-R8UzCaa9Az+38REPiJ1tXlImTJXlVfgHZsglwBD/k6nj76ctsH1E3q4doGrukiLQd3sGQYu56r5+lo5r94l29A== + version "1.1.2" + resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.1.2.tgz#97e9c96ab0ae7bcac08e9ae5151d26e6bc6b5580" + integrity sha512-PPypAm5qvlD7XMZC3BujecnaOxwhrtoFR+Dqkk5Aa/6DssiH0ibKoketaj9w8LP7Bont1rYeoV5plxD7RTEPRg== dependencies: escalade "^3.2.0" - picocolors "^1.1.0" + picocolors "^1.1.1" uri-js@^4.2.2: version "4.4.1"