From c090eaeb6c36b7f84c15b6689075d4ad54e8be06 Mon Sep 17 00:00:00 2001 From: fern-api <115122769+fern-api[bot]@users.noreply.github.com> Date: Tue, 4 Feb 2025 16:03:56 +0000 Subject: [PATCH] SDK regeneration --- .mock/definition/__package__.yml | 180 +++--- .mock/definition/assets.yml | 123 ++-- .mock/definition/collections/items.yml | 76 ++- .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/robotsTxt.yml | 198 ++++++ .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 | 564 +++++++++++++++--- src/Client.ts | 7 + .../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 +- .../ItemsDeleteItemsLiveRequestItemsItem.ts | 2 +- 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/index.ts | 1 + 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/robotsTxt/client/Client.ts | 560 +++++++++++++++++ src/api/resources/robotsTxt/client/index.ts | 1 + src/api/resources/robotsTxt/index.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/Robots.ts | 15 + src/api/types/RobotsRulesItem.ts | 12 + 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 | 3 + .../ItemsDeleteItemsLiveRequestItemsItem.ts | 4 +- .../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/Robots.ts | 21 + src/serialization/types/RobotsRulesItem.ts | 24 + src/serialization/types/TextNode.ts | 8 +- src/serialization/types/WebhookList.ts | 6 +- src/serialization/types/index.ts | 3 + src/version.ts | 2 +- yarn.lock | 114 ++-- 88 files changed, 2341 insertions(+), 846 deletions(-) create mode 100644 .mock/definition/robotsTxt.yml create mode 100644 src/api/resources/robotsTxt/client/Client.ts create mode 100644 src/api/resources/robotsTxt/client/index.ts create mode 100644 src/api/resources/robotsTxt/index.ts create mode 100644 src/api/types/Conflict.ts create mode 100644 src/api/types/Robots.ts create mode 100644 src/api/types/RobotsRulesItem.ts create mode 100644 src/serialization/types/Conflict.ts create mode 100644 src/serialization/types/Robots.ts create mode 100644 src/serialization/types/RobotsRulesItem.ts diff --git a/.mock/definition/__package__.yml b/.mock/definition/__package__.yml index db846366..d1fb0b66 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 @@ -440,6 +445,31 @@ types: docs: URL for more information about Webflow hosting plan pricing. source: openapi: ../../../openapi/referenced-specs/v2.yml + RobotsRulesItem: + properties: + userAgent: + type: string + docs: The user agent the rules apply to. + allows: + type: optional> + docs: List of paths allowed for this user agent. + disallows: + type: optional> + docs: List of paths disallowed for this user agent. + source: + openapi: ../../../openapi/referenced-specs/v2.yml + inline: true + Robots: + docs: The robots.txt file for a given site + properties: + rules: + type: optional> + docs: List of rules for user agents. + sitemap: + type: optional + docs: URL to the sitemap. + source: + openapi: ../../../openapi/referenced-specs/v2.yml SiteActivityLogItemEvent: enum: - styles_modified @@ -615,10 +645,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 +703,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 +856,7 @@ types: docs: List of Items within the collection source: openapi: ../../../openapi/referenced-specs/v2.yml + Conflict: unknown BulkCollectionItemFieldData: properties: name: @@ -1029,6 +1060,7 @@ types: source: openapi: ../../../openapi/referenced-specs/v2.yml TextNodeText: + docs: The text content of the node properties: html: type: optional @@ -1046,15 +1078,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 +1104,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 +1166,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 +1477,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 +1508,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 +1554,7 @@ types: docs: A list of assets properties: assets: optional> + pagination: optional source: openapi: ../../../openapi/referenced-specs/v2.yml AssetUploadUploadDetails: @@ -1618,46 +1664,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](/data/reference/all-events). source: openapi: ../../../openapi/referenced-specs/v2.yml WebhookFilter: @@ -1701,8 +1709,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 +2217,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 +2258,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 +2292,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..248f198f 100644 --- a/.mock/definition/collections/items.yml +++ b/.mock/definition/collections/items.yml @@ -68,7 +68,7 @@ types: openapi: ../../../openapi/referenced-specs/v2.yml ItemsDeleteItemsLiveRequestItemsItem: properties: - itemId: + id: type: string docs: Unique identifier for the Item cmsLocaleIds: @@ -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. + + 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` @@ -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/robotsTxt.yml b/.mock/definition/robotsTxt.yml new file mode 100644 index 00000000..2013d040 --- /dev/null +++ b/.mock/definition/robotsTxt.yml @@ -0,0 +1,198 @@ +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + get: + path: /sites/{site_id}/robots_txt + method: GET + auth: true + docs: | + Retrieve the robots.txt configuration for various user agents. + + Required scope: `site_config:read` + source: + openapi: ../../../openapi/referenced-specs/v2.yml + path-parameters: + site_id: + type: string + docs: Unique identifier for a Site + display-name: Get robots.txt + response: + docs: Request was successful + type: root.Robots + errors: + - root.BadRequestError + - root.UnauthorizedError + - root.NotFoundError + - root.TooManyRequestsError + - root.InternalServerError + examples: + - path-parameters: + site_id: 580e63e98c9a982ac9b8b741 + response: + body: + rules: + - userAgent: googlebot + allows: + - /public + disallows: + - /vogon-poetry + - /total-perspective-vortex + sitemap: https://heartofgold.ship/sitemap.xml + put: + path: /sites/{site_id}/robots_txt + method: PUT + auth: true + docs: | + Replace the `robots.txt` configuration for various user agents. + + Required scope | `site_config:write` + source: + openapi: ../../../openapi/referenced-specs/v2.yml + path-parameters: + site_id: + type: string + docs: Unique identifier for a Site + display-name: Replace robots.txt + request: + body: root.Robots + content-type: application/json + response: + docs: Request was successful + type: root.Robots + errors: + - root.BadRequestError + - root.UnauthorizedError + - root.NotFoundError + - root.TooManyRequestsError + - root.InternalServerError + examples: + - path-parameters: + site_id: 580e63e98c9a982ac9b8b741 + request: + rules: + - userAgent: googlebot + allows: + - /public + disallows: + - /vogon-poetry + - /total-perspective-vortex + sitemap: https://heartofgold.ship/sitemap.xml + response: + body: + rules: + - userAgent: googlebot + allows: + - /public + disallows: + - /vogon-poetry + - /total-perspective-vortex + sitemap: https://heartofgold.ship/sitemap.xml + delete: + path: /sites/{site_id}/robots_txt + method: DELETE + auth: true + docs: > + Remove specific rules for a user-agent in your `robots.txt` file. To + delete all rules for a user-agent, provide an empty rule set. This will + remove the user-agent's entry entirely, leaving it subject to your + site's default crawling behavior. + + + **Note:** Deleting a user-agent with no rules will make the user-agent's + access unrestricted unless other directives apply. + + + Required scope: `site_config:write` + source: + openapi: ../../../openapi/referenced-specs/v2.yml + path-parameters: + site_id: + type: string + docs: Unique identifier for a Site + display-name: Delete robots.txt + request: + body: root.Robots + content-type: application/json + response: + docs: Request was successful + type: root.Robots + errors: + - root.BadRequestError + - root.UnauthorizedError + - root.NotFoundError + - root.TooManyRequestsError + - root.InternalServerError + examples: + - path-parameters: + site_id: 580e63e98c9a982ac9b8b741 + request: + rules: + - userAgent: '*' + allows: + - /public + disallows: + - /bubbles + response: + body: + rules: + - userAgent: googlebot + allows: + - /public + disallows: + - /vogon-poetry + - /total-perspective-vortex + sitemap: https://heartofgold.ship/sitemap.xml + patch: + path: /sites/{site_id}/robots_txt + method: PATCH + auth: true + docs: | + Update the `robots.txt` configuration for various user agents. + + Required scope | `site_config:write` + source: + openapi: ../../../openapi/referenced-specs/v2.yml + path-parameters: + site_id: + type: string + docs: Unique identifier for a Site + display-name: Update robots.txt + request: + body: root.Robots + content-type: application/json + response: + docs: Request was successful + type: root.Robots + errors: + - root.BadRequestError + - root.UnauthorizedError + - root.NotFoundError + - root.TooManyRequestsError + - root.InternalServerError + examples: + - path-parameters: + site_id: 580e63e98c9a982ac9b8b741 + request: + rules: + - userAgent: googlebot + allows: + - /public + disallows: + - /vogon-poetry + - /total-perspective-vortex + sitemap: https://heartofgold.ship/sitemap.xml + response: + body: + rules: + - userAgent: googlebot + allows: + - /public + disallows: + - /vogon-poetry + - /total-perspective-vortex + sitemap: https://heartofgold.ship/sitemap.xml + 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..7a0fa19a 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` @@ -593,6 +599,320 @@ await client.sites.publish("580e63e98c9a982ac9b8b741");
+## RobotsTxt + +
client.robotsTxt.get(siteId) -> Webflow.Robots +
+
+ +#### ๐Ÿ“ Description + +
+
+ +
+
+ +Retrieve the robots.txt configuration for various user agents. + +Required scope: `site_config:read` + +
+
+
+
+ +#### ๐Ÿ”Œ Usage + +
+
+ +
+
+ +```typescript +await client.robotsTxt.get("580e63e98c9a982ac9b8b741"); +``` + +
+
+
+
+ +#### โš™๏ธ Parameters + +
+
+ +
+
+ +**siteId:** `string` โ€” Unique identifier for a Site + +
+
+ +
+
+ +**requestOptions:** `RobotsTxt.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.robotsTxt.put(siteId, { ...params }) -> Webflow.Robots +
+
+ +#### ๐Ÿ“ Description + +
+
+ +
+
+ +Replace the `robots.txt` configuration for various user agents. + +Required scope | `site_config:write` + +
+
+
+
+ +#### ๐Ÿ”Œ Usage + +
+
+ +
+
+ +```typescript +await client.robotsTxt.put("580e63e98c9a982ac9b8b741", { + rules: [ + { + userAgent: "googlebot", + allows: ["/public"], + disallows: ["/vogon-poetry", "/total-perspective-vortex"], + }, + ], + sitemap: "https://heartofgold.ship/sitemap.xml", +}); +``` + +
+
+
+
+ +#### โš™๏ธ Parameters + +
+
+ +
+
+ +**siteId:** `string` โ€” Unique identifier for a Site + +
+
+ +
+
+ +**request:** `Webflow.Robots` + +
+
+ +
+
+ +**requestOptions:** `RobotsTxt.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.robotsTxt.delete(siteId, { ...params }) -> Webflow.Robots +
+
+ +#### ๐Ÿ“ Description + +
+
+ +
+
+ +Remove specific rules for a user-agent in your `robots.txt` file. To delete all rules for a user-agent, provide an empty rule set. This will remove the user-agent's entry entirely, leaving it subject to your site's default crawling behavior. + +**Note:** Deleting a user-agent with no rules will make the user-agent's access unrestricted unless other directives apply. + +Required scope: `site_config:write` + +
+
+
+
+ +#### ๐Ÿ”Œ Usage + +
+
+ +
+
+ +```typescript +await client.robotsTxt.delete("580e63e98c9a982ac9b8b741", { + rules: [ + { + userAgent: "*", + allows: ["/public"], + disallows: ["/bubbles"], + }, + ], +}); +``` + +
+
+
+
+ +#### โš™๏ธ Parameters + +
+
+ +
+
+ +**siteId:** `string` โ€” Unique identifier for a Site + +
+
+ +
+
+ +**request:** `Webflow.Robots` + +
+
+ +
+
+ +**requestOptions:** `RobotsTxt.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.robotsTxt.patch(siteId, { ...params }) -> Webflow.Robots +
+
+ +#### ๐Ÿ“ Description + +
+
+ +
+
+ +Update the `robots.txt` configuration for various user agents. + +Required scope | `site_config:write` + +
+
+
+
+ +#### ๐Ÿ”Œ Usage + +
+
+ +
+
+ +```typescript +await client.robotsTxt.patch("580e63e98c9a982ac9b8b741", { + rules: [ + { + userAgent: "googlebot", + allows: ["/public"], + disallows: ["/vogon-poetry", "/total-perspective-vortex"], + }, + ], + sitemap: "https://heartofgold.ship/sitemap.xml", +}); +``` + +
+
+
+
+ +#### โš™๏ธ Parameters + +
+
+ +
+
+ +**siteId:** `string` โ€” Unique identifier for a Site + +
+
+ +
+
+ +**request:** `Webflow.Robots` + +
+
+ +
+
+ +**requestOptions:** `RobotsTxt.RequestOptions` + +
+
+
+
+ +
+
+
+ ## Collections
client.collections.list(siteId) -> Webflow.CollectionList @@ -1131,10 +1451,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 +1913,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 +1998,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 +2097,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 +2166,11 @@ await client.scripts.list("580e63e98c9a982ac9b8b741");
-Add a script to a Site's Custom Code registry. +Register a hosted 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. -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:write` @@ -1935,13 +2248,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. +Register an inline script to a site. Inline scripts are limited to 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. - -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 +2331,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 +2396,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 +2478,7 @@ await client.assets.create("580e63e98c9a982ac9b8b741", {
-Get an Asset +Get details about an asset Required scope | `assets:read` @@ -2295,7 +2608,7 @@ await client.assets.delete("580e63fc8c9a982ac9b8b745");
-Update an Asset +Update details of an Asset. Required scope | `assets:write` @@ -3120,6 +3433,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 +5648,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 +5721,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 +5833,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 +5906,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 +5927,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 +5991,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. + +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` @@ -5683,9 +6068,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 +6180,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 +6345,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 +6843,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 +6908,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 +7001,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 +7074,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 +7143,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 +7221,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 +7298,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 +7388,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 +7455,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 +7532,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 +7601,11 @@ await client.sites.scripts.getCustomCode("580e63e98c9a982ac9b8b741");
-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. +Apply registered scripts 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` @@ -7306,9 +7694,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 +7759,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/Client.ts b/src/Client.ts index 8794a022..427fcfa9 100644 --- a/src/Client.ts +++ b/src/Client.ts @@ -6,6 +6,7 @@ import * as environments from "./environments"; import * as core from "./core"; import { Token } from "./api/resources/token/client/Client"; import { Sites } from "./api/resources/sites/client/Client"; +import { RobotsTxt } from "./api/resources/robotsTxt/client/Client"; import { Collections } from "./api/resources/collections/client/Client"; import { Pages } from "./api/resources/pages/client/Client"; import { Components } from "./api/resources/components/client/Client"; @@ -53,6 +54,12 @@ export class WebflowClient { return (this._sites ??= new Sites(this._options)); } + protected _robotsTxt: RobotsTxt | undefined; + + public get robotsTxt(): RobotsTxt { + return (this._robotsTxt ??= new RobotsTxt(this._options)); + } + protected _collections: Collections | undefined; public get collections(): Collections { 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/collections/resources/items/types/ItemsDeleteItemsLiveRequestItemsItem.ts b/src/api/resources/collections/resources/items/types/ItemsDeleteItemsLiveRequestItemsItem.ts index aff9bd08..074dd8a3 100644 --- a/src/api/resources/collections/resources/items/types/ItemsDeleteItemsLiveRequestItemsItem.ts +++ b/src/api/resources/collections/resources/items/types/ItemsDeleteItemsLiveRequestItemsItem.ts @@ -4,7 +4,7 @@ export interface ItemsDeleteItemsLiveRequestItemsItem { /** Unique identifier for the Item */ - itemId: string; + id: string; /** Array of identifiers for the locales where the item will be created */ cmsLocaleIds?: 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/index.ts b/src/api/resources/index.ts index b099c929..01984447 100644 --- a/src/api/resources/index.ts +++ b/src/api/resources/index.ts @@ -16,6 +16,7 @@ export * as inventory from "./inventory"; export * from "./inventory/types"; export * as collections from "./collections"; export * as token from "./token"; +export * as robotsTxt from "./robotsTxt"; export * as scripts from "./scripts"; export * as assets from "./assets"; export * as webhooks from "./webhooks"; 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/robotsTxt/client/Client.ts b/src/api/resources/robotsTxt/client/Client.ts new file mode 100644 index 00000000..5e0fec5a --- /dev/null +++ b/src/api/resources/robotsTxt/client/Client.ts @@ -0,0 +1,560 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as environments from "../../../../environments"; +import * as core from "../../../../core"; +import * as Webflow from "../../../index"; +import urlJoin from "url-join"; +import * as serializers from "../../../../serialization/index"; +import * as errors from "../../../../errors/index"; + +export declare namespace RobotsTxt { + interface Options { + environment?: core.Supplier; + accessToken: core.Supplier; + } + + interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ + timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ + maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Additional headers to include in the request. */ + headers?: Record; + } +} + +export class RobotsTxt { + constructor(protected readonly _options: RobotsTxt.Options) {} + + /** + * Retrieve the robots.txt configuration for various user agents. + * + * Required scope: `site_config:read` + * + * @param {string} siteId - Unique identifier for a Site + * @param {RobotsTxt.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Webflow.BadRequestError} + * @throws {@link Webflow.UnauthorizedError} + * @throws {@link Webflow.NotFoundError} + * @throws {@link Webflow.TooManyRequestsError} + * @throws {@link Webflow.InternalServerError} + * + * @example + * await client.robotsTxt.get("580e63e98c9a982ac9b8b741") + */ + public async get(siteId: string, requestOptions?: RobotsTxt.RequestOptions): Promise { + const _response = await core.fetcher({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + `sites/${encodeURIComponent(siteId)}/robots_txt` + ), + method: "GET", + 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 serializers.Robots.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }); + } + + 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 404: + throw new Webflow.NotFoundError( + serializers.Error_.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + 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 GET /sites/{site_id}/robots_txt."); + case "unknown": + throw new errors.WebflowError({ + message: _response.error.errorMessage, + }); + } + } + + /** + * Replace the `robots.txt` configuration for various user agents. + * + * Required scope | `site_config:write` + * + * @param {string} siteId - Unique identifier for a Site + * @param {Webflow.Robots} request + * @param {RobotsTxt.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Webflow.BadRequestError} + * @throws {@link Webflow.UnauthorizedError} + * @throws {@link Webflow.NotFoundError} + * @throws {@link Webflow.TooManyRequestsError} + * @throws {@link Webflow.InternalServerError} + * + * @example + * await client.robotsTxt.put("580e63e98c9a982ac9b8b741", { + * rules: [{ + * userAgent: "googlebot", + * allows: ["/public"], + * disallows: ["/vogon-poetry", "/total-perspective-vortex"] + * }], + * sitemap: "https://heartofgold.ship/sitemap.xml" + * }) + */ + public async put( + siteId: string, + request: Webflow.Robots, + requestOptions?: RobotsTxt.RequestOptions + ): Promise { + const _response = await core.fetcher({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + `sites/${encodeURIComponent(siteId)}/robots_txt` + ), + method: "PUT", + 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", + body: serializers.Robots.jsonOrThrow(request, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + }), + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return serializers.Robots.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }); + } + + 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 404: + throw new Webflow.NotFoundError( + serializers.Error_.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + 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 PUT /sites/{site_id}/robots_txt."); + case "unknown": + throw new errors.WebflowError({ + message: _response.error.errorMessage, + }); + } + } + + /** + * Remove specific rules for a user-agent in your `robots.txt` file. To delete all rules for a user-agent, provide an empty rule set. This will remove the user-agent's entry entirely, leaving it subject to your site's default crawling behavior. + * + * **Note:** Deleting a user-agent with no rules will make the user-agent's access unrestricted unless other directives apply. + * + * Required scope: `site_config:write` + * + * @param {string} siteId - Unique identifier for a Site + * @param {Webflow.Robots} request + * @param {RobotsTxt.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Webflow.BadRequestError} + * @throws {@link Webflow.UnauthorizedError} + * @throws {@link Webflow.NotFoundError} + * @throws {@link Webflow.TooManyRequestsError} + * @throws {@link Webflow.InternalServerError} + * + * @example + * await client.robotsTxt.delete("580e63e98c9a982ac9b8b741", { + * rules: [{ + * userAgent: "*", + * allows: ["/public"], + * disallows: ["/bubbles"] + * }] + * }) + */ + public async delete( + siteId: string, + request: Webflow.Robots, + requestOptions?: RobotsTxt.RequestOptions + ): Promise { + const _response = await core.fetcher({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + `sites/${encodeURIComponent(siteId)}/robots_txt` + ), + 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", + body: serializers.Robots.jsonOrThrow(request, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + }), + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return serializers.Robots.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }); + } + + 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 404: + throw new Webflow.NotFoundError( + serializers.Error_.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + 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 /sites/{site_id}/robots_txt." + ); + case "unknown": + throw new errors.WebflowError({ + message: _response.error.errorMessage, + }); + } + } + + /** + * Update the `robots.txt` configuration for various user agents. + * + * Required scope | `site_config:write` + * + * @param {string} siteId - Unique identifier for a Site + * @param {Webflow.Robots} request + * @param {RobotsTxt.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Webflow.BadRequestError} + * @throws {@link Webflow.UnauthorizedError} + * @throws {@link Webflow.NotFoundError} + * @throws {@link Webflow.TooManyRequestsError} + * @throws {@link Webflow.InternalServerError} + * + * @example + * await client.robotsTxt.patch("580e63e98c9a982ac9b8b741", { + * rules: [{ + * userAgent: "googlebot", + * allows: ["/public"], + * disallows: ["/vogon-poetry", "/total-perspective-vortex"] + * }], + * sitemap: "https://heartofgold.ship/sitemap.xml" + * }) + */ + public async patch( + siteId: string, + request: Webflow.Robots, + requestOptions?: RobotsTxt.RequestOptions + ): Promise { + const _response = await core.fetcher({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + `sites/${encodeURIComponent(siteId)}/robots_txt` + ), + method: "PATCH", + 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", + body: serializers.Robots.jsonOrThrow(request, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + }), + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return serializers.Robots.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }); + } + + 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 404: + throw new Webflow.NotFoundError( + serializers.Error_.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + 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 PATCH /sites/{site_id}/robots_txt." + ); + case "unknown": + throw new errors.WebflowError({ + message: _response.error.errorMessage, + }); + } + } + + protected async _getAuthorizationHeader(): Promise { + return `Bearer ${await core.Supplier.get(this._options.accessToken)}`; + } +} diff --git a/src/api/resources/robotsTxt/client/index.ts b/src/api/resources/robotsTxt/client/index.ts new file mode 100644 index 00000000..cb0ff5c3 --- /dev/null +++ b/src/api/resources/robotsTxt/client/index.ts @@ -0,0 +1 @@ +export {}; diff --git a/src/api/resources/robotsTxt/index.ts b/src/api/resources/robotsTxt/index.ts new file mode 100644 index 00000000..5ec76921 --- /dev/null +++ b/src/api/resources/robotsTxt/index.ts @@ -0,0 +1 @@ +export * from "./client"; 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/Robots.ts b/src/api/types/Robots.ts new file mode 100644 index 00000000..12242d47 --- /dev/null +++ b/src/api/types/Robots.ts @@ -0,0 +1,15 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Webflow from "../index"; + +/** + * The robots.txt file for a given site + */ +export interface Robots { + /** List of rules for user agents. */ + rules?: Webflow.RobotsRulesItem[]; + /** URL to the sitemap. */ + sitemap?: string; +} diff --git a/src/api/types/RobotsRulesItem.ts b/src/api/types/RobotsRulesItem.ts new file mode 100644 index 00000000..ce55b003 --- /dev/null +++ b/src/api/types/RobotsRulesItem.ts @@ -0,0 +1,12 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export interface RobotsRulesItem { + /** The user agent the rules apply to. */ + userAgent: string; + /** List of paths allowed for this user agent. */ + allows?: string[]; + /** List of paths disallowed for this user agent. */ + disallows?: string[]; +} 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..edcf942f 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](/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..128aab95 100644 --- a/src/api/types/index.ts +++ b/src/api/types/index.ts @@ -26,6 +26,8 @@ export * from "./Redirects"; export * from "./SitePlanId"; export * from "./SitePlanName"; export * from "./SitePlan"; +export * from "./RobotsRulesItem"; +export * from "./Robots"; export * from "./SiteActivityLogItemEvent"; export * from "./SiteActivityLogItemResourceOperation"; export * from "./SiteActivityLogItemUser"; @@ -45,6 +47,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/collections/resources/items/types/ItemsDeleteItemsLiveRequestItemsItem.ts b/src/serialization/resources/collections/resources/items/types/ItemsDeleteItemsLiveRequestItemsItem.ts index 5bb4a2da..393ada46 100644 --- a/src/serialization/resources/collections/resources/items/types/ItemsDeleteItemsLiveRequestItemsItem.ts +++ b/src/serialization/resources/collections/resources/items/types/ItemsDeleteItemsLiveRequestItemsItem.ts @@ -10,13 +10,13 @@ export const ItemsDeleteItemsLiveRequestItemsItem: core.serialization.ObjectSche serializers.collections.ItemsDeleteItemsLiveRequestItemsItem.Raw, Webflow.collections.ItemsDeleteItemsLiveRequestItemsItem > = core.serialization.object({ - itemId: core.serialization.string(), + id: core.serialization.string(), cmsLocaleIds: core.serialization.list(core.serialization.string()).optional(), }); export declare namespace ItemsDeleteItemsLiveRequestItemsItem { interface Raw { - itemId: string; + id: string; cmsLocaleIds?: string[] | null; } } 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/Robots.ts b/src/serialization/types/Robots.ts new file mode 100644 index 00000000..fa80aace --- /dev/null +++ b/src/serialization/types/Robots.ts @@ -0,0 +1,21 @@ +/** + * 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"; +import { RobotsRulesItem } from "./RobotsRulesItem"; + +export const Robots: core.serialization.ObjectSchema = + core.serialization.object({ + rules: core.serialization.list(RobotsRulesItem).optional(), + sitemap: core.serialization.string().optional(), + }); + +export declare namespace Robots { + interface Raw { + rules?: RobotsRulesItem.Raw[] | null; + sitemap?: string | null; + } +} diff --git a/src/serialization/types/RobotsRulesItem.ts b/src/serialization/types/RobotsRulesItem.ts new file mode 100644 index 00000000..854c6d13 --- /dev/null +++ b/src/serialization/types/RobotsRulesItem.ts @@ -0,0 +1,24 @@ +/** + * 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 RobotsRulesItem: core.serialization.ObjectSchema< + serializers.RobotsRulesItem.Raw, + Webflow.RobotsRulesItem +> = core.serialization.object({ + userAgent: core.serialization.string(), + allows: core.serialization.list(core.serialization.string()).optional(), + disallows: core.serialization.list(core.serialization.string()).optional(), +}); + +export declare namespace RobotsRulesItem { + interface Raw { + userAgent: string; + allows?: string[] | null; + disallows?: string[] | null; + } +} 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..128aab95 100644 --- a/src/serialization/types/index.ts +++ b/src/serialization/types/index.ts @@ -26,6 +26,8 @@ export * from "./Redirects"; export * from "./SitePlanId"; export * from "./SitePlanName"; export * from "./SitePlan"; +export * from "./RobotsRulesItem"; +export * from "./Robots"; export * from "./SiteActivityLogItemEvent"; export * from "./SiteActivityLogItemResourceOperation"; export * from "./SiteActivityLogItemUser"; @@ -45,6 +47,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..351b88b1 100644 --- a/yarn.lock +++ b/yarn.lock @@ -10,7 +10,7 @@ "@jridgewell/gen-mapping" "^0.3.5" "@jridgewell/trace-mapping" "^0.3.24" -"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.12.13", "@babel/code-frame@^7.25.9", "@babel/code-frame@^7.26.0", "@babel/code-frame@^7.26.2": +"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.12.13", "@babel/code-frame@^7.25.9", "@babel/code-frame@^7.26.2": version "7.26.2" resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.26.2.tgz#4b5fab97d33338eff916235055f0ebc21e573a85" integrity sha512-RJlIHRueQgwWitWgF8OdFYGZX328Ax5BCemNGlqHfplnRT9ESi8JkFlvaVYbS+UubVY6dpv87Fs2u5M29iNFVQ== @@ -25,27 +25,27 @@ integrity sha512-XvcZi1KWf88RVbF9wn8MN6tYFloU5qX8KjuF3E1PVBmJ9eypXfs4GRiJwLuTZL0iSnJUKn1BFPa5BPZZJyFzPg== "@babel/core@^7.11.6", "@babel/core@^7.12.3", "@babel/core@^7.23.9": - version "7.26.0" - resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.26.0.tgz#d78b6023cc8f3114ccf049eb219613f74a747b40" - integrity sha512-i1SLeK+DzNnQ3LL/CswPCa/E5u4lh1k6IAEphON8F+cXt0t9euTshDru0q7/IqMa1PMPz5RnHuHscF8/ZJsStg== + version "7.26.7" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.26.7.tgz#0439347a183b97534d52811144d763a17f9d2b24" + integrity sha512-SRijHmF0PSPgLIBYlWnG0hyeJLwXE2CgpsXaMOrtt2yp9/86ALw6oUlj9KYuZ0JN07T4eBMVIW4li/9S1j2BGA== dependencies: "@ampproject/remapping" "^2.2.0" - "@babel/code-frame" "^7.26.0" - "@babel/generator" "^7.26.0" - "@babel/helper-compilation-targets" "^7.25.9" + "@babel/code-frame" "^7.26.2" + "@babel/generator" "^7.26.5" + "@babel/helper-compilation-targets" "^7.26.5" "@babel/helper-module-transforms" "^7.26.0" - "@babel/helpers" "^7.26.0" - "@babel/parser" "^7.26.0" + "@babel/helpers" "^7.26.7" + "@babel/parser" "^7.26.7" "@babel/template" "^7.25.9" - "@babel/traverse" "^7.25.9" - "@babel/types" "^7.26.0" + "@babel/traverse" "^7.26.7" + "@babel/types" "^7.26.7" convert-source-map "^2.0.0" debug "^4.1.0" gensync "^1.0.0-beta.2" json5 "^2.2.3" semver "^6.3.1" -"@babel/generator@^7.26.0", "@babel/generator@^7.26.5", "@babel/generator@^7.7.2": +"@babel/generator@^7.26.5", "@babel/generator@^7.7.2": version "7.26.5" resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.26.5.tgz#e44d4ab3176bbcaf78a5725da5f1dc28802a9458" integrity sha512-2caSP6fN9I7HOe6nqhtft7V4g7/V/gfDsC3Ag4W7kEzzvRGKqiv0pu0HogPiZ3KaVSoNDhUws6IJjDjpfmYIXw== @@ -56,7 +56,7 @@ "@jridgewell/trace-mapping" "^0.3.25" jsesc "^3.0.2" -"@babel/helper-compilation-targets@^7.25.9": +"@babel/helper-compilation-targets@^7.26.5": version "7.26.5" resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.26.5.tgz#75d92bb8d8d51301c0d49e52a65c9a7fe94514d8" integrity sha512-IXuyn5EkouFJscIDuFF5EsiSolseme1s0CZB+QxVugqJLYmKdxI1VfIBOst0SUu4rnk2Z7kqTwmoO1lp3HIfnA== @@ -104,20 +104,20 @@ resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.25.9.tgz#86e45bd8a49ab7e03f276577f96179653d41da72" integrity sha512-e/zv1co8pp55dNdEcCynfj9X7nyUKUXoUEwfXqaZt0omVOmDe9oOTdKStH4GmAw6zxMFs50ZayuMfHDKlO7Tfw== -"@babel/helpers@^7.26.0": - version "7.26.0" - resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.26.0.tgz#30e621f1eba5aa45fe6f4868d2e9154d884119a4" - integrity sha512-tbhNuIxNcVb21pInl3ZSjksLCvgdZy9KwJ8brv993QtIVKJBBkYXz4q4ZbAv31GdnC+R90np23L5FbEBlthAEw== +"@babel/helpers@^7.26.7": + version "7.26.7" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.26.7.tgz#fd1d2a7c431b6e39290277aacfd8367857c576a4" + integrity sha512-8NHiL98vsi0mbPQmYAGWwfcFaOy4j2HY49fXJCfuDcdE7fMIsH9a7GdaeXpIBsbT7307WU8KCMp5pUVDNL4f9A== dependencies: "@babel/template" "^7.25.9" - "@babel/types" "^7.26.0" + "@babel/types" "^7.26.7" -"@babel/parser@^7.1.0", "@babel/parser@^7.14.7", "@babel/parser@^7.20.7", "@babel/parser@^7.23.9", "@babel/parser@^7.25.9", "@babel/parser@^7.26.0", "@babel/parser@^7.26.5": - version "7.26.5" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.26.5.tgz#6fec9aebddef25ca57a935c86dbb915ae2da3e1f" - integrity sha512-SRJ4jYmXRqV1/Xc+TIVG84WjHBXKlxO9sHQnA2Pf12QQEAp1LOh6kDzNHXcUnbH1QI0FDoPPVOt+vyUDucxpaw== +"@babel/parser@^7.1.0", "@babel/parser@^7.14.7", "@babel/parser@^7.20.7", "@babel/parser@^7.23.9", "@babel/parser@^7.25.9", "@babel/parser@^7.26.5", "@babel/parser@^7.26.7": + version "7.26.7" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.26.7.tgz#e114cd099e5f7d17b05368678da0fb9f69b3385c" + integrity sha512-kEvgGGgEjRUutvdVvZhbn/BxVt+5VSpwXz1j3WYXQbXDo8KzFOPNG2GQbdAiNq8g6wn1yKk7C/qrke03a84V+w== dependencies: - "@babel/types" "^7.26.5" + "@babel/types" "^7.26.7" "@babel/plugin-syntax-async-generators@^7.8.4": version "7.8.4" @@ -247,23 +247,23 @@ "@babel/parser" "^7.25.9" "@babel/types" "^7.25.9" -"@babel/traverse@^7.25.9": - version "7.26.5" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.26.5.tgz#6d0be3e772ff786456c1a37538208286f6e79021" - integrity sha512-rkOSPOw+AXbgtwUga3U4u8RpoK9FEFWBNAlTpcnkLFjL5CT+oyHNuUUC/xx6XefEJ16r38r8Bc/lfp6rYuHeJQ== +"@babel/traverse@^7.25.9", "@babel/traverse@^7.26.7": + version "7.26.7" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.26.7.tgz#99a0a136f6a75e7fb8b0a1ace421e0b25994b8bb" + integrity sha512-1x1sgeyRLC3r5fQOM0/xtQKsYjyxmFjaOrLJNtZ81inNjyJHGIolTULPiSc/2qe1/qfpFLisLQYFnnZl7QoedA== dependencies: "@babel/code-frame" "^7.26.2" "@babel/generator" "^7.26.5" - "@babel/parser" "^7.26.5" + "@babel/parser" "^7.26.7" "@babel/template" "^7.25.9" - "@babel/types" "^7.26.5" + "@babel/types" "^7.26.7" debug "^4.3.1" globals "^11.1.0" -"@babel/types@^7.0.0", "@babel/types@^7.20.7", "@babel/types@^7.25.9", "@babel/types@^7.26.0", "@babel/types@^7.26.5", "@babel/types@^7.3.3": - version "7.26.5" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.26.5.tgz#7a1e1c01d28e26d1fe7f8ec9567b3b92b9d07747" - integrity sha512-L6mZmwFDK6Cjh1nRCLXpa6no13ZIioJDz7mdkzHv399pThrTa/k0nUlNaenOeh2kWu/iaOQYElEpKPUswUa9Vg== +"@babel/types@^7.0.0", "@babel/types@^7.20.7", "@babel/types@^7.25.9", "@babel/types@^7.26.5", "@babel/types@^7.26.7", "@babel/types@^7.3.3": + version "7.26.7" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.26.7.tgz#5e2b89c0768e874d4d061961f3a5a153d71dc17a" + integrity sha512-t8kDRGrKXyp6+tjUh7hw2RLyclsW4TRoRvRHtSyAX9Bb5ldlFh+90YAYY6awRXrlB4G5G2izNeGySpATlFzmOg== dependencies: "@babel/helper-string-parser" "^7.25.9" "@babel/helper-validator-identifier" "^7.25.9" @@ -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.13.1" + resolved "https://registry.yarnpkg.com/@types/node/-/node-22.13.1.tgz#a2a3fefbdeb7ba6b89f40371842162fac0934f33" + integrity sha512-jK8uzQlrvXqEU91UxiK5J7pKHyzgnI1Qnl0QDHIgVGuolJhRb9EEl28Cj9b3rGR8B2lhFCtvIm5os8lFnO/1Ew== dependencies: undici-types "~6.20.0" @@ -1117,9 +1117,9 @@ camelcase@^6.2.0: integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA== caniuse-lite@^1.0.30001688: - version "1.0.30001692" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001692.tgz#4585729d95e6b95be5b439da6ab55250cd125bf9" - integrity sha512-A95VKan0kdtrsnMubMKxEKUKImOPSuCpYgxSQBo036P5YYgVIcOYJEgt/txJWqObiRQeISNCfef9nvlQ0vbV7A== + version "1.0.30001697" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001697.tgz#040bbbb54463c4b4b3377c716b34a322d16e6fc7" + integrity sha512-GwNPlWJin8E+d7Gxq96jxM6w0w+VFeyyXRsjU58emtkYqnbwHqXm5uT2uCmO0RQE9htWknOP4xtBlLmM/gWxvQ== chalk@^4.0.0, chalk@^4.1.0: version "4.1.2" @@ -1145,9 +1145,9 @@ ci-info@^3.2.0: integrity sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ== cjs-module-lexer@^1.0.0: - version "1.4.1" - resolved "https://registry.yarnpkg.com/cjs-module-lexer/-/cjs-module-lexer-1.4.1.tgz#707413784dbb3a72aa11c2f2b042a0bef4004170" - integrity sha512-cuSVIHi9/9E/+821Qjdvngor+xpnlwnuwIyZOaLmHBVdXL+gP+I6QQB9VkO7RI77YIcTV+S1W9AreJ5eN63JBA== + version "1.4.3" + resolved "https://registry.yarnpkg.com/cjs-module-lexer/-/cjs-module-lexer-1.4.3.tgz#0f79731eb8cfe1ec72acd4066efac9d61991b00d" + integrity sha512-9z8TZaGM1pfswYeXrUpzPrkx8UnWYdhJclsiYMm6x/w5+nN+8Tf/LnAgfLGQCm59qAOxU8WwHEq2vNwF6i4j+Q== cliui@^8.0.1: version "8.0.1" @@ -1258,9 +1258,9 @@ debug@4, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1: ms "^2.1.3" decimal.js@^10.4.2: - version "10.4.3" - resolved "https://registry.yarnpkg.com/decimal.js/-/decimal.js-10.4.3.tgz#1044092884d245d1b7f65725fa4ad4c6f781cc23" - integrity sha512-VBBaLc1MgL5XpzgIP7ny5Z6Nx3UrRkIViUkPUdtl9aya5amy3De1gsUUSB1g3+3sExYNjCAsAznmukyxCb1GRA== + version "10.5.0" + resolved "https://registry.yarnpkg.com/decimal.js/-/decimal.js-10.5.0.tgz#0f371c7cf6c4898ce0afb09836db73cd82010f22" + integrity sha512-8vDa8Qxvr/+d94hSh5P3IJwI5t8/c0KsMp+g8bNw9cY2icONa5aPfvKeieW1WlG0WQYwwhJ7mjui2xtiePQSXw== dedent@^1.0.0: version "1.5.3" @@ -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.91" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.5.91.tgz#cf5567f6853062493242133aefd4dc8dc8440abd" + integrity sha512-sNSHHyq048PFmZY4S90ax61q+gLCs0X0YmcOII9wG9S2XwbVr+h4VW2wWhnbp/Eys3cCwTxVF292W3qPaxIapQ== 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" @@ -1468,9 +1468,9 @@ fast-json-stable-stringify@2.x, fast-json-stable-stringify@^2.0.0, fast-json-sta integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== fast-uri@^3.0.1: - version "3.0.5" - resolved "https://registry.yarnpkg.com/fast-uri/-/fast-uri-3.0.5.tgz#19f5f9691d0dab9b85861a7bb5d98fca961da9cd" - integrity sha512-5JnBCWpFlMo0a3ciDy/JckMzzv1U9coZrIhedq+HXxxUfDTAiS0LA8OKVao4G9BxmCVck/jtA5r3KAtRWEyD8Q== + version "3.0.6" + resolved "https://registry.yarnpkg.com/fast-uri/-/fast-uri-3.0.6.tgz#88f130b77cfaea2378d56bf970dea21257a68748" + integrity sha512-Atfo14OibSv5wAp4VWNsFYE1AchQRTv9cBGWET4pZWHzYshFSS9NQI6I57rdKn9croWVMbYFbLhJ+yJvmZIIHw== fb-watchman@^2.0.0: version "2.0.2" @@ -2659,9 +2659,9 @@ semver@^6.3.0, semver@^6.3.1: integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA== semver@^7.3.4, semver@^7.5.3, semver@^7.5.4: - version "7.6.3" - resolved "https://registry.yarnpkg.com/semver/-/semver-7.6.3.tgz#980f7b5550bc175fb4dc09403085627f9eb33143" - integrity sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A== + version "7.7.1" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.7.1.tgz#abd5098d82b18c6c81f6074ff2647fd3e7220c9f" + integrity sha512-hlq8tAfn0m/61p4BVRcPzIGr6LKiMwo4VM6dGi6pt4qcRkmNzTcWq6eCEjEh+qXjkMDvPlOFFSGwQjoEa6gyMA== serialize-javascript@^6.0.2: version "6.0.2"