webflow-api 3.0.1 → 3.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.mock/definition/__package__.yml +526 -221
- package/.mock/definition/accessGroups.yml +3 -3
- package/.mock/definition/assets.yml +10 -9
- package/.mock/definition/collections/fields.yml +16 -14
- package/.mock/definition/collections/items.yml +168 -35
- package/.mock/definition/collections.yml +6 -5
- package/.mock/definition/components.yml +486 -0
- package/.mock/definition/ecommerce.yml +2 -2
- package/.mock/definition/forms.yml +7 -6
- package/.mock/definition/inventory.yml +6 -4
- package/.mock/definition/orders.yml +11 -9
- package/.mock/definition/pages/scripts.yml +18 -17
- package/.mock/definition/pages.yml +91 -64
- package/.mock/definition/products.yml +9 -9
- package/.mock/definition/scripts.yml +12 -16
- package/.mock/definition/sites/activityLogs.yml +2 -2
- package/.mock/definition/sites/plans.yml +40 -0
- package/.mock/definition/sites/redirects.yml +190 -0
- package/.mock/definition/sites/scripts.yml +16 -21
- package/.mock/definition/sites.yml +202 -6
- package/.mock/definition/token.yml +5 -4
- package/.mock/definition/users.yml +8 -8
- package/.mock/definition/webhooks.yml +9 -9
- package/.mock/fern.config.json +1 -1
- package/Client.d.ts +3 -0
- package/Client.js +25 -20
- package/api/errors/index.d.ts +1 -1
- package/api/errors/index.js +1 -1
- package/api/resources/accessGroups/client/Client.js +1 -1
- package/api/resources/assets/client/Client.d.ts +5 -0
- package/api/resources/assets/client/Client.js +13 -8
- package/api/resources/collections/client/Client.d.ts +3 -0
- package/api/resources/collections/client/Client.js +7 -4
- package/api/resources/collections/resources/fields/client/Client.js +3 -3
- package/api/resources/collections/resources/fields/types/FieldCreateType.d.ts +11 -10
- package/api/resources/collections/resources/fields/types/FieldCreateType.js +10 -9
- package/api/resources/collections/resources/items/client/Client.d.ts +8 -5
- package/api/resources/collections/resources/items/client/Client.js +26 -21
- package/api/resources/collections/resources/items/types/ItemsCreateItemLiveRequest.d.ts +1 -1
- package/api/resources/collections/resources/items/types/MultipleItems.d.ts +2 -2
- package/api/resources/collections/resources/items/types/MultipleLiveItems.d.ts +8 -0
- package/api/resources/collections/resources/items/types/index.d.ts +1 -0
- package/api/resources/collections/resources/items/types/index.js +1 -0
- package/api/resources/components/client/Client.d.ts +176 -0
- package/api/resources/components/client/Client.js +670 -0
- package/api/resources/components/client/index.d.ts +1 -0
- package/api/resources/components/client/index.js +17 -0
- package/api/resources/components/client/requests/ComponentDomWrite.d.ts +34 -0
- package/api/resources/components/client/requests/ComponentPropertiesWrite.d.ts +25 -0
- package/api/resources/components/client/requests/ComponentsGetContentRequest.d.ts +28 -0
- package/api/resources/components/client/requests/ComponentsGetPropertiesRequest.d.ts +23 -0
- package/api/resources/components/client/requests/ComponentsListRequest.d.ts +17 -0
- package/api/resources/components/client/requests/index.d.ts +5 -0
- package/api/resources/components/client/requests/index.js +2 -0
- package/api/resources/components/index.d.ts +2 -0
- package/api/resources/components/index.js +18 -0
- package/api/resources/components/types/ComponentDomWriteNodesItem.d.ts +5 -0
- package/api/resources/components/types/ComponentDomWriteNodesItem.js +5 -0
- package/api/resources/components/types/ComponentPropertiesWritePropertiesItem.d.ts +16 -0
- package/api/resources/components/types/ComponentPropertiesWritePropertiesItem.js +5 -0
- package/api/resources/components/types/ComponentsUpdateContentResponse.d.ts +7 -0
- package/api/resources/components/types/ComponentsUpdateContentResponse.js +5 -0
- package/api/resources/components/types/ComponentsUpdatePropertiesResponse.d.ts +7 -0
- package/api/resources/components/types/ComponentsUpdatePropertiesResponse.js +5 -0
- package/api/resources/components/types/index.d.ts +4 -0
- package/api/resources/components/types/index.js +20 -0
- package/api/resources/ecommerce/client/Client.js +1 -1
- package/api/resources/forms/client/Client.d.ts +3 -0
- package/api/resources/forms/client/Client.js +8 -5
- package/api/resources/index.d.ts +3 -0
- package/api/resources/index.js +4 -1
- package/api/resources/inventory/client/Client.d.ts +3 -1
- package/api/resources/inventory/client/Client.js +5 -3
- package/api/resources/orders/client/Client.d.ts +3 -0
- package/api/resources/orders/client/Client.js +9 -6
- package/api/resources/pages/client/Client.d.ts +26 -10
- package/api/resources/pages/client/Client.js +32 -18
- package/api/resources/pages/client/requests/PageDomWrite.d.ts +34 -0
- package/api/resources/pages/client/requests/PageDomWrite.js +5 -0
- package/api/resources/pages/client/requests/index.d.ts +1 -1
- package/api/resources/pages/resources/scripts/client/Client.d.ts +6 -3
- package/api/resources/pages/resources/scripts/client/Client.js +11 -6
- package/api/resources/pages/types/PageDomWriteNodesItem.d.ts +5 -0
- package/api/resources/pages/types/PageDomWriteNodesItem.js +5 -0
- package/api/resources/pages/types/index.d.ts +1 -1
- package/api/resources/pages/types/index.js +1 -1
- package/api/resources/products/client/Client.d.ts +5 -6
- package/api/resources/products/client/Client.js +11 -12
- package/api/resources/scripts/client/Client.d.ts +3 -3
- package/api/resources/scripts/client/Client.js +6 -6
- package/api/resources/sites/client/Client.d.ts +70 -0
- package/api/resources/sites/client/Client.js +330 -9
- package/api/resources/sites/client/requests/SitesCreateRequest.d.ts +17 -0
- package/api/resources/sites/client/requests/SitesCreateRequest.js +5 -0
- package/api/resources/sites/client/requests/SitesUpdateRequest.d.ts +13 -0
- package/api/resources/sites/client/requests/SitesUpdateRequest.js +5 -0
- package/api/resources/sites/client/requests/index.d.ts +2 -0
- package/api/resources/sites/resources/activityLogs/client/Client.d.ts +1 -1
- package/api/resources/sites/resources/activityLogs/client/Client.js +2 -2
- package/api/resources/sites/resources/index.d.ts +2 -0
- package/api/resources/sites/resources/index.js +3 -1
- package/api/resources/sites/resources/plans/client/Client.d.ts +45 -0
- package/api/resources/sites/resources/plans/client/Client.js +155 -0
- package/api/resources/sites/resources/plans/client/index.d.ts +1 -0
- package/api/resources/sites/resources/plans/client/index.js +2 -0
- package/api/resources/sites/resources/plans/index.d.ts +1 -0
- package/api/resources/sites/resources/plans/index.js +17 -0
- package/api/resources/sites/resources/redirects/client/Client.d.ts +115 -0
- package/api/resources/sites/resources/redirects/client/Client.js +472 -0
- package/api/resources/sites/resources/redirects/client/index.d.ts +1 -0
- package/api/resources/sites/resources/redirects/client/index.js +2 -0
- package/api/resources/sites/resources/redirects/index.d.ts +1 -0
- package/api/resources/sites/resources/redirects/index.js +17 -0
- package/api/resources/sites/resources/scripts/client/Client.d.ts +4 -4
- package/api/resources/sites/resources/scripts/client/Client.js +8 -8
- package/api/resources/token/client/Client.d.ts +2 -1
- package/api/resources/token/client/Client.js +4 -3
- package/api/resources/users/client/Client.d.ts +1 -1
- package/api/resources/users/client/Client.js +6 -6
- package/api/resources/webhooks/client/Client.d.ts +4 -1
- package/api/resources/webhooks/client/Client.js +8 -5
- package/api/types/CollectionItem.d.ts +5 -1
- package/api/types/CollectionItemPostSingle.d.ts +7 -3
- package/api/types/Component.d.ts +18 -0
- package/api/types/Component.js +5 -0
- package/api/types/ComponentDom.d.ts +13 -0
- package/api/types/ComponentDom.js +5 -0
- package/api/types/ComponentInstanceNodePropertyOverridesWrite.d.ts +13 -0
- package/api/types/ComponentInstanceNodePropertyOverridesWrite.js +5 -0
- package/api/types/ComponentInstanceNodePropertyOverridesWritePropertyOverridesItem.d.ts +14 -0
- package/api/types/ComponentInstanceNodePropertyOverridesWritePropertyOverridesItem.js +5 -0
- package/api/types/ComponentList.d.ts +11 -0
- package/api/types/ComponentList.js +5 -0
- package/api/types/ComponentNode.d.ts +15 -0
- package/api/types/ComponentNode.js +5 -0
- package/api/types/ComponentProperties.d.ts +13 -0
- package/api/types/ComponentProperties.js +5 -0
- package/api/types/ComponentProperty.d.ts +17 -0
- package/api/types/ComponentProperty.js +5 -0
- package/api/types/ComponentPropertyType.d.ts +12 -0
- package/api/types/ComponentPropertyType.js +11 -0
- package/api/types/Dom.d.ts +1 -1
- package/api/types/Domain.d.ts +2 -0
- package/api/types/Error_.d.ts +1 -1
- package/api/types/FieldType.d.ts +10 -10
- package/api/types/FieldType.js +9 -9
- package/api/types/ImageNode.d.ts +6 -2
- package/api/types/ImageNodeImage.d.ts +7 -0
- package/api/types/ImageNodeImage.js +5 -0
- package/api/types/Node.d.ts +11 -8
- package/api/types/{ErrorDetailsItem.d.ts → NotEnterprisePlanWorkspace.d.ts} +1 -1
- package/api/types/NotEnterprisePlanWorkspace.js +5 -0
- package/api/types/ProductFieldData.d.ts +1 -1
- package/api/types/Redirect.d.ts +14 -0
- package/api/types/Redirect.js +5 -0
- package/api/types/Redirects.d.ts +12 -0
- package/api/types/Redirects.js +5 -0
- package/api/types/ScriptApply.d.ts +1 -1
- package/api/types/SitePlan.d.ts +12 -0
- package/api/types/SitePlan.js +5 -0
- package/api/types/SitePlanId.d.ts +21 -0
- package/api/types/SitePlanId.js +20 -0
- package/api/types/SitePlanName.d.ts +15 -0
- package/api/types/SitePlanName.js +14 -0
- package/api/types/Text.d.ts +9 -0
- package/api/types/Text.js +5 -0
- package/api/types/TextNode.d.ts +7 -3
- package/api/types/TextNodeText.d.ts +9 -0
- package/api/types/TextNodeText.js +5 -0
- package/api/{resources/pages/types/DomWriteNodesItem.d.ts → types/TextNodeWrite.d.ts} +4 -1
- package/api/types/TextNodeWrite.js +5 -0
- package/api/types/TriggerType.d.ts +15 -15
- package/api/types/UserAccessGroupsItem.d.ts +2 -3
- package/api/types/UserAccessGroupsItemType.d.ts +2 -3
- package/api/types/index.d.ts +23 -6
- package/api/types/index.js +23 -6
- package/dist/Client.d.ts +3 -0
- package/dist/Client.js +25 -20
- package/dist/api/errors/index.d.ts +1 -1
- package/dist/api/errors/index.js +1 -1
- package/dist/api/resources/accessGroups/client/Client.js +1 -1
- package/dist/api/resources/assets/client/Client.d.ts +5 -0
- package/dist/api/resources/assets/client/Client.js +13 -8
- package/dist/api/resources/collections/client/Client.d.ts +3 -0
- package/dist/api/resources/collections/client/Client.js +7 -4
- package/dist/api/resources/collections/resources/fields/client/Client.js +3 -3
- package/dist/api/resources/collections/resources/fields/types/FieldCreateType.d.ts +11 -10
- package/dist/api/resources/collections/resources/fields/types/FieldCreateType.js +10 -9
- package/dist/api/resources/collections/resources/items/client/Client.d.ts +8 -5
- package/dist/api/resources/collections/resources/items/client/Client.js +26 -21
- package/dist/api/resources/collections/resources/items/types/ItemsCreateItemLiveRequest.d.ts +1 -1
- package/dist/api/resources/collections/resources/items/types/MultipleItems.d.ts +2 -2
- package/dist/api/resources/collections/resources/items/types/MultipleLiveItems.d.ts +8 -0
- package/dist/api/resources/collections/resources/items/types/MultipleLiveItems.js +5 -0
- package/dist/api/resources/collections/resources/items/types/index.d.ts +1 -0
- package/dist/api/resources/collections/resources/items/types/index.js +1 -0
- package/dist/api/resources/components/client/Client.d.ts +176 -0
- package/dist/api/resources/components/client/Client.js +670 -0
- package/dist/api/resources/components/client/index.d.ts +1 -0
- package/dist/api/resources/components/client/index.js +17 -0
- package/dist/api/resources/components/client/requests/ComponentDomWrite.d.ts +34 -0
- package/dist/api/resources/components/client/requests/ComponentDomWrite.js +5 -0
- package/dist/api/resources/components/client/requests/ComponentPropertiesWrite.d.ts +25 -0
- package/dist/api/resources/components/client/requests/ComponentPropertiesWrite.js +5 -0
- package/dist/api/resources/components/client/requests/ComponentsGetContentRequest.d.ts +28 -0
- package/dist/api/resources/components/client/requests/ComponentsGetContentRequest.js +5 -0
- package/dist/api/resources/components/client/requests/ComponentsGetPropertiesRequest.d.ts +23 -0
- package/dist/api/resources/components/client/requests/ComponentsGetPropertiesRequest.js +5 -0
- package/dist/api/resources/components/client/requests/ComponentsListRequest.d.ts +17 -0
- package/dist/api/resources/components/client/requests/ComponentsListRequest.js +5 -0
- package/dist/api/resources/components/client/requests/index.d.ts +5 -0
- package/dist/api/resources/components/client/requests/index.js +2 -0
- package/dist/api/resources/components/index.d.ts +2 -0
- package/dist/api/resources/components/index.js +18 -0
- package/dist/api/resources/components/types/ComponentDomWriteNodesItem.d.ts +5 -0
- package/dist/api/resources/components/types/ComponentDomWriteNodesItem.js +5 -0
- package/dist/api/resources/components/types/ComponentPropertiesWritePropertiesItem.d.ts +16 -0
- package/dist/api/resources/components/types/ComponentPropertiesWritePropertiesItem.js +5 -0
- package/dist/api/resources/components/types/ComponentsUpdateContentResponse.d.ts +7 -0
- package/dist/api/resources/components/types/ComponentsUpdateContentResponse.js +5 -0
- package/dist/api/resources/components/types/ComponentsUpdatePropertiesResponse.d.ts +7 -0
- package/dist/api/resources/components/types/ComponentsUpdatePropertiesResponse.js +5 -0
- package/dist/api/resources/components/types/index.d.ts +4 -0
- package/dist/api/resources/components/types/index.js +20 -0
- package/dist/api/resources/ecommerce/client/Client.js +1 -1
- package/dist/api/resources/forms/client/Client.d.ts +3 -0
- package/dist/api/resources/forms/client/Client.js +8 -5
- package/dist/api/resources/index.d.ts +3 -0
- package/dist/api/resources/index.js +4 -1
- package/dist/api/resources/inventory/client/Client.d.ts +3 -1
- package/dist/api/resources/inventory/client/Client.js +5 -3
- package/dist/api/resources/orders/client/Client.d.ts +3 -0
- package/dist/api/resources/orders/client/Client.js +9 -6
- package/dist/api/resources/pages/client/Client.d.ts +26 -10
- package/dist/api/resources/pages/client/Client.js +32 -18
- package/dist/api/resources/pages/client/requests/PageDomWrite.d.ts +34 -0
- package/dist/api/resources/pages/client/requests/PageDomWrite.js +5 -0
- package/dist/api/resources/pages/client/requests/index.d.ts +1 -1
- package/dist/api/resources/pages/resources/scripts/client/Client.d.ts +6 -3
- package/dist/api/resources/pages/resources/scripts/client/Client.js +11 -6
- package/dist/api/resources/pages/types/PageDomWriteNodesItem.d.ts +5 -0
- package/dist/api/resources/pages/types/PageDomWriteNodesItem.js +5 -0
- package/dist/api/resources/pages/types/index.d.ts +1 -1
- package/dist/api/resources/pages/types/index.js +1 -1
- package/dist/api/resources/products/client/Client.d.ts +5 -6
- package/dist/api/resources/products/client/Client.js +11 -12
- package/dist/api/resources/scripts/client/Client.d.ts +3 -3
- package/dist/api/resources/scripts/client/Client.js +6 -6
- package/dist/api/resources/sites/client/Client.d.ts +70 -0
- package/dist/api/resources/sites/client/Client.js +330 -9
- package/dist/api/resources/sites/client/requests/SitesCreateRequest.d.ts +17 -0
- package/dist/api/resources/sites/client/requests/SitesCreateRequest.js +5 -0
- package/dist/api/resources/sites/client/requests/SitesUpdateRequest.d.ts +13 -0
- package/dist/api/resources/sites/client/requests/SitesUpdateRequest.js +5 -0
- package/dist/api/resources/sites/client/requests/index.d.ts +2 -0
- package/dist/api/resources/sites/resources/activityLogs/client/Client.d.ts +1 -1
- package/dist/api/resources/sites/resources/activityLogs/client/Client.js +2 -2
- package/dist/api/resources/sites/resources/index.d.ts +2 -0
- package/dist/api/resources/sites/resources/index.js +3 -1
- package/dist/api/resources/sites/resources/plans/client/Client.d.ts +45 -0
- package/dist/api/resources/sites/resources/plans/client/Client.js +155 -0
- package/dist/api/resources/sites/resources/plans/client/index.d.ts +1 -0
- package/dist/api/resources/sites/resources/plans/client/index.js +2 -0
- package/dist/api/resources/sites/resources/plans/index.d.ts +1 -0
- package/dist/api/resources/sites/resources/plans/index.js +17 -0
- package/dist/api/resources/sites/resources/redirects/client/Client.d.ts +115 -0
- package/dist/api/resources/sites/resources/redirects/client/Client.js +472 -0
- package/dist/api/resources/sites/resources/redirects/client/index.d.ts +1 -0
- package/dist/api/resources/sites/resources/redirects/client/index.js +2 -0
- package/dist/api/resources/sites/resources/redirects/index.d.ts +1 -0
- package/dist/api/resources/sites/resources/redirects/index.js +17 -0
- package/dist/api/resources/sites/resources/scripts/client/Client.d.ts +4 -4
- package/dist/api/resources/sites/resources/scripts/client/Client.js +8 -8
- package/dist/api/resources/token/client/Client.d.ts +2 -1
- package/dist/api/resources/token/client/Client.js +4 -3
- package/dist/api/resources/users/client/Client.d.ts +1 -1
- package/dist/api/resources/users/client/Client.js +6 -6
- package/dist/api/resources/webhooks/client/Client.d.ts +4 -1
- package/dist/api/resources/webhooks/client/Client.js +8 -5
- package/dist/api/types/CollectionItem.d.ts +5 -1
- package/dist/api/types/CollectionItemPostSingle.d.ts +7 -3
- package/dist/api/types/Component.d.ts +18 -0
- package/dist/api/types/Component.js +5 -0
- package/dist/api/types/ComponentDom.d.ts +13 -0
- package/dist/api/types/ComponentDom.js +5 -0
- package/dist/api/types/ComponentInstanceNodePropertyOverridesWrite.d.ts +13 -0
- package/dist/api/types/ComponentInstanceNodePropertyOverridesWrite.js +5 -0
- package/dist/api/types/ComponentInstanceNodePropertyOverridesWritePropertyOverridesItem.d.ts +14 -0
- package/dist/api/types/ComponentInstanceNodePropertyOverridesWritePropertyOverridesItem.js +5 -0
- package/dist/api/types/ComponentList.d.ts +11 -0
- package/dist/api/types/ComponentList.js +5 -0
- package/dist/api/types/ComponentNode.d.ts +15 -0
- package/dist/api/types/ComponentNode.js +5 -0
- package/dist/api/types/ComponentProperties.d.ts +13 -0
- package/dist/api/types/ComponentProperties.js +5 -0
- package/dist/api/types/ComponentProperty.d.ts +17 -0
- package/dist/api/types/ComponentProperty.js +5 -0
- package/dist/api/types/ComponentPropertyType.d.ts +12 -0
- package/dist/api/types/ComponentPropertyType.js +11 -0
- package/dist/api/types/Dom.d.ts +1 -1
- package/dist/api/types/Domain.d.ts +2 -0
- package/dist/api/types/Error_.d.ts +1 -1
- package/dist/api/types/FieldType.d.ts +10 -10
- package/dist/api/types/FieldType.js +9 -9
- package/dist/api/types/ImageNode.d.ts +6 -2
- package/dist/api/types/ImageNodeImage.d.ts +7 -0
- package/dist/api/types/ImageNodeImage.js +5 -0
- package/dist/api/types/Node.d.ts +11 -8
- package/dist/api/types/{ErrorDetailsItem.d.ts → NotEnterprisePlanWorkspace.d.ts} +1 -1
- package/dist/api/types/NotEnterprisePlanWorkspace.js +5 -0
- package/dist/api/types/ProductFieldData.d.ts +1 -1
- package/dist/api/types/Redirect.d.ts +14 -0
- package/dist/api/types/Redirect.js +5 -0
- package/dist/api/types/Redirects.d.ts +12 -0
- package/dist/api/types/Redirects.js +5 -0
- package/dist/api/types/ScriptApply.d.ts +1 -1
- package/dist/api/types/SitePlan.d.ts +12 -0
- package/dist/api/types/SitePlan.js +5 -0
- package/dist/api/types/SitePlanId.d.ts +21 -0
- package/dist/api/types/SitePlanId.js +20 -0
- package/dist/api/types/SitePlanName.d.ts +15 -0
- package/dist/api/types/SitePlanName.js +14 -0
- package/dist/api/types/Text.d.ts +9 -0
- package/dist/api/types/Text.js +5 -0
- package/dist/api/types/TextNode.d.ts +7 -3
- package/dist/api/types/TextNodeText.d.ts +9 -0
- package/dist/api/types/TextNodeText.js +5 -0
- package/dist/api/{resources/pages/types/DomWriteNodesItem.d.ts → types/TextNodeWrite.d.ts} +4 -1
- package/dist/api/types/TextNodeWrite.js +5 -0
- package/dist/api/types/TriggerType.d.ts +15 -15
- package/dist/api/types/UserAccessGroupsItem.d.ts +2 -3
- package/dist/api/types/UserAccessGroupsItemType.d.ts +2 -3
- package/dist/api/types/index.d.ts +23 -6
- package/dist/api/types/index.js +23 -6
- package/dist/serialization/resources/collections/resources/fields/types/FieldCreateType.d.ts +1 -1
- package/dist/serialization/resources/collections/resources/fields/types/FieldCreateType.js +10 -9
- package/dist/serialization/resources/collections/resources/items/types/ItemsCreateItemLiveRequest.d.ts +2 -2
- package/dist/serialization/resources/collections/resources/items/types/ItemsCreateItemLiveRequest.js +2 -2
- package/dist/serialization/resources/collections/resources/items/types/MultipleItems.d.ts +2 -2
- package/dist/serialization/resources/collections/resources/items/types/MultipleItems.js +2 -2
- package/dist/serialization/resources/collections/resources/items/types/MultipleLiveItems.d.ts +13 -0
- package/dist/serialization/resources/collections/resources/items/types/MultipleLiveItems.js +34 -0
- package/dist/serialization/resources/collections/resources/items/types/index.d.ts +1 -0
- package/dist/serialization/resources/collections/resources/items/types/index.js +1 -0
- package/dist/serialization/resources/components/client/index.d.ts +1 -0
- package/dist/serialization/resources/components/client/index.js +17 -0
- package/dist/serialization/resources/components/client/requests/ComponentDomWrite.d.ts +13 -0
- package/dist/serialization/resources/components/client/requests/ComponentDomWrite.js +34 -0
- package/dist/serialization/resources/components/client/requests/ComponentPropertiesWrite.d.ts +13 -0
- package/dist/serialization/resources/components/client/requests/ComponentPropertiesWrite.js +34 -0
- package/dist/serialization/resources/components/client/requests/index.d.ts +2 -0
- package/dist/serialization/resources/components/client/requests/index.js +7 -0
- package/dist/serialization/resources/components/index.d.ts +2 -0
- package/dist/serialization/resources/components/index.js +18 -0
- package/dist/serialization/resources/components/types/ComponentDomWriteNodesItem.d.ts +12 -0
- package/dist/serialization/resources/components/types/ComponentDomWriteNodesItem.js +33 -0
- package/dist/serialization/resources/components/types/ComponentPropertiesWritePropertiesItem.d.ts +13 -0
- package/dist/serialization/resources/components/types/ComponentPropertiesWritePropertiesItem.js +34 -0
- package/dist/serialization/resources/components/types/ComponentsUpdateContentResponse.d.ts +12 -0
- package/dist/serialization/resources/components/types/ComponentsUpdateContentResponse.js +33 -0
- package/dist/serialization/resources/components/types/ComponentsUpdatePropertiesResponse.d.ts +12 -0
- package/dist/serialization/resources/components/types/ComponentsUpdatePropertiesResponse.js +33 -0
- package/dist/serialization/resources/components/types/index.d.ts +4 -0
- package/dist/serialization/resources/components/types/index.js +20 -0
- package/dist/serialization/resources/index.d.ts +3 -0
- package/dist/serialization/resources/index.js +4 -1
- package/dist/serialization/resources/pages/client/requests/PageDomWrite.d.ts +13 -0
- package/dist/serialization/resources/pages/client/requests/PageDomWrite.js +34 -0
- package/dist/serialization/resources/pages/client/requests/index.d.ts +1 -1
- package/dist/serialization/resources/pages/client/requests/index.js +3 -3
- package/dist/serialization/resources/pages/types/PageDomWriteNodesItem.d.ts +12 -0
- package/dist/serialization/resources/pages/types/PageDomWriteNodesItem.js +33 -0
- package/dist/serialization/resources/pages/types/index.d.ts +1 -1
- package/dist/serialization/resources/pages/types/index.js +1 -1
- package/dist/serialization/resources/sites/client/requests/SitesCreateRequest.d.ts +14 -0
- package/dist/serialization/resources/sites/client/requests/SitesCreateRequest.js +35 -0
- package/dist/serialization/resources/sites/client/requests/SitesUpdateRequest.d.ts +13 -0
- package/{serialization/resources/pages/client/requests/DomWrite.js → dist/serialization/resources/sites/client/requests/SitesUpdateRequest.js} +4 -4
- package/dist/serialization/resources/sites/client/requests/index.d.ts +2 -0
- package/dist/serialization/resources/sites/client/requests/index.js +5 -1
- package/dist/serialization/types/Component.d.ts +16 -0
- package/dist/serialization/types/Component.js +37 -0
- package/dist/serialization/types/ComponentDom.d.ts +16 -0
- package/dist/serialization/types/ComponentDom.js +37 -0
- package/dist/serialization/types/ComponentInstanceNodePropertyOverridesWrite.d.ts +14 -0
- package/dist/serialization/types/ComponentInstanceNodePropertyOverridesWrite.js +35 -0
- package/dist/serialization/types/ComponentInstanceNodePropertyOverridesWritePropertyOverridesItem.d.ts +13 -0
- package/dist/serialization/types/ComponentInstanceNodePropertyOverridesWritePropertyOverridesItem.js +34 -0
- package/dist/serialization/types/ComponentList.d.ts +15 -0
- package/dist/serialization/types/ComponentList.js +36 -0
- package/dist/serialization/types/ComponentNode.d.ts +15 -0
- package/dist/serialization/types/ComponentNode.js +36 -0
- package/dist/serialization/types/ComponentProperties.d.ts +16 -0
- package/dist/serialization/types/ComponentProperties.js +37 -0
- package/dist/serialization/types/ComponentProperty.d.ts +17 -0
- package/dist/serialization/types/ComponentProperty.js +38 -0
- package/dist/serialization/types/ComponentPropertyType.d.ts +10 -0
- package/dist/serialization/types/{ErrorDetailsItem.js → ComponentPropertyType.js} +2 -5
- package/dist/serialization/types/Domain.d.ts +1 -0
- package/dist/serialization/types/Domain.js +1 -0
- package/dist/serialization/types/Error_.d.ts +1 -2
- package/dist/serialization/types/Error_.js +1 -2
- package/dist/serialization/types/FieldType.d.ts +1 -1
- package/dist/serialization/types/FieldType.js +9 -9
- package/dist/serialization/types/ImageNode.d.ts +4 -2
- package/dist/serialization/types/ImageNode.js +4 -2
- package/dist/serialization/types/ImageNodeImage.d.ts +13 -0
- package/{serialization/types/ErrorDetailsItem.js → dist/serialization/types/ImageNodeImage.js} +5 -5
- package/dist/serialization/types/Node.d.ts +11 -8
- package/dist/serialization/types/Node.js +10 -7
- package/dist/serialization/types/NotEnterprisePlanWorkspace.d.ts +10 -0
- package/dist/serialization/types/{NodeType.js → NotEnterprisePlanWorkspace.js} +2 -2
- package/dist/serialization/types/Redirect.d.ts +14 -0
- package/dist/serialization/types/Redirect.js +35 -0
- package/dist/serialization/types/Redirects.d.ts +15 -0
- package/dist/serialization/types/Redirects.js +36 -0
- package/dist/serialization/types/SitePlan.d.ts +16 -0
- package/dist/serialization/types/SitePlan.js +37 -0
- package/dist/serialization/types/SitePlanId.d.ts +10 -0
- package/dist/serialization/types/SitePlanId.js +44 -0
- package/dist/serialization/types/SitePlanName.d.ts +10 -0
- package/dist/serialization/types/SitePlanName.js +38 -0
- package/dist/serialization/types/Text.d.ts +13 -0
- package/dist/serialization/types/Text.js +34 -0
- package/dist/serialization/types/TextNode.d.ts +4 -2
- package/dist/serialization/types/TextNode.js +4 -2
- package/dist/serialization/types/TextNodeText.d.ts +13 -0
- package/dist/serialization/types/TextNodeText.js +34 -0
- package/dist/serialization/types/TextNodeWrite.d.ts +13 -0
- package/{serialization/resources/pages/types/DomWriteNodesItem.js → dist/serialization/types/TextNodeWrite.js} +3 -3
- package/dist/serialization/types/index.d.ts +23 -6
- package/dist/serialization/types/index.js +23 -6
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/reference.md +1844 -778
- package/serialization/resources/collections/resources/fields/types/FieldCreateType.d.ts +1 -1
- package/serialization/resources/collections/resources/fields/types/FieldCreateType.js +10 -9
- package/serialization/resources/collections/resources/items/types/ItemsCreateItemLiveRequest.d.ts +2 -2
- package/serialization/resources/collections/resources/items/types/ItemsCreateItemLiveRequest.js +2 -2
- package/serialization/resources/collections/resources/items/types/MultipleItems.d.ts +2 -2
- package/serialization/resources/collections/resources/items/types/MultipleItems.js +2 -2
- package/serialization/resources/collections/resources/items/types/MultipleLiveItems.d.ts +13 -0
- package/serialization/resources/collections/resources/items/types/MultipleLiveItems.js +34 -0
- package/serialization/resources/collections/resources/items/types/index.d.ts +1 -0
- package/serialization/resources/collections/resources/items/types/index.js +1 -0
- package/serialization/resources/components/client/index.d.ts +1 -0
- package/serialization/resources/components/client/index.js +17 -0
- package/serialization/resources/components/client/requests/ComponentDomWrite.d.ts +13 -0
- package/serialization/resources/components/client/requests/ComponentDomWrite.js +34 -0
- package/serialization/resources/components/client/requests/ComponentPropertiesWrite.d.ts +13 -0
- package/serialization/resources/components/client/requests/ComponentPropertiesWrite.js +34 -0
- package/serialization/resources/components/client/requests/index.d.ts +2 -0
- package/serialization/resources/components/client/requests/index.js +7 -0
- package/serialization/resources/components/index.d.ts +2 -0
- package/serialization/resources/components/index.js +18 -0
- package/serialization/resources/components/types/ComponentDomWriteNodesItem.d.ts +12 -0
- package/serialization/resources/components/types/ComponentDomWriteNodesItem.js +33 -0
- package/serialization/resources/components/types/ComponentPropertiesWritePropertiesItem.d.ts +13 -0
- package/serialization/resources/components/types/ComponentPropertiesWritePropertiesItem.js +34 -0
- package/serialization/resources/components/types/ComponentsUpdateContentResponse.d.ts +12 -0
- package/serialization/resources/components/types/ComponentsUpdateContentResponse.js +33 -0
- package/serialization/resources/components/types/ComponentsUpdatePropertiesResponse.d.ts +12 -0
- package/serialization/resources/components/types/ComponentsUpdatePropertiesResponse.js +33 -0
- package/serialization/resources/components/types/index.d.ts +4 -0
- package/serialization/resources/components/types/index.js +20 -0
- package/serialization/resources/index.d.ts +3 -0
- package/serialization/resources/index.js +4 -1
- package/serialization/resources/pages/client/requests/PageDomWrite.d.ts +13 -0
- package/serialization/resources/pages/client/requests/PageDomWrite.js +34 -0
- package/serialization/resources/pages/client/requests/index.d.ts +1 -1
- package/serialization/resources/pages/client/requests/index.js +3 -3
- package/serialization/resources/pages/types/PageDomWriteNodesItem.d.ts +12 -0
- package/serialization/resources/pages/types/PageDomWriteNodesItem.js +33 -0
- package/serialization/resources/pages/types/index.d.ts +1 -1
- package/serialization/resources/pages/types/index.js +1 -1
- package/serialization/resources/sites/client/requests/SitesCreateRequest.d.ts +14 -0
- package/serialization/resources/sites/client/requests/SitesCreateRequest.js +35 -0
- package/serialization/resources/sites/client/requests/SitesUpdateRequest.d.ts +13 -0
- package/{dist/serialization/resources/pages/client/requests/DomWrite.js → serialization/resources/sites/client/requests/SitesUpdateRequest.js} +4 -4
- package/serialization/resources/sites/client/requests/index.d.ts +2 -0
- package/serialization/resources/sites/client/requests/index.js +5 -1
- package/serialization/types/Component.d.ts +16 -0
- package/serialization/types/Component.js +37 -0
- package/serialization/types/ComponentDom.d.ts +16 -0
- package/serialization/types/ComponentDom.js +37 -0
- package/serialization/types/ComponentInstanceNodePropertyOverridesWrite.d.ts +14 -0
- package/serialization/types/ComponentInstanceNodePropertyOverridesWrite.js +35 -0
- package/serialization/types/ComponentInstanceNodePropertyOverridesWritePropertyOverridesItem.d.ts +13 -0
- package/serialization/types/ComponentInstanceNodePropertyOverridesWritePropertyOverridesItem.js +34 -0
- package/serialization/types/ComponentList.d.ts +15 -0
- package/serialization/types/ComponentList.js +36 -0
- package/serialization/types/ComponentNode.d.ts +15 -0
- package/serialization/types/ComponentNode.js +36 -0
- package/serialization/types/ComponentProperties.d.ts +16 -0
- package/serialization/types/ComponentProperties.js +37 -0
- package/serialization/types/ComponentProperty.d.ts +17 -0
- package/serialization/types/ComponentProperty.js +38 -0
- package/serialization/types/ComponentPropertyType.d.ts +10 -0
- package/serialization/types/ComponentPropertyType.js +31 -0
- package/serialization/types/Domain.d.ts +1 -0
- package/serialization/types/Domain.js +1 -0
- package/serialization/types/Error_.d.ts +1 -2
- package/serialization/types/Error_.js +1 -2
- package/serialization/types/FieldType.d.ts +1 -1
- package/serialization/types/FieldType.js +9 -9
- package/serialization/types/ImageNode.d.ts +4 -2
- package/serialization/types/ImageNode.js +4 -2
- package/serialization/types/ImageNodeImage.d.ts +13 -0
- package/serialization/types/ImageNodeImage.js +34 -0
- package/serialization/types/Node.d.ts +11 -8
- package/serialization/types/Node.js +10 -7
- package/serialization/types/NotEnterprisePlanWorkspace.d.ts +10 -0
- package/serialization/types/{NodeType.js → NotEnterprisePlanWorkspace.js} +2 -2
- package/serialization/types/Redirect.d.ts +14 -0
- package/serialization/types/Redirect.js +35 -0
- package/serialization/types/Redirects.d.ts +15 -0
- package/serialization/types/Redirects.js +36 -0
- package/serialization/types/SitePlan.d.ts +16 -0
- package/serialization/types/SitePlan.js +37 -0
- package/serialization/types/SitePlanId.d.ts +10 -0
- package/serialization/types/SitePlanId.js +44 -0
- package/serialization/types/SitePlanName.d.ts +10 -0
- package/serialization/types/SitePlanName.js +38 -0
- package/serialization/types/Text.d.ts +13 -0
- package/serialization/types/Text.js +34 -0
- package/serialization/types/TextNode.d.ts +4 -2
- package/serialization/types/TextNode.js +4 -2
- package/serialization/types/TextNodeText.d.ts +13 -0
- package/serialization/types/TextNodeText.js +34 -0
- package/serialization/types/TextNodeWrite.d.ts +13 -0
- package/{dist/serialization/resources/pages/types/DomWriteNodesItem.js → serialization/types/TextNodeWrite.js} +3 -3
- package/serialization/types/index.d.ts +23 -6
- package/serialization/types/index.js +23 -6
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/api/resources/pages/client/requests/DomWrite.d.ts +0 -27
- package/api/types/NodeType.d.ts +0 -8
- package/api/types/NodeType.js +0 -10
- package/dist/api/resources/pages/client/requests/DomWrite.d.ts +0 -27
- package/dist/api/types/NodeType.d.ts +0 -8
- package/dist/api/types/NodeType.js +0 -10
- package/dist/serialization/resources/pages/client/requests/DomWrite.d.ts +0 -13
- package/dist/serialization/resources/pages/types/DomWriteNodesItem.d.ts +0 -13
- package/dist/serialization/types/ErrorDetailsItem.d.ts +0 -10
- package/dist/serialization/types/NodeType.d.ts +0 -10
- package/serialization/resources/pages/client/requests/DomWrite.d.ts +0 -13
- package/serialization/resources/pages/types/DomWriteNodesItem.d.ts +0 -13
- package/serialization/types/ErrorDetailsItem.d.ts +0 -10
- package/serialization/types/NodeType.d.ts +0 -10
- /package/api/resources/{pages/client/requests/DomWrite.js → collections/resources/items/types/MultipleLiveItems.js} +0 -0
- /package/api/resources/{pages/types/DomWriteNodesItem.js → components/client/requests/ComponentDomWrite.js} +0 -0
- /package/api/{types/ErrorDetailsItem.js → resources/components/client/requests/ComponentPropertiesWrite.js} +0 -0
- /package/{dist/api/resources/pages/client/requests/DomWrite.js → api/resources/components/client/requests/ComponentsGetContentRequest.js} +0 -0
- /package/{dist/api/resources/pages/types/DomWriteNodesItem.js → api/resources/components/client/requests/ComponentsGetPropertiesRequest.js} +0 -0
- /package/{dist/api/types/ErrorDetailsItem.js → api/resources/components/client/requests/ComponentsListRequest.js} +0 -0
|
@@ -21,6 +21,9 @@ export declare namespace Pages {
|
|
|
21
21
|
headers?: Record<string, string>;
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
|
+
/**
|
|
25
|
+
* Pages are the pages in your Webflow site.
|
|
26
|
+
*/
|
|
24
27
|
export declare class Pages {
|
|
25
28
|
protected readonly _options: Pages.Options;
|
|
26
29
|
constructor(_options: Pages.Options);
|
|
@@ -112,9 +115,10 @@ export declare class Pages {
|
|
|
112
115
|
*/
|
|
113
116
|
updatePageSettings(pageId: string, request: Webflow.UpdatePageSettingsRequest, requestOptions?: Pages.RequestOptions): Promise<Webflow.Page>;
|
|
114
117
|
/**
|
|
115
|
-
* Get static content from a static page.
|
|
118
|
+
* Get static content from a static page. This includes text nodes, image nodes and component instances.
|
|
119
|
+
* To retrieve the contents of components in the page use the [get component content](/data/reference/pages-and-components/components/get-content) endpoint.
|
|
116
120
|
*
|
|
117
|
-
* 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
|
|
121
|
+
* <Note>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.</Note>
|
|
118
122
|
*
|
|
119
123
|
* Required scope | `pages:read`
|
|
120
124
|
*
|
|
@@ -136,14 +140,20 @@ export declare class Pages {
|
|
|
136
140
|
*/
|
|
137
141
|
getContent(pageId: string, request?: Webflow.PagesGetContentRequest, requestOptions?: Pages.RequestOptions): Promise<Webflow.Dom>;
|
|
138
142
|
/**
|
|
139
|
-
* This endpoint
|
|
143
|
+
* This endpoint updates content on a static page in **secondary locales**. It supports updating up to 1000 nodes in a single request.
|
|
140
144
|
*
|
|
141
|
-
*
|
|
145
|
+
* Before making updates:
|
|
146
|
+
* 1. Use the [get page content](/data/reference/pages-and-components/pages/get-content) endpoint to identify available content nodes and their types
|
|
147
|
+
* 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
|
|
148
|
+
*
|
|
149
|
+
* <Note>
|
|
150
|
+
* 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.
|
|
151
|
+
* </Note>
|
|
142
152
|
*
|
|
143
153
|
* Required scope | `pages:write`
|
|
144
154
|
*
|
|
145
155
|
* @param {string} pageId - Unique identifier for a Page
|
|
146
|
-
* @param {Webflow.
|
|
156
|
+
* @param {Webflow.PageDomWrite} request
|
|
147
157
|
* @param {Pages.RequestOptions} requestOptions - Request-specific configuration.
|
|
148
158
|
*
|
|
149
159
|
* @throws {@link Webflow.BadRequestError}
|
|
@@ -155,20 +165,26 @@ export declare class Pages {
|
|
|
155
165
|
*
|
|
156
166
|
* @example
|
|
157
167
|
* await client.pages.updateStaticContent("63c720f9347c2139b248e552", {
|
|
158
|
-
* localeId: "
|
|
168
|
+
* localeId: "localeId",
|
|
159
169
|
* nodes: [{
|
|
160
170
|
* nodeId: "a245c12d-995b-55ee-5ec7-aa36a6cad623",
|
|
161
|
-
* text: "<h1>The Hitchhiker
|
|
171
|
+
* text: "<h1>The Hitchhiker's Guide to the Galaxy</h1>"
|
|
162
172
|
* }, {
|
|
163
173
|
* nodeId: "a245c12d-995b-55ee-5ec7-aa36a6cad627",
|
|
164
|
-
* text: "<div><h3>Don
|
|
174
|
+
* text: "<div><h3>Don't Panic!</h3><p>Always know where your towel is.</p></div>"
|
|
165
175
|
* }, {
|
|
166
176
|
* nodeId: "a245c12d-995b-55ee-5ec7-aa36a6cad629",
|
|
167
|
-
*
|
|
177
|
+
* propertyOverrides: [{
|
|
178
|
+
* propertyId: "7dd14c08-2e96-8d3d-2b19-b5c03642a0f0",
|
|
179
|
+
* text: "<div><h1>Time is an <em>illusion</em></h1></div>"
|
|
180
|
+
* }, {
|
|
181
|
+
* propertyId: "7dd14c08-2e96-8d3d-2b19-b5c03642a0f1",
|
|
182
|
+
* text: "Life, the Universe and Everything"
|
|
183
|
+
* }]
|
|
168
184
|
* }]
|
|
169
185
|
* })
|
|
170
186
|
*/
|
|
171
|
-
updateStaticContent(pageId: string, request: Webflow.
|
|
187
|
+
updateStaticContent(pageId: string, request: Webflow.PageDomWrite, requestOptions?: Pages.RequestOptions): Promise<Webflow.UpdateStaticContentResponse>;
|
|
172
188
|
protected _scripts: Scripts | undefined;
|
|
173
189
|
get scripts(): Scripts;
|
|
174
190
|
protected _getAuthorizationHeader(): Promise<string>;
|
|
@@ -57,6 +57,9 @@ const url_join_1 = __importDefault(require("url-join"));
|
|
|
57
57
|
const serializers = __importStar(require("../../../../serialization/index"));
|
|
58
58
|
const errors = __importStar(require("../../../../errors/index"));
|
|
59
59
|
const Client_1 = require("../resources/scripts/client/Client");
|
|
60
|
+
/**
|
|
61
|
+
* Pages are the pages in your Webflow site.
|
|
62
|
+
*/
|
|
60
63
|
class Pages {
|
|
61
64
|
constructor(_options) {
|
|
62
65
|
this._options = _options;
|
|
@@ -98,7 +101,7 @@ class Pages {
|
|
|
98
101
|
const _response = yield core.fetcher({
|
|
99
102
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.WebflowEnvironment.Default, `sites/${encodeURIComponent(siteId)}/pages`),
|
|
100
103
|
method: "GET",
|
|
101
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.0
|
|
104
|
+
headers: Object.assign({ Authorization: yield 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 === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
102
105
|
contentType: "application/json",
|
|
103
106
|
queryParameters: _queryParams,
|
|
104
107
|
requestType: "json",
|
|
@@ -204,7 +207,7 @@ class Pages {
|
|
|
204
207
|
const _response = yield core.fetcher({
|
|
205
208
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.WebflowEnvironment.Default, `pages/${encodeURIComponent(pageId)}`),
|
|
206
209
|
method: "GET",
|
|
207
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.0
|
|
210
|
+
headers: Object.assign({ Authorization: yield 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 === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
208
211
|
contentType: "application/json",
|
|
209
212
|
queryParameters: _queryParams,
|
|
210
213
|
requestType: "json",
|
|
@@ -334,7 +337,7 @@ class Pages {
|
|
|
334
337
|
const _response = yield core.fetcher({
|
|
335
338
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.WebflowEnvironment.Default, `pages/${encodeURIComponent(pageId)}`),
|
|
336
339
|
method: "PUT",
|
|
337
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.0
|
|
340
|
+
headers: Object.assign({ Authorization: yield 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 === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
338
341
|
contentType: "application/json",
|
|
339
342
|
queryParameters: _queryParams,
|
|
340
343
|
requestType: "json",
|
|
@@ -415,9 +418,10 @@ class Pages {
|
|
|
415
418
|
});
|
|
416
419
|
}
|
|
417
420
|
/**
|
|
418
|
-
* Get static content from a static page.
|
|
421
|
+
* Get static content from a static page. This includes text nodes, image nodes and component instances.
|
|
422
|
+
* To retrieve the contents of components in the page use the [get component content](/data/reference/pages-and-components/components/get-content) endpoint.
|
|
419
423
|
*
|
|
420
|
-
* 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
|
|
424
|
+
* <Note>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.</Note>
|
|
421
425
|
*
|
|
422
426
|
* Required scope | `pages:read`
|
|
423
427
|
*
|
|
@@ -454,7 +458,7 @@ class Pages {
|
|
|
454
458
|
const _response = yield core.fetcher({
|
|
455
459
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.WebflowEnvironment.Default, `pages/${encodeURIComponent(pageId)}/dom`),
|
|
456
460
|
method: "GET",
|
|
457
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.0
|
|
461
|
+
headers: Object.assign({ Authorization: yield 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 === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
458
462
|
contentType: "application/json",
|
|
459
463
|
queryParameters: _queryParams,
|
|
460
464
|
requestType: "json",
|
|
@@ -532,14 +536,20 @@ class Pages {
|
|
|
532
536
|
});
|
|
533
537
|
}
|
|
534
538
|
/**
|
|
535
|
-
* This endpoint
|
|
539
|
+
* This endpoint updates content on a static page in **secondary locales**. It supports updating up to 1000 nodes in a single request.
|
|
536
540
|
*
|
|
537
|
-
*
|
|
541
|
+
* Before making updates:
|
|
542
|
+
* 1. Use the [get page content](/data/reference/pages-and-components/pages/get-content) endpoint to identify available content nodes and their types
|
|
543
|
+
* 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
|
|
544
|
+
*
|
|
545
|
+
* <Note>
|
|
546
|
+
* 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.
|
|
547
|
+
* </Note>
|
|
538
548
|
*
|
|
539
549
|
* Required scope | `pages:write`
|
|
540
550
|
*
|
|
541
551
|
* @param {string} pageId - Unique identifier for a Page
|
|
542
|
-
* @param {Webflow.
|
|
552
|
+
* @param {Webflow.PageDomWrite} request
|
|
543
553
|
* @param {Pages.RequestOptions} requestOptions - Request-specific configuration.
|
|
544
554
|
*
|
|
545
555
|
* @throws {@link Webflow.BadRequestError}
|
|
@@ -551,16 +561,22 @@ class Pages {
|
|
|
551
561
|
*
|
|
552
562
|
* @example
|
|
553
563
|
* await client.pages.updateStaticContent("63c720f9347c2139b248e552", {
|
|
554
|
-
* localeId: "
|
|
564
|
+
* localeId: "localeId",
|
|
555
565
|
* nodes: [{
|
|
556
566
|
* nodeId: "a245c12d-995b-55ee-5ec7-aa36a6cad623",
|
|
557
|
-
* text: "<h1>The Hitchhiker
|
|
567
|
+
* text: "<h1>The Hitchhiker's Guide to the Galaxy</h1>"
|
|
558
568
|
* }, {
|
|
559
569
|
* nodeId: "a245c12d-995b-55ee-5ec7-aa36a6cad627",
|
|
560
|
-
* text: "<div><h3>Don
|
|
570
|
+
* text: "<div><h3>Don't Panic!</h3><p>Always know where your towel is.</p></div>"
|
|
561
571
|
* }, {
|
|
562
572
|
* nodeId: "a245c12d-995b-55ee-5ec7-aa36a6cad629",
|
|
563
|
-
*
|
|
573
|
+
* propertyOverrides: [{
|
|
574
|
+
* propertyId: "7dd14c08-2e96-8d3d-2b19-b5c03642a0f0",
|
|
575
|
+
* text: "<div><h1>Time is an <em>illusion</em></h1></div>"
|
|
576
|
+
* }, {
|
|
577
|
+
* propertyId: "7dd14c08-2e96-8d3d-2b19-b5c03642a0f1",
|
|
578
|
+
* text: "Life, the Universe and Everything"
|
|
579
|
+
* }]
|
|
564
580
|
* }]
|
|
565
581
|
* })
|
|
566
582
|
*/
|
|
@@ -569,17 +585,15 @@ class Pages {
|
|
|
569
585
|
return __awaiter(this, void 0, void 0, function* () {
|
|
570
586
|
const { localeId } = request, _body = __rest(request, ["localeId"]);
|
|
571
587
|
const _queryParams = {};
|
|
572
|
-
|
|
573
|
-
_queryParams["localeId"] = localeId;
|
|
574
|
-
}
|
|
588
|
+
_queryParams["localeId"] = localeId;
|
|
575
589
|
const _response = yield core.fetcher({
|
|
576
590
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.WebflowEnvironment.Default, `pages/${encodeURIComponent(pageId)}/dom`),
|
|
577
591
|
method: "POST",
|
|
578
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.0
|
|
592
|
+
headers: Object.assign({ Authorization: yield 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 === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
579
593
|
contentType: "application/json",
|
|
580
594
|
queryParameters: _queryParams,
|
|
581
595
|
requestType: "json",
|
|
582
|
-
body: serializers.
|
|
596
|
+
body: serializers.PageDomWrite.jsonOrThrow(_body, {
|
|
583
597
|
unrecognizedObjectKeys: "passthrough",
|
|
584
598
|
allowUnrecognizedUnionMembers: true,
|
|
585
599
|
allowUnrecognizedEnumValues: true,
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as Webflow from "../../../../index";
|
|
5
|
+
/**
|
|
6
|
+
* @example
|
|
7
|
+
* {
|
|
8
|
+
* localeId: "localeId",
|
|
9
|
+
* nodes: [{
|
|
10
|
+
* nodeId: "a245c12d-995b-55ee-5ec7-aa36a6cad623",
|
|
11
|
+
* text: "<h1>The Hitchhiker's Guide to the Galaxy</h1>"
|
|
12
|
+
* }, {
|
|
13
|
+
* nodeId: "a245c12d-995b-55ee-5ec7-aa36a6cad627",
|
|
14
|
+
* text: "<div><h3>Don't Panic!</h3><p>Always know where your towel is.</p></div>"
|
|
15
|
+
* }, {
|
|
16
|
+
* nodeId: "a245c12d-995b-55ee-5ec7-aa36a6cad629",
|
|
17
|
+
* propertyOverrides: [{
|
|
18
|
+
* propertyId: "7dd14c08-2e96-8d3d-2b19-b5c03642a0f0",
|
|
19
|
+
* text: "<div><h1>Time is an <em>illusion</em></h1></div>"
|
|
20
|
+
* }, {
|
|
21
|
+
* propertyId: "7dd14c08-2e96-8d3d-2b19-b5c03642a0f1",
|
|
22
|
+
* text: "Life, the Universe and Everything"
|
|
23
|
+
* }]
|
|
24
|
+
* }]
|
|
25
|
+
* }
|
|
26
|
+
*/
|
|
27
|
+
export interface PageDomWrite {
|
|
28
|
+
/**
|
|
29
|
+
* The locale identifier.
|
|
30
|
+
*/
|
|
31
|
+
localeId: string;
|
|
32
|
+
/** List of DOM Nodes with the new content that will be updated in each node. */
|
|
33
|
+
nodes: Webflow.PageDomWriteNodesItem[];
|
|
34
|
+
}
|
|
@@ -2,4 +2,4 @@ export { type PagesListRequest } from "./PagesListRequest";
|
|
|
2
2
|
export { type PagesGetMetadataRequest } from "./PagesGetMetadataRequest";
|
|
3
3
|
export { type UpdatePageSettingsRequest } from "./UpdatePageSettingsRequest";
|
|
4
4
|
export { type PagesGetContentRequest } from "./PagesGetContentRequest";
|
|
5
|
-
export { type
|
|
5
|
+
export { type PageDomWrite } from "./PageDomWrite";
|
|
@@ -30,7 +30,7 @@ export declare class Scripts {
|
|
|
30
30
|
* to a Site via the `registered_scripts` endpoints, and then applied to a Site or Page using the appropriate
|
|
31
31
|
* `custom_code` endpoints.
|
|
32
32
|
*
|
|
33
|
-
* <
|
|
33
|
+
* <Note>Access to this endpoint requires a bearer token from a [Data Client App](/data/docs/getting-started-data-clients).</Note>
|
|
34
34
|
*
|
|
35
35
|
* Required scope | `custom_code:read`
|
|
36
36
|
*
|
|
@@ -54,7 +54,9 @@ export declare class Scripts {
|
|
|
54
54
|
* to a Site via the `registered_scripts` endpoints, and then applied to a Site or Page using the appropriate
|
|
55
55
|
* `custom_code` endpoints.
|
|
56
56
|
*
|
|
57
|
-
*
|
|
57
|
+
* A site can have a maximum of 800 registered scripts.
|
|
58
|
+
*
|
|
59
|
+
* <Note>Access to this endpoint requires a bearer token from a [Data Client App](/data/docs/getting-started-data-clients).</Note>
|
|
58
60
|
*
|
|
59
61
|
* Required scope | `custom_code:write`
|
|
60
62
|
*
|
|
@@ -65,6 +67,7 @@ export declare class Scripts {
|
|
|
65
67
|
* @throws {@link Webflow.BadRequestError}
|
|
66
68
|
* @throws {@link Webflow.UnauthorizedError}
|
|
67
69
|
* @throws {@link Webflow.NotFoundError}
|
|
70
|
+
* @throws {@link Webflow.ConflictError}
|
|
68
71
|
* @throws {@link Webflow.TooManyRequestsError}
|
|
69
72
|
* @throws {@link Webflow.InternalServerError}
|
|
70
73
|
*
|
|
@@ -92,7 +95,7 @@ export declare class Scripts {
|
|
|
92
95
|
* to a Site via the `registered_scripts` endpoints, and then applied to a Site or Page using the appropriate
|
|
93
96
|
* `custom_code` endpoints.
|
|
94
97
|
*
|
|
95
|
-
* <
|
|
98
|
+
* <Note>Access to this endpoint requires a bearer token from a [Data Client App](/data/docs/getting-started-data-clients).</Note>
|
|
96
99
|
*
|
|
97
100
|
* Required scope | `custom_code:write`
|
|
98
101
|
*
|
|
@@ -56,7 +56,7 @@ class Scripts {
|
|
|
56
56
|
* to a Site via the `registered_scripts` endpoints, and then applied to a Site or Page using the appropriate
|
|
57
57
|
* `custom_code` endpoints.
|
|
58
58
|
*
|
|
59
|
-
* <
|
|
59
|
+
* <Note>Access to this endpoint requires a bearer token from a [Data Client App](/data/docs/getting-started-data-clients).</Note>
|
|
60
60
|
*
|
|
61
61
|
* Required scope | `custom_code:read`
|
|
62
62
|
*
|
|
@@ -78,7 +78,7 @@ class Scripts {
|
|
|
78
78
|
const _response = yield core.fetcher({
|
|
79
79
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.WebflowEnvironment.Default, `pages/${encodeURIComponent(pageId)}/custom_code`),
|
|
80
80
|
method: "GET",
|
|
81
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.0
|
|
81
|
+
headers: Object.assign({ Authorization: yield 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 === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
82
82
|
contentType: "application/json",
|
|
83
83
|
requestType: "json",
|
|
84
84
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -159,7 +159,9 @@ class Scripts {
|
|
|
159
159
|
* to a Site via the `registered_scripts` endpoints, and then applied to a Site or Page using the appropriate
|
|
160
160
|
* `custom_code` endpoints.
|
|
161
161
|
*
|
|
162
|
-
*
|
|
162
|
+
* A site can have a maximum of 800 registered scripts.
|
|
163
|
+
*
|
|
164
|
+
* <Note>Access to this endpoint requires a bearer token from a [Data Client App](/data/docs/getting-started-data-clients).</Note>
|
|
163
165
|
*
|
|
164
166
|
* Required scope | `custom_code:write`
|
|
165
167
|
*
|
|
@@ -170,6 +172,7 @@ class Scripts {
|
|
|
170
172
|
* @throws {@link Webflow.BadRequestError}
|
|
171
173
|
* @throws {@link Webflow.UnauthorizedError}
|
|
172
174
|
* @throws {@link Webflow.NotFoundError}
|
|
175
|
+
* @throws {@link Webflow.ConflictError}
|
|
173
176
|
* @throws {@link Webflow.TooManyRequestsError}
|
|
174
177
|
* @throws {@link Webflow.InternalServerError}
|
|
175
178
|
*
|
|
@@ -195,7 +198,7 @@ class Scripts {
|
|
|
195
198
|
const _response = yield core.fetcher({
|
|
196
199
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.WebflowEnvironment.Default, `pages/${encodeURIComponent(pageId)}/custom_code`),
|
|
197
200
|
method: "PUT",
|
|
198
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.0
|
|
201
|
+
headers: Object.assign({ Authorization: yield 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 === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
199
202
|
contentType: "application/json",
|
|
200
203
|
requestType: "json",
|
|
201
204
|
body: serializers.ScriptApplyList.jsonOrThrow(request, {
|
|
@@ -236,6 +239,8 @@ class Scripts {
|
|
|
236
239
|
skipValidation: true,
|
|
237
240
|
breadcrumbsPrefix: ["response"],
|
|
238
241
|
}));
|
|
242
|
+
case 409:
|
|
243
|
+
throw new Webflow.ConflictError(_response.error.body);
|
|
239
244
|
case 429:
|
|
240
245
|
throw new Webflow.TooManyRequestsError(serializers.Error_.parseOrThrow(_response.error.body, {
|
|
241
246
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -281,7 +286,7 @@ class Scripts {
|
|
|
281
286
|
* to a Site via the `registered_scripts` endpoints, and then applied to a Site or Page using the appropriate
|
|
282
287
|
* `custom_code` endpoints.
|
|
283
288
|
*
|
|
284
|
-
* <
|
|
289
|
+
* <Note>Access to this endpoint requires a bearer token from a [Data Client App](/data/docs/getting-started-data-clients).</Note>
|
|
285
290
|
*
|
|
286
291
|
* Required scope | `custom_code:write`
|
|
287
292
|
*
|
|
@@ -303,7 +308,7 @@ class Scripts {
|
|
|
303
308
|
const _response = yield core.fetcher({
|
|
304
309
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.WebflowEnvironment.Default, `pages/${encodeURIComponent(pageId)}/custom_code`),
|
|
305
310
|
method: "DELETE",
|
|
306
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.0
|
|
311
|
+
headers: Object.assign({ Authorization: yield 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 === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
307
312
|
contentType: "application/json",
|
|
308
313
|
requestType: "json",
|
|
309
314
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from "./
|
|
1
|
+
export * from "./PageDomWriteNodesItem";
|
|
2
2
|
export * from "./UpdateStaticContentResponse";
|
|
@@ -14,5 +14,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./
|
|
17
|
+
__exportStar(require("./PageDomWriteNodesItem"), exports);
|
|
18
18
|
__exportStar(require("./UpdateStaticContentResponse"), exports);
|
|
@@ -53,12 +53,11 @@ export declare class Products {
|
|
|
53
53
|
* When you create a product, you will always create a SKU, since a Product Item must have, at minimum, a single SKU.
|
|
54
54
|
*
|
|
55
55
|
* To create a Product with multiple SKUs - for example a T-shirt in sizes small, medium and large:
|
|
56
|
-
*
|
|
57
|
-
*
|
|
58
|
-
*
|
|
59
|
-
*
|
|
60
|
-
*
|
|
61
|
-
* - After you've created your product, you can create additional SKUs using the [Create SKU endpoint.](/data/reference/ecommerce/products-sk-us/create-sku)
|
|
56
|
+
* - 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).
|
|
57
|
+
* - 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`.
|
|
58
|
+
* - 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.
|
|
59
|
+
* - 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.
|
|
60
|
+
* - After you've created your product, you can create additional SKUs using the [Create SKU endpoint.](/data/reference/ecommerce/products/create-sku)
|
|
62
61
|
*
|
|
63
62
|
* Upon creation, the default product type will be `Advanced`, which ensures all Product and SKU fields will be shown to users in the Designer.
|
|
64
63
|
*
|
|
@@ -86,7 +86,7 @@ class Products {
|
|
|
86
86
|
const _response = yield core.fetcher({
|
|
87
87
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.WebflowEnvironment.Default, `sites/${encodeURIComponent(siteId)}/products`),
|
|
88
88
|
method: "GET",
|
|
89
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.0
|
|
89
|
+
headers: Object.assign({ Authorization: yield 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 === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
90
90
|
contentType: "application/json",
|
|
91
91
|
queryParameters: _queryParams,
|
|
92
92
|
requestType: "json",
|
|
@@ -171,12 +171,11 @@ class Products {
|
|
|
171
171
|
* When you create a product, you will always create a SKU, since a Product Item must have, at minimum, a single SKU.
|
|
172
172
|
*
|
|
173
173
|
* To create a Product with multiple SKUs - for example a T-shirt in sizes small, medium and large:
|
|
174
|
-
*
|
|
175
|
-
*
|
|
176
|
-
*
|
|
177
|
-
*
|
|
178
|
-
*
|
|
179
|
-
* - After you've created your product, you can create additional SKUs using the [Create SKU endpoint.](/data/reference/ecommerce/products-sk-us/create-sku)
|
|
174
|
+
* - 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).
|
|
175
|
+
* - 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`.
|
|
176
|
+
* - 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.
|
|
177
|
+
* - 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.
|
|
178
|
+
* - After you've created your product, you can create additional SKUs using the [Create SKU endpoint.](/data/reference/ecommerce/products/create-sku)
|
|
180
179
|
*
|
|
181
180
|
* Upon creation, the default product type will be `Advanced`, which ensures all Product and SKU fields will be shown to users in the Designer.
|
|
182
181
|
*
|
|
@@ -203,7 +202,7 @@ class Products {
|
|
|
203
202
|
const _response = yield core.fetcher({
|
|
204
203
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.WebflowEnvironment.Default, `sites/${encodeURIComponent(siteId)}/products`),
|
|
205
204
|
method: "POST",
|
|
206
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.0
|
|
205
|
+
headers: Object.assign({ Authorization: yield 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 === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
207
206
|
contentType: "application/json",
|
|
208
207
|
requestType: "json",
|
|
209
208
|
body: serializers.ProductSkuCreate.jsonOrThrow(request, {
|
|
@@ -313,7 +312,7 @@ class Products {
|
|
|
313
312
|
const _response = yield core.fetcher({
|
|
314
313
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.WebflowEnvironment.Default, `sites/${encodeURIComponent(siteId)}/products/${encodeURIComponent(productId)}`),
|
|
315
314
|
method: "GET",
|
|
316
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.0
|
|
315
|
+
headers: Object.assign({ Authorization: yield 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 === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
317
316
|
contentType: "application/json",
|
|
318
317
|
requestType: "json",
|
|
319
318
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -420,7 +419,7 @@ class Products {
|
|
|
420
419
|
const _response = yield core.fetcher({
|
|
421
420
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.WebflowEnvironment.Default, `sites/${encodeURIComponent(siteId)}/products/${encodeURIComponent(productId)}`),
|
|
422
421
|
method: "PATCH",
|
|
423
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.0
|
|
422
|
+
headers: Object.assign({ Authorization: yield 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 === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
424
423
|
contentType: "application/json",
|
|
425
424
|
requestType: "json",
|
|
426
425
|
body: serializers.ProductSkuUpdate.jsonOrThrow(request, {
|
|
@@ -534,7 +533,7 @@ class Products {
|
|
|
534
533
|
const _response = yield core.fetcher({
|
|
535
534
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.WebflowEnvironment.Default, `sites/${encodeURIComponent(siteId)}/products/${encodeURIComponent(productId)}/skus`),
|
|
536
535
|
method: "POST",
|
|
537
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.0
|
|
536
|
+
headers: Object.assign({ Authorization: yield 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 === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
538
537
|
contentType: "application/json",
|
|
539
538
|
requestType: "json",
|
|
540
539
|
body: serializers.ProductsCreateSkuRequest.jsonOrThrow(request, {
|
|
@@ -649,7 +648,7 @@ class Products {
|
|
|
649
648
|
const _response = yield core.fetcher({
|
|
650
649
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.WebflowEnvironment.Default, `sites/${encodeURIComponent(siteId)}/products/${encodeURIComponent(productId)}/skus/${encodeURIComponent(skuId)}`),
|
|
651
650
|
method: "PATCH",
|
|
652
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.0
|
|
651
|
+
headers: Object.assign({ Authorization: yield 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 === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
653
652
|
contentType: "application/json",
|
|
654
653
|
requestType: "json",
|
|
655
654
|
body: serializers.ProductsUpdateSkuRequest.jsonOrThrow(request, {
|
|
@@ -31,7 +31,7 @@ export declare class Scripts {
|
|
|
31
31
|
* `custom_code` endpoints.
|
|
32
32
|
* Additionally, Scripts can be remotely hosted, or registered as inline snippets.
|
|
33
33
|
*
|
|
34
|
-
* <
|
|
34
|
+
* <Note>Access to this endpoint requires a bearer token from a [Data Client App](/data/docs/getting-started-data-clients).</Note>
|
|
35
35
|
*
|
|
36
36
|
* Required scope | `custom_code:read`
|
|
37
37
|
*
|
|
@@ -56,7 +56,7 @@ export declare class Scripts {
|
|
|
56
56
|
* `custom_code` endpoints.
|
|
57
57
|
* Additionally, Scripts can be remotely hosted, or registered as inline snippets.
|
|
58
58
|
*
|
|
59
|
-
* <
|
|
59
|
+
* <Note>Access to this endpoint requires a bearer token from a [Data Client App](/data/docs/getting-started-data-clients).</Note>
|
|
60
60
|
*
|
|
61
61
|
* Required scope | `custom_code:write`
|
|
62
62
|
*
|
|
@@ -86,7 +86,7 @@ export declare class Scripts {
|
|
|
86
86
|
* to a Site via the `registered_scripts` endpoints, and then applied to a Site or Page using the appropriate
|
|
87
87
|
* `custom_code` endpoints.
|
|
88
88
|
*
|
|
89
|
-
* <
|
|
89
|
+
* <Note>Access to this endpoint requires a bearer token from a [Data Client App](/data/docs/getting-started-data-clients).</Note>
|
|
90
90
|
*
|
|
91
91
|
* Required scope | `custom_code:write`
|
|
92
92
|
*
|
|
@@ -57,7 +57,7 @@ class Scripts {
|
|
|
57
57
|
* `custom_code` endpoints.
|
|
58
58
|
* Additionally, Scripts can be remotely hosted, or registered as inline snippets.
|
|
59
59
|
*
|
|
60
|
-
* <
|
|
60
|
+
* <Note>Access to this endpoint requires a bearer token from a [Data Client App](/data/docs/getting-started-data-clients).</Note>
|
|
61
61
|
*
|
|
62
62
|
* Required scope | `custom_code:read`
|
|
63
63
|
*
|
|
@@ -79,7 +79,7 @@ class Scripts {
|
|
|
79
79
|
const _response = yield core.fetcher({
|
|
80
80
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.WebflowEnvironment.Default, `sites/${encodeURIComponent(siteId)}/registered_scripts`),
|
|
81
81
|
method: "GET",
|
|
82
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.0
|
|
82
|
+
headers: Object.assign({ Authorization: yield 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 === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
83
83
|
contentType: "application/json",
|
|
84
84
|
requestType: "json",
|
|
85
85
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -161,7 +161,7 @@ class Scripts {
|
|
|
161
161
|
* `custom_code` endpoints.
|
|
162
162
|
* Additionally, Scripts can be remotely hosted, or registered as inline snippets.
|
|
163
163
|
*
|
|
164
|
-
* <
|
|
164
|
+
* <Note>Access to this endpoint requires a bearer token from a [Data Client App](/data/docs/getting-started-data-clients).</Note>
|
|
165
165
|
*
|
|
166
166
|
* Required scope | `custom_code:write`
|
|
167
167
|
*
|
|
@@ -189,7 +189,7 @@ class Scripts {
|
|
|
189
189
|
const _response = yield core.fetcher({
|
|
190
190
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.WebflowEnvironment.Default, `sites/${encodeURIComponent(siteId)}/registered_scripts/hosted`),
|
|
191
191
|
method: "POST",
|
|
192
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.0
|
|
192
|
+
headers: Object.assign({ Authorization: yield 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 === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
193
193
|
contentType: "application/json",
|
|
194
194
|
requestType: "json",
|
|
195
195
|
body: serializers.CustomCodeHostedRequest.jsonOrThrow(request, {
|
|
@@ -275,7 +275,7 @@ class Scripts {
|
|
|
275
275
|
* to a Site via the `registered_scripts` endpoints, and then applied to a Site or Page using the appropriate
|
|
276
276
|
* `custom_code` endpoints.
|
|
277
277
|
*
|
|
278
|
-
* <
|
|
278
|
+
* <Note>Access to this endpoint requires a bearer token from a [Data Client App](/data/docs/getting-started-data-clients).</Note>
|
|
279
279
|
*
|
|
280
280
|
* Required scope | `custom_code:write`
|
|
281
281
|
*
|
|
@@ -302,7 +302,7 @@ class Scripts {
|
|
|
302
302
|
const _response = yield core.fetcher({
|
|
303
303
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.WebflowEnvironment.Default, `sites/${encodeURIComponent(siteId)}/registered_scripts/inline`),
|
|
304
304
|
method: "POST",
|
|
305
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.0
|
|
305
|
+
headers: Object.assign({ Authorization: yield 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 === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
306
306
|
contentType: "application/json",
|
|
307
307
|
requestType: "json",
|
|
308
308
|
body: serializers.CustomCodeInlineRequest.jsonOrThrow(request, {
|