webflow-api 2.4.2 → 2.5.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 +2495 -0
- package/.mock/definition/accessGroups.yml +80 -0
- package/.mock/definition/api.yml +13 -0
- package/.mock/definition/assets.yml +414 -0
- package/.mock/definition/collections/fields.yml +187 -0
- package/.mock/definition/collections/items.yml +1511 -0
- package/.mock/definition/collections.yml +185 -0
- package/.mock/definition/ecommerce.yml +42 -0
- package/.mock/definition/forms.yml +301 -0
- package/.mock/definition/inventory.yml +120 -0
- package/.mock/definition/orders.yml +1569 -0
- package/.mock/definition/pages/scripts.yml +169 -0
- package/.mock/definition/pages.yml +443 -0
- package/.mock/definition/products.yml +500 -0
- package/.mock/definition/scripts.yml +257 -0
- package/.mock/definition/sites/activityLogs.yml +65 -0
- package/.mock/definition/sites/scripts.yml +228 -0
- package/.mock/definition/sites.yml +299 -0
- package/.mock/definition/token.yml +71 -0
- package/.mock/definition/users.yml +392 -0
- package/.mock/definition/webhooks.yml +189 -0
- package/.mock/fern.config.json +4 -0
- package/Client.d.ts +2 -0
- package/README.md +23 -30
- package/api/errors/InternalServerError.d.ts +2 -1
- package/api/errors/NotFoundError.d.ts +2 -1
- package/api/errors/TooManyRequestsError.d.ts +1 -1
- package/api/errors/UnauthorizedError.d.ts +2 -1
- package/api/resources/accessGroups/client/Client.d.ts +5 -1
- package/api/resources/accessGroups/client/Client.js +27 -15
- package/api/resources/assets/client/Client.d.ts +31 -11
- package/api/resources/assets/client/Client.js +236 -126
- package/api/resources/assets/client/requests/AssetsCreateRequest.d.ts +2 -2
- package/api/resources/assets/client/requests/AssetsUpdateRequest.d.ts +5 -5
- package/api/resources/collections/client/Client.d.ts +15 -22
- package/api/resources/collections/client/Client.js +109 -137
- package/api/resources/collections/resources/fields/client/Client.d.ts +34 -2
- package/api/resources/collections/resources/fields/client/Client.js +163 -32
- package/api/resources/collections/resources/items/client/Client.d.ts +302 -30
- package/api/resources/collections/resources/items/client/Client.js +959 -221
- package/api/resources/collections/resources/items/client/requests/CreateBulkCollectionItemRequestBody.d.ts +61 -0
- package/api/resources/collections/resources/items/client/requests/ItemsDeleteItemsLiveRequest.d.ts +11 -0
- package/api/resources/collections/resources/items/client/requests/ItemsDeleteItemsRequest.d.ts +11 -0
- package/api/resources/collections/resources/items/client/requests/ItemsUpdateItemsLiveRequest.d.ts +128 -0
- package/api/resources/collections/resources/items/client/requests/ItemsUpdateItemsRequest.d.ts +128 -0
- package/api/resources/collections/resources/items/client/requests/ItemsUpdateItemsRequest.js +5 -0
- package/api/resources/collections/resources/items/client/requests/index.d.ts +5 -0
- package/api/resources/collections/resources/items/types/CreateBulkCollectionItemRequestBodyFieldData.d.ts +5 -0
- package/api/resources/collections/resources/items/types/CreateBulkCollectionItemRequestBodyFieldData.js +5 -0
- package/api/resources/collections/resources/items/types/CreateBulkCollectionItemRequestBodyFieldDataItem.d.ts +14 -0
- package/api/resources/collections/resources/items/types/CreateBulkCollectionItemRequestBodyFieldDataItem.js +5 -0
- package/api/resources/collections/resources/items/types/CreateBulkCollectionItemRequestBodyFieldDataName.d.ts +14 -0
- package/api/resources/collections/resources/items/types/CreateBulkCollectionItemRequestBodyFieldDataName.js +5 -0
- package/api/resources/collections/resources/items/types/ItemsCreateItemLiveRequest.d.ts +5 -0
- package/api/resources/collections/resources/items/types/ItemsCreateItemLiveRequest.js +5 -0
- package/api/resources/collections/resources/items/types/ItemsCreateItemLiveRequestItems.d.ts +8 -0
- package/api/resources/collections/resources/items/types/ItemsCreateItemLiveRequestItems.js +5 -0
- package/api/resources/collections/resources/items/types/ItemsCreateItemRequest.d.ts +5 -0
- package/api/resources/collections/resources/items/types/ItemsCreateItemRequest.js +5 -0
- package/api/resources/collections/resources/items/types/ItemsCreateItemRequestItems.d.ts +8 -0
- package/api/resources/collections/resources/items/types/ItemsCreateItemRequestItems.js +5 -0
- package/api/resources/collections/resources/items/types/ItemsDeleteItemsLiveRequestItemsItem.d.ts +9 -0
- package/api/resources/collections/resources/items/types/ItemsDeleteItemsLiveRequestItemsItem.js +5 -0
- package/api/resources/collections/resources/items/types/ItemsDeleteItemsRequestItemsItem.d.ts +9 -0
- package/api/resources/collections/resources/items/types/ItemsDeleteItemsRequestItemsItem.js +5 -0
- package/api/resources/collections/resources/items/types/index.d.ts +9 -0
- package/api/resources/collections/resources/items/types/index.js +9 -0
- package/api/resources/ecommerce/client/Client.d.ts +2 -0
- package/api/resources/ecommerce/client/Client.js +24 -14
- package/api/resources/forms/client/Client.d.ts +17 -5
- package/api/resources/forms/client/Client.js +140 -76
- package/api/resources/inventory/client/Client.d.ts +8 -1
- package/api/resources/inventory/client/Client.js +59 -30
- package/api/resources/orders/client/Client.d.ts +7 -2
- package/api/resources/orders/client/Client.js +164 -89
- package/api/resources/pages/client/Client.d.ts +25 -14
- package/api/resources/pages/client/Client.js +169 -100
- package/api/resources/pages/client/requests/DomWrite.d.ts +6 -6
- package/api/resources/pages/client/requests/PagesGetContentRequest.d.ts +2 -2
- package/api/resources/pages/client/requests/PagesGetMetadataRequest.d.ts +2 -2
- package/api/resources/pages/client/requests/PagesListRequest.d.ts +2 -2
- package/api/resources/pages/client/requests/UpdatePageSettingsRequest.d.ts +3 -4
- package/api/resources/pages/resources/scripts/client/Client.d.ts +29 -3
- package/api/resources/pages/resources/scripts/client/Client.js +104 -46
- package/api/resources/products/client/Client.d.ts +26 -10
- package/api/resources/products/client/Client.js +188 -98
- package/api/resources/scripts/client/Client.d.ts +31 -3
- package/api/resources/scripts/client/Client.js +111 -47
- package/api/resources/sites/client/Client.d.ts +16 -4
- package/api/resources/sites/client/Client.js +101 -59
- package/api/resources/sites/client/requests/SitesPublishRequest.d.ts +1 -1
- package/api/resources/sites/resources/activityLogs/client/Client.d.ts +2 -0
- package/api/resources/sites/resources/activityLogs/client/Client.js +17 -13
- package/api/resources/sites/resources/scripts/client/Client.d.ts +26 -4
- package/api/resources/sites/resources/scripts/client/Client.js +125 -61
- package/api/resources/token/client/Client.d.ts +7 -2
- package/api/resources/token/client/Client.js +23 -24
- package/api/resources/users/client/Client.d.ts +21 -6
- package/api/resources/users/client/Client.js +149 -78
- package/api/resources/webhooks/client/Client.d.ts +15 -2
- package/api/resources/webhooks/client/Client.js +114 -59
- package/api/types/AssetFolder.d.ts +1 -1
- package/api/types/AuthorizationAuthorization.d.ts +1 -1
- package/api/types/AuthorizedUser.d.ts +1 -1
- package/api/types/BulkCollectionItemFieldData.d.ts +1 -1
- package/api/types/CollectionItem.d.ts +1 -1
- package/api/types/CollectionItemFieldData.d.ts +1 -1
- package/api/types/CollectionItemListNoPagination.d.ts +11 -0
- package/api/types/CollectionItemListNoPagination.js +5 -0
- package/api/types/CollectionItemWithIdInput.d.ts +24 -0
- package/api/types/CollectionItemWithIdInput.js +5 -0
- package/api/types/CollectionItemWithIdInputFieldData.d.ts +11 -0
- package/api/types/CollectionItemWithIdInputFieldData.js +5 -0
- package/api/types/ConflictErrorBody.d.ts +1 -10
- package/api/types/CustomCodeBlock.d.ts +2 -2
- package/api/types/DuplicateUserEmail.d.ts +1 -11
- package/api/types/ErrorCode.d.ts +38 -0
- package/api/types/ErrorCode.js +37 -0
- package/api/types/Error_.d.ts +1 -1
- package/api/types/ForbiddenErrorBody.d.ts +2 -7
- package/api/types/Form.d.ts +8 -8
- package/api/types/FormSubmission.d.ts +3 -3
- package/api/types/InvalidScopes.d.ts +4 -0
- package/api/types/InvalidScopes.js +5 -0
- package/api/types/NotEnterprisePlanSite.d.ts +1 -11
- package/api/types/Order.d.ts +5 -1
- package/api/types/Page.d.ts +2 -0
- package/api/types/Site.d.ts +4 -0
- package/api/types/SiteActivityLogItem.d.ts +1 -1
- package/api/types/SiteActivityLogItemEvent.d.ts +48 -0
- package/api/types/SiteActivityLogItemEvent.js +50 -0
- package/api/types/SiteActivityLogItemResourceOperation.d.ts +5 -1
- package/api/types/SiteActivityLogItemResourceOperation.js +4 -0
- package/api/types/SiteDataCollectionType.d.ts +12 -0
- package/api/types/SiteDataCollectionType.js +11 -0
- package/api/types/UserLimitReached.d.ts +1 -11
- package/api/types/UsersNotEnabled.d.ts +1 -11
- package/api/types/index.d.ts +10 -6
- package/api/types/index.js +10 -6
- package/core/fetcher/Fetcher.d.ts +1 -1
- package/core/fetcher/getResponseBody.js +3 -0
- package/core/fetcher/requestWithRetries.js +13 -4
- package/core/schemas/builders/object/object.js +28 -0
- package/core/schemas/builders/object/types.d.ts +5 -0
- package/dist/Client.d.ts +2 -0
- package/dist/api/errors/InternalServerError.d.ts +2 -1
- package/dist/api/errors/NotFoundError.d.ts +2 -1
- package/dist/api/errors/TooManyRequestsError.d.ts +1 -1
- package/dist/api/errors/UnauthorizedError.d.ts +2 -1
- package/dist/api/resources/accessGroups/client/Client.d.ts +5 -1
- package/dist/api/resources/accessGroups/client/Client.js +27 -15
- package/dist/api/resources/assets/client/Client.d.ts +31 -11
- package/dist/api/resources/assets/client/Client.js +236 -126
- package/dist/api/resources/assets/client/requests/AssetsCreateRequest.d.ts +2 -2
- package/dist/api/resources/assets/client/requests/AssetsUpdateRequest.d.ts +5 -5
- package/dist/api/resources/collections/client/Client.d.ts +15 -22
- package/dist/api/resources/collections/client/Client.js +109 -137
- package/dist/api/resources/collections/resources/fields/client/Client.d.ts +34 -2
- package/dist/api/resources/collections/resources/fields/client/Client.js +163 -32
- package/dist/api/resources/collections/resources/items/client/Client.d.ts +302 -30
- package/dist/api/resources/collections/resources/items/client/Client.js +959 -221
- package/dist/api/resources/collections/resources/items/client/requests/CreateBulkCollectionItemRequestBody.d.ts +61 -0
- package/dist/api/resources/collections/resources/items/client/requests/CreateBulkCollectionItemRequestBody.js +5 -0
- package/dist/api/resources/collections/resources/items/client/requests/ItemsDeleteItemsLiveRequest.d.ts +11 -0
- package/dist/api/resources/collections/resources/items/client/requests/ItemsDeleteItemsLiveRequest.js +5 -0
- package/dist/api/resources/collections/resources/items/client/requests/ItemsDeleteItemsRequest.d.ts +11 -0
- package/dist/api/resources/collections/resources/items/client/requests/ItemsDeleteItemsRequest.js +5 -0
- package/dist/api/resources/collections/resources/items/client/requests/ItemsUpdateItemsLiveRequest.d.ts +128 -0
- package/dist/api/resources/collections/resources/items/client/requests/ItemsUpdateItemsLiveRequest.js +5 -0
- package/dist/api/resources/collections/resources/items/client/requests/ItemsUpdateItemsRequest.d.ts +128 -0
- package/dist/api/resources/collections/resources/items/client/requests/ItemsUpdateItemsRequest.js +5 -0
- package/dist/api/resources/collections/resources/items/client/requests/index.d.ts +5 -0
- package/dist/api/resources/collections/resources/items/types/CreateBulkCollectionItemRequestBodyFieldData.d.ts +5 -0
- package/dist/api/resources/collections/resources/items/types/CreateBulkCollectionItemRequestBodyFieldData.js +5 -0
- package/dist/api/resources/collections/resources/items/types/CreateBulkCollectionItemRequestBodyFieldDataItem.d.ts +14 -0
- package/dist/api/resources/collections/resources/items/types/CreateBulkCollectionItemRequestBodyFieldDataItem.js +5 -0
- package/dist/api/resources/collections/resources/items/types/CreateBulkCollectionItemRequestBodyFieldDataName.d.ts +14 -0
- package/dist/api/resources/collections/resources/items/types/CreateBulkCollectionItemRequestBodyFieldDataName.js +5 -0
- package/dist/api/resources/collections/resources/items/types/ItemsCreateItemLiveRequest.d.ts +5 -0
- package/dist/api/resources/collections/resources/items/types/ItemsCreateItemLiveRequest.js +5 -0
- package/dist/api/resources/collections/resources/items/types/ItemsCreateItemLiveRequestItems.d.ts +8 -0
- package/dist/api/resources/collections/resources/items/types/ItemsCreateItemLiveRequestItems.js +5 -0
- package/dist/api/resources/collections/resources/items/types/ItemsCreateItemRequest.d.ts +5 -0
- package/dist/api/resources/collections/resources/items/types/ItemsCreateItemRequest.js +5 -0
- package/dist/api/resources/collections/resources/items/types/ItemsCreateItemRequestItems.d.ts +8 -0
- package/dist/api/resources/collections/resources/items/types/ItemsCreateItemRequestItems.js +5 -0
- package/dist/api/resources/collections/resources/items/types/ItemsDeleteItemsLiveRequestItemsItem.d.ts +9 -0
- package/dist/api/resources/collections/resources/items/types/ItemsDeleteItemsLiveRequestItemsItem.js +5 -0
- package/dist/api/resources/collections/resources/items/types/ItemsDeleteItemsRequestItemsItem.d.ts +9 -0
- package/dist/api/resources/collections/resources/items/types/ItemsDeleteItemsRequestItemsItem.js +5 -0
- package/dist/api/resources/collections/resources/items/types/index.d.ts +9 -0
- package/dist/api/resources/collections/resources/items/types/index.js +9 -0
- package/dist/api/resources/ecommerce/client/Client.d.ts +2 -0
- package/dist/api/resources/ecommerce/client/Client.js +24 -14
- package/dist/api/resources/forms/client/Client.d.ts +17 -5
- package/dist/api/resources/forms/client/Client.js +140 -76
- package/dist/api/resources/inventory/client/Client.d.ts +8 -1
- package/dist/api/resources/inventory/client/Client.js +59 -30
- package/dist/api/resources/orders/client/Client.d.ts +7 -2
- package/dist/api/resources/orders/client/Client.js +164 -89
- package/dist/api/resources/pages/client/Client.d.ts +25 -14
- package/dist/api/resources/pages/client/Client.js +169 -100
- package/dist/api/resources/pages/client/requests/DomWrite.d.ts +6 -6
- package/dist/api/resources/pages/client/requests/PagesGetContentRequest.d.ts +2 -2
- package/dist/api/resources/pages/client/requests/PagesGetMetadataRequest.d.ts +2 -2
- package/dist/api/resources/pages/client/requests/PagesListRequest.d.ts +2 -2
- package/dist/api/resources/pages/client/requests/UpdatePageSettingsRequest.d.ts +3 -4
- package/dist/api/resources/pages/resources/scripts/client/Client.d.ts +29 -3
- package/dist/api/resources/pages/resources/scripts/client/Client.js +104 -46
- package/dist/api/resources/products/client/Client.d.ts +26 -10
- package/dist/api/resources/products/client/Client.js +188 -98
- package/dist/api/resources/scripts/client/Client.d.ts +31 -3
- package/dist/api/resources/scripts/client/Client.js +111 -47
- package/dist/api/resources/sites/client/Client.d.ts +16 -4
- package/dist/api/resources/sites/client/Client.js +101 -59
- package/dist/api/resources/sites/client/requests/SitesPublishRequest.d.ts +1 -1
- package/dist/api/resources/sites/resources/activityLogs/client/Client.d.ts +2 -0
- package/dist/api/resources/sites/resources/activityLogs/client/Client.js +17 -13
- package/dist/api/resources/sites/resources/scripts/client/Client.d.ts +26 -4
- package/dist/api/resources/sites/resources/scripts/client/Client.js +125 -61
- package/dist/api/resources/token/client/Client.d.ts +7 -2
- package/dist/api/resources/token/client/Client.js +23 -24
- package/dist/api/resources/users/client/Client.d.ts +21 -6
- package/dist/api/resources/users/client/Client.js +149 -78
- package/dist/api/resources/webhooks/client/Client.d.ts +15 -2
- package/dist/api/resources/webhooks/client/Client.js +114 -59
- package/dist/api/types/AssetFolder.d.ts +1 -1
- package/dist/api/types/AuthorizationAuthorization.d.ts +1 -1
- package/dist/api/types/AuthorizedUser.d.ts +1 -1
- package/dist/api/types/BulkCollectionItemFieldData.d.ts +1 -1
- package/dist/api/types/CollectionItem.d.ts +1 -1
- package/dist/api/types/CollectionItemFieldData.d.ts +1 -1
- package/dist/api/types/CollectionItemListNoPagination.d.ts +11 -0
- package/dist/api/types/CollectionItemListNoPagination.js +5 -0
- package/dist/api/types/CollectionItemWithIdInput.d.ts +24 -0
- package/dist/api/types/CollectionItemWithIdInput.js +5 -0
- package/dist/api/types/CollectionItemWithIdInputFieldData.d.ts +11 -0
- package/dist/api/types/CollectionItemWithIdInputFieldData.js +5 -0
- package/dist/api/types/ConflictErrorBody.d.ts +1 -10
- package/dist/api/types/CustomCodeBlock.d.ts +2 -2
- package/dist/api/types/DuplicateUserEmail.d.ts +1 -11
- package/dist/api/types/ErrorCode.d.ts +38 -0
- package/dist/api/types/ErrorCode.js +37 -0
- package/dist/api/types/Error_.d.ts +1 -1
- package/dist/api/types/ForbiddenErrorBody.d.ts +2 -7
- package/dist/api/types/Form.d.ts +8 -8
- package/dist/api/types/FormSubmission.d.ts +3 -3
- package/dist/api/types/InvalidScopes.d.ts +4 -0
- package/dist/api/types/InvalidScopes.js +5 -0
- package/dist/api/types/NotEnterprisePlanSite.d.ts +1 -11
- package/dist/api/types/Order.d.ts +5 -1
- package/dist/api/types/Page.d.ts +2 -0
- package/dist/api/types/Site.d.ts +4 -0
- package/dist/api/types/SiteActivityLogItem.d.ts +1 -1
- package/dist/api/types/SiteActivityLogItemEvent.d.ts +48 -0
- package/dist/api/types/SiteActivityLogItemEvent.js +50 -0
- package/dist/api/types/SiteActivityLogItemResourceOperation.d.ts +5 -1
- package/dist/api/types/SiteActivityLogItemResourceOperation.js +4 -0
- package/dist/api/types/SiteDataCollectionType.d.ts +12 -0
- package/dist/api/types/SiteDataCollectionType.js +11 -0
- package/dist/api/types/UserLimitReached.d.ts +1 -11
- package/dist/api/types/UsersNotEnabled.d.ts +1 -11
- package/dist/api/types/index.d.ts +10 -6
- package/dist/api/types/index.js +10 -6
- package/dist/core/fetcher/Fetcher.d.ts +1 -1
- package/dist/core/fetcher/getResponseBody.js +3 -0
- package/dist/core/fetcher/requestWithRetries.js +13 -4
- package/dist/core/schemas/builders/object/object.js +28 -0
- package/dist/core/schemas/builders/object/types.d.ts +5 -0
- package/dist/errors/WebflowTimeoutError.d.ts +1 -1
- package/dist/errors/WebflowTimeoutError.js +2 -2
- package/dist/serialization/resources/assets/client/requests/AssetsUpdateRequest.d.ts +2 -1
- package/dist/serialization/resources/assets/client/requests/AssetsUpdateRequest.js +2 -1
- package/dist/serialization/resources/collections/resources/items/client/requests/CreateBulkCollectionItemRequestBody.d.ts +16 -0
- package/dist/serialization/resources/collections/resources/items/client/requests/CreateBulkCollectionItemRequestBody.js +37 -0
- package/dist/serialization/resources/collections/resources/items/client/requests/ItemsDeleteItemsLiveRequest.d.ts +13 -0
- package/dist/serialization/resources/collections/resources/items/client/requests/ItemsDeleteItemsLiveRequest.js +34 -0
- package/dist/serialization/resources/collections/resources/items/client/requests/ItemsDeleteItemsRequest.d.ts +13 -0
- package/dist/serialization/resources/collections/resources/items/client/requests/ItemsDeleteItemsRequest.js +34 -0
- package/dist/serialization/resources/collections/resources/items/client/requests/ItemsUpdateItemsLiveRequest.d.ts +13 -0
- package/dist/serialization/resources/collections/resources/items/client/requests/ItemsUpdateItemsLiveRequest.js +34 -0
- package/dist/serialization/resources/collections/resources/items/client/requests/ItemsUpdateItemsRequest.d.ts +13 -0
- package/dist/serialization/resources/collections/resources/items/client/requests/ItemsUpdateItemsRequest.js +34 -0
- package/dist/serialization/resources/collections/resources/items/client/requests/index.d.ts +5 -0
- package/dist/serialization/resources/collections/resources/items/client/requests/index.js +11 -1
- package/dist/serialization/resources/collections/resources/items/types/CreateBulkCollectionItemRequestBodyFieldData.d.ts +12 -0
- package/dist/serialization/resources/collections/resources/items/types/CreateBulkCollectionItemRequestBodyFieldData.js +36 -0
- package/dist/serialization/resources/collections/resources/items/types/CreateBulkCollectionItemRequestBodyFieldDataItem.d.ts +14 -0
- package/dist/serialization/resources/collections/resources/items/types/CreateBulkCollectionItemRequestBodyFieldDataItem.js +36 -0
- package/dist/serialization/resources/collections/resources/items/types/CreateBulkCollectionItemRequestBodyFieldDataName.d.ts +14 -0
- package/dist/serialization/resources/collections/resources/items/types/CreateBulkCollectionItemRequestBodyFieldDataName.js +36 -0
- package/dist/serialization/resources/collections/resources/items/types/ItemsCreateItemLiveRequest.d.ts +12 -0
- package/dist/serialization/resources/collections/resources/items/types/ItemsCreateItemLiveRequest.js +33 -0
- package/dist/serialization/resources/collections/resources/items/types/ItemsCreateItemLiveRequestItems.d.ts +13 -0
- package/dist/serialization/resources/collections/resources/items/types/ItemsCreateItemLiveRequestItems.js +34 -0
- package/dist/serialization/resources/collections/resources/items/types/ItemsCreateItemRequest.d.ts +12 -0
- package/dist/serialization/resources/collections/resources/items/types/ItemsCreateItemRequest.js +33 -0
- package/dist/serialization/resources/collections/resources/items/types/ItemsCreateItemRequestItems.d.ts +13 -0
- package/dist/serialization/resources/collections/resources/items/types/ItemsCreateItemRequestItems.js +34 -0
- package/dist/serialization/resources/collections/resources/items/types/ItemsDeleteItemsLiveRequestItemsItem.d.ts +13 -0
- package/dist/serialization/resources/collections/resources/items/types/ItemsDeleteItemsLiveRequestItemsItem.js +34 -0
- package/dist/serialization/resources/collections/resources/items/types/ItemsDeleteItemsRequestItemsItem.d.ts +13 -0
- package/dist/serialization/resources/collections/resources/items/types/ItemsDeleteItemsRequestItemsItem.js +34 -0
- package/dist/serialization/resources/collections/resources/items/types/index.d.ts +9 -0
- package/dist/serialization/resources/collections/resources/items/types/index.js +9 -0
- package/dist/serialization/resources/pages/client/requests/DomWrite.d.ts +1 -1
- package/dist/serialization/types/BulkCollectionItemFieldData.js +4 -2
- package/dist/serialization/types/CollectionItem.d.ts +1 -1
- package/dist/serialization/types/CollectionItem.js +1 -1
- package/dist/serialization/types/CollectionItemFieldData.js +4 -2
- package/dist/serialization/types/CollectionItemListNoPagination.d.ts +13 -0
- package/dist/serialization/types/{TooManyRequestsErrorBody.js → CollectionItemListNoPagination.js} +4 -6
- package/dist/serialization/types/CollectionItemWithIdInput.d.ts +20 -0
- package/dist/serialization/types/CollectionItemWithIdInput.js +41 -0
- package/dist/serialization/types/CollectionItemWithIdInputFieldData.d.ts +14 -0
- package/dist/serialization/types/{MissingScopes.js → CollectionItemWithIdInputFieldData.js} +7 -8
- package/dist/serialization/types/ConflictErrorBody.d.ts +4 -8
- package/dist/serialization/types/ConflictErrorBody.js +3 -7
- package/dist/serialization/types/DuplicateUserEmail.d.ts +2 -8
- package/dist/serialization/types/DuplicateUserEmail.js +1 -7
- package/dist/serialization/types/ErrorCode.d.ts +10 -0
- package/dist/serialization/types/ErrorCode.js +61 -0
- package/dist/serialization/types/Error_.d.ts +2 -1
- package/dist/serialization/types/Error_.js +2 -1
- package/dist/serialization/types/ForbiddenErrorBody.d.ts +4 -8
- package/dist/serialization/types/ForbiddenErrorBody.js +3 -7
- package/dist/serialization/types/Form.d.ts +1 -1
- package/dist/serialization/types/Form.js +1 -1
- package/dist/serialization/types/InvalidScopes.d.ts +10 -0
- package/{serialization/types/MissingScopes.js → dist/serialization/types/InvalidScopes.js} +2 -8
- package/dist/serialization/types/NotEnterprisePlanSite.d.ts +2 -8
- package/dist/serialization/types/NotEnterprisePlanSite.js +1 -7
- package/dist/serialization/types/Page.d.ts +1 -0
- package/dist/serialization/types/Page.js +1 -0
- package/dist/serialization/types/Site.d.ts +3 -0
- package/dist/serialization/types/Site.js +3 -0
- package/dist/serialization/types/SiteActivityLogItem.d.ts +2 -1
- package/dist/serialization/types/SiteActivityLogItem.js +2 -1
- package/dist/serialization/types/SiteActivityLogItemEvent.d.ts +10 -0
- package/dist/serialization/types/SiteActivityLogItemEvent.js +74 -0
- package/dist/serialization/types/SiteActivityLogItemResourceOperation.d.ts +1 -1
- package/dist/serialization/types/SiteActivityLogItemResourceOperation.js +11 -1
- package/dist/serialization/types/SiteDataCollectionType.d.ts +10 -0
- package/dist/serialization/types/SiteDataCollectionType.js +31 -0
- package/dist/serialization/types/UserLimitReached.d.ts +2 -8
- package/dist/serialization/types/UserLimitReached.js +1 -7
- package/dist/serialization/types/UsersNotEnabled.d.ts +2 -8
- package/dist/serialization/types/UsersNotEnabled.js +1 -7
- package/dist/serialization/types/index.d.ts +10 -5
- package/dist/serialization/types/index.js +10 -5
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/wrapper/ItemsClient.d.ts +23 -49
- package/dist/wrapper/ItemsClient.js +50 -216
- package/dist/wrapper/WebflowClient.d.ts +1 -1
- package/dist/wrapper/WebflowClient.js +4 -3
- package/errors/WebflowTimeoutError.d.ts +1 -1
- package/errors/WebflowTimeoutError.js +2 -2
- package/package.json +1 -2
- package/reference.md +821 -230
- package/serialization/resources/assets/client/requests/AssetsUpdateRequest.d.ts +2 -1
- package/serialization/resources/assets/client/requests/AssetsUpdateRequest.js +2 -1
- package/serialization/resources/collections/resources/items/client/requests/CreateBulkCollectionItemRequestBody.d.ts +16 -0
- package/serialization/resources/collections/resources/items/client/requests/CreateBulkCollectionItemRequestBody.js +37 -0
- package/serialization/resources/collections/resources/items/client/requests/ItemsDeleteItemsLiveRequest.d.ts +13 -0
- package/serialization/resources/collections/resources/items/client/requests/ItemsDeleteItemsLiveRequest.js +34 -0
- package/serialization/resources/collections/resources/items/client/requests/ItemsDeleteItemsRequest.d.ts +13 -0
- package/serialization/resources/collections/resources/items/client/requests/ItemsDeleteItemsRequest.js +34 -0
- package/serialization/resources/collections/resources/items/client/requests/ItemsUpdateItemsLiveRequest.d.ts +13 -0
- package/serialization/resources/collections/resources/items/client/requests/ItemsUpdateItemsLiveRequest.js +34 -0
- package/serialization/resources/collections/resources/items/client/requests/ItemsUpdateItemsRequest.d.ts +13 -0
- package/serialization/resources/collections/resources/items/client/requests/ItemsUpdateItemsRequest.js +34 -0
- package/serialization/resources/collections/resources/items/client/requests/index.d.ts +5 -0
- package/serialization/resources/collections/resources/items/client/requests/index.js +11 -1
- package/serialization/resources/collections/resources/items/types/CreateBulkCollectionItemRequestBodyFieldData.d.ts +12 -0
- package/serialization/resources/collections/resources/items/types/CreateBulkCollectionItemRequestBodyFieldData.js +36 -0
- package/serialization/resources/collections/resources/items/types/CreateBulkCollectionItemRequestBodyFieldDataItem.d.ts +14 -0
- package/serialization/resources/collections/resources/items/types/CreateBulkCollectionItemRequestBodyFieldDataItem.js +36 -0
- package/serialization/resources/collections/resources/items/types/CreateBulkCollectionItemRequestBodyFieldDataName.d.ts +14 -0
- package/serialization/resources/collections/resources/items/types/CreateBulkCollectionItemRequestBodyFieldDataName.js +36 -0
- package/serialization/resources/collections/resources/items/types/ItemsCreateItemLiveRequest.d.ts +12 -0
- package/serialization/resources/collections/resources/items/types/ItemsCreateItemLiveRequest.js +33 -0
- package/serialization/resources/collections/resources/items/types/ItemsCreateItemLiveRequestItems.d.ts +13 -0
- package/serialization/resources/collections/resources/items/types/ItemsCreateItemLiveRequestItems.js +34 -0
- package/serialization/resources/collections/resources/items/types/ItemsCreateItemRequest.d.ts +12 -0
- package/serialization/resources/collections/resources/items/types/ItemsCreateItemRequest.js +33 -0
- package/serialization/resources/collections/resources/items/types/ItemsCreateItemRequestItems.d.ts +13 -0
- package/serialization/resources/collections/resources/items/types/ItemsCreateItemRequestItems.js +34 -0
- package/serialization/resources/collections/resources/items/types/ItemsDeleteItemsLiveRequestItemsItem.d.ts +13 -0
- package/serialization/resources/collections/resources/items/types/ItemsDeleteItemsLiveRequestItemsItem.js +34 -0
- package/serialization/resources/collections/resources/items/types/ItemsDeleteItemsRequestItemsItem.d.ts +13 -0
- package/serialization/resources/collections/resources/items/types/ItemsDeleteItemsRequestItemsItem.js +34 -0
- package/serialization/resources/collections/resources/items/types/index.d.ts +9 -0
- package/serialization/resources/collections/resources/items/types/index.js +9 -0
- package/serialization/resources/pages/client/requests/DomWrite.d.ts +1 -1
- package/serialization/types/BulkCollectionItemFieldData.js +4 -2
- package/serialization/types/CollectionItem.d.ts +1 -1
- package/serialization/types/CollectionItem.js +1 -1
- package/serialization/types/CollectionItemFieldData.js +4 -2
- package/serialization/types/CollectionItemListNoPagination.d.ts +13 -0
- package/serialization/types/{TooManyRequestsErrorBody.js → CollectionItemListNoPagination.js} +4 -6
- package/serialization/types/CollectionItemWithIdInput.d.ts +20 -0
- package/serialization/types/CollectionItemWithIdInput.js +41 -0
- package/serialization/types/CollectionItemWithIdInputFieldData.d.ts +14 -0
- package/serialization/types/CollectionItemWithIdInputFieldData.js +36 -0
- package/serialization/types/ConflictErrorBody.d.ts +4 -8
- package/serialization/types/ConflictErrorBody.js +3 -7
- package/serialization/types/DuplicateUserEmail.d.ts +2 -8
- package/serialization/types/DuplicateUserEmail.js +1 -7
- package/serialization/types/ErrorCode.d.ts +10 -0
- package/serialization/types/ErrorCode.js +61 -0
- package/serialization/types/Error_.d.ts +2 -1
- package/serialization/types/Error_.js +2 -1
- package/serialization/types/ForbiddenErrorBody.d.ts +4 -8
- package/serialization/types/ForbiddenErrorBody.js +3 -7
- package/serialization/types/Form.d.ts +1 -1
- package/serialization/types/Form.js +1 -1
- package/serialization/types/InvalidScopes.d.ts +10 -0
- package/serialization/types/InvalidScopes.js +31 -0
- package/serialization/types/NotEnterprisePlanSite.d.ts +2 -8
- package/serialization/types/NotEnterprisePlanSite.js +1 -7
- package/serialization/types/Page.d.ts +1 -0
- package/serialization/types/Page.js +1 -0
- package/serialization/types/Site.d.ts +3 -0
- package/serialization/types/Site.js +3 -0
- package/serialization/types/SiteActivityLogItem.d.ts +2 -1
- package/serialization/types/SiteActivityLogItem.js +2 -1
- package/serialization/types/SiteActivityLogItemEvent.d.ts +10 -0
- package/serialization/types/SiteActivityLogItemEvent.js +74 -0
- package/serialization/types/SiteActivityLogItemResourceOperation.d.ts +1 -1
- package/serialization/types/SiteActivityLogItemResourceOperation.js +11 -1
- package/serialization/types/SiteDataCollectionType.d.ts +10 -0
- package/serialization/types/SiteDataCollectionType.js +31 -0
- package/serialization/types/UserLimitReached.d.ts +2 -8
- package/serialization/types/UserLimitReached.js +1 -7
- package/serialization/types/UsersNotEnabled.d.ts +2 -8
- package/serialization/types/UsersNotEnabled.js +1 -7
- package/serialization/types/index.d.ts +10 -5
- package/serialization/types/index.js +10 -5
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/wrapper/ItemsClient.d.ts +23 -49
- package/wrapper/ItemsClient.js +50 -216
- package/wrapper/WebflowClient.d.ts +1 -1
- package/wrapper/WebflowClient.js +4 -3
- package/api/types/MissingScopes.d.ts +0 -14
- package/api/types/TooManyRequestsErrorBody.d.ts +0 -9
- package/dist/api/types/MissingScopes.d.ts +0 -14
- package/dist/api/types/TooManyRequestsErrorBody.d.ts +0 -9
- package/dist/serialization/types/MissingScopes.d.ts +0 -16
- package/dist/serialization/types/TooManyRequestsErrorBody.d.ts +0 -15
- package/serialization/types/MissingScopes.d.ts +0 -16
- package/serialization/types/TooManyRequestsErrorBody.d.ts +0 -15
- /package/api/{types/MissingScopes.js → resources/collections/resources/items/client/requests/CreateBulkCollectionItemRequestBody.js} +0 -0
- /package/api/{types/TooManyRequestsErrorBody.js → resources/collections/resources/items/client/requests/ItemsDeleteItemsLiveRequest.js} +0 -0
- /package/{dist/api/types/MissingScopes.js → api/resources/collections/resources/items/client/requests/ItemsDeleteItemsRequest.js} +0 -0
- /package/{dist/api/types/TooManyRequestsErrorBody.js → api/resources/collections/resources/items/client/requests/ItemsUpdateItemsLiveRequest.js} +0 -0
|
@@ -16,13 +16,23 @@ export declare namespace Scripts {
|
|
|
16
16
|
maxRetries?: number;
|
|
17
17
|
/** A hook to abort the request. */
|
|
18
18
|
abortSignal?: AbortSignal;
|
|
19
|
+
/** Additional headers to include in the request. */
|
|
20
|
+
headers?: Record<string, string>;
|
|
19
21
|
}
|
|
20
22
|
}
|
|
21
23
|
export declare class Scripts {
|
|
22
24
|
protected readonly _options: Scripts.Options;
|
|
23
25
|
constructor(_options: Scripts.Options);
|
|
24
26
|
/**
|
|
25
|
-
* Get all registered scripts that have been applied to a specific Page.
|
|
27
|
+
* Get all registered scripts that have been applied to a specific Page.
|
|
28
|
+
*
|
|
29
|
+
* In order to use the Custom Code APIs for Sites and Pages, Custom Code Scripts must first be registered
|
|
30
|
+
* to a Site via the `registered_scripts` endpoints, and then applied to a Site or Page using the appropriate
|
|
31
|
+
* `custom_code` endpoints.
|
|
32
|
+
*
|
|
33
|
+
* <blockquote class="callout callout_info" theme="📘">Access to this endpoint requires a bearer token from a <a href="https://developers.webflow.com/data/docs/getting-started-data-clients">Data Client App</a>.</blockquote>
|
|
34
|
+
*
|
|
35
|
+
* Required scope | `custom_code:read`
|
|
26
36
|
*
|
|
27
37
|
* @param {string} pageId - Unique identifier for a Page
|
|
28
38
|
* @param {Scripts.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -38,7 +48,15 @@ export declare class Scripts {
|
|
|
38
48
|
*/
|
|
39
49
|
getCustomCode(pageId: string, requestOptions?: Scripts.RequestOptions): Promise<Webflow.ScriptApplyList>;
|
|
40
50
|
/**
|
|
41
|
-
* Add a registered script to a Page.
|
|
51
|
+
* Add a registered script to a Page.
|
|
52
|
+
*
|
|
53
|
+
* In order to use the Custom Code APIs for Sites and Pages, Custom Code Scripts must first be registered
|
|
54
|
+
* to a Site via the `registered_scripts` endpoints, and then applied to a Site or Page using the appropriate
|
|
55
|
+
* `custom_code` endpoints.
|
|
56
|
+
*
|
|
57
|
+
* <blockquote class="callout callout_info" theme="📘">Access to this endpoint requires a bearer token from a <a href="https://developers.webflow.com/data/docs/getting-started-data-clients">Data Client App</a>.</blockquote>
|
|
58
|
+
*
|
|
59
|
+
* Required scope | `custom_code:write`
|
|
42
60
|
*
|
|
43
61
|
* @param {string} pageId - Unique identifier for a Page
|
|
44
62
|
* @param {Webflow.ScriptApplyList} request
|
|
@@ -68,7 +86,15 @@ export declare class Scripts {
|
|
|
68
86
|
*/
|
|
69
87
|
upsertCustomCode(pageId: string, request: Webflow.ScriptApplyList, requestOptions?: Scripts.RequestOptions): Promise<Webflow.ScriptApplyList>;
|
|
70
88
|
/**
|
|
71
|
-
* Delete the custom code block that an app has created for a page
|
|
89
|
+
* Delete the custom code block that an app has created for a page
|
|
90
|
+
*
|
|
91
|
+
* In order to use the Custom Code APIs for Sites and Pages, Custom Code Scripts must first be registered
|
|
92
|
+
* to a Site via the `registered_scripts` endpoints, and then applied to a Site or Page using the appropriate
|
|
93
|
+
* `custom_code` endpoints.
|
|
94
|
+
*
|
|
95
|
+
* <blockquote class="callout callout_info" theme="📘">Access to this endpoint requires a bearer token from a <a href="https://developers.webflow.com/data/docs/getting-started-data-clients">Data Client App</a>.</blockquote>
|
|
96
|
+
*
|
|
97
|
+
* Required scope | `custom_code:write`
|
|
72
98
|
*
|
|
73
99
|
* @param {string} pageId - Unique identifier for a Page
|
|
74
100
|
* @param {Scripts.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -50,7 +50,15 @@ class Scripts {
|
|
|
50
50
|
this._options = _options;
|
|
51
51
|
}
|
|
52
52
|
/**
|
|
53
|
-
* Get all registered scripts that have been applied to a specific Page.
|
|
53
|
+
* Get all registered scripts that have been applied to a specific Page.
|
|
54
|
+
*
|
|
55
|
+
* In order to use the Custom Code APIs for Sites and Pages, Custom Code Scripts must first be registered
|
|
56
|
+
* to a Site via the `registered_scripts` endpoints, and then applied to a Site or Page using the appropriate
|
|
57
|
+
* `custom_code` endpoints.
|
|
58
|
+
*
|
|
59
|
+
* <blockquote class="callout callout_info" theme="📘">Access to this endpoint requires a bearer token from a <a href="https://developers.webflow.com/data/docs/getting-started-data-clients">Data Client App</a>.</blockquote>
|
|
60
|
+
*
|
|
61
|
+
* Required scope | `custom_code:read`
|
|
54
62
|
*
|
|
55
63
|
* @param {string} pageId - Unique identifier for a Page
|
|
56
64
|
* @param {Scripts.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -70,15 +78,7 @@ class Scripts {
|
|
|
70
78
|
const _response = yield core.fetcher({
|
|
71
79
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.WebflowEnvironment.Default, `pages/${encodeURIComponent(pageId)}/custom_code`),
|
|
72
80
|
method: "GET",
|
|
73
|
-
headers: {
|
|
74
|
-
Authorization: yield this._getAuthorizationHeader(),
|
|
75
|
-
"X-Fern-Language": "JavaScript",
|
|
76
|
-
"X-Fern-SDK-Name": "webflow-api",
|
|
77
|
-
"X-Fern-SDK-Version": "2.4.2",
|
|
78
|
-
"User-Agent": "webflow-api/2.4.2",
|
|
79
|
-
"X-Fern-Runtime": core.RUNTIME.type,
|
|
80
|
-
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
81
|
-
},
|
|
81
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "2.5.0", "User-Agent": "webflow-api/2.5.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
82
82
|
contentType: "application/json",
|
|
83
83
|
requestType: "json",
|
|
84
84
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -99,11 +99,23 @@ class Scripts {
|
|
|
99
99
|
case 400:
|
|
100
100
|
throw new Webflow.BadRequestError(_response.error.body);
|
|
101
101
|
case 401:
|
|
102
|
-
throw new Webflow.UnauthorizedError(_response.error.body
|
|
102
|
+
throw new Webflow.UnauthorizedError(serializers.Error_.parseOrThrow(_response.error.body, {
|
|
103
|
+
unrecognizedObjectKeys: "passthrough",
|
|
104
|
+
allowUnrecognizedUnionMembers: true,
|
|
105
|
+
allowUnrecognizedEnumValues: true,
|
|
106
|
+
skipValidation: true,
|
|
107
|
+
breadcrumbsPrefix: ["response"],
|
|
108
|
+
}));
|
|
103
109
|
case 404:
|
|
104
|
-
throw new Webflow.NotFoundError(_response.error.body
|
|
110
|
+
throw new Webflow.NotFoundError(serializers.Error_.parseOrThrow(_response.error.body, {
|
|
111
|
+
unrecognizedObjectKeys: "passthrough",
|
|
112
|
+
allowUnrecognizedUnionMembers: true,
|
|
113
|
+
allowUnrecognizedEnumValues: true,
|
|
114
|
+
skipValidation: true,
|
|
115
|
+
breadcrumbsPrefix: ["response"],
|
|
116
|
+
}));
|
|
105
117
|
case 429:
|
|
106
|
-
throw new Webflow.TooManyRequestsError(serializers.
|
|
118
|
+
throw new Webflow.TooManyRequestsError(serializers.Error_.parseOrThrow(_response.error.body, {
|
|
107
119
|
unrecognizedObjectKeys: "passthrough",
|
|
108
120
|
allowUnrecognizedUnionMembers: true,
|
|
109
121
|
allowUnrecognizedEnumValues: true,
|
|
@@ -111,7 +123,13 @@ class Scripts {
|
|
|
111
123
|
breadcrumbsPrefix: ["response"],
|
|
112
124
|
}));
|
|
113
125
|
case 500:
|
|
114
|
-
throw new Webflow.InternalServerError(_response.error.body
|
|
126
|
+
throw new Webflow.InternalServerError(serializers.Error_.parseOrThrow(_response.error.body, {
|
|
127
|
+
unrecognizedObjectKeys: "passthrough",
|
|
128
|
+
allowUnrecognizedUnionMembers: true,
|
|
129
|
+
allowUnrecognizedEnumValues: true,
|
|
130
|
+
skipValidation: true,
|
|
131
|
+
breadcrumbsPrefix: ["response"],
|
|
132
|
+
}));
|
|
115
133
|
default:
|
|
116
134
|
throw new errors.WebflowError({
|
|
117
135
|
statusCode: _response.error.statusCode,
|
|
@@ -126,7 +144,7 @@ class Scripts {
|
|
|
126
144
|
body: _response.error.rawBody,
|
|
127
145
|
});
|
|
128
146
|
case "timeout":
|
|
129
|
-
throw new errors.WebflowTimeoutError();
|
|
147
|
+
throw new errors.WebflowTimeoutError("Timeout exceeded when calling GET /pages/{page_id}/custom_code.");
|
|
130
148
|
case "unknown":
|
|
131
149
|
throw new errors.WebflowError({
|
|
132
150
|
message: _response.error.errorMessage,
|
|
@@ -135,7 +153,15 @@ class Scripts {
|
|
|
135
153
|
});
|
|
136
154
|
}
|
|
137
155
|
/**
|
|
138
|
-
* Add a registered script to a Page.
|
|
156
|
+
* Add a registered script to a Page.
|
|
157
|
+
*
|
|
158
|
+
* In order to use the Custom Code APIs for Sites and Pages, Custom Code Scripts must first be registered
|
|
159
|
+
* to a Site via the `registered_scripts` endpoints, and then applied to a Site or Page using the appropriate
|
|
160
|
+
* `custom_code` endpoints.
|
|
161
|
+
*
|
|
162
|
+
* <blockquote class="callout callout_info" theme="📘">Access to this endpoint requires a bearer token from a <a href="https://developers.webflow.com/data/docs/getting-started-data-clients">Data Client App</a>.</blockquote>
|
|
163
|
+
*
|
|
164
|
+
* Required scope | `custom_code:write`
|
|
139
165
|
*
|
|
140
166
|
* @param {string} pageId - Unique identifier for a Page
|
|
141
167
|
* @param {Webflow.ScriptApplyList} request
|
|
@@ -169,18 +195,14 @@ class Scripts {
|
|
|
169
195
|
const _response = yield core.fetcher({
|
|
170
196
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.WebflowEnvironment.Default, `pages/${encodeURIComponent(pageId)}/custom_code`),
|
|
171
197
|
method: "PUT",
|
|
172
|
-
headers: {
|
|
173
|
-
Authorization: yield this._getAuthorizationHeader(),
|
|
174
|
-
"X-Fern-Language": "JavaScript",
|
|
175
|
-
"X-Fern-SDK-Name": "webflow-api",
|
|
176
|
-
"X-Fern-SDK-Version": "2.4.2",
|
|
177
|
-
"User-Agent": "webflow-api/2.4.2",
|
|
178
|
-
"X-Fern-Runtime": core.RUNTIME.type,
|
|
179
|
-
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
180
|
-
},
|
|
198
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "2.5.0", "User-Agent": "webflow-api/2.5.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
181
199
|
contentType: "application/json",
|
|
182
200
|
requestType: "json",
|
|
183
|
-
body: serializers.ScriptApplyList.jsonOrThrow(request, {
|
|
201
|
+
body: serializers.ScriptApplyList.jsonOrThrow(request, {
|
|
202
|
+
unrecognizedObjectKeys: "passthrough",
|
|
203
|
+
allowUnrecognizedUnionMembers: true,
|
|
204
|
+
allowUnrecognizedEnumValues: true,
|
|
205
|
+
}),
|
|
184
206
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
185
207
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
186
208
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -199,11 +221,23 @@ class Scripts {
|
|
|
199
221
|
case 400:
|
|
200
222
|
throw new Webflow.BadRequestError(_response.error.body);
|
|
201
223
|
case 401:
|
|
202
|
-
throw new Webflow.UnauthorizedError(_response.error.body
|
|
224
|
+
throw new Webflow.UnauthorizedError(serializers.Error_.parseOrThrow(_response.error.body, {
|
|
225
|
+
unrecognizedObjectKeys: "passthrough",
|
|
226
|
+
allowUnrecognizedUnionMembers: true,
|
|
227
|
+
allowUnrecognizedEnumValues: true,
|
|
228
|
+
skipValidation: true,
|
|
229
|
+
breadcrumbsPrefix: ["response"],
|
|
230
|
+
}));
|
|
203
231
|
case 404:
|
|
204
|
-
throw new Webflow.NotFoundError(_response.error.body
|
|
232
|
+
throw new Webflow.NotFoundError(serializers.Error_.parseOrThrow(_response.error.body, {
|
|
233
|
+
unrecognizedObjectKeys: "passthrough",
|
|
234
|
+
allowUnrecognizedUnionMembers: true,
|
|
235
|
+
allowUnrecognizedEnumValues: true,
|
|
236
|
+
skipValidation: true,
|
|
237
|
+
breadcrumbsPrefix: ["response"],
|
|
238
|
+
}));
|
|
205
239
|
case 429:
|
|
206
|
-
throw new Webflow.TooManyRequestsError(serializers.
|
|
240
|
+
throw new Webflow.TooManyRequestsError(serializers.Error_.parseOrThrow(_response.error.body, {
|
|
207
241
|
unrecognizedObjectKeys: "passthrough",
|
|
208
242
|
allowUnrecognizedUnionMembers: true,
|
|
209
243
|
allowUnrecognizedEnumValues: true,
|
|
@@ -211,7 +245,13 @@ class Scripts {
|
|
|
211
245
|
breadcrumbsPrefix: ["response"],
|
|
212
246
|
}));
|
|
213
247
|
case 500:
|
|
214
|
-
throw new Webflow.InternalServerError(_response.error.body
|
|
248
|
+
throw new Webflow.InternalServerError(serializers.Error_.parseOrThrow(_response.error.body, {
|
|
249
|
+
unrecognizedObjectKeys: "passthrough",
|
|
250
|
+
allowUnrecognizedUnionMembers: true,
|
|
251
|
+
allowUnrecognizedEnumValues: true,
|
|
252
|
+
skipValidation: true,
|
|
253
|
+
breadcrumbsPrefix: ["response"],
|
|
254
|
+
}));
|
|
215
255
|
default:
|
|
216
256
|
throw new errors.WebflowError({
|
|
217
257
|
statusCode: _response.error.statusCode,
|
|
@@ -226,7 +266,7 @@ class Scripts {
|
|
|
226
266
|
body: _response.error.rawBody,
|
|
227
267
|
});
|
|
228
268
|
case "timeout":
|
|
229
|
-
throw new errors.WebflowTimeoutError();
|
|
269
|
+
throw new errors.WebflowTimeoutError("Timeout exceeded when calling PUT /pages/{page_id}/custom_code.");
|
|
230
270
|
case "unknown":
|
|
231
271
|
throw new errors.WebflowError({
|
|
232
272
|
message: _response.error.errorMessage,
|
|
@@ -235,7 +275,15 @@ class Scripts {
|
|
|
235
275
|
});
|
|
236
276
|
}
|
|
237
277
|
/**
|
|
238
|
-
* Delete the custom code block that an app has created for a page
|
|
278
|
+
* Delete the custom code block that an app has created for a page
|
|
279
|
+
*
|
|
280
|
+
* In order to use the Custom Code APIs for Sites and Pages, Custom Code Scripts must first be registered
|
|
281
|
+
* to a Site via the `registered_scripts` endpoints, and then applied to a Site or Page using the appropriate
|
|
282
|
+
* `custom_code` endpoints.
|
|
283
|
+
*
|
|
284
|
+
* <blockquote class="callout callout_info" theme="📘">Access to this endpoint requires a bearer token from a <a href="https://developers.webflow.com/data/docs/getting-started-data-clients">Data Client App</a>.</blockquote>
|
|
285
|
+
*
|
|
286
|
+
* Required scope | `custom_code:write`
|
|
239
287
|
*
|
|
240
288
|
* @param {string} pageId - Unique identifier for a Page
|
|
241
289
|
* @param {Scripts.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -255,15 +303,7 @@ class Scripts {
|
|
|
255
303
|
const _response = yield core.fetcher({
|
|
256
304
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.WebflowEnvironment.Default, `pages/${encodeURIComponent(pageId)}/custom_code`),
|
|
257
305
|
method: "DELETE",
|
|
258
|
-
headers: {
|
|
259
|
-
Authorization: yield this._getAuthorizationHeader(),
|
|
260
|
-
"X-Fern-Language": "JavaScript",
|
|
261
|
-
"X-Fern-SDK-Name": "webflow-api",
|
|
262
|
-
"X-Fern-SDK-Version": "2.4.2",
|
|
263
|
-
"User-Agent": "webflow-api/2.4.2",
|
|
264
|
-
"X-Fern-Runtime": core.RUNTIME.type,
|
|
265
|
-
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
266
|
-
},
|
|
306
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "2.5.0", "User-Agent": "webflow-api/2.5.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
267
307
|
contentType: "application/json",
|
|
268
308
|
requestType: "json",
|
|
269
309
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -278,11 +318,23 @@ class Scripts {
|
|
|
278
318
|
case 400:
|
|
279
319
|
throw new Webflow.BadRequestError(_response.error.body);
|
|
280
320
|
case 401:
|
|
281
|
-
throw new Webflow.UnauthorizedError(_response.error.body
|
|
321
|
+
throw new Webflow.UnauthorizedError(serializers.Error_.parseOrThrow(_response.error.body, {
|
|
322
|
+
unrecognizedObjectKeys: "passthrough",
|
|
323
|
+
allowUnrecognizedUnionMembers: true,
|
|
324
|
+
allowUnrecognizedEnumValues: true,
|
|
325
|
+
skipValidation: true,
|
|
326
|
+
breadcrumbsPrefix: ["response"],
|
|
327
|
+
}));
|
|
282
328
|
case 404:
|
|
283
|
-
throw new Webflow.NotFoundError(_response.error.body
|
|
329
|
+
throw new Webflow.NotFoundError(serializers.Error_.parseOrThrow(_response.error.body, {
|
|
330
|
+
unrecognizedObjectKeys: "passthrough",
|
|
331
|
+
allowUnrecognizedUnionMembers: true,
|
|
332
|
+
allowUnrecognizedEnumValues: true,
|
|
333
|
+
skipValidation: true,
|
|
334
|
+
breadcrumbsPrefix: ["response"],
|
|
335
|
+
}));
|
|
284
336
|
case 429:
|
|
285
|
-
throw new Webflow.TooManyRequestsError(serializers.
|
|
337
|
+
throw new Webflow.TooManyRequestsError(serializers.Error_.parseOrThrow(_response.error.body, {
|
|
286
338
|
unrecognizedObjectKeys: "passthrough",
|
|
287
339
|
allowUnrecognizedUnionMembers: true,
|
|
288
340
|
allowUnrecognizedEnumValues: true,
|
|
@@ -290,7 +342,13 @@ class Scripts {
|
|
|
290
342
|
breadcrumbsPrefix: ["response"],
|
|
291
343
|
}));
|
|
292
344
|
case 500:
|
|
293
|
-
throw new Webflow.InternalServerError(_response.error.body
|
|
345
|
+
throw new Webflow.InternalServerError(serializers.Error_.parseOrThrow(_response.error.body, {
|
|
346
|
+
unrecognizedObjectKeys: "passthrough",
|
|
347
|
+
allowUnrecognizedUnionMembers: true,
|
|
348
|
+
allowUnrecognizedEnumValues: true,
|
|
349
|
+
skipValidation: true,
|
|
350
|
+
breadcrumbsPrefix: ["response"],
|
|
351
|
+
}));
|
|
294
352
|
default:
|
|
295
353
|
throw new errors.WebflowError({
|
|
296
354
|
statusCode: _response.error.statusCode,
|
|
@@ -305,7 +363,7 @@ class Scripts {
|
|
|
305
363
|
body: _response.error.rawBody,
|
|
306
364
|
});
|
|
307
365
|
case "timeout":
|
|
308
|
-
throw new errors.WebflowTimeoutError();
|
|
366
|
+
throw new errors.WebflowTimeoutError("Timeout exceeded when calling DELETE /pages/{page_id}/custom_code.");
|
|
309
367
|
case "unknown":
|
|
310
368
|
throw new errors.WebflowError({
|
|
311
369
|
message: _response.error.errorMessage,
|
|
@@ -16,13 +16,18 @@ export declare namespace Products {
|
|
|
16
16
|
maxRetries?: number;
|
|
17
17
|
/** A hook to abort the request. */
|
|
18
18
|
abortSignal?: AbortSignal;
|
|
19
|
+
/** Additional headers to include in the request. */
|
|
20
|
+
headers?: Record<string, string>;
|
|
19
21
|
}
|
|
20
22
|
}
|
|
21
23
|
export declare class Products {
|
|
22
24
|
protected readonly _options: Products.Options;
|
|
23
25
|
constructor(_options: Products.Options);
|
|
24
26
|
/**
|
|
25
|
-
* Retrieve all products for a site.
|
|
27
|
+
* Retrieve all products for a site.
|
|
28
|
+
*
|
|
29
|
+
* Use `limit` and `offset` to page through all products with subsequent requests. All SKUs for each product
|
|
30
|
+
* will also be fetched and returned. The `limit`, `offset` and `total` values represent Products only and do not include any SKUs.
|
|
26
31
|
*
|
|
27
32
|
* Required scope | `ecommerce:read`
|
|
28
33
|
*
|
|
@@ -43,13 +48,19 @@ export declare class Products {
|
|
|
43
48
|
*/
|
|
44
49
|
list(siteId: string, request?: Webflow.ProductsListRequest, requestOptions?: Products.RequestOptions): Promise<Webflow.ProductAndSkUsList>;
|
|
45
50
|
/**
|
|
46
|
-
*
|
|
51
|
+
* Create a new product and SKU.
|
|
52
|
+
*
|
|
53
|
+
* When you create a product, you will always create a SKU, since a Product Item must have, at minimum, a single SKU.
|
|
47
54
|
*
|
|
48
|
-
*
|
|
55
|
+
* To create a Product with multiple SKUs - for example a T-shirt in sizes small, medium and large:
|
|
49
56
|
*
|
|
50
|
-
*
|
|
57
|
+
* - Create parameters in `sku-properties`, also known as [product options and variants.](https://help.webflow.com/hc/en-us/articles/33961334531347-Create-product-options-and-variants).
|
|
58
|
+
* - A single `sku-property` would be `color`. Within the `color` property, list the various colors of T-shirts as an array of `enum` values: `royal-blue`, `crimson-red`, and `forrest-green`.
|
|
59
|
+
* - Once, you've created a Product and its `sku-properties` with `enum` values, Webflow will create a **default SKU**, which will automatically be a combination of the first `sku-properties` you've created.
|
|
60
|
+
* - In our example, the default SKU will be a Royal Blue T-Shirt, because our first `enum` of our Color `sku-property` is Royal Blue.
|
|
61
|
+
* - After you've created your product, you can create additional SKUs using the [Create SKU endpoint.](/data/reference/ecommerce/products-sk-us/create-sku)
|
|
51
62
|
*
|
|
52
|
-
* Upon creation, the default product type will be `Advanced
|
|
63
|
+
* Upon creation, the default product type will be `Advanced`, which ensures all Product and SKU fields will be shown to users in the Designer.
|
|
53
64
|
*
|
|
54
65
|
* Required scope | `ecommerce:write`
|
|
55
66
|
*
|
|
@@ -70,7 +81,8 @@ export declare class Products {
|
|
|
70
81
|
*/
|
|
71
82
|
create(siteId: string, request?: Webflow.ProductSkuCreate, requestOptions?: Products.RequestOptions): Promise<Webflow.ProductAndSkUs>;
|
|
72
83
|
/**
|
|
73
|
-
* Retrieve a single product by its
|
|
84
|
+
* Retrieve a single product by its ID. All of its SKUs will also be
|
|
85
|
+
* retrieved.
|
|
74
86
|
*
|
|
75
87
|
* Required scope | `ecommerce:read`
|
|
76
88
|
*
|
|
@@ -91,7 +103,9 @@ export declare class Products {
|
|
|
91
103
|
*/
|
|
92
104
|
get(siteId: string, productId: string, requestOptions?: Products.RequestOptions): Promise<Webflow.ProductAndSkUs>;
|
|
93
105
|
/**
|
|
94
|
-
*
|
|
106
|
+
* Update an existing Product.
|
|
107
|
+
*
|
|
108
|
+
* Updating an existing Product will set the product type to `Advanced`, which ensures all Product and SKU fields will be shown to users in the Designer.
|
|
95
109
|
*
|
|
96
110
|
* Required scope | `ecommerce:write`
|
|
97
111
|
*
|
|
@@ -113,9 +127,9 @@ export declare class Products {
|
|
|
113
127
|
*/
|
|
114
128
|
update(siteId: string, productId: string, request?: Webflow.ProductSkuUpdate, requestOptions?: Products.RequestOptions): Promise<Webflow.Product>;
|
|
115
129
|
/**
|
|
116
|
-
* Create additional SKUs to
|
|
130
|
+
* Create additional SKUs to manage every [option and variant of your Product.](https://help.webflow.com/hc/en-us/articles/33961334531347-Create-product-options-and-variants)
|
|
117
131
|
*
|
|
118
|
-
* Creating
|
|
132
|
+
* Creating SKUs through the API will set the product type to `Advanced`, which ensures all Product and SKU fields will be shown to users in the Designer.
|
|
119
133
|
*
|
|
120
134
|
* Required scope | `ecommerce:write`
|
|
121
135
|
*
|
|
@@ -139,7 +153,9 @@ export declare class Products {
|
|
|
139
153
|
*/
|
|
140
154
|
createSku(siteId: string, productId: string, request: Webflow.ProductsCreateSkuRequest, requestOptions?: Products.RequestOptions): Promise<Webflow.ProductsCreateSkuResponse>;
|
|
141
155
|
/**
|
|
142
|
-
*
|
|
156
|
+
* Update a specified SKU.
|
|
157
|
+
*
|
|
158
|
+
* Updating an existing SKU will set the Product type to `Advanced`, which ensures all Product and SKU fields will be shown to users in the Designer.
|
|
143
159
|
*
|
|
144
160
|
* Required scope | `ecommerce:write`
|
|
145
161
|
*
|