From 61180ac86bc634081a004078aa5e20f0104d67de Mon Sep 17 00:00:00 2001 From: fern-api <115122769+fern-api[bot]@users.noreply.github.com> Date: Thu, 16 Jan 2025 16:17:56 +0000 Subject: [PATCH] SDK regeneration --- .mock/definition/__package__.yml | 155 +++++------ .mock/definition/assets.yml | 123 ++++++--- .mock/definition/collections/items.yml | 74 ++++-- .mock/definition/components.yml | 15 +- .mock/definition/forms.yml | 27 ++ .mock/definition/pages.yml | 14 +- .mock/definition/pages/scripts.yml | 52 +--- .mock/definition/products.yml | 3 + .mock/definition/scripts.yml | 61 ++--- .mock/definition/sites.yml | 27 +- .mock/definition/sites/activityLogs.yml | 12 +- .mock/definition/sites/plans.yml | 7 +- .mock/definition/sites/redirects.yml | 21 +- .mock/definition/sites/scripts.yml | 48 ++-- .mock/definition/webhooks.yml | 8 +- package.json | 2 +- reference.md | 250 ++++++++++++------ .../resources/accessGroups/client/Client.ts | 4 +- src/api/resources/assets/client/Client.ts | 49 ++-- .../resources/collections/client/Client.ts | 16 +- .../resources/fields/client/Client.ts | 12 +- .../resources/items/client/Client.ts | 108 +++++--- .../requests/ItemsListItemsLiveRequest.ts | 4 +- .../client/requests/ItemsListItemsRequest.ts | 4 +- src/api/resources/components/client/Client.ts | 31 ++- src/api/resources/ecommerce/client/Client.ts | 4 +- src/api/resources/forms/client/Client.ts | 140 +++++++++- src/api/resources/inventory/client/Client.ts | 8 +- src/api/resources/orders/client/Client.ts | 24 +- src/api/resources/pages/client/Client.ts | 27 +- .../pages/resources/scripts/client/Client.ts | 38 +-- src/api/resources/products/client/Client.ts | 24 +- .../types/ProductsCreateSkuResponse.ts | 1 + src/api/resources/scripts/client/Client.ts | 44 ++- src/api/resources/sites/client/Client.ts | 40 +-- .../resources/activityLogs/client/Client.ts | 10 +- .../sites/resources/plans/client/Client.ts | 6 +- .../resources/redirects/client/Client.ts | 26 +- .../sites/resources/scripts/client/Client.ts | 44 +-- src/api/resources/token/client/Client.ts | 8 +- src/api/resources/users/client/Client.ts | 20 +- src/api/resources/webhooks/client/Client.ts | 16 +- src/api/types/Asset.ts | 24 +- src/api/types/AssetVariant.ts | 17 +- src/api/types/Assets.ts | 1 + src/api/types/Collection.ts | 4 +- src/api/types/CollectionItem.ts | 6 +- src/api/types/ComponentNode.ts | 10 +- src/api/types/Conflict.ts | 5 + src/api/types/ImageNode.ts | 5 +- src/api/types/ImageNodeImage.ts | 3 + src/api/types/Pagination.ts | 6 +- src/api/types/SkuFieldData.ts | 2 + .../types/SkuFieldDataEcSkuBillingMethod.ts | 3 + .../SkuFieldDataEcSkuSubscriptionPlan.ts | 3 + src/api/types/Text.ts | 3 + src/api/types/TextNode.ts | 5 +- src/api/types/TextNodeText.ts | 3 + src/api/types/TriggerType.ts | 16 +- src/api/types/WebhookList.ts | 2 +- src/api/types/index.ts | 1 + .../types/ProductsCreateSkuResponse.ts | 2 + src/serialization/types/Asset.ts | 40 +-- src/serialization/types/AssetVariant.ts | 28 +- src/serialization/types/Assets.ts | 3 + src/serialization/types/Collection.ts | 8 +- src/serialization/types/CollectionItem.ts | 12 +- src/serialization/types/ComponentNode.ts | 12 +- src/serialization/types/Conflict.ts | 14 + src/serialization/types/ImageNode.ts | 8 +- src/serialization/types/Pagination.ts | 12 +- src/serialization/types/TextNode.ts | 8 +- src/serialization/types/WebhookList.ts | 6 +- src/serialization/types/index.ts | 1 + src/version.ts | 2 +- yarn.lock | 18 +- 76 files changed, 1106 insertions(+), 794 deletions(-) create mode 100644 src/api/types/Conflict.ts create mode 100644 src/serialization/types/Conflict.ts diff --git a/.mock/definition/__package__.yml b/.mock/definition/__package__.yml index db846366..20b03dbe 100644 --- a/.mock/definition/__package__.yml +++ b/.mock/definition/__package__.yml @@ -71,6 +71,11 @@ errors: examples: - value: message: '''Site is published to multiple domains at different times' + - value: + code: conflict + message: >- + Conflict: Conflict with server data: Live PATCH updates can't be + applied to items that have never been published - value: code: custom_code_max_registered_scripts message: The maximum number of registered scripts has been reached. @@ -360,13 +365,13 @@ types: docs: Pagination object properties: limit: - type: optional + type: double docs: The limit used for pagination offset: - type: optional + type: double docs: The offset used for pagination total: - type: optional + type: double docs: The total number of records source: openapi: ../../../openapi/referenced-specs/v2.yml @@ -615,10 +620,10 @@ types: type: string docs: Unique identifier for a Collection displayName: - type: optional + type: string docs: Name given to the Collection singularName: - type: optional + type: string docs: >- The name of one Item in Collection (e.g. ”Blog Post” if the Collection is called “Blog Posts”) @@ -673,13 +678,13 @@ types: type: optional docs: Identifier for the locale of the CMS item lastPublished: - type: optional + type: string docs: The date the item was last published lastUpdated: - type: optional + type: string docs: The date the item was last updated createdOn: - type: optional + type: string docs: The date the item was created isArchived: type: optional @@ -826,6 +831,7 @@ types: docs: List of Items within the collection source: openapi: ../../../openapi/referenced-specs/v2.yml + Conflict: unknown BulkCollectionItemFieldData: properties: name: @@ -1029,6 +1035,7 @@ types: source: openapi: ../../../openapi/referenced-specs/v2.yml TextNodeText: + docs: The text content of the node properties: html: type: optional @@ -1046,15 +1053,18 @@ types: text for styling or other purposes. properties: id: - type: optional + type: string docs: Node UUID - text: optional + text: + type: TextNodeText + docs: The text content of the node attributes: type: optional> docs: The custom attributes of the node source: openapi: ../../../openapi/referenced-specs/v2.yml ImageNodeImage: + docs: The image details of the node properties: alt: optional assetId: optional @@ -1069,15 +1079,18 @@ types: can be associated with the image for styling or other purposes. properties: id: - type: optional + type: string docs: Node UUID - image: optional + image: + type: ImageNodeImage + docs: The image details of the node attributes: type: optional> docs: The custom attributes of the node source: openapi: ../../../openapi/referenced-specs/v2.yml Text: + docs: The text content of the node properties: html: type: optional @@ -1128,14 +1141,14 @@ types: the component instance, such as its type and properties. properties: id: - type: optional - docs: Node UUID + type: string + docs: The unique identifier of the component instance node componentId: - type: optional - docs: Component ID + type: string + docs: The unique identifier of the component propertyOverrides: - type: optional> docs: List of component properties with overrides for a component instance. + type: list source: openapi: ../../../openapi/referenced-specs/v2.yml Node: @@ -1439,29 +1452,30 @@ types: source: openapi: ../../../openapi/referenced-specs/v2.yml AssetVariant: + docs: Asset variant details properties: hostedUrl: - type: optional + type: string docs: URL of where the asset variant is hosted validation: format: uri originalFileName: - type: optional + type: string docs: Original file name of the variant displayName: - type: optional + type: string docs: Display name of the variant format: - type: optional + type: string docs: format of the variant width: - type: optional + type: integer docs: Width in pixels height: - type: optional + type: integer docs: Height in pixels quality: - type: optional + type: integer docs: Value between 0 and 100 representing the image quality error: type: optional @@ -1469,37 +1483,43 @@ types: source: openapi: ../../../openapi/referenced-specs/v2.yml Asset: + docs: Asset details properties: id: - type: optional + type: string docs: Unique identifier for this asset contentType: - type: optional + type: string docs: File format type size: - type: optional + type: integer docs: size in bytes siteId: - type: optional + type: string docs: Unique identifier for the site that hosts this asset hostedUrl: - type: optional + type: string docs: Link to the asset validation: format: uri originalFileName: - type: optional + type: string docs: Original file name at the time of upload displayName: - type: optional + type: string docs: Display name of the asset lastUpdated: - type: optional + type: datetime docs: Date the asset metadata was last updated createdOn: - type: optional + type: datetime docs: Date the asset metadata was created - variants: optional> + variants: + docs: >- + A list of [asset + variants](https://help.webflow.com/hc/en-us/articles/33961378697107-Responsive-images) + created by Webflow to serve your site responsively. + type: list altText: type: optional docs: The visual description of the asset @@ -1509,6 +1529,7 @@ types: docs: A list of assets properties: assets: optional> + pagination: optional source: openapi: ../../../openapi/referenced-specs/v2.yml AssetUploadUploadDetails: @@ -1618,46 +1639,8 @@ types: - collection_item_deleted - collection_item_unpublished docs: > - * `form_submission` - Sends the [form_submission](#form_submission) event - - * `site_publish` - Sends a [site_publish](#site_publish) event - - * `page_created` - Send the [page_created](#page_created) event - - * `page_metadata_updated` - Sends the - [page_metadata_updated](#page_metadata_updated) event - - * `page_deleted` - Sends the [page_deleted](#page_deleted) event - - * `ecomm_new_order` - Sends the new [ecomm_new_order](#ecomm_new_order) - event - - * `ecomm_order_changed` - Sends the - [ecomm_order_changed](#ecomm_order_changed) event - - * `ecomm_inventory_changed` - Sends the - [ecomm_inventory_changed](#ecomm_inventory_changed) event - - * `user_account_added` - Sends the - [user_account_added](#user_account_added) event - - * `user_account_updated` - Sends the - [user_account_updated](#user_account_updated) event - - * `user_account_deleted` - Sends the - [user_account_deleted](#user_account_deleted) event - - * `collection_item_created` - Sends the - [collection_item_created](#collection_item_created) event - - * `collection_item_changed` - Sends the - [collection_item_changed](#collection_item_changed) event - - * `collection_item_deleted` - Sends the - [collection_item_deleted](#collection_item_deleted) event - - * `collection_item_unpublished` - Sends the - [collection_item_unpublished](#collection_item_unpublished) event + The type of event that triggered the request. See the the documentation + for details on [supported events](m/data/reference/all-events). source: openapi: ../../../openapi/referenced-specs/v2.yml WebhookFilter: @@ -1701,8 +1684,8 @@ types: openapi: ../../../openapi/referenced-specs/v2.yml WebhookList: properties: - pagination: optional webhooks: optional> + pagination: optional source: openapi: ../../../openapi/referenced-specs/v2.yml FormFieldValueType: @@ -2209,6 +2192,10 @@ types: - value: one-time name: OneTime - subscription + docs: >- + [Billing + method](https://help.webflow.com/hc/en-us/articles/33961432087955-Add-and-manage-products-and-categories#billing-methods)for + the SKU inline: true source: openapi: ../../../openapi/referenced-specs/v2.yml @@ -2246,6 +2233,10 @@ types: openapi: ../../../openapi/referenced-specs/v2.yml inline: true SkuFieldDataEcSkuSubscriptionPlan: + docs: >- + [Subscription + plan](https://help.webflow.com/hc/en-us/articles/33961432087955-Add-and-manage-products-and-categories#subscription) + for the SKU properties: interval: type: optional @@ -2276,8 +2267,18 @@ types: compare-at-price: type: optional docs: comparison price of SKU - ec-sku-billing-method: optional - ec-sku-subscription-plan: optional + ec-sku-billing-method: + type: optional + docs: >- + [Billing + method](https://help.webflow.com/hc/en-us/articles/33961432087955-Add-and-manage-products-and-categories#billing-methods)for + the SKU + ec-sku-subscription-plan: + type: optional + docs: >- + [Subscription + plan](https://help.webflow.com/hc/en-us/articles/33961432087955-Add-and-manage-products-and-categories#subscription) + for the SKU track-inventory: type: optional docs: >- diff --git a/.mock/definition/assets.yml b/.mock/definition/assets.yml index 35392ec3..1cebe0c0 100644 --- a/.mock/definition/assets.yml +++ b/.mock/definition/assets.yml @@ -9,7 +9,7 @@ service: method: GET auth: true docs: | - List assets for a given site + List of assets uploaded to a site Required scope | `assets:read` source: @@ -55,35 +55,64 @@ service: width: 500 height: 900 quality: 100 - altText: A red chair + altText: A single candy wrapper + - id: 63e5889e7fe4eafa7384cea5 + contentType: image/png + size: 2212772 + siteId: 63938b302ea6b0aa6f3d8745 + hostedUrl: >- + https://s3.amazonaws.com/webflow-prod-assets/63938b302ea6b0aa6f3d8745/63e5889e7fe4eafa7384cea4_Vectors-Wrapper.svg + originalFileName: Gum-Wrapper.svg + displayName: 63e5889e7fe4eafa7384cea5_Gum-Wrapper.png + lastUpdated: '2023-03-01T23:42:57Z' + createdOn: '2023-02-09T23:58:22Z' + variants: + - hostedUrl: >- + https://s3.amazonaws.com/webflow-prod-assets/6258612d1ee792848f805dcf/660d83ce30f3a599ddb0bdb3_Screenshot%202024-03-20%20at%209.03.24%E2%80%AFPM-p-500.png + originalFileName: >- + Screenshot%202024-03-20%20at%209.03.24%E2%80%AFPM-p-500.png + displayName: >- + 660d83ce30f3a599ddb0bdb3_Screenshot%202024-03-20%20at%209.03.24%E2%80%AFPM-p-500.png + format: png + width: 500 + height: 900 + quality: 100 + altText: A single gum wrapper + pagination: + limit: 2 + offset: 0 + total: 2 create: path: /sites/{site_id}/assets method: POST auth: true docs: > - Create a new asset entry. + The first step in uploading an asset to a site. This endpoint generates a response with the following information: - `uploadUrl` and `uploadDetails`. + `uploadUrl` and `uploadDetails`. - You can use these two properties to [upload the file to Amazon s3 by - making a - POST](https://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectPOST.html) - request to the `uploadUrl` with the `uploadDetails` object as your - header information in the request. - - Required scope | `assets:write` + Use these properties in the header of a [POST request to Amazson + s3](https://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectPOST.html) + to complete the upload. + + + + To learn more about how to upload assets to Webflow, see our [assets + guide](/data/docs/working-with-assets). + + Required scope | `assets:write` source: openapi: ../../../openapi/referenced-specs/v2.yml path-parameters: site_id: type: string docs: Unique identifier for a Site - display-name: Create Asset Metadata + display-name: Upload Asset request: name: AssetsCreateRequest body: @@ -146,7 +175,7 @@ service: method: GET auth: true docs: | - Get an Asset + Get details about an asset Required scope | `assets:read` source: @@ -170,25 +199,28 @@ service: asset_id: 580e63fc8c9a982ac9b8b745 response: body: - id: 55131cd036c09f7d07883dfc + id: 63e5889e7fe4eafa7384cea4 contentType: image/png - size: 1500 - siteId: 62749158efef318abc8d5a0f - hostedUrl: example.com/hostedimage.png - originalFileName: image.png - displayName: example-image-123.png - lastUpdated: '2016-09-06T21:12:22Z' - createdOn: '2016-09-02T23:26:22Z' + size: 2212772 + siteId: 63938b302ea6b0aa6f3d8745 + hostedUrl: >- + https://s3.amazonaws.com/webflow-prod-assets/63938b302ea6b0aa6f3d8745/63e5889e7fe4eafa7384cea4_Vectors-Wrapper.svg + originalFileName: Candy-Wrapper.svg + displayName: 63e5889e7fe4eafa7384cea4_Candy-Wrapper.png + lastUpdated: '2023-03-01T23:42:57Z' + createdOn: '2023-02-09T23:58:22Z' variants: - - hostedUrl: example.com/hostedimage.png - originalFileName: image.png - displayName: A brown dog - format: format - width: 1500 + - hostedUrl: >- + https://s3.amazonaws.com/webflow-prod-assets/6258612d1ee792848f805dcf/660d83ce30f3a599ddb0bdb3_Screenshot%202024-03-20%20at%209.03.24%E2%80%AFPM-p-500.png + originalFileName: Screenshot%202024-03-20%20at%209.03.24%E2%80%AFPM-p-500.png + displayName: >- + 660d83ce30f3a599ddb0bdb3_Screenshot%202024-03-20%20at%209.03.24%E2%80%AFPM-p-500.png + format: png + width: 500 height: 900 - quality: 1 + quality: 100 error: error - altText: A red chair + altText: A single candy wrapper delete: path: /assets/{asset_id} method: DELETE @@ -218,7 +250,7 @@ service: method: PATCH auth: true docs: | - Update an Asset + Update details of an Asset. Required scope | `assets:write` source: @@ -256,25 +288,28 @@ service: request: {} response: body: - id: 55131cd036c09f7d07883dfc + id: 63e5889e7fe4eafa7384cea4 contentType: image/png - size: 1500 - siteId: 62749158efef318abc8d5a0f - hostedUrl: example.com/hostedimage.png - originalFileName: image.png - displayName: example-image-123.png - lastUpdated: '2016-09-06T21:12:22Z' - createdOn: '2016-09-02T23:26:22Z' + size: 2212772 + siteId: 63938b302ea6b0aa6f3d8745 + hostedUrl: >- + https://s3.amazonaws.com/webflow-prod-assets/63938b302ea6b0aa6f3d8745/63e5889e7fe4eafa7384cea4_Vectors-Wrapper.svg + originalFileName: Candy-Wrapper.svg + displayName: 63e5889e7fe4eafa7384cea4_Candy-Wrapper.png + lastUpdated: '2023-03-01T23:42:57Z' + createdOn: '2023-02-09T23:58:22Z' variants: - - hostedUrl: example.com/hostedimage.png - originalFileName: image.png - displayName: A brown dog - format: format - width: 1500 + - hostedUrl: >- + https://s3.amazonaws.com/webflow-prod-assets/6258612d1ee792848f805dcf/660d83ce30f3a599ddb0bdb3_Screenshot%202024-03-20%20at%209.03.24%E2%80%AFPM-p-500.png + originalFileName: Screenshot%202024-03-20%20at%209.03.24%E2%80%AFPM-p-500.png + displayName: >- + 660d83ce30f3a599ddb0bdb3_Screenshot%202024-03-20%20at%209.03.24%E2%80%AFPM-p-500.png + format: png + width: 500 height: 900 - quality: 1 + quality: 100 error: error - altText: A red chair + altText: A single candy wrapper list-folders: path: /sites/{site_id}/asset_folders method: GET diff --git a/.mock/definition/collections/items.yml b/.mock/definition/collections/items.yml index f765817e..7267390d 100644 --- a/.mock/definition/collections/items.yml +++ b/.mock/definition/collections/items.yml @@ -166,10 +166,10 @@ service: docs: 'Maximum number of records to be returned (max limit: 100)' name: type: optional - docs: The name of the item(s) + docs: Filter by the exact name of the item(s) slug: type: optional - docs: The slug of the item + docs: Filter by the exact slug of the item sortBy: type: optional docs: Sort results by the provided value @@ -322,8 +322,8 @@ service: Delete Items from a Collection. - **Note:** If the `cmsLocaleId` parameter is undefined or empty and the - items are localized, items will be deleted only in the primary locale. + Items will only be deleted in the primary + locale unless a `cmsLocaleId` is included in the request. Required scope | `CMS:write` @@ -356,11 +356,14 @@ service: method: PATCH auth: true docs: > - Update a single item or multiple items (up to 100) in a Collection. + Update a single item or multiple items in a Collection. - **Note:** If the `cmsLocaleId` parameter is undefined or empty and the - items are localized, items will be updated only in the primary locale. + The limit for this endpoint is 100 items. + + + Items will only be updated in the primary + locale, unless a `cmsLocaleId` is included in the request. Required scope | `CMS:write` @@ -560,7 +563,7 @@ service: method: GET auth: true docs: | - List of all live Items within a Collection. + List all published items in a collection. Required scope | `CMS:read` source: @@ -590,10 +593,10 @@ service: docs: 'Maximum number of records to be returned (max limit: 100)' name: type: optional - docs: The name of the item(s) + docs: Filter by the exact name of the item(s) slug: type: optional - docs: The slug of the item + docs: Filter by the exact slug of the item sortBy: type: optional docs: Sort results by the provided value @@ -648,8 +651,8 @@ service: method: POST auth: true docs: > - Create live Item(s) in a Collection. The Item(s) will be published to - the live site. + Create item(s) in a collection that will be immediately published to the + live site. @@ -683,6 +686,9 @@ service: path-parameters: collection_id: 580e63fc8c9a982ac9b8b745 request: + lastPublished: '2023-03-17T18:47:35.560Z' + lastUpdated: '2023-03-17T18:47:35.560Z' + createdOn: '2023-03-17T18:47:35.560Z' isArchived: false isDraft: false fieldData: @@ -711,14 +717,20 @@ service: collection_id: 580e63fc8c9a982ac9b8b745 request: items: - - isArchived: false + - lastPublished: '2023-03-17T18:47:35.560Z' + lastUpdated: '2023-03-17T18:47:35.560Z' + createdOn: '2023-03-17T18:47:35.560Z' + isArchived: false isDraft: false fieldData: name: Senior Data Analyst slug: senior-data-analyst url: https://boards.greenhouse.io/webflow/jobs/26567701 department: Data - - isArchived: false + - lastPublished: '2023-03-17T18:47:35.560Z' + lastUpdated: '2023-03-17T18:47:35.560Z' + createdOn: '2023-03-17T18:47:35.560Z' + isArchived: false isDraft: false fieldData: name: Product Manager @@ -746,13 +758,15 @@ service: auth: true docs: > Remove an item or multiple items (up to 100 items) from the live site. - Deleting published items will unpublish the items from the live site and - set them to draft. - **Note:** If the `cmsLocaleId` parameter is undefined or empty and the - items are localized, items will be unpublished only in the primary - locale. + Using this endpoint to delete published item(s) will unpublish the + item(s) from the live site and set the item(s) `isDraft` property to + `true`. + + + Items will only be unpublished in the + primary locale unless a `cmsLocaleId` is included in the request. Required scope | `CMS:write` @@ -784,12 +798,12 @@ service: method: PATCH auth: true docs: > - Update a single live item or multiple live items (up to 100) in a - Collection + Update a single published item or multiple published items (up to 100) + in a Collection - **Note:** If the `cmsLocaleId` parameter is undefined or empty and the - items are localized, items will be updated only in the primary locale. + Items will only be updated in the primary + locale, unless a `cmsLocaleId` is included in the request. Required scope | `CMS:write` @@ -813,6 +827,7 @@ service: - root.BadRequestError - root.UnauthorizedError - root.NotFoundError + - root.ConflictError - root.TooManyRequestsError - root.InternalServerError examples: @@ -1101,9 +1116,11 @@ service: corresponding locales. - **Notes:** + - This endpoint can create up to 100 items in a request. - - If the `cmsLocaleIds` parameter is undefined or empty and localization is enabled, items will only be created in the primary locale. + - If the `cmsLocaleIds` parameter is not included in the request, an item will only be created in the primary locale. + + Required scope | `CMS:write` source: @@ -1327,10 +1344,8 @@ service: path: /collections/{collection_id}/items/{item_id} method: DELETE auth: true - docs: > - Delete an Item from a Collection. This endpoint does not currently - support bulk deletion. - + docs: | + Delete an item from a collection. Required scope | `CMS:write` source: @@ -1550,6 +1565,7 @@ service: - root.BadRequestError - root.UnauthorizedError - root.NotFoundError + - root.ConflictError - root.TooManyRequestsError - root.InternalServerError examples: diff --git a/.mock/definition/components.yml b/.mock/definition/components.yml index b9eb7d63..be9d6dc2 100644 --- a/.mock/definition/components.yml +++ b/.mock/definition/components.yml @@ -291,10 +291,10 @@ service: method: GET auth: true docs: > - Get the property default values of a component definition. + Get the default property values of a component definition. - If you do not provide a Locale ID in your request, the response + If you do not include a `localeId` in your request, the response will return any properties that can be localized from the Primary locale. @@ -366,18 +366,17 @@ service: method: POST auth: true docs: > - Update the property default values of a component definition in a + Update the default property values of a component definition in a specificed locale. - Before making updates: - - 1. Use the [get component + Before making updates, use the [get component properties](/data/reference/pages-and-components/components/get-properties) - endpoint to identify available properties + endpoint to identify properties that can be updated in a secondary + locale. - The request requires a secondary locale ID. If a locale is + The request requires a secondary locale ID. If a `localeId` is missing, the request will not be processed and will result in an error. diff --git a/.mock/definition/forms.yml b/.mock/definition/forms.yml index 9eac1775..df357328 100644 --- a/.mock/definition/forms.yml +++ b/.mock/definition/forms.yml @@ -246,6 +246,33 @@ service: formResponse: First Name: Arthur Last Name: Dent + delete-submission: + path: /form_submissions/{form_submission_id} + method: DELETE + auth: true + docs: | + Delete a form submission + + + Required scope | `forms:write` + source: + openapi: ../../../openapi/referenced-specs/v2.yml + path-parameters: + form_submission_id: + type: string + docs: Unique identifier for a Form Submission + display-name: Delete Form Submission + errors: + - root.BadRequestError + - root.UnauthorizedError + - root.ForbiddenError + - root.NotFoundError + - root.ConflictError + - root.TooManyRequestsError + - root.InternalServerError + examples: + - path-parameters: + form_submission_id: 580e63e98c9a982ac9b8b741 update-submission: path: /form_submissions/{form_submission_id} method: PATCH diff --git a/.mock/definition/pages.yml b/.mock/definition/pages.yml index 62de7dcb..46cf60c5 100644 --- a/.mock/definition/pages.yml +++ b/.mock/definition/pages.yml @@ -276,16 +276,18 @@ service: method: GET auth: true docs: > - Get static content from a static page. This includes text nodes, image - nodes and component instances. + Get content from a static page. This includes text nodes, image nodes, + and component instances with [property + overrides](https://help.webflow.com/hc/en-us/articles/33961219350547-Component-properties#how-to-modify-property-values-on-component-instances). - To retrieve the contents of components in the page use the [get - component - content](/data/reference/pages-and-components/components/get-content) + + To retrieve the static content of a component instance, use the [Get + Component + Content](/data/reference/pages-and-components/components/get-content) endpoint. - If you do not provide a Locale ID in your request, the response + If you do not include a `localeId` in your request, the response will return any content that can be localized from the Primary locale. diff --git a/.mock/definition/pages/scripts.yml b/.mock/definition/pages/scripts.yml index f8ee3287..e0ed659d 100644 --- a/.mock/definition/pages/scripts.yml +++ b/.mock/definition/pages/scripts.yml @@ -8,22 +8,8 @@ service: path: /pages/{page_id}/custom_code method: GET auth: true - docs: > - Get all registered scripts that have been applied to a specific Page. - - - In order to use the Custom Code APIs for Sites and Pages, Custom Code - Scripts must first be registered - - to a Site via the `registered_scripts` endpoints, and then applied to a - Site or Page using the appropriate - - `custom_code` endpoints. - - - Access to this endpoint requires a bearer token from a [Data - Client App](/data/docs/getting-started-data-clients). - + docs: | + Get all scripts applied to a page. Required scope | `custom_code:read` source: @@ -59,25 +45,12 @@ service: path: /pages/{page_id}/custom_code method: PUT auth: true - docs: > - Add a registered script to a Page. - - - In order to use the Custom Code APIs for Sites and Pages, Custom Code - Scripts must first be registered - - to a Site via the `registered_scripts` endpoints, and then applied to a - Site or Page using the appropriate - - `custom_code` endpoints. - - - A site can have a maximum of 800 registered scripts. - - - Access to this endpoint requires a bearer token from a [Data - Client App](/data/docs/getting-started-data-clients). + docs: | + Apply scripts to a page. + + To apply a script to a page, the script must first be registered to a Site via the [Register Script](/data/reference/custom-code/custom-code/register-hosted) endpoints. Once registered, the script can be applied to a Site or Page using the appropriate endpoints. See the documentation on [working with Custom Code](/data/docs/custom-code) for more information. + Required scope | `custom_code:write` source: @@ -133,16 +106,7 @@ service: method: DELETE auth: true docs: > - Delete the custom code block that an app has created for a page - - - In order to use the Custom Code APIs for Sites and Pages, Custom Code - Scripts must first be registered - - to a Site via the `registered_scripts` endpoints, and then applied to a - Site or Page using the appropriate - - `custom_code` endpoints. + Delete a custom code block that the App created on a page. Access to this endpoint requires a bearer token from a [Data diff --git a/.mock/definition/products.yml b/.mock/definition/products.yml index 4c6fcd1d..d70f0fff 100644 --- a/.mock/definition/products.yml +++ b/.mock/definition/products.yml @@ -396,6 +396,8 @@ service: - {} response: body: + required: + key: value skus: - id: 580e63fc8c9a982ac9b8b745 cmsLocaleId: 653ad57de882f528b32e810e @@ -495,6 +497,7 @@ service: types: ProductsCreateSkuResponse: properties: + required: optional skus: optional> source: openapi: ../../../openapi/referenced-specs/v2.yml diff --git a/.mock/definition/scripts.yml b/.mock/definition/scripts.yml index 8236ed29..bf507a7f 100644 --- a/.mock/definition/scripts.yml +++ b/.mock/definition/scripts.yml @@ -9,23 +9,13 @@ service: method: GET auth: true docs: > - List of scripts registered to a Site. + Get a list of scripts that have been registered to a site. A site can + have a maximum of 800 registered scripts. - In order to use the Custom Code APIs for Sites and Pages, Custom Code - Scripts must first be registered - - to a Site via the `registered_scripts` endpoints, and then applied to a - Site or Page using the appropriate - - `custom_code` endpoints. - - Additionally, Scripts can be remotely hosted, or registered as inline - snippets. - - - Access to this endpoint requires a bearer token from a [Data - Client App](/data/docs/getting-started-data-clients). + + To apply a script to a site or page, the script must first be registered to a site via the [Register Script](/data/reference/custom-code/custom-code/register-hosted) endpoints. Once registered, the script can be applied to a Site or Page using the appropriate endpoints. See the documentation on [working with Custom Code](/data/docs/custom-code) for more information. + Required scope | `custom_code:read` @@ -80,25 +70,12 @@ service: path: /sites/{site_id}/registered_scripts/hosted method: POST auth: true - docs: > - Add a script to a Site's Custom Code registry. - - - In order to use the Custom Code APIs for Sites and Pages, Custom Code - Scripts must first be registered - - to a Site via the `registered_scripts` endpoints, and then applied to a - Site or Page using the appropriate - - `custom_code` endpoints. - - Additionally, Scripts can be remotely hosted, or registered as inline - snippets. - - - Access to this endpoint requires a bearer token from a [Data - Client App](/data/docs/getting-started-data-clients). + docs: | + Register a hosted script to a site. + + To apply a script to a site or page, the script must first be registered to a site via the [Register Script](/data/reference/custom-code/custom-code/register-hosted) endpoints. Once registered, the script can be applied to a Site or Page using the appropriate endpoints. See the documentation on [working with Custom Code](/data/docs/custom-code) for more information. + Required scope | `custom_code:write` source: @@ -168,21 +145,13 @@ service: method: POST auth: true docs: > - Add a script to a Site's Custom Code registry. Inline scripts can be - between 1 and 2000 characters. - - - In order to use the Custom Code APIs for Sites and Pages, Custom Code - Scripts must first be registered - - to a Site via the `registered_scripts` endpoints, and then applied to a - Site or Page using the appropriate - - `custom_code` endpoints. + Register an inline script to a site. Inline scripts are limited to 2000 + characters. - Access to this endpoint requires a bearer token from a [Data - Client App](/data/docs/getting-started-data-clients). + + To apply a script to a site or page, the script must first be registered to a site via the [Register Script](/data/reference/custom-code/custom-code/register-hosted) endpoints. Once registered, the script can be applied to a Site or Page using the appropriate endpoints. See the documentation on [working with Custom Code](/data/docs/custom-code) for more information. + Required scope | `custom_code:write` diff --git a/.mock/definition/sites.yml b/.mock/definition/sites.yml index cea89979..75ce7d39 100644 --- a/.mock/definition/sites.yml +++ b/.mock/definition/sites.yml @@ -8,8 +8,13 @@ service: path: /workspaces/{workspace_id}/sites method: POST auth: true - docs: | - Create a site. This endpoint requires an Enterprise workspace. + docs: > + Create a site. + + + This endpoint requires an Enterprise + workspace. + Required scope | `workspace:write` source: @@ -288,8 +293,13 @@ service: path: /sites/{site_id} method: DELETE auth: true - docs: | - Delete a site. This endpoint requires an Enterprise workspace. + docs: > + Delete a site. + + + This endpoint requires an Enterprise + workspace. + Required scope | `sites:write` source: @@ -313,8 +323,13 @@ service: path: /sites/{site_id} method: PATCH auth: true - docs: | - Update a site. This endpoint requires an Enterprise workspace. + docs: > + Update a site. + + + This endpoint requires an Enterprise + workspace. + Required scope | `sites:write` source: diff --git a/.mock/definition/sites/activityLogs.yml b/.mock/definition/sites/activityLogs.yml index 1468f52e..182384a8 100644 --- a/.mock/definition/sites/activityLogs.yml +++ b/.mock/definition/sites/activityLogs.yml @@ -8,9 +8,15 @@ service: path: /sites/{site_id}/activity_logs method: GET auth: true - docs: >- - Retrieve Activity Logs for a specific Site. Requires Site to be on an - Enterprise plan.

Required scope | `site_activity:read` + docs: > + Retrieve Activity Logs for a specific Site. + + + This endpoint requires an Enterprise + workspace. + + + Required scope: `site_activity:read` source: openapi: ../../../openapi/referenced-specs/v2.yml path-parameters: diff --git a/.mock/definition/sites/plans.yml b/.mock/definition/sites/plans.yml index ae9de6dc..d72210a6 100644 --- a/.mock/definition/sites/plans.yml +++ b/.mock/definition/sites/plans.yml @@ -8,9 +8,14 @@ service: path: /sites/{site_id}/plan method: GET auth: true - docs: | + docs: > Get site plan details for the specified Site. + + This endpoint requires an Enterprise + workspace. + + Required scope | `sites:read` source: openapi: ../../../openapi/referenced-specs/v2.yml diff --git a/.mock/definition/sites/redirects.yml b/.mock/definition/sites/redirects.yml index b104d865..7ded8da7 100644 --- a/.mock/definition/sites/redirects.yml +++ b/.mock/definition/sites/redirects.yml @@ -16,6 +16,9 @@ service: control how traffic is rerouted on your site. + This endpoint requires an Enterprise + workspace. + Required scope: `sites:read` source: @@ -64,6 +67,10 @@ service: restructuring URLs, or handling outdated links. + This endpoint requires an Enterprise + workspace. + + Required scope: `sites:write` source: openapi: ../../../openapi/referenced-specs/v2.yml @@ -103,10 +110,16 @@ service: docs: > Remove a URL redirection rule from a site. + This is useful for cleaning up outdated or unnecessary redirects, ensuring that your site's routing behavior remains efficient and up-to-date. + + This endpoint requires an Enterprise + workspace. + + Required scope: `sites:write` source: openapi: ../../../openapi/referenced-specs/v2.yml @@ -148,8 +161,14 @@ service: path: /sites/{site_id}/redirects/{redirect_id} method: PATCH auth: true - docs: | + docs: > Update a URL redirection rule from a site. + + + This endpoint requires an Enterprise + workspace. + + Required scope: `sites:write` source: openapi: ../../../openapi/referenced-specs/v2.yml diff --git a/.mock/definition/sites/scripts.yml b/.mock/definition/sites/scripts.yml index 92ad0e41..80535b11 100644 --- a/.mock/definition/sites/scripts.yml +++ b/.mock/definition/sites/scripts.yml @@ -8,13 +8,12 @@ service: path: /sites/{site_id}/custom_code method: GET auth: true - docs: > - Get all registered scripts that have been applied to a specific Site. - - - Access to this endpoint requires a bearer token from a [Data - Client App](/data/docs/getting-started-data-clients). + docs: | + Get all scripts applied to a site by the App. + + To apply a script to a site or page, the script must first be registered to a site via the [Register Script](/data/reference/custom-code/custom-code/register-hosted) endpoints. Once registered, the script can be applied to a Site or Page using the appropriate endpoints. See the documentation on [working with Custom Code](/data/docs/custom-code) for more information. + Required scope | `custom_code:read` source: @@ -55,22 +54,12 @@ service: path: /sites/{site_id}/custom_code method: PUT auth: true - docs: > - Add a registered script to a Site. - - - In order to use the Custom Code APIs for Sites and Pages, Custom Code - Scripts must first be registered - - to a Site via the `registered_scripts` endpoints, and then applied to a - Site or Page using the appropriate - - `custom_code` endpoints. - - - Access to this endpoint requires a bearer token from a [Data - Client App](/data/docs/getting-started-data-clients). + docs: | + Apply registered scripts to a site. + + To apply a script to a site or page, the script must first be registered to a site via the [Register Script](/data/reference/custom-code/custom-code/register-hosted) endpoints. Once registered, the script can be applied to a Site or Page using the appropriate endpoints. See the documentation on [working with Custom Code](/data/docs/custom-code) for more information. + Required scope | `custom_code:write` source: @@ -125,11 +114,8 @@ service: method: DELETE auth: true docs: > - Delete the custom code block that an app created for a Site - - - Access to this endpoint requires a bearer token from a [Data - Client App](/data/docs/getting-started-data-clients). + Remove scripts from a site applied by the App. This endpoint will not + remove scripts from the site's registered scripts. Required scope | `custom_code:write` @@ -154,11 +140,15 @@ service: method: GET auth: true docs: > - Get all instances of Custom Code applied to a Site or Pages. + Get a list of scripts that have been applied to a site and/or individual + pages. - Access to this endpoint requires a bearer token from a [Data - Client App](/data/docs/getting-started-data-clients). + + To apply a script to a site or page, the script must first be registered to a site via the [Register Script](/data/reference/custom-code/custom-code/register-hosted) endpoints. Once registered, the script can be applied to a Site or Page using the appropriate endpoints. + + See the documentation on [working with Custom Code](/data/docs/custom-code) for more information. + Required scope | `custom_code:read` diff --git a/.mock/definition/webhooks.yml b/.mock/definition/webhooks.yml index d40e3e4c..f31342ab 100644 --- a/.mock/definition/webhooks.yml +++ b/.mock/definition/webhooks.yml @@ -33,10 +33,6 @@ service: site_id: 580e63e98c9a982ac9b8b741 response: body: - pagination: - limit: 100 - offset: 0 - total: 100 webhooks: - id: 57ca0a9e418c504a6e1acbb6 triggerType: form_submission @@ -65,6 +61,10 @@ service: name: Email Form lastTriggered: '2023-02-08T23:59:28Z' createdOn: '2016-07-19T01:43:40Z' + pagination: + limit: 100 + offset: 0 + total: 100 create: path: /sites/{site_id}/webhooks method: POST diff --git a/package.json b/package.json index 47be4ea6..8a740615 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "webflow-api", - "version": "3.1.0", + "version": "3.1.1", "private": false, "repository": "https://github.com/webflow/js-webflow-api", "main": "./index.js", diff --git a/reference.md b/reference.md index 1779f435..6ac36daf 100644 --- a/reference.md +++ b/reference.md @@ -130,7 +130,9 @@ await client.token.introspect();
-Create a site. This endpoint requires an Enterprise workspace. +Create a site. + +This endpoint requires an Enterprise workspace. Required scope | `workspace:write` @@ -327,7 +329,9 @@ await client.sites.get("580e63e98c9a982ac9b8b741");
-Delete a site. This endpoint requires an Enterprise workspace. +Delete a site. + +This endpoint requires an Enterprise workspace. Required scope | `sites:write` @@ -392,7 +396,9 @@ await client.sites.delete("580e63e98c9a982ac9b8b741");
-Update a site. This endpoint requires an Enterprise workspace. +Update a site. + +This endpoint requires an Enterprise workspace. Required scope | `sites:write` @@ -1131,10 +1137,11 @@ await client.pages.updatePageSettings("63c720f9347c2139b248e552", {
-Get static content from a static page. This includes text nodes, image nodes and component instances. -To retrieve the contents of components in the page use the [get component content](/data/reference/pages-and-components/components/get-content) endpoint. +Get content from a static page. This includes text nodes, image nodes, and component instances with [property overrides](https://help.webflow.com/hc/en-us/articles/33961219350547-Component-properties#how-to-modify-property-values-on-component-instances). -If you do not provide a Locale ID in your request, the response will return any content that can be localized from the Primary locale. +To retrieve the static content of a component instance, use the [Get Component Content](/data/reference/pages-and-components/components/get-content) endpoint. + +If you do not include a `localeId` in your request, the response will return any content that can be localized from the Primary locale. Required scope | `pages:read` @@ -1592,9 +1599,9 @@ await client.components.updateContent("580e63e98c9a982ac9b8b741", "8505ba55-ef72
-Get the property default values of a component definition. +Get the default property values of a component definition. -If you do not provide a Locale ID in your request, the response will return any properties that can be localized from the Primary locale. +If you do not include a `localeId` in your request, the response will return any properties that can be localized from the Primary locale. Required scope | `components:read` @@ -1677,13 +1684,11 @@ await client.components.getProperties("580e63e98c9a982ac9b8b741", "8505ba55-ef72
-Update the property default values of a component definition in a specificed locale. - -Before making updates: +Update the default property values of a component definition in a specificed locale. -1. Use the [get component properties](/data/reference/pages-and-components/components/get-properties) endpoint to identify available properties +Before making updates, use the [get component properties](/data/reference/pages-and-components/components/get-properties) endpoint to identify properties that can be updated in a secondary locale. -The request requires a secondary locale ID. If a locale is missing, the request will not be processed and will result in an error. +The request requires a secondary locale ID. If a `localeId` is missing, the request will not be processed and will result in an error. Required scope | `components:write` @@ -1778,14 +1783,11 @@ await client.components.updateProperties("580e63e98c9a982ac9b8b741", "8505ba55-e
-List of scripts registered to a Site. +Get a list of scripts that have been registered to a site. A site can have a maximum of 800 registered scripts. -In order to use the Custom Code APIs for Sites and Pages, Custom Code Scripts must first be registered -to a Site via the `registered_scripts` endpoints, and then applied to a Site or Page using the appropriate -`custom_code` endpoints. -Additionally, Scripts can be remotely hosted, or registered as inline snippets. - -Access to this endpoint requires a bearer token from a [Data Client App](/data/docs/getting-started-data-clients). + + To apply a script to a site or page, the script must first be registered to a site via the [Register Script](/data/reference/custom-code/custom-code/register-hosted) endpoints. Once registered, the script can be applied to a Site or Page using the appropriate endpoints. See the documentation on [working with Custom Code](/data/docs/custom-code) for more information. + Required scope | `custom_code:read` @@ -1850,14 +1852,11 @@ await client.scripts.list("580e63e98c9a982ac9b8b741");
-Add a script to a Site's Custom Code registry. - -In order to use the Custom Code APIs for Sites and Pages, Custom Code Scripts must first be registered -to a Site via the `registered_scripts` endpoints, and then applied to a Site or Page using the appropriate -`custom_code` endpoints. -Additionally, Scripts can be remotely hosted, or registered as inline snippets. +Register a hosted script to a site. -Access to this endpoint requires a bearer token from a [Data Client App](/data/docs/getting-started-data-clients). + + To apply a script to a site or page, the script must first be registered to a site via the [Register Script](/data/reference/custom-code/custom-code/register-hosted) endpoints. Once registered, the script can be applied to a Site or Page using the appropriate endpoints. See the documentation on [working with Custom Code](/data/docs/custom-code) for more information. + Required scope | `custom_code:write` @@ -1935,13 +1934,11 @@ await client.scripts.registerHosted("580e63e98c9a982ac9b8b741", {
-Add a script to a Site's Custom Code registry. Inline scripts can be between 1 and 2000 characters. - -In order to use the Custom Code APIs for Sites and Pages, Custom Code Scripts must first be registered -to a Site via the `registered_scripts` endpoints, and then applied to a Site or Page using the appropriate -`custom_code` endpoints. +Register an inline script to a site. Inline scripts are limited to 2000 characters. -Access to this endpoint requires a bearer token from a [Data Client App](/data/docs/getting-started-data-clients). + + To apply a script to a site or page, the script must first be registered to a site via the [Register Script](/data/reference/custom-code/custom-code/register-hosted) endpoints. Once registered, the script can be applied to a Site or Page using the appropriate endpoints. See the documentation on [working with Custom Code](/data/docs/custom-code) for more information. + Required scope | `custom_code:write` @@ -2020,7 +2017,7 @@ await client.scripts.registerInline("580e63e98c9a982ac9b8b741", {
-List assets for a given site +List of assets uploaded to a site Required scope | `assets:read` @@ -2085,11 +2082,13 @@ await client.assets.list("580e63e98c9a982ac9b8b741");
-Create a new asset entry. +The first step in uploading an asset to a site. This endpoint generates a response with the following information: `uploadUrl` and `uploadDetails`. -You can use these two properties to [upload the file to Amazon s3 by making a POST](https://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectPOST.html) -request to the `uploadUrl` with the `uploadDetails` object as your header information in the request. + +Use these properties in the header of a [POST request to Amazson s3](https://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectPOST.html) to complete the upload. + +To learn more about how to upload assets to Webflow, see our [assets guide](/data/docs/working-with-assets). Required scope | `assets:write` @@ -2165,7 +2164,7 @@ await client.assets.create("580e63e98c9a982ac9b8b741", {
-Get an Asset +Get details about an asset Required scope | `assets:read` @@ -2295,7 +2294,7 @@ await client.assets.delete("580e63fc8c9a982ac9b8b745");
-Update an Asset +Update details of an Asset. Required scope | `assets:write` @@ -3120,6 +3119,71 @@ await client.forms.getSubmission("580e63e98c9a982ac9b8b741");
+
client.forms.deleteSubmission(formSubmissionId) -> void +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Delete a form submission + +Required scope | `forms:write` + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.forms.deleteSubmission("580e63e98c9a982ac9b8b741"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**formSubmissionId:** `string` — Unique identifier for a Form Submission + +
+
+ +
+
+ +**requestOptions:** `Forms.RequestOptions` + +
+
+
+
+ +
+
+
+
client.forms.updateSubmission(formSubmissionId, { ...params }) -> Webflow.FormSubmission
@@ -5270,7 +5334,7 @@ await client.collections.items.createItem("580e63fc8c9a982ac9b8b745", { Delete Items from a Collection. -**Note:** If the `cmsLocaleId` parameter is undefined or empty and the items are localized, items will be deleted only in the primary locale. +Items will only be deleted in the primary locale unless a `cmsLocaleId` is included in the request. Required scope | `CMS:write` @@ -5343,9 +5407,11 @@ await client.collections.items.deleteItems("580e63fc8c9a982ac9b8b745");
-Update a single item or multiple items (up to 100) in a Collection. +Update a single item or multiple items in a Collection. + +The limit for this endpoint is 100 items. -**Note:** If the `cmsLocaleId` parameter is undefined or empty and the items are localized, items will be updated only in the primary locale. +Items will only be updated in the primary locale, unless a `cmsLocaleId` is included in the request. Required scope | `CMS:write` @@ -5453,7 +5519,7 @@ await client.collections.items.updateItems("580e63fc8c9a982ac9b8b745", {
-List of all live Items within a Collection. +List all published items in a collection. Required scope | `CMS:read` @@ -5526,7 +5592,7 @@ await client.collections.items.listItemsLive("580e63fc8c9a982ac9b8b745");
-Create live Item(s) in a Collection. The Item(s) will be published to the live site. +Create item(s) in a collection that will be immediately published to the live site. To create items across multiple locales, [please use this endpoint.](/v2.0.0/data/reference/cms/collection-items/staged-items/create-items) @@ -5547,6 +5613,9 @@ Required scope | `CMS:write` ```typescript await client.collections.items.createItemLive("580e63fc8c9a982ac9b8b745", { + lastPublished: "2023-03-17T18:47:35.560Z", + lastUpdated: "2023-03-17T18:47:35.560Z", + createdOn: "2023-03-17T18:47:35.560Z", isArchived: false, isDraft: false, fieldData: { @@ -5608,9 +5677,11 @@ await client.collections.items.createItemLive("580e63fc8c9a982ac9b8b745", {
-Remove an item or multiple items (up to 100 items) from the live site. Deleting published items will unpublish the items from the live site and set them to draft. +Remove an item or multiple items (up to 100 items) from the live site. -**Note:** If the `cmsLocaleId` parameter is undefined or empty and the items are localized, items will be unpublished only in the primary locale. +Using this endpoint to delete published item(s) will unpublish the item(s) from the live site and set the item(s) `isDraft` property to `true`. + +Items will only be unpublished in the primary locale unless a `cmsLocaleId` is included in the request. Required scope | `CMS:write` @@ -5683,9 +5754,9 @@ await client.collections.items.deleteItemsLive("580e63fc8c9a982ac9b8b745");
-Update a single live item or multiple live items (up to 100) in a Collection +Update a single published item or multiple published items (up to 100) in a Collection -**Note:** If the `cmsLocaleId` parameter is undefined or empty and the items are localized, items will be updated only in the primary locale. +Items will only be updated in the primary locale, unless a `cmsLocaleId` is included in the request. Required scope | `CMS:write` @@ -5795,10 +5866,10 @@ await client.collections.items.updateItemsLive("580e63fc8c9a982ac9b8b745", { Create an item or multiple items in a CMS Collection across multiple corresponding locales. -**Notes:** - -- This endpoint can create up to 100 items in a request. -- If the `cmsLocaleIds` parameter is undefined or empty and localization is enabled, items will only be created in the primary locale. + + - This endpoint can create up to 100 items in a request. + - If the `cmsLocaleIds` parameter is not included in the request, an item will only be created in the primary locale. + Required scope | `CMS:write` @@ -5960,7 +6031,7 @@ await client.collections.items.getItem("580e63fc8c9a982ac9b8b745", "580e64008c9a
-Delete an Item from a Collection. This endpoint does not currently support bulk deletion. +Delete an item from a collection. Required scope | `CMS:write` @@ -6458,13 +6529,7 @@ await client.collections.items.publishItem("580e63fc8c9a982ac9b8b745", {
-Get all registered scripts that have been applied to a specific Page. - -In order to use the Custom Code APIs for Sites and Pages, Custom Code Scripts must first be registered -to a Site via the `registered_scripts` endpoints, and then applied to a Site or Page using the appropriate -`custom_code` endpoints. - -Access to this endpoint requires a bearer token from a [Data Client App](/data/docs/getting-started-data-clients). +Get all scripts applied to a page. Required scope | `custom_code:read` @@ -6529,15 +6594,11 @@ await client.pages.scripts.getCustomCode("63c720f9347c2139b248e552");
-Add a registered script to a Page. +Apply scripts to a page. -In order to use the Custom Code APIs for Sites and Pages, Custom Code Scripts must first be registered -to a Site via the `registered_scripts` endpoints, and then applied to a Site or Page using the appropriate -`custom_code` endpoints. - -A site can have a maximum of 800 registered scripts. - -Access to this endpoint requires a bearer token from a [Data Client App](/data/docs/getting-started-data-clients). + + To apply a script to a page, the script must first be registered to a Site via the [Register Script](/data/reference/custom-code/custom-code/register-hosted) endpoints. Once registered, the script can be applied to a Site or Page using the appropriate endpoints. See the documentation on [working with Custom Code](/data/docs/custom-code) for more information. + Required scope | `custom_code:write` @@ -6626,11 +6687,7 @@ await client.pages.scripts.upsertCustomCode("63c720f9347c2139b248e552", {
-Delete the custom code block that an app has created for a page - -In order to use the Custom Code APIs for Sites and Pages, Custom Code Scripts must first be registered -to a Site via the `registered_scripts` endpoints, and then applied to a Site or Page using the appropriate -`custom_code` endpoints. +Delete a custom code block that the App created on a page. Access to this endpoint requires a bearer token from a [Data Client App](/data/docs/getting-started-data-clients). @@ -6703,6 +6760,8 @@ Fetch a list of all URL redirect rules configured for a specific site. Use this endpoint to review, audit, or manage the redirection rules that control how traffic is rerouted on your site. +This endpoint requires an Enterprise workspace. + Required scope: `sites:read`
@@ -6770,6 +6829,8 @@ Add a new URL redirection rule to a site. This endpoint allows you to define a source path (`fromUrl`) and its corresponding destination path (`toUrl`), which will dictate how traffic is rerouted on your site. This is useful for managing site changes, restructuring URLs, or handling outdated links. +This endpoint requires an Enterprise workspace. + Required scope: `sites:write`
@@ -6846,7 +6907,11 @@ await client.sites.redirects.create("580e63e98c9a982ac9b8b741", {
Remove a URL redirection rule from a site. + This is useful for cleaning up outdated or unnecessary redirects, ensuring that your site's routing behavior remains efficient and up-to-date. + +This endpoint requires an Enterprise workspace. + Required scope: `sites:write`
@@ -6919,6 +6984,9 @@ await client.sites.redirects.delete("580e63e98c9a982ac9b8b741", "66c4cb9a20cac35
Update a URL redirection rule from a site. + +This endpoint requires an Enterprise workspace. + Required scope: `sites:write`
@@ -7006,6 +7074,8 @@ await client.sites.redirects.update("580e63e98c9a982ac9b8b741", "66c4cb9a20cac35 Get site plan details for the specified Site. +This endpoint requires an Enterprise workspace. + Required scope | `sites:read`
@@ -7071,7 +7141,11 @@ await client.sites.plans.getSitePlan("580e63e98c9a982ac9b8b741");
-Retrieve Activity Logs for a specific Site. Requires Site to be on an Enterprise plan.

Required scope | `site_activity:read` +Retrieve Activity Logs for a specific Site. + +This endpoint requires an Enterprise workspace. + +Required scope: `site_activity:read`
@@ -7144,9 +7218,11 @@ await client.sites.activityLogs.list("580e63e98c9a982ac9b8b741");
-Get all registered scripts that have been applied to a specific Site. +Get all scripts applied to a site by the App. -Access to this endpoint requires a bearer token from a [Data Client App](/data/docs/getting-started-data-clients). + + To apply a script to a site or page, the script must first be registered to a site via the [Register Script](/data/reference/custom-code/custom-code/register-hosted) endpoints. Once registered, the script can be applied to a Site or Page using the appropriate endpoints. See the documentation on [working with Custom Code](/data/docs/custom-code) for more information. + Required scope | `custom_code:read` @@ -7211,13 +7287,11 @@ await client.sites.scripts.getCustomCode("580e63e98c9a982ac9b8b741");
-Add a registered script to a Site. +Apply registered scripts to a site. -In order to use the Custom Code APIs for Sites and Pages, Custom Code Scripts must first be registered -to a Site via the `registered_scripts` endpoints, and then applied to a Site or Page using the appropriate -`custom_code` endpoints. - -Access to this endpoint requires a bearer token from a [Data Client App](/data/docs/getting-started-data-clients). + + To apply a script to a site or page, the script must first be registered to a site via the [Register Script](/data/reference/custom-code/custom-code/register-hosted) endpoints. Once registered, the script can be applied to a Site or Page using the appropriate endpoints. See the documentation on [working with Custom Code](/data/docs/custom-code) for more information. + Required scope | `custom_code:write` @@ -7306,9 +7380,7 @@ await client.sites.scripts.upsertCustomCode("580e63e98c9a982ac9b8b741", {
-Delete the custom code block that an app created for a Site - -Access to this endpoint requires a bearer token from a [Data Client App](/data/docs/getting-started-data-clients). +Remove scripts from a site applied by the App. This endpoint will not remove scripts from the site's registered scripts. Required scope | `custom_code:write` @@ -7373,9 +7445,13 @@ await client.sites.scripts.deleteCustomCode("580e63e98c9a982ac9b8b741");
-Get all instances of Custom Code applied to a Site or Pages. +Get a list of scripts that have been applied to a site and/or individual pages. -Access to this endpoint requires a bearer token from a [Data Client App](/data/docs/getting-started-data-clients). + + To apply a script to a site or page, the script must first be registered to a site via the [Register Script](/data/reference/custom-code/custom-code/register-hosted) endpoints. Once registered, the script can be applied to a Site or Page using the appropriate endpoints. + + See the documentation on [working with Custom Code](/data/docs/custom-code) for more information. + Required scope | `custom_code:read` diff --git a/src/api/resources/accessGroups/client/Client.ts b/src/api/resources/accessGroups/client/Client.ts index 9dd71ce2..715e0d3f 100644 --- a/src/api/resources/accessGroups/client/Client.ts +++ b/src/api/resources/accessGroups/client/Client.ts @@ -78,8 +78,8 @@ export class AccessGroups { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "3.1.0", - "User-Agent": "webflow-api/3.1.0", + "X-Fern-SDK-Version": "3.1.1", + "User-Agent": "webflow-api/3.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, diff --git a/src/api/resources/assets/client/Client.ts b/src/api/resources/assets/client/Client.ts index 5e0b591a..c048c471 100644 --- a/src/api/resources/assets/client/Client.ts +++ b/src/api/resources/assets/client/Client.ts @@ -34,7 +34,7 @@ export class Assets { constructor(protected readonly _options: Assets.Options) {} /** - * List assets for a given site + * List of assets uploaded to a site * * Required scope | `assets:read` * @@ -61,8 +61,8 @@ export class Assets { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "3.1.0", - "User-Agent": "webflow-api/3.1.0", + "X-Fern-SDK-Version": "3.1.1", + "User-Agent": "webflow-api/3.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -151,15 +151,18 @@ export class Assets { } /** - * Create a new asset entry. + * The first step in uploading an asset to a site. * * * This endpoint generates a response with the following information: `uploadUrl` and `uploadDetails`. - * You can use these two properties to [upload the file to Amazon s3 by making a POST](https://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectPOST.html) - * request to the `uploadUrl` with the `uploadDetails` object as your header information in the request. * * - * Required scope | `assets:write` + * Use these properties in the header of a [POST request to Amazson s3](https://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectPOST.html) to complete the upload. + * + * + * To learn more about how to upload assets to Webflow, see our [assets guide](/data/docs/working-with-assets). + * + * Required scope | `assets:write` * * @param {string} siteId - Unique identifier for a Site * @param {Webflow.AssetsCreateRequest} request @@ -192,8 +195,8 @@ export class Assets { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "3.1.0", - "User-Agent": "webflow-api/3.1.0", + "X-Fern-SDK-Version": "3.1.1", + "User-Agent": "webflow-api/3.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -287,7 +290,7 @@ export class Assets { } /** - * Get an Asset + * Get details about an asset * * Required scope | `assets:read` * @@ -314,8 +317,8 @@ export class Assets { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "3.1.0", - "User-Agent": "webflow-api/3.1.0", + "X-Fern-SDK-Version": "3.1.1", + "User-Agent": "webflow-api/3.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -431,8 +434,8 @@ export class Assets { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "3.1.0", - "User-Agent": "webflow-api/3.1.0", + "X-Fern-SDK-Version": "3.1.1", + "User-Agent": "webflow-api/3.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -515,7 +518,7 @@ export class Assets { } /** - * Update an Asset + * Update details of an Asset. * * Required scope | `assets:write` * @@ -547,8 +550,8 @@ export class Assets { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "3.1.0", - "User-Agent": "webflow-api/3.1.0", + "X-Fern-SDK-Version": "3.1.1", + "User-Agent": "webflow-api/3.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -669,8 +672,8 @@ export class Assets { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "3.1.0", - "User-Agent": "webflow-api/3.1.0", + "X-Fern-SDK-Version": "3.1.1", + "User-Agent": "webflow-api/3.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -795,8 +798,8 @@ export class Assets { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "3.1.0", - "User-Agent": "webflow-api/3.1.0", + "X-Fern-SDK-Version": "3.1.1", + "User-Agent": "webflow-api/3.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -922,8 +925,8 @@ export class Assets { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "3.1.0", - "User-Agent": "webflow-api/3.1.0", + "X-Fern-SDK-Version": "3.1.1", + "User-Agent": "webflow-api/3.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, diff --git a/src/api/resources/collections/client/Client.ts b/src/api/resources/collections/client/Client.ts index b9d4c44d..9a8be83d 100644 --- a/src/api/resources/collections/client/Client.ts +++ b/src/api/resources/collections/client/Client.ts @@ -63,8 +63,8 @@ export class Collections { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "3.1.0", - "User-Agent": "webflow-api/3.1.0", + "X-Fern-SDK-Version": "3.1.1", + "User-Agent": "webflow-api/3.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -189,8 +189,8 @@ export class Collections { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "3.1.0", - "User-Agent": "webflow-api/3.1.0", + "X-Fern-SDK-Version": "3.1.1", + "User-Agent": "webflow-api/3.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -313,8 +313,8 @@ export class Collections { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "3.1.0", - "User-Agent": "webflow-api/3.1.0", + "X-Fern-SDK-Version": "3.1.1", + "User-Agent": "webflow-api/3.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -430,8 +430,8 @@ export class Collections { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "3.1.0", - "User-Agent": "webflow-api/3.1.0", + "X-Fern-SDK-Version": "3.1.1", + "User-Agent": "webflow-api/3.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, diff --git a/src/api/resources/collections/resources/fields/client/Client.ts b/src/api/resources/collections/resources/fields/client/Client.ts index 55cb19eb..05404d1c 100644 --- a/src/api/resources/collections/resources/fields/client/Client.ts +++ b/src/api/resources/collections/resources/fields/client/Client.ts @@ -75,8 +75,8 @@ export class Fields { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "3.1.0", - "User-Agent": "webflow-api/3.1.0", + "X-Fern-SDK-Version": "3.1.1", + "User-Agent": "webflow-api/3.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -200,8 +200,8 @@ export class Fields { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "3.1.0", - "User-Agent": "webflow-api/3.1.0", + "X-Fern-SDK-Version": "3.1.1", + "User-Agent": "webflow-api/3.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -324,8 +324,8 @@ export class Fields { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "3.1.0", - "User-Agent": "webflow-api/3.1.0", + "X-Fern-SDK-Version": "3.1.1", + "User-Agent": "webflow-api/3.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, diff --git a/src/api/resources/collections/resources/items/client/Client.ts b/src/api/resources/collections/resources/items/client/Client.ts index 24db1b53..94e93aff 100644 --- a/src/api/resources/collections/resources/items/client/Client.ts +++ b/src/api/resources/collections/resources/items/client/Client.ts @@ -93,8 +93,8 @@ export class Items { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "3.1.0", - "User-Agent": "webflow-api/3.1.0", + "X-Fern-SDK-Version": "3.1.1", + "User-Agent": "webflow-api/3.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -247,8 +247,8 @@ export class Items { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "3.1.0", - "User-Agent": "webflow-api/3.1.0", + "X-Fern-SDK-Version": "3.1.1", + "User-Agent": "webflow-api/3.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -346,7 +346,7 @@ export class Items { /** * Delete Items from a Collection. * - * **Note:** If the `cmsLocaleId` parameter is undefined or empty and the items are localized, items will be deleted only in the primary locale. + * Items will only be deleted in the primary locale unless a `cmsLocaleId` is included in the request. * * Required scope | `CMS:write` * @@ -379,8 +379,8 @@ export class Items { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "3.1.0", - "User-Agent": "webflow-api/3.1.0", + "X-Fern-SDK-Version": "3.1.1", + "User-Agent": "webflow-api/3.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -472,9 +472,11 @@ export class Items { } /** - * Update a single item or multiple items (up to 100) in a Collection. + * Update a single item or multiple items in a Collection. * - * **Note:** If the `cmsLocaleId` parameter is undefined or empty and the items are localized, items will be updated only in the primary locale. + * The limit for this endpoint is 100 items. + * + * Items will only be updated in the primary locale, unless a `cmsLocaleId` is included in the request. * * Required scope | `CMS:write` * @@ -557,8 +559,8 @@ export class Items { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "3.1.0", - "User-Agent": "webflow-api/3.1.0", + "X-Fern-SDK-Version": "3.1.1", + "User-Agent": "webflow-api/3.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -654,7 +656,7 @@ export class Items { } /** - * List of all live Items within a Collection. + * List all published items in a collection. * * Required scope | `CMS:read` * @@ -716,8 +718,8 @@ export class Items { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "3.1.0", - "User-Agent": "webflow-api/3.1.0", + "X-Fern-SDK-Version": "3.1.1", + "User-Agent": "webflow-api/3.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -809,7 +811,7 @@ export class Items { } /** - * Create live Item(s) in a Collection. The Item(s) will be published to the live site. + * Create item(s) in a collection that will be immediately published to the live site. * * * To create items across multiple locales, [please use this endpoint.](/v2.0.0/data/reference/cms/collection-items/staged-items/create-items) @@ -829,6 +831,9 @@ export class Items { * * @example * await client.collections.items.createItemLive("580e63fc8c9a982ac9b8b745", { + * lastPublished: "2023-03-17T18:47:35.560Z", + * lastUpdated: "2023-03-17T18:47:35.560Z", + * createdOn: "2023-03-17T18:47:35.560Z", * isArchived: false, * isDraft: false, * fieldData: { @@ -840,6 +845,9 @@ export class Items { * @example * await client.collections.items.createItemLive("580e63fc8c9a982ac9b8b745", { * items: [{ + * lastPublished: "2023-03-17T18:47:35.560Z", + * lastUpdated: "2023-03-17T18:47:35.560Z", + * createdOn: "2023-03-17T18:47:35.560Z", * isArchived: false, * isDraft: false, * fieldData: { @@ -847,6 +855,9 @@ export class Items { * slug: "senior-data-analyst" * } * }, { + * lastPublished: "2023-03-17T18:47:35.560Z", + * lastUpdated: "2023-03-17T18:47:35.560Z", + * createdOn: "2023-03-17T18:47:35.560Z", * isArchived: false, * isDraft: false, * fieldData: { @@ -871,8 +882,8 @@ export class Items { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "3.1.0", - "User-Agent": "webflow-api/3.1.0", + "X-Fern-SDK-Version": "3.1.1", + "User-Agent": "webflow-api/3.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -968,9 +979,11 @@ export class Items { } /** - * Remove an item or multiple items (up to 100 items) from the live site. Deleting published items will unpublish the items from the live site and set them to draft. + * Remove an item or multiple items (up to 100 items) from the live site. + * + * Using this endpoint to delete published item(s) will unpublish the item(s) from the live site and set the item(s) `isDraft` property to `true`. * - * **Note:** If the `cmsLocaleId` parameter is undefined or empty and the items are localized, items will be unpublished only in the primary locale. + * Items will only be unpublished in the primary locale unless a `cmsLocaleId` is included in the request. * * Required scope | `CMS:write` * @@ -1002,8 +1015,8 @@ export class Items { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "3.1.0", - "User-Agent": "webflow-api/3.1.0", + "X-Fern-SDK-Version": "3.1.1", + "User-Agent": "webflow-api/3.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -1093,9 +1106,9 @@ export class Items { } /** - * Update a single live item or multiple live items (up to 100) in a Collection + * Update a single published item or multiple published items (up to 100) in a Collection * - * **Note:** If the `cmsLocaleId` parameter is undefined or empty and the items are localized, items will be updated only in the primary locale. + * Items will only be updated in the primary locale, unless a `cmsLocaleId` is included in the request. * * Required scope | `CMS:write` * @@ -1106,6 +1119,7 @@ export class Items { * @throws {@link Webflow.BadRequestError} * @throws {@link Webflow.UnauthorizedError} * @throws {@link Webflow.NotFoundError} + * @throws {@link Webflow.ConflictError} * @throws {@link Webflow.TooManyRequestsError} * @throws {@link Webflow.InternalServerError} * @@ -1178,8 +1192,8 @@ export class Items { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "3.1.0", - "User-Agent": "webflow-api/3.1.0", + "X-Fern-SDK-Version": "3.1.1", + "User-Agent": "webflow-api/3.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -1229,6 +1243,8 @@ export class Items { breadcrumbsPrefix: ["response"], }) ); + case 409: + throw new Webflow.ConflictError(_response.error.body); case 429: throw new Webflow.TooManyRequestsError( serializers.Error_.parseOrThrow(_response.error.body, { @@ -1277,9 +1293,10 @@ export class Items { /** * Create an item or multiple items in a CMS Collection across multiple corresponding locales. * - * **Notes:** + * * - This endpoint can create up to 100 items in a request. - * - If the `cmsLocaleIds` parameter is undefined or empty and localization is enabled, items will only be created in the primary locale. + * - If the `cmsLocaleIds` parameter is not included in the request, an item will only be created in the primary locale. + * * * Required scope | `CMS:write` * @@ -1333,8 +1350,8 @@ export class Items { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "3.1.0", - "User-Agent": "webflow-api/3.1.0", + "X-Fern-SDK-Version": "3.1.1", + "User-Agent": "webflow-api/3.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -1470,8 +1487,8 @@ export class Items { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "3.1.0", - "User-Agent": "webflow-api/3.1.0", + "X-Fern-SDK-Version": "3.1.1", + "User-Agent": "webflow-api/3.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -1563,7 +1580,7 @@ export class Items { } /** - * Delete an Item from a Collection. This endpoint does not currently support bulk deletion. + * Delete an item from a collection. * * Required scope | `CMS:write` * @@ -1603,8 +1620,8 @@ export class Items { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "3.1.0", - "User-Agent": "webflow-api/3.1.0", + "X-Fern-SDK-Version": "3.1.1", + "User-Agent": "webflow-api/3.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -1731,8 +1748,8 @@ export class Items { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "3.1.0", - "User-Agent": "webflow-api/3.1.0", + "X-Fern-SDK-Version": "3.1.1", + "User-Agent": "webflow-api/3.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -1868,8 +1885,8 @@ export class Items { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "3.1.0", - "User-Agent": "webflow-api/3.1.0", + "X-Fern-SDK-Version": "3.1.1", + "User-Agent": "webflow-api/3.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -2003,8 +2020,8 @@ export class Items { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "3.1.0", - "User-Agent": "webflow-api/3.1.0", + "X-Fern-SDK-Version": "3.1.1", + "User-Agent": "webflow-api/3.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -2102,6 +2119,7 @@ export class Items { * @throws {@link Webflow.BadRequestError} * @throws {@link Webflow.UnauthorizedError} * @throws {@link Webflow.NotFoundError} + * @throws {@link Webflow.ConflictError} * @throws {@link Webflow.TooManyRequestsError} * @throws {@link Webflow.InternalServerError} * @@ -2131,8 +2149,8 @@ export class Items { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "3.1.0", - "User-Agent": "webflow-api/3.1.0", + "X-Fern-SDK-Version": "3.1.1", + "User-Agent": "webflow-api/3.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -2182,6 +2200,8 @@ export class Items { breadcrumbsPrefix: ["response"], }) ); + case 409: + throw new Webflow.ConflictError(_response.error.body); case 429: throw new Webflow.TooManyRequestsError( serializers.Error_.parseOrThrow(_response.error.body, { @@ -2263,8 +2283,8 @@ export class Items { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "3.1.0", - "User-Agent": "webflow-api/3.1.0", + "X-Fern-SDK-Version": "3.1.1", + "User-Agent": "webflow-api/3.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, diff --git a/src/api/resources/collections/resources/items/client/requests/ItemsListItemsLiveRequest.ts b/src/api/resources/collections/resources/items/client/requests/ItemsListItemsLiveRequest.ts index 08127115..82374cf0 100644 --- a/src/api/resources/collections/resources/items/client/requests/ItemsListItemsLiveRequest.ts +++ b/src/api/resources/collections/resources/items/client/requests/ItemsListItemsLiveRequest.ts @@ -22,11 +22,11 @@ export interface ItemsListItemsLiveRequest { */ limit?: number; /** - * The name of the item(s) + * Filter by the exact name of the item(s) */ name?: string; /** - * The slug of the item + * Filter by the exact slug of the item */ slug?: string; /** diff --git a/src/api/resources/collections/resources/items/client/requests/ItemsListItemsRequest.ts b/src/api/resources/collections/resources/items/client/requests/ItemsListItemsRequest.ts index c4f1a1f0..32ad4351 100644 --- a/src/api/resources/collections/resources/items/client/requests/ItemsListItemsRequest.ts +++ b/src/api/resources/collections/resources/items/client/requests/ItemsListItemsRequest.ts @@ -22,11 +22,11 @@ export interface ItemsListItemsRequest { */ limit?: number; /** - * The name of the item(s) + * Filter by the exact name of the item(s) */ name?: string; /** - * The slug of the item + * Filter by the exact slug of the item */ slug?: string; /** diff --git a/src/api/resources/components/client/Client.ts b/src/api/resources/components/client/Client.ts index cadf8c75..7135aa46 100644 --- a/src/api/resources/components/client/Client.ts +++ b/src/api/resources/components/client/Client.ts @@ -73,8 +73,8 @@ export class Components { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "3.1.0", - "User-Agent": "webflow-api/3.1.0", + "X-Fern-SDK-Version": "3.1.1", + "User-Agent": "webflow-api/3.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -217,8 +217,8 @@ export class Components { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "3.1.0", - "User-Agent": "webflow-api/3.1.0", + "X-Fern-SDK-Version": "3.1.1", + "User-Agent": "webflow-api/3.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -377,8 +377,8 @@ export class Components { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "3.1.0", - "User-Agent": "webflow-api/3.1.0", + "X-Fern-SDK-Version": "3.1.1", + "User-Agent": "webflow-api/3.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -477,9 +477,9 @@ export class Components { } /** - * Get the property default values of a component definition. + * Get the default property values of a component definition. * - * If you do not provide a Locale ID in your request, the response will return any properties that can be localized from the Primary locale. + * If you do not include a `localeId` in your request, the response will return any properties that can be localized from the Primary locale. * * Required scope | `components:read` * @@ -529,8 +529,8 @@ export class Components { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "3.1.0", - "User-Agent": "webflow-api/3.1.0", + "X-Fern-SDK-Version": "3.1.1", + "User-Agent": "webflow-api/3.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -622,12 +622,11 @@ export class Components { } /** - * Update the property default values of a component definition in a specificed locale. + * Update the default property values of a component definition in a specificed locale. * - * Before making updates: - * 1. Use the [get component properties](/data/reference/pages-and-components/components/get-properties) endpoint to identify available properties + * Before making updates, use the [get component properties](/data/reference/pages-and-components/components/get-properties) endpoint to identify properties that can be updated in a secondary locale. * - * The request requires a secondary locale ID. If a locale is missing, the request will not be processed and will result in an error. + * The request requires a secondary locale ID. If a `localeId` is missing, the request will not be processed and will result in an error. * * Required scope | `components:write` * @@ -676,8 +675,8 @@ export class Components { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "3.1.0", - "User-Agent": "webflow-api/3.1.0", + "X-Fern-SDK-Version": "3.1.1", + "User-Agent": "webflow-api/3.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, diff --git a/src/api/resources/ecommerce/client/Client.ts b/src/api/resources/ecommerce/client/Client.ts index f9ab600f..0ead87cc 100644 --- a/src/api/resources/ecommerce/client/Client.ts +++ b/src/api/resources/ecommerce/client/Client.ts @@ -63,8 +63,8 @@ export class Ecommerce { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "3.1.0", - "User-Agent": "webflow-api/3.1.0", + "X-Fern-SDK-Version": "3.1.1", + "User-Agent": "webflow-api/3.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, diff --git a/src/api/resources/forms/client/Client.ts b/src/api/resources/forms/client/Client.ts index 3fce3937..183dbd5e 100644 --- a/src/api/resources/forms/client/Client.ts +++ b/src/api/resources/forms/client/Client.ts @@ -78,8 +78,8 @@ export class Forms { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "3.1.0", - "User-Agent": "webflow-api/3.1.0", + "X-Fern-SDK-Version": "3.1.1", + "User-Agent": "webflow-api/3.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -201,8 +201,8 @@ export class Forms { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "3.1.0", - "User-Agent": "webflow-api/3.1.0", + "X-Fern-SDK-Version": "3.1.1", + "User-Agent": "webflow-api/3.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -336,8 +336,8 @@ export class Forms { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "3.1.0", - "User-Agent": "webflow-api/3.1.0", + "X-Fern-SDK-Version": "3.1.1", + "User-Agent": "webflow-api/3.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -460,8 +460,8 @@ export class Forms { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "3.1.0", - "User-Agent": "webflow-api/3.1.0", + "X-Fern-SDK-Version": "3.1.1", + "User-Agent": "webflow-api/3.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -553,6 +553,126 @@ export class Forms { } } + /** + * Delete a form submission + * + * + * Required scope | `forms:write` + * + * @param {string} formSubmissionId - Unique identifier for a Form Submission + * @param {Forms.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Webflow.BadRequestError} + * @throws {@link Webflow.UnauthorizedError} + * @throws {@link Webflow.ForbiddenError} + * @throws {@link Webflow.NotFoundError} + * @throws {@link Webflow.ConflictError} + * @throws {@link Webflow.TooManyRequestsError} + * @throws {@link Webflow.InternalServerError} + * + * @example + * await client.forms.deleteSubmission("580e63e98c9a982ac9b8b741") + */ + public async deleteSubmission(formSubmissionId: string, requestOptions?: Forms.RequestOptions): Promise { + const _response = await core.fetcher({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + `form_submissions/${encodeURIComponent(formSubmissionId)}` + ), + method: "DELETE", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "webflow-api", + "X-Fern-SDK-Version": "3.1.1", + "User-Agent": "webflow-api/3.1.1", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, + }, + contentType: "application/json", + requestType: "json", + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return; + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 400: + throw new Webflow.BadRequestError(_response.error.body); + case 401: + throw new Webflow.UnauthorizedError( + serializers.Error_.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 403: + throw new Webflow.ForbiddenError(_response.error.body); + case 404: + throw new Webflow.NotFoundError( + serializers.Error_.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 409: + throw new Webflow.ConflictError(_response.error.body); + case 429: + throw new Webflow.TooManyRequestsError( + serializers.Error_.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 500: + throw new Webflow.InternalServerError( + serializers.Error_.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + default: + throw new errors.WebflowError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.WebflowError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.WebflowTimeoutError( + "Timeout exceeded when calling DELETE /form_submissions/{form_submission_id}." + ); + case "unknown": + throw new errors.WebflowError({ + message: _response.error.errorMessage, + }); + } + } + /** * Update hidden fields on a form submission * @@ -588,8 +708,8 @@ export class Forms { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "3.1.0", - "User-Agent": "webflow-api/3.1.0", + "X-Fern-SDK-Version": "3.1.1", + "User-Agent": "webflow-api/3.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, diff --git a/src/api/resources/inventory/client/Client.ts b/src/api/resources/inventory/client/Client.ts index 16cfd35c..864cb36f 100644 --- a/src/api/resources/inventory/client/Client.ts +++ b/src/api/resources/inventory/client/Client.ts @@ -68,8 +68,8 @@ export class Inventory { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "3.1.0", - "User-Agent": "webflow-api/3.1.0", + "X-Fern-SDK-Version": "3.1.1", + "User-Agent": "webflow-api/3.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -206,8 +206,8 @@ export class Inventory { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "3.1.0", - "User-Agent": "webflow-api/3.1.0", + "X-Fern-SDK-Version": "3.1.1", + "User-Agent": "webflow-api/3.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, diff --git a/src/api/resources/orders/client/Client.ts b/src/api/resources/orders/client/Client.ts index 58d80693..e618dd83 100644 --- a/src/api/resources/orders/client/Client.ts +++ b/src/api/resources/orders/client/Client.ts @@ -82,8 +82,8 @@ export class Orders { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "3.1.0", - "User-Agent": "webflow-api/3.1.0", + "X-Fern-SDK-Version": "3.1.1", + "User-Agent": "webflow-api/3.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -208,8 +208,8 @@ export class Orders { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "3.1.0", - "User-Agent": "webflow-api/3.1.0", + "X-Fern-SDK-Version": "3.1.1", + "User-Agent": "webflow-api/3.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -342,8 +342,8 @@ export class Orders { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "3.1.0", - "User-Agent": "webflow-api/3.1.0", + "X-Fern-SDK-Version": "3.1.1", + "User-Agent": "webflow-api/3.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -479,8 +479,8 @@ export class Orders { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "3.1.0", - "User-Agent": "webflow-api/3.1.0", + "X-Fern-SDK-Version": "3.1.1", + "User-Agent": "webflow-api/3.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -614,8 +614,8 @@ export class Orders { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "3.1.0", - "User-Agent": "webflow-api/3.1.0", + "X-Fern-SDK-Version": "3.1.1", + "User-Agent": "webflow-api/3.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -747,8 +747,8 @@ export class Orders { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "3.1.0", - "User-Agent": "webflow-api/3.1.0", + "X-Fern-SDK-Version": "3.1.1", + "User-Agent": "webflow-api/3.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, diff --git a/src/api/resources/pages/client/Client.ts b/src/api/resources/pages/client/Client.ts index f54b5455..5a786c26 100644 --- a/src/api/resources/pages/client/Client.ts +++ b/src/api/resources/pages/client/Client.ts @@ -83,8 +83,8 @@ export class Pages { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "3.1.0", - "User-Agent": "webflow-api/3.1.0", + "X-Fern-SDK-Version": "3.1.1", + "User-Agent": "webflow-api/3.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -214,8 +214,8 @@ export class Pages { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "3.1.0", - "User-Agent": "webflow-api/3.1.0", + "X-Fern-SDK-Version": "3.1.1", + "User-Agent": "webflow-api/3.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -369,8 +369,8 @@ export class Pages { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "3.1.0", - "User-Agent": "webflow-api/3.1.0", + "X-Fern-SDK-Version": "3.1.1", + "User-Agent": "webflow-api/3.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -465,10 +465,11 @@ export class Pages { } /** - * Get static content from a static page. This includes text nodes, image nodes and component instances. - * To retrieve the contents of components in the page use the [get component content](/data/reference/pages-and-components/components/get-content) endpoint. + * Get content from a static page. This includes text nodes, image nodes, and component instances with [property overrides](https://help.webflow.com/hc/en-us/articles/33961219350547-Component-properties#how-to-modify-property-values-on-component-instances). * - * If you do not provide a Locale ID in your request, the response will return any content that can be localized from the Primary locale. + * To retrieve the static content of a component instance, use the [Get Component Content](/data/reference/pages-and-components/components/get-content) endpoint. + * + * If you do not include a `localeId` in your request, the response will return any content that can be localized from the Primary locale. * * Required scope | `pages:read` * @@ -517,8 +518,8 @@ export class Pages { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "3.1.0", - "User-Agent": "webflow-api/3.1.0", + "X-Fern-SDK-Version": "3.1.1", + "User-Agent": "webflow-api/3.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -672,8 +673,8 @@ export class Pages { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "3.1.0", - "User-Agent": "webflow-api/3.1.0", + "X-Fern-SDK-Version": "3.1.1", + "User-Agent": "webflow-api/3.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, diff --git a/src/api/resources/pages/resources/scripts/client/Client.ts b/src/api/resources/pages/resources/scripts/client/Client.ts index d8285336..59d9db00 100644 --- a/src/api/resources/pages/resources/scripts/client/Client.ts +++ b/src/api/resources/pages/resources/scripts/client/Client.ts @@ -31,13 +31,7 @@ export class Scripts { constructor(protected readonly _options: Scripts.Options) {} /** - * Get all registered scripts that have been applied to a specific Page. - * - * In order to use the Custom Code APIs for Sites and Pages, Custom Code Scripts must first be registered - * to a Site via the `registered_scripts` endpoints, and then applied to a Site or Page using the appropriate - * `custom_code` endpoints. - * - * Access to this endpoint requires a bearer token from a [Data Client App](/data/docs/getting-started-data-clients). + * Get all scripts applied to a page. * * Required scope | `custom_code:read` * @@ -67,8 +61,8 @@ export class Scripts { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "3.1.0", - "User-Agent": "webflow-api/3.1.0", + "X-Fern-SDK-Version": "3.1.1", + "User-Agent": "webflow-api/3.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -157,15 +151,11 @@ export class Scripts { } /** - * Add a registered script to a Page. - * - * In order to use the Custom Code APIs for Sites and Pages, Custom Code Scripts must first be registered - * to a Site via the `registered_scripts` endpoints, and then applied to a Site or Page using the appropriate - * `custom_code` endpoints. + * Apply scripts to a page. * - * A site can have a maximum of 800 registered scripts. - * - * Access to this endpoint requires a bearer token from a [Data Client App](/data/docs/getting-started-data-clients). + * + * To apply a script to a page, the script must first be registered to a Site via the [Register Script](/data/reference/custom-code/custom-code/register-hosted) endpoints. Once registered, the script can be applied to a Site or Page using the appropriate endpoints. See the documentation on [working with Custom Code](/data/docs/custom-code) for more information. + * * * Required scope | `custom_code:write` * @@ -211,8 +201,8 @@ export class Scripts { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "3.1.0", - "User-Agent": "webflow-api/3.1.0", + "X-Fern-SDK-Version": "3.1.1", + "User-Agent": "webflow-api/3.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -308,11 +298,7 @@ export class Scripts { } /** - * Delete the custom code block that an app has created for a page - * - * In order to use the Custom Code APIs for Sites and Pages, Custom Code Scripts must first be registered - * to a Site via the `registered_scripts` endpoints, and then applied to a Site or Page using the appropriate - * `custom_code` endpoints. + * Delete a custom code block that the App created on a page. * * Access to this endpoint requires a bearer token from a [Data Client App](/data/docs/getting-started-data-clients). * @@ -341,8 +327,8 @@ export class Scripts { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "3.1.0", - "User-Agent": "webflow-api/3.1.0", + "X-Fern-SDK-Version": "3.1.1", + "User-Agent": "webflow-api/3.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, diff --git a/src/api/resources/products/client/Client.ts b/src/api/resources/products/client/Client.ts index 948759d8..3821c2d5 100644 --- a/src/api/resources/products/client/Client.ts +++ b/src/api/resources/products/client/Client.ts @@ -78,8 +78,8 @@ export class Products { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "3.1.0", - "User-Agent": "webflow-api/3.1.0", + "X-Fern-SDK-Version": "3.1.1", + "User-Agent": "webflow-api/3.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -218,8 +218,8 @@ export class Products { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "3.1.0", - "User-Agent": "webflow-api/3.1.0", + "X-Fern-SDK-Version": "3.1.1", + "User-Agent": "webflow-api/3.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -352,8 +352,8 @@ export class Products { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "3.1.0", - "User-Agent": "webflow-api/3.1.0", + "X-Fern-SDK-Version": "3.1.1", + "User-Agent": "webflow-api/3.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -486,8 +486,8 @@ export class Products { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "3.1.0", - "User-Agent": "webflow-api/3.1.0", + "X-Fern-SDK-Version": "3.1.1", + "User-Agent": "webflow-api/3.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -627,8 +627,8 @@ export class Products { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "3.1.0", - "User-Agent": "webflow-api/3.1.0", + "X-Fern-SDK-Version": "3.1.1", + "User-Agent": "webflow-api/3.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -772,8 +772,8 @@ export class Products { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "3.1.0", - "User-Agent": "webflow-api/3.1.0", + "X-Fern-SDK-Version": "3.1.1", + "User-Agent": "webflow-api/3.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, diff --git a/src/api/resources/products/types/ProductsCreateSkuResponse.ts b/src/api/resources/products/types/ProductsCreateSkuResponse.ts index 0f1f0c50..6e5e2fd1 100644 --- a/src/api/resources/products/types/ProductsCreateSkuResponse.ts +++ b/src/api/resources/products/types/ProductsCreateSkuResponse.ts @@ -5,5 +5,6 @@ import * as Webflow from "../../../index"; export interface ProductsCreateSkuResponse { + required?: unknown; skus?: Webflow.Sku[]; } diff --git a/src/api/resources/scripts/client/Client.ts b/src/api/resources/scripts/client/Client.ts index bd1df6f1..d0325277 100644 --- a/src/api/resources/scripts/client/Client.ts +++ b/src/api/resources/scripts/client/Client.ts @@ -31,14 +31,11 @@ export class Scripts { constructor(protected readonly _options: Scripts.Options) {} /** - * List of scripts registered to a Site. + * Get a list of scripts that have been registered to a site. A site can have a maximum of 800 registered scripts. * - * In order to use the Custom Code APIs for Sites and Pages, Custom Code Scripts must first be registered - * to a Site via the `registered_scripts` endpoints, and then applied to a Site or Page using the appropriate - * `custom_code` endpoints. - * Additionally, Scripts can be remotely hosted, or registered as inline snippets. - * - * Access to this endpoint requires a bearer token from a [Data Client App](/data/docs/getting-started-data-clients). + * + * To apply a script to a site or page, the script must first be registered to a site via the [Register Script](/data/reference/custom-code/custom-code/register-hosted) endpoints. Once registered, the script can be applied to a Site or Page using the appropriate endpoints. See the documentation on [working with Custom Code](/data/docs/custom-code) for more information. + * * * Required scope | `custom_code:read` * @@ -65,8 +62,8 @@ export class Scripts { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "3.1.0", - "User-Agent": "webflow-api/3.1.0", + "X-Fern-SDK-Version": "3.1.1", + "User-Agent": "webflow-api/3.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -157,14 +154,11 @@ export class Scripts { } /** - * Add a script to a Site's Custom Code registry. - * - * In order to use the Custom Code APIs for Sites and Pages, Custom Code Scripts must first be registered - * to a Site via the `registered_scripts` endpoints, and then applied to a Site or Page using the appropriate - * `custom_code` endpoints. - * Additionally, Scripts can be remotely hosted, or registered as inline snippets. + * Register a hosted script to a site. * - * Access to this endpoint requires a bearer token from a [Data Client App](/data/docs/getting-started-data-clients). + * + * To apply a script to a site or page, the script must first be registered to a site via the [Register Script](/data/reference/custom-code/custom-code/register-hosted) endpoints. Once registered, the script can be applied to a Site or Page using the appropriate endpoints. See the documentation on [working with Custom Code](/data/docs/custom-code) for more information. + * * * Required scope | `custom_code:write` * @@ -201,8 +195,8 @@ export class Scripts { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "3.1.0", - "User-Agent": "webflow-api/3.1.0", + "X-Fern-SDK-Version": "3.1.1", + "User-Agent": "webflow-api/3.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -298,13 +292,11 @@ export class Scripts { } /** - * Add a script to a Site's Custom Code registry. Inline scripts can be between 1 and 2000 characters. - * - * In order to use the Custom Code APIs for Sites and Pages, Custom Code Scripts must first be registered - * to a Site via the `registered_scripts` endpoints, and then applied to a Site or Page using the appropriate - * `custom_code` endpoints. + * Register an inline script to a site. Inline scripts are limited to 2000 characters. * - * Access to this endpoint requires a bearer token from a [Data Client App](/data/docs/getting-started-data-clients). + * + * To apply a script to a site or page, the script must first be registered to a site via the [Register Script](/data/reference/custom-code/custom-code/register-hosted) endpoints. Once registered, the script can be applied to a Site or Page using the appropriate endpoints. See the documentation on [working with Custom Code](/data/docs/custom-code) for more information. + * * * Required scope | `custom_code:write` * @@ -340,8 +332,8 @@ export class Scripts { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "3.1.0", - "User-Agent": "webflow-api/3.1.0", + "X-Fern-SDK-Version": "3.1.1", + "User-Agent": "webflow-api/3.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, diff --git a/src/api/resources/sites/client/Client.ts b/src/api/resources/sites/client/Client.ts index 80e34e14..983694a0 100644 --- a/src/api/resources/sites/client/Client.ts +++ b/src/api/resources/sites/client/Client.ts @@ -38,7 +38,9 @@ export class Sites { constructor(protected readonly _options: Sites.Options) {} /** - * Create a site. This endpoint requires an Enterprise workspace. + * Create a site. + * + * This endpoint requires an Enterprise workspace. * * Required scope | `workspace:write` * @@ -73,8 +75,8 @@ export class Sites { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "3.1.0", - "User-Agent": "webflow-api/3.1.0", + "X-Fern-SDK-Version": "3.1.1", + "User-Agent": "webflow-api/3.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -196,8 +198,8 @@ export class Sites { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "3.1.0", - "User-Agent": "webflow-api/3.1.0", + "X-Fern-SDK-Version": "3.1.1", + "User-Agent": "webflow-api/3.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -301,8 +303,8 @@ export class Sites { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "3.1.0", - "User-Agent": "webflow-api/3.1.0", + "X-Fern-SDK-Version": "3.1.1", + "User-Agent": "webflow-api/3.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -391,7 +393,9 @@ export class Sites { } /** - * Delete a site. This endpoint requires an Enterprise workspace. + * Delete a site. + * + * This endpoint requires an Enterprise workspace. * * Required scope | `sites:write` * @@ -419,8 +423,8 @@ export class Sites { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "3.1.0", - "User-Agent": "webflow-api/3.1.0", + "X-Fern-SDK-Version": "3.1.1", + "User-Agent": "webflow-api/3.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -505,7 +509,9 @@ export class Sites { } /** - * Update a site. This endpoint requires an Enterprise workspace. + * Update a site. + * + * This endpoint requires an Enterprise workspace. * * Required scope | `sites:write` * @@ -538,8 +544,8 @@ export class Sites { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "3.1.0", - "User-Agent": "webflow-api/3.1.0", + "X-Fern-SDK-Version": "3.1.1", + "User-Agent": "webflow-api/3.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -662,8 +668,8 @@ export class Sites { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "3.1.0", - "User-Agent": "webflow-api/3.1.0", + "X-Fern-SDK-Version": "3.1.1", + "User-Agent": "webflow-api/3.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -788,8 +794,8 @@ export class Sites { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "3.1.0", - "User-Agent": "webflow-api/3.1.0", + "X-Fern-SDK-Version": "3.1.1", + "User-Agent": "webflow-api/3.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, diff --git a/src/api/resources/sites/resources/activityLogs/client/Client.ts b/src/api/resources/sites/resources/activityLogs/client/Client.ts index 5688fbea..dee394dd 100644 --- a/src/api/resources/sites/resources/activityLogs/client/Client.ts +++ b/src/api/resources/sites/resources/activityLogs/client/Client.ts @@ -31,7 +31,11 @@ export class ActivityLogs { constructor(protected readonly _options: ActivityLogs.Options) {} /** - * Retrieve Activity Logs for a specific Site. Requires Site to be on an Enterprise plan.

Required scope | `site_activity:read` + * Retrieve Activity Logs for a specific Site. + * + * This endpoint requires an Enterprise workspace. + * + * Required scope: `site_activity:read` * * @param {string} siteId - Unique identifier for a Site * @param {Webflow.sites.ActivityLogsListRequest} request @@ -70,8 +74,8 @@ export class ActivityLogs { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "3.1.0", - "User-Agent": "webflow-api/3.1.0", + "X-Fern-SDK-Version": "3.1.1", + "User-Agent": "webflow-api/3.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, diff --git a/src/api/resources/sites/resources/plans/client/Client.ts b/src/api/resources/sites/resources/plans/client/Client.ts index 3bf88255..24b35aea 100644 --- a/src/api/resources/sites/resources/plans/client/Client.ts +++ b/src/api/resources/sites/resources/plans/client/Client.ts @@ -33,6 +33,8 @@ export class Plans { /** * Get site plan details for the specified Site. * + * This endpoint requires an Enterprise workspace. + * * Required scope | `sites:read` * * @param {string} siteId - Unique identifier for a Site @@ -58,8 +60,8 @@ export class Plans { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "3.1.0", - "User-Agent": "webflow-api/3.1.0", + "X-Fern-SDK-Version": "3.1.1", + "User-Agent": "webflow-api/3.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, diff --git a/src/api/resources/sites/resources/redirects/client/Client.ts b/src/api/resources/sites/resources/redirects/client/Client.ts index c3ba71b4..ebc41a36 100644 --- a/src/api/resources/sites/resources/redirects/client/Client.ts +++ b/src/api/resources/sites/resources/redirects/client/Client.ts @@ -35,6 +35,7 @@ export class Redirects { * * Use this endpoint to review, audit, or manage the redirection rules that control how traffic is rerouted on your site. * + * This endpoint requires an Enterprise workspace. * * Required scope: `sites:read` * @@ -61,8 +62,8 @@ export class Redirects { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "3.1.0", - "User-Agent": "webflow-api/3.1.0", + "X-Fern-SDK-Version": "3.1.1", + "User-Agent": "webflow-api/3.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -155,6 +156,8 @@ export class Redirects { * * This endpoint allows you to define a source path (`fromUrl`) and its corresponding destination path (`toUrl`), which will dictate how traffic is rerouted on your site. This is useful for managing site changes, restructuring URLs, or handling outdated links. * + * This endpoint requires an Enterprise workspace. + * * Required scope: `sites:write` * * @param {string} siteId - Unique identifier for a Site @@ -189,8 +192,8 @@ export class Redirects { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "3.1.0", - "User-Agent": "webflow-api/3.1.0", + "X-Fern-SDK-Version": "3.1.1", + "User-Agent": "webflow-api/3.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -285,7 +288,11 @@ export class Redirects { /** * Remove a URL redirection rule from a site. + * * This is useful for cleaning up outdated or unnecessary redirects, ensuring that your site's routing behavior remains efficient and up-to-date. + * + * This endpoint requires an Enterprise workspace. + * * Required scope: `sites:write` * * @param {string} siteId - Unique identifier for a Site @@ -316,8 +323,8 @@ export class Redirects { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "3.1.0", - "User-Agent": "webflow-api/3.1.0", + "X-Fern-SDK-Version": "3.1.1", + "User-Agent": "webflow-api/3.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -409,6 +416,9 @@ export class Redirects { /** * Update a URL redirection rule from a site. + * + * This endpoint requires an Enterprise workspace. + * * Required scope: `sites:write` * * @param {string} siteId - Unique identifier for a Site @@ -445,8 +455,8 @@ export class Redirects { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "3.1.0", - "User-Agent": "webflow-api/3.1.0", + "X-Fern-SDK-Version": "3.1.1", + "User-Agent": "webflow-api/3.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, diff --git a/src/api/resources/sites/resources/scripts/client/Client.ts b/src/api/resources/sites/resources/scripts/client/Client.ts index 660476ba..68d709cb 100644 --- a/src/api/resources/sites/resources/scripts/client/Client.ts +++ b/src/api/resources/sites/resources/scripts/client/Client.ts @@ -31,9 +31,11 @@ export class Scripts { constructor(protected readonly _options: Scripts.Options) {} /** - * Get all registered scripts that have been applied to a specific Site. + * Get all scripts applied to a site by the App. * - * Access to this endpoint requires a bearer token from a [Data Client App](/data/docs/getting-started-data-clients). + * + * To apply a script to a site or page, the script must first be registered to a site via the [Register Script](/data/reference/custom-code/custom-code/register-hosted) endpoints. Once registered, the script can be applied to a Site or Page using the appropriate endpoints. See the documentation on [working with Custom Code](/data/docs/custom-code) for more information. + * * * Required scope | `custom_code:read` * @@ -63,8 +65,8 @@ export class Scripts { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "3.1.0", - "User-Agent": "webflow-api/3.1.0", + "X-Fern-SDK-Version": "3.1.1", + "User-Agent": "webflow-api/3.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -153,13 +155,11 @@ export class Scripts { } /** - * Add a registered script to a Site. + * Apply registered scripts to a site. * - * In order to use the Custom Code APIs for Sites and Pages, Custom Code Scripts must first be registered - * to a Site via the `registered_scripts` endpoints, and then applied to a Site or Page using the appropriate - * `custom_code` endpoints. - * - * Access to this endpoint requires a bearer token from a [Data Client App](/data/docs/getting-started-data-clients). + * + * To apply a script to a site or page, the script must first be registered to a site via the [Register Script](/data/reference/custom-code/custom-code/register-hosted) endpoints. Once registered, the script can be applied to a Site or Page using the appropriate endpoints. See the documentation on [working with Custom Code](/data/docs/custom-code) for more information. + * * * Required scope | `custom_code:write` * @@ -204,8 +204,8 @@ export class Scripts { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "3.1.0", - "User-Agent": "webflow-api/3.1.0", + "X-Fern-SDK-Version": "3.1.1", + "User-Agent": "webflow-api/3.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -299,9 +299,7 @@ export class Scripts { } /** - * Delete the custom code block that an app created for a Site - * - * Access to this endpoint requires a bearer token from a [Data Client App](/data/docs/getting-started-data-clients). + * Remove scripts from a site applied by the App. This endpoint will not remove scripts from the site's registered scripts. * * Required scope | `custom_code:write` * @@ -328,8 +326,8 @@ export class Scripts { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "3.1.0", - "User-Agent": "webflow-api/3.1.0", + "X-Fern-SDK-Version": "3.1.1", + "User-Agent": "webflow-api/3.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -414,9 +412,13 @@ export class Scripts { } /** - * Get all instances of Custom Code applied to a Site or Pages. + * Get a list of scripts that have been applied to a site and/or individual pages. + * + * + * To apply a script to a site or page, the script must first be registered to a site via the [Register Script](/data/reference/custom-code/custom-code/register-hosted) endpoints. Once registered, the script can be applied to a Site or Page using the appropriate endpoints. * - * Access to this endpoint requires a bearer token from a [Data Client App](/data/docs/getting-started-data-clients). + * See the documentation on [working with Custom Code](/data/docs/custom-code) for more information. + * * * Required scope | `custom_code:read` * @@ -458,8 +460,8 @@ export class Scripts { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "3.1.0", - "User-Agent": "webflow-api/3.1.0", + "X-Fern-SDK-Version": "3.1.1", + "User-Agent": "webflow-api/3.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, diff --git a/src/api/resources/token/client/Client.ts b/src/api/resources/token/client/Client.ts index c4d8baca..cf6acf0c 100644 --- a/src/api/resources/token/client/Client.ts +++ b/src/api/resources/token/client/Client.ts @@ -54,8 +54,8 @@ export class Token { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "3.1.0", - "User-Agent": "webflow-api/3.1.0", + "X-Fern-SDK-Version": "3.1.1", + "User-Agent": "webflow-api/3.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -136,8 +136,8 @@ export class Token { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "3.1.0", - "User-Agent": "webflow-api/3.1.0", + "X-Fern-SDK-Version": "3.1.1", + "User-Agent": "webflow-api/3.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, diff --git a/src/api/resources/users/client/Client.ts b/src/api/resources/users/client/Client.ts index ddef4f9d..95b20b60 100644 --- a/src/api/resources/users/client/Client.ts +++ b/src/api/resources/users/client/Client.ts @@ -78,8 +78,8 @@ export class Users { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "3.1.0", - "User-Agent": "webflow-api/3.1.0", + "X-Fern-SDK-Version": "3.1.1", + "User-Agent": "webflow-api/3.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -200,8 +200,8 @@ export class Users { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "3.1.0", - "User-Agent": "webflow-api/3.1.0", + "X-Fern-SDK-Version": "3.1.1", + "User-Agent": "webflow-api/3.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -323,8 +323,8 @@ export class Users { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "3.1.0", - "User-Agent": "webflow-api/3.1.0", + "X-Fern-SDK-Version": "3.1.1", + "User-Agent": "webflow-api/3.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -456,8 +456,8 @@ export class Users { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "3.1.0", - "User-Agent": "webflow-api/3.1.0", + "X-Fern-SDK-Version": "3.1.1", + "User-Agent": "webflow-api/3.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -594,8 +594,8 @@ export class Users { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "3.1.0", - "User-Agent": "webflow-api/3.1.0", + "X-Fern-SDK-Version": "3.1.1", + "User-Agent": "webflow-api/3.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, diff --git a/src/api/resources/webhooks/client/Client.ts b/src/api/resources/webhooks/client/Client.ts index 0d14fee9..2b527749 100644 --- a/src/api/resources/webhooks/client/Client.ts +++ b/src/api/resources/webhooks/client/Client.ts @@ -61,8 +61,8 @@ export class Webhooks { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "3.1.0", - "User-Agent": "webflow-api/3.1.0", + "X-Fern-SDK-Version": "3.1.1", + "User-Agent": "webflow-api/3.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -194,8 +194,8 @@ export class Webhooks { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "3.1.0", - "User-Agent": "webflow-api/3.1.0", + "X-Fern-SDK-Version": "3.1.1", + "User-Agent": "webflow-api/3.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -316,8 +316,8 @@ export class Webhooks { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "3.1.0", - "User-Agent": "webflow-api/3.1.0", + "X-Fern-SDK-Version": "3.1.1", + "User-Agent": "webflow-api/3.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -433,8 +433,8 @@ export class Webhooks { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "3.1.0", - "User-Agent": "webflow-api/3.1.0", + "X-Fern-SDK-Version": "3.1.1", + "User-Agent": "webflow-api/3.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, diff --git a/src/api/types/Asset.ts b/src/api/types/Asset.ts index 73d237e5..54c7a8b0 100644 --- a/src/api/types/Asset.ts +++ b/src/api/types/Asset.ts @@ -4,26 +4,30 @@ import * as Webflow from "../index"; +/** + * Asset details + */ export interface Asset { /** Unique identifier for this asset */ - id?: string; + id: string; /** File format type */ - contentType?: string; + contentType: string; /** size in bytes */ - size?: number; + size: number; /** Unique identifier for the site that hosts this asset */ - siteId?: string; + siteId: string; /** Link to the asset */ - hostedUrl?: string; + hostedUrl: string; /** Original file name at the time of upload */ - originalFileName?: string; + originalFileName: string; /** Display name of the asset */ - displayName?: string; + displayName: string; /** Date the asset metadata was last updated */ - lastUpdated?: Date; + lastUpdated: Date; /** Date the asset metadata was created */ - createdOn?: Date; - variants?: Webflow.AssetVariant[]; + createdOn: Date; + /** A list of [asset variants](https://help.webflow.com/hc/en-us/articles/33961378697107-Responsive-images) created by Webflow to serve your site responsively. */ + variants: Webflow.AssetVariant[]; /** The visual description of the asset */ altText?: string; } diff --git a/src/api/types/AssetVariant.ts b/src/api/types/AssetVariant.ts index 87190815..7d2c25c8 100644 --- a/src/api/types/AssetVariant.ts +++ b/src/api/types/AssetVariant.ts @@ -2,21 +2,24 @@ * This file was auto-generated by Fern from our API Definition. */ +/** + * Asset variant details + */ export interface AssetVariant { /** URL of where the asset variant is hosted */ - hostedUrl?: string; + hostedUrl: string; /** Original file name of the variant */ - originalFileName?: string; + originalFileName: string; /** Display name of the variant */ - displayName?: string; + displayName: string; /** format of the variant */ - format?: string; + format: string; /** Width in pixels */ - width?: number; + width: number; /** Height in pixels */ - height?: number; + height: number; /** Value between 0 and 100 representing the image quality */ - quality?: number; + quality: number; /** Any associated validation errors */ error?: string; } diff --git a/src/api/types/Assets.ts b/src/api/types/Assets.ts index ef06e1a0..46b4681b 100644 --- a/src/api/types/Assets.ts +++ b/src/api/types/Assets.ts @@ -9,4 +9,5 @@ import * as Webflow from "../index"; */ export interface Assets { assets?: Webflow.Asset[]; + pagination?: Webflow.Pagination; } diff --git a/src/api/types/Collection.ts b/src/api/types/Collection.ts index 1dba545f..5214eec9 100644 --- a/src/api/types/Collection.ts +++ b/src/api/types/Collection.ts @@ -11,9 +11,9 @@ export interface Collection { /** Unique identifier for a Collection */ id: string; /** Name given to the Collection */ - displayName?: string; + displayName: string; /** The name of one Item in Collection (e.g. ”Blog Post” if the Collection is called “Blog Posts”) */ - singularName?: string; + singularName: string; /** Slug of Collection in Site URL structure */ slug?: string; /** The date the collection was created */ diff --git a/src/api/types/CollectionItem.ts b/src/api/types/CollectionItem.ts index 2783d84b..67536fe9 100644 --- a/src/api/types/CollectionItem.ts +++ b/src/api/types/CollectionItem.ts @@ -17,11 +17,11 @@ export interface CollectionItem { /** Identifier for the locale of the CMS item */ cmsLocaleId?: string; /** The date the item was last published */ - lastPublished?: string; + lastPublished: string; /** The date the item was last updated */ - lastUpdated?: string; + lastUpdated: string; /** The date the item was created */ - createdOn?: string; + createdOn: string; /** Boolean determining if the Item is set to archived */ isArchived?: boolean; /** Boolean determining if the Item is set to draft */ diff --git a/src/api/types/ComponentNode.ts b/src/api/types/ComponentNode.ts index 052cbab9..6b1d4a62 100644 --- a/src/api/types/ComponentNode.ts +++ b/src/api/types/ComponentNode.ts @@ -8,10 +8,10 @@ import * as Webflow from "../index"; * Represents a component instance within the DOM. It contains details about the component instance, such as its type and properties. */ export interface ComponentNode { - /** Node UUID */ - id?: string; - /** Component ID */ - componentId?: string; + /** The unique identifier of the component instance node */ + id: string; + /** The unique identifier of the component */ + componentId: string; /** List of component properties with overrides for a component instance. */ - propertyOverrides?: Webflow.ComponentProperty[]; + propertyOverrides: Webflow.ComponentProperty[]; } diff --git a/src/api/types/Conflict.ts b/src/api/types/Conflict.ts new file mode 100644 index 00000000..46a53a5f --- /dev/null +++ b/src/api/types/Conflict.ts @@ -0,0 +1,5 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export type Conflict = unknown; diff --git a/src/api/types/ImageNode.ts b/src/api/types/ImageNode.ts index d1b45fc7..8134be46 100644 --- a/src/api/types/ImageNode.ts +++ b/src/api/types/ImageNode.ts @@ -9,8 +9,9 @@ import * as Webflow from "../index"; */ export interface ImageNode { /** Node UUID */ - id?: string; - image?: Webflow.ImageNodeImage; + id: string; + /** The image details of the node */ + image: Webflow.ImageNodeImage; /** The custom attributes of the node */ attributes?: Record; } diff --git a/src/api/types/ImageNodeImage.ts b/src/api/types/ImageNodeImage.ts index 74f51a90..571de582 100644 --- a/src/api/types/ImageNodeImage.ts +++ b/src/api/types/ImageNodeImage.ts @@ -2,6 +2,9 @@ * This file was auto-generated by Fern from our API Definition. */ +/** + * The image details of the node + */ export interface ImageNodeImage { alt?: string; assetId?: string; diff --git a/src/api/types/Pagination.ts b/src/api/types/Pagination.ts index 1ee7cd06..3f34a0c1 100644 --- a/src/api/types/Pagination.ts +++ b/src/api/types/Pagination.ts @@ -7,9 +7,9 @@ */ export interface Pagination { /** The limit used for pagination */ - limit?: number; + limit: number; /** The offset used for pagination */ - offset?: number; + offset: number; /** The total number of records */ - total?: number; + total: number; } diff --git a/src/api/types/SkuFieldData.ts b/src/api/types/SkuFieldData.ts index bab27e58..9c4e5e84 100644 --- a/src/api/types/SkuFieldData.ts +++ b/src/api/types/SkuFieldData.ts @@ -17,7 +17,9 @@ export interface SkuFieldData { price: Webflow.SkuFieldDataPrice; /** comparison price of SKU */ compareAtPrice?: Webflow.SkuFieldDataCompareAtPrice; + /** [Billing method](https://help.webflow.com/hc/en-us/articles/33961432087955-Add-and-manage-products-and-categories#billing-methods)for the SKU */ ecSkuBillingMethod?: Webflow.SkuFieldDataEcSkuBillingMethod; + /** [Subscription plan](https://help.webflow.com/hc/en-us/articles/33961432087955-Add-and-manage-products-and-categories#subscription) for the SKU */ ecSkuSubscriptionPlan?: Webflow.SkuFieldDataEcSkuSubscriptionPlan; /** A boolean indicating whether inventory for this product should be tracked. */ trackInventory?: boolean; diff --git a/src/api/types/SkuFieldDataEcSkuBillingMethod.ts b/src/api/types/SkuFieldDataEcSkuBillingMethod.ts index 3f89429a..f4178145 100644 --- a/src/api/types/SkuFieldDataEcSkuBillingMethod.ts +++ b/src/api/types/SkuFieldDataEcSkuBillingMethod.ts @@ -2,6 +2,9 @@ * This file was auto-generated by Fern from our API Definition. */ +/** + * [Billing method](https://help.webflow.com/hc/en-us/articles/33961432087955-Add-and-manage-products-and-categories#billing-methods)for the SKU + */ export type SkuFieldDataEcSkuBillingMethod = "one-time" | "subscription"; export const SkuFieldDataEcSkuBillingMethod = { diff --git a/src/api/types/SkuFieldDataEcSkuSubscriptionPlan.ts b/src/api/types/SkuFieldDataEcSkuSubscriptionPlan.ts index f6282e57..ded3f047 100644 --- a/src/api/types/SkuFieldDataEcSkuSubscriptionPlan.ts +++ b/src/api/types/SkuFieldDataEcSkuSubscriptionPlan.ts @@ -4,6 +4,9 @@ import * as Webflow from "../index"; +/** + * [Subscription plan](https://help.webflow.com/hc/en-us/articles/33961432087955-Add-and-manage-products-and-categories#subscription) for the SKU + */ export interface SkuFieldDataEcSkuSubscriptionPlan { /** Interval of subscription renewal */ interval?: Webflow.SkuFieldDataEcSkuSubscriptionPlanInterval; diff --git a/src/api/types/Text.ts b/src/api/types/Text.ts index 3bb0c2ab..9b62448c 100644 --- a/src/api/types/Text.ts +++ b/src/api/types/Text.ts @@ -2,6 +2,9 @@ * This file was auto-generated by Fern from our API Definition. */ +/** + * The text content of the node + */ export interface Text { /** The HTML content of the text node. */ html?: string; diff --git a/src/api/types/TextNode.ts b/src/api/types/TextNode.ts index d3bb2e5f..13015905 100644 --- a/src/api/types/TextNode.ts +++ b/src/api/types/TextNode.ts @@ -9,8 +9,9 @@ import * as Webflow from "../index"; */ export interface TextNode { /** Node UUID */ - id?: string; - text?: Webflow.TextNodeText; + id: string; + /** The text content of the node */ + text: Webflow.TextNodeText; /** The custom attributes of the node */ attributes?: Record; } diff --git a/src/api/types/TextNodeText.ts b/src/api/types/TextNodeText.ts index b65c6adf..05f25552 100644 --- a/src/api/types/TextNodeText.ts +++ b/src/api/types/TextNodeText.ts @@ -2,6 +2,9 @@ * This file was auto-generated by Fern from our API Definition. */ +/** + * The text content of the node + */ export interface TextNodeText { /** The HTML content of the text node. */ html?: string; diff --git a/src/api/types/TriggerType.ts b/src/api/types/TriggerType.ts index 345bf260..25a3f19a 100644 --- a/src/api/types/TriggerType.ts +++ b/src/api/types/TriggerType.ts @@ -3,21 +3,7 @@ */ /** - * * `form_submission` - Sends the [form_submission](#form_submission) event - * * `site_publish` - Sends a [site_publish](#site_publish) event - * * `page_created` - Send the [page_created](#page_created) event - * * `page_metadata_updated` - Sends the [page_metadata_updated](#page_metadata_updated) event - * * `page_deleted` - Sends the [page_deleted](#page_deleted) event - * * `ecomm_new_order` - Sends the new [ecomm_new_order](#ecomm_new_order) event - * * `ecomm_order_changed` - Sends the [ecomm_order_changed](#ecomm_order_changed) event - * * `ecomm_inventory_changed` - Sends the [ecomm_inventory_changed](#ecomm_inventory_changed) event - * * `user_account_added` - Sends the [user_account_added](#user_account_added) event - * * `user_account_updated` - Sends the [user_account_updated](#user_account_updated) event - * * `user_account_deleted` - Sends the [user_account_deleted](#user_account_deleted) event - * * `collection_item_created` - Sends the [collection_item_created](#collection_item_created) event - * * `collection_item_changed` - Sends the [collection_item_changed](#collection_item_changed) event - * * `collection_item_deleted` - Sends the [collection_item_deleted](#collection_item_deleted) event - * * `collection_item_unpublished` - Sends the [collection_item_unpublished](#collection_item_unpublished) event + * The type of event that triggered the request. See the the documentation for details on [supported events](m/data/reference/all-events). */ export type TriggerType = | "form_submission" diff --git a/src/api/types/WebhookList.ts b/src/api/types/WebhookList.ts index 69521be5..3eb80995 100644 --- a/src/api/types/WebhookList.ts +++ b/src/api/types/WebhookList.ts @@ -5,6 +5,6 @@ import * as Webflow from "../index"; export interface WebhookList { - pagination?: Webflow.Pagination; webhooks?: Webflow.Webhook[]; + pagination?: Webflow.Pagination; } diff --git a/src/api/types/index.ts b/src/api/types/index.ts index 7e2d33ff..0b02dc58 100644 --- a/src/api/types/index.ts +++ b/src/api/types/index.ts @@ -45,6 +45,7 @@ export * from "./CollectionItemPostSingle"; export * from "./CollectionItemWithIdInputFieldData"; export * from "./CollectionItemWithIdInput"; export * from "./CollectionItemListNoPagination"; +export * from "./Conflict"; export * from "./BulkCollectionItemFieldData"; export * from "./BulkCollectionItem"; export * from "./CollectionItemPatchSingleFieldData"; diff --git a/src/serialization/resources/products/types/ProductsCreateSkuResponse.ts b/src/serialization/resources/products/types/ProductsCreateSkuResponse.ts index 4ca5e4a7..7b7e3955 100644 --- a/src/serialization/resources/products/types/ProductsCreateSkuResponse.ts +++ b/src/serialization/resources/products/types/ProductsCreateSkuResponse.ts @@ -11,11 +11,13 @@ export const ProductsCreateSkuResponse: core.serialization.ObjectSchema< serializers.ProductsCreateSkuResponse.Raw, Webflow.ProductsCreateSkuResponse > = core.serialization.object({ + required: core.serialization.unknown().optional(), skus: core.serialization.list(Sku).optional(), }); export declare namespace ProductsCreateSkuResponse { interface Raw { + required?: unknown | null; skus?: Sku.Raw[] | null; } } diff --git a/src/serialization/types/Asset.ts b/src/serialization/types/Asset.ts index 12f39e6a..7a3f5c8d 100644 --- a/src/serialization/types/Asset.ts +++ b/src/serialization/types/Asset.ts @@ -8,31 +8,31 @@ import * as core from "../../core"; import { AssetVariant } from "./AssetVariant"; export const Asset: core.serialization.ObjectSchema = core.serialization.object({ - id: core.serialization.string().optional(), - contentType: core.serialization.string().optional(), - size: core.serialization.number().optional(), - siteId: core.serialization.string().optional(), - hostedUrl: core.serialization.string().optional(), - originalFileName: core.serialization.string().optional(), - displayName: core.serialization.string().optional(), - lastUpdated: core.serialization.date().optional(), - createdOn: core.serialization.date().optional(), - variants: core.serialization.list(AssetVariant).optional(), + id: core.serialization.string(), + contentType: core.serialization.string(), + size: core.serialization.number(), + siteId: core.serialization.string(), + hostedUrl: core.serialization.string(), + originalFileName: core.serialization.string(), + displayName: core.serialization.string(), + lastUpdated: core.serialization.date(), + createdOn: core.serialization.date(), + variants: core.serialization.list(AssetVariant), altText: core.serialization.string().optional(), }); export declare namespace Asset { interface Raw { - id?: string | null; - contentType?: string | null; - size?: number | null; - siteId?: string | null; - hostedUrl?: string | null; - originalFileName?: string | null; - displayName?: string | null; - lastUpdated?: string | null; - createdOn?: string | null; - variants?: AssetVariant.Raw[] | null; + id: string; + contentType: string; + size: number; + siteId: string; + hostedUrl: string; + originalFileName: string; + displayName: string; + lastUpdated: string; + createdOn: string; + variants: AssetVariant.Raw[]; altText?: string | null; } } diff --git a/src/serialization/types/AssetVariant.ts b/src/serialization/types/AssetVariant.ts index 094173b7..64b5f71a 100644 --- a/src/serialization/types/AssetVariant.ts +++ b/src/serialization/types/AssetVariant.ts @@ -8,25 +8,25 @@ import * as core from "../../core"; export const AssetVariant: core.serialization.ObjectSchema = core.serialization.object({ - hostedUrl: core.serialization.string().optional(), - originalFileName: core.serialization.string().optional(), - displayName: core.serialization.string().optional(), - format: core.serialization.string().optional(), - width: core.serialization.number().optional(), - height: core.serialization.number().optional(), - quality: core.serialization.number().optional(), + hostedUrl: core.serialization.string(), + originalFileName: core.serialization.string(), + displayName: core.serialization.string(), + format: core.serialization.string(), + width: core.serialization.number(), + height: core.serialization.number(), + quality: core.serialization.number(), error: core.serialization.string().optional(), }); export declare namespace AssetVariant { interface Raw { - hostedUrl?: string | null; - originalFileName?: string | null; - displayName?: string | null; - format?: string | null; - width?: number | null; - height?: number | null; - quality?: number | null; + hostedUrl: string; + originalFileName: string; + displayName: string; + format: string; + width: number; + height: number; + quality: number; error?: string | null; } } diff --git a/src/serialization/types/Assets.ts b/src/serialization/types/Assets.ts index 7849dc46..5081a050 100644 --- a/src/serialization/types/Assets.ts +++ b/src/serialization/types/Assets.ts @@ -6,14 +6,17 @@ import * as serializers from "../index"; import * as Webflow from "../../api/index"; import * as core from "../../core"; import { Asset } from "./Asset"; +import { Pagination } from "./Pagination"; export const Assets: core.serialization.ObjectSchema = core.serialization.object({ assets: core.serialization.list(Asset).optional(), + pagination: Pagination.optional(), }); export declare namespace Assets { interface Raw { assets?: Asset.Raw[] | null; + pagination?: Pagination.Raw | null; } } diff --git a/src/serialization/types/Collection.ts b/src/serialization/types/Collection.ts index 5e5b5e66..fd55335c 100644 --- a/src/serialization/types/Collection.ts +++ b/src/serialization/types/Collection.ts @@ -10,8 +10,8 @@ import { Field } from "./Field"; export const Collection: core.serialization.ObjectSchema = core.serialization.object({ id: core.serialization.string(), - displayName: core.serialization.string().optional(), - singularName: core.serialization.string().optional(), + displayName: core.serialization.string(), + singularName: core.serialization.string(), slug: core.serialization.string().optional(), createdOn: core.serialization.date().optional(), lastUpdated: core.serialization.date().optional(), @@ -21,8 +21,8 @@ export const Collection: core.serialization.ObjectSchema = core.serialization.object({ - id: core.serialization.string().optional(), - componentId: core.serialization.string().optional(), - propertyOverrides: core.serialization.list(ComponentProperty).optional(), + id: core.serialization.string(), + componentId: core.serialization.string(), + propertyOverrides: core.serialization.list(ComponentProperty), }); export declare namespace ComponentNode { interface Raw { - id?: string | null; - componentId?: string | null; - propertyOverrides?: ComponentProperty.Raw[] | null; + id: string; + componentId: string; + propertyOverrides: ComponentProperty.Raw[]; } } diff --git a/src/serialization/types/Conflict.ts b/src/serialization/types/Conflict.ts new file mode 100644 index 00000000..67c8f9ed --- /dev/null +++ b/src/serialization/types/Conflict.ts @@ -0,0 +1,14 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Webflow from "../../api/index"; +import * as core from "../../core"; + +export const Conflict: core.serialization.Schema = + core.serialization.unknown(); + +export declare namespace Conflict { + type Raw = unknown; +} diff --git a/src/serialization/types/ImageNode.ts b/src/serialization/types/ImageNode.ts index b83e26f9..f08975ab 100644 --- a/src/serialization/types/ImageNode.ts +++ b/src/serialization/types/ImageNode.ts @@ -9,15 +9,15 @@ import { ImageNodeImage } from "./ImageNodeImage"; export const ImageNode: core.serialization.ObjectSchema = core.serialization.object({ - id: core.serialization.string().optional(), - image: ImageNodeImage.optional(), + id: core.serialization.string(), + image: ImageNodeImage, attributes: core.serialization.record(core.serialization.string(), core.serialization.string()).optional(), }); export declare namespace ImageNode { interface Raw { - id?: string | null; - image?: ImageNodeImage.Raw | null; + id: string; + image: ImageNodeImage.Raw; attributes?: Record | null; } } diff --git a/src/serialization/types/Pagination.ts b/src/serialization/types/Pagination.ts index 4d81b8f8..cd186256 100644 --- a/src/serialization/types/Pagination.ts +++ b/src/serialization/types/Pagination.ts @@ -8,15 +8,15 @@ import * as core from "../../core"; export const Pagination: core.serialization.ObjectSchema = core.serialization.object({ - limit: core.serialization.number().optional(), - offset: core.serialization.number().optional(), - total: core.serialization.number().optional(), + limit: core.serialization.number(), + offset: core.serialization.number(), + total: core.serialization.number(), }); export declare namespace Pagination { interface Raw { - limit?: number | null; - offset?: number | null; - total?: number | null; + limit: number; + offset: number; + total: number; } } diff --git a/src/serialization/types/TextNode.ts b/src/serialization/types/TextNode.ts index b97e6956..4da979ac 100644 --- a/src/serialization/types/TextNode.ts +++ b/src/serialization/types/TextNode.ts @@ -9,15 +9,15 @@ import { TextNodeText } from "./TextNodeText"; export const TextNode: core.serialization.ObjectSchema = core.serialization.object({ - id: core.serialization.string().optional(), - text: TextNodeText.optional(), + id: core.serialization.string(), + text: TextNodeText, attributes: core.serialization.record(core.serialization.string(), core.serialization.string()).optional(), }); export declare namespace TextNode { interface Raw { - id?: string | null; - text?: TextNodeText.Raw | null; + id: string; + text: TextNodeText.Raw; attributes?: Record | null; } } diff --git a/src/serialization/types/WebhookList.ts b/src/serialization/types/WebhookList.ts index 2d9268fe..b7fd20cf 100644 --- a/src/serialization/types/WebhookList.ts +++ b/src/serialization/types/WebhookList.ts @@ -5,18 +5,18 @@ import * as serializers from "../index"; import * as Webflow from "../../api/index"; import * as core from "../../core"; -import { Pagination } from "./Pagination"; import { Webhook } from "./Webhook"; +import { Pagination } from "./Pagination"; export const WebhookList: core.serialization.ObjectSchema = core.serialization.object({ - pagination: Pagination.optional(), webhooks: core.serialization.list(Webhook).optional(), + pagination: Pagination.optional(), }); export declare namespace WebhookList { interface Raw { - pagination?: Pagination.Raw | null; webhooks?: Webhook.Raw[] | null; + pagination?: Pagination.Raw | null; } } diff --git a/src/serialization/types/index.ts b/src/serialization/types/index.ts index 7e2d33ff..0b02dc58 100644 --- a/src/serialization/types/index.ts +++ b/src/serialization/types/index.ts @@ -45,6 +45,7 @@ export * from "./CollectionItemPostSingle"; export * from "./CollectionItemWithIdInputFieldData"; export * from "./CollectionItemWithIdInput"; export * from "./CollectionItemListNoPagination"; +export * from "./Conflict"; export * from "./BulkCollectionItemFieldData"; export * from "./BulkCollectionItem"; export * from "./CollectionItemPatchSingleFieldData"; diff --git a/src/version.ts b/src/version.ts index 8bccdd42..f2681032 100644 --- a/src/version.ts +++ b/src/version.ts @@ -1 +1 @@ -export const SDK_VERSION = "3.1.0"; +export const SDK_VERSION = "3.1.1"; diff --git a/yarn.lock b/yarn.lock index 85689b11..9a82fc98 100644 --- a/yarn.lock +++ b/yarn.lock @@ -656,9 +656,9 @@ form-data "^4.0.0" "@types/node@*": - version "22.10.5" - resolved "https://registry.yarnpkg.com/@types/node/-/node-22.10.5.tgz#95af89a3fb74a2bb41ef9927f206e6472026e48b" - integrity sha512-F8Q+SeGimwOo86fiovQh8qiXfFEh2/ocYv7tU5pJ3EXMSSxk1Joj5wefpFK2fHTf/N6HKGSxIDBT9f3gCxXPkQ== + version "22.10.7" + resolved "https://registry.yarnpkg.com/@types/node/-/node-22.10.7.tgz#14a1ca33fd0ebdd9d63593ed8d3fbc882a6d28d7" + integrity sha512-V09KvXxFiutGp6B7XkpaDXlNadZxrzajcY50EuoLIpQ6WWYCSvf19lVIazzfIzQvhUN2HjX12spLojTnhuKlGg== dependencies: undici-types "~6.20.0" @@ -1304,9 +1304,9 @@ dunder-proto@^1.0.1: gopd "^1.2.0" electron-to-chromium@^1.5.73: - version "1.5.80" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.5.80.tgz#ca7a8361d7305f0ec9e203ce4e633cbb8a8ef1b1" - integrity sha512-LTrKpW0AqIuHwmlVNV+cjFYTnXtM9K37OGhpe0ZI10ScPSxqVSryZHIY3WnCS5NSYbBODRTZyhRMS2h5FAEqAw== + version "1.5.83" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.5.83.tgz#3f74078f0c83e24bf7e692eaa855a998d1bec34f" + integrity sha512-LcUDPqSt+V0QmI47XLzZrz5OqILSMGsPFkDYus22rIbgorSvBYEFqq854ltTmUdHkY92FSdAAvsh4jWEULMdfQ== emittery@^0.13.1: version "0.13.1" @@ -1354,9 +1354,9 @@ es-module-lexer@^1.2.1: integrity sha512-qqnD1yMU6tk/jnaMosogGySTZP8YtUgAffA9nMN+E/rjxcfRQ6IEk7IiozUjgxKoFHBGjTLnrHB/YC45r/59EQ== es-object-atoms@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/es-object-atoms/-/es-object-atoms-1.0.0.tgz#ddb55cd47ac2e240701260bc2a8e31ecb643d941" - integrity sha512-MZ4iQ6JwHOBQjahnjwaC1ZtIBH+2ohjamzAO3oaHcXYup7qxjF2fixyH+Q71voWHeOkI2q/TnJao/KfXYIZWbw== + version "1.1.1" + resolved "https://registry.yarnpkg.com/es-object-atoms/-/es-object-atoms-1.1.1.tgz#1c4f2c4837327597ce69d2ca190a7fdd172338c1" + integrity sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA== dependencies: es-errors "^1.3.0"