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
|
@@ -9,10 +9,10 @@
|
|
|
9
9
|
* }
|
|
10
10
|
*/
|
|
11
11
|
export interface AssetsCreateRequest {
|
|
12
|
-
/**
|
|
12
|
+
/** File name including file extension. File names must be less than 100 characters. */
|
|
13
13
|
fileName: string;
|
|
14
14
|
/** MD5 hash of the file */
|
|
15
15
|
fileHash: string;
|
|
16
|
-
/**
|
|
16
|
+
/** ID of the Asset folder (optional) */
|
|
17
17
|
parentFolder?: string;
|
|
18
18
|
}
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
*/
|
|
4
4
|
/**
|
|
5
5
|
* @example
|
|
6
|
-
* {
|
|
7
|
-
* displayName: "bulldoze.png"
|
|
8
|
-
* }
|
|
6
|
+
* {}
|
|
9
7
|
*/
|
|
10
8
|
export interface AssetsUpdateRequest {
|
|
11
|
-
/**
|
|
12
|
-
|
|
9
|
+
/** Unique identifier for a specific locale. Applicable, when using localization. */
|
|
10
|
+
localeId?: string;
|
|
11
|
+
/** A human readable name for the asset */
|
|
12
|
+
displayName?: string;
|
|
13
13
|
}
|
|
@@ -18,13 +18,17 @@ export declare namespace Collections {
|
|
|
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 Collections {
|
|
24
26
|
protected readonly _options: Collections.Options;
|
|
25
27
|
constructor(_options: Collections.Options);
|
|
26
28
|
/**
|
|
27
|
-
* List of all Collections within a Site.
|
|
29
|
+
* List of all Collections within a Site.
|
|
30
|
+
*
|
|
31
|
+
* Required scope | `cms:read`
|
|
28
32
|
*
|
|
29
33
|
* @param {string} siteId - Unique identifier for a Site
|
|
30
34
|
* @param {Collections.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -40,7 +44,9 @@ export declare class Collections {
|
|
|
40
44
|
*/
|
|
41
45
|
list(siteId: string, requestOptions?: Collections.RequestOptions): Promise<Webflow.CollectionList>;
|
|
42
46
|
/**
|
|
43
|
-
* Create a Collection for a site.
|
|
47
|
+
* Create a Collection for a site.
|
|
48
|
+
*
|
|
49
|
+
* Required scope | `cms:write`
|
|
44
50
|
*
|
|
45
51
|
* @param {string} siteId - Unique identifier for a Site
|
|
46
52
|
* @param {Webflow.CollectionsCreateRequest} request
|
|
@@ -61,7 +67,9 @@ export declare class Collections {
|
|
|
61
67
|
*/
|
|
62
68
|
create(siteId: string, request: Webflow.CollectionsCreateRequest, requestOptions?: Collections.RequestOptions): Promise<Webflow.Collection>;
|
|
63
69
|
/**
|
|
64
|
-
* Get the full details of a collection from its ID.
|
|
70
|
+
* Get the full details of a collection from its ID.
|
|
71
|
+
*
|
|
72
|
+
* Required scope | `cms:read`
|
|
65
73
|
*
|
|
66
74
|
* @param {string} collectionId - Unique identifier for a Collection
|
|
67
75
|
* @param {Collections.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -77,26 +85,11 @@ export declare class Collections {
|
|
|
77
85
|
*/
|
|
78
86
|
get(collectionId: string, requestOptions?: Collections.RequestOptions): Promise<Webflow.Collection>;
|
|
79
87
|
/**
|
|
80
|
-
* Delete a collection using its ID.
|
|
81
|
-
*
|
|
82
|
-
* @param {string} collectionId - Unique identifier for a Collection
|
|
83
|
-
* @param {Collections.RequestOptions} requestOptions - Request-specific configuration.
|
|
88
|
+
* Delete a collection using its ID.
|
|
84
89
|
*
|
|
85
|
-
*
|
|
86
|
-
* @throws {@link Webflow.UnauthorizedError}
|
|
87
|
-
* @throws {@link Webflow.NotFoundError}
|
|
88
|
-
* @throws {@link Webflow.TooManyRequestsError}
|
|
89
|
-
* @throws {@link Webflow.InternalServerError}
|
|
90
|
-
*
|
|
91
|
-
* @example
|
|
92
|
-
* await client.collections.deleteCollection("580e63fc8c9a982ac9b8b745")
|
|
93
|
-
*/
|
|
94
|
-
deleteCollection(collectionId: string, requestOptions?: Collections.RequestOptions): Promise<void>;
|
|
95
|
-
/**
|
|
96
|
-
* Delete a custom field in a collection. This endpoint does not currently support bulk deletion. </br></br> Required scope | `cms:write`
|
|
90
|
+
* Required scope | `cms:write`
|
|
97
91
|
*
|
|
98
92
|
* @param {string} collectionId - Unique identifier for a Collection
|
|
99
|
-
* @param {string} fieldId - Unique identifier for a Field in a collection
|
|
100
93
|
* @param {Collections.RequestOptions} requestOptions - Request-specific configuration.
|
|
101
94
|
*
|
|
102
95
|
* @throws {@link Webflow.BadRequestError}
|
|
@@ -106,9 +99,9 @@ export declare class Collections {
|
|
|
106
99
|
* @throws {@link Webflow.InternalServerError}
|
|
107
100
|
*
|
|
108
101
|
* @example
|
|
109
|
-
* await client.collections.delete("580e63fc8c9a982ac9b8b745"
|
|
102
|
+
* await client.collections.delete("580e63fc8c9a982ac9b8b745")
|
|
110
103
|
*/
|
|
111
|
-
delete(collectionId: string,
|
|
104
|
+
delete(collectionId: string, requestOptions?: Collections.RequestOptions): Promise<void>;
|
|
112
105
|
protected _fields: Fields | undefined;
|
|
113
106
|
get fields(): Fields;
|
|
114
107
|
protected _items: Items | undefined;
|
|
@@ -52,7 +52,9 @@ class Collections {
|
|
|
52
52
|
this._options = _options;
|
|
53
53
|
}
|
|
54
54
|
/**
|
|
55
|
-
* List of all Collections within a Site.
|
|
55
|
+
* List of all Collections within a Site.
|
|
56
|
+
*
|
|
57
|
+
* Required scope | `cms:read`
|
|
56
58
|
*
|
|
57
59
|
* @param {string} siteId - Unique identifier for a Site
|
|
58
60
|
* @param {Collections.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -72,15 +74,7 @@ class Collections {
|
|
|
72
74
|
const _response = yield core.fetcher({
|
|
73
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)}/collections`),
|
|
74
76
|
method: "GET",
|
|
75
|
-
headers: {
|
|
76
|
-
Authorization: yield this._getAuthorizationHeader(),
|
|
77
|
-
"X-Fern-Language": "JavaScript",
|
|
78
|
-
"X-Fern-SDK-Name": "webflow-api",
|
|
79
|
-
"X-Fern-SDK-Version": "2.4.0",
|
|
80
|
-
"User-Agent": "webflow-api/2.4.0",
|
|
81
|
-
"X-Fern-Runtime": core.RUNTIME.type,
|
|
82
|
-
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
83
|
-
},
|
|
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),
|
|
84
78
|
contentType: "application/json",
|
|
85
79
|
requestType: "json",
|
|
86
80
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -101,11 +95,23 @@ class Collections {
|
|
|
101
95
|
case 400:
|
|
102
96
|
throw new Webflow.BadRequestError(_response.error.body);
|
|
103
97
|
case 401:
|
|
104
|
-
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
|
+
}));
|
|
105
105
|
case 404:
|
|
106
|
-
throw new Webflow.NotFoundError(_response.error.body
|
|
106
|
+
throw new Webflow.NotFoundError(serializers.Error_.parseOrThrow(_response.error.body, {
|
|
107
|
+
unrecognizedObjectKeys: "passthrough",
|
|
108
|
+
allowUnrecognizedUnionMembers: true,
|
|
109
|
+
allowUnrecognizedEnumValues: true,
|
|
110
|
+
skipValidation: true,
|
|
111
|
+
breadcrumbsPrefix: ["response"],
|
|
112
|
+
}));
|
|
107
113
|
case 429:
|
|
108
|
-
throw new Webflow.TooManyRequestsError(serializers.
|
|
114
|
+
throw new Webflow.TooManyRequestsError(serializers.Error_.parseOrThrow(_response.error.body, {
|
|
109
115
|
unrecognizedObjectKeys: "passthrough",
|
|
110
116
|
allowUnrecognizedUnionMembers: true,
|
|
111
117
|
allowUnrecognizedEnumValues: true,
|
|
@@ -113,7 +119,13 @@ class Collections {
|
|
|
113
119
|
breadcrumbsPrefix: ["response"],
|
|
114
120
|
}));
|
|
115
121
|
case 500:
|
|
116
|
-
throw new Webflow.InternalServerError(_response.error.body
|
|
122
|
+
throw new Webflow.InternalServerError(serializers.Error_.parseOrThrow(_response.error.body, {
|
|
123
|
+
unrecognizedObjectKeys: "passthrough",
|
|
124
|
+
allowUnrecognizedUnionMembers: true,
|
|
125
|
+
allowUnrecognizedEnumValues: true,
|
|
126
|
+
skipValidation: true,
|
|
127
|
+
breadcrumbsPrefix: ["response"],
|
|
128
|
+
}));
|
|
117
129
|
default:
|
|
118
130
|
throw new errors.WebflowError({
|
|
119
131
|
statusCode: _response.error.statusCode,
|
|
@@ -128,7 +140,7 @@ class Collections {
|
|
|
128
140
|
body: _response.error.rawBody,
|
|
129
141
|
});
|
|
130
142
|
case "timeout":
|
|
131
|
-
throw new errors.WebflowTimeoutError();
|
|
143
|
+
throw new errors.WebflowTimeoutError("Timeout exceeded when calling GET /sites/{site_id}/collections.");
|
|
132
144
|
case "unknown":
|
|
133
145
|
throw new errors.WebflowError({
|
|
134
146
|
message: _response.error.errorMessage,
|
|
@@ -137,7 +149,9 @@ class Collections {
|
|
|
137
149
|
});
|
|
138
150
|
}
|
|
139
151
|
/**
|
|
140
|
-
* Create a Collection for a site.
|
|
152
|
+
* Create a Collection for a site.
|
|
153
|
+
*
|
|
154
|
+
* Required scope | `cms:write`
|
|
141
155
|
*
|
|
142
156
|
* @param {string} siteId - Unique identifier for a Site
|
|
143
157
|
* @param {Webflow.CollectionsCreateRequest} request
|
|
@@ -162,18 +176,14 @@ class Collections {
|
|
|
162
176
|
const _response = yield core.fetcher({
|
|
163
177
|
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)}/collections`),
|
|
164
178
|
method: "POST",
|
|
165
|
-
headers: {
|
|
166
|
-
Authorization: yield this._getAuthorizationHeader(),
|
|
167
|
-
"X-Fern-Language": "JavaScript",
|
|
168
|
-
"X-Fern-SDK-Name": "webflow-api",
|
|
169
|
-
"X-Fern-SDK-Version": "2.4.0",
|
|
170
|
-
"User-Agent": "webflow-api/2.4.0",
|
|
171
|
-
"X-Fern-Runtime": core.RUNTIME.type,
|
|
172
|
-
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
173
|
-
},
|
|
179
|
+
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),
|
|
174
180
|
contentType: "application/json",
|
|
175
181
|
requestType: "json",
|
|
176
|
-
body: serializers.CollectionsCreateRequest.jsonOrThrow(request, {
|
|
182
|
+
body: serializers.CollectionsCreateRequest.jsonOrThrow(request, {
|
|
183
|
+
unrecognizedObjectKeys: "passthrough",
|
|
184
|
+
allowUnrecognizedUnionMembers: true,
|
|
185
|
+
allowUnrecognizedEnumValues: true,
|
|
186
|
+
}),
|
|
177
187
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
178
188
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
179
189
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -192,11 +202,23 @@ class Collections {
|
|
|
192
202
|
case 400:
|
|
193
203
|
throw new Webflow.BadRequestError(_response.error.body);
|
|
194
204
|
case 401:
|
|
195
|
-
throw new Webflow.UnauthorizedError(_response.error.body
|
|
205
|
+
throw new Webflow.UnauthorizedError(serializers.Error_.parseOrThrow(_response.error.body, {
|
|
206
|
+
unrecognizedObjectKeys: "passthrough",
|
|
207
|
+
allowUnrecognizedUnionMembers: true,
|
|
208
|
+
allowUnrecognizedEnumValues: true,
|
|
209
|
+
skipValidation: true,
|
|
210
|
+
breadcrumbsPrefix: ["response"],
|
|
211
|
+
}));
|
|
196
212
|
case 404:
|
|
197
|
-
throw new Webflow.NotFoundError(_response.error.body
|
|
213
|
+
throw new Webflow.NotFoundError(serializers.Error_.parseOrThrow(_response.error.body, {
|
|
214
|
+
unrecognizedObjectKeys: "passthrough",
|
|
215
|
+
allowUnrecognizedUnionMembers: true,
|
|
216
|
+
allowUnrecognizedEnumValues: true,
|
|
217
|
+
skipValidation: true,
|
|
218
|
+
breadcrumbsPrefix: ["response"],
|
|
219
|
+
}));
|
|
198
220
|
case 429:
|
|
199
|
-
throw new Webflow.TooManyRequestsError(serializers.
|
|
221
|
+
throw new Webflow.TooManyRequestsError(serializers.Error_.parseOrThrow(_response.error.body, {
|
|
200
222
|
unrecognizedObjectKeys: "passthrough",
|
|
201
223
|
allowUnrecognizedUnionMembers: true,
|
|
202
224
|
allowUnrecognizedEnumValues: true,
|
|
@@ -204,7 +226,13 @@ class Collections {
|
|
|
204
226
|
breadcrumbsPrefix: ["response"],
|
|
205
227
|
}));
|
|
206
228
|
case 500:
|
|
207
|
-
throw new Webflow.InternalServerError(_response.error.body
|
|
229
|
+
throw new Webflow.InternalServerError(serializers.Error_.parseOrThrow(_response.error.body, {
|
|
230
|
+
unrecognizedObjectKeys: "passthrough",
|
|
231
|
+
allowUnrecognizedUnionMembers: true,
|
|
232
|
+
allowUnrecognizedEnumValues: true,
|
|
233
|
+
skipValidation: true,
|
|
234
|
+
breadcrumbsPrefix: ["response"],
|
|
235
|
+
}));
|
|
208
236
|
default:
|
|
209
237
|
throw new errors.WebflowError({
|
|
210
238
|
statusCode: _response.error.statusCode,
|
|
@@ -219,7 +247,7 @@ class Collections {
|
|
|
219
247
|
body: _response.error.rawBody,
|
|
220
248
|
});
|
|
221
249
|
case "timeout":
|
|
222
|
-
throw new errors.WebflowTimeoutError();
|
|
250
|
+
throw new errors.WebflowTimeoutError("Timeout exceeded when calling POST /sites/{site_id}/collections.");
|
|
223
251
|
case "unknown":
|
|
224
252
|
throw new errors.WebflowError({
|
|
225
253
|
message: _response.error.errorMessage,
|
|
@@ -228,7 +256,9 @@ class Collections {
|
|
|
228
256
|
});
|
|
229
257
|
}
|
|
230
258
|
/**
|
|
231
|
-
* Get the full details of a collection from its ID.
|
|
259
|
+
* Get the full details of a collection from its ID.
|
|
260
|
+
*
|
|
261
|
+
* Required scope | `cms:read`
|
|
232
262
|
*
|
|
233
263
|
* @param {string} collectionId - Unique identifier for a Collection
|
|
234
264
|
* @param {Collections.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -248,15 +278,7 @@ class Collections {
|
|
|
248
278
|
const _response = yield core.fetcher({
|
|
249
279
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.WebflowEnvironment.Default, `collections/${encodeURIComponent(collectionId)}`),
|
|
250
280
|
method: "GET",
|
|
251
|
-
headers: {
|
|
252
|
-
Authorization: yield this._getAuthorizationHeader(),
|
|
253
|
-
"X-Fern-Language": "JavaScript",
|
|
254
|
-
"X-Fern-SDK-Name": "webflow-api",
|
|
255
|
-
"X-Fern-SDK-Version": "2.4.0",
|
|
256
|
-
"User-Agent": "webflow-api/2.4.0",
|
|
257
|
-
"X-Fern-Runtime": core.RUNTIME.type,
|
|
258
|
-
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
259
|
-
},
|
|
281
|
+
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),
|
|
260
282
|
contentType: "application/json",
|
|
261
283
|
requestType: "json",
|
|
262
284
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -277,11 +299,23 @@ class Collections {
|
|
|
277
299
|
case 400:
|
|
278
300
|
throw new Webflow.BadRequestError(_response.error.body);
|
|
279
301
|
case 401:
|
|
280
|
-
throw new Webflow.UnauthorizedError(_response.error.body
|
|
302
|
+
throw new Webflow.UnauthorizedError(serializers.Error_.parseOrThrow(_response.error.body, {
|
|
303
|
+
unrecognizedObjectKeys: "passthrough",
|
|
304
|
+
allowUnrecognizedUnionMembers: true,
|
|
305
|
+
allowUnrecognizedEnumValues: true,
|
|
306
|
+
skipValidation: true,
|
|
307
|
+
breadcrumbsPrefix: ["response"],
|
|
308
|
+
}));
|
|
281
309
|
case 404:
|
|
282
|
-
throw new Webflow.NotFoundError(_response.error.body
|
|
310
|
+
throw new Webflow.NotFoundError(serializers.Error_.parseOrThrow(_response.error.body, {
|
|
311
|
+
unrecognizedObjectKeys: "passthrough",
|
|
312
|
+
allowUnrecognizedUnionMembers: true,
|
|
313
|
+
allowUnrecognizedEnumValues: true,
|
|
314
|
+
skipValidation: true,
|
|
315
|
+
breadcrumbsPrefix: ["response"],
|
|
316
|
+
}));
|
|
283
317
|
case 429:
|
|
284
|
-
throw new Webflow.TooManyRequestsError(serializers.
|
|
318
|
+
throw new Webflow.TooManyRequestsError(serializers.Error_.parseOrThrow(_response.error.body, {
|
|
285
319
|
unrecognizedObjectKeys: "passthrough",
|
|
286
320
|
allowUnrecognizedUnionMembers: true,
|
|
287
321
|
allowUnrecognizedEnumValues: true,
|
|
@@ -289,7 +323,13 @@ class Collections {
|
|
|
289
323
|
breadcrumbsPrefix: ["response"],
|
|
290
324
|
}));
|
|
291
325
|
case 500:
|
|
292
|
-
throw new Webflow.InternalServerError(_response.error.body
|
|
326
|
+
throw new Webflow.InternalServerError(serializers.Error_.parseOrThrow(_response.error.body, {
|
|
327
|
+
unrecognizedObjectKeys: "passthrough",
|
|
328
|
+
allowUnrecognizedUnionMembers: true,
|
|
329
|
+
allowUnrecognizedEnumValues: true,
|
|
330
|
+
skipValidation: true,
|
|
331
|
+
breadcrumbsPrefix: ["response"],
|
|
332
|
+
}));
|
|
293
333
|
default:
|
|
294
334
|
throw new errors.WebflowError({
|
|
295
335
|
statusCode: _response.error.statusCode,
|
|
@@ -304,7 +344,7 @@ class Collections {
|
|
|
304
344
|
body: _response.error.rawBody,
|
|
305
345
|
});
|
|
306
346
|
case "timeout":
|
|
307
|
-
throw new errors.WebflowTimeoutError();
|
|
347
|
+
throw new errors.WebflowTimeoutError("Timeout exceeded when calling GET /collections/{collection_id}.");
|
|
308
348
|
case "unknown":
|
|
309
349
|
throw new errors.WebflowError({
|
|
310
350
|
message: _response.error.errorMessage,
|
|
@@ -313,7 +353,9 @@ class Collections {
|
|
|
313
353
|
});
|
|
314
354
|
}
|
|
315
355
|
/**
|
|
316
|
-
* Delete a collection using its ID.
|
|
356
|
+
* Delete a collection using its ID.
|
|
357
|
+
*
|
|
358
|
+
* Required scope | `cms:write`
|
|
317
359
|
*
|
|
318
360
|
* @param {string} collectionId - Unique identifier for a Collection
|
|
319
361
|
* @param {Collections.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -325,23 +367,15 @@ class Collections {
|
|
|
325
367
|
* @throws {@link Webflow.InternalServerError}
|
|
326
368
|
*
|
|
327
369
|
* @example
|
|
328
|
-
* await client.collections.
|
|
370
|
+
* await client.collections.delete("580e63fc8c9a982ac9b8b745")
|
|
329
371
|
*/
|
|
330
|
-
|
|
372
|
+
delete(collectionId, requestOptions) {
|
|
331
373
|
var _a;
|
|
332
374
|
return __awaiter(this, void 0, void 0, function* () {
|
|
333
375
|
const _response = yield core.fetcher({
|
|
334
376
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.WebflowEnvironment.Default, `collections/${encodeURIComponent(collectionId)}`),
|
|
335
377
|
method: "DELETE",
|
|
336
|
-
headers: {
|
|
337
|
-
Authorization: yield this._getAuthorizationHeader(),
|
|
338
|
-
"X-Fern-Language": "JavaScript",
|
|
339
|
-
"X-Fern-SDK-Name": "webflow-api",
|
|
340
|
-
"X-Fern-SDK-Version": "2.4.0",
|
|
341
|
-
"User-Agent": "webflow-api/2.4.0",
|
|
342
|
-
"X-Fern-Runtime": core.RUNTIME.type,
|
|
343
|
-
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
344
|
-
},
|
|
378
|
+
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),
|
|
345
379
|
contentType: "application/json",
|
|
346
380
|
requestType: "json",
|
|
347
381
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -356,91 +390,23 @@ class Collections {
|
|
|
356
390
|
case 400:
|
|
357
391
|
throw new Webflow.BadRequestError(_response.error.body);
|
|
358
392
|
case 401:
|
|
359
|
-
throw new Webflow.UnauthorizedError(_response.error.body
|
|
360
|
-
case 404:
|
|
361
|
-
throw new Webflow.NotFoundError(_response.error.body);
|
|
362
|
-
case 429:
|
|
363
|
-
throw new Webflow.TooManyRequestsError(serializers.TooManyRequestsErrorBody.parseOrThrow(_response.error.body, {
|
|
393
|
+
throw new Webflow.UnauthorizedError(serializers.Error_.parseOrThrow(_response.error.body, {
|
|
364
394
|
unrecognizedObjectKeys: "passthrough",
|
|
365
395
|
allowUnrecognizedUnionMembers: true,
|
|
366
396
|
allowUnrecognizedEnumValues: true,
|
|
367
397
|
skipValidation: true,
|
|
368
398
|
breadcrumbsPrefix: ["response"],
|
|
369
399
|
}));
|
|
370
|
-
case 500:
|
|
371
|
-
throw new Webflow.InternalServerError(_response.error.body);
|
|
372
|
-
default:
|
|
373
|
-
throw new errors.WebflowError({
|
|
374
|
-
statusCode: _response.error.statusCode,
|
|
375
|
-
body: _response.error.body,
|
|
376
|
-
});
|
|
377
|
-
}
|
|
378
|
-
}
|
|
379
|
-
switch (_response.error.reason) {
|
|
380
|
-
case "non-json":
|
|
381
|
-
throw new errors.WebflowError({
|
|
382
|
-
statusCode: _response.error.statusCode,
|
|
383
|
-
body: _response.error.rawBody,
|
|
384
|
-
});
|
|
385
|
-
case "timeout":
|
|
386
|
-
throw new errors.WebflowTimeoutError();
|
|
387
|
-
case "unknown":
|
|
388
|
-
throw new errors.WebflowError({
|
|
389
|
-
message: _response.error.errorMessage,
|
|
390
|
-
});
|
|
391
|
-
}
|
|
392
|
-
});
|
|
393
|
-
}
|
|
394
|
-
/**
|
|
395
|
-
* Delete a custom field in a collection. This endpoint does not currently support bulk deletion. </br></br> Required scope | `cms:write`
|
|
396
|
-
*
|
|
397
|
-
* @param {string} collectionId - Unique identifier for a Collection
|
|
398
|
-
* @param {string} fieldId - Unique identifier for a Field in a collection
|
|
399
|
-
* @param {Collections.RequestOptions} requestOptions - Request-specific configuration.
|
|
400
|
-
*
|
|
401
|
-
* @throws {@link Webflow.BadRequestError}
|
|
402
|
-
* @throws {@link Webflow.UnauthorizedError}
|
|
403
|
-
* @throws {@link Webflow.NotFoundError}
|
|
404
|
-
* @throws {@link Webflow.TooManyRequestsError}
|
|
405
|
-
* @throws {@link Webflow.InternalServerError}
|
|
406
|
-
*
|
|
407
|
-
* @example
|
|
408
|
-
* await client.collections.delete("580e63fc8c9a982ac9b8b745", "580e63fc8c9a982ac9b8b745")
|
|
409
|
-
*/
|
|
410
|
-
delete(collectionId, fieldId, requestOptions) {
|
|
411
|
-
var _a;
|
|
412
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
413
|
-
const _response = yield core.fetcher({
|
|
414
|
-
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.WebflowEnvironment.Default, `collections/${encodeURIComponent(collectionId)}/fields/${encodeURIComponent(fieldId)}`),
|
|
415
|
-
method: "DELETE",
|
|
416
|
-
headers: {
|
|
417
|
-
Authorization: yield this._getAuthorizationHeader(),
|
|
418
|
-
"X-Fern-Language": "JavaScript",
|
|
419
|
-
"X-Fern-SDK-Name": "webflow-api",
|
|
420
|
-
"X-Fern-SDK-Version": "2.4.0",
|
|
421
|
-
"User-Agent": "webflow-api/2.4.0",
|
|
422
|
-
"X-Fern-Runtime": core.RUNTIME.type,
|
|
423
|
-
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
424
|
-
},
|
|
425
|
-
contentType: "application/json",
|
|
426
|
-
requestType: "json",
|
|
427
|
-
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
428
|
-
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
429
|
-
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
430
|
-
});
|
|
431
|
-
if (_response.ok) {
|
|
432
|
-
return;
|
|
433
|
-
}
|
|
434
|
-
if (_response.error.reason === "status-code") {
|
|
435
|
-
switch (_response.error.statusCode) {
|
|
436
|
-
case 400:
|
|
437
|
-
throw new Webflow.BadRequestError(_response.error.body);
|
|
438
|
-
case 401:
|
|
439
|
-
throw new Webflow.UnauthorizedError(_response.error.body);
|
|
440
400
|
case 404:
|
|
441
|
-
throw new Webflow.NotFoundError(_response.error.body
|
|
401
|
+
throw new Webflow.NotFoundError(serializers.Error_.parseOrThrow(_response.error.body, {
|
|
402
|
+
unrecognizedObjectKeys: "passthrough",
|
|
403
|
+
allowUnrecognizedUnionMembers: true,
|
|
404
|
+
allowUnrecognizedEnumValues: true,
|
|
405
|
+
skipValidation: true,
|
|
406
|
+
breadcrumbsPrefix: ["response"],
|
|
407
|
+
}));
|
|
442
408
|
case 429:
|
|
443
|
-
throw new Webflow.TooManyRequestsError(serializers.
|
|
409
|
+
throw new Webflow.TooManyRequestsError(serializers.Error_.parseOrThrow(_response.error.body, {
|
|
444
410
|
unrecognizedObjectKeys: "passthrough",
|
|
445
411
|
allowUnrecognizedUnionMembers: true,
|
|
446
412
|
allowUnrecognizedEnumValues: true,
|
|
@@ -448,7 +414,13 @@ class Collections {
|
|
|
448
414
|
breadcrumbsPrefix: ["response"],
|
|
449
415
|
}));
|
|
450
416
|
case 500:
|
|
451
|
-
throw new Webflow.InternalServerError(_response.error.body
|
|
417
|
+
throw new Webflow.InternalServerError(serializers.Error_.parseOrThrow(_response.error.body, {
|
|
418
|
+
unrecognizedObjectKeys: "passthrough",
|
|
419
|
+
allowUnrecognizedUnionMembers: true,
|
|
420
|
+
allowUnrecognizedEnumValues: true,
|
|
421
|
+
skipValidation: true,
|
|
422
|
+
breadcrumbsPrefix: ["response"],
|
|
423
|
+
}));
|
|
452
424
|
default:
|
|
453
425
|
throw new errors.WebflowError({
|
|
454
426
|
statusCode: _response.error.statusCode,
|
|
@@ -463,7 +435,7 @@ class Collections {
|
|
|
463
435
|
body: _response.error.rawBody,
|
|
464
436
|
});
|
|
465
437
|
case "timeout":
|
|
466
|
-
throw new errors.WebflowTimeoutError();
|
|
438
|
+
throw new errors.WebflowTimeoutError("Timeout exceeded when calling DELETE /collections/{collection_id}.");
|
|
467
439
|
case "unknown":
|
|
468
440
|
throw new errors.WebflowError({
|
|
469
441
|
message: _response.error.errorMessage,
|
|
@@ -16,13 +16,24 @@ export declare namespace Fields {
|
|
|
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 Fields {
|
|
22
24
|
protected readonly _options: Fields.Options;
|
|
23
25
|
constructor(_options: Fields.Options);
|
|
24
26
|
/**
|
|
25
|
-
* Create a custom field in a collection.
|
|
27
|
+
* Create a custom field in a collection.
|
|
28
|
+
*
|
|
29
|
+
* Slugs must be all lowercase letters without spaces.
|
|
30
|
+
* If you pass a string with uppercase letters and/or spaces to the "Slug" property, Webflow will
|
|
31
|
+
* convert the slug to lowercase and replace spaces with "-."
|
|
32
|
+
*
|
|
33
|
+
* Only some field types can be created through the API.
|
|
34
|
+
* This endpoint does not currently support bulk creation.
|
|
35
|
+
*
|
|
36
|
+
* Required scope | `cms:write`
|
|
26
37
|
*
|
|
27
38
|
* @param {string} collectionId - Unique identifier for a Collection
|
|
28
39
|
* @param {Webflow.collections.FieldCreate} request
|
|
@@ -44,7 +55,28 @@ export declare class Fields {
|
|
|
44
55
|
*/
|
|
45
56
|
create(collectionId: string, request: Webflow.collections.FieldCreate, requestOptions?: Fields.RequestOptions): Promise<Webflow.Field>;
|
|
46
57
|
/**
|
|
47
|
-
*
|
|
58
|
+
* Delete a custom field in a collection. This endpoint does not currently support bulk deletion.
|
|
59
|
+
*
|
|
60
|
+
* Required scope | `cms:write`
|
|
61
|
+
*
|
|
62
|
+
* @param {string} collectionId - Unique identifier for a Collection
|
|
63
|
+
* @param {string} fieldId - Unique identifier for a Field in a collection
|
|
64
|
+
* @param {Fields.RequestOptions} requestOptions - Request-specific configuration.
|
|
65
|
+
*
|
|
66
|
+
* @throws {@link Webflow.BadRequestError}
|
|
67
|
+
* @throws {@link Webflow.UnauthorizedError}
|
|
68
|
+
* @throws {@link Webflow.NotFoundError}
|
|
69
|
+
* @throws {@link Webflow.TooManyRequestsError}
|
|
70
|
+
* @throws {@link Webflow.InternalServerError}
|
|
71
|
+
*
|
|
72
|
+
* @example
|
|
73
|
+
* await client.collections.fields.delete("580e63fc8c9a982ac9b8b745", "580e63fc8c9a982ac9b8b745")
|
|
74
|
+
*/
|
|
75
|
+
delete(collectionId: string, fieldId: string, requestOptions?: Fields.RequestOptions): Promise<void>;
|
|
76
|
+
/**
|
|
77
|
+
* Update a custom field in a collection.
|
|
78
|
+
*
|
|
79
|
+
* Required scope | `cms:write`
|
|
48
80
|
*
|
|
49
81
|
* @param {string} collectionId - Unique identifier for a Collection
|
|
50
82
|
* @param {string} fieldId - Unique identifier for a Field in a collection
|