webflow-api 2.4.2 → 3.0.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/MIGRATION.md +37 -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/WebflowClient.d.ts +1 -4
- package/dist/wrapper/WebflowClient.js +4 -8
- 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/WebflowClient.d.ts +1 -4
- package/wrapper/WebflowClient.js +4 -8
- 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/dist/wrapper/CollectionsClient.d.ts +0 -8
- package/dist/wrapper/CollectionsClient.js +0 -18
- package/dist/wrapper/ItemsClient.d.ts +0 -78
- package/dist/wrapper/ItemsClient.js +0 -351
- package/serialization/types/MissingScopes.d.ts +0 -16
- package/serialization/types/TooManyRequestsErrorBody.d.ts +0 -15
- package/wrapper/CollectionsClient.d.ts +0 -8
- package/wrapper/CollectionsClient.js +0 -18
- package/wrapper/ItemsClient.d.ts +0 -78
- package/wrapper/ItemsClient.js +0 -351
- /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
|
@@ -78,15 +78,7 @@ class ActivityLogs {
|
|
|
78
78
|
const _response = yield core.fetcher({
|
|
79
79
|
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)}/activity_logs`),
|
|
80
80
|
method: "GET",
|
|
81
|
-
headers: {
|
|
82
|
-
Authorization: yield this._getAuthorizationHeader(),
|
|
83
|
-
"X-Fern-Language": "JavaScript",
|
|
84
|
-
"X-Fern-SDK-Name": "webflow-api",
|
|
85
|
-
"X-Fern-SDK-Version": "2.4.2",
|
|
86
|
-
"User-Agent": "webflow-api/2.4.2",
|
|
87
|
-
"X-Fern-Runtime": core.RUNTIME.type,
|
|
88
|
-
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
89
|
-
},
|
|
81
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.0.0", "User-Agent": "webflow-api/3.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
90
82
|
contentType: "application/json",
|
|
91
83
|
queryParameters: _queryParams,
|
|
92
84
|
requestType: "json",
|
|
@@ -108,9 +100,15 @@ class ActivityLogs {
|
|
|
108
100
|
case 403:
|
|
109
101
|
throw new Webflow.ForbiddenError(_response.error.body);
|
|
110
102
|
case 404:
|
|
111
|
-
throw new Webflow.NotFoundError(_response.error.body
|
|
103
|
+
throw new Webflow.NotFoundError(serializers.Error_.parseOrThrow(_response.error.body, {
|
|
104
|
+
unrecognizedObjectKeys: "passthrough",
|
|
105
|
+
allowUnrecognizedUnionMembers: true,
|
|
106
|
+
allowUnrecognizedEnumValues: true,
|
|
107
|
+
skipValidation: true,
|
|
108
|
+
breadcrumbsPrefix: ["response"],
|
|
109
|
+
}));
|
|
112
110
|
case 429:
|
|
113
|
-
throw new Webflow.TooManyRequestsError(serializers.
|
|
111
|
+
throw new Webflow.TooManyRequestsError(serializers.Error_.parseOrThrow(_response.error.body, {
|
|
114
112
|
unrecognizedObjectKeys: "passthrough",
|
|
115
113
|
allowUnrecognizedUnionMembers: true,
|
|
116
114
|
allowUnrecognizedEnumValues: true,
|
|
@@ -118,7 +116,13 @@ class ActivityLogs {
|
|
|
118
116
|
breadcrumbsPrefix: ["response"],
|
|
119
117
|
}));
|
|
120
118
|
case 500:
|
|
121
|
-
throw new Webflow.InternalServerError(_response.error.body
|
|
119
|
+
throw new Webflow.InternalServerError(serializers.Error_.parseOrThrow(_response.error.body, {
|
|
120
|
+
unrecognizedObjectKeys: "passthrough",
|
|
121
|
+
allowUnrecognizedUnionMembers: true,
|
|
122
|
+
allowUnrecognizedEnumValues: true,
|
|
123
|
+
skipValidation: true,
|
|
124
|
+
breadcrumbsPrefix: ["response"],
|
|
125
|
+
}));
|
|
122
126
|
default:
|
|
123
127
|
throw new errors.WebflowError({
|
|
124
128
|
statusCode: _response.error.statusCode,
|
|
@@ -133,7 +137,7 @@ class ActivityLogs {
|
|
|
133
137
|
body: _response.error.rawBody,
|
|
134
138
|
});
|
|
135
139
|
case "timeout":
|
|
136
|
-
throw new errors.WebflowTimeoutError();
|
|
140
|
+
throw new errors.WebflowTimeoutError("Timeout exceeded when calling GET /sites/{site_id}/activity_logs.");
|
|
137
141
|
case "unknown":
|
|
138
142
|
throw new errors.WebflowError({
|
|
139
143
|
message: _response.error.errorMessage,
|
|
@@ -16,13 +16,19 @@ export declare namespace Scripts {
|
|
|
16
16
|
maxRetries?: number;
|
|
17
17
|
/** A hook to abort the request. */
|
|
18
18
|
abortSignal?: AbortSignal;
|
|
19
|
+
/** Additional headers to include in the request. */
|
|
20
|
+
headers?: Record<string, string>;
|
|
19
21
|
}
|
|
20
22
|
}
|
|
21
23
|
export declare class Scripts {
|
|
22
24
|
protected readonly _options: Scripts.Options;
|
|
23
25
|
constructor(_options: Scripts.Options);
|
|
24
26
|
/**
|
|
25
|
-
* Get all registered scripts that have been applied to a specific Site.
|
|
27
|
+
* Get all registered scripts that have been applied to a specific Site.
|
|
28
|
+
*
|
|
29
|
+
* <blockquote class="callout callout_info" theme="📘">Access to this endpoint requires a bearer token from a <a href="https://developers.webflow.com/data/docs/getting-started-data-clients">Data Client App</a>.</blockquote>
|
|
30
|
+
*
|
|
31
|
+
* Required scope | `custom_code:read`
|
|
26
32
|
*
|
|
27
33
|
* @param {string} siteId - Unique identifier for a Site
|
|
28
34
|
* @param {Scripts.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -38,7 +44,15 @@ export declare class Scripts {
|
|
|
38
44
|
*/
|
|
39
45
|
getCustomCode(siteId: string, requestOptions?: Scripts.RequestOptions): Promise<Webflow.ScriptApplyList>;
|
|
40
46
|
/**
|
|
41
|
-
* Add a registered script to a Site.
|
|
47
|
+
* Add a registered script to a Site.
|
|
48
|
+
*
|
|
49
|
+
* In order to use the Custom Code APIs for Sites and Pages, Custom Code Scripts must first be registered
|
|
50
|
+
* to a Site via the `registered_scripts` endpoints, and then applied to a Site or Page using the appropriate
|
|
51
|
+
* `custom_code` endpoints.
|
|
52
|
+
*
|
|
53
|
+
* <blockquote class="callout callout_info" theme="📘">Access to this endpoint requires a bearer token from a <a href="https://developers.webflow.com/data/docs/getting-started-data-clients">Data Client App</a>.</blockquote>
|
|
54
|
+
*
|
|
55
|
+
* Required scope | `custom_code:write`
|
|
42
56
|
*
|
|
43
57
|
* @param {string} siteId - Unique identifier for a Site
|
|
44
58
|
* @param {Webflow.ScriptApplyList} request
|
|
@@ -68,7 +82,11 @@ export declare class Scripts {
|
|
|
68
82
|
*/
|
|
69
83
|
upsertCustomCode(siteId: string, request: Webflow.ScriptApplyList, requestOptions?: Scripts.RequestOptions): Promise<Webflow.ScriptApplyList>;
|
|
70
84
|
/**
|
|
71
|
-
* Delete the custom code block that an app created for a Site
|
|
85
|
+
* Delete the custom code block that an app created for a Site
|
|
86
|
+
*
|
|
87
|
+
* <blockquote class="callout callout_info" theme="📘">Access to this endpoint requires a bearer token from a <a href="https://developers.webflow.com/data/docs/getting-started-data-clients">Data Client App</a>.</blockquote>
|
|
88
|
+
*
|
|
89
|
+
* Required scope | `custom_code:write`
|
|
72
90
|
*
|
|
73
91
|
* @param {string} siteId - Unique identifier for a Site
|
|
74
92
|
* @param {Scripts.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -84,7 +102,11 @@ export declare class Scripts {
|
|
|
84
102
|
*/
|
|
85
103
|
deleteCustomCode(siteId: string, requestOptions?: Scripts.RequestOptions): Promise<void>;
|
|
86
104
|
/**
|
|
87
|
-
* Get all instances of Custom Code applied to a Site or Pages.
|
|
105
|
+
* Get all instances of Custom Code applied to a Site or Pages.
|
|
106
|
+
*
|
|
107
|
+
* <blockquote class="callout callout_info" theme="📘">Access to this endpoint requires a bearer token from a <a href="https://developers.webflow.com/data/docs/getting-started-data-clients">Data Client App</a>.</blockquote>
|
|
108
|
+
*
|
|
109
|
+
* Required scope | `custom_code:read`
|
|
88
110
|
*
|
|
89
111
|
* @param {string} siteId - Unique identifier for a Site
|
|
90
112
|
* @param {Webflow.sites.ScriptsListCustomCodeBlocksRequest} request
|
|
@@ -50,7 +50,11 @@ class Scripts {
|
|
|
50
50
|
this._options = _options;
|
|
51
51
|
}
|
|
52
52
|
/**
|
|
53
|
-
* Get all registered scripts that have been applied to a specific Site.
|
|
53
|
+
* Get all registered scripts that have been applied to a specific Site.
|
|
54
|
+
*
|
|
55
|
+
* <blockquote class="callout callout_info" theme="📘">Access to this endpoint requires a bearer token from a <a href="https://developers.webflow.com/data/docs/getting-started-data-clients">Data Client App</a>.</blockquote>
|
|
56
|
+
*
|
|
57
|
+
* Required scope | `custom_code:read`
|
|
54
58
|
*
|
|
55
59
|
* @param {string} siteId - Unique identifier for a Site
|
|
56
60
|
* @param {Scripts.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -70,15 +74,7 @@ class Scripts {
|
|
|
70
74
|
const _response = yield core.fetcher({
|
|
71
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)}/custom_code`),
|
|
72
76
|
method: "GET",
|
|
73
|
-
headers: {
|
|
74
|
-
Authorization: yield this._getAuthorizationHeader(),
|
|
75
|
-
"X-Fern-Language": "JavaScript",
|
|
76
|
-
"X-Fern-SDK-Name": "webflow-api",
|
|
77
|
-
"X-Fern-SDK-Version": "2.4.2",
|
|
78
|
-
"User-Agent": "webflow-api/2.4.2",
|
|
79
|
-
"X-Fern-Runtime": core.RUNTIME.type,
|
|
80
|
-
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
81
|
-
},
|
|
77
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.0.0", "User-Agent": "webflow-api/3.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
82
78
|
contentType: "application/json",
|
|
83
79
|
requestType: "json",
|
|
84
80
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -99,11 +95,23 @@ class Scripts {
|
|
|
99
95
|
case 400:
|
|
100
96
|
throw new Webflow.BadRequestError(_response.error.body);
|
|
101
97
|
case 401:
|
|
102
|
-
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
|
+
}));
|
|
103
105
|
case 404:
|
|
104
|
-
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
|
+
}));
|
|
105
113
|
case 429:
|
|
106
|
-
throw new Webflow.TooManyRequestsError(serializers.
|
|
114
|
+
throw new Webflow.TooManyRequestsError(serializers.Error_.parseOrThrow(_response.error.body, {
|
|
107
115
|
unrecognizedObjectKeys: "passthrough",
|
|
108
116
|
allowUnrecognizedUnionMembers: true,
|
|
109
117
|
allowUnrecognizedEnumValues: true,
|
|
@@ -111,7 +119,13 @@ class Scripts {
|
|
|
111
119
|
breadcrumbsPrefix: ["response"],
|
|
112
120
|
}));
|
|
113
121
|
case 500:
|
|
114
|
-
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
|
+
}));
|
|
115
129
|
default:
|
|
116
130
|
throw new errors.WebflowError({
|
|
117
131
|
statusCode: _response.error.statusCode,
|
|
@@ -126,7 +140,7 @@ class Scripts {
|
|
|
126
140
|
body: _response.error.rawBody,
|
|
127
141
|
});
|
|
128
142
|
case "timeout":
|
|
129
|
-
throw new errors.WebflowTimeoutError();
|
|
143
|
+
throw new errors.WebflowTimeoutError("Timeout exceeded when calling GET /sites/{site_id}/custom_code.");
|
|
130
144
|
case "unknown":
|
|
131
145
|
throw new errors.WebflowError({
|
|
132
146
|
message: _response.error.errorMessage,
|
|
@@ -135,7 +149,15 @@ class Scripts {
|
|
|
135
149
|
});
|
|
136
150
|
}
|
|
137
151
|
/**
|
|
138
|
-
* Add a registered script to a Site.
|
|
152
|
+
* Add a registered script to a Site.
|
|
153
|
+
*
|
|
154
|
+
* In order to use the Custom Code APIs for Sites and Pages, Custom Code Scripts must first be registered
|
|
155
|
+
* to a Site via the `registered_scripts` endpoints, and then applied to a Site or Page using the appropriate
|
|
156
|
+
* `custom_code` endpoints.
|
|
157
|
+
*
|
|
158
|
+
* <blockquote class="callout callout_info" theme="📘">Access to this endpoint requires a bearer token from a <a href="https://developers.webflow.com/data/docs/getting-started-data-clients">Data Client App</a>.</blockquote>
|
|
159
|
+
*
|
|
160
|
+
* Required scope | `custom_code:write`
|
|
139
161
|
*
|
|
140
162
|
* @param {string} siteId - Unique identifier for a Site
|
|
141
163
|
* @param {Webflow.ScriptApplyList} request
|
|
@@ -169,18 +191,14 @@ class Scripts {
|
|
|
169
191
|
const _response = yield core.fetcher({
|
|
170
192
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.WebflowEnvironment.Default, `sites/${encodeURIComponent(siteId)}/custom_code`),
|
|
171
193
|
method: "PUT",
|
|
172
|
-
headers: {
|
|
173
|
-
Authorization: yield this._getAuthorizationHeader(),
|
|
174
|
-
"X-Fern-Language": "JavaScript",
|
|
175
|
-
"X-Fern-SDK-Name": "webflow-api",
|
|
176
|
-
"X-Fern-SDK-Version": "2.4.2",
|
|
177
|
-
"User-Agent": "webflow-api/2.4.2",
|
|
178
|
-
"X-Fern-Runtime": core.RUNTIME.type,
|
|
179
|
-
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
180
|
-
},
|
|
194
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.0.0", "User-Agent": "webflow-api/3.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
181
195
|
contentType: "application/json",
|
|
182
196
|
requestType: "json",
|
|
183
|
-
body: serializers.ScriptApplyList.jsonOrThrow(request, {
|
|
197
|
+
body: serializers.ScriptApplyList.jsonOrThrow(request, {
|
|
198
|
+
unrecognizedObjectKeys: "passthrough",
|
|
199
|
+
allowUnrecognizedUnionMembers: true,
|
|
200
|
+
allowUnrecognizedEnumValues: true,
|
|
201
|
+
}),
|
|
184
202
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
185
203
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
186
204
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -199,11 +217,23 @@ class Scripts {
|
|
|
199
217
|
case 400:
|
|
200
218
|
throw new Webflow.BadRequestError(_response.error.body);
|
|
201
219
|
case 401:
|
|
202
|
-
throw new Webflow.UnauthorizedError(_response.error.body
|
|
220
|
+
throw new Webflow.UnauthorizedError(serializers.Error_.parseOrThrow(_response.error.body, {
|
|
221
|
+
unrecognizedObjectKeys: "passthrough",
|
|
222
|
+
allowUnrecognizedUnionMembers: true,
|
|
223
|
+
allowUnrecognizedEnumValues: true,
|
|
224
|
+
skipValidation: true,
|
|
225
|
+
breadcrumbsPrefix: ["response"],
|
|
226
|
+
}));
|
|
203
227
|
case 404:
|
|
204
|
-
throw new Webflow.NotFoundError(_response.error.body
|
|
228
|
+
throw new Webflow.NotFoundError(serializers.Error_.parseOrThrow(_response.error.body, {
|
|
229
|
+
unrecognizedObjectKeys: "passthrough",
|
|
230
|
+
allowUnrecognizedUnionMembers: true,
|
|
231
|
+
allowUnrecognizedEnumValues: true,
|
|
232
|
+
skipValidation: true,
|
|
233
|
+
breadcrumbsPrefix: ["response"],
|
|
234
|
+
}));
|
|
205
235
|
case 429:
|
|
206
|
-
throw new Webflow.TooManyRequestsError(serializers.
|
|
236
|
+
throw new Webflow.TooManyRequestsError(serializers.Error_.parseOrThrow(_response.error.body, {
|
|
207
237
|
unrecognizedObjectKeys: "passthrough",
|
|
208
238
|
allowUnrecognizedUnionMembers: true,
|
|
209
239
|
allowUnrecognizedEnumValues: true,
|
|
@@ -211,7 +241,13 @@ class Scripts {
|
|
|
211
241
|
breadcrumbsPrefix: ["response"],
|
|
212
242
|
}));
|
|
213
243
|
case 500:
|
|
214
|
-
throw new Webflow.InternalServerError(_response.error.body
|
|
244
|
+
throw new Webflow.InternalServerError(serializers.Error_.parseOrThrow(_response.error.body, {
|
|
245
|
+
unrecognizedObjectKeys: "passthrough",
|
|
246
|
+
allowUnrecognizedUnionMembers: true,
|
|
247
|
+
allowUnrecognizedEnumValues: true,
|
|
248
|
+
skipValidation: true,
|
|
249
|
+
breadcrumbsPrefix: ["response"],
|
|
250
|
+
}));
|
|
215
251
|
default:
|
|
216
252
|
throw new errors.WebflowError({
|
|
217
253
|
statusCode: _response.error.statusCode,
|
|
@@ -226,7 +262,7 @@ class Scripts {
|
|
|
226
262
|
body: _response.error.rawBody,
|
|
227
263
|
});
|
|
228
264
|
case "timeout":
|
|
229
|
-
throw new errors.WebflowTimeoutError();
|
|
265
|
+
throw new errors.WebflowTimeoutError("Timeout exceeded when calling PUT /sites/{site_id}/custom_code.");
|
|
230
266
|
case "unknown":
|
|
231
267
|
throw new errors.WebflowError({
|
|
232
268
|
message: _response.error.errorMessage,
|
|
@@ -235,7 +271,11 @@ class Scripts {
|
|
|
235
271
|
});
|
|
236
272
|
}
|
|
237
273
|
/**
|
|
238
|
-
* Delete the custom code block that an app created for a Site
|
|
274
|
+
* Delete the custom code block that an app created for a Site
|
|
275
|
+
*
|
|
276
|
+
* <blockquote class="callout callout_info" theme="📘">Access to this endpoint requires a bearer token from a <a href="https://developers.webflow.com/data/docs/getting-started-data-clients">Data Client App</a>.</blockquote>
|
|
277
|
+
*
|
|
278
|
+
* Required scope | `custom_code:write`
|
|
239
279
|
*
|
|
240
280
|
* @param {string} siteId - Unique identifier for a Site
|
|
241
281
|
* @param {Scripts.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -255,15 +295,7 @@ class Scripts {
|
|
|
255
295
|
const _response = yield core.fetcher({
|
|
256
296
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.WebflowEnvironment.Default, `sites/${encodeURIComponent(siteId)}/custom_code`),
|
|
257
297
|
method: "DELETE",
|
|
258
|
-
headers: {
|
|
259
|
-
Authorization: yield this._getAuthorizationHeader(),
|
|
260
|
-
"X-Fern-Language": "JavaScript",
|
|
261
|
-
"X-Fern-SDK-Name": "webflow-api",
|
|
262
|
-
"X-Fern-SDK-Version": "2.4.2",
|
|
263
|
-
"User-Agent": "webflow-api/2.4.2",
|
|
264
|
-
"X-Fern-Runtime": core.RUNTIME.type,
|
|
265
|
-
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
266
|
-
},
|
|
298
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.0.0", "User-Agent": "webflow-api/3.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
267
299
|
contentType: "application/json",
|
|
268
300
|
requestType: "json",
|
|
269
301
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -278,11 +310,23 @@ class Scripts {
|
|
|
278
310
|
case 400:
|
|
279
311
|
throw new Webflow.BadRequestError(_response.error.body);
|
|
280
312
|
case 401:
|
|
281
|
-
throw new Webflow.UnauthorizedError(_response.error.body
|
|
313
|
+
throw new Webflow.UnauthorizedError(serializers.Error_.parseOrThrow(_response.error.body, {
|
|
314
|
+
unrecognizedObjectKeys: "passthrough",
|
|
315
|
+
allowUnrecognizedUnionMembers: true,
|
|
316
|
+
allowUnrecognizedEnumValues: true,
|
|
317
|
+
skipValidation: true,
|
|
318
|
+
breadcrumbsPrefix: ["response"],
|
|
319
|
+
}));
|
|
282
320
|
case 404:
|
|
283
|
-
throw new Webflow.NotFoundError(_response.error.body
|
|
321
|
+
throw new Webflow.NotFoundError(serializers.Error_.parseOrThrow(_response.error.body, {
|
|
322
|
+
unrecognizedObjectKeys: "passthrough",
|
|
323
|
+
allowUnrecognizedUnionMembers: true,
|
|
324
|
+
allowUnrecognizedEnumValues: true,
|
|
325
|
+
skipValidation: true,
|
|
326
|
+
breadcrumbsPrefix: ["response"],
|
|
327
|
+
}));
|
|
284
328
|
case 429:
|
|
285
|
-
throw new Webflow.TooManyRequestsError(serializers.
|
|
329
|
+
throw new Webflow.TooManyRequestsError(serializers.Error_.parseOrThrow(_response.error.body, {
|
|
286
330
|
unrecognizedObjectKeys: "passthrough",
|
|
287
331
|
allowUnrecognizedUnionMembers: true,
|
|
288
332
|
allowUnrecognizedEnumValues: true,
|
|
@@ -290,7 +334,13 @@ class Scripts {
|
|
|
290
334
|
breadcrumbsPrefix: ["response"],
|
|
291
335
|
}));
|
|
292
336
|
case 500:
|
|
293
|
-
throw new Webflow.InternalServerError(_response.error.body
|
|
337
|
+
throw new Webflow.InternalServerError(serializers.Error_.parseOrThrow(_response.error.body, {
|
|
338
|
+
unrecognizedObjectKeys: "passthrough",
|
|
339
|
+
allowUnrecognizedUnionMembers: true,
|
|
340
|
+
allowUnrecognizedEnumValues: true,
|
|
341
|
+
skipValidation: true,
|
|
342
|
+
breadcrumbsPrefix: ["response"],
|
|
343
|
+
}));
|
|
294
344
|
default:
|
|
295
345
|
throw new errors.WebflowError({
|
|
296
346
|
statusCode: _response.error.statusCode,
|
|
@@ -305,7 +355,7 @@ class Scripts {
|
|
|
305
355
|
body: _response.error.rawBody,
|
|
306
356
|
});
|
|
307
357
|
case "timeout":
|
|
308
|
-
throw new errors.WebflowTimeoutError();
|
|
358
|
+
throw new errors.WebflowTimeoutError("Timeout exceeded when calling DELETE /sites/{site_id}/custom_code.");
|
|
309
359
|
case "unknown":
|
|
310
360
|
throw new errors.WebflowError({
|
|
311
361
|
message: _response.error.errorMessage,
|
|
@@ -314,7 +364,11 @@ class Scripts {
|
|
|
314
364
|
});
|
|
315
365
|
}
|
|
316
366
|
/**
|
|
317
|
-
* Get all instances of Custom Code applied to a Site or Pages.
|
|
367
|
+
* Get all instances of Custom Code applied to a Site or Pages.
|
|
368
|
+
*
|
|
369
|
+
* <blockquote class="callout callout_info" theme="📘">Access to this endpoint requires a bearer token from a <a href="https://developers.webflow.com/data/docs/getting-started-data-clients">Data Client App</a>.</blockquote>
|
|
370
|
+
*
|
|
371
|
+
* Required scope | `custom_code:read`
|
|
318
372
|
*
|
|
319
373
|
* @param {string} siteId - Unique identifier for a Site
|
|
320
374
|
* @param {Webflow.sites.ScriptsListCustomCodeBlocksRequest} request
|
|
@@ -343,15 +397,7 @@ class Scripts {
|
|
|
343
397
|
const _response = yield core.fetcher({
|
|
344
398
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.WebflowEnvironment.Default, `sites/${encodeURIComponent(siteId)}/custom_code/blocks`),
|
|
345
399
|
method: "GET",
|
|
346
|
-
headers: {
|
|
347
|
-
Authorization: yield this._getAuthorizationHeader(),
|
|
348
|
-
"X-Fern-Language": "JavaScript",
|
|
349
|
-
"X-Fern-SDK-Name": "webflow-api",
|
|
350
|
-
"X-Fern-SDK-Version": "2.4.2",
|
|
351
|
-
"User-Agent": "webflow-api/2.4.2",
|
|
352
|
-
"X-Fern-Runtime": core.RUNTIME.type,
|
|
353
|
-
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
354
|
-
},
|
|
400
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.0.0", "User-Agent": "webflow-api/3.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
355
401
|
contentType: "application/json",
|
|
356
402
|
queryParameters: _queryParams,
|
|
357
403
|
requestType: "json",
|
|
@@ -373,11 +419,23 @@ class Scripts {
|
|
|
373
419
|
case 400:
|
|
374
420
|
throw new Webflow.BadRequestError(_response.error.body);
|
|
375
421
|
case 401:
|
|
376
|
-
throw new Webflow.UnauthorizedError(_response.error.body
|
|
422
|
+
throw new Webflow.UnauthorizedError(serializers.Error_.parseOrThrow(_response.error.body, {
|
|
423
|
+
unrecognizedObjectKeys: "passthrough",
|
|
424
|
+
allowUnrecognizedUnionMembers: true,
|
|
425
|
+
allowUnrecognizedEnumValues: true,
|
|
426
|
+
skipValidation: true,
|
|
427
|
+
breadcrumbsPrefix: ["response"],
|
|
428
|
+
}));
|
|
377
429
|
case 404:
|
|
378
|
-
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
|
+
}));
|
|
379
437
|
case 429:
|
|
380
|
-
throw new Webflow.TooManyRequestsError(serializers.
|
|
438
|
+
throw new Webflow.TooManyRequestsError(serializers.Error_.parseOrThrow(_response.error.body, {
|
|
381
439
|
unrecognizedObjectKeys: "passthrough",
|
|
382
440
|
allowUnrecognizedUnionMembers: true,
|
|
383
441
|
allowUnrecognizedEnumValues: true,
|
|
@@ -385,7 +443,13 @@ class Scripts {
|
|
|
385
443
|
breadcrumbsPrefix: ["response"],
|
|
386
444
|
}));
|
|
387
445
|
case 500:
|
|
388
|
-
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
|
+
}));
|
|
389
453
|
default:
|
|
390
454
|
throw new errors.WebflowError({
|
|
391
455
|
statusCode: _response.error.statusCode,
|
|
@@ -400,7 +464,7 @@ class Scripts {
|
|
|
400
464
|
body: _response.error.rawBody,
|
|
401
465
|
});
|
|
402
466
|
case "timeout":
|
|
403
|
-
throw new errors.WebflowTimeoutError();
|
|
467
|
+
throw new errors.WebflowTimeoutError("Timeout exceeded when calling GET /sites/{site_id}/custom_code/blocks.");
|
|
404
468
|
case "unknown":
|
|
405
469
|
throw new errors.WebflowError({
|
|
406
470
|
message: _response.error.errorMessage,
|
|
@@ -16,13 +16,17 @@ export declare namespace Token {
|
|
|
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 Token {
|
|
22
24
|
protected readonly _options: Token.Options;
|
|
23
25
|
constructor(_options: Token.Options);
|
|
24
26
|
/**
|
|
25
|
-
* Information about the Authorized User
|
|
27
|
+
* Information about the Authorized User
|
|
28
|
+
*
|
|
29
|
+
* Required Scope | `authorized_user:read`
|
|
26
30
|
*
|
|
27
31
|
* @param {Token.RequestOptions} requestOptions - Request-specific configuration.
|
|
28
32
|
*
|
|
@@ -34,7 +38,8 @@ export declare class Token {
|
|
|
34
38
|
*/
|
|
35
39
|
authorizedBy(requestOptions?: Token.RequestOptions): Promise<Webflow.AuthorizedUser>;
|
|
36
40
|
/**
|
|
37
|
-
* Information about the authorization token
|
|
41
|
+
* Information about the authorization token
|
|
42
|
+
* <Note>Access to this endpoint requires a bearer token from a []>Data Client App](/data/docs/getting-started-data-clients).</Note>
|
|
38
43
|
*
|
|
39
44
|
* @param {Token.RequestOptions} requestOptions - Request-specific configuration.
|
|
40
45
|
*
|
|
@@ -50,7 +50,9 @@ class Token {
|
|
|
50
50
|
this._options = _options;
|
|
51
51
|
}
|
|
52
52
|
/**
|
|
53
|
-
* Information about the Authorized User
|
|
53
|
+
* Information about the Authorized User
|
|
54
|
+
*
|
|
55
|
+
* Required Scope | `authorized_user:read`
|
|
54
56
|
*
|
|
55
57
|
* @param {Token.RequestOptions} requestOptions - Request-specific configuration.
|
|
56
58
|
*
|
|
@@ -66,15 +68,7 @@ class Token {
|
|
|
66
68
|
const _response = yield core.fetcher({
|
|
67
69
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.WebflowEnvironment.Default, "token/authorized_by"),
|
|
68
70
|
method: "GET",
|
|
69
|
-
headers: {
|
|
70
|
-
Authorization: yield this._getAuthorizationHeader(),
|
|
71
|
-
"X-Fern-Language": "JavaScript",
|
|
72
|
-
"X-Fern-SDK-Name": "webflow-api",
|
|
73
|
-
"X-Fern-SDK-Version": "2.4.2",
|
|
74
|
-
"User-Agent": "webflow-api/2.4.2",
|
|
75
|
-
"X-Fern-Runtime": core.RUNTIME.type,
|
|
76
|
-
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
77
|
-
},
|
|
71
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.0.0", "User-Agent": "webflow-api/3.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
78
72
|
contentType: "application/json",
|
|
79
73
|
requestType: "json",
|
|
80
74
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -93,7 +87,13 @@ class Token {
|
|
|
93
87
|
if (_response.error.reason === "status-code") {
|
|
94
88
|
switch (_response.error.statusCode) {
|
|
95
89
|
case 401:
|
|
96
|
-
throw new Webflow.UnauthorizedError(_response.error.body
|
|
90
|
+
throw new Webflow.UnauthorizedError(serializers.Error_.parseOrThrow(_response.error.body, {
|
|
91
|
+
unrecognizedObjectKeys: "passthrough",
|
|
92
|
+
allowUnrecognizedUnionMembers: true,
|
|
93
|
+
allowUnrecognizedEnumValues: true,
|
|
94
|
+
skipValidation: true,
|
|
95
|
+
breadcrumbsPrefix: ["response"],
|
|
96
|
+
}));
|
|
97
97
|
case 403:
|
|
98
98
|
throw new Webflow.ForbiddenError(_response.error.body);
|
|
99
99
|
default:
|
|
@@ -110,7 +110,7 @@ class Token {
|
|
|
110
110
|
body: _response.error.rawBody,
|
|
111
111
|
});
|
|
112
112
|
case "timeout":
|
|
113
|
-
throw new errors.WebflowTimeoutError();
|
|
113
|
+
throw new errors.WebflowTimeoutError("Timeout exceeded when calling GET /token/authorized_by.");
|
|
114
114
|
case "unknown":
|
|
115
115
|
throw new errors.WebflowError({
|
|
116
116
|
message: _response.error.errorMessage,
|
|
@@ -119,7 +119,8 @@ class Token {
|
|
|
119
119
|
});
|
|
120
120
|
}
|
|
121
121
|
/**
|
|
122
|
-
* Information about the authorization token
|
|
122
|
+
* Information about the authorization token
|
|
123
|
+
* <Note>Access to this endpoint requires a bearer token from a []>Data Client App](/data/docs/getting-started-data-clients).</Note>
|
|
123
124
|
*
|
|
124
125
|
* @param {Token.RequestOptions} requestOptions - Request-specific configuration.
|
|
125
126
|
*
|
|
@@ -134,15 +135,7 @@ class Token {
|
|
|
134
135
|
const _response = yield core.fetcher({
|
|
135
136
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.WebflowEnvironment.Default, "token/introspect"),
|
|
136
137
|
method: "GET",
|
|
137
|
-
headers: {
|
|
138
|
-
Authorization: yield this._getAuthorizationHeader(),
|
|
139
|
-
"X-Fern-Language": "JavaScript",
|
|
140
|
-
"X-Fern-SDK-Name": "webflow-api",
|
|
141
|
-
"X-Fern-SDK-Version": "2.4.2",
|
|
142
|
-
"User-Agent": "webflow-api/2.4.2",
|
|
143
|
-
"X-Fern-Runtime": core.RUNTIME.type,
|
|
144
|
-
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
145
|
-
},
|
|
138
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", "X-Fern-SDK-Version": "3.0.0", "User-Agent": "webflow-api/3.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
146
139
|
contentType: "application/json",
|
|
147
140
|
requestType: "json",
|
|
148
141
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -161,7 +154,13 @@ class Token {
|
|
|
161
154
|
if (_response.error.reason === "status-code") {
|
|
162
155
|
switch (_response.error.statusCode) {
|
|
163
156
|
case 401:
|
|
164
|
-
throw new Webflow.UnauthorizedError(_response.error.body
|
|
157
|
+
throw new Webflow.UnauthorizedError(serializers.Error_.parseOrThrow(_response.error.body, {
|
|
158
|
+
unrecognizedObjectKeys: "passthrough",
|
|
159
|
+
allowUnrecognizedUnionMembers: true,
|
|
160
|
+
allowUnrecognizedEnumValues: true,
|
|
161
|
+
skipValidation: true,
|
|
162
|
+
breadcrumbsPrefix: ["response"],
|
|
163
|
+
}));
|
|
165
164
|
default:
|
|
166
165
|
throw new errors.WebflowError({
|
|
167
166
|
statusCode: _response.error.statusCode,
|
|
@@ -176,7 +175,7 @@ class Token {
|
|
|
176
175
|
body: _response.error.rawBody,
|
|
177
176
|
});
|
|
178
177
|
case "timeout":
|
|
179
|
-
throw new errors.WebflowTimeoutError();
|
|
178
|
+
throw new errors.WebflowTimeoutError("Timeout exceeded when calling GET /token/introspect.");
|
|
180
179
|
case "unknown":
|
|
181
180
|
throw new errors.WebflowError({
|
|
182
181
|
message: _response.error.errorMessage,
|