webflow-api 2.4.0 → 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 +11 -1
- 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 +11 -1
- 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
|
@@ -50,7 +50,16 @@ class Scripts {
|
|
|
50
50
|
this._options = _options;
|
|
51
51
|
}
|
|
52
52
|
/**
|
|
53
|
-
* List of scripts registered to a Site.
|
|
53
|
+
* List of scripts registered to a Site.
|
|
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
|
+
* Additionally, Scripts can be remotely hosted, or registered as inline snippets.
|
|
59
|
+
*
|
|
60
|
+
* <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>
|
|
61
|
+
*
|
|
62
|
+
* Required scope | `custom_code:read`
|
|
54
63
|
*
|
|
55
64
|
* @param {string} siteId - Unique identifier for a Site
|
|
56
65
|
* @param {Scripts.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -70,15 +79,7 @@ class Scripts {
|
|
|
70
79
|
const _response = yield core.fetcher({
|
|
71
80
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.WebflowEnvironment.Default, `sites/${encodeURIComponent(siteId)}/registered_scripts`),
|
|
72
81
|
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.0",
|
|
78
|
-
"User-Agent": "webflow-api/2.4.0",
|
|
79
|
-
"X-Fern-Runtime": core.RUNTIME.type,
|
|
80
|
-
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
81
|
-
},
|
|
82
|
+
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
83
|
contentType: "application/json",
|
|
83
84
|
requestType: "json",
|
|
84
85
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -99,11 +100,23 @@ class Scripts {
|
|
|
99
100
|
case 400:
|
|
100
101
|
throw new Webflow.BadRequestError(_response.error.body);
|
|
101
102
|
case 401:
|
|
102
|
-
throw new Webflow.UnauthorizedError(_response.error.body
|
|
103
|
+
throw new Webflow.UnauthorizedError(serializers.Error_.parseOrThrow(_response.error.body, {
|
|
104
|
+
unrecognizedObjectKeys: "passthrough",
|
|
105
|
+
allowUnrecognizedUnionMembers: true,
|
|
106
|
+
allowUnrecognizedEnumValues: true,
|
|
107
|
+
skipValidation: true,
|
|
108
|
+
breadcrumbsPrefix: ["response"],
|
|
109
|
+
}));
|
|
103
110
|
case 404:
|
|
104
|
-
throw new Webflow.NotFoundError(_response.error.body
|
|
111
|
+
throw new Webflow.NotFoundError(serializers.Error_.parseOrThrow(_response.error.body, {
|
|
112
|
+
unrecognizedObjectKeys: "passthrough",
|
|
113
|
+
allowUnrecognizedUnionMembers: true,
|
|
114
|
+
allowUnrecognizedEnumValues: true,
|
|
115
|
+
skipValidation: true,
|
|
116
|
+
breadcrumbsPrefix: ["response"],
|
|
117
|
+
}));
|
|
105
118
|
case 429:
|
|
106
|
-
throw new Webflow.TooManyRequestsError(serializers.
|
|
119
|
+
throw new Webflow.TooManyRequestsError(serializers.Error_.parseOrThrow(_response.error.body, {
|
|
107
120
|
unrecognizedObjectKeys: "passthrough",
|
|
108
121
|
allowUnrecognizedUnionMembers: true,
|
|
109
122
|
allowUnrecognizedEnumValues: true,
|
|
@@ -111,7 +124,13 @@ class Scripts {
|
|
|
111
124
|
breadcrumbsPrefix: ["response"],
|
|
112
125
|
}));
|
|
113
126
|
case 500:
|
|
114
|
-
throw new Webflow.InternalServerError(_response.error.body
|
|
127
|
+
throw new Webflow.InternalServerError(serializers.Error_.parseOrThrow(_response.error.body, {
|
|
128
|
+
unrecognizedObjectKeys: "passthrough",
|
|
129
|
+
allowUnrecognizedUnionMembers: true,
|
|
130
|
+
allowUnrecognizedEnumValues: true,
|
|
131
|
+
skipValidation: true,
|
|
132
|
+
breadcrumbsPrefix: ["response"],
|
|
133
|
+
}));
|
|
115
134
|
default:
|
|
116
135
|
throw new errors.WebflowError({
|
|
117
136
|
statusCode: _response.error.statusCode,
|
|
@@ -126,7 +145,7 @@ class Scripts {
|
|
|
126
145
|
body: _response.error.rawBody,
|
|
127
146
|
});
|
|
128
147
|
case "timeout":
|
|
129
|
-
throw new errors.WebflowTimeoutError();
|
|
148
|
+
throw new errors.WebflowTimeoutError("Timeout exceeded when calling GET /sites/{site_id}/registered_scripts.");
|
|
130
149
|
case "unknown":
|
|
131
150
|
throw new errors.WebflowError({
|
|
132
151
|
message: _response.error.errorMessage,
|
|
@@ -135,7 +154,16 @@ class Scripts {
|
|
|
135
154
|
});
|
|
136
155
|
}
|
|
137
156
|
/**
|
|
138
|
-
* Add a script to a Site's Custom Code registry.
|
|
157
|
+
* Add a script to a Site's Custom Code registry.
|
|
158
|
+
*
|
|
159
|
+
* In order to use the Custom Code APIs for Sites and Pages, Custom Code Scripts must first be registered
|
|
160
|
+
* to a Site via the `registered_scripts` endpoints, and then applied to a Site or Page using the appropriate
|
|
161
|
+
* `custom_code` endpoints.
|
|
162
|
+
* Additionally, Scripts can be remotely hosted, or registered as inline snippets.
|
|
163
|
+
*
|
|
164
|
+
* <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>
|
|
165
|
+
*
|
|
166
|
+
* Required scope | `custom_code:write`
|
|
139
167
|
*
|
|
140
168
|
* @param {string} siteId - Unique identifier for a Site
|
|
141
169
|
* @param {Webflow.CustomCodeHostedRequest} request
|
|
@@ -161,18 +189,14 @@ class Scripts {
|
|
|
161
189
|
const _response = yield core.fetcher({
|
|
162
190
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.WebflowEnvironment.Default, `sites/${encodeURIComponent(siteId)}/registered_scripts/hosted`),
|
|
163
191
|
method: "POST",
|
|
164
|
-
headers: {
|
|
165
|
-
Authorization: yield this._getAuthorizationHeader(),
|
|
166
|
-
"X-Fern-Language": "JavaScript",
|
|
167
|
-
"X-Fern-SDK-Name": "webflow-api",
|
|
168
|
-
"X-Fern-SDK-Version": "2.4.0",
|
|
169
|
-
"User-Agent": "webflow-api/2.4.0",
|
|
170
|
-
"X-Fern-Runtime": core.RUNTIME.type,
|
|
171
|
-
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
172
|
-
},
|
|
192
|
+
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),
|
|
173
193
|
contentType: "application/json",
|
|
174
194
|
requestType: "json",
|
|
175
|
-
body: serializers.CustomCodeHostedRequest.jsonOrThrow(request, {
|
|
195
|
+
body: serializers.CustomCodeHostedRequest.jsonOrThrow(request, {
|
|
196
|
+
unrecognizedObjectKeys: "passthrough",
|
|
197
|
+
allowUnrecognizedUnionMembers: true,
|
|
198
|
+
allowUnrecognizedEnumValues: true,
|
|
199
|
+
}),
|
|
176
200
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
177
201
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
178
202
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -191,11 +215,23 @@ class Scripts {
|
|
|
191
215
|
case 400:
|
|
192
216
|
throw new Webflow.BadRequestError(_response.error.body);
|
|
193
217
|
case 401:
|
|
194
|
-
throw new Webflow.UnauthorizedError(_response.error.body
|
|
218
|
+
throw new Webflow.UnauthorizedError(serializers.Error_.parseOrThrow(_response.error.body, {
|
|
219
|
+
unrecognizedObjectKeys: "passthrough",
|
|
220
|
+
allowUnrecognizedUnionMembers: true,
|
|
221
|
+
allowUnrecognizedEnumValues: true,
|
|
222
|
+
skipValidation: true,
|
|
223
|
+
breadcrumbsPrefix: ["response"],
|
|
224
|
+
}));
|
|
195
225
|
case 404:
|
|
196
|
-
throw new Webflow.NotFoundError(_response.error.body
|
|
226
|
+
throw new Webflow.NotFoundError(serializers.Error_.parseOrThrow(_response.error.body, {
|
|
227
|
+
unrecognizedObjectKeys: "passthrough",
|
|
228
|
+
allowUnrecognizedUnionMembers: true,
|
|
229
|
+
allowUnrecognizedEnumValues: true,
|
|
230
|
+
skipValidation: true,
|
|
231
|
+
breadcrumbsPrefix: ["response"],
|
|
232
|
+
}));
|
|
197
233
|
case 429:
|
|
198
|
-
throw new Webflow.TooManyRequestsError(serializers.
|
|
234
|
+
throw new Webflow.TooManyRequestsError(serializers.Error_.parseOrThrow(_response.error.body, {
|
|
199
235
|
unrecognizedObjectKeys: "passthrough",
|
|
200
236
|
allowUnrecognizedUnionMembers: true,
|
|
201
237
|
allowUnrecognizedEnumValues: true,
|
|
@@ -203,7 +239,13 @@ class Scripts {
|
|
|
203
239
|
breadcrumbsPrefix: ["response"],
|
|
204
240
|
}));
|
|
205
241
|
case 500:
|
|
206
|
-
throw new Webflow.InternalServerError(_response.error.body
|
|
242
|
+
throw new Webflow.InternalServerError(serializers.Error_.parseOrThrow(_response.error.body, {
|
|
243
|
+
unrecognizedObjectKeys: "passthrough",
|
|
244
|
+
allowUnrecognizedUnionMembers: true,
|
|
245
|
+
allowUnrecognizedEnumValues: true,
|
|
246
|
+
skipValidation: true,
|
|
247
|
+
breadcrumbsPrefix: ["response"],
|
|
248
|
+
}));
|
|
207
249
|
default:
|
|
208
250
|
throw new errors.WebflowError({
|
|
209
251
|
statusCode: _response.error.statusCode,
|
|
@@ -218,7 +260,7 @@ class Scripts {
|
|
|
218
260
|
body: _response.error.rawBody,
|
|
219
261
|
});
|
|
220
262
|
case "timeout":
|
|
221
|
-
throw new errors.WebflowTimeoutError();
|
|
263
|
+
throw new errors.WebflowTimeoutError("Timeout exceeded when calling POST /sites/{site_id}/registered_scripts/hosted.");
|
|
222
264
|
case "unknown":
|
|
223
265
|
throw new errors.WebflowError({
|
|
224
266
|
message: _response.error.errorMessage,
|
|
@@ -227,7 +269,15 @@ class Scripts {
|
|
|
227
269
|
});
|
|
228
270
|
}
|
|
229
271
|
/**
|
|
230
|
-
* Add a script to a Site's Custom Code registry. Inline scripts can be between 1 and 2000 characters.
|
|
272
|
+
* Add a script to a Site's Custom Code registry. Inline scripts can be between 1 and 2000 characters.
|
|
273
|
+
*
|
|
274
|
+
* In order to use the Custom Code APIs for Sites and Pages, Custom Code Scripts must first be registered
|
|
275
|
+
* to a Site via the `registered_scripts` endpoints, and then applied to a Site or Page using the appropriate
|
|
276
|
+
* `custom_code` endpoints.
|
|
277
|
+
*
|
|
278
|
+
* <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>
|
|
279
|
+
*
|
|
280
|
+
* Required scope | `custom_code:write`
|
|
231
281
|
*
|
|
232
282
|
* @param {string} siteId - Unique identifier for a Site
|
|
233
283
|
* @param {Webflow.CustomCodeInlineRequest} request
|
|
@@ -252,18 +302,14 @@ class Scripts {
|
|
|
252
302
|
const _response = yield core.fetcher({
|
|
253
303
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.WebflowEnvironment.Default, `sites/${encodeURIComponent(siteId)}/registered_scripts/inline`),
|
|
254
304
|
method: "POST",
|
|
255
|
-
headers: {
|
|
256
|
-
Authorization: yield this._getAuthorizationHeader(),
|
|
257
|
-
"X-Fern-Language": "JavaScript",
|
|
258
|
-
"X-Fern-SDK-Name": "webflow-api",
|
|
259
|
-
"X-Fern-SDK-Version": "2.4.0",
|
|
260
|
-
"User-Agent": "webflow-api/2.4.0",
|
|
261
|
-
"X-Fern-Runtime": core.RUNTIME.type,
|
|
262
|
-
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
263
|
-
},
|
|
305
|
+
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),
|
|
264
306
|
contentType: "application/json",
|
|
265
307
|
requestType: "json",
|
|
266
|
-
body: serializers.CustomCodeInlineRequest.jsonOrThrow(request, {
|
|
308
|
+
body: serializers.CustomCodeInlineRequest.jsonOrThrow(request, {
|
|
309
|
+
unrecognizedObjectKeys: "passthrough",
|
|
310
|
+
allowUnrecognizedUnionMembers: true,
|
|
311
|
+
allowUnrecognizedEnumValues: true,
|
|
312
|
+
}),
|
|
267
313
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
268
314
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
269
315
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -282,11 +328,23 @@ class Scripts {
|
|
|
282
328
|
case 400:
|
|
283
329
|
throw new Webflow.BadRequestError(_response.error.body);
|
|
284
330
|
case 401:
|
|
285
|
-
throw new Webflow.UnauthorizedError(_response.error.body
|
|
331
|
+
throw new Webflow.UnauthorizedError(serializers.Error_.parseOrThrow(_response.error.body, {
|
|
332
|
+
unrecognizedObjectKeys: "passthrough",
|
|
333
|
+
allowUnrecognizedUnionMembers: true,
|
|
334
|
+
allowUnrecognizedEnumValues: true,
|
|
335
|
+
skipValidation: true,
|
|
336
|
+
breadcrumbsPrefix: ["response"],
|
|
337
|
+
}));
|
|
286
338
|
case 404:
|
|
287
|
-
throw new Webflow.NotFoundError(_response.error.body
|
|
339
|
+
throw new Webflow.NotFoundError(serializers.Error_.parseOrThrow(_response.error.body, {
|
|
340
|
+
unrecognizedObjectKeys: "passthrough",
|
|
341
|
+
allowUnrecognizedUnionMembers: true,
|
|
342
|
+
allowUnrecognizedEnumValues: true,
|
|
343
|
+
skipValidation: true,
|
|
344
|
+
breadcrumbsPrefix: ["response"],
|
|
345
|
+
}));
|
|
288
346
|
case 429:
|
|
289
|
-
throw new Webflow.TooManyRequestsError(serializers.
|
|
347
|
+
throw new Webflow.TooManyRequestsError(serializers.Error_.parseOrThrow(_response.error.body, {
|
|
290
348
|
unrecognizedObjectKeys: "passthrough",
|
|
291
349
|
allowUnrecognizedUnionMembers: true,
|
|
292
350
|
allowUnrecognizedEnumValues: true,
|
|
@@ -294,7 +352,13 @@ class Scripts {
|
|
|
294
352
|
breadcrumbsPrefix: ["response"],
|
|
295
353
|
}));
|
|
296
354
|
case 500:
|
|
297
|
-
throw new Webflow.InternalServerError(_response.error.body
|
|
355
|
+
throw new Webflow.InternalServerError(serializers.Error_.parseOrThrow(_response.error.body, {
|
|
356
|
+
unrecognizedObjectKeys: "passthrough",
|
|
357
|
+
allowUnrecognizedUnionMembers: true,
|
|
358
|
+
allowUnrecognizedEnumValues: true,
|
|
359
|
+
skipValidation: true,
|
|
360
|
+
breadcrumbsPrefix: ["response"],
|
|
361
|
+
}));
|
|
298
362
|
default:
|
|
299
363
|
throw new errors.WebflowError({
|
|
300
364
|
statusCode: _response.error.statusCode,
|
|
@@ -309,7 +373,7 @@ class Scripts {
|
|
|
309
373
|
body: _response.error.rawBody,
|
|
310
374
|
});
|
|
311
375
|
case "timeout":
|
|
312
|
-
throw new errors.WebflowTimeoutError();
|
|
376
|
+
throw new errors.WebflowTimeoutError("Timeout exceeded when calling POST /sites/{site_id}/registered_scripts/inline.");
|
|
313
377
|
case "unknown":
|
|
314
378
|
throw new errors.WebflowError({
|
|
315
379
|
message: _response.error.errorMessage,
|
|
@@ -18,13 +18,17 @@ export declare namespace Sites {
|
|
|
18
18
|
maxRetries?: number;
|
|
19
19
|
/** A hook to abort the request. */
|
|
20
20
|
abortSignal?: AbortSignal;
|
|
21
|
+
/** Additional headers to include in the request. */
|
|
22
|
+
headers?: Record<string, string>;
|
|
21
23
|
}
|
|
22
24
|
}
|
|
23
25
|
export declare class Sites {
|
|
24
26
|
protected readonly _options: Sites.Options;
|
|
25
27
|
constructor(_options: Sites.Options);
|
|
26
28
|
/**
|
|
27
|
-
* List of all sites the provided access token is able to access.
|
|
29
|
+
* List of all sites the provided access token is able to access.
|
|
30
|
+
*
|
|
31
|
+
* Required scope | `sites:read`
|
|
28
32
|
*
|
|
29
33
|
* @param {Sites.RequestOptions} requestOptions - Request-specific configuration.
|
|
30
34
|
*
|
|
@@ -37,7 +41,9 @@ export declare class Sites {
|
|
|
37
41
|
*/
|
|
38
42
|
list(requestOptions?: Sites.RequestOptions): Promise<Webflow.Sites>;
|
|
39
43
|
/**
|
|
40
|
-
* Get
|
|
44
|
+
* Get details of a site.
|
|
45
|
+
*
|
|
46
|
+
* Required scope | `sites:read`
|
|
41
47
|
*
|
|
42
48
|
* @param {string} siteId - Unique identifier for a Site
|
|
43
49
|
* @param {Sites.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -53,7 +59,9 @@ export declare class Sites {
|
|
|
53
59
|
*/
|
|
54
60
|
get(siteId: string, requestOptions?: Sites.RequestOptions): Promise<Webflow.Site>;
|
|
55
61
|
/**
|
|
56
|
-
* Get a list of all custom domains related to site.
|
|
62
|
+
* Get a list of all custom domains related to site.
|
|
63
|
+
*
|
|
64
|
+
* Required scope | `sites:read`
|
|
57
65
|
*
|
|
58
66
|
* @param {string} siteId - Unique identifier for a Site
|
|
59
67
|
* @param {Sites.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -69,7 +77,11 @@ export declare class Sites {
|
|
|
69
77
|
*/
|
|
70
78
|
getCustomDomain(siteId: string, requestOptions?: Sites.RequestOptions): Promise<Webflow.Domains>;
|
|
71
79
|
/**
|
|
72
|
-
*
|
|
80
|
+
* Publishes a site to one or more more domains.
|
|
81
|
+
*
|
|
82
|
+
* <Note title="Endpoint-specific rate limit">This endpoint has a limit of one successful publish queue per minute.</Note>
|
|
83
|
+
*
|
|
84
|
+
* Required scope | `sites:write`
|
|
73
85
|
*
|
|
74
86
|
* @param {string} siteId - Unique identifier for a Site
|
|
75
87
|
* @param {Webflow.SitesPublishRequest} request
|
|
@@ -52,7 +52,9 @@ class Sites {
|
|
|
52
52
|
this._options = _options;
|
|
53
53
|
}
|
|
54
54
|
/**
|
|
55
|
-
* List of all sites the provided access token is able to access.
|
|
55
|
+
* List of all sites the provided access token is able to access.
|
|
56
|
+
*
|
|
57
|
+
* Required scope | `sites:read`
|
|
56
58
|
*
|
|
57
59
|
* @param {Sites.RequestOptions} requestOptions - Request-specific configuration.
|
|
58
60
|
*
|
|
@@ -69,15 +71,7 @@ class Sites {
|
|
|
69
71
|
const _response = yield core.fetcher({
|
|
70
72
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.WebflowEnvironment.Default, "sites"),
|
|
71
73
|
method: "GET",
|
|
72
|
-
headers: {
|
|
73
|
-
Authorization: yield this._getAuthorizationHeader(),
|
|
74
|
-
"X-Fern-Language": "JavaScript",
|
|
75
|
-
"X-Fern-SDK-Name": "webflow-api",
|
|
76
|
-
"X-Fern-SDK-Version": "2.4.0",
|
|
77
|
-
"User-Agent": "webflow-api/2.4.0",
|
|
78
|
-
"X-Fern-Runtime": core.RUNTIME.type,
|
|
79
|
-
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
80
|
-
},
|
|
74
|
+
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),
|
|
81
75
|
contentType: "application/json",
|
|
82
76
|
requestType: "json",
|
|
83
77
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -96,11 +90,23 @@ class Sites {
|
|
|
96
90
|
if (_response.error.reason === "status-code") {
|
|
97
91
|
switch (_response.error.statusCode) {
|
|
98
92
|
case 401:
|
|
99
|
-
throw new Webflow.UnauthorizedError(_response.error.body
|
|
93
|
+
throw new Webflow.UnauthorizedError(serializers.Error_.parseOrThrow(_response.error.body, {
|
|
94
|
+
unrecognizedObjectKeys: "passthrough",
|
|
95
|
+
allowUnrecognizedUnionMembers: true,
|
|
96
|
+
allowUnrecognizedEnumValues: true,
|
|
97
|
+
skipValidation: true,
|
|
98
|
+
breadcrumbsPrefix: ["response"],
|
|
99
|
+
}));
|
|
100
100
|
case 404:
|
|
101
|
-
throw new Webflow.NotFoundError(_response.error.body
|
|
101
|
+
throw new Webflow.NotFoundError(serializers.Error_.parseOrThrow(_response.error.body, {
|
|
102
|
+
unrecognizedObjectKeys: "passthrough",
|
|
103
|
+
allowUnrecognizedUnionMembers: true,
|
|
104
|
+
allowUnrecognizedEnumValues: true,
|
|
105
|
+
skipValidation: true,
|
|
106
|
+
breadcrumbsPrefix: ["response"],
|
|
107
|
+
}));
|
|
102
108
|
case 429:
|
|
103
|
-
throw new Webflow.TooManyRequestsError(serializers.
|
|
109
|
+
throw new Webflow.TooManyRequestsError(serializers.Error_.parseOrThrow(_response.error.body, {
|
|
104
110
|
unrecognizedObjectKeys: "passthrough",
|
|
105
111
|
allowUnrecognizedUnionMembers: true,
|
|
106
112
|
allowUnrecognizedEnumValues: true,
|
|
@@ -121,7 +127,7 @@ class Sites {
|
|
|
121
127
|
body: _response.error.rawBody,
|
|
122
128
|
});
|
|
123
129
|
case "timeout":
|
|
124
|
-
throw new errors.WebflowTimeoutError();
|
|
130
|
+
throw new errors.WebflowTimeoutError("Timeout exceeded when calling GET /sites.");
|
|
125
131
|
case "unknown":
|
|
126
132
|
throw new errors.WebflowError({
|
|
127
133
|
message: _response.error.errorMessage,
|
|
@@ -130,7 +136,9 @@ class Sites {
|
|
|
130
136
|
});
|
|
131
137
|
}
|
|
132
138
|
/**
|
|
133
|
-
* Get
|
|
139
|
+
* Get details of a site.
|
|
140
|
+
*
|
|
141
|
+
* Required scope | `sites:read`
|
|
134
142
|
*
|
|
135
143
|
* @param {string} siteId - Unique identifier for a Site
|
|
136
144
|
* @param {Sites.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -150,15 +158,7 @@ class Sites {
|
|
|
150
158
|
const _response = yield core.fetcher({
|
|
151
159
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.WebflowEnvironment.Default, `sites/${encodeURIComponent(siteId)}`),
|
|
152
160
|
method: "GET",
|
|
153
|
-
headers: {
|
|
154
|
-
Authorization: yield this._getAuthorizationHeader(),
|
|
155
|
-
"X-Fern-Language": "JavaScript",
|
|
156
|
-
"X-Fern-SDK-Name": "webflow-api",
|
|
157
|
-
"X-Fern-SDK-Version": "2.4.0",
|
|
158
|
-
"User-Agent": "webflow-api/2.4.0",
|
|
159
|
-
"X-Fern-Runtime": core.RUNTIME.type,
|
|
160
|
-
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
161
|
-
},
|
|
161
|
+
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),
|
|
162
162
|
contentType: "application/json",
|
|
163
163
|
requestType: "json",
|
|
164
164
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -179,11 +179,23 @@ class Sites {
|
|
|
179
179
|
case 400:
|
|
180
180
|
throw new Webflow.BadRequestError(_response.error.body);
|
|
181
181
|
case 401:
|
|
182
|
-
throw new Webflow.UnauthorizedError(_response.error.body
|
|
182
|
+
throw new Webflow.UnauthorizedError(serializers.Error_.parseOrThrow(_response.error.body, {
|
|
183
|
+
unrecognizedObjectKeys: "passthrough",
|
|
184
|
+
allowUnrecognizedUnionMembers: true,
|
|
185
|
+
allowUnrecognizedEnumValues: true,
|
|
186
|
+
skipValidation: true,
|
|
187
|
+
breadcrumbsPrefix: ["response"],
|
|
188
|
+
}));
|
|
183
189
|
case 404:
|
|
184
|
-
throw new Webflow.NotFoundError(_response.error.body
|
|
190
|
+
throw new Webflow.NotFoundError(serializers.Error_.parseOrThrow(_response.error.body, {
|
|
191
|
+
unrecognizedObjectKeys: "passthrough",
|
|
192
|
+
allowUnrecognizedUnionMembers: true,
|
|
193
|
+
allowUnrecognizedEnumValues: true,
|
|
194
|
+
skipValidation: true,
|
|
195
|
+
breadcrumbsPrefix: ["response"],
|
|
196
|
+
}));
|
|
185
197
|
case 429:
|
|
186
|
-
throw new Webflow.TooManyRequestsError(serializers.
|
|
198
|
+
throw new Webflow.TooManyRequestsError(serializers.Error_.parseOrThrow(_response.error.body, {
|
|
187
199
|
unrecognizedObjectKeys: "passthrough",
|
|
188
200
|
allowUnrecognizedUnionMembers: true,
|
|
189
201
|
allowUnrecognizedEnumValues: true,
|
|
@@ -191,7 +203,13 @@ class Sites {
|
|
|
191
203
|
breadcrumbsPrefix: ["response"],
|
|
192
204
|
}));
|
|
193
205
|
case 500:
|
|
194
|
-
throw new Webflow.InternalServerError(_response.error.body
|
|
206
|
+
throw new Webflow.InternalServerError(serializers.Error_.parseOrThrow(_response.error.body, {
|
|
207
|
+
unrecognizedObjectKeys: "passthrough",
|
|
208
|
+
allowUnrecognizedUnionMembers: true,
|
|
209
|
+
allowUnrecognizedEnumValues: true,
|
|
210
|
+
skipValidation: true,
|
|
211
|
+
breadcrumbsPrefix: ["response"],
|
|
212
|
+
}));
|
|
195
213
|
default:
|
|
196
214
|
throw new errors.WebflowError({
|
|
197
215
|
statusCode: _response.error.statusCode,
|
|
@@ -206,7 +224,7 @@ class Sites {
|
|
|
206
224
|
body: _response.error.rawBody,
|
|
207
225
|
});
|
|
208
226
|
case "timeout":
|
|
209
|
-
throw new errors.WebflowTimeoutError();
|
|
227
|
+
throw new errors.WebflowTimeoutError("Timeout exceeded when calling GET /sites/{site_id}.");
|
|
210
228
|
case "unknown":
|
|
211
229
|
throw new errors.WebflowError({
|
|
212
230
|
message: _response.error.errorMessage,
|
|
@@ -215,7 +233,9 @@ class Sites {
|
|
|
215
233
|
});
|
|
216
234
|
}
|
|
217
235
|
/**
|
|
218
|
-
* Get a list of all custom domains related to site.
|
|
236
|
+
* Get a list of all custom domains related to site.
|
|
237
|
+
*
|
|
238
|
+
* Required scope | `sites:read`
|
|
219
239
|
*
|
|
220
240
|
* @param {string} siteId - Unique identifier for a Site
|
|
221
241
|
* @param {Sites.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -235,15 +255,7 @@ class Sites {
|
|
|
235
255
|
const _response = yield core.fetcher({
|
|
236
256
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.WebflowEnvironment.Default, `sites/${encodeURIComponent(siteId)}/custom_domains`),
|
|
237
257
|
method: "GET",
|
|
238
|
-
headers: {
|
|
239
|
-
Authorization: yield this._getAuthorizationHeader(),
|
|
240
|
-
"X-Fern-Language": "JavaScript",
|
|
241
|
-
"X-Fern-SDK-Name": "webflow-api",
|
|
242
|
-
"X-Fern-SDK-Version": "2.4.0",
|
|
243
|
-
"User-Agent": "webflow-api/2.4.0",
|
|
244
|
-
"X-Fern-Runtime": core.RUNTIME.type,
|
|
245
|
-
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
246
|
-
},
|
|
258
|
+
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),
|
|
247
259
|
contentType: "application/json",
|
|
248
260
|
requestType: "json",
|
|
249
261
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -262,13 +274,25 @@ class Sites {
|
|
|
262
274
|
if (_response.error.reason === "status-code") {
|
|
263
275
|
switch (_response.error.statusCode) {
|
|
264
276
|
case 401:
|
|
265
|
-
throw new Webflow.UnauthorizedError(_response.error.body
|
|
277
|
+
throw new Webflow.UnauthorizedError(serializers.Error_.parseOrThrow(_response.error.body, {
|
|
278
|
+
unrecognizedObjectKeys: "passthrough",
|
|
279
|
+
allowUnrecognizedUnionMembers: true,
|
|
280
|
+
allowUnrecognizedEnumValues: true,
|
|
281
|
+
skipValidation: true,
|
|
282
|
+
breadcrumbsPrefix: ["response"],
|
|
283
|
+
}));
|
|
266
284
|
case 403:
|
|
267
285
|
throw new Webflow.ForbiddenError(_response.error.body);
|
|
268
286
|
case 404:
|
|
269
|
-
throw new Webflow.NotFoundError(_response.error.body
|
|
287
|
+
throw new Webflow.NotFoundError(serializers.Error_.parseOrThrow(_response.error.body, {
|
|
288
|
+
unrecognizedObjectKeys: "passthrough",
|
|
289
|
+
allowUnrecognizedUnionMembers: true,
|
|
290
|
+
allowUnrecognizedEnumValues: true,
|
|
291
|
+
skipValidation: true,
|
|
292
|
+
breadcrumbsPrefix: ["response"],
|
|
293
|
+
}));
|
|
270
294
|
case 429:
|
|
271
|
-
throw new Webflow.TooManyRequestsError(serializers.
|
|
295
|
+
throw new Webflow.TooManyRequestsError(serializers.Error_.parseOrThrow(_response.error.body, {
|
|
272
296
|
unrecognizedObjectKeys: "passthrough",
|
|
273
297
|
allowUnrecognizedUnionMembers: true,
|
|
274
298
|
allowUnrecognizedEnumValues: true,
|
|
@@ -276,7 +300,13 @@ class Sites {
|
|
|
276
300
|
breadcrumbsPrefix: ["response"],
|
|
277
301
|
}));
|
|
278
302
|
case 500:
|
|
279
|
-
throw new Webflow.InternalServerError(_response.error.body
|
|
303
|
+
throw new Webflow.InternalServerError(serializers.Error_.parseOrThrow(_response.error.body, {
|
|
304
|
+
unrecognizedObjectKeys: "passthrough",
|
|
305
|
+
allowUnrecognizedUnionMembers: true,
|
|
306
|
+
allowUnrecognizedEnumValues: true,
|
|
307
|
+
skipValidation: true,
|
|
308
|
+
breadcrumbsPrefix: ["response"],
|
|
309
|
+
}));
|
|
280
310
|
default:
|
|
281
311
|
throw new errors.WebflowError({
|
|
282
312
|
statusCode: _response.error.statusCode,
|
|
@@ -291,7 +321,7 @@ class Sites {
|
|
|
291
321
|
body: _response.error.rawBody,
|
|
292
322
|
});
|
|
293
323
|
case "timeout":
|
|
294
|
-
throw new errors.WebflowTimeoutError();
|
|
324
|
+
throw new errors.WebflowTimeoutError("Timeout exceeded when calling GET /sites/{site_id}/custom_domains.");
|
|
295
325
|
case "unknown":
|
|
296
326
|
throw new errors.WebflowError({
|
|
297
327
|
message: _response.error.errorMessage,
|
|
@@ -300,7 +330,11 @@ class Sites {
|
|
|
300
330
|
});
|
|
301
331
|
}
|
|
302
332
|
/**
|
|
303
|
-
*
|
|
333
|
+
* Publishes a site to one or more more domains.
|
|
334
|
+
*
|
|
335
|
+
* <Note title="Endpoint-specific rate limit">This endpoint has a limit of one successful publish queue per minute.</Note>
|
|
336
|
+
*
|
|
337
|
+
* Required scope | `sites:write`
|
|
304
338
|
*
|
|
305
339
|
* @param {string} siteId - Unique identifier for a Site
|
|
306
340
|
* @param {Webflow.SitesPublishRequest} request
|
|
@@ -321,18 +355,14 @@ class Sites {
|
|
|
321
355
|
const _response = yield core.fetcher({
|
|
322
356
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.WebflowEnvironment.Default, `sites/${encodeURIComponent(siteId)}/publish`),
|
|
323
357
|
method: "POST",
|
|
324
|
-
headers: {
|
|
325
|
-
Authorization: yield this._getAuthorizationHeader(),
|
|
326
|
-
"X-Fern-Language": "JavaScript",
|
|
327
|
-
"X-Fern-SDK-Name": "webflow-api",
|
|
328
|
-
"X-Fern-SDK-Version": "2.4.0",
|
|
329
|
-
"User-Agent": "webflow-api/2.4.0",
|
|
330
|
-
"X-Fern-Runtime": core.RUNTIME.type,
|
|
331
|
-
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
332
|
-
},
|
|
358
|
+
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),
|
|
333
359
|
contentType: "application/json",
|
|
334
360
|
requestType: "json",
|
|
335
|
-
body: serializers.SitesPublishRequest.jsonOrThrow(request, {
|
|
361
|
+
body: serializers.SitesPublishRequest.jsonOrThrow(request, {
|
|
362
|
+
unrecognizedObjectKeys: "passthrough",
|
|
363
|
+
allowUnrecognizedUnionMembers: true,
|
|
364
|
+
allowUnrecognizedEnumValues: true,
|
|
365
|
+
}),
|
|
336
366
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
337
367
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
338
368
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -351,13 +381,25 @@ class Sites {
|
|
|
351
381
|
case 400:
|
|
352
382
|
throw new Webflow.BadRequestError(_response.error.body);
|
|
353
383
|
case 401:
|
|
354
|
-
throw new Webflow.UnauthorizedError(_response.error.body
|
|
384
|
+
throw new Webflow.UnauthorizedError(serializers.Error_.parseOrThrow(_response.error.body, {
|
|
385
|
+
unrecognizedObjectKeys: "passthrough",
|
|
386
|
+
allowUnrecognizedUnionMembers: true,
|
|
387
|
+
allowUnrecognizedEnumValues: true,
|
|
388
|
+
skipValidation: true,
|
|
389
|
+
breadcrumbsPrefix: ["response"],
|
|
390
|
+
}));
|
|
355
391
|
case 403:
|
|
356
392
|
throw new Webflow.ForbiddenError(_response.error.body);
|
|
357
393
|
case 404:
|
|
358
|
-
throw new Webflow.NotFoundError(_response.error.body
|
|
394
|
+
throw new Webflow.NotFoundError(serializers.Error_.parseOrThrow(_response.error.body, {
|
|
395
|
+
unrecognizedObjectKeys: "passthrough",
|
|
396
|
+
allowUnrecognizedUnionMembers: true,
|
|
397
|
+
allowUnrecognizedEnumValues: true,
|
|
398
|
+
skipValidation: true,
|
|
399
|
+
breadcrumbsPrefix: ["response"],
|
|
400
|
+
}));
|
|
359
401
|
case 429:
|
|
360
|
-
throw new Webflow.TooManyRequestsError(serializers.
|
|
402
|
+
throw new Webflow.TooManyRequestsError(serializers.Error_.parseOrThrow(_response.error.body, {
|
|
361
403
|
unrecognizedObjectKeys: "passthrough",
|
|
362
404
|
allowUnrecognizedUnionMembers: true,
|
|
363
405
|
allowUnrecognizedEnumValues: true,
|
|
@@ -378,7 +420,7 @@ class Sites {
|
|
|
378
420
|
body: _response.error.rawBody,
|
|
379
421
|
});
|
|
380
422
|
case "timeout":
|
|
381
|
-
throw new errors.WebflowTimeoutError();
|
|
423
|
+
throw new errors.WebflowTimeoutError("Timeout exceeded when calling POST /sites/{site_id}/publish.");
|
|
382
424
|
case "unknown":
|
|
383
425
|
throw new errors.WebflowError({
|
|
384
426
|
message: _response.error.errorMessage,
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* {}
|
|
7
7
|
*/
|
|
8
8
|
export interface SitesPublishRequest {
|
|
9
|
-
/** Array of Custom Domain
|
|
9
|
+
/** Array of Custom Domain IDs to publish */
|
|
10
10
|
customDomains?: string[];
|
|
11
11
|
/** Choice of whether to publish to the default Webflow Subdomain */
|
|
12
12
|
publishToWebflowSubdomain?: boolean;
|
|
@@ -16,6 +16,8 @@ export declare namespace ActivityLogs {
|
|
|
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 ActivityLogs {
|