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
|
@@ -74,15 +74,7 @@ class Ecommerce {
|
|
|
74
74
|
const _response = yield core.fetcher({
|
|
75
75
|
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)}/ecommerce/settings`),
|
|
76
76
|
method: "GET",
|
|
77
|
-
headers: {
|
|
78
|
-
Authorization: yield this._getAuthorizationHeader(),
|
|
79
|
-
"X-Fern-Language": "JavaScript",
|
|
80
|
-
"X-Fern-SDK-Name": "webflow-api",
|
|
81
|
-
"X-Fern-SDK-Version": "2.4.0",
|
|
82
|
-
"User-Agent": "webflow-api/2.4.0",
|
|
83
|
-
"X-Fern-Runtime": core.RUNTIME.type,
|
|
84
|
-
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
85
|
-
},
|
|
77
|
+
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),
|
|
86
78
|
contentType: "application/json",
|
|
87
79
|
requestType: "json",
|
|
88
80
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -103,15 +95,27 @@ class Ecommerce {
|
|
|
103
95
|
case 400:
|
|
104
96
|
throw new Webflow.BadRequestError(_response.error.body);
|
|
105
97
|
case 401:
|
|
106
|
-
throw new Webflow.UnauthorizedError(_response.error.body
|
|
98
|
+
throw new Webflow.UnauthorizedError(serializers.Error_.parseOrThrow(_response.error.body, {
|
|
99
|
+
unrecognizedObjectKeys: "passthrough",
|
|
100
|
+
allowUnrecognizedUnionMembers: true,
|
|
101
|
+
allowUnrecognizedEnumValues: true,
|
|
102
|
+
skipValidation: true,
|
|
103
|
+
breadcrumbsPrefix: ["response"],
|
|
104
|
+
}));
|
|
107
105
|
case 403:
|
|
108
106
|
throw new Webflow.ForbiddenError(_response.error.body);
|
|
109
107
|
case 404:
|
|
110
|
-
throw new Webflow.NotFoundError(_response.error.body
|
|
108
|
+
throw new Webflow.NotFoundError(serializers.Error_.parseOrThrow(_response.error.body, {
|
|
109
|
+
unrecognizedObjectKeys: "passthrough",
|
|
110
|
+
allowUnrecognizedUnionMembers: true,
|
|
111
|
+
allowUnrecognizedEnumValues: true,
|
|
112
|
+
skipValidation: true,
|
|
113
|
+
breadcrumbsPrefix: ["response"],
|
|
114
|
+
}));
|
|
111
115
|
case 409:
|
|
112
116
|
throw new Webflow.ConflictError(_response.error.body);
|
|
113
117
|
case 429:
|
|
114
|
-
throw new Webflow.TooManyRequestsError(serializers.
|
|
118
|
+
throw new Webflow.TooManyRequestsError(serializers.Error_.parseOrThrow(_response.error.body, {
|
|
115
119
|
unrecognizedObjectKeys: "passthrough",
|
|
116
120
|
allowUnrecognizedUnionMembers: true,
|
|
117
121
|
allowUnrecognizedEnumValues: true,
|
|
@@ -119,7 +123,13 @@ class Ecommerce {
|
|
|
119
123
|
breadcrumbsPrefix: ["response"],
|
|
120
124
|
}));
|
|
121
125
|
case 500:
|
|
122
|
-
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
|
+
}));
|
|
123
133
|
default:
|
|
124
134
|
throw new errors.WebflowError({
|
|
125
135
|
statusCode: _response.error.statusCode,
|
|
@@ -134,7 +144,7 @@ class Ecommerce {
|
|
|
134
144
|
body: _response.error.rawBody,
|
|
135
145
|
});
|
|
136
146
|
case "timeout":
|
|
137
|
-
throw new errors.WebflowTimeoutError();
|
|
147
|
+
throw new errors.WebflowTimeoutError("Timeout exceeded when calling GET /sites/{site_id}/ecommerce/settings.");
|
|
138
148
|
case "unknown":
|
|
139
149
|
throw new errors.WebflowError({
|
|
140
150
|
message: _response.error.errorMessage,
|
|
@@ -16,13 +16,17 @@ export declare namespace Forms {
|
|
|
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 Forms {
|
|
22
24
|
protected readonly _options: Forms.Options;
|
|
23
25
|
constructor(_options: Forms.Options);
|
|
24
26
|
/**
|
|
25
|
-
* List forms for a given site
|
|
27
|
+
* List forms for a given site.
|
|
28
|
+
*
|
|
29
|
+
* Required scope | `forms:read`
|
|
26
30
|
*
|
|
27
31
|
* @param {string} siteId - Unique identifier for a Site
|
|
28
32
|
* @param {Webflow.FormsListRequest} request
|
|
@@ -41,7 +45,9 @@ export declare class Forms {
|
|
|
41
45
|
*/
|
|
42
46
|
list(siteId: string, request?: Webflow.FormsListRequest, requestOptions?: Forms.RequestOptions): Promise<Webflow.FormList>;
|
|
43
47
|
/**
|
|
44
|
-
* Get information about a given form
|
|
48
|
+
* Get information about a given form.
|
|
49
|
+
*
|
|
50
|
+
* Required scope | `forms:read`
|
|
45
51
|
*
|
|
46
52
|
* @param {string} formId - Unique identifier for a Form
|
|
47
53
|
* @param {Forms.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -58,7 +64,9 @@ export declare class Forms {
|
|
|
58
64
|
*/
|
|
59
65
|
get(formId: string, requestOptions?: Forms.RequestOptions): Promise<Webflow.Form>;
|
|
60
66
|
/**
|
|
61
|
-
* List form submissions for a given form
|
|
67
|
+
* List form submissions for a given form
|
|
68
|
+
*
|
|
69
|
+
* Required scope | `forms:read`
|
|
62
70
|
*
|
|
63
71
|
* @param {string} formId - Unique identifier for a Form
|
|
64
72
|
* @param {Webflow.FormsListSubmissionsRequest} request
|
|
@@ -76,7 +84,9 @@ export declare class Forms {
|
|
|
76
84
|
*/
|
|
77
85
|
listSubmissions(formId: string, request?: Webflow.FormsListSubmissionsRequest, requestOptions?: Forms.RequestOptions): Promise<Webflow.FormSubmissionList>;
|
|
78
86
|
/**
|
|
79
|
-
* Get information about a given form
|
|
87
|
+
* Get information about a given form submissio.
|
|
88
|
+
*
|
|
89
|
+
* Required scope | `forms:read`
|
|
80
90
|
*
|
|
81
91
|
* @param {string} formSubmissionId - Unique identifier for a Form Submission
|
|
82
92
|
* @param {Forms.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -93,7 +103,9 @@ export declare class Forms {
|
|
|
93
103
|
*/
|
|
94
104
|
getSubmission(formSubmissionId: string, requestOptions?: Forms.RequestOptions): Promise<Webflow.FormSubmission>;
|
|
95
105
|
/**
|
|
96
|
-
* Update hidden fields on a form submission
|
|
106
|
+
* Update hidden fields on a form submission
|
|
107
|
+
*
|
|
108
|
+
* Required scope | `forms:write`
|
|
97
109
|
*
|
|
98
110
|
* @param {string} formSubmissionId - Unique identifier for a Form Submission
|
|
99
111
|
* @param {Webflow.FormsUpdateSubmissionRequest} request
|
|
@@ -50,7 +50,9 @@ class Forms {
|
|
|
50
50
|
this._options = _options;
|
|
51
51
|
}
|
|
52
52
|
/**
|
|
53
|
-
* List forms for a given site
|
|
53
|
+
* List forms for a given site.
|
|
54
|
+
*
|
|
55
|
+
* Required scope | `forms:read`
|
|
54
56
|
*
|
|
55
57
|
* @param {string} siteId - Unique identifier for a Site
|
|
56
58
|
* @param {Webflow.FormsListRequest} request
|
|
@@ -81,15 +83,7 @@ class Forms {
|
|
|
81
83
|
const _response = yield core.fetcher({
|
|
82
84
|
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)}/forms`),
|
|
83
85
|
method: "GET",
|
|
84
|
-
headers: {
|
|
85
|
-
Authorization: yield this._getAuthorizationHeader(),
|
|
86
|
-
"X-Fern-Language": "JavaScript",
|
|
87
|
-
"X-Fern-SDK-Name": "webflow-api",
|
|
88
|
-
"X-Fern-SDK-Version": "2.4.0",
|
|
89
|
-
"User-Agent": "webflow-api/2.4.0",
|
|
90
|
-
"X-Fern-Runtime": core.RUNTIME.type,
|
|
91
|
-
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
92
|
-
},
|
|
86
|
+
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),
|
|
93
87
|
contentType: "application/json",
|
|
94
88
|
queryParameters: _queryParams,
|
|
95
89
|
requestType: "json",
|
|
@@ -111,15 +105,27 @@ class Forms {
|
|
|
111
105
|
case 400:
|
|
112
106
|
throw new Webflow.BadRequestError(_response.error.body);
|
|
113
107
|
case 401:
|
|
114
|
-
throw new Webflow.UnauthorizedError(_response.error.body
|
|
108
|
+
throw new Webflow.UnauthorizedError(serializers.Error_.parseOrThrow(_response.error.body, {
|
|
109
|
+
unrecognizedObjectKeys: "passthrough",
|
|
110
|
+
allowUnrecognizedUnionMembers: true,
|
|
111
|
+
allowUnrecognizedEnumValues: true,
|
|
112
|
+
skipValidation: true,
|
|
113
|
+
breadcrumbsPrefix: ["response"],
|
|
114
|
+
}));
|
|
115
115
|
case 403:
|
|
116
116
|
throw new Webflow.ForbiddenError(_response.error.body);
|
|
117
117
|
case 404:
|
|
118
|
-
throw new Webflow.NotFoundError(_response.error.body
|
|
118
|
+
throw new Webflow.NotFoundError(serializers.Error_.parseOrThrow(_response.error.body, {
|
|
119
|
+
unrecognizedObjectKeys: "passthrough",
|
|
120
|
+
allowUnrecognizedUnionMembers: true,
|
|
121
|
+
allowUnrecognizedEnumValues: true,
|
|
122
|
+
skipValidation: true,
|
|
123
|
+
breadcrumbsPrefix: ["response"],
|
|
124
|
+
}));
|
|
119
125
|
case 409:
|
|
120
126
|
throw new Webflow.ConflictError(_response.error.body);
|
|
121
127
|
case 429:
|
|
122
|
-
throw new Webflow.TooManyRequestsError(serializers.
|
|
128
|
+
throw new Webflow.TooManyRequestsError(serializers.Error_.parseOrThrow(_response.error.body, {
|
|
123
129
|
unrecognizedObjectKeys: "passthrough",
|
|
124
130
|
allowUnrecognizedUnionMembers: true,
|
|
125
131
|
allowUnrecognizedEnumValues: true,
|
|
@@ -127,7 +133,13 @@ class Forms {
|
|
|
127
133
|
breadcrumbsPrefix: ["response"],
|
|
128
134
|
}));
|
|
129
135
|
case 500:
|
|
130
|
-
throw new Webflow.InternalServerError(_response.error.body
|
|
136
|
+
throw new Webflow.InternalServerError(serializers.Error_.parseOrThrow(_response.error.body, {
|
|
137
|
+
unrecognizedObjectKeys: "passthrough",
|
|
138
|
+
allowUnrecognizedUnionMembers: true,
|
|
139
|
+
allowUnrecognizedEnumValues: true,
|
|
140
|
+
skipValidation: true,
|
|
141
|
+
breadcrumbsPrefix: ["response"],
|
|
142
|
+
}));
|
|
131
143
|
default:
|
|
132
144
|
throw new errors.WebflowError({
|
|
133
145
|
statusCode: _response.error.statusCode,
|
|
@@ -142,7 +154,7 @@ class Forms {
|
|
|
142
154
|
body: _response.error.rawBody,
|
|
143
155
|
});
|
|
144
156
|
case "timeout":
|
|
145
|
-
throw new errors.WebflowTimeoutError();
|
|
157
|
+
throw new errors.WebflowTimeoutError("Timeout exceeded when calling GET /sites/{site_id}/forms.");
|
|
146
158
|
case "unknown":
|
|
147
159
|
throw new errors.WebflowError({
|
|
148
160
|
message: _response.error.errorMessage,
|
|
@@ -151,7 +163,9 @@ class Forms {
|
|
|
151
163
|
});
|
|
152
164
|
}
|
|
153
165
|
/**
|
|
154
|
-
* Get information about a given form
|
|
166
|
+
* Get information about a given form.
|
|
167
|
+
*
|
|
168
|
+
* Required scope | `forms:read`
|
|
155
169
|
*
|
|
156
170
|
* @param {string} formId - Unique identifier for a Form
|
|
157
171
|
* @param {Forms.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -172,15 +186,7 @@ class Forms {
|
|
|
172
186
|
const _response = yield core.fetcher({
|
|
173
187
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.WebflowEnvironment.Default, `forms/${encodeURIComponent(formId)}`),
|
|
174
188
|
method: "GET",
|
|
175
|
-
headers: {
|
|
176
|
-
Authorization: yield this._getAuthorizationHeader(),
|
|
177
|
-
"X-Fern-Language": "JavaScript",
|
|
178
|
-
"X-Fern-SDK-Name": "webflow-api",
|
|
179
|
-
"X-Fern-SDK-Version": "2.4.0",
|
|
180
|
-
"User-Agent": "webflow-api/2.4.0",
|
|
181
|
-
"X-Fern-Runtime": core.RUNTIME.type,
|
|
182
|
-
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
183
|
-
},
|
|
189
|
+
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),
|
|
184
190
|
contentType: "application/json",
|
|
185
191
|
requestType: "json",
|
|
186
192
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -201,13 +207,25 @@ class Forms {
|
|
|
201
207
|
case 400:
|
|
202
208
|
throw new Webflow.BadRequestError(_response.error.body);
|
|
203
209
|
case 401:
|
|
204
|
-
throw new Webflow.UnauthorizedError(_response.error.body
|
|
210
|
+
throw new Webflow.UnauthorizedError(serializers.Error_.parseOrThrow(_response.error.body, {
|
|
211
|
+
unrecognizedObjectKeys: "passthrough",
|
|
212
|
+
allowUnrecognizedUnionMembers: true,
|
|
213
|
+
allowUnrecognizedEnumValues: true,
|
|
214
|
+
skipValidation: true,
|
|
215
|
+
breadcrumbsPrefix: ["response"],
|
|
216
|
+
}));
|
|
205
217
|
case 403:
|
|
206
218
|
throw new Webflow.ForbiddenError(_response.error.body);
|
|
207
219
|
case 404:
|
|
208
|
-
throw new Webflow.NotFoundError(_response.error.body
|
|
220
|
+
throw new Webflow.NotFoundError(serializers.Error_.parseOrThrow(_response.error.body, {
|
|
221
|
+
unrecognizedObjectKeys: "passthrough",
|
|
222
|
+
allowUnrecognizedUnionMembers: true,
|
|
223
|
+
allowUnrecognizedEnumValues: true,
|
|
224
|
+
skipValidation: true,
|
|
225
|
+
breadcrumbsPrefix: ["response"],
|
|
226
|
+
}));
|
|
209
227
|
case 429:
|
|
210
|
-
throw new Webflow.TooManyRequestsError(serializers.
|
|
228
|
+
throw new Webflow.TooManyRequestsError(serializers.Error_.parseOrThrow(_response.error.body, {
|
|
211
229
|
unrecognizedObjectKeys: "passthrough",
|
|
212
230
|
allowUnrecognizedUnionMembers: true,
|
|
213
231
|
allowUnrecognizedEnumValues: true,
|
|
@@ -215,7 +233,13 @@ class Forms {
|
|
|
215
233
|
breadcrumbsPrefix: ["response"],
|
|
216
234
|
}));
|
|
217
235
|
case 500:
|
|
218
|
-
throw new Webflow.InternalServerError(_response.error.body
|
|
236
|
+
throw new Webflow.InternalServerError(serializers.Error_.parseOrThrow(_response.error.body, {
|
|
237
|
+
unrecognizedObjectKeys: "passthrough",
|
|
238
|
+
allowUnrecognizedUnionMembers: true,
|
|
239
|
+
allowUnrecognizedEnumValues: true,
|
|
240
|
+
skipValidation: true,
|
|
241
|
+
breadcrumbsPrefix: ["response"],
|
|
242
|
+
}));
|
|
219
243
|
default:
|
|
220
244
|
throw new errors.WebflowError({
|
|
221
245
|
statusCode: _response.error.statusCode,
|
|
@@ -230,7 +254,7 @@ class Forms {
|
|
|
230
254
|
body: _response.error.rawBody,
|
|
231
255
|
});
|
|
232
256
|
case "timeout":
|
|
233
|
-
throw new errors.WebflowTimeoutError();
|
|
257
|
+
throw new errors.WebflowTimeoutError("Timeout exceeded when calling GET /forms/{form_id}.");
|
|
234
258
|
case "unknown":
|
|
235
259
|
throw new errors.WebflowError({
|
|
236
260
|
message: _response.error.errorMessage,
|
|
@@ -239,7 +263,9 @@ class Forms {
|
|
|
239
263
|
});
|
|
240
264
|
}
|
|
241
265
|
/**
|
|
242
|
-
* List form submissions for a given form
|
|
266
|
+
* List form submissions for a given form
|
|
267
|
+
*
|
|
268
|
+
* Required scope | `forms:read`
|
|
243
269
|
*
|
|
244
270
|
* @param {string} formId - Unique identifier for a Form
|
|
245
271
|
* @param {Webflow.FormsListSubmissionsRequest} request
|
|
@@ -269,15 +295,7 @@ class Forms {
|
|
|
269
295
|
const _response = yield core.fetcher({
|
|
270
296
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.WebflowEnvironment.Default, `forms/${encodeURIComponent(formId)}/submissions`),
|
|
271
297
|
method: "GET",
|
|
272
|
-
headers: {
|
|
273
|
-
Authorization: yield this._getAuthorizationHeader(),
|
|
274
|
-
"X-Fern-Language": "JavaScript",
|
|
275
|
-
"X-Fern-SDK-Name": "webflow-api",
|
|
276
|
-
"X-Fern-SDK-Version": "2.4.0",
|
|
277
|
-
"User-Agent": "webflow-api/2.4.0",
|
|
278
|
-
"X-Fern-Runtime": core.RUNTIME.type,
|
|
279
|
-
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
280
|
-
},
|
|
298
|
+
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),
|
|
281
299
|
contentType: "application/json",
|
|
282
300
|
queryParameters: _queryParams,
|
|
283
301
|
requestType: "json",
|
|
@@ -299,13 +317,25 @@ class Forms {
|
|
|
299
317
|
case 400:
|
|
300
318
|
throw new Webflow.BadRequestError(_response.error.body);
|
|
301
319
|
case 401:
|
|
302
|
-
throw new Webflow.UnauthorizedError(_response.error.body
|
|
320
|
+
throw new Webflow.UnauthorizedError(serializers.Error_.parseOrThrow(_response.error.body, {
|
|
321
|
+
unrecognizedObjectKeys: "passthrough",
|
|
322
|
+
allowUnrecognizedUnionMembers: true,
|
|
323
|
+
allowUnrecognizedEnumValues: true,
|
|
324
|
+
skipValidation: true,
|
|
325
|
+
breadcrumbsPrefix: ["response"],
|
|
326
|
+
}));
|
|
303
327
|
case 403:
|
|
304
328
|
throw new Webflow.ForbiddenError(_response.error.body);
|
|
305
329
|
case 404:
|
|
306
|
-
throw new Webflow.NotFoundError(_response.error.body
|
|
330
|
+
throw new Webflow.NotFoundError(serializers.Error_.parseOrThrow(_response.error.body, {
|
|
331
|
+
unrecognizedObjectKeys: "passthrough",
|
|
332
|
+
allowUnrecognizedUnionMembers: true,
|
|
333
|
+
allowUnrecognizedEnumValues: true,
|
|
334
|
+
skipValidation: true,
|
|
335
|
+
breadcrumbsPrefix: ["response"],
|
|
336
|
+
}));
|
|
307
337
|
case 429:
|
|
308
|
-
throw new Webflow.TooManyRequestsError(serializers.
|
|
338
|
+
throw new Webflow.TooManyRequestsError(serializers.Error_.parseOrThrow(_response.error.body, {
|
|
309
339
|
unrecognizedObjectKeys: "passthrough",
|
|
310
340
|
allowUnrecognizedUnionMembers: true,
|
|
311
341
|
allowUnrecognizedEnumValues: true,
|
|
@@ -313,7 +343,13 @@ class Forms {
|
|
|
313
343
|
breadcrumbsPrefix: ["response"],
|
|
314
344
|
}));
|
|
315
345
|
case 500:
|
|
316
|
-
throw new Webflow.InternalServerError(_response.error.body
|
|
346
|
+
throw new Webflow.InternalServerError(serializers.Error_.parseOrThrow(_response.error.body, {
|
|
347
|
+
unrecognizedObjectKeys: "passthrough",
|
|
348
|
+
allowUnrecognizedUnionMembers: true,
|
|
349
|
+
allowUnrecognizedEnumValues: true,
|
|
350
|
+
skipValidation: true,
|
|
351
|
+
breadcrumbsPrefix: ["response"],
|
|
352
|
+
}));
|
|
317
353
|
default:
|
|
318
354
|
throw new errors.WebflowError({
|
|
319
355
|
statusCode: _response.error.statusCode,
|
|
@@ -328,7 +364,7 @@ class Forms {
|
|
|
328
364
|
body: _response.error.rawBody,
|
|
329
365
|
});
|
|
330
366
|
case "timeout":
|
|
331
|
-
throw new errors.WebflowTimeoutError();
|
|
367
|
+
throw new errors.WebflowTimeoutError("Timeout exceeded when calling GET /forms/{form_id}/submissions.");
|
|
332
368
|
case "unknown":
|
|
333
369
|
throw new errors.WebflowError({
|
|
334
370
|
message: _response.error.errorMessage,
|
|
@@ -337,7 +373,9 @@ class Forms {
|
|
|
337
373
|
});
|
|
338
374
|
}
|
|
339
375
|
/**
|
|
340
|
-
* Get information about a given form
|
|
376
|
+
* Get information about a given form submissio.
|
|
377
|
+
*
|
|
378
|
+
* Required scope | `forms:read`
|
|
341
379
|
*
|
|
342
380
|
* @param {string} formSubmissionId - Unique identifier for a Form Submission
|
|
343
381
|
* @param {Forms.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -358,15 +396,7 @@ class Forms {
|
|
|
358
396
|
const _response = yield core.fetcher({
|
|
359
397
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.WebflowEnvironment.Default, `form_submissions/${encodeURIComponent(formSubmissionId)}`),
|
|
360
398
|
method: "GET",
|
|
361
|
-
headers: {
|
|
362
|
-
Authorization: yield this._getAuthorizationHeader(),
|
|
363
|
-
"X-Fern-Language": "JavaScript",
|
|
364
|
-
"X-Fern-SDK-Name": "webflow-api",
|
|
365
|
-
"X-Fern-SDK-Version": "2.4.0",
|
|
366
|
-
"User-Agent": "webflow-api/2.4.0",
|
|
367
|
-
"X-Fern-Runtime": core.RUNTIME.type,
|
|
368
|
-
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
369
|
-
},
|
|
399
|
+
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),
|
|
370
400
|
contentType: "application/json",
|
|
371
401
|
requestType: "json",
|
|
372
402
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -387,13 +417,25 @@ class Forms {
|
|
|
387
417
|
case 400:
|
|
388
418
|
throw new Webflow.BadRequestError(_response.error.body);
|
|
389
419
|
case 401:
|
|
390
|
-
throw new Webflow.UnauthorizedError(_response.error.body
|
|
420
|
+
throw new Webflow.UnauthorizedError(serializers.Error_.parseOrThrow(_response.error.body, {
|
|
421
|
+
unrecognizedObjectKeys: "passthrough",
|
|
422
|
+
allowUnrecognizedUnionMembers: true,
|
|
423
|
+
allowUnrecognizedEnumValues: true,
|
|
424
|
+
skipValidation: true,
|
|
425
|
+
breadcrumbsPrefix: ["response"],
|
|
426
|
+
}));
|
|
391
427
|
case 403:
|
|
392
428
|
throw new Webflow.ForbiddenError(_response.error.body);
|
|
393
429
|
case 404:
|
|
394
|
-
throw new Webflow.NotFoundError(_response.error.body
|
|
430
|
+
throw new Webflow.NotFoundError(serializers.Error_.parseOrThrow(_response.error.body, {
|
|
431
|
+
unrecognizedObjectKeys: "passthrough",
|
|
432
|
+
allowUnrecognizedUnionMembers: true,
|
|
433
|
+
allowUnrecognizedEnumValues: true,
|
|
434
|
+
skipValidation: true,
|
|
435
|
+
breadcrumbsPrefix: ["response"],
|
|
436
|
+
}));
|
|
395
437
|
case 429:
|
|
396
|
-
throw new Webflow.TooManyRequestsError(serializers.
|
|
438
|
+
throw new Webflow.TooManyRequestsError(serializers.Error_.parseOrThrow(_response.error.body, {
|
|
397
439
|
unrecognizedObjectKeys: "passthrough",
|
|
398
440
|
allowUnrecognizedUnionMembers: true,
|
|
399
441
|
allowUnrecognizedEnumValues: true,
|
|
@@ -401,7 +443,13 @@ class Forms {
|
|
|
401
443
|
breadcrumbsPrefix: ["response"],
|
|
402
444
|
}));
|
|
403
445
|
case 500:
|
|
404
|
-
throw new Webflow.InternalServerError(_response.error.body
|
|
446
|
+
throw new Webflow.InternalServerError(serializers.Error_.parseOrThrow(_response.error.body, {
|
|
447
|
+
unrecognizedObjectKeys: "passthrough",
|
|
448
|
+
allowUnrecognizedUnionMembers: true,
|
|
449
|
+
allowUnrecognizedEnumValues: true,
|
|
450
|
+
skipValidation: true,
|
|
451
|
+
breadcrumbsPrefix: ["response"],
|
|
452
|
+
}));
|
|
405
453
|
default:
|
|
406
454
|
throw new errors.WebflowError({
|
|
407
455
|
statusCode: _response.error.statusCode,
|
|
@@ -416,7 +464,7 @@ class Forms {
|
|
|
416
464
|
body: _response.error.rawBody,
|
|
417
465
|
});
|
|
418
466
|
case "timeout":
|
|
419
|
-
throw new errors.WebflowTimeoutError();
|
|
467
|
+
throw new errors.WebflowTimeoutError("Timeout exceeded when calling GET /form_submissions/{form_submission_id}.");
|
|
420
468
|
case "unknown":
|
|
421
469
|
throw new errors.WebflowError({
|
|
422
470
|
message: _response.error.errorMessage,
|
|
@@ -425,7 +473,9 @@ class Forms {
|
|
|
425
473
|
});
|
|
426
474
|
}
|
|
427
475
|
/**
|
|
428
|
-
* Update hidden fields on a form submission
|
|
476
|
+
* Update hidden fields on a form submission
|
|
477
|
+
*
|
|
478
|
+
* Required scope | `forms:write`
|
|
429
479
|
*
|
|
430
480
|
* @param {string} formSubmissionId - Unique identifier for a Form Submission
|
|
431
481
|
* @param {Webflow.FormsUpdateSubmissionRequest} request
|
|
@@ -448,18 +498,14 @@ class Forms {
|
|
|
448
498
|
const _response = yield core.fetcher({
|
|
449
499
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.WebflowEnvironment.Default, `form_submissions/${encodeURIComponent(formSubmissionId)}`),
|
|
450
500
|
method: "PATCH",
|
|
451
|
-
headers: {
|
|
452
|
-
Authorization: yield this._getAuthorizationHeader(),
|
|
453
|
-
"X-Fern-Language": "JavaScript",
|
|
454
|
-
"X-Fern-SDK-Name": "webflow-api",
|
|
455
|
-
"X-Fern-SDK-Version": "2.4.0",
|
|
456
|
-
"User-Agent": "webflow-api/2.4.0",
|
|
457
|
-
"X-Fern-Runtime": core.RUNTIME.type,
|
|
458
|
-
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
459
|
-
},
|
|
501
|
+
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),
|
|
460
502
|
contentType: "application/json",
|
|
461
503
|
requestType: "json",
|
|
462
|
-
body: serializers.FormsUpdateSubmissionRequest.jsonOrThrow(request, {
|
|
504
|
+
body: serializers.FormsUpdateSubmissionRequest.jsonOrThrow(request, {
|
|
505
|
+
unrecognizedObjectKeys: "passthrough",
|
|
506
|
+
allowUnrecognizedUnionMembers: true,
|
|
507
|
+
allowUnrecognizedEnumValues: true,
|
|
508
|
+
}),
|
|
463
509
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
464
510
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
465
511
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -478,15 +524,27 @@ class Forms {
|
|
|
478
524
|
case 400:
|
|
479
525
|
throw new Webflow.BadRequestError(_response.error.body);
|
|
480
526
|
case 401:
|
|
481
|
-
throw new Webflow.UnauthorizedError(_response.error.body
|
|
527
|
+
throw new Webflow.UnauthorizedError(serializers.Error_.parseOrThrow(_response.error.body, {
|
|
528
|
+
unrecognizedObjectKeys: "passthrough",
|
|
529
|
+
allowUnrecognizedUnionMembers: true,
|
|
530
|
+
allowUnrecognizedEnumValues: true,
|
|
531
|
+
skipValidation: true,
|
|
532
|
+
breadcrumbsPrefix: ["response"],
|
|
533
|
+
}));
|
|
482
534
|
case 403:
|
|
483
535
|
throw new Webflow.ForbiddenError(_response.error.body);
|
|
484
536
|
case 404:
|
|
485
|
-
throw new Webflow.NotFoundError(_response.error.body
|
|
537
|
+
throw new Webflow.NotFoundError(serializers.Error_.parseOrThrow(_response.error.body, {
|
|
538
|
+
unrecognizedObjectKeys: "passthrough",
|
|
539
|
+
allowUnrecognizedUnionMembers: true,
|
|
540
|
+
allowUnrecognizedEnumValues: true,
|
|
541
|
+
skipValidation: true,
|
|
542
|
+
breadcrumbsPrefix: ["response"],
|
|
543
|
+
}));
|
|
486
544
|
case 409:
|
|
487
545
|
throw new Webflow.ConflictError(_response.error.body);
|
|
488
546
|
case 429:
|
|
489
|
-
throw new Webflow.TooManyRequestsError(serializers.
|
|
547
|
+
throw new Webflow.TooManyRequestsError(serializers.Error_.parseOrThrow(_response.error.body, {
|
|
490
548
|
unrecognizedObjectKeys: "passthrough",
|
|
491
549
|
allowUnrecognizedUnionMembers: true,
|
|
492
550
|
allowUnrecognizedEnumValues: true,
|
|
@@ -494,7 +552,13 @@ class Forms {
|
|
|
494
552
|
breadcrumbsPrefix: ["response"],
|
|
495
553
|
}));
|
|
496
554
|
case 500:
|
|
497
|
-
throw new Webflow.InternalServerError(_response.error.body
|
|
555
|
+
throw new Webflow.InternalServerError(serializers.Error_.parseOrThrow(_response.error.body, {
|
|
556
|
+
unrecognizedObjectKeys: "passthrough",
|
|
557
|
+
allowUnrecognizedUnionMembers: true,
|
|
558
|
+
allowUnrecognizedEnumValues: true,
|
|
559
|
+
skipValidation: true,
|
|
560
|
+
breadcrumbsPrefix: ["response"],
|
|
561
|
+
}));
|
|
498
562
|
default:
|
|
499
563
|
throw new errors.WebflowError({
|
|
500
564
|
statusCode: _response.error.statusCode,
|
|
@@ -509,7 +573,7 @@ class Forms {
|
|
|
509
573
|
body: _response.error.rawBody,
|
|
510
574
|
});
|
|
511
575
|
case "timeout":
|
|
512
|
-
throw new errors.WebflowTimeoutError();
|
|
576
|
+
throw new errors.WebflowTimeoutError("Timeout exceeded when calling PATCH /form_submissions/{form_submission_id}.");
|
|
513
577
|
case "unknown":
|
|
514
578
|
throw new errors.WebflowError({
|
|
515
579
|
message: _response.error.errorMessage,
|
|
@@ -16,6 +16,8 @@ export declare namespace Inventory {
|
|
|
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 Inventory {
|
|
@@ -43,7 +45,12 @@ export declare class Inventory {
|
|
|
43
45
|
*/
|
|
44
46
|
list(collectionId: string, itemId: string, requestOptions?: Inventory.RequestOptions): Promise<Webflow.InventoryItem>;
|
|
45
47
|
/**
|
|
46
|
-
* Updates the current inventory levels for a particular SKU item.
|
|
48
|
+
* Updates the current inventory levels for a particular SKU item.
|
|
49
|
+
*
|
|
50
|
+
* Updates may be given in one or two methods, absolutely or incrementally.
|
|
51
|
+
*
|
|
52
|
+
* - Absolute updates are done by setting `quantity` directly.
|
|
53
|
+
* - Incremental updates are by specifying the inventory delta in `updateQuantity` which is then added to the `quantity` stored on the server.
|
|
47
54
|
*
|
|
48
55
|
* Required scope | `ecommerce:write`
|
|
49
56
|
*
|