webflow-api 2.0.0-beta → 2.1.1
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/README.md +33 -2
- package/api/resources/accessGroups/client/Client.d.ts +1 -3
- package/api/resources/accessGroups/client/Client.js +5 -5
- package/api/resources/accessGroups/client/requests/AccessGroupsListRequest.d.ts +1 -3
- package/api/resources/assets/client/Client.d.ts +21 -7
- package/api/resources/assets/client/Client.js +110 -21
- package/api/resources/assets/client/requests/AssetsUpdateRequest.d.ts +13 -0
- package/api/resources/assets/client/requests/index.d.ts +1 -0
- package/api/resources/collections/client/Client.d.ts +11 -4
- package/api/resources/collections/client/Client.js +31 -14
- package/api/resources/collections/client/requests/CollectionsCreateRequest.d.ts +8 -0
- package/api/resources/collections/resources/fields/client/Client.d.ts +16 -1
- package/api/resources/collections/resources/fields/client/Client.js +24 -5
- package/api/resources/collections/resources/fields/client/requests/FieldCreate.d.ts +23 -0
- package/api/resources/collections/resources/fields/client/requests/FieldUpdate.d.ts +8 -0
- package/api/resources/collections/resources/fields/client/requests/index.d.ts +1 -0
- package/api/resources/collections/resources/fields/index.d.ts +1 -0
- package/api/resources/collections/resources/fields/index.js +1 -0
- package/api/resources/collections/resources/fields/types/FieldCreateType.d.ts +22 -0
- package/api/resources/collections/resources/fields/types/FieldCreateType.js +21 -0
- package/api/resources/collections/resources/fields/types/index.d.ts +1 -0
- package/api/resources/collections/resources/fields/types/index.js +17 -0
- package/api/resources/collections/resources/index.d.ts +2 -1
- package/api/resources/collections/resources/index.js +3 -2
- package/api/resources/collections/resources/items/client/Client.d.ts +82 -16
- package/api/resources/collections/resources/items/client/Client.js +302 -29
- package/api/resources/collections/resources/items/client/requests/ItemsDeleteItemRequest.d.ts +13 -0
- package/api/resources/collections/resources/items/client/requests/ItemsDeleteItemRequest.js +5 -0
- package/api/resources/collections/resources/items/client/requests/ItemsGetItemRequest.d.ts +13 -0
- package/api/resources/collections/resources/items/client/requests/ItemsGetItemRequest.js +5 -0
- package/api/resources/collections/resources/items/client/requests/ItemsListItemsRequest.d.ts +4 -0
- package/api/resources/collections/resources/items/client/requests/ItemsPublishItemRequest.d.ts +1 -1
- package/api/resources/collections/resources/items/client/requests/index.d.ts +2 -0
- package/api/resources/ecommerce/client/Client.d.ts +1 -1
- package/api/resources/ecommerce/client/Client.js +5 -3
- package/api/resources/forms/client/Client.d.ts +6 -6
- package/api/resources/forms/client/Client.js +35 -16
- package/api/resources/forms/client/requests/FormsListRequest.d.ts +17 -0
- package/api/resources/forms/client/requests/FormsListRequest.js +5 -0
- package/api/resources/forms/client/requests/index.d.ts +1 -0
- package/api/resources/index.d.ts +3 -1
- package/api/resources/index.js +4 -2
- package/api/resources/inventory/client/Client.d.ts +2 -2
- package/api/resources/inventory/client/Client.js +10 -6
- package/api/resources/orders/client/Client.d.ts +6 -10
- package/api/resources/orders/client/Client.js +30 -22
- package/api/resources/orders/client/requests/OrdersListRequest.d.ts +1 -3
- package/api/resources/orders/client/requests/OrdersRefundRequest.d.ts +1 -3
- package/api/resources/pages/client/Client.d.ts +73 -4
- package/api/resources/pages/client/Client.js +312 -8
- package/api/resources/pages/client/index.d.ts +1 -1
- package/api/resources/pages/client/index.js +15 -0
- package/api/resources/pages/client/requests/DomWrite.d.ts +21 -0
- package/api/resources/pages/client/requests/DomWrite.js +5 -0
- package/api/resources/pages/client/requests/PagesGetContentRequest.d.ts +13 -0
- package/api/resources/pages/client/requests/PagesGetContentRequest.js +5 -0
- package/api/resources/pages/client/requests/PagesGetMetadataRequest.d.ts +13 -0
- package/api/resources/pages/client/requests/PagesGetMetadataRequest.js +5 -0
- package/api/resources/pages/client/requests/PagesListRequest.d.ts +21 -0
- package/api/resources/pages/client/requests/PagesListRequest.js +5 -0
- package/api/resources/pages/client/requests/UpdatePageSettingsRequest.d.ts +40 -0
- package/api/resources/pages/client/requests/UpdatePageSettingsRequest.js +5 -0
- package/api/resources/pages/client/requests/index.d.ts +5 -0
- package/api/resources/pages/client/requests/index.js +2 -0
- package/api/resources/pages/index.d.ts +1 -0
- package/api/resources/pages/index.js +1 -0
- package/api/resources/pages/resources/scripts/client/Client.d.ts +20 -3
- package/api/resources/pages/resources/scripts/client/Client.js +32 -9
- package/api/resources/pages/types/DomWriteNodesItem.d.ts +9 -0
- package/api/resources/pages/types/DomWriteNodesItem.js +5 -0
- package/api/resources/pages/types/index.d.ts +1 -0
- package/api/resources/pages/types/index.js +17 -0
- package/api/resources/products/client/Client.d.ts +54 -74
- package/api/resources/products/client/Client.js +79 -87
- package/api/resources/products/client/requests/ProductSkuCreate.d.ts +15 -0
- package/api/resources/products/client/requests/ProductSkuCreate.js +5 -0
- package/api/resources/products/client/requests/ProductsCreateSkuRequest.d.ts +7 -7
- package/api/resources/products/client/requests/ProductsUpdateRequest.d.ts +29 -8
- package/api/resources/products/client/requests/ProductsUpdateSkuRequest.d.ts +7 -7
- package/api/resources/products/client/requests/index.d.ts +1 -1
- package/api/resources/products/types/ProductSkuCreateProduct.d.ts +22 -0
- package/api/resources/products/types/ProductSkuCreateProduct.js +5 -0
- package/api/resources/products/types/ProductSkuCreateProductFieldData.d.ts +23 -0
- package/api/resources/products/types/ProductSkuCreateProductFieldData.js +5 -0
- package/api/resources/products/types/ProductSkuCreateProductFieldDataEcProductType.d.ts +13 -0
- package/api/resources/products/types/ProductSkuCreateProductFieldDataEcProductType.js +12 -0
- package/api/resources/products/types/ProductSkuCreateProductFieldDataTaxCategory.d.ts +38 -0
- package/api/resources/products/types/ProductSkuCreateProductFieldDataTaxCategory.js +37 -0
- package/api/resources/products/types/ProductSkuCreateSku.d.ts +19 -0
- package/api/resources/products/types/ProductSkuCreateSku.js +5 -0
- package/api/resources/products/types/ProductSkuCreateSkuFieldData.d.ts +26 -0
- package/api/resources/products/types/ProductSkuCreateSkuFieldData.js +5 -0
- package/api/resources/products/types/ProductSkuCreateSkuFieldDataCompareAtPrice.d.ts +12 -0
- package/api/resources/products/types/ProductSkuCreateSkuFieldDataCompareAtPrice.js +5 -0
- package/api/resources/products/types/ProductSkuCreateSkuFieldDataEcSkuBillingMethod.d.ts +11 -0
- package/api/resources/products/types/ProductSkuCreateSkuFieldDataEcSkuBillingMethod.js +10 -0
- package/api/resources/products/types/ProductSkuCreateSkuFieldDataEcSkuSubscriptionPlan.d.ts +15 -0
- package/api/resources/products/types/ProductSkuCreateSkuFieldDataEcSkuSubscriptionPlan.js +5 -0
- package/api/resources/products/types/ProductSkuCreateSkuFieldDataEcSkuSubscriptionPlanInterval.d.ts +13 -0
- package/api/resources/products/types/ProductSkuCreateSkuFieldDataEcSkuSubscriptionPlanInterval.js +12 -0
- package/api/resources/products/types/ProductSkuCreateSkuFieldDataPrice.d.ts +13 -0
- package/api/resources/products/types/ProductSkuCreateSkuFieldDataPrice.js +5 -0
- package/api/resources/products/types/index.d.ts +11 -0
- package/api/resources/products/types/index.js +11 -0
- package/api/resources/scripts/client/Client.d.ts +16 -1
- package/api/resources/scripts/client/Client.js +28 -7
- package/api/resources/scripts/client/requests/CustomCodeHostedRequest.d.ts +9 -0
- package/api/resources/scripts/client/requests/CustomCodeInlineRequest.d.ts +8 -0
- package/api/resources/sites/client/Client.d.ts +6 -3
- package/api/resources/sites/client/Client.js +26 -13
- package/api/resources/sites/resources/activityLogs/client/Client.d.ts +32 -0
- package/api/resources/sites/resources/activityLogs/client/Client.js +136 -0
- package/api/resources/sites/resources/activityLogs/client/index.d.ts +1 -0
- package/api/resources/sites/resources/activityLogs/client/index.js +17 -0
- package/api/resources/sites/resources/activityLogs/client/requests/ActivityLogsListRequest.d.ts +17 -0
- package/api/resources/sites/resources/activityLogs/client/requests/ActivityLogsListRequest.js +5 -0
- package/api/resources/sites/resources/activityLogs/client/requests/index.d.ts +1 -0
- package/api/resources/sites/resources/activityLogs/client/requests/index.js +2 -0
- package/api/resources/sites/resources/activityLogs/index.d.ts +1 -0
- package/api/resources/sites/resources/activityLogs/index.js +17 -0
- package/api/resources/sites/resources/index.d.ts +2 -0
- package/api/resources/sites/resources/index.js +3 -1
- package/api/resources/sites/resources/scripts/client/Client.d.ts +21 -4
- package/api/resources/sites/resources/scripts/client/Client.js +37 -12
- package/api/resources/token/client/Client.js +8 -4
- package/api/resources/users/client/Client.d.ts +14 -18
- package/api/resources/users/client/Client.js +35 -29
- package/api/resources/users/client/requests/UsersInviteRequest.d.ts +2 -1
- package/api/resources/users/client/requests/UsersListRequest.d.ts +1 -3
- package/api/resources/users/client/requests/UsersUpdateRequest.d.ts +23 -0
- package/api/resources/users/client/requests/UsersUpdateRequest.js +5 -0
- package/api/resources/users/client/requests/index.d.ts +1 -0
- package/api/resources/users/types/UsersUpdateRequestData.d.ts +11 -0
- package/api/resources/users/types/UsersUpdateRequestData.js +5 -0
- package/api/resources/users/types/index.d.ts +1 -0
- package/api/resources/users/types/index.js +1 -0
- package/api/resources/webhooks/client/Client.d.ts +4 -4
- package/api/resources/webhooks/client/Client.js +20 -12
- package/api/types/AssetFolder.d.ts +3 -0
- package/api/types/AssetFolderList.d.ts +2 -1
- package/api/types/CollectionItem.d.ts +2 -0
- package/api/types/Dom.d.ts +13 -0
- package/api/types/Dom.js +5 -0
- package/api/types/ImageNode.d.ts +10 -0
- package/api/types/ImageNode.js +5 -0
- package/api/types/InvalidScopes.d.ts +10 -0
- package/api/types/InvalidScopes.js +5 -0
- package/api/types/Node.d.ts +15 -0
- package/api/types/Node.js +5 -0
- package/api/types/NodeType.d.ts +8 -0
- package/api/types/NodeType.js +10 -0
- package/api/types/NotEnterprisePlanSite.d.ts +14 -0
- package/api/types/NotEnterprisePlanSite.js +5 -0
- package/api/types/OauthScope.d.ts +5 -1
- package/api/types/OauthScope.js +1 -0
- package/api/types/ProductAndSkUs.d.ts +1 -0
- package/api/types/ProductFieldData.d.ts +17 -3
- package/api/types/ProductFieldDataEcProductType.d.ts +13 -0
- package/api/types/ProductFieldDataEcProductType.js +12 -0
- package/api/types/ProductFieldDataTaxCategory.d.ts +38 -0
- package/api/types/ProductFieldDataTaxCategory.js +37 -0
- package/api/types/PublishStatus.d.ts +1 -1
- package/api/types/SiteActivityLogItem.d.ts +1 -1
- package/api/types/SiteActivityLogItemUser.d.ts +7 -0
- package/api/types/SiteActivityLogItemUser.js +5 -0
- package/api/types/Sku.d.ts +1 -0
- package/api/types/SkuFieldData.d.ts +15 -4
- package/api/types/SkuFieldDataCompareAtPrice.d.ts +12 -0
- package/api/types/SkuFieldDataCompareAtPrice.js +5 -0
- package/api/types/SkuFieldDataEcSkuBillingMethod.d.ts +8 -0
- package/api/types/SkuFieldDataEcSkuBillingMethod.js +10 -0
- package/api/types/SkuFieldDataEcSkuSubscriptionPlan.d.ts +12 -0
- package/api/types/SkuFieldDataEcSkuSubscriptionPlan.js +5 -0
- package/api/types/SkuFieldDataEcSkuSubscriptionPlanInterval.d.ts +13 -0
- package/api/types/SkuFieldDataEcSkuSubscriptionPlanInterval.js +12 -0
- package/api/types/SkuPropertyList.d.ts +6 -6
- package/api/types/SkuPropertyListEnumItem.d.ts +3 -3
- package/api/types/TextNode.d.ts +10 -0
- package/api/types/TextNode.js +5 -0
- package/api/types/index.d.ts +14 -0
- package/api/types/index.js +14 -0
- package/core/fetcher/Fetcher.d.ts +1 -1
- package/core/fetcher/Fetcher.js +26 -18
- package/core/index.d.ts +1 -0
- package/core/index.js +1 -0
- package/core/runtime/index.d.ts +1 -0
- package/core/runtime/index.js +5 -0
- package/core/runtime/runtime.d.ts +8 -0
- package/core/runtime/runtime.js +82 -0
- package/dist/api/resources/accessGroups/client/Client.d.ts +1 -3
- package/dist/api/resources/accessGroups/client/Client.js +5 -5
- package/dist/api/resources/accessGroups/client/requests/AccessGroupsListRequest.d.ts +1 -3
- package/dist/api/resources/assets/client/Client.d.ts +21 -7
- package/dist/api/resources/assets/client/Client.js +110 -21
- package/dist/api/resources/assets/client/requests/AssetsUpdateRequest.d.ts +13 -0
- package/dist/api/resources/assets/client/requests/AssetsUpdateRequest.js +5 -0
- package/dist/api/resources/assets/client/requests/index.d.ts +1 -0
- package/dist/api/resources/collections/client/Client.d.ts +11 -4
- package/dist/api/resources/collections/client/Client.js +31 -14
- package/dist/api/resources/collections/client/requests/CollectionsCreateRequest.d.ts +8 -0
- package/dist/api/resources/collections/resources/fields/client/Client.d.ts +16 -1
- package/dist/api/resources/collections/resources/fields/client/Client.js +24 -5
- package/dist/api/resources/collections/resources/fields/client/requests/FieldCreate.d.ts +23 -0
- package/dist/api/resources/collections/resources/fields/client/requests/FieldCreate.js +5 -0
- package/dist/api/resources/collections/resources/fields/client/requests/FieldUpdate.d.ts +8 -0
- package/dist/api/resources/collections/resources/fields/client/requests/index.d.ts +1 -0
- package/dist/api/resources/collections/resources/fields/index.d.ts +1 -0
- package/dist/api/resources/collections/resources/fields/index.js +1 -0
- package/dist/api/resources/collections/resources/fields/types/FieldCreateType.d.ts +22 -0
- package/dist/api/resources/collections/resources/fields/types/FieldCreateType.js +21 -0
- package/dist/api/resources/collections/resources/fields/types/index.d.ts +1 -0
- package/dist/api/resources/collections/resources/fields/types/index.js +17 -0
- package/dist/api/resources/collections/resources/index.d.ts +2 -1
- package/dist/api/resources/collections/resources/index.js +3 -2
- package/dist/api/resources/collections/resources/items/client/Client.d.ts +82 -16
- package/dist/api/resources/collections/resources/items/client/Client.js +302 -29
- package/dist/api/resources/collections/resources/items/client/requests/ItemsDeleteItemRequest.d.ts +13 -0
- package/dist/api/resources/collections/resources/items/client/requests/ItemsDeleteItemRequest.js +5 -0
- package/dist/api/resources/collections/resources/items/client/requests/ItemsGetItemRequest.d.ts +13 -0
- package/dist/api/resources/collections/resources/items/client/requests/ItemsGetItemRequest.js +5 -0
- package/dist/api/resources/collections/resources/items/client/requests/ItemsListItemsRequest.d.ts +4 -0
- package/dist/api/resources/collections/resources/items/client/requests/ItemsPublishItemRequest.d.ts +1 -1
- package/dist/api/resources/collections/resources/items/client/requests/index.d.ts +2 -0
- package/dist/api/resources/ecommerce/client/Client.d.ts +1 -1
- package/dist/api/resources/ecommerce/client/Client.js +5 -3
- package/dist/api/resources/forms/client/Client.d.ts +6 -6
- package/dist/api/resources/forms/client/Client.js +35 -16
- package/dist/api/resources/forms/client/requests/FormsListRequest.d.ts +17 -0
- package/dist/api/resources/forms/client/requests/FormsListRequest.js +5 -0
- package/dist/api/resources/forms/client/requests/index.d.ts +1 -0
- package/dist/api/resources/index.d.ts +3 -1
- package/dist/api/resources/index.js +4 -2
- package/dist/api/resources/inventory/client/Client.d.ts +2 -2
- package/dist/api/resources/inventory/client/Client.js +10 -6
- package/dist/api/resources/orders/client/Client.d.ts +6 -10
- package/dist/api/resources/orders/client/Client.js +30 -22
- package/dist/api/resources/orders/client/requests/OrdersListRequest.d.ts +1 -3
- package/dist/api/resources/orders/client/requests/OrdersRefundRequest.d.ts +1 -3
- package/dist/api/resources/pages/client/Client.d.ts +73 -4
- package/dist/api/resources/pages/client/Client.js +312 -8
- package/dist/api/resources/pages/client/index.d.ts +1 -1
- package/dist/api/resources/pages/client/index.js +15 -0
- package/dist/api/resources/pages/client/requests/DomWrite.d.ts +21 -0
- package/dist/api/resources/pages/client/requests/DomWrite.js +5 -0
- package/dist/api/resources/pages/client/requests/PagesGetContentRequest.d.ts +13 -0
- package/dist/api/resources/pages/client/requests/PagesGetContentRequest.js +5 -0
- package/dist/api/resources/pages/client/requests/PagesGetMetadataRequest.d.ts +13 -0
- package/dist/api/resources/pages/client/requests/PagesGetMetadataRequest.js +5 -0
- package/dist/api/resources/pages/client/requests/PagesListRequest.d.ts +21 -0
- package/dist/api/resources/pages/client/requests/PagesListRequest.js +5 -0
- package/dist/api/resources/pages/client/requests/UpdatePageSettingsRequest.d.ts +40 -0
- package/dist/api/resources/pages/client/requests/UpdatePageSettingsRequest.js +5 -0
- package/dist/api/resources/pages/client/requests/index.d.ts +5 -0
- package/dist/api/resources/pages/client/requests/index.js +2 -0
- package/dist/api/resources/pages/index.d.ts +1 -0
- package/dist/api/resources/pages/index.js +1 -0
- package/dist/api/resources/pages/resources/scripts/client/Client.d.ts +20 -3
- package/dist/api/resources/pages/resources/scripts/client/Client.js +32 -9
- package/dist/api/resources/pages/types/DomWriteNodesItem.d.ts +9 -0
- package/dist/api/resources/pages/types/DomWriteNodesItem.js +5 -0
- package/dist/api/resources/pages/types/index.d.ts +1 -0
- package/dist/api/resources/pages/types/index.js +17 -0
- package/dist/api/resources/products/client/Client.d.ts +54 -74
- package/dist/api/resources/products/client/Client.js +79 -87
- package/dist/api/resources/products/client/requests/ProductSkuCreate.d.ts +15 -0
- package/dist/api/resources/products/client/requests/ProductSkuCreate.js +5 -0
- package/dist/api/resources/products/client/requests/ProductsCreateSkuRequest.d.ts +7 -7
- package/dist/api/resources/products/client/requests/ProductsUpdateRequest.d.ts +29 -8
- package/dist/api/resources/products/client/requests/ProductsUpdateSkuRequest.d.ts +7 -7
- package/dist/api/resources/products/client/requests/index.d.ts +1 -1
- package/dist/api/resources/products/types/ProductSkuCreateProduct.d.ts +22 -0
- package/dist/api/resources/products/types/ProductSkuCreateProduct.js +5 -0
- package/dist/api/resources/products/types/ProductSkuCreateProductFieldData.d.ts +23 -0
- package/dist/api/resources/products/types/ProductSkuCreateProductFieldData.js +5 -0
- package/dist/api/resources/products/types/ProductSkuCreateProductFieldDataEcProductType.d.ts +13 -0
- package/dist/api/resources/products/types/ProductSkuCreateProductFieldDataEcProductType.js +12 -0
- package/dist/api/resources/products/types/ProductSkuCreateProductFieldDataTaxCategory.d.ts +38 -0
- package/dist/api/resources/products/types/ProductSkuCreateProductFieldDataTaxCategory.js +37 -0
- package/dist/api/resources/products/types/ProductSkuCreateSku.d.ts +19 -0
- package/dist/api/resources/products/types/ProductSkuCreateSku.js +5 -0
- package/dist/api/resources/products/types/ProductSkuCreateSkuFieldData.d.ts +26 -0
- package/dist/api/resources/products/types/ProductSkuCreateSkuFieldData.js +5 -0
- package/dist/api/resources/products/types/ProductSkuCreateSkuFieldDataCompareAtPrice.d.ts +12 -0
- package/dist/api/resources/products/types/ProductSkuCreateSkuFieldDataCompareAtPrice.js +5 -0
- package/dist/api/resources/products/types/ProductSkuCreateSkuFieldDataEcSkuBillingMethod.d.ts +11 -0
- package/dist/api/resources/products/types/ProductSkuCreateSkuFieldDataEcSkuBillingMethod.js +10 -0
- package/dist/api/resources/products/types/ProductSkuCreateSkuFieldDataEcSkuSubscriptionPlan.d.ts +15 -0
- package/dist/api/resources/products/types/ProductSkuCreateSkuFieldDataEcSkuSubscriptionPlan.js +5 -0
- package/dist/api/resources/products/types/ProductSkuCreateSkuFieldDataEcSkuSubscriptionPlanInterval.d.ts +13 -0
- package/dist/api/resources/products/types/ProductSkuCreateSkuFieldDataEcSkuSubscriptionPlanInterval.js +12 -0
- package/dist/api/resources/products/types/ProductSkuCreateSkuFieldDataPrice.d.ts +13 -0
- package/dist/api/resources/products/types/ProductSkuCreateSkuFieldDataPrice.js +5 -0
- package/dist/api/resources/products/types/index.d.ts +11 -0
- package/dist/api/resources/products/types/index.js +11 -0
- package/dist/api/resources/scripts/client/Client.d.ts +16 -1
- package/dist/api/resources/scripts/client/Client.js +28 -7
- package/dist/api/resources/scripts/client/requests/CustomCodeHostedRequest.d.ts +9 -0
- package/dist/api/resources/scripts/client/requests/CustomCodeInlineRequest.d.ts +8 -0
- package/dist/api/resources/sites/client/Client.d.ts +6 -3
- package/dist/api/resources/sites/client/Client.js +26 -13
- package/dist/api/resources/sites/resources/activityLogs/client/Client.d.ts +32 -0
- package/dist/api/resources/sites/resources/activityLogs/client/Client.js +136 -0
- package/dist/api/resources/sites/resources/activityLogs/client/index.d.ts +1 -0
- package/dist/api/resources/sites/resources/activityLogs/client/index.js +17 -0
- package/dist/api/resources/sites/resources/activityLogs/client/requests/ActivityLogsListRequest.d.ts +17 -0
- package/dist/api/resources/sites/resources/activityLogs/client/requests/ActivityLogsListRequest.js +5 -0
- package/dist/api/resources/sites/resources/activityLogs/client/requests/index.d.ts +1 -0
- package/dist/api/resources/sites/resources/activityLogs/client/requests/index.js +2 -0
- package/dist/api/resources/sites/resources/activityLogs/index.d.ts +1 -0
- package/dist/api/resources/sites/resources/activityLogs/index.js +17 -0
- 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/scripts/client/Client.d.ts +21 -4
- package/dist/api/resources/sites/resources/scripts/client/Client.js +37 -12
- package/dist/api/resources/token/client/Client.js +8 -4
- package/dist/api/resources/users/client/Client.d.ts +14 -18
- package/dist/api/resources/users/client/Client.js +35 -29
- package/dist/api/resources/users/client/requests/UsersInviteRequest.d.ts +2 -1
- package/dist/api/resources/users/client/requests/UsersListRequest.d.ts +1 -3
- package/dist/api/resources/users/client/requests/UsersUpdateRequest.d.ts +23 -0
- package/dist/api/resources/users/client/requests/UsersUpdateRequest.js +5 -0
- package/dist/api/resources/users/client/requests/index.d.ts +1 -0
- package/dist/api/resources/users/types/UsersUpdateRequestData.d.ts +11 -0
- package/dist/api/resources/users/types/UsersUpdateRequestData.js +5 -0
- package/dist/api/resources/users/types/index.d.ts +1 -0
- package/dist/api/resources/users/types/index.js +1 -0
- package/dist/api/resources/webhooks/client/Client.d.ts +4 -4
- package/dist/api/resources/webhooks/client/Client.js +20 -12
- package/dist/api/types/AssetFolder.d.ts +3 -0
- package/dist/api/types/AssetFolderList.d.ts +2 -1
- package/dist/api/types/CollectionItem.d.ts +2 -0
- package/dist/api/types/Dom.d.ts +13 -0
- package/dist/api/types/Dom.js +5 -0
- package/dist/api/types/ImageNode.d.ts +10 -0
- package/dist/api/types/ImageNode.js +5 -0
- package/dist/api/types/InvalidScopes.d.ts +10 -0
- package/dist/api/types/InvalidScopes.js +5 -0
- package/dist/api/types/Node.d.ts +15 -0
- package/dist/api/types/Node.js +5 -0
- package/dist/api/types/NodeType.d.ts +8 -0
- package/dist/api/types/NodeType.js +10 -0
- package/dist/api/types/NotEnterprisePlanSite.d.ts +14 -0
- package/dist/api/types/NotEnterprisePlanSite.js +5 -0
- package/dist/api/types/OauthScope.d.ts +5 -1
- package/dist/api/types/OauthScope.js +1 -0
- package/dist/api/types/ProductAndSkUs.d.ts +1 -0
- package/dist/api/types/ProductFieldData.d.ts +17 -3
- package/dist/api/types/ProductFieldDataEcProductType.d.ts +13 -0
- package/dist/api/types/ProductFieldDataEcProductType.js +12 -0
- package/dist/api/types/ProductFieldDataTaxCategory.d.ts +38 -0
- package/dist/api/types/ProductFieldDataTaxCategory.js +37 -0
- package/dist/api/types/PublishStatus.d.ts +1 -1
- package/dist/api/types/SiteActivityLogItem.d.ts +1 -1
- package/dist/api/types/SiteActivityLogItemUser.d.ts +7 -0
- package/dist/api/types/SiteActivityLogItemUser.js +5 -0
- package/dist/api/types/Sku.d.ts +1 -0
- package/dist/api/types/SkuFieldData.d.ts +15 -4
- package/dist/api/types/SkuFieldDataCompareAtPrice.d.ts +12 -0
- package/dist/api/types/SkuFieldDataCompareAtPrice.js +5 -0
- package/dist/api/types/SkuFieldDataEcSkuBillingMethod.d.ts +8 -0
- package/dist/api/types/SkuFieldDataEcSkuBillingMethod.js +10 -0
- package/dist/api/types/SkuFieldDataEcSkuSubscriptionPlan.d.ts +12 -0
- package/dist/api/types/SkuFieldDataEcSkuSubscriptionPlan.js +5 -0
- package/dist/api/types/SkuFieldDataEcSkuSubscriptionPlanInterval.d.ts +13 -0
- package/dist/api/types/SkuFieldDataEcSkuSubscriptionPlanInterval.js +12 -0
- package/dist/api/types/SkuPropertyList.d.ts +6 -6
- package/dist/api/types/SkuPropertyListEnumItem.d.ts +3 -3
- package/dist/api/types/TextNode.d.ts +10 -0
- package/dist/api/types/TextNode.js +5 -0
- package/dist/api/types/index.d.ts +14 -0
- package/dist/api/types/index.js +14 -0
- package/dist/core/fetcher/Fetcher.d.ts +1 -1
- package/dist/core/fetcher/Fetcher.js +26 -18
- package/dist/core/index.d.ts +1 -0
- package/dist/core/index.js +1 -0
- package/dist/core/runtime/index.d.ts +1 -0
- package/dist/core/runtime/index.js +5 -0
- package/dist/core/runtime/runtime.d.ts +8 -0
- package/dist/core/runtime/runtime.js +82 -0
- package/dist/serialization/resources/assets/client/requests/AssetsUpdateRequest.d.ts +12 -0
- package/dist/serialization/resources/assets/client/requests/AssetsUpdateRequest.js +33 -0
- package/dist/serialization/resources/assets/client/requests/index.d.ts +1 -0
- package/dist/serialization/resources/assets/client/requests/index.js +3 -1
- package/dist/serialization/resources/collections/resources/fields/client/requests/FieldCreate.d.ts +15 -0
- package/dist/serialization/resources/collections/resources/fields/client/requests/FieldCreate.js +45 -0
- package/dist/serialization/resources/collections/resources/fields/client/requests/index.d.ts +1 -0
- package/dist/serialization/resources/collections/resources/fields/client/requests/index.js +3 -1
- package/dist/serialization/resources/collections/resources/fields/index.d.ts +1 -0
- package/dist/serialization/resources/collections/resources/fields/index.js +1 -0
- package/dist/serialization/resources/collections/resources/fields/types/FieldCreateType.d.ts +10 -0
- package/dist/serialization/resources/collections/resources/fields/types/FieldCreateType.js +45 -0
- package/dist/serialization/resources/collections/resources/fields/types/index.d.ts +1 -0
- package/dist/serialization/resources/collections/resources/fields/types/index.js +17 -0
- package/dist/serialization/resources/collections/resources/index.d.ts +2 -1
- package/dist/serialization/resources/collections/resources/index.js +3 -2
- package/dist/serialization/resources/index.d.ts +3 -0
- package/dist/serialization/resources/index.js +4 -1
- package/dist/serialization/resources/pages/client/index.d.ts +1 -0
- package/dist/serialization/resources/pages/client/index.js +17 -0
- package/dist/serialization/resources/pages/client/requests/DomWrite.d.ts +12 -0
- package/dist/serialization/resources/pages/client/requests/DomWrite.js +42 -0
- package/dist/serialization/resources/pages/client/requests/index.d.ts +1 -0
- package/dist/serialization/resources/pages/client/requests/index.js +5 -0
- package/dist/serialization/resources/pages/index.d.ts +2 -0
- package/dist/serialization/resources/pages/index.js +18 -0
- package/dist/serialization/resources/pages/types/DomWriteNodesItem.d.ts +13 -0
- package/dist/serialization/resources/pages/types/DomWriteNodesItem.js +34 -0
- package/dist/serialization/resources/pages/types/index.d.ts +1 -0
- package/dist/serialization/resources/pages/types/index.js +17 -0
- package/dist/serialization/resources/products/client/requests/{ProductsCreateRequest.d.ts → ProductSkuCreate.d.ts} +4 -4
- package/{serialization/resources/products/client/requests/ProductsCreateRequest.js → dist/serialization/resources/products/client/requests/ProductSkuCreate.js} +6 -4
- package/dist/serialization/resources/products/client/requests/index.d.ts +1 -1
- package/dist/serialization/resources/products/client/requests/index.js +3 -3
- package/dist/serialization/resources/products/types/ProductSkuCreateProduct.d.ts +18 -0
- package/dist/serialization/resources/products/types/ProductSkuCreateProduct.js +50 -0
- package/dist/serialization/resources/products/types/ProductSkuCreateProductFieldData.d.ts +20 -0
- package/dist/serialization/resources/products/types/ProductSkuCreateProductFieldData.js +56 -0
- package/dist/serialization/resources/products/types/ProductSkuCreateProductFieldDataEcProductType.d.ts +10 -0
- package/dist/serialization/resources/products/types/ProductSkuCreateProductFieldDataEcProductType.js +36 -0
- package/dist/serialization/resources/products/types/ProductSkuCreateProductFieldDataTaxCategory.d.ts +10 -0
- package/dist/serialization/resources/products/types/ProductSkuCreateProductFieldDataTaxCategory.js +61 -0
- package/dist/serialization/resources/products/types/ProductSkuCreateSku.d.ts +16 -0
- package/dist/serialization/resources/products/types/ProductSkuCreateSku.js +48 -0
- package/dist/serialization/resources/products/types/ProductSkuCreateSkuFieldData.d.ts +20 -0
- package/dist/serialization/resources/products/types/ProductSkuCreateSkuFieldData.js +56 -0
- package/dist/serialization/resources/products/types/ProductSkuCreateSkuFieldDataCompareAtPrice.d.ts +13 -0
- package/dist/serialization/resources/products/types/ProductSkuCreateSkuFieldDataCompareAtPrice.js +34 -0
- package/dist/serialization/resources/products/types/ProductSkuCreateSkuFieldDataEcSkuBillingMethod.d.ts +10 -0
- package/dist/serialization/resources/products/types/ProductSkuCreateSkuFieldDataEcSkuBillingMethod.js +31 -0
- package/dist/serialization/resources/products/types/ProductSkuCreateSkuFieldDataEcSkuSubscriptionPlan.d.ts +14 -0
- package/dist/serialization/resources/products/types/ProductSkuCreateSkuFieldDataEcSkuSubscriptionPlan.js +46 -0
- package/dist/serialization/resources/products/types/ProductSkuCreateSkuFieldDataEcSkuSubscriptionPlanInterval.d.ts +10 -0
- package/dist/serialization/resources/products/types/ProductSkuCreateSkuFieldDataEcSkuSubscriptionPlanInterval.js +31 -0
- package/dist/serialization/resources/products/types/ProductSkuCreateSkuFieldDataPrice.d.ts +14 -0
- package/dist/serialization/resources/products/types/ProductSkuCreateSkuFieldDataPrice.js +35 -0
- package/dist/serialization/resources/products/types/index.d.ts +11 -0
- package/dist/serialization/resources/products/types/index.js +11 -0
- package/dist/serialization/resources/users/client/requests/UsersUpdateRequest.d.ts +13 -0
- package/dist/serialization/resources/users/client/requests/UsersUpdateRequest.js +43 -0
- package/dist/serialization/resources/users/client/requests/index.d.ts +1 -0
- package/dist/serialization/resources/users/client/requests/index.js +3 -1
- package/dist/serialization/resources/users/types/UsersUpdateRequestData.d.ts +14 -0
- package/dist/serialization/resources/users/types/UsersUpdateRequestData.js +35 -0
- package/dist/serialization/resources/users/types/index.d.ts +1 -0
- package/dist/serialization/resources/users/types/index.js +1 -0
- package/dist/serialization/types/AssetFolderList.d.ts +1 -1
- package/dist/serialization/types/AssetFolderList.js +2 -2
- package/dist/serialization/types/CollectionItem.d.ts +1 -0
- package/dist/serialization/types/CollectionItem.js +1 -0
- package/dist/serialization/types/Dom.d.ts +14 -0
- package/dist/serialization/types/Dom.js +44 -0
- package/dist/serialization/types/ImageNode.d.ts +13 -0
- package/dist/serialization/types/ImageNode.js +34 -0
- package/dist/serialization/types/InvalidScopes.d.ts +16 -0
- package/dist/serialization/types/InvalidScopes.js +37 -0
- package/dist/serialization/types/Node.d.ts +16 -0
- package/dist/serialization/types/Node.js +46 -0
- package/dist/serialization/types/NodeType.d.ts +10 -0
- package/dist/serialization/types/NodeType.js +31 -0
- package/dist/serialization/types/NotEnterprisePlanSite.d.ts +16 -0
- package/dist/serialization/types/NotEnterprisePlanSite.js +48 -0
- package/dist/serialization/types/OauthScope.d.ts +1 -1
- package/dist/serialization/types/OauthScope.js +1 -0
- package/dist/serialization/types/ProductFieldData.d.ts +9 -2
- package/dist/serialization/types/ProductFieldData.js +9 -2
- package/dist/serialization/types/ProductFieldDataEcProductType.d.ts +10 -0
- package/dist/serialization/types/ProductFieldDataEcProductType.js +36 -0
- package/dist/serialization/types/ProductFieldDataTaxCategory.d.ts +10 -0
- package/dist/serialization/types/ProductFieldDataTaxCategory.js +61 -0
- package/dist/serialization/types/SiteActivityLogItem.d.ts +1 -1
- package/dist/serialization/types/SiteActivityLogItem.js +1 -1
- package/dist/serialization/types/SiteActivityLogItemUser.d.ts +13 -0
- package/dist/serialization/types/SiteActivityLogItemUser.js +34 -0
- package/dist/serialization/types/SkuFieldData.d.ts +8 -3
- package/dist/serialization/types/SkuFieldData.js +8 -3
- package/dist/serialization/types/SkuFieldDataCompareAtPrice.d.ts +13 -0
- package/dist/serialization/types/SkuFieldDataCompareAtPrice.js +34 -0
- package/dist/serialization/types/SkuFieldDataEcSkuBillingMethod.d.ts +10 -0
- package/dist/serialization/types/SkuFieldDataEcSkuBillingMethod.js +31 -0
- package/dist/serialization/types/SkuFieldDataEcSkuSubscriptionPlan.d.ts +14 -0
- package/dist/serialization/types/SkuFieldDataEcSkuSubscriptionPlan.js +46 -0
- package/dist/serialization/types/SkuFieldDataEcSkuSubscriptionPlanInterval.d.ts +10 -0
- package/dist/serialization/types/SkuFieldDataEcSkuSubscriptionPlanInterval.js +31 -0
- package/dist/serialization/types/SkuPropertyList.d.ts +3 -3
- package/dist/serialization/types/SkuPropertyList.js +3 -5
- package/dist/serialization/types/SkuPropertyListEnumItem.d.ts +3 -3
- package/dist/serialization/types/SkuPropertyListEnumItem.js +3 -3
- package/dist/serialization/types/TextNode.d.ts +13 -0
- package/dist/serialization/types/TextNode.js +34 -0
- package/dist/serialization/types/index.d.ts +14 -0
- package/dist/serialization/types/index.js +14 -0
- package/jest.config.js +5 -0
- package/package.json +6 -4
- package/serialization/resources/assets/client/requests/AssetsUpdateRequest.d.ts +12 -0
- package/serialization/resources/assets/client/requests/AssetsUpdateRequest.js +33 -0
- package/serialization/resources/assets/client/requests/index.d.ts +1 -0
- package/serialization/resources/assets/client/requests/index.js +3 -1
- package/serialization/resources/collections/resources/fields/client/requests/FieldCreate.d.ts +15 -0
- package/serialization/resources/collections/resources/fields/client/requests/FieldCreate.js +45 -0
- package/serialization/resources/collections/resources/fields/client/requests/index.d.ts +1 -0
- package/serialization/resources/collections/resources/fields/client/requests/index.js +3 -1
- package/serialization/resources/collections/resources/fields/index.d.ts +1 -0
- package/serialization/resources/collections/resources/fields/index.js +1 -0
- package/serialization/resources/collections/resources/fields/types/FieldCreateType.d.ts +10 -0
- package/serialization/resources/collections/resources/fields/types/FieldCreateType.js +45 -0
- package/serialization/resources/collections/resources/fields/types/index.d.ts +1 -0
- package/serialization/resources/collections/resources/fields/types/index.js +17 -0
- package/serialization/resources/collections/resources/index.d.ts +2 -1
- package/serialization/resources/collections/resources/index.js +3 -2
- package/serialization/resources/index.d.ts +3 -0
- package/serialization/resources/index.js +4 -1
- package/serialization/resources/pages/client/index.d.ts +1 -0
- package/serialization/resources/pages/client/index.js +17 -0
- package/serialization/resources/pages/client/requests/DomWrite.d.ts +12 -0
- package/serialization/resources/pages/client/requests/DomWrite.js +42 -0
- package/serialization/resources/pages/client/requests/index.d.ts +1 -0
- package/serialization/resources/pages/client/requests/index.js +5 -0
- package/serialization/resources/pages/index.d.ts +2 -0
- package/serialization/resources/pages/index.js +18 -0
- package/serialization/resources/pages/types/DomWriteNodesItem.d.ts +13 -0
- package/serialization/resources/pages/types/DomWriteNodesItem.js +34 -0
- package/serialization/resources/pages/types/index.d.ts +1 -0
- package/serialization/resources/pages/types/index.js +17 -0
- package/serialization/resources/products/client/requests/{ProductsCreateRequest.d.ts → ProductSkuCreate.d.ts} +4 -4
- package/{dist/serialization/resources/products/client/requests/ProductsCreateRequest.js → serialization/resources/products/client/requests/ProductSkuCreate.js} +6 -4
- package/serialization/resources/products/client/requests/index.d.ts +1 -1
- package/serialization/resources/products/client/requests/index.js +3 -3
- package/serialization/resources/products/types/ProductSkuCreateProduct.d.ts +18 -0
- package/serialization/resources/products/types/ProductSkuCreateProduct.js +50 -0
- package/serialization/resources/products/types/ProductSkuCreateProductFieldData.d.ts +20 -0
- package/serialization/resources/products/types/ProductSkuCreateProductFieldData.js +56 -0
- package/serialization/resources/products/types/ProductSkuCreateProductFieldDataEcProductType.d.ts +10 -0
- package/serialization/resources/products/types/ProductSkuCreateProductFieldDataEcProductType.js +36 -0
- package/serialization/resources/products/types/ProductSkuCreateProductFieldDataTaxCategory.d.ts +10 -0
- package/serialization/resources/products/types/ProductSkuCreateProductFieldDataTaxCategory.js +61 -0
- package/serialization/resources/products/types/ProductSkuCreateSku.d.ts +16 -0
- package/serialization/resources/products/types/ProductSkuCreateSku.js +48 -0
- package/serialization/resources/products/types/ProductSkuCreateSkuFieldData.d.ts +20 -0
- package/serialization/resources/products/types/ProductSkuCreateSkuFieldData.js +56 -0
- package/serialization/resources/products/types/ProductSkuCreateSkuFieldDataCompareAtPrice.d.ts +13 -0
- package/serialization/resources/products/types/ProductSkuCreateSkuFieldDataCompareAtPrice.js +34 -0
- package/serialization/resources/products/types/ProductSkuCreateSkuFieldDataEcSkuBillingMethod.d.ts +10 -0
- package/serialization/resources/products/types/ProductSkuCreateSkuFieldDataEcSkuBillingMethod.js +31 -0
- package/serialization/resources/products/types/ProductSkuCreateSkuFieldDataEcSkuSubscriptionPlan.d.ts +14 -0
- package/serialization/resources/products/types/ProductSkuCreateSkuFieldDataEcSkuSubscriptionPlan.js +46 -0
- package/serialization/resources/products/types/ProductSkuCreateSkuFieldDataEcSkuSubscriptionPlanInterval.d.ts +10 -0
- package/serialization/resources/products/types/ProductSkuCreateSkuFieldDataEcSkuSubscriptionPlanInterval.js +31 -0
- package/serialization/resources/products/types/ProductSkuCreateSkuFieldDataPrice.d.ts +14 -0
- package/serialization/resources/products/types/ProductSkuCreateSkuFieldDataPrice.js +35 -0
- package/serialization/resources/products/types/index.d.ts +11 -0
- package/serialization/resources/products/types/index.js +11 -0
- package/serialization/resources/users/client/requests/UsersUpdateRequest.d.ts +13 -0
- package/serialization/resources/users/client/requests/UsersUpdateRequest.js +43 -0
- package/serialization/resources/users/client/requests/index.d.ts +1 -0
- package/serialization/resources/users/client/requests/index.js +3 -1
- package/serialization/resources/users/types/UsersUpdateRequestData.d.ts +14 -0
- package/serialization/resources/users/types/UsersUpdateRequestData.js +35 -0
- package/serialization/resources/users/types/index.d.ts +1 -0
- package/serialization/resources/users/types/index.js +1 -0
- package/serialization/types/AssetFolderList.d.ts +1 -1
- package/serialization/types/AssetFolderList.js +2 -2
- package/serialization/types/CollectionItem.d.ts +1 -0
- package/serialization/types/CollectionItem.js +1 -0
- package/serialization/types/Dom.d.ts +14 -0
- package/serialization/types/Dom.js +44 -0
- package/serialization/types/ImageNode.d.ts +13 -0
- package/serialization/types/ImageNode.js +34 -0
- package/serialization/types/InvalidScopes.d.ts +16 -0
- package/serialization/types/InvalidScopes.js +37 -0
- package/serialization/types/Node.d.ts +16 -0
- package/serialization/types/Node.js +46 -0
- package/serialization/types/NodeType.d.ts +10 -0
- package/serialization/types/NodeType.js +31 -0
- package/serialization/types/NotEnterprisePlanSite.d.ts +16 -0
- package/serialization/types/NotEnterprisePlanSite.js +48 -0
- package/serialization/types/OauthScope.d.ts +1 -1
- package/serialization/types/OauthScope.js +1 -0
- package/serialization/types/ProductFieldData.d.ts +9 -2
- package/serialization/types/ProductFieldData.js +9 -2
- package/serialization/types/ProductFieldDataEcProductType.d.ts +10 -0
- package/serialization/types/ProductFieldDataEcProductType.js +36 -0
- package/serialization/types/ProductFieldDataTaxCategory.d.ts +10 -0
- package/serialization/types/ProductFieldDataTaxCategory.js +61 -0
- package/serialization/types/SiteActivityLogItem.d.ts +1 -1
- package/serialization/types/SiteActivityLogItem.js +1 -1
- package/serialization/types/SiteActivityLogItemUser.d.ts +13 -0
- package/serialization/types/SiteActivityLogItemUser.js +34 -0
- package/serialization/types/SkuFieldData.d.ts +8 -3
- package/serialization/types/SkuFieldData.js +8 -3
- package/serialization/types/SkuFieldDataCompareAtPrice.d.ts +13 -0
- package/serialization/types/SkuFieldDataCompareAtPrice.js +34 -0
- package/serialization/types/SkuFieldDataEcSkuBillingMethod.d.ts +10 -0
- package/serialization/types/SkuFieldDataEcSkuBillingMethod.js +31 -0
- package/serialization/types/SkuFieldDataEcSkuSubscriptionPlan.d.ts +14 -0
- package/serialization/types/SkuFieldDataEcSkuSubscriptionPlan.js +46 -0
- package/serialization/types/SkuFieldDataEcSkuSubscriptionPlanInterval.d.ts +10 -0
- package/serialization/types/SkuFieldDataEcSkuSubscriptionPlanInterval.js +31 -0
- package/serialization/types/SkuPropertyList.d.ts +3 -3
- package/serialization/types/SkuPropertyList.js +3 -5
- package/serialization/types/SkuPropertyListEnumItem.d.ts +3 -3
- package/serialization/types/SkuPropertyListEnumItem.js +3 -3
- package/serialization/types/TextNode.d.ts +13 -0
- package/serialization/types/TextNode.js +34 -0
- package/serialization/types/index.d.ts +14 -0
- package/serialization/types/index.js +14 -0
- package/tests/client.test.ts +11 -0
- package/api/resources/products/client/requests/ProductsCreateRequest.d.ts +0 -50
- package/dist/api/resources/products/client/requests/ProductsCreateRequest.d.ts +0 -50
- package/dist/oauth.d.ts +0 -27
- package/dist/oauth.js +0 -113
- package/oauth.d.ts +0 -27
- package/oauth.js +0 -113
- /package/api/resources/{products/client/requests/ProductsCreateRequest.js → assets/client/requests/AssetsUpdateRequest.js} +0 -0
- /package/{dist/api/resources/products/client/requests/ProductsCreateRequest.js → api/resources/collections/resources/fields/client/requests/FieldCreate.js} +0 -0
package/README.md
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
# Webflow JS SDK
|
|
2
2
|
|
|
3
|
+
[](https://www.npmjs.com/package/webflow-api)
|
|
4
|
+
[](https://github.com/fern-api/fern)
|
|
5
|
+
|
|
3
6
|
The Webflow JavaScript SDK provides convenient access to the [Webflow Data API](https://developers.webflow.com/reference/rest-introduction) from
|
|
4
7
|
applications written in JS.
|
|
5
8
|
|
|
@@ -7,7 +10,35 @@ The SDK contains typings and request builders for the Webflow Data API.
|
|
|
7
10
|
|
|
8
11
|
## Documentation
|
|
9
12
|
|
|
10
|
-
Explore the API reference documentation
|
|
13
|
+
Explore the [API reference documentation](https://developers.webflow.com/reference/rest-introduction).
|
|
14
|
+
|
|
15
|
+
## V2 Migration Guide
|
|
16
|
+
|
|
17
|
+
> The SDK was rewritten in V2 and is now programatically generated from our OpenAPI spec. As part of this release there are some breaking changes.
|
|
18
|
+
|
|
19
|
+
#### Client Instantiation
|
|
20
|
+
The SDK exports `WebflowClient` instead of `Webflow`. The client now takes `accessToken` instead of `token`.
|
|
21
|
+
|
|
22
|
+
```ts
|
|
23
|
+
const webflow = new WebflowClient({ accessToken: "..." });
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
#### Oauth
|
|
27
|
+
The `WebflowClient` exports static methods that you can use for OAuth. These were previously on `Webflow`.
|
|
28
|
+
|
|
29
|
+
`webflow.authorizeUrl` -> `WebflowClient.authorizeURL`
|
|
30
|
+
|
|
31
|
+
`webflow.accessToken` -> `WebflowClient.getAccessToken`
|
|
32
|
+
|
|
33
|
+
`webflow.revokeToken` -> `WebflowClient.revokeToken`
|
|
34
|
+
|
|
35
|
+
#### HTTP Client
|
|
36
|
+
The SDK no longer uses Axios and defaults to fetch. The SDK supports multiple runtimes and will handle
|
|
37
|
+
using a fetch implementation if available or will default to `node-fetch`.
|
|
38
|
+
|
|
39
|
+
### Resources
|
|
40
|
+
Previously the SDK only supported the most important resources, such as site and user. Now the SDK supports
|
|
41
|
+
methods on a variety of different endpoints such as `collections`, `assets`, `forms`, `inventory`, `orders`, etc.
|
|
11
42
|
|
|
12
43
|
## Installation
|
|
13
44
|
|
|
@@ -133,7 +164,7 @@ You can configure the retries by setting maxRetries.
|
|
|
133
164
|
import { WebflowClient } from 'webflow';
|
|
134
165
|
|
|
135
166
|
const sites = await webflow.sites.get(..., {
|
|
136
|
-
maxRetries: 10 // override the
|
|
167
|
+
maxRetries: 10 // override the retries
|
|
137
168
|
});
|
|
138
169
|
```
|
|
139
170
|
|
|
@@ -27,9 +27,7 @@ export declare class AccessGroups {
|
|
|
27
27
|
* @throws {@link Webflow.InternalServerError}
|
|
28
28
|
*
|
|
29
29
|
* @example
|
|
30
|
-
* await webflow.accessGroups.list("
|
|
31
|
-
* sort: Webflow.AccessGroupsListRequestSort.CreatedOnAscending
|
|
32
|
-
* })
|
|
30
|
+
* await webflow.accessGroups.list("site_id", {})
|
|
33
31
|
*/
|
|
34
32
|
list(siteId: string, request?: Webflow.AccessGroupsListRequest, requestOptions?: AccessGroups.RequestOptions): Promise<Webflow.AccessGroupList>;
|
|
35
33
|
protected _getAuthorizationHeader(): Promise<string>;
|
|
@@ -59,9 +59,7 @@ class AccessGroups {
|
|
|
59
59
|
* @throws {@link Webflow.InternalServerError}
|
|
60
60
|
*
|
|
61
61
|
* @example
|
|
62
|
-
* await webflow.accessGroups.list("
|
|
63
|
-
* sort: Webflow.AccessGroupsListRequestSort.CreatedOnAscending
|
|
64
|
-
* })
|
|
62
|
+
* await webflow.accessGroups.list("site_id", {})
|
|
65
63
|
*/
|
|
66
64
|
list(siteId, request = {}, requestOptions) {
|
|
67
65
|
var _a;
|
|
@@ -78,13 +76,15 @@ class AccessGroups {
|
|
|
78
76
|
_queryParams["sort"] = sort;
|
|
79
77
|
}
|
|
80
78
|
const _response = yield core.fetcher({
|
|
81
|
-
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.WebflowEnvironment.Default, `
|
|
79
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.WebflowEnvironment.Default, `sites/${siteId}/accessgroups`),
|
|
82
80
|
method: "GET",
|
|
83
81
|
headers: {
|
|
84
82
|
Authorization: yield this._getAuthorizationHeader(),
|
|
85
83
|
"X-Fern-Language": "JavaScript",
|
|
86
84
|
"X-Fern-SDK-Name": "webflow-api",
|
|
87
|
-
"X-Fern-SDK-Version": "
|
|
85
|
+
"X-Fern-SDK-Version": "v2.1.1",
|
|
86
|
+
"X-Fern-Runtime": core.RUNTIME.type,
|
|
87
|
+
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
88
88
|
},
|
|
89
89
|
contentType: "application/json",
|
|
90
90
|
queryParameters: _queryParams,
|
|
@@ -26,7 +26,7 @@ export declare class Assets {
|
|
|
26
26
|
* @throws {@link Webflow.InternalServerError}
|
|
27
27
|
*
|
|
28
28
|
* @example
|
|
29
|
-
* await webflow.assets.list("
|
|
29
|
+
* await webflow.assets.list("site_id")
|
|
30
30
|
*/
|
|
31
31
|
list(siteId: string, requestOptions?: Assets.RequestOptions): Promise<Webflow.Asset[]>;
|
|
32
32
|
/**
|
|
@@ -38,7 +38,7 @@ export declare class Assets {
|
|
|
38
38
|
* @throws {@link Webflow.InternalServerError}
|
|
39
39
|
*
|
|
40
40
|
* @example
|
|
41
|
-
* await webflow.assets.create("
|
|
41
|
+
* await webflow.assets.create("site_id", {
|
|
42
42
|
* fileName: "file.png",
|
|
43
43
|
* fileHash: "3c7d87c9575702bc3b1e991f4d3c638e",
|
|
44
44
|
* parentFolder: "6436b1ce5281cace05b65aea"
|
|
@@ -54,7 +54,7 @@ export declare class Assets {
|
|
|
54
54
|
* @throws {@link Webflow.InternalServerError}
|
|
55
55
|
*
|
|
56
56
|
* @example
|
|
57
|
-
* await webflow.assets.get("
|
|
57
|
+
* await webflow.assets.get("asset_id")
|
|
58
58
|
*/
|
|
59
59
|
get(assetId: string, requestOptions?: Assets.RequestOptions): Promise<Webflow.Asset>;
|
|
60
60
|
/**
|
|
@@ -66,9 +66,23 @@ export declare class Assets {
|
|
|
66
66
|
* @throws {@link Webflow.InternalServerError}
|
|
67
67
|
*
|
|
68
68
|
* @example
|
|
69
|
-
* await webflow.assets.delete("
|
|
69
|
+
* await webflow.assets.delete("asset_id")
|
|
70
70
|
*/
|
|
71
71
|
delete(assetId: string, requestOptions?: Assets.RequestOptions): Promise<void>;
|
|
72
|
+
/**
|
|
73
|
+
* Update an Asset </br></br> Required scope | `assets:write`
|
|
74
|
+
* @throws {@link Webflow.BadRequestError}
|
|
75
|
+
* @throws {@link Webflow.UnauthorizedError}
|
|
76
|
+
* @throws {@link Webflow.NotFoundError}
|
|
77
|
+
* @throws {@link Webflow.TooManyRequestsError}
|
|
78
|
+
* @throws {@link Webflow.InternalServerError}
|
|
79
|
+
*
|
|
80
|
+
* @example
|
|
81
|
+
* await webflow.assets.update("asset_id", {
|
|
82
|
+
* displayName: "file.png"
|
|
83
|
+
* })
|
|
84
|
+
*/
|
|
85
|
+
update(assetId: string, request: Webflow.AssetsUpdateRequest, requestOptions?: Assets.RequestOptions): Promise<Webflow.Asset>;
|
|
72
86
|
/**
|
|
73
87
|
* List Asset Folders within a given site <br><br> Required scope | `assets:read`
|
|
74
88
|
* @throws {@link Webflow.BadRequestError}
|
|
@@ -78,7 +92,7 @@ export declare class Assets {
|
|
|
78
92
|
* @throws {@link Webflow.InternalServerError}
|
|
79
93
|
*
|
|
80
94
|
* @example
|
|
81
|
-
* await webflow.assets.listFolders("
|
|
95
|
+
* await webflow.assets.listFolders("site_id")
|
|
82
96
|
*/
|
|
83
97
|
listFolders(siteId: string, requestOptions?: Assets.RequestOptions): Promise<Webflow.AssetFolderList>;
|
|
84
98
|
/**
|
|
@@ -90,7 +104,7 @@ export declare class Assets {
|
|
|
90
104
|
* @throws {@link Webflow.InternalServerError}
|
|
91
105
|
*
|
|
92
106
|
* @example
|
|
93
|
-
* await webflow.assets.createFolder("
|
|
107
|
+
* await webflow.assets.createFolder("site_id", {
|
|
94
108
|
* displayName: "my asset folder",
|
|
95
109
|
* parentFolder: "6390c49774a71f99f21a08eb"
|
|
96
110
|
* })
|
|
@@ -105,7 +119,7 @@ export declare class Assets {
|
|
|
105
119
|
* @throws {@link Webflow.InternalServerError}
|
|
106
120
|
*
|
|
107
121
|
* @example
|
|
108
|
-
* await webflow.assets.getFolder("
|
|
122
|
+
* await webflow.assets.getFolder("asset_folder_id")
|
|
109
123
|
*/
|
|
110
124
|
getFolder(assetFolderId: string, requestOptions?: Assets.RequestOptions): Promise<Webflow.AssetFolder>;
|
|
111
125
|
protected _getAuthorizationHeader(): Promise<string>;
|
|
@@ -58,19 +58,21 @@ class Assets {
|
|
|
58
58
|
* @throws {@link Webflow.InternalServerError}
|
|
59
59
|
*
|
|
60
60
|
* @example
|
|
61
|
-
* await webflow.assets.list("
|
|
61
|
+
* await webflow.assets.list("site_id")
|
|
62
62
|
*/
|
|
63
63
|
list(siteId, requestOptions) {
|
|
64
64
|
var _a;
|
|
65
65
|
return __awaiter(this, void 0, void 0, function* () {
|
|
66
66
|
const _response = yield core.fetcher({
|
|
67
|
-
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.WebflowEnvironment.Default, `
|
|
67
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.WebflowEnvironment.Default, `sites/${siteId}/assets`),
|
|
68
68
|
method: "GET",
|
|
69
69
|
headers: {
|
|
70
70
|
Authorization: yield this._getAuthorizationHeader(),
|
|
71
71
|
"X-Fern-Language": "JavaScript",
|
|
72
72
|
"X-Fern-SDK-Name": "webflow-api",
|
|
73
|
-
"X-Fern-SDK-Version": "
|
|
73
|
+
"X-Fern-SDK-Version": "v2.1.1",
|
|
74
|
+
"X-Fern-Runtime": core.RUNTIME.type,
|
|
75
|
+
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
74
76
|
},
|
|
75
77
|
contentType: "application/json",
|
|
76
78
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -128,7 +130,7 @@ class Assets {
|
|
|
128
130
|
* @throws {@link Webflow.InternalServerError}
|
|
129
131
|
*
|
|
130
132
|
* @example
|
|
131
|
-
* await webflow.assets.create("
|
|
133
|
+
* await webflow.assets.create("site_id", {
|
|
132
134
|
* fileName: "file.png",
|
|
133
135
|
* fileHash: "3c7d87c9575702bc3b1e991f4d3c638e",
|
|
134
136
|
* parentFolder: "6436b1ce5281cace05b65aea"
|
|
@@ -138,13 +140,15 @@ class Assets {
|
|
|
138
140
|
var _a;
|
|
139
141
|
return __awaiter(this, void 0, void 0, function* () {
|
|
140
142
|
const _response = yield core.fetcher({
|
|
141
|
-
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.WebflowEnvironment.Default, `
|
|
143
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.WebflowEnvironment.Default, `sites/${siteId}/assets`),
|
|
142
144
|
method: "POST",
|
|
143
145
|
headers: {
|
|
144
146
|
Authorization: yield this._getAuthorizationHeader(),
|
|
145
147
|
"X-Fern-Language": "JavaScript",
|
|
146
148
|
"X-Fern-SDK-Name": "webflow-api",
|
|
147
|
-
"X-Fern-SDK-Version": "
|
|
149
|
+
"X-Fern-SDK-Version": "v2.1.1",
|
|
150
|
+
"X-Fern-Runtime": core.RUNTIME.type,
|
|
151
|
+
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
148
152
|
},
|
|
149
153
|
contentType: "application/json",
|
|
150
154
|
body: yield serializers.AssetsCreateRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -203,19 +207,21 @@ class Assets {
|
|
|
203
207
|
* @throws {@link Webflow.InternalServerError}
|
|
204
208
|
*
|
|
205
209
|
* @example
|
|
206
|
-
* await webflow.assets.get("
|
|
210
|
+
* await webflow.assets.get("asset_id")
|
|
207
211
|
*/
|
|
208
212
|
get(assetId, requestOptions) {
|
|
209
213
|
var _a;
|
|
210
214
|
return __awaiter(this, void 0, void 0, function* () {
|
|
211
215
|
const _response = yield core.fetcher({
|
|
212
|
-
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.WebflowEnvironment.Default, `
|
|
216
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.WebflowEnvironment.Default, `assets/${assetId}`),
|
|
213
217
|
method: "GET",
|
|
214
218
|
headers: {
|
|
215
219
|
Authorization: yield this._getAuthorizationHeader(),
|
|
216
220
|
"X-Fern-Language": "JavaScript",
|
|
217
221
|
"X-Fern-SDK-Name": "webflow-api",
|
|
218
|
-
"X-Fern-SDK-Version": "
|
|
222
|
+
"X-Fern-SDK-Version": "v2.1.1",
|
|
223
|
+
"X-Fern-Runtime": core.RUNTIME.type,
|
|
224
|
+
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
219
225
|
},
|
|
220
226
|
contentType: "application/json",
|
|
221
227
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -273,19 +279,21 @@ class Assets {
|
|
|
273
279
|
* @throws {@link Webflow.InternalServerError}
|
|
274
280
|
*
|
|
275
281
|
* @example
|
|
276
|
-
* await webflow.assets.delete("
|
|
282
|
+
* await webflow.assets.delete("asset_id")
|
|
277
283
|
*/
|
|
278
284
|
delete(assetId, requestOptions) {
|
|
279
285
|
var _a;
|
|
280
286
|
return __awaiter(this, void 0, void 0, function* () {
|
|
281
287
|
const _response = yield core.fetcher({
|
|
282
|
-
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.WebflowEnvironment.Default, `
|
|
288
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.WebflowEnvironment.Default, `assets/${assetId}`),
|
|
283
289
|
method: "DELETE",
|
|
284
290
|
headers: {
|
|
285
291
|
Authorization: yield this._getAuthorizationHeader(),
|
|
286
292
|
"X-Fern-Language": "JavaScript",
|
|
287
293
|
"X-Fern-SDK-Name": "webflow-api",
|
|
288
|
-
"X-Fern-SDK-Version": "
|
|
294
|
+
"X-Fern-SDK-Version": "v2.1.1",
|
|
295
|
+
"X-Fern-Runtime": core.RUNTIME.type,
|
|
296
|
+
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
289
297
|
},
|
|
290
298
|
contentType: "application/json",
|
|
291
299
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -328,6 +336,81 @@ class Assets {
|
|
|
328
336
|
}
|
|
329
337
|
});
|
|
330
338
|
}
|
|
339
|
+
/**
|
|
340
|
+
* Update an Asset </br></br> Required scope | `assets:write`
|
|
341
|
+
* @throws {@link Webflow.BadRequestError}
|
|
342
|
+
* @throws {@link Webflow.UnauthorizedError}
|
|
343
|
+
* @throws {@link Webflow.NotFoundError}
|
|
344
|
+
* @throws {@link Webflow.TooManyRequestsError}
|
|
345
|
+
* @throws {@link Webflow.InternalServerError}
|
|
346
|
+
*
|
|
347
|
+
* @example
|
|
348
|
+
* await webflow.assets.update("asset_id", {
|
|
349
|
+
* displayName: "file.png"
|
|
350
|
+
* })
|
|
351
|
+
*/
|
|
352
|
+
update(assetId, request, requestOptions) {
|
|
353
|
+
var _a;
|
|
354
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
355
|
+
const _response = yield core.fetcher({
|
|
356
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.WebflowEnvironment.Default, `assets/${assetId}`),
|
|
357
|
+
method: "PATCH",
|
|
358
|
+
headers: {
|
|
359
|
+
Authorization: yield this._getAuthorizationHeader(),
|
|
360
|
+
"X-Fern-Language": "JavaScript",
|
|
361
|
+
"X-Fern-SDK-Name": "webflow-api",
|
|
362
|
+
"X-Fern-SDK-Version": "v2.1.1",
|
|
363
|
+
"X-Fern-Runtime": core.RUNTIME.type,
|
|
364
|
+
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
365
|
+
},
|
|
366
|
+
contentType: "application/json",
|
|
367
|
+
body: yield serializers.AssetsUpdateRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
368
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
369
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
370
|
+
});
|
|
371
|
+
if (_response.ok) {
|
|
372
|
+
return yield serializers.Asset.parseOrThrow(_response.body, {
|
|
373
|
+
unrecognizedObjectKeys: "passthrough",
|
|
374
|
+
allowUnrecognizedUnionMembers: true,
|
|
375
|
+
allowUnrecognizedEnumValues: true,
|
|
376
|
+
skipValidation: true,
|
|
377
|
+
breadcrumbsPrefix: ["response"],
|
|
378
|
+
});
|
|
379
|
+
}
|
|
380
|
+
if (_response.error.reason === "status-code") {
|
|
381
|
+
switch (_response.error.statusCode) {
|
|
382
|
+
case 400:
|
|
383
|
+
throw new Webflow.BadRequestError(_response.error.body);
|
|
384
|
+
case 401:
|
|
385
|
+
throw new Webflow.UnauthorizedError(_response.error.body);
|
|
386
|
+
case 404:
|
|
387
|
+
throw new Webflow.NotFoundError(_response.error.body);
|
|
388
|
+
case 429:
|
|
389
|
+
throw new Webflow.TooManyRequestsError(_response.error.body);
|
|
390
|
+
case 500:
|
|
391
|
+
throw new Webflow.InternalServerError(_response.error.body);
|
|
392
|
+
default:
|
|
393
|
+
throw new errors.WebflowError({
|
|
394
|
+
statusCode: _response.error.statusCode,
|
|
395
|
+
body: _response.error.body,
|
|
396
|
+
});
|
|
397
|
+
}
|
|
398
|
+
}
|
|
399
|
+
switch (_response.error.reason) {
|
|
400
|
+
case "non-json":
|
|
401
|
+
throw new errors.WebflowError({
|
|
402
|
+
statusCode: _response.error.statusCode,
|
|
403
|
+
body: _response.error.rawBody,
|
|
404
|
+
});
|
|
405
|
+
case "timeout":
|
|
406
|
+
throw new errors.WebflowTimeoutError();
|
|
407
|
+
case "unknown":
|
|
408
|
+
throw new errors.WebflowError({
|
|
409
|
+
message: _response.error.errorMessage,
|
|
410
|
+
});
|
|
411
|
+
}
|
|
412
|
+
});
|
|
413
|
+
}
|
|
331
414
|
/**
|
|
332
415
|
* List Asset Folders within a given site <br><br> Required scope | `assets:read`
|
|
333
416
|
* @throws {@link Webflow.BadRequestError}
|
|
@@ -337,19 +420,21 @@ class Assets {
|
|
|
337
420
|
* @throws {@link Webflow.InternalServerError}
|
|
338
421
|
*
|
|
339
422
|
* @example
|
|
340
|
-
* await webflow.assets.listFolders("
|
|
423
|
+
* await webflow.assets.listFolders("site_id")
|
|
341
424
|
*/
|
|
342
425
|
listFolders(siteId, requestOptions) {
|
|
343
426
|
var _a;
|
|
344
427
|
return __awaiter(this, void 0, void 0, function* () {
|
|
345
428
|
const _response = yield core.fetcher({
|
|
346
|
-
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.WebflowEnvironment.Default, `
|
|
429
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.WebflowEnvironment.Default, `sites/${siteId}/asset_folders`),
|
|
347
430
|
method: "GET",
|
|
348
431
|
headers: {
|
|
349
432
|
Authorization: yield this._getAuthorizationHeader(),
|
|
350
433
|
"X-Fern-Language": "JavaScript",
|
|
351
434
|
"X-Fern-SDK-Name": "webflow-api",
|
|
352
|
-
"X-Fern-SDK-Version": "
|
|
435
|
+
"X-Fern-SDK-Version": "v2.1.1",
|
|
436
|
+
"X-Fern-Runtime": core.RUNTIME.type,
|
|
437
|
+
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
353
438
|
},
|
|
354
439
|
contentType: "application/json",
|
|
355
440
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -407,7 +492,7 @@ class Assets {
|
|
|
407
492
|
* @throws {@link Webflow.InternalServerError}
|
|
408
493
|
*
|
|
409
494
|
* @example
|
|
410
|
-
* await webflow.assets.createFolder("
|
|
495
|
+
* await webflow.assets.createFolder("site_id", {
|
|
411
496
|
* displayName: "my asset folder",
|
|
412
497
|
* parentFolder: "6390c49774a71f99f21a08eb"
|
|
413
498
|
* })
|
|
@@ -416,13 +501,15 @@ class Assets {
|
|
|
416
501
|
var _a;
|
|
417
502
|
return __awaiter(this, void 0, void 0, function* () {
|
|
418
503
|
const _response = yield core.fetcher({
|
|
419
|
-
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.WebflowEnvironment.Default, `
|
|
504
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.WebflowEnvironment.Default, `sites/${siteId}/asset_folders`),
|
|
420
505
|
method: "POST",
|
|
421
506
|
headers: {
|
|
422
507
|
Authorization: yield this._getAuthorizationHeader(),
|
|
423
508
|
"X-Fern-Language": "JavaScript",
|
|
424
509
|
"X-Fern-SDK-Name": "webflow-api",
|
|
425
|
-
"X-Fern-SDK-Version": "
|
|
510
|
+
"X-Fern-SDK-Version": "v2.1.1",
|
|
511
|
+
"X-Fern-Runtime": core.RUNTIME.type,
|
|
512
|
+
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
426
513
|
},
|
|
427
514
|
contentType: "application/json",
|
|
428
515
|
body: yield serializers.AssetsCreateFolderRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -481,19 +568,21 @@ class Assets {
|
|
|
481
568
|
* @throws {@link Webflow.InternalServerError}
|
|
482
569
|
*
|
|
483
570
|
* @example
|
|
484
|
-
* await webflow.assets.getFolder("
|
|
571
|
+
* await webflow.assets.getFolder("asset_folder_id")
|
|
485
572
|
*/
|
|
486
573
|
getFolder(assetFolderId, requestOptions) {
|
|
487
574
|
var _a;
|
|
488
575
|
return __awaiter(this, void 0, void 0, function* () {
|
|
489
576
|
const _response = yield core.fetcher({
|
|
490
|
-
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.WebflowEnvironment.Default, `
|
|
577
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.WebflowEnvironment.Default, `asset_folders/${assetFolderId}`),
|
|
491
578
|
method: "GET",
|
|
492
579
|
headers: {
|
|
493
580
|
Authorization: yield this._getAuthorizationHeader(),
|
|
494
581
|
"X-Fern-Language": "JavaScript",
|
|
495
582
|
"X-Fern-SDK-Name": "webflow-api",
|
|
496
|
-
"X-Fern-SDK-Version": "
|
|
583
|
+
"X-Fern-SDK-Version": "v2.1.1",
|
|
584
|
+
"X-Fern-Runtime": core.RUNTIME.type,
|
|
585
|
+
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
497
586
|
},
|
|
498
587
|
contentType: "application/json",
|
|
499
588
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -28,7 +28,7 @@ export declare class Collections {
|
|
|
28
28
|
* @throws {@link Webflow.InternalServerError}
|
|
29
29
|
*
|
|
30
30
|
* @example
|
|
31
|
-
* await webflow.collections.list("
|
|
31
|
+
* await webflow.collections.list("site_id")
|
|
32
32
|
*/
|
|
33
33
|
list(siteId: string, requestOptions?: Collections.RequestOptions): Promise<Webflow.CollectionList>;
|
|
34
34
|
/**
|
|
@@ -38,6 +38,13 @@ export declare class Collections {
|
|
|
38
38
|
* @throws {@link Webflow.NotFoundError}
|
|
39
39
|
* @throws {@link Webflow.TooManyRequestsError}
|
|
40
40
|
* @throws {@link Webflow.InternalServerError}
|
|
41
|
+
*
|
|
42
|
+
* @example
|
|
43
|
+
* await webflow.collections.create("site_id", {
|
|
44
|
+
* displayName: "Blog Posts",
|
|
45
|
+
* singularName: "Blog Post",
|
|
46
|
+
* slug: "posts"
|
|
47
|
+
* })
|
|
41
48
|
*/
|
|
42
49
|
create(siteId: string, request: Webflow.CollectionsCreateRequest, requestOptions?: Collections.RequestOptions): Promise<Webflow.Collection>;
|
|
43
50
|
/**
|
|
@@ -49,7 +56,7 @@ export declare class Collections {
|
|
|
49
56
|
* @throws {@link Webflow.InternalServerError}
|
|
50
57
|
*
|
|
51
58
|
* @example
|
|
52
|
-
* await webflow.collections.get("
|
|
59
|
+
* await webflow.collections.get("collection_id")
|
|
53
60
|
*/
|
|
54
61
|
get(collectionId: string, requestOptions?: Collections.RequestOptions): Promise<Webflow.Collection>;
|
|
55
62
|
/**
|
|
@@ -61,7 +68,7 @@ export declare class Collections {
|
|
|
61
68
|
* @throws {@link Webflow.InternalServerError}
|
|
62
69
|
*
|
|
63
70
|
* @example
|
|
64
|
-
* await webflow.collections.deleteCollection("
|
|
71
|
+
* await webflow.collections.deleteCollection("collection_id")
|
|
65
72
|
*/
|
|
66
73
|
deleteCollection(collectionId: string, requestOptions?: Collections.RequestOptions): Promise<void>;
|
|
67
74
|
/**
|
|
@@ -73,7 +80,7 @@ export declare class Collections {
|
|
|
73
80
|
* @throws {@link Webflow.InternalServerError}
|
|
74
81
|
*
|
|
75
82
|
* @example
|
|
76
|
-
* await webflow.collections.delete("
|
|
83
|
+
* await webflow.collections.delete("collection_id", "field_id")
|
|
77
84
|
*/
|
|
78
85
|
delete(collectionId: string, fieldId: string, requestOptions?: Collections.RequestOptions): Promise<void>;
|
|
79
86
|
protected _fields: Fields | undefined;
|
|
@@ -60,19 +60,21 @@ class Collections {
|
|
|
60
60
|
* @throws {@link Webflow.InternalServerError}
|
|
61
61
|
*
|
|
62
62
|
* @example
|
|
63
|
-
* await webflow.collections.list("
|
|
63
|
+
* await webflow.collections.list("site_id")
|
|
64
64
|
*/
|
|
65
65
|
list(siteId, requestOptions) {
|
|
66
66
|
var _a;
|
|
67
67
|
return __awaiter(this, void 0, void 0, function* () {
|
|
68
68
|
const _response = yield core.fetcher({
|
|
69
|
-
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.WebflowEnvironment.Default, `
|
|
69
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.WebflowEnvironment.Default, `sites/${siteId}/collections`),
|
|
70
70
|
method: "GET",
|
|
71
71
|
headers: {
|
|
72
72
|
Authorization: yield this._getAuthorizationHeader(),
|
|
73
73
|
"X-Fern-Language": "JavaScript",
|
|
74
74
|
"X-Fern-SDK-Name": "webflow-api",
|
|
75
|
-
"X-Fern-SDK-Version": "
|
|
75
|
+
"X-Fern-SDK-Version": "v2.1.1",
|
|
76
|
+
"X-Fern-Runtime": core.RUNTIME.type,
|
|
77
|
+
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
76
78
|
},
|
|
77
79
|
contentType: "application/json",
|
|
78
80
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -128,18 +130,27 @@ class Collections {
|
|
|
128
130
|
* @throws {@link Webflow.NotFoundError}
|
|
129
131
|
* @throws {@link Webflow.TooManyRequestsError}
|
|
130
132
|
* @throws {@link Webflow.InternalServerError}
|
|
133
|
+
*
|
|
134
|
+
* @example
|
|
135
|
+
* await webflow.collections.create("site_id", {
|
|
136
|
+
* displayName: "Blog Posts",
|
|
137
|
+
* singularName: "Blog Post",
|
|
138
|
+
* slug: "posts"
|
|
139
|
+
* })
|
|
131
140
|
*/
|
|
132
141
|
create(siteId, request, requestOptions) {
|
|
133
142
|
var _a;
|
|
134
143
|
return __awaiter(this, void 0, void 0, function* () {
|
|
135
144
|
const _response = yield core.fetcher({
|
|
136
|
-
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.WebflowEnvironment.Default, `
|
|
145
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.WebflowEnvironment.Default, `sites/${siteId}/collections`),
|
|
137
146
|
method: "POST",
|
|
138
147
|
headers: {
|
|
139
148
|
Authorization: yield this._getAuthorizationHeader(),
|
|
140
149
|
"X-Fern-Language": "JavaScript",
|
|
141
150
|
"X-Fern-SDK-Name": "webflow-api",
|
|
142
|
-
"X-Fern-SDK-Version": "
|
|
151
|
+
"X-Fern-SDK-Version": "v2.1.1",
|
|
152
|
+
"X-Fern-Runtime": core.RUNTIME.type,
|
|
153
|
+
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
143
154
|
},
|
|
144
155
|
contentType: "application/json",
|
|
145
156
|
body: yield serializers.CollectionsCreateRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -198,19 +209,21 @@ class Collections {
|
|
|
198
209
|
* @throws {@link Webflow.InternalServerError}
|
|
199
210
|
*
|
|
200
211
|
* @example
|
|
201
|
-
* await webflow.collections.get("
|
|
212
|
+
* await webflow.collections.get("collection_id")
|
|
202
213
|
*/
|
|
203
214
|
get(collectionId, requestOptions) {
|
|
204
215
|
var _a;
|
|
205
216
|
return __awaiter(this, void 0, void 0, function* () {
|
|
206
217
|
const _response = yield core.fetcher({
|
|
207
|
-
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.WebflowEnvironment.Default, `
|
|
218
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.WebflowEnvironment.Default, `collections/${collectionId}`),
|
|
208
219
|
method: "GET",
|
|
209
220
|
headers: {
|
|
210
221
|
Authorization: yield this._getAuthorizationHeader(),
|
|
211
222
|
"X-Fern-Language": "JavaScript",
|
|
212
223
|
"X-Fern-SDK-Name": "webflow-api",
|
|
213
|
-
"X-Fern-SDK-Version": "
|
|
224
|
+
"X-Fern-SDK-Version": "v2.1.1",
|
|
225
|
+
"X-Fern-Runtime": core.RUNTIME.type,
|
|
226
|
+
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
214
227
|
},
|
|
215
228
|
contentType: "application/json",
|
|
216
229
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -268,19 +281,21 @@ class Collections {
|
|
|
268
281
|
* @throws {@link Webflow.InternalServerError}
|
|
269
282
|
*
|
|
270
283
|
* @example
|
|
271
|
-
* await webflow.collections.deleteCollection("
|
|
284
|
+
* await webflow.collections.deleteCollection("collection_id")
|
|
272
285
|
*/
|
|
273
286
|
deleteCollection(collectionId, requestOptions) {
|
|
274
287
|
var _a;
|
|
275
288
|
return __awaiter(this, void 0, void 0, function* () {
|
|
276
289
|
const _response = yield core.fetcher({
|
|
277
|
-
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.WebflowEnvironment.Default, `
|
|
290
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.WebflowEnvironment.Default, `collections/${collectionId}`),
|
|
278
291
|
method: "DELETE",
|
|
279
292
|
headers: {
|
|
280
293
|
Authorization: yield this._getAuthorizationHeader(),
|
|
281
294
|
"X-Fern-Language": "JavaScript",
|
|
282
295
|
"X-Fern-SDK-Name": "webflow-api",
|
|
283
|
-
"X-Fern-SDK-Version": "
|
|
296
|
+
"X-Fern-SDK-Version": "v2.1.1",
|
|
297
|
+
"X-Fern-Runtime": core.RUNTIME.type,
|
|
298
|
+
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
284
299
|
},
|
|
285
300
|
contentType: "application/json",
|
|
286
301
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -332,19 +347,21 @@ class Collections {
|
|
|
332
347
|
* @throws {@link Webflow.InternalServerError}
|
|
333
348
|
*
|
|
334
349
|
* @example
|
|
335
|
-
* await webflow.collections.delete("
|
|
350
|
+
* await webflow.collections.delete("collection_id", "field_id")
|
|
336
351
|
*/
|
|
337
352
|
delete(collectionId, fieldId, requestOptions) {
|
|
338
353
|
var _a;
|
|
339
354
|
return __awaiter(this, void 0, void 0, function* () {
|
|
340
355
|
const _response = yield core.fetcher({
|
|
341
|
-
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.WebflowEnvironment.Default, `
|
|
356
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.WebflowEnvironment.Default, `collections/${collectionId}/fields/${fieldId}`),
|
|
342
357
|
method: "DELETE",
|
|
343
358
|
headers: {
|
|
344
359
|
Authorization: yield this._getAuthorizationHeader(),
|
|
345
360
|
"X-Fern-Language": "JavaScript",
|
|
346
361
|
"X-Fern-SDK-Name": "webflow-api",
|
|
347
|
-
"X-Fern-SDK-Version": "
|
|
362
|
+
"X-Fern-SDK-Version": "v2.1.1",
|
|
363
|
+
"X-Fern-Runtime": core.RUNTIME.type,
|
|
364
|
+
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
348
365
|
},
|
|
349
366
|
contentType: "application/json",
|
|
350
367
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|