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
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
import * as environments from "../../../../environments";
|
|
5
5
|
import * as core from "../../../../core";
|
|
6
6
|
import * as Webflow from "../../../index";
|
|
7
|
+
import { Redirects } from "../resources/redirects/client/Client";
|
|
8
|
+
import { Plans } from "../resources/plans/client/Client";
|
|
7
9
|
import { ActivityLogs } from "../resources/activityLogs/client/Client";
|
|
8
10
|
import { Scripts } from "../resources/scripts/client/Client";
|
|
9
11
|
export declare namespace Sites {
|
|
@@ -22,9 +24,34 @@ export declare namespace Sites {
|
|
|
22
24
|
headers?: Record<string, string>;
|
|
23
25
|
}
|
|
24
26
|
}
|
|
27
|
+
/**
|
|
28
|
+
* Sites are the sites in your Webflow workspace.
|
|
29
|
+
*/
|
|
25
30
|
export declare class Sites {
|
|
26
31
|
protected readonly _options: Sites.Options;
|
|
27
32
|
constructor(_options: Sites.Options);
|
|
33
|
+
/**
|
|
34
|
+
* Create a site. This endpoint requires an Enterprise workspace.
|
|
35
|
+
*
|
|
36
|
+
* Required scope | `workspace:write`
|
|
37
|
+
*
|
|
38
|
+
* @param {string} workspaceId - Unique identifier for a Workspace
|
|
39
|
+
* @param {Webflow.SitesCreateRequest} request
|
|
40
|
+
* @param {Sites.RequestOptions} requestOptions - Request-specific configuration.
|
|
41
|
+
*
|
|
42
|
+
* @throws {@link Webflow.BadRequestError}
|
|
43
|
+
* @throws {@link Webflow.UnauthorizedError}
|
|
44
|
+
* @throws {@link Webflow.ForbiddenError}
|
|
45
|
+
* @throws {@link Webflow.NotFoundError}
|
|
46
|
+
* @throws {@link Webflow.TooManyRequestsError}
|
|
47
|
+
* @throws {@link Webflow.InternalServerError}
|
|
48
|
+
*
|
|
49
|
+
* @example
|
|
50
|
+
* await client.sites.create("580e63e98c9a982ac9b8b741", {
|
|
51
|
+
* name: "The Hitchhiker's Guide to the Galaxy"
|
|
52
|
+
* })
|
|
53
|
+
*/
|
|
54
|
+
create(workspaceId: string, request: Webflow.SitesCreateRequest, requestOptions?: Sites.RequestOptions): Promise<Webflow.Site>;
|
|
28
55
|
/**
|
|
29
56
|
* List of all sites the provided access token is able to access.
|
|
30
57
|
*
|
|
@@ -58,6 +85,45 @@ export declare class Sites {
|
|
|
58
85
|
* await client.sites.get("580e63e98c9a982ac9b8b741")
|
|
59
86
|
*/
|
|
60
87
|
get(siteId: string, requestOptions?: Sites.RequestOptions): Promise<Webflow.Site>;
|
|
88
|
+
/**
|
|
89
|
+
* Delete a site. This endpoint requires an Enterprise workspace.
|
|
90
|
+
*
|
|
91
|
+
* Required scope | `sites:write`
|
|
92
|
+
*
|
|
93
|
+
* @param {string} siteId - Unique identifier for a Site
|
|
94
|
+
* @param {Sites.RequestOptions} requestOptions - Request-specific configuration.
|
|
95
|
+
*
|
|
96
|
+
* @throws {@link Webflow.BadRequestError}
|
|
97
|
+
* @throws {@link Webflow.UnauthorizedError}
|
|
98
|
+
* @throws {@link Webflow.ForbiddenError}
|
|
99
|
+
* @throws {@link Webflow.NotFoundError}
|
|
100
|
+
* @throws {@link Webflow.TooManyRequestsError}
|
|
101
|
+
* @throws {@link Webflow.InternalServerError}
|
|
102
|
+
*
|
|
103
|
+
* @example
|
|
104
|
+
* await client.sites.delete("580e63e98c9a982ac9b8b741")
|
|
105
|
+
*/
|
|
106
|
+
delete(siteId: string, requestOptions?: Sites.RequestOptions): Promise<void>;
|
|
107
|
+
/**
|
|
108
|
+
* Update a site. This endpoint requires an Enterprise workspace.
|
|
109
|
+
*
|
|
110
|
+
* Required scope | `sites:write`
|
|
111
|
+
*
|
|
112
|
+
* @param {string} siteId - Unique identifier for a Site
|
|
113
|
+
* @param {Webflow.SitesUpdateRequest} request
|
|
114
|
+
* @param {Sites.RequestOptions} requestOptions - Request-specific configuration.
|
|
115
|
+
*
|
|
116
|
+
* @throws {@link Webflow.BadRequestError}
|
|
117
|
+
* @throws {@link Webflow.UnauthorizedError}
|
|
118
|
+
* @throws {@link Webflow.ForbiddenError}
|
|
119
|
+
* @throws {@link Webflow.NotFoundError}
|
|
120
|
+
* @throws {@link Webflow.TooManyRequestsError}
|
|
121
|
+
* @throws {@link Webflow.InternalServerError}
|
|
122
|
+
*
|
|
123
|
+
* @example
|
|
124
|
+
* await client.sites.update("580e63e98c9a982ac9b8b741")
|
|
125
|
+
*/
|
|
126
|
+
update(siteId: string, request?: Webflow.SitesUpdateRequest, requestOptions?: Sites.RequestOptions): Promise<Webflow.Site>;
|
|
61
127
|
/**
|
|
62
128
|
* Get a list of all custom domains related to site.
|
|
63
129
|
*
|
|
@@ -97,6 +163,10 @@ export declare class Sites {
|
|
|
97
163
|
* await client.sites.publish("580e63e98c9a982ac9b8b741")
|
|
98
164
|
*/
|
|
99
165
|
publish(siteId: string, request?: Webflow.SitesPublishRequest, requestOptions?: Sites.RequestOptions): Promise<Webflow.SitesPublishResponse>;
|
|
166
|
+
protected _redirects: Redirects | undefined;
|
|
167
|
+
get redirects(): Redirects;
|
|
168
|
+
protected _plans: Plans | undefined;
|
|
169
|
+
get plans(): Plans;
|
|
100
170
|
protected _activityLogs: ActivityLogs | undefined;
|
|
101
171
|
get activityLogs(): ActivityLogs;
|
|
102
172
|
protected _scripts: Scripts | undefined;
|
|
@@ -42,15 +42,128 @@ exports.Sites = void 0;
|
|
|
42
42
|
const environments = __importStar(require("../../../../environments"));
|
|
43
43
|
const core = __importStar(require("../../../../core"));
|
|
44
44
|
const Webflow = __importStar(require("../../../index"));
|
|
45
|
-
const url_join_1 = __importDefault(require("url-join"));
|
|
46
45
|
const serializers = __importStar(require("../../../../serialization/index"));
|
|
46
|
+
const url_join_1 = __importDefault(require("url-join"));
|
|
47
47
|
const errors = __importStar(require("../../../../errors/index"));
|
|
48
|
-
const Client_1 = require("../resources/
|
|
49
|
-
const Client_2 = require("../resources/
|
|
48
|
+
const Client_1 = require("../resources/redirects/client/Client");
|
|
49
|
+
const Client_2 = require("../resources/plans/client/Client");
|
|
50
|
+
const Client_3 = require("../resources/activityLogs/client/Client");
|
|
51
|
+
const Client_4 = require("../resources/scripts/client/Client");
|
|
52
|
+
/**
|
|
53
|
+
* Sites are the sites in your Webflow workspace.
|
|
54
|
+
*/
|
|
50
55
|
class Sites {
|
|
51
56
|
constructor(_options) {
|
|
52
57
|
this._options = _options;
|
|
53
58
|
}
|
|
59
|
+
/**
|
|
60
|
+
* Create a site. This endpoint requires an Enterprise workspace.
|
|
61
|
+
*
|
|
62
|
+
* Required scope | `workspace:write`
|
|
63
|
+
*
|
|
64
|
+
* @param {string} workspaceId - Unique identifier for a Workspace
|
|
65
|
+
* @param {Webflow.SitesCreateRequest} request
|
|
66
|
+
* @param {Sites.RequestOptions} requestOptions - Request-specific configuration.
|
|
67
|
+
*
|
|
68
|
+
* @throws {@link Webflow.BadRequestError}
|
|
69
|
+
* @throws {@link Webflow.UnauthorizedError}
|
|
70
|
+
* @throws {@link Webflow.ForbiddenError}
|
|
71
|
+
* @throws {@link Webflow.NotFoundError}
|
|
72
|
+
* @throws {@link Webflow.TooManyRequestsError}
|
|
73
|
+
* @throws {@link Webflow.InternalServerError}
|
|
74
|
+
*
|
|
75
|
+
* @example
|
|
76
|
+
* await client.sites.create("580e63e98c9a982ac9b8b741", {
|
|
77
|
+
* name: "The Hitchhiker's Guide to the Galaxy"
|
|
78
|
+
* })
|
|
79
|
+
*/
|
|
80
|
+
create(workspaceId, request, requestOptions) {
|
|
81
|
+
var _a;
|
|
82
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
83
|
+
const _response = yield core.fetcher({
|
|
84
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.WebflowEnvironment.Default, `workspaces/${encodeURIComponent(workspaceId)}/sites`),
|
|
85
|
+
method: "POST",
|
|
86
|
+
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),
|
|
87
|
+
contentType: "application/json",
|
|
88
|
+
requestType: "json",
|
|
89
|
+
body: serializers.SitesCreateRequest.jsonOrThrow(request, {
|
|
90
|
+
unrecognizedObjectKeys: "passthrough",
|
|
91
|
+
allowUnrecognizedUnionMembers: true,
|
|
92
|
+
allowUnrecognizedEnumValues: true,
|
|
93
|
+
}),
|
|
94
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
95
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
96
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
97
|
+
});
|
|
98
|
+
if (_response.ok) {
|
|
99
|
+
return serializers.Site.parseOrThrow(_response.body, {
|
|
100
|
+
unrecognizedObjectKeys: "passthrough",
|
|
101
|
+
allowUnrecognizedUnionMembers: true,
|
|
102
|
+
allowUnrecognizedEnumValues: true,
|
|
103
|
+
skipValidation: true,
|
|
104
|
+
breadcrumbsPrefix: ["response"],
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
if (_response.error.reason === "status-code") {
|
|
108
|
+
switch (_response.error.statusCode) {
|
|
109
|
+
case 400:
|
|
110
|
+
throw new Webflow.BadRequestError(_response.error.body);
|
|
111
|
+
case 401:
|
|
112
|
+
throw new Webflow.UnauthorizedError(serializers.Error_.parseOrThrow(_response.error.body, {
|
|
113
|
+
unrecognizedObjectKeys: "passthrough",
|
|
114
|
+
allowUnrecognizedUnionMembers: true,
|
|
115
|
+
allowUnrecognizedEnumValues: true,
|
|
116
|
+
skipValidation: true,
|
|
117
|
+
breadcrumbsPrefix: ["response"],
|
|
118
|
+
}));
|
|
119
|
+
case 403:
|
|
120
|
+
throw new Webflow.ForbiddenError(_response.error.body);
|
|
121
|
+
case 404:
|
|
122
|
+
throw new Webflow.NotFoundError(serializers.Error_.parseOrThrow(_response.error.body, {
|
|
123
|
+
unrecognizedObjectKeys: "passthrough",
|
|
124
|
+
allowUnrecognizedUnionMembers: true,
|
|
125
|
+
allowUnrecognizedEnumValues: true,
|
|
126
|
+
skipValidation: true,
|
|
127
|
+
breadcrumbsPrefix: ["response"],
|
|
128
|
+
}));
|
|
129
|
+
case 429:
|
|
130
|
+
throw new Webflow.TooManyRequestsError(serializers.Error_.parseOrThrow(_response.error.body, {
|
|
131
|
+
unrecognizedObjectKeys: "passthrough",
|
|
132
|
+
allowUnrecognizedUnionMembers: true,
|
|
133
|
+
allowUnrecognizedEnumValues: true,
|
|
134
|
+
skipValidation: true,
|
|
135
|
+
breadcrumbsPrefix: ["response"],
|
|
136
|
+
}));
|
|
137
|
+
case 500:
|
|
138
|
+
throw new Webflow.InternalServerError(serializers.Error_.parseOrThrow(_response.error.body, {
|
|
139
|
+
unrecognizedObjectKeys: "passthrough",
|
|
140
|
+
allowUnrecognizedUnionMembers: true,
|
|
141
|
+
allowUnrecognizedEnumValues: true,
|
|
142
|
+
skipValidation: true,
|
|
143
|
+
breadcrumbsPrefix: ["response"],
|
|
144
|
+
}));
|
|
145
|
+
default:
|
|
146
|
+
throw new errors.WebflowError({
|
|
147
|
+
statusCode: _response.error.statusCode,
|
|
148
|
+
body: _response.error.body,
|
|
149
|
+
});
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
switch (_response.error.reason) {
|
|
153
|
+
case "non-json":
|
|
154
|
+
throw new errors.WebflowError({
|
|
155
|
+
statusCode: _response.error.statusCode,
|
|
156
|
+
body: _response.error.rawBody,
|
|
157
|
+
});
|
|
158
|
+
case "timeout":
|
|
159
|
+
throw new errors.WebflowTimeoutError("Timeout exceeded when calling POST /workspaces/{workspace_id}/sites.");
|
|
160
|
+
case "unknown":
|
|
161
|
+
throw new errors.WebflowError({
|
|
162
|
+
message: _response.error.errorMessage,
|
|
163
|
+
});
|
|
164
|
+
}
|
|
165
|
+
});
|
|
166
|
+
}
|
|
54
167
|
/**
|
|
55
168
|
* List of all sites the provided access token is able to access.
|
|
56
169
|
*
|
|
@@ -71,7 +184,7 @@ class Sites {
|
|
|
71
184
|
const _response = yield core.fetcher({
|
|
72
185
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.WebflowEnvironment.Default, "sites"),
|
|
73
186
|
method: "GET",
|
|
74
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.0
|
|
187
|
+
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),
|
|
75
188
|
contentType: "application/json",
|
|
76
189
|
requestType: "json",
|
|
77
190
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -158,7 +271,7 @@ class Sites {
|
|
|
158
271
|
const _response = yield core.fetcher({
|
|
159
272
|
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)}`),
|
|
160
273
|
method: "GET",
|
|
161
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.0
|
|
274
|
+
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),
|
|
162
275
|
contentType: "application/json",
|
|
163
276
|
requestType: "json",
|
|
164
277
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -232,6 +345,206 @@ class Sites {
|
|
|
232
345
|
}
|
|
233
346
|
});
|
|
234
347
|
}
|
|
348
|
+
/**
|
|
349
|
+
* Delete a site. This endpoint requires an Enterprise workspace.
|
|
350
|
+
*
|
|
351
|
+
* Required scope | `sites:write`
|
|
352
|
+
*
|
|
353
|
+
* @param {string} siteId - Unique identifier for a Site
|
|
354
|
+
* @param {Sites.RequestOptions} requestOptions - Request-specific configuration.
|
|
355
|
+
*
|
|
356
|
+
* @throws {@link Webflow.BadRequestError}
|
|
357
|
+
* @throws {@link Webflow.UnauthorizedError}
|
|
358
|
+
* @throws {@link Webflow.ForbiddenError}
|
|
359
|
+
* @throws {@link Webflow.NotFoundError}
|
|
360
|
+
* @throws {@link Webflow.TooManyRequestsError}
|
|
361
|
+
* @throws {@link Webflow.InternalServerError}
|
|
362
|
+
*
|
|
363
|
+
* @example
|
|
364
|
+
* await client.sites.delete("580e63e98c9a982ac9b8b741")
|
|
365
|
+
*/
|
|
366
|
+
delete(siteId, requestOptions) {
|
|
367
|
+
var _a;
|
|
368
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
369
|
+
const _response = yield core.fetcher({
|
|
370
|
+
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)}`),
|
|
371
|
+
method: "DELETE",
|
|
372
|
+
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),
|
|
373
|
+
contentType: "application/json",
|
|
374
|
+
requestType: "json",
|
|
375
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
376
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
377
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
378
|
+
});
|
|
379
|
+
if (_response.ok) {
|
|
380
|
+
return;
|
|
381
|
+
}
|
|
382
|
+
if (_response.error.reason === "status-code") {
|
|
383
|
+
switch (_response.error.statusCode) {
|
|
384
|
+
case 400:
|
|
385
|
+
throw new Webflow.BadRequestError(_response.error.body);
|
|
386
|
+
case 401:
|
|
387
|
+
throw new Webflow.UnauthorizedError(serializers.Error_.parseOrThrow(_response.error.body, {
|
|
388
|
+
unrecognizedObjectKeys: "passthrough",
|
|
389
|
+
allowUnrecognizedUnionMembers: true,
|
|
390
|
+
allowUnrecognizedEnumValues: true,
|
|
391
|
+
skipValidation: true,
|
|
392
|
+
breadcrumbsPrefix: ["response"],
|
|
393
|
+
}));
|
|
394
|
+
case 403:
|
|
395
|
+
throw new Webflow.ForbiddenError(_response.error.body);
|
|
396
|
+
case 404:
|
|
397
|
+
throw new Webflow.NotFoundError(serializers.Error_.parseOrThrow(_response.error.body, {
|
|
398
|
+
unrecognizedObjectKeys: "passthrough",
|
|
399
|
+
allowUnrecognizedUnionMembers: true,
|
|
400
|
+
allowUnrecognizedEnumValues: true,
|
|
401
|
+
skipValidation: true,
|
|
402
|
+
breadcrumbsPrefix: ["response"],
|
|
403
|
+
}));
|
|
404
|
+
case 429:
|
|
405
|
+
throw new Webflow.TooManyRequestsError(serializers.Error_.parseOrThrow(_response.error.body, {
|
|
406
|
+
unrecognizedObjectKeys: "passthrough",
|
|
407
|
+
allowUnrecognizedUnionMembers: true,
|
|
408
|
+
allowUnrecognizedEnumValues: true,
|
|
409
|
+
skipValidation: true,
|
|
410
|
+
breadcrumbsPrefix: ["response"],
|
|
411
|
+
}));
|
|
412
|
+
case 500:
|
|
413
|
+
throw new Webflow.InternalServerError(serializers.Error_.parseOrThrow(_response.error.body, {
|
|
414
|
+
unrecognizedObjectKeys: "passthrough",
|
|
415
|
+
allowUnrecognizedUnionMembers: true,
|
|
416
|
+
allowUnrecognizedEnumValues: true,
|
|
417
|
+
skipValidation: true,
|
|
418
|
+
breadcrumbsPrefix: ["response"],
|
|
419
|
+
}));
|
|
420
|
+
default:
|
|
421
|
+
throw new errors.WebflowError({
|
|
422
|
+
statusCode: _response.error.statusCode,
|
|
423
|
+
body: _response.error.body,
|
|
424
|
+
});
|
|
425
|
+
}
|
|
426
|
+
}
|
|
427
|
+
switch (_response.error.reason) {
|
|
428
|
+
case "non-json":
|
|
429
|
+
throw new errors.WebflowError({
|
|
430
|
+
statusCode: _response.error.statusCode,
|
|
431
|
+
body: _response.error.rawBody,
|
|
432
|
+
});
|
|
433
|
+
case "timeout":
|
|
434
|
+
throw new errors.WebflowTimeoutError("Timeout exceeded when calling DELETE /sites/{site_id}.");
|
|
435
|
+
case "unknown":
|
|
436
|
+
throw new errors.WebflowError({
|
|
437
|
+
message: _response.error.errorMessage,
|
|
438
|
+
});
|
|
439
|
+
}
|
|
440
|
+
});
|
|
441
|
+
}
|
|
442
|
+
/**
|
|
443
|
+
* Update a site. This endpoint requires an Enterprise workspace.
|
|
444
|
+
*
|
|
445
|
+
* Required scope | `sites:write`
|
|
446
|
+
*
|
|
447
|
+
* @param {string} siteId - Unique identifier for a Site
|
|
448
|
+
* @param {Webflow.SitesUpdateRequest} request
|
|
449
|
+
* @param {Sites.RequestOptions} requestOptions - Request-specific configuration.
|
|
450
|
+
*
|
|
451
|
+
* @throws {@link Webflow.BadRequestError}
|
|
452
|
+
* @throws {@link Webflow.UnauthorizedError}
|
|
453
|
+
* @throws {@link Webflow.ForbiddenError}
|
|
454
|
+
* @throws {@link Webflow.NotFoundError}
|
|
455
|
+
* @throws {@link Webflow.TooManyRequestsError}
|
|
456
|
+
* @throws {@link Webflow.InternalServerError}
|
|
457
|
+
*
|
|
458
|
+
* @example
|
|
459
|
+
* await client.sites.update("580e63e98c9a982ac9b8b741")
|
|
460
|
+
*/
|
|
461
|
+
update(siteId, request = {}, requestOptions) {
|
|
462
|
+
var _a;
|
|
463
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
464
|
+
const _response = yield core.fetcher({
|
|
465
|
+
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)}`),
|
|
466
|
+
method: "PATCH",
|
|
467
|
+
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),
|
|
468
|
+
contentType: "application/json",
|
|
469
|
+
requestType: "json",
|
|
470
|
+
body: serializers.SitesUpdateRequest.jsonOrThrow(request, {
|
|
471
|
+
unrecognizedObjectKeys: "passthrough",
|
|
472
|
+
allowUnrecognizedUnionMembers: true,
|
|
473
|
+
allowUnrecognizedEnumValues: true,
|
|
474
|
+
}),
|
|
475
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
476
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
477
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
478
|
+
});
|
|
479
|
+
if (_response.ok) {
|
|
480
|
+
return serializers.Site.parseOrThrow(_response.body, {
|
|
481
|
+
unrecognizedObjectKeys: "passthrough",
|
|
482
|
+
allowUnrecognizedUnionMembers: true,
|
|
483
|
+
allowUnrecognizedEnumValues: true,
|
|
484
|
+
skipValidation: true,
|
|
485
|
+
breadcrumbsPrefix: ["response"],
|
|
486
|
+
});
|
|
487
|
+
}
|
|
488
|
+
if (_response.error.reason === "status-code") {
|
|
489
|
+
switch (_response.error.statusCode) {
|
|
490
|
+
case 400:
|
|
491
|
+
throw new Webflow.BadRequestError(_response.error.body);
|
|
492
|
+
case 401:
|
|
493
|
+
throw new Webflow.UnauthorizedError(serializers.Error_.parseOrThrow(_response.error.body, {
|
|
494
|
+
unrecognizedObjectKeys: "passthrough",
|
|
495
|
+
allowUnrecognizedUnionMembers: true,
|
|
496
|
+
allowUnrecognizedEnumValues: true,
|
|
497
|
+
skipValidation: true,
|
|
498
|
+
breadcrumbsPrefix: ["response"],
|
|
499
|
+
}));
|
|
500
|
+
case 403:
|
|
501
|
+
throw new Webflow.ForbiddenError(_response.error.body);
|
|
502
|
+
case 404:
|
|
503
|
+
throw new Webflow.NotFoundError(serializers.Error_.parseOrThrow(_response.error.body, {
|
|
504
|
+
unrecognizedObjectKeys: "passthrough",
|
|
505
|
+
allowUnrecognizedUnionMembers: true,
|
|
506
|
+
allowUnrecognizedEnumValues: true,
|
|
507
|
+
skipValidation: true,
|
|
508
|
+
breadcrumbsPrefix: ["response"],
|
|
509
|
+
}));
|
|
510
|
+
case 429:
|
|
511
|
+
throw new Webflow.TooManyRequestsError(serializers.Error_.parseOrThrow(_response.error.body, {
|
|
512
|
+
unrecognizedObjectKeys: "passthrough",
|
|
513
|
+
allowUnrecognizedUnionMembers: true,
|
|
514
|
+
allowUnrecognizedEnumValues: true,
|
|
515
|
+
skipValidation: true,
|
|
516
|
+
breadcrumbsPrefix: ["response"],
|
|
517
|
+
}));
|
|
518
|
+
case 500:
|
|
519
|
+
throw new Webflow.InternalServerError(serializers.Error_.parseOrThrow(_response.error.body, {
|
|
520
|
+
unrecognizedObjectKeys: "passthrough",
|
|
521
|
+
allowUnrecognizedUnionMembers: true,
|
|
522
|
+
allowUnrecognizedEnumValues: true,
|
|
523
|
+
skipValidation: true,
|
|
524
|
+
breadcrumbsPrefix: ["response"],
|
|
525
|
+
}));
|
|
526
|
+
default:
|
|
527
|
+
throw new errors.WebflowError({
|
|
528
|
+
statusCode: _response.error.statusCode,
|
|
529
|
+
body: _response.error.body,
|
|
530
|
+
});
|
|
531
|
+
}
|
|
532
|
+
}
|
|
533
|
+
switch (_response.error.reason) {
|
|
534
|
+
case "non-json":
|
|
535
|
+
throw new errors.WebflowError({
|
|
536
|
+
statusCode: _response.error.statusCode,
|
|
537
|
+
body: _response.error.rawBody,
|
|
538
|
+
});
|
|
539
|
+
case "timeout":
|
|
540
|
+
throw new errors.WebflowTimeoutError("Timeout exceeded when calling PATCH /sites/{site_id}.");
|
|
541
|
+
case "unknown":
|
|
542
|
+
throw new errors.WebflowError({
|
|
543
|
+
message: _response.error.errorMessage,
|
|
544
|
+
});
|
|
545
|
+
}
|
|
546
|
+
});
|
|
547
|
+
}
|
|
235
548
|
/**
|
|
236
549
|
* Get a list of all custom domains related to site.
|
|
237
550
|
*
|
|
@@ -255,7 +568,7 @@ class Sites {
|
|
|
255
568
|
const _response = yield core.fetcher({
|
|
256
569
|
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)}/custom_domains`),
|
|
257
570
|
method: "GET",
|
|
258
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.0
|
|
571
|
+
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),
|
|
259
572
|
contentType: "application/json",
|
|
260
573
|
requestType: "json",
|
|
261
574
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -355,7 +668,7 @@ class Sites {
|
|
|
355
668
|
const _response = yield core.fetcher({
|
|
356
669
|
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)}/publish`),
|
|
357
670
|
method: "POST",
|
|
358
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.0
|
|
671
|
+
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),
|
|
359
672
|
contentType: "application/json",
|
|
360
673
|
requestType: "json",
|
|
361
674
|
body: serializers.SitesPublishRequest.jsonOrThrow(request, {
|
|
@@ -428,13 +741,21 @@ class Sites {
|
|
|
428
741
|
}
|
|
429
742
|
});
|
|
430
743
|
}
|
|
744
|
+
get redirects() {
|
|
745
|
+
var _a;
|
|
746
|
+
return ((_a = this._redirects) !== null && _a !== void 0 ? _a : (this._redirects = new Client_1.Redirects(this._options)));
|
|
747
|
+
}
|
|
748
|
+
get plans() {
|
|
749
|
+
var _a;
|
|
750
|
+
return ((_a = this._plans) !== null && _a !== void 0 ? _a : (this._plans = new Client_2.Plans(this._options)));
|
|
751
|
+
}
|
|
431
752
|
get activityLogs() {
|
|
432
753
|
var _a;
|
|
433
|
-
return ((_a = this._activityLogs) !== null && _a !== void 0 ? _a : (this._activityLogs = new
|
|
754
|
+
return ((_a = this._activityLogs) !== null && _a !== void 0 ? _a : (this._activityLogs = new Client_3.ActivityLogs(this._options)));
|
|
434
755
|
}
|
|
435
756
|
get scripts() {
|
|
436
757
|
var _a;
|
|
437
|
-
return ((_a = this._scripts) !== null && _a !== void 0 ? _a : (this._scripts = new
|
|
758
|
+
return ((_a = this._scripts) !== null && _a !== void 0 ? _a : (this._scripts = new Client_4.Scripts(this._options)));
|
|
438
759
|
}
|
|
439
760
|
_getAuthorizationHeader() {
|
|
440
761
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* @example
|
|
6
|
+
* {
|
|
7
|
+
* name: "The Hitchhiker's Guide to the Galaxy"
|
|
8
|
+
* }
|
|
9
|
+
*/
|
|
10
|
+
export interface SitesCreateRequest {
|
|
11
|
+
/** The name of the site */
|
|
12
|
+
name: string;
|
|
13
|
+
/** The workspace or marketplace template to use */
|
|
14
|
+
templateName?: string;
|
|
15
|
+
/** MegaDodo Publications - Potential Book Ideas */
|
|
16
|
+
parentFolderId?: string;
|
|
17
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* @example
|
|
6
|
+
* {}
|
|
7
|
+
*/
|
|
8
|
+
export interface SitesUpdateRequest {
|
|
9
|
+
/** The name of the site */
|
|
10
|
+
name?: string;
|
|
11
|
+
/** The parent folder ID of the site */
|
|
12
|
+
parentFolderId?: string;
|
|
13
|
+
}
|
|
@@ -24,7 +24,7 @@ export declare class ActivityLogs {
|
|
|
24
24
|
protected readonly _options: ActivityLogs.Options;
|
|
25
25
|
constructor(_options: ActivityLogs.Options);
|
|
26
26
|
/**
|
|
27
|
-
* Retrieve Activity Logs for a specific Site. Requires Site to be on an Enterprise plan. </br></br>
|
|
27
|
+
* Retrieve Activity Logs for a specific Site. Requires Site to be on an Enterprise plan. </br></br> Required scope | `site_activity:read`
|
|
28
28
|
*
|
|
29
29
|
* @param {string} siteId - Unique identifier for a Site
|
|
30
30
|
* @param {Webflow.sites.ActivityLogsListRequest} request
|
|
@@ -50,7 +50,7 @@ class ActivityLogs {
|
|
|
50
50
|
this._options = _options;
|
|
51
51
|
}
|
|
52
52
|
/**
|
|
53
|
-
* Retrieve Activity Logs for a specific Site. Requires Site to be on an Enterprise plan. </br></br>
|
|
53
|
+
* Retrieve Activity Logs for a specific Site. Requires Site to be on an Enterprise plan. </br></br> Required scope | `site_activity:read`
|
|
54
54
|
*
|
|
55
55
|
* @param {string} siteId - Unique identifier for a Site
|
|
56
56
|
* @param {Webflow.sites.ActivityLogsListRequest} request
|
|
@@ -78,7 +78,7 @@ class ActivityLogs {
|
|
|
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, `sites/${encodeURIComponent(siteId)}/activity_logs`),
|
|
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
|
queryParameters: _queryParams,
|
|
84
84
|
requestType: "json",
|
|
@@ -26,7 +26,9 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
26
26
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
27
27
|
};
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
exports.scripts = exports.activityLogs = void 0;
|
|
29
|
+
exports.scripts = exports.activityLogs = exports.plans = exports.redirects = void 0;
|
|
30
|
+
exports.redirects = __importStar(require("./redirects"));
|
|
31
|
+
exports.plans = __importStar(require("./plans"));
|
|
30
32
|
exports.activityLogs = __importStar(require("./activityLogs"));
|
|
31
33
|
exports.scripts = __importStar(require("./scripts"));
|
|
32
34
|
__exportStar(require("./activityLogs/client/requests"), exports);
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as environments from "../../../../../../environments";
|
|
5
|
+
import * as core from "../../../../../../core";
|
|
6
|
+
import * as Webflow from "../../../../../index";
|
|
7
|
+
export declare namespace Plans {
|
|
8
|
+
interface Options {
|
|
9
|
+
environment?: core.Supplier<environments.WebflowEnvironment | string>;
|
|
10
|
+
accessToken: core.Supplier<core.BearerToken>;
|
|
11
|
+
}
|
|
12
|
+
interface RequestOptions {
|
|
13
|
+
/** The maximum time to wait for a response in seconds. */
|
|
14
|
+
timeoutInSeconds?: number;
|
|
15
|
+
/** The number of times to retry the request. Defaults to 2. */
|
|
16
|
+
maxRetries?: number;
|
|
17
|
+
/** A hook to abort the request. */
|
|
18
|
+
abortSignal?: AbortSignal;
|
|
19
|
+
/** Additional headers to include in the request. */
|
|
20
|
+
headers?: Record<string, string>;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
export declare class Plans {
|
|
24
|
+
protected readonly _options: Plans.Options;
|
|
25
|
+
constructor(_options: Plans.Options);
|
|
26
|
+
/**
|
|
27
|
+
* Get site plan details for the specified Site.
|
|
28
|
+
*
|
|
29
|
+
* Required scope | `sites:read`
|
|
30
|
+
*
|
|
31
|
+
* @param {string} siteId - Unique identifier for a Site
|
|
32
|
+
* @param {Plans.RequestOptions} requestOptions - Request-specific configuration.
|
|
33
|
+
*
|
|
34
|
+
* @throws {@link Webflow.BadRequestError}
|
|
35
|
+
* @throws {@link Webflow.UnauthorizedError}
|
|
36
|
+
* @throws {@link Webflow.NotFoundError}
|
|
37
|
+
* @throws {@link Webflow.TooManyRequestsError}
|
|
38
|
+
* @throws {@link Webflow.InternalServerError}
|
|
39
|
+
*
|
|
40
|
+
* @example
|
|
41
|
+
* await client.sites.plans.getSitePlan("580e63e98c9a982ac9b8b741")
|
|
42
|
+
*/
|
|
43
|
+
getSitePlan(siteId: string, requestOptions?: Plans.RequestOptions): Promise<Webflow.SitePlan>;
|
|
44
|
+
protected _getAuthorizationHeader(): Promise<string>;
|
|
45
|
+
}
|