webflow-api 2.3.5 → 2.4.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/api/errors/TooManyRequestsError.d.ts +2 -1
- package/api/errors/index.d.ts +1 -1
- package/api/errors/index.js +1 -1
- package/api/resources/accessGroups/client/Client.d.ts +1 -1
- package/api/resources/accessGroups/client/Client.js +12 -4
- package/api/resources/assets/client/Client.d.ts +8 -8
- package/api/resources/assets/client/Client.js +98 -34
- package/api/resources/collections/client/Client.d.ts +5 -5
- package/api/resources/collections/client/Client.js +59 -19
- package/api/resources/collections/resources/fields/client/Client.d.ts +3 -3
- package/api/resources/collections/resources/fields/client/Client.js +27 -11
- package/api/resources/collections/resources/fields/client/requests/FieldCreate.d.ts +1 -1
- package/api/resources/collections/resources/items/client/Client.d.ts +19 -19
- package/api/resources/collections/resources/items/client/Client.js +175 -57
- package/api/resources/collections/resources/items/client/requests/index.d.ts +0 -1
- package/api/resources/collections/resources/items/types/ItemsPublishItemResponse.d.ts +7 -0
- package/api/resources/collections/resources/items/types/index.d.ts +1 -1
- package/api/resources/collections/resources/items/types/index.js +1 -1
- package/api/resources/ecommerce/client/Client.d.ts +1 -1
- package/api/resources/ecommerce/client/Client.js +12 -4
- package/api/resources/forms/client/Client.d.ts +7 -6
- package/api/resources/forms/client/Client.js +72 -24
- package/api/resources/forms/client/requests/FormsListSubmissionsRequest.d.ts +17 -0
- package/api/resources/forms/client/requests/index.d.ts +1 -0
- package/api/resources/index.d.ts +3 -3
- package/api/resources/index.js +4 -4
- package/api/resources/inventory/client/Client.d.ts +3 -3
- package/api/resources/inventory/client/Client.js +26 -10
- package/api/resources/inventory/client/requests/InventoryUpdateRequest.d.ts +1 -1
- package/api/resources/orders/client/Client.d.ts +6 -6
- package/api/resources/orders/client/Client.js +75 -29
- package/api/resources/pages/client/Client.d.ts +24 -11
- package/api/resources/pages/client/Client.js +79 -26
- package/api/resources/pages/client/requests/PagesGetContentRequest.d.ts +3 -1
- package/api/resources/pages/client/requests/PagesGetMetadataRequest.d.ts +3 -1
- package/api/resources/pages/client/requests/PagesListRequest.d.ts +3 -1
- package/api/resources/pages/client/requests/UpdatePageSettingsRequest.d.ts +6 -3
- package/api/resources/pages/resources/scripts/client/Client.d.ts +5 -5
- package/api/resources/pages/resources/scripts/client/Client.js +38 -14
- package/api/resources/products/client/Client.d.ts +6 -6
- package/api/resources/products/client/Client.js +76 -28
- package/api/resources/scripts/client/Client.d.ts +3 -3
- package/api/resources/scripts/client/Client.js +38 -14
- package/api/resources/sites/client/Client.d.ts +5 -7
- package/api/resources/sites/client/Client.js +55 -23
- package/api/resources/sites/index.d.ts +1 -0
- package/api/resources/sites/index.js +1 -0
- package/api/resources/sites/resources/activityLogs/client/Client.d.ts +1 -1
- package/api/resources/sites/resources/activityLogs/client/Client.js +12 -4
- package/api/resources/sites/resources/scripts/client/Client.d.ts +6 -6
- package/api/resources/sites/resources/scripts/client/Client.js +50 -18
- package/api/resources/sites/types/SitesPublishResponse.d.ts +10 -0
- package/api/resources/sites/types/index.d.ts +1 -0
- package/{serialization/resources/webhooks/client → api/resources/sites/types}/index.js +1 -1
- package/api/resources/token/client/Client.js +8 -4
- package/api/resources/users/client/Client.d.ts +5 -5
- package/api/resources/users/client/Client.js +61 -21
- package/api/resources/webhooks/client/Client.d.ts +13 -8
- package/api/resources/webhooks/client/Client.js +56 -19
- package/api/resources/webhooks/client/index.d.ts +1 -1
- package/api/resources/webhooks/client/index.js +0 -15
- package/api/types/Asset.d.ts +10 -8
- package/api/{resources/collections/resources/items/client/requests → types}/BulkCollectionItem.d.ts +3 -6
- package/{dist/api/resources/collections/resources/items → api}/types/BulkCollectionItemFieldData.d.ts +2 -0
- package/api/types/CollectionItemFieldData.d.ts +2 -0
- package/api/types/ConflictErrorBody.d.ts +10 -1
- package/api/types/DuplicateUserEmail.d.ts +10 -1
- package/api/types/Form.d.ts +2 -0
- package/api/types/FormSubmissionList.d.ts +1 -1
- package/api/types/MissingScopes.d.ts +10 -1
- package/api/types/NotEnterprisePlanSite.d.ts +10 -1
- package/api/types/{OauthScope.d.ts → OAuthScope.d.ts} +9 -1
- package/{dist/api/types/OauthScope.js → api/types/OAuthScope.js} +2 -0
- package/api/types/Page.d.ts +5 -1
- package/api/types/TooManyRequestsErrorBody.d.ts +9 -0
- package/api/types/UserLimitReached.d.ts +10 -1
- package/api/types/UsersNotEnabled.d.ts +10 -1
- package/api/types/Webhook.d.ts +5 -5
- package/api/types/WebhookFilter.d.ts +10 -0
- package/api/types/index.d.ts +6 -5
- package/api/types/index.js +6 -5
- package/core/fetcher/Fetcher.d.ts +4 -1
- package/core/fetcher/Fetcher.js +19 -185
- package/core/fetcher/createRequestUrl.d.ts +1 -0
- package/core/fetcher/createRequestUrl.js +13 -0
- package/core/fetcher/getFetchFn.d.ts +4 -0
- package/core/fetcher/getFetchFn.js +59 -0
- package/core/fetcher/getRequestBody.d.ts +7 -0
- package/core/fetcher/getRequestBody.js +23 -0
- package/core/fetcher/getResponseBody.d.ts +1 -0
- package/core/fetcher/getResponseBody.js +52 -0
- package/core/fetcher/makeRequest.d.ts +1 -0
- package/core/fetcher/makeRequest.js +42 -0
- package/core/fetcher/requestWithRetries.d.ts +1 -0
- package/core/fetcher/requestWithRetries.js +32 -0
- package/core/fetcher/signals.d.ts +12 -0
- package/core/fetcher/signals.js +37 -0
- package/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.d.ts +30 -0
- package/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.js +247 -0
- package/core/fetcher/stream-wrappers/NodePre18StreamWrapper.d.ts +22 -0
- package/core/fetcher/stream-wrappers/NodePre18StreamWrapper.js +124 -0
- package/core/fetcher/stream-wrappers/UndiciStreamWrapper.d.ts +31 -0
- package/core/fetcher/stream-wrappers/UndiciStreamWrapper.js +229 -0
- package/core/fetcher/stream-wrappers/chooseStreamWrapper.d.ts +18 -0
- package/core/fetcher/stream-wrappers/chooseStreamWrapper.js +50 -0
- package/core/runtime/runtime.d.ts +1 -0
- package/core/runtime/runtime.js +1 -0
- package/core/schemas/Schema.d.ts +8 -4
- package/core/schemas/Schema.js +1 -0
- package/core/schemas/builders/bigint/bigint.d.ts +2 -0
- package/core/schemas/builders/bigint/bigint.js +50 -0
- package/core/schemas/builders/bigint/index.d.ts +1 -0
- package/core/schemas/builders/bigint/index.js +5 -0
- package/core/schemas/builders/index.d.ts +1 -0
- package/core/schemas/builders/index.js +1 -0
- package/core/schemas/builders/lazy/lazy.d.ts +2 -2
- package/core/schemas/builders/lazy/lazy.js +8 -19
- package/core/schemas/builders/lazy/lazyObject.js +1 -10
- package/core/schemas/builders/list/list.js +31 -44
- package/core/schemas/builders/object/object.js +90 -111
- package/core/schemas/builders/object/types.d.ts +2 -2
- package/core/schemas/builders/object-like/getObjectLikeUtils.js +3 -12
- package/core/schemas/builders/record/record.js +49 -60
- package/core/schemas/builders/schema-utils/getSchemaUtils.d.ts +2 -2
- package/core/schemas/builders/schema-utils/getSchemaUtils.js +18 -21
- package/core/schemas/builders/set/set.js +6 -15
- package/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.js +21 -32
- package/core/schemas/builders/union/union.js +51 -62
- package/core/schemas/utils/getErrorMessageForIncorrectType.js +4 -0
- package/core/schemas/utils/maybeSkipValidation.js +3 -12
- package/dist/api/errors/TooManyRequestsError.d.ts +2 -1
- package/dist/api/errors/index.d.ts +1 -1
- package/dist/api/errors/index.js +1 -1
- package/dist/api/resources/accessGroups/client/Client.d.ts +1 -1
- package/dist/api/resources/accessGroups/client/Client.js +12 -4
- package/dist/api/resources/assets/client/Client.d.ts +8 -8
- package/dist/api/resources/assets/client/Client.js +98 -34
- package/dist/api/resources/collections/client/Client.d.ts +5 -5
- package/dist/api/resources/collections/client/Client.js +59 -19
- package/dist/api/resources/collections/resources/fields/client/Client.d.ts +3 -3
- package/dist/api/resources/collections/resources/fields/client/Client.js +27 -11
- package/dist/api/resources/collections/resources/fields/client/requests/FieldCreate.d.ts +1 -1
- package/dist/api/resources/collections/resources/items/client/Client.d.ts +19 -19
- package/dist/api/resources/collections/resources/items/client/Client.js +175 -57
- package/dist/api/resources/collections/resources/items/client/requests/index.d.ts +0 -1
- package/dist/api/resources/collections/resources/items/types/ItemsPublishItemResponse.d.ts +7 -0
- package/dist/api/resources/collections/resources/items/types/index.d.ts +1 -1
- package/dist/api/resources/collections/resources/items/types/index.js +1 -1
- package/dist/api/resources/ecommerce/client/Client.d.ts +1 -1
- package/dist/api/resources/ecommerce/client/Client.js +12 -4
- package/dist/api/resources/forms/client/Client.d.ts +7 -6
- package/dist/api/resources/forms/client/Client.js +72 -24
- package/dist/api/resources/forms/client/requests/FormsListSubmissionsRequest.d.ts +17 -0
- package/dist/api/resources/forms/client/requests/index.d.ts +1 -0
- package/dist/api/resources/index.d.ts +3 -3
- package/dist/api/resources/index.js +4 -4
- package/dist/api/resources/inventory/client/Client.d.ts +3 -3
- package/dist/api/resources/inventory/client/Client.js +26 -10
- package/dist/api/resources/inventory/client/requests/InventoryUpdateRequest.d.ts +1 -1
- package/dist/api/resources/orders/client/Client.d.ts +6 -6
- package/dist/api/resources/orders/client/Client.js +75 -29
- package/dist/api/resources/pages/client/Client.d.ts +24 -11
- package/dist/api/resources/pages/client/Client.js +79 -26
- package/dist/api/resources/pages/client/requests/PagesGetContentRequest.d.ts +3 -1
- package/dist/api/resources/pages/client/requests/PagesGetMetadataRequest.d.ts +3 -1
- package/dist/api/resources/pages/client/requests/PagesListRequest.d.ts +3 -1
- package/dist/api/resources/pages/client/requests/UpdatePageSettingsRequest.d.ts +6 -3
- package/dist/api/resources/pages/resources/scripts/client/Client.d.ts +5 -5
- package/dist/api/resources/pages/resources/scripts/client/Client.js +38 -14
- package/dist/api/resources/products/client/Client.d.ts +6 -6
- package/dist/api/resources/products/client/Client.js +76 -28
- package/dist/api/resources/scripts/client/Client.d.ts +3 -3
- package/dist/api/resources/scripts/client/Client.js +38 -14
- package/dist/api/resources/sites/client/Client.d.ts +5 -7
- package/dist/api/resources/sites/client/Client.js +55 -23
- package/dist/api/resources/sites/index.d.ts +1 -0
- package/dist/api/resources/sites/index.js +1 -0
- package/dist/api/resources/sites/resources/activityLogs/client/Client.d.ts +1 -1
- package/dist/api/resources/sites/resources/activityLogs/client/Client.js +12 -4
- package/dist/api/resources/sites/resources/scripts/client/Client.d.ts +6 -6
- package/dist/api/resources/sites/resources/scripts/client/Client.js +50 -18
- package/dist/api/resources/sites/types/SitesPublishResponse.d.ts +10 -0
- package/dist/api/resources/sites/types/index.d.ts +1 -0
- package/{serialization/resources/webhooks → dist/api/resources/sites/types}/index.js +1 -1
- package/dist/api/resources/token/client/Client.js +8 -4
- package/dist/api/resources/users/client/Client.d.ts +5 -5
- package/dist/api/resources/users/client/Client.js +61 -21
- package/dist/api/resources/webhooks/client/Client.d.ts +13 -8
- package/dist/api/resources/webhooks/client/Client.js +56 -19
- package/dist/api/resources/webhooks/client/index.d.ts +1 -1
- package/dist/api/resources/webhooks/client/index.js +0 -15
- package/dist/api/types/Asset.d.ts +10 -8
- package/dist/api/{resources/collections/resources/items/client/requests → types}/BulkCollectionItem.d.ts +3 -6
- package/{api/resources/collections/resources/items → dist/api}/types/BulkCollectionItemFieldData.d.ts +2 -0
- package/dist/api/types/CollectionItemFieldData.d.ts +2 -0
- package/dist/api/types/ConflictErrorBody.d.ts +10 -1
- package/dist/api/types/DuplicateUserEmail.d.ts +10 -1
- package/dist/api/types/Form.d.ts +2 -0
- package/dist/api/types/FormSubmissionList.d.ts +1 -1
- package/dist/api/types/MissingScopes.d.ts +10 -1
- package/dist/api/types/NotEnterprisePlanSite.d.ts +10 -1
- package/dist/api/types/{OauthScope.d.ts → OAuthScope.d.ts} +9 -1
- package/{api/types/OauthScope.js → dist/api/types/OAuthScope.js} +2 -0
- package/dist/api/types/Page.d.ts +5 -1
- package/dist/api/types/TooManyRequestsErrorBody.d.ts +9 -0
- package/dist/api/types/TooManyRequestsErrorBody.js +5 -0
- package/dist/api/types/UserLimitReached.d.ts +10 -1
- package/dist/api/types/UsersNotEnabled.d.ts +10 -1
- package/dist/api/types/Webhook.d.ts +5 -5
- package/dist/api/types/WebhookFilter.d.ts +10 -0
- package/dist/api/types/WebhookFilter.js +5 -0
- package/dist/api/types/index.d.ts +6 -5
- package/dist/api/types/index.js +6 -5
- package/dist/core/fetcher/Fetcher.d.ts +4 -1
- package/dist/core/fetcher/Fetcher.js +19 -185
- package/dist/core/fetcher/createRequestUrl.d.ts +1 -0
- package/dist/core/fetcher/createRequestUrl.js +13 -0
- package/dist/core/fetcher/getFetchFn.d.ts +4 -0
- package/dist/core/fetcher/getFetchFn.js +59 -0
- package/dist/core/fetcher/getRequestBody.d.ts +7 -0
- package/dist/core/fetcher/getRequestBody.js +23 -0
- package/dist/core/fetcher/getResponseBody.d.ts +1 -0
- package/dist/core/fetcher/getResponseBody.js +52 -0
- package/dist/core/fetcher/makeRequest.d.ts +1 -0
- package/dist/core/fetcher/makeRequest.js +42 -0
- package/dist/core/fetcher/requestWithRetries.d.ts +1 -0
- package/dist/core/fetcher/requestWithRetries.js +32 -0
- package/dist/core/fetcher/signals.d.ts +12 -0
- package/dist/core/fetcher/signals.js +37 -0
- package/dist/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.d.ts +30 -0
- package/dist/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.js +247 -0
- package/dist/core/fetcher/stream-wrappers/NodePre18StreamWrapper.d.ts +22 -0
- package/dist/core/fetcher/stream-wrappers/NodePre18StreamWrapper.js +124 -0
- package/dist/core/fetcher/stream-wrappers/UndiciStreamWrapper.d.ts +31 -0
- package/dist/core/fetcher/stream-wrappers/UndiciStreamWrapper.js +229 -0
- package/dist/core/fetcher/stream-wrappers/chooseStreamWrapper.d.ts +18 -0
- package/dist/core/fetcher/stream-wrappers/chooseStreamWrapper.js +50 -0
- package/dist/core/runtime/runtime.d.ts +1 -0
- package/dist/core/runtime/runtime.js +1 -0
- package/dist/core/schemas/Schema.d.ts +8 -4
- package/dist/core/schemas/Schema.js +1 -0
- package/dist/core/schemas/builders/bigint/bigint.d.ts +2 -0
- package/dist/core/schemas/builders/bigint/bigint.js +50 -0
- package/dist/core/schemas/builders/bigint/index.d.ts +1 -0
- package/dist/core/schemas/builders/bigint/index.js +5 -0
- package/dist/core/schemas/builders/index.d.ts +1 -0
- package/dist/core/schemas/builders/index.js +1 -0
- package/dist/core/schemas/builders/lazy/lazy.d.ts +2 -2
- package/dist/core/schemas/builders/lazy/lazy.js +8 -19
- package/dist/core/schemas/builders/lazy/lazyObject.js +1 -10
- package/dist/core/schemas/builders/list/list.js +31 -44
- package/dist/core/schemas/builders/object/object.js +90 -111
- package/dist/core/schemas/builders/object/types.d.ts +2 -2
- package/dist/core/schemas/builders/object-like/getObjectLikeUtils.js +3 -12
- package/dist/core/schemas/builders/record/record.js +49 -60
- package/dist/core/schemas/builders/schema-utils/getSchemaUtils.d.ts +2 -2
- package/dist/core/schemas/builders/schema-utils/getSchemaUtils.js +18 -21
- package/dist/core/schemas/builders/set/set.js +6 -15
- package/dist/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.js +21 -32
- package/dist/core/schemas/builders/union/union.js +51 -62
- package/dist/core/schemas/utils/getErrorMessageForIncorrectType.js +4 -0
- package/dist/core/schemas/utils/maybeSkipValidation.js +3 -12
- package/dist/serialization/resources/collections/resources/items/client/requests/index.d.ts +0 -1
- package/dist/serialization/resources/collections/resources/items/client/requests/index.js +1 -3
- package/dist/serialization/resources/collections/resources/items/types/ItemsPublishItemResponse.d.ts +13 -0
- package/dist/serialization/resources/collections/resources/items/types/ItemsPublishItemResponse.js +34 -0
- package/dist/serialization/resources/collections/resources/items/types/index.d.ts +1 -1
- package/dist/serialization/resources/collections/resources/items/types/index.js +1 -1
- package/dist/serialization/resources/index.d.ts +3 -4
- package/dist/serialization/resources/index.js +4 -5
- package/dist/serialization/resources/sites/index.d.ts +1 -0
- package/dist/serialization/resources/sites/index.js +1 -0
- package/dist/serialization/resources/sites/types/SitesPublishResponse.d.ts +14 -0
- package/dist/serialization/resources/sites/types/SitesPublishResponse.js +35 -0
- package/dist/serialization/resources/sites/types/index.d.ts +1 -0
- package/dist/serialization/resources/{webhooks/client → sites/types}/index.js +1 -1
- package/dist/serialization/types/Asset.d.ts +5 -4
- package/dist/serialization/types/Asset.js +5 -4
- package/dist/serialization/{resources/collections/resources/items/client/requests → types}/BulkCollectionItem.d.ts +5 -5
- package/dist/serialization/{resources/collections/resources/items/client/requests → types}/BulkCollectionItem.js +2 -2
- package/dist/serialization/types/BulkCollectionItemFieldData.d.ts +14 -0
- package/dist/serialization/{resources/collections/resources/items/types → types}/BulkCollectionItemFieldData.js +1 -1
- package/dist/serialization/types/CollectionItemFieldData.d.ts +1 -0
- package/dist/serialization/types/ConflictErrorBody.d.ts +8 -4
- package/dist/serialization/types/ConflictErrorBody.js +7 -3
- package/dist/serialization/types/DuplicateUserEmail.d.ts +7 -2
- package/dist/serialization/types/DuplicateUserEmail.js +31 -2
- package/dist/serialization/types/Form.d.ts +1 -0
- package/dist/serialization/types/Form.js +1 -0
- package/dist/serialization/types/FormSubmissionList.d.ts +1 -1
- package/dist/serialization/types/FormSubmissionList.js +1 -1
- package/dist/serialization/types/MissingScopes.d.ts +7 -2
- package/dist/serialization/types/MissingScopes.js +31 -2
- package/dist/serialization/types/NotEnterprisePlanSite.d.ts +7 -2
- package/dist/serialization/types/NotEnterprisePlanSite.js +31 -2
- package/dist/serialization/types/Page.d.ts +3 -1
- package/dist/serialization/types/Page.js +3 -1
- package/dist/serialization/types/TooManyRequestsErrorBody.d.ts +15 -0
- package/{serialization/types/PageDetailsOpenGraph.js → dist/serialization/types/TooManyRequestsErrorBody.js} +6 -6
- package/dist/serialization/types/UserLimitReached.d.ts +7 -2
- package/dist/serialization/types/UserLimitReached.js +31 -2
- package/dist/serialization/types/UsersNotEnabled.d.ts +7 -2
- package/dist/serialization/types/UsersNotEnabled.js +31 -2
- package/dist/serialization/types/Webhook.d.ts +4 -3
- package/dist/serialization/types/Webhook.js +4 -3
- package/dist/serialization/types/WebhookFilter.d.ts +12 -0
- package/{serialization/types/PageDetailsSeo.js → dist/serialization/types/WebhookFilter.js} +3 -4
- package/dist/serialization/types/index.d.ts +5 -5
- package/dist/serialization/types/index.js +5 -5
- package/dist/version.d.ts +1 -0
- package/dist/{api/resources/webhooks/client/requests/index.js → version.js} +2 -0
- package/dist/wrapper/ItemsClient.d.ts +49 -1
- package/dist/wrapper/ItemsClient.js +219 -6
- package/package.json +7 -2
- package/reference.md +5790 -0
- package/serialization/resources/collections/resources/items/client/requests/index.d.ts +0 -1
- package/serialization/resources/collections/resources/items/client/requests/index.js +1 -3
- package/serialization/resources/collections/resources/items/types/ItemsPublishItemResponse.d.ts +13 -0
- package/serialization/resources/collections/resources/items/types/ItemsPublishItemResponse.js +34 -0
- package/serialization/resources/collections/resources/items/types/index.d.ts +1 -1
- package/serialization/resources/collections/resources/items/types/index.js +1 -1
- package/serialization/resources/index.d.ts +3 -4
- package/serialization/resources/index.js +4 -5
- package/serialization/resources/sites/index.d.ts +1 -0
- package/serialization/resources/sites/index.js +1 -0
- package/serialization/resources/sites/types/SitesPublishResponse.d.ts +14 -0
- package/serialization/resources/sites/types/SitesPublishResponse.js +35 -0
- package/serialization/resources/sites/types/index.d.ts +1 -0
- package/{dist/serialization/resources/webhooks → serialization/resources/sites/types}/index.js +1 -1
- package/serialization/types/Asset.d.ts +5 -4
- package/serialization/types/Asset.js +5 -4
- package/serialization/{resources/collections/resources/items/client/requests → types}/BulkCollectionItem.d.ts +5 -5
- package/serialization/{resources/collections/resources/items/client/requests → types}/BulkCollectionItem.js +2 -2
- package/serialization/types/BulkCollectionItemFieldData.d.ts +14 -0
- package/serialization/{resources/collections/resources/items/types → types}/BulkCollectionItemFieldData.js +1 -1
- package/serialization/types/CollectionItemFieldData.d.ts +1 -0
- package/serialization/types/ConflictErrorBody.d.ts +8 -4
- package/serialization/types/ConflictErrorBody.js +7 -3
- package/serialization/types/DuplicateUserEmail.d.ts +7 -2
- package/serialization/types/DuplicateUserEmail.js +31 -2
- package/serialization/types/Form.d.ts +1 -0
- package/serialization/types/Form.js +1 -0
- package/serialization/types/FormSubmissionList.d.ts +1 -1
- package/serialization/types/FormSubmissionList.js +1 -1
- package/serialization/types/MissingScopes.d.ts +7 -2
- package/serialization/types/MissingScopes.js +31 -2
- package/serialization/types/NotEnterprisePlanSite.d.ts +7 -2
- package/serialization/types/NotEnterprisePlanSite.js +31 -2
- package/serialization/types/Page.d.ts +3 -1
- package/serialization/types/Page.js +3 -1
- package/serialization/types/TooManyRequestsErrorBody.d.ts +15 -0
- package/{dist/serialization/types/PageDetailsOpenGraph.js → serialization/types/TooManyRequestsErrorBody.js} +6 -6
- package/serialization/types/UserLimitReached.d.ts +7 -2
- package/serialization/types/UserLimitReached.js +31 -2
- package/serialization/types/UsersNotEnabled.d.ts +7 -2
- package/serialization/types/UsersNotEnabled.js +31 -2
- package/serialization/types/Webhook.d.ts +4 -3
- package/serialization/types/Webhook.js +4 -3
- package/serialization/types/WebhookFilter.d.ts +12 -0
- package/{dist/serialization/types/PageDetailsSeo.js → serialization/types/WebhookFilter.js} +3 -4
- package/serialization/types/index.d.ts +5 -5
- package/serialization/types/index.js +5 -5
- package/version.d.ts +1 -0
- package/{api/resources/webhooks/client/requests/index.js → version.js} +2 -0
- package/wrapper/ItemsClient.d.ts +49 -1
- package/wrapper/ItemsClient.js +219 -6
- package/api/resources/webhooks/client/requests/WebhooksCreateRequest.d.ts +0 -25
- package/api/resources/webhooks/client/requests/index.d.ts +0 -1
- package/api/types/PageDetails.d.ts +0 -41
- package/api/types/PageDetailsOpenGraph.d.ts +0 -16
- package/api/types/PageDetailsSeo.d.ts +0 -12
- package/dist/api/resources/webhooks/client/requests/WebhooksCreateRequest.d.ts +0 -25
- package/dist/api/resources/webhooks/client/requests/index.d.ts +0 -1
- package/dist/api/types/PageDetails.d.ts +0 -41
- package/dist/api/types/PageDetailsOpenGraph.d.ts +0 -16
- package/dist/api/types/PageDetailsSeo.d.ts +0 -12
- package/dist/serialization/resources/collections/resources/items/types/BulkCollectionItemFieldData.d.ts +0 -13
- package/dist/serialization/resources/webhooks/client/index.d.ts +0 -1
- package/dist/serialization/resources/webhooks/client/requests/WebhooksCreateRequest.d.ts +0 -15
- package/dist/serialization/resources/webhooks/client/requests/WebhooksCreateRequest.js +0 -36
- package/dist/serialization/resources/webhooks/client/requests/index.d.ts +0 -1
- package/dist/serialization/resources/webhooks/client/requests/index.js +0 -5
- package/dist/serialization/resources/webhooks/index.d.ts +0 -1
- package/dist/serialization/types/OauthScope.d.ts +0 -10
- package/dist/serialization/types/OauthScope.js +0 -52
- package/dist/serialization/types/PageDetails.d.ts +0 -29
- package/dist/serialization/types/PageDetails.js +0 -50
- package/dist/serialization/types/PageDetailsOpenGraph.d.ts +0 -15
- package/dist/serialization/types/PageDetailsSeo.d.ts +0 -13
- package/serialization/resources/collections/resources/items/types/BulkCollectionItemFieldData.d.ts +0 -13
- package/serialization/resources/webhooks/client/index.d.ts +0 -1
- package/serialization/resources/webhooks/client/requests/WebhooksCreateRequest.d.ts +0 -15
- package/serialization/resources/webhooks/client/requests/WebhooksCreateRequest.js +0 -36
- package/serialization/resources/webhooks/client/requests/index.d.ts +0 -1
- package/serialization/resources/webhooks/client/requests/index.js +0 -5
- package/serialization/resources/webhooks/index.d.ts +0 -1
- package/serialization/types/OauthScope.d.ts +0 -10
- package/serialization/types/OauthScope.js +0 -52
- package/serialization/types/PageDetails.d.ts +0 -29
- package/serialization/types/PageDetails.js +0 -50
- package/serialization/types/PageDetailsOpenGraph.d.ts +0 -15
- package/serialization/types/PageDetailsSeo.d.ts +0 -13
- /package/api/resources/collections/resources/items/{client/requests/BulkCollectionItem.js → types/ItemsPublishItemResponse.js} +0 -0
- /package/api/resources/{collections/resources/items/types/BulkCollectionItemFieldData.js → forms/client/requests/FormsListSubmissionsRequest.js} +0 -0
- /package/api/resources/{webhooks/client/requests/WebhooksCreateRequest.js → sites/types/SitesPublishResponse.js} +0 -0
- /package/{dist/api/resources/collections/resources/items/client/requests → api/types}/BulkCollectionItem.js +0 -0
- /package/{dist/api/resources/collections/resources/items → api}/types/BulkCollectionItemFieldData.js +0 -0
- /package/api/types/{PageDetails.js → TooManyRequestsErrorBody.js} +0 -0
- /package/api/types/{PageDetailsOpenGraph.js → WebhookFilter.js} +0 -0
- /package/{api/types/PageDetailsSeo.js → dist/api/resources/collections/resources/items/types/ItemsPublishItemResponse.js} +0 -0
- /package/dist/api/resources/{webhooks/client/requests/WebhooksCreateRequest.js → forms/client/requests/FormsListSubmissionsRequest.js} +0 -0
- /package/dist/api/{types/PageDetails.js → resources/sites/types/SitesPublishResponse.js} +0 -0
- /package/dist/api/types/{PageDetailsOpenGraph.js → BulkCollectionItem.js} +0 -0
- /package/dist/api/types/{PageDetailsSeo.js → BulkCollectionItemFieldData.js} +0 -0
|
@@ -64,7 +64,7 @@ class Collections {
|
|
|
64
64
|
* @throws {@link Webflow.InternalServerError}
|
|
65
65
|
*
|
|
66
66
|
* @example
|
|
67
|
-
* await client.collections.list("
|
|
67
|
+
* await client.collections.list("580e63e98c9a982ac9b8b741")
|
|
68
68
|
*/
|
|
69
69
|
list(siteId, requestOptions) {
|
|
70
70
|
var _a;
|
|
@@ -76,17 +76,19 @@ class Collections {
|
|
|
76
76
|
Authorization: yield this._getAuthorizationHeader(),
|
|
77
77
|
"X-Fern-Language": "JavaScript",
|
|
78
78
|
"X-Fern-SDK-Name": "webflow-api",
|
|
79
|
-
"X-Fern-SDK-Version": "2.
|
|
79
|
+
"X-Fern-SDK-Version": "2.4.0",
|
|
80
|
+
"User-Agent": "webflow-api/2.4.0",
|
|
80
81
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
81
82
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
82
83
|
},
|
|
83
84
|
contentType: "application/json",
|
|
85
|
+
requestType: "json",
|
|
84
86
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
85
87
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
86
88
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
87
89
|
});
|
|
88
90
|
if (_response.ok) {
|
|
89
|
-
return
|
|
91
|
+
return serializers.CollectionList.parseOrThrow(_response.body, {
|
|
90
92
|
unrecognizedObjectKeys: "passthrough",
|
|
91
93
|
allowUnrecognizedUnionMembers: true,
|
|
92
94
|
allowUnrecognizedEnumValues: true,
|
|
@@ -103,7 +105,13 @@ class Collections {
|
|
|
103
105
|
case 404:
|
|
104
106
|
throw new Webflow.NotFoundError(_response.error.body);
|
|
105
107
|
case 429:
|
|
106
|
-
throw new Webflow.TooManyRequestsError(_response.error.body
|
|
108
|
+
throw new Webflow.TooManyRequestsError(serializers.TooManyRequestsErrorBody.parseOrThrow(_response.error.body, {
|
|
109
|
+
unrecognizedObjectKeys: "passthrough",
|
|
110
|
+
allowUnrecognizedUnionMembers: true,
|
|
111
|
+
allowUnrecognizedEnumValues: true,
|
|
112
|
+
skipValidation: true,
|
|
113
|
+
breadcrumbsPrefix: ["response"],
|
|
114
|
+
}));
|
|
107
115
|
case 500:
|
|
108
116
|
throw new Webflow.InternalServerError(_response.error.body);
|
|
109
117
|
default:
|
|
@@ -142,7 +150,7 @@ class Collections {
|
|
|
142
150
|
* @throws {@link Webflow.InternalServerError}
|
|
143
151
|
*
|
|
144
152
|
* @example
|
|
145
|
-
* await client.collections.create("
|
|
153
|
+
* await client.collections.create("580e63e98c9a982ac9b8b741", {
|
|
146
154
|
* displayName: "Blog Posts",
|
|
147
155
|
* singularName: "Blog Post",
|
|
148
156
|
* slug: "posts"
|
|
@@ -158,18 +166,20 @@ class Collections {
|
|
|
158
166
|
Authorization: yield this._getAuthorizationHeader(),
|
|
159
167
|
"X-Fern-Language": "JavaScript",
|
|
160
168
|
"X-Fern-SDK-Name": "webflow-api",
|
|
161
|
-
"X-Fern-SDK-Version": "2.
|
|
169
|
+
"X-Fern-SDK-Version": "2.4.0",
|
|
170
|
+
"User-Agent": "webflow-api/2.4.0",
|
|
162
171
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
163
172
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
164
173
|
},
|
|
165
174
|
contentType: "application/json",
|
|
166
|
-
|
|
175
|
+
requestType: "json",
|
|
176
|
+
body: serializers.CollectionsCreateRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
167
177
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
168
178
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
169
179
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
170
180
|
});
|
|
171
181
|
if (_response.ok) {
|
|
172
|
-
return
|
|
182
|
+
return serializers.Collection.parseOrThrow(_response.body, {
|
|
173
183
|
unrecognizedObjectKeys: "passthrough",
|
|
174
184
|
allowUnrecognizedUnionMembers: true,
|
|
175
185
|
allowUnrecognizedEnumValues: true,
|
|
@@ -186,7 +196,13 @@ class Collections {
|
|
|
186
196
|
case 404:
|
|
187
197
|
throw new Webflow.NotFoundError(_response.error.body);
|
|
188
198
|
case 429:
|
|
189
|
-
throw new Webflow.TooManyRequestsError(_response.error.body
|
|
199
|
+
throw new Webflow.TooManyRequestsError(serializers.TooManyRequestsErrorBody.parseOrThrow(_response.error.body, {
|
|
200
|
+
unrecognizedObjectKeys: "passthrough",
|
|
201
|
+
allowUnrecognizedUnionMembers: true,
|
|
202
|
+
allowUnrecognizedEnumValues: true,
|
|
203
|
+
skipValidation: true,
|
|
204
|
+
breadcrumbsPrefix: ["response"],
|
|
205
|
+
}));
|
|
190
206
|
case 500:
|
|
191
207
|
throw new Webflow.InternalServerError(_response.error.body);
|
|
192
208
|
default:
|
|
@@ -224,7 +240,7 @@ class Collections {
|
|
|
224
240
|
* @throws {@link Webflow.InternalServerError}
|
|
225
241
|
*
|
|
226
242
|
* @example
|
|
227
|
-
* await client.collections.get("
|
|
243
|
+
* await client.collections.get("580e63fc8c9a982ac9b8b745")
|
|
228
244
|
*/
|
|
229
245
|
get(collectionId, requestOptions) {
|
|
230
246
|
var _a;
|
|
@@ -236,17 +252,19 @@ class Collections {
|
|
|
236
252
|
Authorization: yield this._getAuthorizationHeader(),
|
|
237
253
|
"X-Fern-Language": "JavaScript",
|
|
238
254
|
"X-Fern-SDK-Name": "webflow-api",
|
|
239
|
-
"X-Fern-SDK-Version": "2.
|
|
255
|
+
"X-Fern-SDK-Version": "2.4.0",
|
|
256
|
+
"User-Agent": "webflow-api/2.4.0",
|
|
240
257
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
241
258
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
242
259
|
},
|
|
243
260
|
contentType: "application/json",
|
|
261
|
+
requestType: "json",
|
|
244
262
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
245
263
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
246
264
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
247
265
|
});
|
|
248
266
|
if (_response.ok) {
|
|
249
|
-
return
|
|
267
|
+
return serializers.Collection.parseOrThrow(_response.body, {
|
|
250
268
|
unrecognizedObjectKeys: "passthrough",
|
|
251
269
|
allowUnrecognizedUnionMembers: true,
|
|
252
270
|
allowUnrecognizedEnumValues: true,
|
|
@@ -263,7 +281,13 @@ class Collections {
|
|
|
263
281
|
case 404:
|
|
264
282
|
throw new Webflow.NotFoundError(_response.error.body);
|
|
265
283
|
case 429:
|
|
266
|
-
throw new Webflow.TooManyRequestsError(_response.error.body
|
|
284
|
+
throw new Webflow.TooManyRequestsError(serializers.TooManyRequestsErrorBody.parseOrThrow(_response.error.body, {
|
|
285
|
+
unrecognizedObjectKeys: "passthrough",
|
|
286
|
+
allowUnrecognizedUnionMembers: true,
|
|
287
|
+
allowUnrecognizedEnumValues: true,
|
|
288
|
+
skipValidation: true,
|
|
289
|
+
breadcrumbsPrefix: ["response"],
|
|
290
|
+
}));
|
|
267
291
|
case 500:
|
|
268
292
|
throw new Webflow.InternalServerError(_response.error.body);
|
|
269
293
|
default:
|
|
@@ -301,7 +325,7 @@ class Collections {
|
|
|
301
325
|
* @throws {@link Webflow.InternalServerError}
|
|
302
326
|
*
|
|
303
327
|
* @example
|
|
304
|
-
* await client.collections.deleteCollection("
|
|
328
|
+
* await client.collections.deleteCollection("580e63fc8c9a982ac9b8b745")
|
|
305
329
|
*/
|
|
306
330
|
deleteCollection(collectionId, requestOptions) {
|
|
307
331
|
var _a;
|
|
@@ -313,11 +337,13 @@ class Collections {
|
|
|
313
337
|
Authorization: yield this._getAuthorizationHeader(),
|
|
314
338
|
"X-Fern-Language": "JavaScript",
|
|
315
339
|
"X-Fern-SDK-Name": "webflow-api",
|
|
316
|
-
"X-Fern-SDK-Version": "2.
|
|
340
|
+
"X-Fern-SDK-Version": "2.4.0",
|
|
341
|
+
"User-Agent": "webflow-api/2.4.0",
|
|
317
342
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
318
343
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
319
344
|
},
|
|
320
345
|
contentType: "application/json",
|
|
346
|
+
requestType: "json",
|
|
321
347
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
322
348
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
323
349
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -334,7 +360,13 @@ class Collections {
|
|
|
334
360
|
case 404:
|
|
335
361
|
throw new Webflow.NotFoundError(_response.error.body);
|
|
336
362
|
case 429:
|
|
337
|
-
throw new Webflow.TooManyRequestsError(_response.error.body
|
|
363
|
+
throw new Webflow.TooManyRequestsError(serializers.TooManyRequestsErrorBody.parseOrThrow(_response.error.body, {
|
|
364
|
+
unrecognizedObjectKeys: "passthrough",
|
|
365
|
+
allowUnrecognizedUnionMembers: true,
|
|
366
|
+
allowUnrecognizedEnumValues: true,
|
|
367
|
+
skipValidation: true,
|
|
368
|
+
breadcrumbsPrefix: ["response"],
|
|
369
|
+
}));
|
|
338
370
|
case 500:
|
|
339
371
|
throw new Webflow.InternalServerError(_response.error.body);
|
|
340
372
|
default:
|
|
@@ -373,7 +405,7 @@ class Collections {
|
|
|
373
405
|
* @throws {@link Webflow.InternalServerError}
|
|
374
406
|
*
|
|
375
407
|
* @example
|
|
376
|
-
* await client.collections.delete("
|
|
408
|
+
* await client.collections.delete("580e63fc8c9a982ac9b8b745", "580e63fc8c9a982ac9b8b745")
|
|
377
409
|
*/
|
|
378
410
|
delete(collectionId, fieldId, requestOptions) {
|
|
379
411
|
var _a;
|
|
@@ -385,11 +417,13 @@ class Collections {
|
|
|
385
417
|
Authorization: yield this._getAuthorizationHeader(),
|
|
386
418
|
"X-Fern-Language": "JavaScript",
|
|
387
419
|
"X-Fern-SDK-Name": "webflow-api",
|
|
388
|
-
"X-Fern-SDK-Version": "2.
|
|
420
|
+
"X-Fern-SDK-Version": "2.4.0",
|
|
421
|
+
"User-Agent": "webflow-api/2.4.0",
|
|
389
422
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
390
423
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
391
424
|
},
|
|
392
425
|
contentType: "application/json",
|
|
426
|
+
requestType: "json",
|
|
393
427
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
394
428
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
395
429
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -406,7 +440,13 @@ class Collections {
|
|
|
406
440
|
case 404:
|
|
407
441
|
throw new Webflow.NotFoundError(_response.error.body);
|
|
408
442
|
case 429:
|
|
409
|
-
throw new Webflow.TooManyRequestsError(_response.error.body
|
|
443
|
+
throw new Webflow.TooManyRequestsError(serializers.TooManyRequestsErrorBody.parseOrThrow(_response.error.body, {
|
|
444
|
+
unrecognizedObjectKeys: "passthrough",
|
|
445
|
+
allowUnrecognizedUnionMembers: true,
|
|
446
|
+
allowUnrecognizedEnumValues: true,
|
|
447
|
+
skipValidation: true,
|
|
448
|
+
breadcrumbsPrefix: ["response"],
|
|
449
|
+
}));
|
|
410
450
|
case 500:
|
|
411
451
|
throw new Webflow.InternalServerError(_response.error.body);
|
|
412
452
|
default:
|
|
@@ -35,9 +35,9 @@ export declare class Fields {
|
|
|
35
35
|
* @throws {@link Webflow.InternalServerError}
|
|
36
36
|
*
|
|
37
37
|
* @example
|
|
38
|
-
* await client.collections.fields.create("
|
|
38
|
+
* await client.collections.fields.create("580e63fc8c9a982ac9b8b745", {
|
|
39
39
|
* isRequired: false,
|
|
40
|
-
* type:
|
|
40
|
+
* type: "RichText",
|
|
41
41
|
* displayName: "Post Body",
|
|
42
42
|
* helpText: "Add the body of your post here"
|
|
43
43
|
* })
|
|
@@ -58,7 +58,7 @@ export declare class Fields {
|
|
|
58
58
|
* @throws {@link Webflow.InternalServerError}
|
|
59
59
|
*
|
|
60
60
|
* @example
|
|
61
|
-
* await client.collections.fields.update("
|
|
61
|
+
* await client.collections.fields.update("580e63fc8c9a982ac9b8b745", "580e63fc8c9a982ac9b8b745", {
|
|
62
62
|
* isRequired: false,
|
|
63
63
|
* displayName: "Post Body",
|
|
64
64
|
* helpText: "Add the body of your post here"
|
|
@@ -63,9 +63,9 @@ class Fields {
|
|
|
63
63
|
* @throws {@link Webflow.InternalServerError}
|
|
64
64
|
*
|
|
65
65
|
* @example
|
|
66
|
-
* await client.collections.fields.create("
|
|
66
|
+
* await client.collections.fields.create("580e63fc8c9a982ac9b8b745", {
|
|
67
67
|
* isRequired: false,
|
|
68
|
-
* type:
|
|
68
|
+
* type: "RichText",
|
|
69
69
|
* displayName: "Post Body",
|
|
70
70
|
* helpText: "Add the body of your post here"
|
|
71
71
|
* })
|
|
@@ -80,18 +80,20 @@ class Fields {
|
|
|
80
80
|
Authorization: yield this._getAuthorizationHeader(),
|
|
81
81
|
"X-Fern-Language": "JavaScript",
|
|
82
82
|
"X-Fern-SDK-Name": "webflow-api",
|
|
83
|
-
"X-Fern-SDK-Version": "2.
|
|
83
|
+
"X-Fern-SDK-Version": "2.4.0",
|
|
84
|
+
"User-Agent": "webflow-api/2.4.0",
|
|
84
85
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
85
86
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
86
87
|
},
|
|
87
88
|
contentType: "application/json",
|
|
88
|
-
|
|
89
|
+
requestType: "json",
|
|
90
|
+
body: serializers.collections.FieldCreate.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
89
91
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
90
92
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
91
93
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
92
94
|
});
|
|
93
95
|
if (_response.ok) {
|
|
94
|
-
return
|
|
96
|
+
return serializers.Field.parseOrThrow(_response.body, {
|
|
95
97
|
unrecognizedObjectKeys: "passthrough",
|
|
96
98
|
allowUnrecognizedUnionMembers: true,
|
|
97
99
|
allowUnrecognizedEnumValues: true,
|
|
@@ -108,7 +110,13 @@ class Fields {
|
|
|
108
110
|
case 404:
|
|
109
111
|
throw new Webflow.NotFoundError(_response.error.body);
|
|
110
112
|
case 429:
|
|
111
|
-
throw new Webflow.TooManyRequestsError(_response.error.body
|
|
113
|
+
throw new Webflow.TooManyRequestsError(serializers.TooManyRequestsErrorBody.parseOrThrow(_response.error.body, {
|
|
114
|
+
unrecognizedObjectKeys: "passthrough",
|
|
115
|
+
allowUnrecognizedUnionMembers: true,
|
|
116
|
+
allowUnrecognizedEnumValues: true,
|
|
117
|
+
skipValidation: true,
|
|
118
|
+
breadcrumbsPrefix: ["response"],
|
|
119
|
+
}));
|
|
112
120
|
case 500:
|
|
113
121
|
throw new Webflow.InternalServerError(_response.error.body);
|
|
114
122
|
default:
|
|
@@ -148,7 +156,7 @@ class Fields {
|
|
|
148
156
|
* @throws {@link Webflow.InternalServerError}
|
|
149
157
|
*
|
|
150
158
|
* @example
|
|
151
|
-
* await client.collections.fields.update("
|
|
159
|
+
* await client.collections.fields.update("580e63fc8c9a982ac9b8b745", "580e63fc8c9a982ac9b8b745", {
|
|
152
160
|
* isRequired: false,
|
|
153
161
|
* displayName: "Post Body",
|
|
154
162
|
* helpText: "Add the body of your post here"
|
|
@@ -164,18 +172,20 @@ class Fields {
|
|
|
164
172
|
Authorization: yield this._getAuthorizationHeader(),
|
|
165
173
|
"X-Fern-Language": "JavaScript",
|
|
166
174
|
"X-Fern-SDK-Name": "webflow-api",
|
|
167
|
-
"X-Fern-SDK-Version": "2.
|
|
175
|
+
"X-Fern-SDK-Version": "2.4.0",
|
|
176
|
+
"User-Agent": "webflow-api/2.4.0",
|
|
168
177
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
169
178
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
170
179
|
},
|
|
171
180
|
contentType: "application/json",
|
|
172
|
-
|
|
181
|
+
requestType: "json",
|
|
182
|
+
body: serializers.collections.FieldUpdate.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
173
183
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
174
184
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
175
185
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
176
186
|
});
|
|
177
187
|
if (_response.ok) {
|
|
178
|
-
return
|
|
188
|
+
return serializers.Field.parseOrThrow(_response.body, {
|
|
179
189
|
unrecognizedObjectKeys: "passthrough",
|
|
180
190
|
allowUnrecognizedUnionMembers: true,
|
|
181
191
|
allowUnrecognizedEnumValues: true,
|
|
@@ -192,7 +202,13 @@ class Fields {
|
|
|
192
202
|
case 404:
|
|
193
203
|
throw new Webflow.NotFoundError(_response.error.body);
|
|
194
204
|
case 429:
|
|
195
|
-
throw new Webflow.TooManyRequestsError(_response.error.body
|
|
205
|
+
throw new Webflow.TooManyRequestsError(serializers.TooManyRequestsErrorBody.parseOrThrow(_response.error.body, {
|
|
206
|
+
unrecognizedObjectKeys: "passthrough",
|
|
207
|
+
allowUnrecognizedUnionMembers: true,
|
|
208
|
+
allowUnrecognizedEnumValues: true,
|
|
209
|
+
skipValidation: true,
|
|
210
|
+
breadcrumbsPrefix: ["response"],
|
|
211
|
+
}));
|
|
196
212
|
case 500:
|
|
197
213
|
throw new Webflow.InternalServerError(_response.error.body);
|
|
198
214
|
default:
|
|
@@ -35,11 +35,11 @@ export declare class Items {
|
|
|
35
35
|
* @throws {@link Webflow.InternalServerError}
|
|
36
36
|
*
|
|
37
37
|
* @example
|
|
38
|
-
* await client.collections.items.listItems("
|
|
38
|
+
* await client.collections.items.listItems("580e63fc8c9a982ac9b8b745")
|
|
39
39
|
*/
|
|
40
40
|
listItems(collectionId: string, request?: Webflow.collections.ItemsListItemsRequest, requestOptions?: Items.RequestOptions): Promise<Webflow.CollectionItemList>;
|
|
41
41
|
/**
|
|
42
|
-
* Create Item in a Collection.</br></br> To create items across multiple locales, <a href="https://developers.webflow.com/data/reference/create-item-for-multiple-locales"> please use
|
|
42
|
+
* <style>.rm-Markdown.markdown-body a{color: #146EF5 !important;}</style> Create Item in a Collection.</br></br> To create items across multiple locales, <a href="https://developers.webflow.com/data/reference/create-item-for-multiple-locales"> please use the bulk item endpoint.</a> </br></br> Required scope | <code>CMS:write</code>
|
|
43
43
|
*
|
|
44
44
|
* @param {string} collectionId - Unique identifier for a Collection
|
|
45
45
|
* @param {Webflow.CollectionItem} request
|
|
@@ -52,7 +52,7 @@ export declare class Items {
|
|
|
52
52
|
* @throws {@link Webflow.InternalServerError}
|
|
53
53
|
*
|
|
54
54
|
* @example
|
|
55
|
-
* await client.collections.items.createItem("
|
|
55
|
+
* await client.collections.items.createItem("580e63fc8c9a982ac9b8b745", {
|
|
56
56
|
* id: "42b720ef280c7a7a3be8cabe",
|
|
57
57
|
* cmsLocaleId: "653ad57de882f528b32e810e",
|
|
58
58
|
* lastPublished: "2022-11-29T16:22:43.159Z",
|
|
@@ -66,7 +66,7 @@ export declare class Items {
|
|
|
66
66
|
* }
|
|
67
67
|
* })
|
|
68
68
|
*/
|
|
69
|
-
createItem(collectionId: string, request: Webflow.CollectionItem, requestOptions?: Items.RequestOptions): Promise<
|
|
69
|
+
createItem(collectionId: string, request: Webflow.CollectionItem, requestOptions?: Items.RequestOptions): Promise<Webflow.CollectionItem>;
|
|
70
70
|
/**
|
|
71
71
|
* List of all live Items within a Collection. </br></br> Required scope | `CMS:read`
|
|
72
72
|
*
|
|
@@ -81,7 +81,7 @@ export declare class Items {
|
|
|
81
81
|
* @throws {@link Webflow.InternalServerError}
|
|
82
82
|
*
|
|
83
83
|
* @example
|
|
84
|
-
* await client.collections.items.listItemsLive("
|
|
84
|
+
* await client.collections.items.listItemsLive("580e63fc8c9a982ac9b8b745")
|
|
85
85
|
*/
|
|
86
86
|
listItemsLive(collectionId: string, request?: Webflow.collections.ItemsListItemsLiveRequest, requestOptions?: Items.RequestOptions): Promise<Webflow.CollectionItemList>;
|
|
87
87
|
/**
|
|
@@ -98,7 +98,7 @@ export declare class Items {
|
|
|
98
98
|
* @throws {@link Webflow.InternalServerError}
|
|
99
99
|
*
|
|
100
100
|
* @example
|
|
101
|
-
* await client.collections.items.createItemLive("
|
|
101
|
+
* await client.collections.items.createItemLive("580e63fc8c9a982ac9b8b745", {
|
|
102
102
|
* id: "42b720ef280c7a7a3be8cabe",
|
|
103
103
|
* cmsLocaleId: "653ad57de882f528b32e810e",
|
|
104
104
|
* lastPublished: "2022-11-29T16:22:43.159Z",
|
|
@@ -112,12 +112,12 @@ export declare class Items {
|
|
|
112
112
|
* }
|
|
113
113
|
* })
|
|
114
114
|
*/
|
|
115
|
-
createItemLive(collectionId: string, request: Webflow.CollectionItem, requestOptions?: Items.RequestOptions): Promise<
|
|
115
|
+
createItemLive(collectionId: string, request: Webflow.CollectionItem, requestOptions?: Items.RequestOptions): Promise<Webflow.CollectionItem>;
|
|
116
116
|
/**
|
|
117
117
|
* Create single Item in a Collection with multiple corresponding locales. </br></br> Required scope | `CMS:write`
|
|
118
118
|
*
|
|
119
119
|
* @param {string} collectionId - Unique identifier for a Collection
|
|
120
|
-
* @param {Webflow.
|
|
120
|
+
* @param {Webflow.BulkCollectionItem} request
|
|
121
121
|
* @param {Items.RequestOptions} requestOptions - Request-specific configuration.
|
|
122
122
|
*
|
|
123
123
|
* @throws {@link Webflow.BadRequestError}
|
|
@@ -127,11 +127,11 @@ export declare class Items {
|
|
|
127
127
|
* @throws {@link Webflow.InternalServerError}
|
|
128
128
|
*
|
|
129
129
|
* @example
|
|
130
|
-
* await client.collections.items.createItemForMultipleLocales("
|
|
130
|
+
* await client.collections.items.createItemForMultipleLocales("580e63fc8c9a982ac9b8b745", {
|
|
131
131
|
* id: "580e64008c9a982ac9b8b754"
|
|
132
132
|
* })
|
|
133
133
|
*/
|
|
134
|
-
createItemForMultipleLocales(collectionId: string, request: Webflow.
|
|
134
|
+
createItemForMultipleLocales(collectionId: string, request: Webflow.BulkCollectionItem, requestOptions?: Items.RequestOptions): Promise<Webflow.BulkCollectionItem>;
|
|
135
135
|
/**
|
|
136
136
|
* Get details of a selected Collection Item. </br></br> Required scope | `CMS:read`
|
|
137
137
|
*
|
|
@@ -147,7 +147,7 @@ export declare class Items {
|
|
|
147
147
|
* @throws {@link Webflow.InternalServerError}
|
|
148
148
|
*
|
|
149
149
|
* @example
|
|
150
|
-
* await client.collections.items.getItem("
|
|
150
|
+
* await client.collections.items.getItem("580e63fc8c9a982ac9b8b745", "580e64008c9a982ac9b8b754")
|
|
151
151
|
*/
|
|
152
152
|
getItem(collectionId: string, itemId: string, request?: Webflow.collections.ItemsGetItemRequest, requestOptions?: Items.RequestOptions): Promise<Webflow.CollectionItem>;
|
|
153
153
|
/**
|
|
@@ -165,7 +165,7 @@ export declare class Items {
|
|
|
165
165
|
* @throws {@link Webflow.InternalServerError}
|
|
166
166
|
*
|
|
167
167
|
* @example
|
|
168
|
-
* await client.collections.items.deleteItem("
|
|
168
|
+
* await client.collections.items.deleteItem("580e63fc8c9a982ac9b8b745", "580e64008c9a982ac9b8b754")
|
|
169
169
|
*/
|
|
170
170
|
deleteItem(collectionId: string, itemId: string, request?: Webflow.collections.ItemsDeleteItemRequest, requestOptions?: Items.RequestOptions): Promise<void>;
|
|
171
171
|
/**
|
|
@@ -183,7 +183,7 @@ export declare class Items {
|
|
|
183
183
|
* @throws {@link Webflow.InternalServerError}
|
|
184
184
|
*
|
|
185
185
|
* @example
|
|
186
|
-
* await client.collections.items.updateItem("
|
|
186
|
+
* await client.collections.items.updateItem("580e63fc8c9a982ac9b8b745", "580e64008c9a982ac9b8b754", {
|
|
187
187
|
* id: "42b720ef280c7a7a3be8cabe",
|
|
188
188
|
* cmsLocaleId: "653ad57de882f528b32e810e",
|
|
189
189
|
* lastPublished: "2022-11-29T16:22:43.159Z",
|
|
@@ -213,11 +213,11 @@ export declare class Items {
|
|
|
213
213
|
* @throws {@link Webflow.InternalServerError}
|
|
214
214
|
*
|
|
215
215
|
* @example
|
|
216
|
-
* await client.collections.items.getItemLive("
|
|
216
|
+
* await client.collections.items.getItemLive("580e63fc8c9a982ac9b8b745", "580e64008c9a982ac9b8b754")
|
|
217
217
|
*/
|
|
218
218
|
getItemLive(collectionId: string, itemId: string, request?: Webflow.collections.ItemsGetItemLiveRequest, requestOptions?: Items.RequestOptions): Promise<Webflow.CollectionItem>;
|
|
219
219
|
/**
|
|
220
|
-
* Remove a live item from the site. Removing a published item will unpublish the item from the live site and set it to draft. This endpoint does not currently support bulk deletion
|
|
220
|
+
* Remove a live item from the site. Removing a published item will unpublish the item from the live site and set it to draft. This endpoint does not currently support bulk deletion.</br></br> Required scope | `CMS:write`
|
|
221
221
|
*
|
|
222
222
|
* @param {string} collectionId - Unique identifier for a Collection
|
|
223
223
|
* @param {string} itemId - Unique identifier for an Item
|
|
@@ -231,7 +231,7 @@ export declare class Items {
|
|
|
231
231
|
* @throws {@link Webflow.InternalServerError}
|
|
232
232
|
*
|
|
233
233
|
* @example
|
|
234
|
-
* await client.collections.items.deleteItemLive("
|
|
234
|
+
* await client.collections.items.deleteItemLive("580e63fc8c9a982ac9b8b745", "580e64008c9a982ac9b8b754")
|
|
235
235
|
*/
|
|
236
236
|
deleteItemLive(collectionId: string, itemId: string, request?: Webflow.collections.ItemsDeleteItemLiveRequest, requestOptions?: Items.RequestOptions): Promise<void>;
|
|
237
237
|
/**
|
|
@@ -249,7 +249,7 @@ export declare class Items {
|
|
|
249
249
|
* @throws {@link Webflow.InternalServerError}
|
|
250
250
|
*
|
|
251
251
|
* @example
|
|
252
|
-
* await client.collections.items.updateItemLive("
|
|
252
|
+
* await client.collections.items.updateItemLive("580e63fc8c9a982ac9b8b745", "580e64008c9a982ac9b8b754", {
|
|
253
253
|
* id: "42b720ef280c7a7a3be8cabe",
|
|
254
254
|
* cmsLocaleId: "653ad57de882f528b32e810e",
|
|
255
255
|
* lastPublished: "2022-11-29T16:22:43.159Z",
|
|
@@ -278,10 +278,10 @@ export declare class Items {
|
|
|
278
278
|
* @throws {@link Webflow.InternalServerError}
|
|
279
279
|
*
|
|
280
280
|
* @example
|
|
281
|
-
* await client.collections.items.publishItem("
|
|
281
|
+
* await client.collections.items.publishItem("580e63fc8c9a982ac9b8b745", {
|
|
282
282
|
* itemIds: ["itemIds"]
|
|
283
283
|
* })
|
|
284
284
|
*/
|
|
285
|
-
publishItem(collectionId: string, request: Webflow.collections.ItemsPublishItemRequest, requestOptions?: Items.RequestOptions): Promise<
|
|
285
|
+
publishItem(collectionId: string, request: Webflow.collections.ItemsPublishItemRequest, requestOptions?: Items.RequestOptions): Promise<Webflow.collections.ItemsPublishItemResponse>;
|
|
286
286
|
protected _getAuthorizationHeader(): Promise<string>;
|
|
287
287
|
}
|