From 9a19571be69d60bb397b1aaf604d3d0cc73efc41 Mon Sep 17 00:00:00 2001 From: fern-api <115122769+fern-api[bot]@users.noreply.github.com> Date: Wed, 9 Apr 2025 14:15:41 +0000 Subject: [PATCH] SDK regeneration --- .mock/definition/__package__.yml | 236 +++++++- .mock/definition/api.yml | 11 +- .mock/definition/collections/items.yml | 25 +- .mock/definition/products.yml | 198 +++++-- .mock/definition/sites/comments.yml | 216 +++++++ .mock/definition/sites/comments/replies.yml | 106 ++++ .mock/definition/sites/robotsTxt.yml | 25 +- .mock/definition/sites/wellKnown.yml | 114 ++++ .mock/fern.config.json | 2 +- package.json | 7 +- reference.md | 556 +++++++++++++++++- src/Client.ts | 2 +- .../resources/accessGroups/client/Client.ts | 8 +- src/api/resources/assets/client/Client.ts | 50 +- .../resources/collections/client/Client.ts | 26 +- .../resources/fields/client/Client.ts | 23 +- .../resources/items/client/Client.ts | 136 +++-- .../requests/ItemsDeleteItemsLiveRequest.ts | 8 +- .../requests/ItemsDeleteItemsRequest.ts | 8 +- src/api/resources/components/client/Client.ts | 32 +- src/api/resources/ecommerce/client/Client.ts | 8 +- src/api/resources/forms/client/Client.ts | 44 +- src/api/resources/inventory/client/Client.ts | 14 +- src/api/resources/orders/client/Client.ts | 38 +- src/api/resources/pages/client/Client.ts | 32 +- .../pages/resources/scripts/client/Client.ts | 20 +- src/api/resources/products/client/Client.ts | 134 ++++- .../client/requests/ProductSkuCreate.ts | 60 +- .../requests/ProductsCreateSkuRequest.ts | 12 +- .../requests/ProductsUpdateSkuRequest.ts | 12 +- .../products/types/ProductSkuCreateProduct.ts | 9 + .../products/types/ProductSkuCreateSku.ts | 9 + .../types/ProductsCreateSkuResponse.ts | 2 +- src/api/resources/products/types/index.ts | 2 + src/api/resources/scripts/client/Client.ts | 20 +- src/api/resources/sites/client/Client.ts | 58 +- src/api/resources/sites/index.ts | 2 +- .../resources/activityLogs/client/Client.ts | 8 +- .../sites/resources/comments/client/Client.ts | 341 +++++++++++ .../sites/resources/comments/client/index.ts | 1 + .../CommentsGetCommentThreadRequest.ts | 34 ++ .../CommentsListCommentThreadsRequest.ts | 34 ++ .../comments/client/requests/index.ts | 2 + .../sites/resources/comments/index.ts | 3 + .../resources/comments/resources/index.ts | 3 + .../resources/replies/client/Client.ts | 187 ++++++ .../resources/replies/client/index.ts | 1 + .../requests/RepliesListRepliesRequest.ts | 34 ++ .../replies/client/requests/index.ts | 1 + .../comments/resources/replies/index.ts | 2 + .../types/RepliesListRepliesRequestSortBy.ts | 10 + .../RepliesListRepliesRequestSortOrder.ts | 10 + .../comments/resources/replies/types/index.ts | 2 + .../CommentsGetCommentThreadRequestSortBy.ts | 10 + ...ommentsGetCommentThreadRequestSortOrder.ts | 10 + ...CommentsListCommentThreadsRequestSortBy.ts | 10 + ...mentsListCommentThreadsRequestSortOrder.ts | 10 + .../sites/resources/comments/types/index.ts | 4 + src/api/resources/sites/resources/index.ts | 6 + .../sites/resources/plans/client/Client.ts | 8 +- .../resources/redirects/client/Client.ts | 26 +- .../resources/robotsTxt/client/Client.ts | 34 +- .../sites/resources/scripts/client/Client.ts | 26 +- .../resources/wellKnown/client/Client.ts | 296 ++++++++++ .../sites/resources/wellKnown/client/index.ts | 1 + .../client/requests/WellKnownDeleteRequest.ts | 12 + .../client/requests/WellKnownFile.ts | 21 + .../wellKnown/client/requests/index.ts | 2 + .../sites/resources/wellKnown/index.ts | 2 + .../types/WellKnownFileContentType.ts | 13 + .../sites/resources/wellKnown/types/index.ts | 1 + src/api/resources/token/client/Client.ts | 14 +- src/api/resources/users/client/Client.ts | 32 +- src/api/resources/webhooks/client/Client.ts | 26 +- src/api/types/Asset.ts | 20 +- src/api/types/AssetVariant.ts | 14 +- src/api/types/Collection.ts | 4 +- src/api/types/CollectionItem.ts | 6 +- src/api/types/CommentReply.ts | 34 ++ src/api/types/CommentReplyAuthor.ts | 12 + src/api/types/CommentReplyList.ts | 13 + src/api/types/CommentReplyListPagination.ts | 12 + .../types/CommentReplyMentionedUsersItem.ts | 12 + src/api/types/CommentThread.ts | 36 ++ src/api/types/CommentThreadAuthor.ts | 12 + src/api/types/CommentThreadList.ts | 13 + src/api/types/CommentThreadListPagination.ts | 12 + .../types/CommentThreadMentionedUsersItem.ts | 12 + src/api/types/ComponentNode.ts | 6 +- src/api/types/FieldType.ts | 4 + src/api/types/ImageNode.ts | 4 +- src/api/types/Pagination.ts | 6 +- src/api/types/SkuFieldData.ts | 6 + src/api/types/SkuFieldDataPrice.ts | 2 + src/api/types/SkuValueList.ts | 2 +- src/api/types/TextNode.ts | 4 +- src/api/types/index.ts | 10 + src/environments.ts | 18 +- .../requests/ItemsDeleteItemsLiveRequest.ts | 4 +- .../requests/ItemsDeleteItemsRequest.ts | 4 +- .../client/requests/ProductSkuCreate.ts | 12 +- .../products/types/ProductSkuCreateProduct.ts | 21 + .../products/types/ProductSkuCreateSku.ts | 21 + .../types/ProductsCreateSkuResponse.ts | 4 +- .../resources/products/types/index.ts | 2 + src/serialization/resources/sites/index.ts | 1 + .../sites/resources/comments/index.ts | 2 + .../resources/comments/resources/index.ts | 2 + .../comments/resources/replies/index.ts | 1 + .../types/RepliesListRepliesRequestSortBy.ts | 16 + .../RepliesListRepliesRequestSortOrder.ts | 16 + .../comments/resources/replies/types/index.ts | 2 + .../CommentsGetCommentThreadRequestSortBy.ts | 16 + ...ommentsGetCommentThreadRequestSortOrder.ts | 16 + ...CommentsListCommentThreadsRequestSortBy.ts | 16 + ...mentsListCommentThreadsRequestSortOrder.ts | 16 + .../sites/resources/comments/types/index.ts | 4 + .../resources/sites/resources/index.ts | 5 + .../sites/resources/wellKnown/client/index.ts | 1 + .../client/requests/WellKnownDeleteRequest.ts | 20 + .../client/requests/WellKnownFile.ts | 25 + .../wellKnown/client/requests/index.ts | 2 + .../sites/resources/wellKnown/index.ts | 2 + .../types/WellKnownFileContentType.ts | 16 + .../sites/resources/wellKnown/types/index.ts | 1 + src/serialization/types/Asset.ts | 40 +- src/serialization/types/AssetVariant.ts | 28 +- src/serialization/types/Collection.ts | 8 +- src/serialization/types/CollectionItem.ts | 12 +- src/serialization/types/CommentReply.ts | 42 ++ src/serialization/types/CommentReplyAuthor.ts | 24 + src/serialization/types/CommentReplyList.ts | 24 + .../types/CommentReplyListPagination.ts | 24 + .../types/CommentReplyMentionedUsersItem.ts | 24 + src/serialization/types/CommentThread.ts | 44 ++ .../types/CommentThreadAuthor.ts | 24 + src/serialization/types/CommentThreadList.ts | 24 + .../types/CommentThreadListPagination.ts | 24 + .../types/CommentThreadMentionedUsersItem.ts | 24 + src/serialization/types/ComponentNode.ts | 12 +- src/serialization/types/FieldType.ts | 4 + src/serialization/types/ImageNode.ts | 8 +- src/serialization/types/Pagination.ts | 12 +- src/serialization/types/SkuFieldData.ts | 10 + src/serialization/types/SkuFieldDataPrice.ts | 2 + src/serialization/types/TextNode.ts | 8 +- src/serialization/types/index.ts | 10 + src/version.ts | 2 +- yarn.lock | 138 ++--- 149 files changed, 3987 insertions(+), 609 deletions(-) create mode 100644 .mock/definition/sites/comments.yml create mode 100644 .mock/definition/sites/comments/replies.yml create mode 100644 .mock/definition/sites/wellKnown.yml create mode 100644 src/api/resources/products/types/ProductSkuCreateProduct.ts create mode 100644 src/api/resources/products/types/ProductSkuCreateSku.ts create mode 100644 src/api/resources/sites/resources/comments/client/Client.ts create mode 100644 src/api/resources/sites/resources/comments/client/index.ts create mode 100644 src/api/resources/sites/resources/comments/client/requests/CommentsGetCommentThreadRequest.ts create mode 100644 src/api/resources/sites/resources/comments/client/requests/CommentsListCommentThreadsRequest.ts create mode 100644 src/api/resources/sites/resources/comments/client/requests/index.ts create mode 100644 src/api/resources/sites/resources/comments/index.ts create mode 100644 src/api/resources/sites/resources/comments/resources/index.ts create mode 100644 src/api/resources/sites/resources/comments/resources/replies/client/Client.ts create mode 100644 src/api/resources/sites/resources/comments/resources/replies/client/index.ts create mode 100644 src/api/resources/sites/resources/comments/resources/replies/client/requests/RepliesListRepliesRequest.ts create mode 100644 src/api/resources/sites/resources/comments/resources/replies/client/requests/index.ts create mode 100644 src/api/resources/sites/resources/comments/resources/replies/index.ts create mode 100644 src/api/resources/sites/resources/comments/resources/replies/types/RepliesListRepliesRequestSortBy.ts create mode 100644 src/api/resources/sites/resources/comments/resources/replies/types/RepliesListRepliesRequestSortOrder.ts create mode 100644 src/api/resources/sites/resources/comments/resources/replies/types/index.ts create mode 100644 src/api/resources/sites/resources/comments/types/CommentsGetCommentThreadRequestSortBy.ts create mode 100644 src/api/resources/sites/resources/comments/types/CommentsGetCommentThreadRequestSortOrder.ts create mode 100644 src/api/resources/sites/resources/comments/types/CommentsListCommentThreadsRequestSortBy.ts create mode 100644 src/api/resources/sites/resources/comments/types/CommentsListCommentThreadsRequestSortOrder.ts create mode 100644 src/api/resources/sites/resources/comments/types/index.ts create mode 100644 src/api/resources/sites/resources/wellKnown/client/Client.ts create mode 100644 src/api/resources/sites/resources/wellKnown/client/index.ts create mode 100644 src/api/resources/sites/resources/wellKnown/client/requests/WellKnownDeleteRequest.ts create mode 100644 src/api/resources/sites/resources/wellKnown/client/requests/WellKnownFile.ts create mode 100644 src/api/resources/sites/resources/wellKnown/client/requests/index.ts create mode 100644 src/api/resources/sites/resources/wellKnown/index.ts create mode 100644 src/api/resources/sites/resources/wellKnown/types/WellKnownFileContentType.ts create mode 100644 src/api/resources/sites/resources/wellKnown/types/index.ts create mode 100644 src/api/types/CommentReply.ts create mode 100644 src/api/types/CommentReplyAuthor.ts create mode 100644 src/api/types/CommentReplyList.ts create mode 100644 src/api/types/CommentReplyListPagination.ts create mode 100644 src/api/types/CommentReplyMentionedUsersItem.ts create mode 100644 src/api/types/CommentThread.ts create mode 100644 src/api/types/CommentThreadAuthor.ts create mode 100644 src/api/types/CommentThreadList.ts create mode 100644 src/api/types/CommentThreadListPagination.ts create mode 100644 src/api/types/CommentThreadMentionedUsersItem.ts create mode 100644 src/serialization/resources/products/types/ProductSkuCreateProduct.ts create mode 100644 src/serialization/resources/products/types/ProductSkuCreateSku.ts create mode 100644 src/serialization/resources/sites/resources/comments/index.ts create mode 100644 src/serialization/resources/sites/resources/comments/resources/index.ts create mode 100644 src/serialization/resources/sites/resources/comments/resources/replies/index.ts create mode 100644 src/serialization/resources/sites/resources/comments/resources/replies/types/RepliesListRepliesRequestSortBy.ts create mode 100644 src/serialization/resources/sites/resources/comments/resources/replies/types/RepliesListRepliesRequestSortOrder.ts create mode 100644 src/serialization/resources/sites/resources/comments/resources/replies/types/index.ts create mode 100644 src/serialization/resources/sites/resources/comments/types/CommentsGetCommentThreadRequestSortBy.ts create mode 100644 src/serialization/resources/sites/resources/comments/types/CommentsGetCommentThreadRequestSortOrder.ts create mode 100644 src/serialization/resources/sites/resources/comments/types/CommentsListCommentThreadsRequestSortBy.ts create mode 100644 src/serialization/resources/sites/resources/comments/types/CommentsListCommentThreadsRequestSortOrder.ts create mode 100644 src/serialization/resources/sites/resources/comments/types/index.ts create mode 100644 src/serialization/resources/sites/resources/index.ts create mode 100644 src/serialization/resources/sites/resources/wellKnown/client/index.ts create mode 100644 src/serialization/resources/sites/resources/wellKnown/client/requests/WellKnownDeleteRequest.ts create mode 100644 src/serialization/resources/sites/resources/wellKnown/client/requests/WellKnownFile.ts create mode 100644 src/serialization/resources/sites/resources/wellKnown/client/requests/index.ts create mode 100644 src/serialization/resources/sites/resources/wellKnown/index.ts create mode 100644 src/serialization/resources/sites/resources/wellKnown/types/WellKnownFileContentType.ts create mode 100644 src/serialization/resources/sites/resources/wellKnown/types/index.ts create mode 100644 src/serialization/types/CommentReply.ts create mode 100644 src/serialization/types/CommentReplyAuthor.ts create mode 100644 src/serialization/types/CommentReplyList.ts create mode 100644 src/serialization/types/CommentReplyListPagination.ts create mode 100644 src/serialization/types/CommentReplyMentionedUsersItem.ts create mode 100644 src/serialization/types/CommentThread.ts create mode 100644 src/serialization/types/CommentThreadAuthor.ts create mode 100644 src/serialization/types/CommentThreadList.ts create mode 100644 src/serialization/types/CommentThreadListPagination.ts create mode 100644 src/serialization/types/CommentThreadMentionedUsersItem.ts diff --git a/.mock/definition/__package__.yml b/.mock/definition/__package__.yml index 17f9d9c5..98e8afe5 100644 --- a/.mock/definition/__package__.yml +++ b/.mock/definition/__package__.yml @@ -754,11 +754,13 @@ types: - DateTime - Email - ExtFileRef + - File - Image - Link - MultiImage - MultiReference - Number + - Option - Phone - PlainText - Reference @@ -1132,6 +1134,222 @@ types: fieldData: optional source: openapi: ../../../openapi/referenced-specs/v2.yml + CommentThreadAuthor: + properties: + userId: + type: string + docs: The unique identifier of the author + email: + type: string + docs: Email of the author + name: + type: string + docs: Name of the author + source: + openapi: ../../../openapi/referenced-specs/v2.yml + inline: true + CommentThreadMentionedUsersItem: + properties: + userId: + type: string + docs: The unique identifier of the mentioned user + email: + type: string + docs: Email of the user + name: + type: string + docs: Name of the User + source: + openapi: ../../../openapi/referenced-specs/v2.yml + inline: true + CommentThread: + docs: > + A comment thread represents a conversation between users on a specific + page. Each comment thread has a unique identifier and can contain multiple + comments. Retrieve comment replies using the repiles API endpoint. + properties: + id: + type: string + docs: Unique identifier for the comment thread + access: read-only + siteId: + type: string + docs: The site unique identifier + access: read-only + pageId: + type: string + docs: The page unique identifier + access: read-only + localeId: + type: optional + docs: The locale unique identifier + access: read-only + itemId: + type: optional + docs: The item unique identifier + access: read-only + breakpoint: + type: string + docs: The breakpoint the comment was left on + access: read-only + url: + type: string + docs: The URL of the page the comment was left on + access: read-only + content: + type: string + docs: The content of the comment reply + isResolved: + type: boolean + docs: Boolean determining if the comment thread is resolved + default: false + author: CommentThreadAuthor + mentionedUsers: + docs: >- + List of mentioned users. This is an empty array until email + notifications are sent, which can take up to 5 minutes after the + comment is created. + type: list + createdOn: + type: string + docs: The date the item was created + access: read-only + lastUpdated: + type: string + docs: The date the item was last updated + access: read-only + source: + openapi: ../../../openapi/referenced-specs/v2.yml + CommentThreadListPagination: + properties: + limit: + type: double + docs: The limit specified in the request (default 100) + default: 100 + offset: + type: double + docs: The offset specified for pagination + default: 0 + total: + type: double + docs: Total number of comment threads + source: + openapi: ../../../openapi/referenced-specs/v2.yml + inline: true + CommentThreadList: + docs: > + A list of comment threads on the site. Contains the content of the first + reply. + properties: + comments: list + pagination: CommentThreadListPagination + source: + openapi: ../../../openapi/referenced-specs/v2.yml + CommentReplyAuthor: + properties: + id: + type: string + docs: The unique identifier of the author + email: + type: string + docs: Email of the author + name: + type: string + docs: Name of the author + source: + openapi: ../../../openapi/referenced-specs/v2.yml + inline: true + CommentReplyMentionedUsersItem: + properties: + id: + type: string + docs: The unique identifier of the mentioned user + email: + type: string + docs: Email of the user + name: + type: string + docs: Name of the User + source: + openapi: ../../../openapi/referenced-specs/v2.yml + inline: true + CommentReply: + docs: > + A comment thread represents a conversation between users on a specific + page. Each comment thread has a unique identifier and can contain multiple + comments. + properties: + id: + type: string + docs: Unique identifier for the comment thread + access: read-only + commentId: + type: string + docs: The comment reply unique identifier + access: read-only + siteId: + type: string + docs: The site unique identifier + access: read-only + pageId: + type: string + docs: The page unique identifier + access: read-only + localeId: + type: optional + docs: The locale unique identifier + access: read-only + breakpoint: + type: string + docs: The breakpoint the comment was left on + access: read-only + content: + type: string + docs: The content of the comment reply + isResolved: + type: boolean + docs: Boolean determining if the comment thread is resolved + default: false + author: CommentReplyAuthor + mentionedUsers: + type: optional> + docs: >- + List of mentioned users is an empty array until email notifications + are sent. + lastUpdated: + type: string + docs: The date the item was last updated + access: read-only + createdOn: + type: string + docs: The date the item was created + access: read-only + source: + openapi: ../../../openapi/referenced-specs/v2.yml + CommentReplyListPagination: + properties: + limit: + type: double + docs: The limit specified in the request (default 100) + default: 100 + offset: + type: double + docs: The offset specified for pagination + default: 0 + total: + type: double + docs: Total number of comment replies + source: + openapi: ../../../openapi/referenced-specs/v2.yml + inline: true + CommentReplyList: + docs: | + A list of comment replies. + properties: + comments: list + pagination: CommentReplyListPagination + source: + openapi: ../../../openapi/referenced-specs/v2.yml PageSeo: docs: SEO-related fields for the Page properties: @@ -2432,8 +2650,10 @@ types: SkuValueList: type: map docs: > - A dictionary that maps a SKU property to a SKU value. The key of the - dictionary is the SKU property ID, and the value is the SKU value ID. + A mapping between SKU properties and their values, represented as + key-value pairs. Each key represents a SKU Property ID (e.g. "color") and + maps to its corresponding SKU Value ID (e.g. "blue"). This structure + defines the specific variant combination for a SKU. SkuFieldDataPrice: docs: price of SKU properties: @@ -2443,6 +2663,9 @@ types: unit: type: optional docs: Currency of Item + currency: + type: optional + docs: Currency of Item (alternative representation) source: openapi: ../../../openapi/referenced-specs/v2.yml inline: true @@ -2561,6 +2784,15 @@ types: quantity: type: optional docs: Quantity of SKU that will be tracked as items are ordered. + main-image: + type: optional + docs: The URL for the main image of the SKU + sku: + type: optional + docs: A unique identifier for the SKU + sku-properties: + type: optional> + docs: The properties of the SKU source: openapi: ../../../openapi/referenced-specs/v2.yml Sku: diff --git a/.mock/definition/api.yml b/.mock/definition/api.yml index aee9acdf..b881d163 100644 --- a/.mock/definition/api.yml +++ b/.mock/definition/api.yml @@ -3,8 +3,15 @@ error-discrimination: strategy: status-code display-name: Data API environments: - Default: https://api.webflow.com/v2 -default-environment: Default + Data API: + urls: + Base: https://api.webflow.com/v2 + Data API: https://api.webflow.com/v2 + Content Delivery API: https://api-cdn.webflow.com/v2 + Production: https://api.webflow.com/v2 + CDN: https://api-cdn.webflow.com/v2 +default-environment: Data API +default-url: Base auth-schemes: BearerToken: scheme: bearer diff --git a/.mock/definition/collections/items.yml b/.mock/definition/collections/items.yml index 2fae3a3b..a80fd3c8 100644 --- a/.mock/definition/collections/items.yml +++ b/.mock/definition/collections/items.yml @@ -340,7 +340,7 @@ service: name: ItemsDeleteItemsRequest body: properties: - items: optional> + items: list content-type: application/json errors: - root.BadRequestError @@ -352,7 +352,9 @@ service: examples: - path-parameters: collection_id: 580e63fc8c9a982ac9b8b745 - request: {} + request: + items: + - id: 580e64008c9a982ac9b8b754 update-items: path: /collections/{collection_id}/items method: PATCH @@ -568,6 +570,11 @@ service: docs: | List all published items in a collection. + + To serve content to your other frontends applications, enterprise sites have access to a dedicated [content delivery API](/data/docs/cms-content-delivery), available at api-cdn.webflow.com. + + + Required scope | `CMS:read` source: openapi: ../../../openapi/referenced-specs/v2.yml @@ -610,6 +617,7 @@ service: docs: Request was successful type: root.CollectionItemList status-code: 200 + url: Data API errors: - root.BadRequestError - root.UnauthorizedError @@ -786,7 +794,7 @@ service: name: ItemsDeleteItemsLiveRequest body: properties: - items: optional> + items: list content-type: application/json errors: - root.BadRequestError @@ -797,7 +805,9 @@ service: examples: - path-parameters: collection_id: 580e63fc8c9a982ac9b8b745 - request: {} + request: + items: + - id: 580e64008c9a982ac9b8b754 update-items-live: path: /collections/{collection_id}/items/live method: PATCH @@ -1323,6 +1333,7 @@ service: docs: Request was successful type: root.CollectionItem status-code: 200 + url: Production errors: - root.BadRequestError - root.UnauthorizedError @@ -1452,6 +1463,11 @@ service: docs: | Get details of a selected Collection live Item. + + To serve content to your other frontends applications, enterprise sites have access to a dedicated [content delivery API](/data/docs/cms-content-delivery), available at api-cdn.webflow.com. + + + Required scope | `CMS:read` source: openapi: ../../../openapi/referenced-specs/v2.yml @@ -1477,6 +1493,7 @@ service: docs: Request was successful type: root.CollectionItem status-code: 200 + url: Data API errors: - root.BadRequestError - root.UnauthorizedError diff --git a/.mock/definition/products.yml b/.mock/definition/products.yml index 966236a1..1f251307 100644 --- a/.mock/definition/products.yml +++ b/.mock/definition/products.yml @@ -84,13 +84,24 @@ service: createdOn: '2023-03-17T18:47:35Z' fieldData: sku-values: - ff42fee0113744f693a764e3431a9cc2: 64a74715c456e36762fc39a1 - name: Blue T-shirt - slug: t-shirt-blue + color: blue + size: small + name: Colorful T-shirt - Default + slug: colorful-t-shirt-default price: - value: 100 + value: 2499 unit: USD + currency: USD quantity: 10 + main-image: https://www.example.com/image.jpg + sku: '1234567890' + sku-properties: + - id: Color + name: Color + enum: + - id: id + name: Royal Blue + slug: royal-blue pagination: limit: 100 offset: 0 @@ -100,20 +111,14 @@ service: method: POST auth: true docs: > - Create a new product and SKU. + Create a new ecommerce product and defaultSKU. A product, at minimum, + must have a single SKU. - When you create a product, you will always create a SKU, since a Product - Item must have, at minimum, a single SKU. - - - To create a Product with multiple SKUs - for example a T-shirt in sizes - small, medium and large: - - Create parameters in `sku-properties`, also known as [product options and variants.](https://help.webflow.com/hc/en-us/articles/33961334531347-Create-product-options-and-variants). - - A single `sku-property` would be `color`. Within the `color` property, list the various colors of T-shirts as an array of `enum` values: `royal-blue`, `crimson-red`, and `forrest-green`. - - Once, you've created a Product and its `sku-properties` with `enum` values, Webflow will create a **default SKU**, which will automatically be a combination of the first `sku-properties` you've created. - - In our example, the default SKU will be a Royal Blue T-Shirt, because our first `enum` of our Color `sku-property` is Royal Blue. - - After you've created your product, you can create additional SKUs using the [Create SKU endpoint.](/data/reference/ecommerce/products/create-sku) + To create a product with multiple SKUs: + - First, create a list of `sku-properties`, also known as [product options](https://help.webflow.com/hc/en-us/articles/33961334531347-Create-product-options-and-variants). For example, a T-shirt product may have a "color" `sku-property`, with a list of enum values: red, yellow, and blue, another `sku-property` may be "size", with a list of enum values: small, medium, and large. + - Once, a product is created with a list of `sku-properties`, Webflow will create a **default SKU**, which is always a combination of the first `enum` values of each `sku-property`. (e.g. Small - Red - T-Shirt) + - After creation, you can create additional SKUs for the product, using the [Create SKUs endpoint.](/data/reference/ecommerce/products/create-sku) Upon creation, the default product type will be `Advanced`, which ensures all Product and SKU fields will be shown to users in the @@ -133,8 +138,8 @@ service: body: properties: publishStatus: optional - product: optional - sku: optional + product: ProductSkuCreateProduct + sku: ProductSkuCreateSku content-type: application/json response: docs: Request was successful @@ -151,7 +156,50 @@ service: examples: - path-parameters: site_id: 580e63e98c9a982ac9b8b741 - request: {} + request: + publishStatus: staging + product: + fieldData: + name: Colorful T-shirt + slug: colorful-t-shirt + description: >- + Our best-selling t-shirt available in multiple colors and + sizes + sku-properties: + - id: color + name: Color + enum: + - id: red + name: Red + slug: red + - id: yellow + name: Yellow + slug: yellow + - id: blue + name: Blue + slug: blue + - id: size + name: Size + enum: + - id: small + name: Small + slug: small + - id: medium + name: Medium + slug: medium + - id: large + name: Large + slug: large + sku: + fieldData: + name: Colorful T-shirt - Red Small + slug: colorful-t-shirt-red-small + price: + value: 2499 + unit: USD + currency: USD + main-image: >- + https://rocketamp-sample-store.myshopify.com/cdn/shop/products/Gildan_2000_Antique_Cherry_Red_Front_1024x1024.jpg?v=1527232987 response: body: product: @@ -187,13 +235,24 @@ service: createdOn: '2023-03-17T18:47:35Z' fieldData: sku-values: - ff42fee0113744f693a764e3431a9cc2: 64a74715c456e36762fc39a1 - name: Blue T-shirt - slug: t-shirt-blue + color: blue + size: small + name: Colorful T-shirt - Default + slug: colorful-t-shirt-default price: - value: 100 + value: 2499 unit: USD + currency: USD quantity: 10 + main-image: https://www.example.com/image.jpg + sku: '1234567890' + sku-properties: + - id: Color + name: Color + enum: + - id: id + name: Royal Blue + slug: royal-blue get: path: /sites/{site_id}/products/{product_id} method: GET @@ -264,13 +323,24 @@ service: createdOn: '2023-03-17T18:47:35Z' fieldData: sku-values: - ff42fee0113744f693a764e3431a9cc2: 64a74715c456e36762fc39a1 - name: Blue T-shirt - slug: t-shirt-blue + color: blue + size: small + name: Colorful T-shirt - Default + slug: colorful-t-shirt-default price: - value: 100 + value: 2499 unit: USD + currency: USD quantity: 10 + main-image: https://www.example.com/image.jpg + sku: '1234567890' + sku-properties: + - id: Color + name: Color + enum: + - id: id + name: Royal Blue + slug: royal-blue update: path: /sites/{site_id}/products/{product_id} method: PATCH @@ -370,7 +440,7 @@ service: product_id: type: string docs: Unique identifier for a Product - display-name: Create SKU + display-name: Create SKUs request: name: ProductsCreateSkuRequest body: @@ -398,11 +468,15 @@ service: product_id: 580e63fc8c9a982ac9b8b745 request: skus: - - {} + - fieldData: + name: Colorful T-shirt - Default + slug: colorful-t-shirt-default + price: + value: 2499 + unit: USD + currency: USD response: body: - required: - key: value skus: - id: 580e63fc8c9a982ac9b8b745 cmsLocaleId: 653ad57de882f528b32e810e @@ -411,13 +485,24 @@ service: createdOn: '2023-03-17T18:47:35Z' fieldData: sku-values: - ff42fee0113744f693a764e3431a9cc2: 64a74715c456e36762fc39a1 - name: Blue T-shirt - slug: t-shirt-blue + color: blue + size: small + name: Colorful T-shirt - Default + slug: colorful-t-shirt-default price: - value: 100 + value: 2499 unit: USD + currency: USD quantity: 10 + main-image: https://www.example.com/image.jpg + sku: '1234567890' + sku-properties: + - id: Color + name: Color + enum: + - id: id + name: Royal Blue + slug: royal-blue update-sku: path: /sites/{site_id}/products/{product_id}/skus/{sku_id} method: PATCH @@ -470,7 +555,14 @@ service: product_id: 580e63fc8c9a982ac9b8b745 sku_id: 5e8518516e147040726cc415 request: - sku: {} + sku: + fieldData: + name: Colorful T-shirt - Default + slug: colorful-t-shirt-default + price: + value: 2499 + unit: USD + currency: USD response: body: id: 580e63fc8c9a982ac9b8b745 @@ -480,12 +572,14 @@ service: createdOn: '2023-03-17T18:47:35Z' fieldData: sku-values: - ff42fee0113744f693a764e3431a9cc2: 64a74715c456e36762fc39a1 - name: Blue T-shirt - slug: t-shirt-blue + color: blue + size: small + name: Colorful T-shirt - Default + slug: colorful-t-shirt-default price: - value: 100 + value: 2499 unit: USD + currency: USD compare-at-price: value: 100 unit: USD @@ -498,12 +592,32 @@ service: - {} track-inventory: true quantity: 10 + main-image: https://www.example.com/image.jpg + sku: '1234567890' + sku-properties: + - id: Color + name: Color + enum: + - id: id + name: Royal Blue + slug: royal-blue source: openapi: ../../../openapi/referenced-specs/v2.yml types: + ProductSkuCreateProduct: + properties: + fieldData: optional + source: + openapi: ../../../openapi/referenced-specs/v2.yml + inline: true + ProductSkuCreateSku: + properties: + fieldData: optional + source: + openapi: ../../../openapi/referenced-specs/v2.yml + inline: true ProductsCreateSkuResponse: properties: - required: optional - skus: optional> + skus: list source: openapi: ../../../openapi/referenced-specs/v2.yml diff --git a/.mock/definition/sites/comments.yml b/.mock/definition/sites/comments.yml new file mode 100644 index 00000000..64989c08 --- /dev/null +++ b/.mock/definition/sites/comments.yml @@ -0,0 +1,216 @@ +types: + CommentsListCommentThreadsRequestSortBy: + enum: + - createdOn + - lastUpdated + source: + openapi: ../../../openapi/referenced-specs/v2.yml + CommentsListCommentThreadsRequestSortOrder: + enum: + - asc + - desc + source: + openapi: ../../../openapi/referenced-specs/v2.yml + CommentsGetCommentThreadRequestSortBy: + enum: + - createdOn + - lastUpdated + source: + openapi: ../../../openapi/referenced-specs/v2.yml + CommentsGetCommentThreadRequestSortOrder: + enum: + - asc + - desc + source: + openapi: ../../../openapi/referenced-specs/v2.yml +imports: + root: ../__package__.yml +service: + auth: false + base-path: '' + endpoints: + list-comment-threads: + path: /sites/{site_id}/comments + method: GET + auth: true + docs: | + List all comment threads for a site. + + Required scope | `comments:read` + source: + openapi: ../../../openapi/referenced-specs/v2.yml + path-parameters: + site_id: + type: string + docs: Unique identifier for a Site + display-name: List Comment Threads + request: + name: CommentsListCommentThreadsRequest + query-parameters: + localeId: + type: optional + docs: >- + Unique identifier for a specific locale. Applicable, when using + localization. + offset: + type: optional + docs: >- + Offset used for pagination if the results have more than limit + records + limit: + type: optional + docs: 'Maximum number of records to be returned (max limit: 100)' + sortBy: + type: optional + docs: >- + Sort results by the provided value. Only allowed when sortOrder is + provided. + sortOrder: + type: optional + docs: Sorts the results by asc or desc + response: + docs: Request was successful + type: root.CommentThreadList + status-code: 200 + errors: + - root.BadRequestError + - root.UnauthorizedError + - root.NotFoundError + - root.TooManyRequestsError + - root.InternalServerError + examples: + - path-parameters: + site_id: 580e63e98c9a982ac9b8b741 + query-parameters: + localeId: 65427cf400e02b306eaa04a0 + response: + body: + comments: + - id: 679d2ddb5196117ad04d1ffa + siteId: 679826b3b20b045e176bc4b5 + pageId: 679826b3b20b045e176bc4bc + localeId: 67993753d910db250db64b3e + itemId: 580e64008c9a982ac9b8b754 + breakpoint: main + url: >- + https://webflow.com/design/site-slug-4ec832?workflow=comment&commentId=679d2ddb5196117ad04d1ff8&pageId=679826b3b20b045e176bc4bc + content: 'Let''s go to the pub! [[6287ec36a841b25637c663df]] ' + isResolved: false + author: + userId: 6287ec36a841b25637c663df + email: ford.prefect@heartofgold.spaceship + name: Ford Prefect + mentionedUsers: + - userId: 6287ec36a841b25637c663df + email: arthur.dent@heartofgold.spaceship + name: Arthur Dent + createdOn: '2025-01-31T20:08:59.759Z' + lastUpdated: '2025-01-31T20:08:59.759Z' + - id: 679d2ddb5196117ad04d1ffc + siteId: 679826b3b20b045e176bc4b5 + pageId: 679826b3b20b045e176bc4bc + localeId: 67993753d910db250db64b3e + itemId: 580e64008c9a982ac9b8b754 + breakpoint: main + url: >- + https://webflow.com/design/site-slug-4ec832?workflow=comment&commentId=679d2ddb5196117ad04d1ff8&pageId=679826b3b20b045e176bc4bc + content: >- + You have five minutes left to drink it + [[6287ec36a841b25637c663df]] + isResolved: false + author: + userId: 6287ec36a841b25637c663df + email: ford.prefect@heartofgold.spaceship + name: Ford Prefect + mentionedUsers: + - userId: 6287ec36a841b25637c663df + email: arthur.dent@heartofgold.spaceship + name: Arthur Dent + createdOn: '2025-01-31T20:08:59.759Z' + lastUpdated: '2025-01-31T20:08:59.759Z' + pagination: + limit: 2 + offset: 0 + total: 2 + get-comment-thread: + path: /sites/{site_id}/comments/{comment_thread_id} + method: GET + auth: true + docs: | + Get details of a specific comment thread. + + Required scope | `comments:read` + source: + openapi: ../../../openapi/referenced-specs/v2.yml + path-parameters: + site_id: + type: string + docs: Unique identifier for a Site + comment_thread_id: + type: string + docs: Unique identifier for a Comment Thread + display-name: Get Comment Thread + request: + name: CommentsGetCommentThreadRequest + query-parameters: + localeId: + type: optional + docs: >- + Unique identifier for a specific locale. Applicable, when using + localization. + offset: + type: optional + docs: >- + Offset used for pagination if the results have more than limit + records + limit: + type: optional + docs: 'Maximum number of records to be returned (max limit: 100)' + sortBy: + type: optional + docs: >- + Sort results by the provided value. Only allowed when sortOrder is + provided. + sortOrder: + type: optional + docs: Sorts the results by asc or desc + response: + docs: Request was successful + type: root.CommentThread + status-code: 200 + errors: + - root.BadRequestError + - root.UnauthorizedError + - root.NotFoundError + - root.TooManyRequestsError + - root.InternalServerError + examples: + - path-parameters: + site_id: 580e63e98c9a982ac9b8b741 + comment_thread_id: 580e63e98c9a982ac9b8b741 + query-parameters: + localeId: 65427cf400e02b306eaa04a0 + response: + body: + id: 580e64008c9a982ac9b8b754 + siteId: 580e64008c9a982ac9b8b754 + pageId: 580e64008c9a982ac9b8b754 + localeId: 580e64008c9a982ac9b8b754 + itemId: 580e64008c9a982ac9b8b754 + breakpoint: main + url: >- + https://webflow.com/design/site-slug-4ec832?workflow=comment&commentId=679d2ddb5196117ad04d1ff8&pageId=679826b3b20b045e176bc4bc + content: This is a comment reply + isResolved: true + author: + userId: userId + email: email + name: name + mentionedUsers: + - userId: 6287ec36a841b25637c663df + email: arthur.dent@heartofgold.spaceship + name: Arthur Dent + createdOn: '2023-03-17T18:47:35.560Z' + lastUpdated: '2023-03-17T18:47:35.560Z' + source: + openapi: ../../../openapi/referenced-specs/v2.yml diff --git a/.mock/definition/sites/comments/replies.yml b/.mock/definition/sites/comments/replies.yml new file mode 100644 index 00000000..fbfd39f7 --- /dev/null +++ b/.mock/definition/sites/comments/replies.yml @@ -0,0 +1,106 @@ +types: + RepliesListRepliesRequestSortBy: + enum: + - createdOn + - lastUpdated + source: + openapi: ../../../openapi/referenced-specs/v2.yml + RepliesListRepliesRequestSortOrder: + enum: + - asc + - desc + source: + openapi: ../../../openapi/referenced-specs/v2.yml +imports: + root: ../../__package__.yml +service: + auth: false + base-path: '' + endpoints: + list-replies: + path: /sites/{site_id}/comments/{comment_thread_id}/replies + method: GET + auth: true + docs: | + List all replies to a specific comment thread. + + Required scope | `comments:read` + source: + openapi: ../../../openapi/referenced-specs/v2.yml + path-parameters: + site_id: + type: string + docs: Unique identifier for a Site + comment_thread_id: + type: string + docs: Unique identifier for a Comment Thread + display-name: List Comment Replies + request: + name: RepliesListRepliesRequest + query-parameters: + localeId: + type: optional + docs: >- + Unique identifier for a specific locale. Applicable, when using + localization. + offset: + type: optional + docs: >- + Offset used for pagination if the results have more than limit + records + limit: + type: optional + docs: 'Maximum number of records to be returned (max limit: 100)' + sortBy: + type: optional + docs: >- + Sort results by the provided value. Only allowed when sortOrder is + provided. + sortOrder: + type: optional + docs: Sorts the results by asc or desc + response: + docs: Request was successful + type: root.CommentReplyList + status-code: 200 + errors: + - root.BadRequestError + - root.UnauthorizedError + - root.NotFoundError + - root.TooManyRequestsError + - root.InternalServerError + examples: + - path-parameters: + site_id: 580e63e98c9a982ac9b8b741 + comment_thread_id: 580e63e98c9a982ac9b8b741 + query-parameters: + localeId: 65427cf400e02b306eaa04a0 + response: + body: + comments: + - id: 679d2ddb5196117ad04d1ffa + commentId: 679d2ddb5196117ad04d1ff8 + siteId: 679826b3b20b045e176bc4b5 + pageId: 679826b3b20b045e176bc4bc + localeId: 67993753d910db250db64b3e + breakpoint: main + content: >- + This comment mentions another user + [[6287ec36a841b25637c663df]] + isResolved: false + author: + id: id + email: email + name: name + mentionedUsers: + - id: id + email: arthur.dent@example.com + name: Arthur Dent + lastUpdated: '2025-01-31T20:08:59.759Z' + createdOn: '2025-01-31T20:08:59.759Z' + pagination: + limit: 2 + offset: 0 + total: 1 + source: + openapi: ../../../openapi/referenced-specs/v2.yml diff --git a/.mock/definition/sites/robotsTxt.yml b/.mock/definition/sites/robotsTxt.yml index 032bce5d..1259a149 100644 --- a/.mock/definition/sites/robotsTxt.yml +++ b/.mock/definition/sites/robotsTxt.yml @@ -8,9 +8,14 @@ service: path: /sites/{site_id}/robots_txt method: GET auth: true - docs: | + docs: > Retrieve the robots.txt configuration for various user agents. + + This endpoint requires an Enterprise + workspace. + + Required scope: `site_config:read` source: openapi: ../../../openapi/referenced-specs/v2.yml @@ -46,9 +51,14 @@ service: path: /sites/{site_id}/robots_txt method: PUT auth: true - docs: | + docs: > Replace the `robots.txt` configuration for various user agents. + + This endpoint requires an Enterprise + workspace. + + Required scope | `site_config:write` source: openapi: ../../../openapi/referenced-specs/v2.yml @@ -107,6 +117,10 @@ service: access unrestricted unless other directives apply. + This endpoint requires an Enterprise + workspace. + + Required scope: `site_config:write` source: openapi: ../../../openapi/referenced-specs/v2.yml @@ -152,9 +166,14 @@ service: path: /sites/{site_id}/robots_txt method: PATCH auth: true - docs: | + docs: > Update the `robots.txt` configuration for various user agents. + + This endpoint requires an Enterprise + workspace. + + Required scope | `site_config:write` source: openapi: ../../../openapi/referenced-specs/v2.yml diff --git a/.mock/definition/sites/wellKnown.yml b/.mock/definition/sites/wellKnown.yml new file mode 100644 index 00000000..0ba91e13 --- /dev/null +++ b/.mock/definition/sites/wellKnown.yml @@ -0,0 +1,114 @@ +types: + WellKnownFileContentType: + enum: + - value: application/json + name: ApplicationJson + - value: text/plain + name: TextPlain + docs: The content type of the file. Defaults to application/json + default: application/json + inline: true + source: + openapi: ../../../openapi/referenced-specs/v2.yml +imports: + root: ../__package__.yml +service: + auth: false + base-path: '' + endpoints: + put: + path: /sites/{site_id}/well_known + method: PUT + auth: true + docs: > + Upload a supported well-known file to a site. + + + The current restrictions on well-known files are as follows: + - Each file must be smaller than 100kb + - Less than 30 total files + - Have one of the following file extensions (or no extension): `.txt`, `.json`, `.noext` + + + `.noext` is a special file extension that removes other extensions. For example, `apple-app-site-association.noext.txt` will be uploaded as `apple-app-site-association`. Use this extension for tools that have trouble uploading extensionless files. + + + This endpoint requires an Enterprise + workspace. + + + 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: Set a well-known file + request: + name: WellKnownFile + body: + properties: + fileName: + type: string + docs: The name of the file + fileData: + type: string + docs: The contents of the file + contentType: + type: optional + docs: The content type of the file. Defaults to application/json + default: application/json + content-type: application/json + errors: + - root.BadRequestError + - root.UnauthorizedError + - root.NotFoundError + - root.TooManyRequestsError + - root.InternalServerError + examples: + - path-parameters: + site_id: 580e63e98c9a982ac9b8b741 + request: + fileName: fileName + fileData: fileData + delete: + path: /sites/{site_id}/well_known + method: DELETE + auth: true + docs: > + Delete existing well-known files from a site. + + + This endpoint requires an Enterprise + workspace. + + + 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 a well-known file + request: + name: WellKnownDeleteRequest + body: + properties: + fileNames: + type: optional> + docs: A list of file names to delete + content-type: application/json + errors: + - root.BadRequestError + - root.UnauthorizedError + - root.NotFoundError + - root.TooManyRequestsError + - root.InternalServerError + examples: + - path-parameters: + site_id: 580e63e98c9a982ac9b8b741 + request: {} + source: + openapi: ../../../openapi/referenced-specs/v2.yml diff --git a/.mock/fern.config.json b/.mock/fern.config.json index cc6319dc..7838ceaf 100644 --- a/.mock/fern.config.json +++ b/.mock/fern.config.json @@ -1,4 +1,4 @@ { "organization" : "webflow", - "version" : "0.56.16" + "version" : "0.56.34" } \ No newline at end of file diff --git a/package.json b/package.json index bf009cfa..6307c67f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "webflow-api", - "version": "3.1.1", + "version": "3.1.2", "private": false, "repository": "https://github.com/webflow/js-webflow-api", "main": "./index.js", @@ -19,7 +19,7 @@ "qs": "6.11.2", "readable-stream": "^4.5.2", "js-base64": "3.7.2", - "crypto-browserify": "^3.12.1" + "crypto-browserify": "^3.12.0" }, "devDependencies": { "@types/url-join": "4.0.1", @@ -41,5 +41,8 @@ "os": false, "path": false, "crypto": false + }, + "resolutions": { + "@types/babel__traverse": "7.20.6" } } diff --git a/reference.md b/reference.md index 9bb92edc..1b692484 100644 --- a/reference.md +++ b/reference.md @@ -3920,17 +3920,13 @@ await client.products.list("580e63e98c9a982ac9b8b741");
-Create a new product and SKU. +Create a new ecommerce product and defaultSKU. A product, at minimum, must have a single SKU. -When you create a product, you will always create a SKU, since a Product Item must have, at minimum, a single SKU. +To create a product with multiple SKUs: -To create a Product with multiple SKUs - for example a T-shirt in sizes small, medium and large: - -- Create parameters in `sku-properties`, also known as [product options and variants.](https://help.webflow.com/hc/en-us/articles/33961334531347-Create-product-options-and-variants). -- A single `sku-property` would be `color`. Within the `color` property, list the various colors of T-shirts as an array of `enum` values: `royal-blue`, `crimson-red`, and `forrest-green`. -- Once, you've created a Product and its `sku-properties` with `enum` values, Webflow will create a **default SKU**, which will automatically be a combination of the first `sku-properties` you've created. -- In our example, the default SKU will be a Royal Blue T-Shirt, because our first `enum` of our Color `sku-property` is Royal Blue. -- After you've created your product, you can create additional SKUs using the [Create SKU endpoint.](/data/reference/ecommerce/products/create-sku) +- First, create a list of `sku-properties`, also known as [product options](https://help.webflow.com/hc/en-us/articles/33961334531347-Create-product-options-and-variants). For example, a T-shirt product may have a "color" `sku-property`, with a list of enum values: red, yellow, and blue, another `sku-property` may be "size", with a list of enum values: small, medium, and large. +- Once, a product is created with a list of `sku-properties`, Webflow will create a **default SKU**, which is always a combination of the first `enum` values of each `sku-property`. (e.g. Small - Red - T-Shirt) +- After creation, you can create additional SKUs for the product, using the [Create SKUs endpoint.](/data/reference/ecommerce/products/create-sku) Upon creation, the default product type will be `Advanced`, which ensures all Product and SKU fields will be shown to users in the Designer. @@ -3950,7 +3946,73 @@ Required scope | `ecommerce:write`
```typescript -await client.products.create("580e63e98c9a982ac9b8b741"); +await client.products.create("580e63e98c9a982ac9b8b741", { + publishStatus: "staging", + product: { + fieldData: { + name: "Colorful T-shirt", + slug: "colorful-t-shirt", + description: "Our best-selling t-shirt available in multiple colors and sizes", + skuProperties: [ + { + id: "color", + name: "Color", + enum: [ + { + id: "red", + name: "Red", + slug: "red", + }, + { + id: "yellow", + name: "Yellow", + slug: "yellow", + }, + { + id: "blue", + name: "Blue", + slug: "blue", + }, + ], + }, + { + id: "size", + name: "Size", + enum: [ + { + id: "small", + name: "Small", + slug: "small", + }, + { + id: "medium", + name: "Medium", + slug: "medium", + }, + { + id: "large", + name: "Large", + slug: "large", + }, + ], + }, + ], + }, + }, + sku: { + fieldData: { + name: "Colorful T-shirt - Red Small", + slug: "colorful-t-shirt-red-small", + price: { + value: 2499, + unit: "USD", + currency: "USD", + }, + mainImage: + "https://rocketamp-sample-store.myshopify.com/cdn/shop/products/Gildan_2000_Antique_Cherry_Red_Front_1024x1024.jpg?v=1527232987", + }, + }, +}); ```
@@ -4183,7 +4245,19 @@ Required scope | `ecommerce:write` ```typescript await client.products.createSku("580e63e98c9a982ac9b8b741", "580e63fc8c9a982ac9b8b745", { - skus: [{}], + skus: [ + { + fieldData: { + name: "Colorful T-shirt - Default", + slug: "colorful-t-shirt-default", + price: { + value: 2499, + unit: "USD", + currency: "USD", + }, + }, + }, + ], }); ``` @@ -4268,7 +4342,17 @@ Required scope | `ecommerce:write` ```typescript await client.products.updateSku("580e63e98c9a982ac9b8b741", "580e63fc8c9a982ac9b8b745", "5e8518516e147040726cc415", { - sku: {}, + sku: { + fieldData: { + name: "Colorful T-shirt - Default", + slug: "colorful-t-shirt-default", + price: { + value: 2499, + unit: "USD", + currency: "USD", + }, + }, + }, }); ``` @@ -5064,6 +5148,7 @@ Required scope | `cms:write` ```typescript await client.collections.fields.create("580e63fc8c9a982ac9b8b745", { + id: "562ac0395358780a1f5e6fbc", isEditable: true, isRequired: false, type: "RichText", @@ -5459,7 +5544,13 @@ Required scope | `CMS:write`
```typescript -await client.collections.items.deleteItems("580e63fc8c9a982ac9b8b745"); +await client.collections.items.deleteItems("580e63fc8c9a982ac9b8b745", { + items: [ + { + id: "580e64008c9a982ac9b8b754", + }, + ], +}); ```
@@ -5628,6 +5719,11 @@ await client.collections.items.updateItems("580e63fc8c9a982ac9b8b745", { List all published items in a collection. + + To serve content to your other frontends applications, enterprise sites have access to a dedicated [content delivery API](/data/docs/cms-content-delivery), available at api-cdn.webflow.com. + + + Required scope | `CMS:read` @@ -5720,6 +5816,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: { @@ -5803,7 +5902,13 @@ Required scope | `CMS:write`
```typescript -await client.collections.items.deleteItemsLive("580e63fc8c9a982ac9b8b745"); +await client.collections.items.deleteItemsLive("580e63fc8c9a982ac9b8b745", { + items: [ + { + id: "580e64008c9a982ac9b8b754", + }, + ], +}); ```
@@ -6306,6 +6411,11 @@ await client.collections.items.updateItem("580e63fc8c9a982ac9b8b745", "580e64008 Get details of a selected Collection live Item. + + To serve content to your other frontends applications, enterprise sites have access to a dedicated [content delivery API](/data/docs/cms-content-delivery), available at api-cdn.webflow.com. + + + Required scope | `CMS:read` @@ -7247,6 +7357,8 @@ await client.sites.plans.getSitePlan("580e63e98c9a982ac9b8b741"); Retrieve the robots.txt configuration for various user agents. +This endpoint requires an Enterprise workspace. + Required scope: `site_config:read` @@ -7312,6 +7424,8 @@ await client.sites.robotsTxt.get("580e63e98c9a982ac9b8b741"); Replace the `robots.txt` configuration for various user agents. +This endpoint requires an Enterprise workspace. + Required scope | `site_config:write` @@ -7396,6 +7510,8 @@ Remove specific rules for a user-agent in your `robots.txt` file. To delete all **Note:** Deleting a user-agent with no rules will make the user-agent's access unrestricted unless other directives apply. +This endpoint requires an Enterprise workspace. + Required scope: `site_config:write` @@ -7477,6 +7593,8 @@ await client.sites.robotsTxt.delete("580e63e98c9a982ac9b8b741", { Update the `robots.txt` configuration for various user agents. +This endpoint requires an Enterprise workspace. + Required scope | `site_config:write` @@ -7545,6 +7663,171 @@ await client.sites.robotsTxt.patch("580e63e98c9a982ac9b8b741", {
+## Sites WellKnown + +
client.sites.wellKnown.put(siteId, { ...params }) -> void +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Upload a supported well-known file to a site. + +The current restrictions on well-known files are as follows: + +- Each file must be smaller than 100kb +- Less than 30 total files +- Have one of the following file extensions (or no extension): `.txt`, `.json`, `.noext` + + + `.noext` is a special file extension that removes other extensions. For example, `apple-app-site-association.noext.txt` will be uploaded as `apple-app-site-association`. Use this extension for tools that have trouble uploading extensionless files. + + +This endpoint requires an Enterprise workspace. + +Required scope: `site_config:write` + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.sites.wellKnown.put("580e63e98c9a982ac9b8b741", { + fileName: "fileName", + fileData: "fileData", +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**siteId:** `string` — Unique identifier for a Site + +
+
+ +
+
+ +**request:** `Webflow.sites.WellKnownFile` + +
+
+ +
+
+ +**requestOptions:** `WellKnown.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.sites.wellKnown.delete(siteId, { ...params }) -> void +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Delete existing well-known files from a site. + +This endpoint requires an Enterprise workspace. + +Required scope: `site_config:write` + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.sites.wellKnown.delete("580e63e98c9a982ac9b8b741"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**siteId:** `string` — Unique identifier for a Site + +
+
+ +
+
+ +**request:** `Webflow.sites.WellKnownDeleteRequest` + +
+
+ +
+
+ +**requestOptions:** `WellKnown.RequestOptions` + +
+
+
+
+ +
+
+
+ ## Sites ActivityLogs
client.sites.activityLogs.list(siteId, { ...params }) -> Webflow.SiteActivityLogResponse @@ -7622,6 +7905,166 @@ await client.sites.activityLogs.list("580e63e98c9a982ac9b8b741");
+## Sites Comments + +
client.sites.comments.listCommentThreads(siteId, { ...params }) -> Webflow.CommentThreadList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +List all comment threads for a site. + +Required scope | `comments:read` + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.sites.comments.listCommentThreads("580e63e98c9a982ac9b8b741", { + localeId: "65427cf400e02b306eaa04a0", +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**siteId:** `string` — Unique identifier for a Site + +
+
+ +
+
+ +**request:** `Webflow.sites.CommentsListCommentThreadsRequest` + +
+
+ +
+
+ +**requestOptions:** `Comments.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.sites.comments.getCommentThread(siteId, commentThreadId, { ...params }) -> Webflow.CommentThread +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Get details of a specific comment thread. + +Required scope | `comments:read` + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.sites.comments.getCommentThread("580e63e98c9a982ac9b8b741", "580e63e98c9a982ac9b8b741", { + localeId: "65427cf400e02b306eaa04a0", +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**siteId:** `string` — Unique identifier for a Site + +
+
+ +
+
+ +**commentThreadId:** `string` — Unique identifier for a Comment Thread + +
+
+ +
+
+ +**request:** `Webflow.sites.CommentsGetCommentThreadRequest` + +
+
+ +
+
+ +**requestOptions:** `Comments.RequestOptions` + +
+
+
+
+ +
+
+
+ ## Sites Scripts
client.sites.scripts.getCustomCode(siteId) -> Webflow.ScriptApplyList @@ -7929,3 +8372,88 @@ await client.sites.scripts.listCustomCodeBlocks("580e63e98c9a982ac9b8b741");
+ +## Sites Comments Replies + +
client.sites.comments.replies.listReplies(siteId, commentThreadId, { ...params }) -> Webflow.CommentReplyList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +List all replies to a specific comment thread. + +Required scope | `comments:read` + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.sites.comments.replies.listReplies("580e63e98c9a982ac9b8b741", "580e63e98c9a982ac9b8b741", { + localeId: "65427cf400e02b306eaa04a0", +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**siteId:** `string` — Unique identifier for a Site + +
+
+ +
+
+ +**commentThreadId:** `string` — Unique identifier for a Comment Thread + +
+
+ +
+
+ +**request:** `Webflow.sites.comments.RepliesListRepliesRequest` + +
+
+ +
+
+ +**requestOptions:** `Replies.RequestOptions` + +
+
+
+
+ +
+
+
diff --git a/src/Client.ts b/src/Client.ts index 8794a022..90d85942 100644 --- a/src/Client.ts +++ b/src/Client.ts @@ -22,7 +22,7 @@ import { Ecommerce } from "./api/resources/ecommerce/client/Client"; export declare namespace WebflowClient { interface Options { - environment?: core.Supplier; + environment?: core.Supplier; accessToken: core.Supplier; } diff --git a/src/api/resources/accessGroups/client/Client.ts b/src/api/resources/accessGroups/client/Client.ts index 715e0d3f..8e1ac251 100644 --- a/src/api/resources/accessGroups/client/Client.ts +++ b/src/api/resources/accessGroups/client/Client.ts @@ -11,7 +11,7 @@ import * as errors from "../../../../errors/index"; export declare namespace AccessGroups { interface Options { - environment?: core.Supplier; + environment?: core.Supplier; accessToken: core.Supplier; } @@ -70,7 +70,7 @@ export class AccessGroups { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `sites/${encodeURIComponent(siteId)}/accessgroups` ), method: "GET", @@ -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.1", - "User-Agent": "webflow-api/3.1.1", + "X-Fern-SDK-Version": "3.1.2", + "User-Agent": "webflow-api/3.1.2", "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 c048c471..810251c6 100644 --- a/src/api/resources/assets/client/Client.ts +++ b/src/api/resources/assets/client/Client.ts @@ -11,7 +11,7 @@ import * as errors from "../../../../errors/index"; export declare namespace Assets { interface Options { - environment?: core.Supplier; + environment?: core.Supplier; accessToken: core.Supplier; } @@ -53,7 +53,7 @@ export class Assets { public async list(siteId: string, requestOptions?: Assets.RequestOptions): Promise { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `sites/${encodeURIComponent(siteId)}/assets` ), method: "GET", @@ -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.1", - "User-Agent": "webflow-api/3.1.1", + "X-Fern-SDK-Version": "3.1.2", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -187,7 +187,7 @@ export class Assets { ): Promise { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `sites/${encodeURIComponent(siteId)}/assets` ), method: "POST", @@ -195,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.1", - "User-Agent": "webflow-api/3.1.1", + "X-Fern-SDK-Version": "3.1.2", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -309,7 +309,7 @@ export class Assets { public async get(assetId: string, requestOptions?: Assets.RequestOptions): Promise { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `assets/${encodeURIComponent(assetId)}` ), method: "GET", @@ -317,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.1", - "User-Agent": "webflow-api/3.1.1", + "X-Fern-SDK-Version": "3.1.2", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -426,7 +426,7 @@ export class Assets { public async delete(assetId: string, requestOptions?: Assets.RequestOptions): Promise { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `assets/${encodeURIComponent(assetId)}` ), method: "DELETE", @@ -434,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.1", - "User-Agent": "webflow-api/3.1.1", + "X-Fern-SDK-Version": "3.1.2", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -542,7 +542,7 @@ export class Assets { ): Promise { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `assets/${encodeURIComponent(assetId)}` ), method: "PATCH", @@ -550,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.1", - "User-Agent": "webflow-api/3.1.1", + "X-Fern-SDK-Version": "3.1.2", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -664,7 +664,7 @@ export class Assets { public async listFolders(siteId: string, requestOptions?: Assets.RequestOptions): Promise { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `sites/${encodeURIComponent(siteId)}/asset_folders` ), method: "GET", @@ -672,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.1", - "User-Agent": "webflow-api/3.1.1", + "X-Fern-SDK-Version": "3.1.2", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -790,7 +790,7 @@ export class Assets { ): Promise { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `sites/${encodeURIComponent(siteId)}/asset_folders` ), method: "POST", @@ -798,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.1", - "User-Agent": "webflow-api/3.1.1", + "X-Fern-SDK-Version": "3.1.2", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -917,7 +917,7 @@ export class Assets { ): Promise { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `asset_folders/${encodeURIComponent(assetFolderId)}` ), method: "GET", @@ -925,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.1", - "User-Agent": "webflow-api/3.1.1", + "X-Fern-SDK-Version": "3.1.2", + "User-Agent": "webflow-api/3.1.2", "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 9cbe3faf..19304f71 100644 --- a/src/api/resources/collections/client/Client.ts +++ b/src/api/resources/collections/client/Client.ts @@ -13,7 +13,7 @@ import { Items } from "../resources/items/client/Client"; export declare namespace Collections { interface Options { - environment?: core.Supplier; + environment?: core.Supplier; accessToken: core.Supplier; } @@ -55,7 +55,7 @@ export class Collections { public async list(siteId: string, requestOptions?: Collections.RequestOptions): Promise { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `sites/${encodeURIComponent(siteId)}/collections` ), method: "GET", @@ -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.1", - "User-Agent": "webflow-api/3.1.1", + "X-Fern-SDK-Version": "3.1.2", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -201,7 +201,7 @@ export class Collections { ): Promise { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `sites/${encodeURIComponent(siteId)}/collections` ), method: "POST", @@ -209,8 +209,8 @@ export class Collections { 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-SDK-Version": "3.1.2", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -327,7 +327,7 @@ export class Collections { public async get(collectionId: string, requestOptions?: Collections.RequestOptions): Promise { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `collections/${encodeURIComponent(collectionId)}` ), method: "GET", @@ -335,8 +335,8 @@ export class Collections { 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-SDK-Version": "3.1.2", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -444,7 +444,7 @@ export class Collections { public async delete(collectionId: string, requestOptions?: Collections.RequestOptions): Promise { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `collections/${encodeURIComponent(collectionId)}` ), method: "DELETE", @@ -452,8 +452,8 @@ export class Collections { 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-SDK-Version": "3.1.2", + "User-Agent": "webflow-api/3.1.2", "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 c206502c..cd63a459 100644 --- a/src/api/resources/collections/resources/fields/client/Client.ts +++ b/src/api/resources/collections/resources/fields/client/Client.ts @@ -11,7 +11,7 @@ import * as errors from "../../../../../../errors/index"; export declare namespace Fields { interface Options { - environment?: core.Supplier; + environment?: core.Supplier; accessToken: core.Supplier; } @@ -53,6 +53,7 @@ export class Fields { * * @example * await client.collections.fields.create("580e63fc8c9a982ac9b8b745", { + * id: "562ac0395358780a1f5e6fbc", * isEditable: true, * isRequired: false, * type: "RichText", @@ -62,6 +63,7 @@ export class Fields { * * @example * await client.collections.fields.create("580e63fc8c9a982ac9b8b745", { + * id: "562ac0395358780a1f5e6fbc", * isEditable: true, * isRequired: false, * type: "Option", @@ -80,6 +82,7 @@ export class Fields { * * @example * await client.collections.fields.create("580e63fc8c9a982ac9b8b745", { + * id: "562ac0395358780a1f5e6fbd", * isEditable: true, * isRequired: false, * type: "Reference", @@ -97,7 +100,7 @@ export class Fields { ): Promise { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `collections/${encodeURIComponent(collectionId)}/fields` ), method: "POST", @@ -105,8 +108,8 @@ export class Fields { 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-SDK-Version": "3.1.2", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -224,7 +227,7 @@ export class Fields { public async delete(collectionId: string, fieldId: string, requestOptions?: Fields.RequestOptions): Promise { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `collections/${encodeURIComponent(collectionId)}/fields/${encodeURIComponent(fieldId)}` ), method: "DELETE", @@ -232,8 +235,8 @@ export class Fields { 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-SDK-Version": "3.1.2", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -348,7 +351,7 @@ export class Fields { ): Promise { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `collections/${encodeURIComponent(collectionId)}/fields/${encodeURIComponent(fieldId)}` ), method: "PATCH", @@ -356,8 +359,8 @@ export class Fields { 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-SDK-Version": "3.1.2", + "User-Agent": "webflow-api/3.1.2", "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 d5f29bd0..5c5c2bf4 100644 --- a/src/api/resources/collections/resources/items/client/Client.ts +++ b/src/api/resources/collections/resources/items/client/Client.ts @@ -11,7 +11,7 @@ import * as errors from "../../../../../../errors/index"; export declare namespace Items { interface Options { - environment?: core.Supplier; + environment?: core.Supplier; accessToken: core.Supplier; } @@ -85,7 +85,7 @@ export class Items { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `collections/${encodeURIComponent(collectionId)}/items` ), method: "GET", @@ -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.1", - "User-Agent": "webflow-api/3.1.1", + "X-Fern-SDK-Version": "3.1.2", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -239,7 +239,7 @@ export class Items { ): Promise { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `collections/${encodeURIComponent(collectionId)}/items` ), method: "POST", @@ -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.1", - "User-Agent": "webflow-api/3.1.1", + "X-Fern-SDK-Version": "3.1.2", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -362,16 +362,20 @@ export class Items { * @throws {@link Webflow.InternalServerError} * * @example - * await client.collections.items.deleteItems("580e63fc8c9a982ac9b8b745") + * await client.collections.items.deleteItems("580e63fc8c9a982ac9b8b745", { + * items: [{ + * id: "580e64008c9a982ac9b8b754" + * }] + * }) */ public async deleteItems( collectionId: string, - request: Webflow.collections.ItemsDeleteItemsRequest = {}, + request: Webflow.collections.ItemsDeleteItemsRequest, requestOptions?: Items.RequestOptions ): Promise { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `collections/${encodeURIComponent(collectionId)}/items` ), method: "DELETE", @@ -379,8 +383,8 @@ export class Items { 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-SDK-Version": "3.1.2", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -551,7 +555,7 @@ export class Items { ): Promise { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `collections/${encodeURIComponent(collectionId)}/items` ), method: "PATCH", @@ -559,8 +563,8 @@ export class Items { 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-SDK-Version": "3.1.2", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -658,6 +662,11 @@ export class Items { /** * List all published items in a collection. * + * + * To serve content to your other frontends applications, enterprise sites have access to a dedicated [content delivery API](/data/docs/cms-content-delivery), available at api-cdn.webflow.com. + * + * + * * Required scope | `CMS:read` * * @param {string} collectionId - Unique identifier for a Collection @@ -710,7 +719,8 @@ export class Items { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi) + .dataApi, `collections/${encodeURIComponent(collectionId)}/items/live` ), method: "GET", @@ -718,8 +728,8 @@ export class Items { 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-SDK-Version": "3.1.2", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -831,6 +841,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: { @@ -842,6 +855,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: { @@ -849,6 +865,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: { @@ -865,7 +884,7 @@ export class Items { ): Promise { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `collections/${encodeURIComponent(collectionId)}/items/live` ), method: "POST", @@ -873,8 +892,8 @@ export class Items { 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-SDK-Version": "3.1.2", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -989,16 +1008,20 @@ export class Items { * @throws {@link Webflow.InternalServerError} * * @example - * await client.collections.items.deleteItemsLive("580e63fc8c9a982ac9b8b745") + * await client.collections.items.deleteItemsLive("580e63fc8c9a982ac9b8b745", { + * items: [{ + * id: "580e64008c9a982ac9b8b754" + * }] + * }) */ public async deleteItemsLive( collectionId: string, - request: Webflow.collections.ItemsDeleteItemsLiveRequest = {}, + request: Webflow.collections.ItemsDeleteItemsLiveRequest, requestOptions?: Items.RequestOptions ): Promise { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `collections/${encodeURIComponent(collectionId)}/items/live` ), method: "DELETE", @@ -1006,8 +1029,8 @@ export class Items { 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-SDK-Version": "3.1.2", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -1175,7 +1198,7 @@ export class Items { ): Promise { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `collections/${encodeURIComponent(collectionId)}/items/live` ), method: "PATCH", @@ -1183,8 +1206,8 @@ export class Items { 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-SDK-Version": "3.1.2", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -1333,7 +1356,7 @@ export class Items { ): Promise { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `collections/${encodeURIComponent(collectionId)}/items/bulk` ), method: "POST", @@ -1341,8 +1364,8 @@ export class Items { 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-SDK-Version": "3.1.2", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -1470,7 +1493,8 @@ export class Items { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi) + .production, `collections/${encodeURIComponent(collectionId)}/items/${encodeURIComponent(itemId)}` ), method: "GET", @@ -1478,8 +1502,8 @@ export class Items { 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-SDK-Version": "3.1.2", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -1603,7 +1627,7 @@ export class Items { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `collections/${encodeURIComponent(collectionId)}/items/${encodeURIComponent(itemId)}` ), method: "DELETE", @@ -1611,8 +1635,8 @@ export class Items { 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-SDK-Version": "3.1.2", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -1731,7 +1755,7 @@ export class Items { ): Promise { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `collections/${encodeURIComponent(collectionId)}/items/${encodeURIComponent(itemId)}` ), method: "PATCH", @@ -1739,8 +1763,8 @@ export class Items { 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-SDK-Version": "3.1.2", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -1838,6 +1862,11 @@ export class Items { /** * Get details of a selected Collection live Item. * + * + * To serve content to your other frontends applications, enterprise sites have access to a dedicated [content delivery API](/data/docs/cms-content-delivery), available at api-cdn.webflow.com. + * + * + * * Required scope | `CMS:read` * * @param {string} collectionId - Unique identifier for a Collection @@ -1868,7 +1897,8 @@ export class Items { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi) + .dataApi, `collections/${encodeURIComponent(collectionId)}/items/${encodeURIComponent(itemId)}/live` ), method: "GET", @@ -1876,8 +1906,8 @@ export class Items { 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-SDK-Version": "3.1.2", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -2003,7 +2033,7 @@ export class Items { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `collections/${encodeURIComponent(collectionId)}/items/${encodeURIComponent(itemId)}/live` ), method: "DELETE", @@ -2011,8 +2041,8 @@ export class Items { 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-SDK-Version": "3.1.2", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -2132,7 +2162,7 @@ export class Items { ): Promise { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `collections/${encodeURIComponent(collectionId)}/items/${encodeURIComponent(itemId)}/live` ), method: "PATCH", @@ -2140,8 +2170,8 @@ export class Items { 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-SDK-Version": "3.1.2", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -2266,7 +2296,7 @@ export class Items { ): Promise { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `collections/${encodeURIComponent(collectionId)}/items/publish` ), method: "POST", @@ -2274,8 +2304,8 @@ export class Items { 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-SDK-Version": "3.1.2", + "User-Agent": "webflow-api/3.1.2", "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/ItemsDeleteItemsLiveRequest.ts b/src/api/resources/collections/resources/items/client/requests/ItemsDeleteItemsLiveRequest.ts index 88fa549f..779fb410 100644 --- a/src/api/resources/collections/resources/items/client/requests/ItemsDeleteItemsLiveRequest.ts +++ b/src/api/resources/collections/resources/items/client/requests/ItemsDeleteItemsLiveRequest.ts @@ -6,8 +6,12 @@ import * as Webflow from "../../../../../../index"; /** * @example - * {} + * { + * items: [{ + * id: "580e64008c9a982ac9b8b754" + * }] + * } */ export interface ItemsDeleteItemsLiveRequest { - items?: Webflow.collections.ItemsDeleteItemsLiveRequestItemsItem[]; + items: Webflow.collections.ItemsDeleteItemsLiveRequestItemsItem[]; } diff --git a/src/api/resources/collections/resources/items/client/requests/ItemsDeleteItemsRequest.ts b/src/api/resources/collections/resources/items/client/requests/ItemsDeleteItemsRequest.ts index 39d30414..503c93a0 100644 --- a/src/api/resources/collections/resources/items/client/requests/ItemsDeleteItemsRequest.ts +++ b/src/api/resources/collections/resources/items/client/requests/ItemsDeleteItemsRequest.ts @@ -6,8 +6,12 @@ import * as Webflow from "../../../../../../index"; /** * @example - * {} + * { + * items: [{ + * id: "580e64008c9a982ac9b8b754" + * }] + * } */ export interface ItemsDeleteItemsRequest { - items?: Webflow.collections.ItemsDeleteItemsRequestItemsItem[]; + items: Webflow.collections.ItemsDeleteItemsRequestItemsItem[]; } diff --git a/src/api/resources/components/client/Client.ts b/src/api/resources/components/client/Client.ts index 7135aa46..9949c063 100644 --- a/src/api/resources/components/client/Client.ts +++ b/src/api/resources/components/client/Client.ts @@ -11,7 +11,7 @@ import * as errors from "../../../../errors/index"; export declare namespace Components { interface Options { - environment?: core.Supplier; + environment?: core.Supplier; accessToken: core.Supplier; } @@ -65,7 +65,7 @@ export class Components { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `sites/${encodeURIComponent(siteId)}/components` ), method: "GET", @@ -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.1", - "User-Agent": "webflow-api/3.1.1", + "X-Fern-SDK-Version": "3.1.2", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -209,7 +209,7 @@ export class Components { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `sites/${encodeURIComponent(siteId)}/components/${encodeURIComponent(componentId)}/dom` ), method: "GET", @@ -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.1", - "User-Agent": "webflow-api/3.1.1", + "X-Fern-SDK-Version": "3.1.2", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -369,7 +369,7 @@ export class Components { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `sites/${encodeURIComponent(siteId)}/components/${encodeURIComponent(componentId)}/dom` ), method: "POST", @@ -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.1", - "User-Agent": "webflow-api/3.1.1", + "X-Fern-SDK-Version": "3.1.2", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -521,7 +521,7 @@ export class Components { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `sites/${encodeURIComponent(siteId)}/components/${encodeURIComponent(componentId)}/properties` ), method: "GET", @@ -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.1", - "User-Agent": "webflow-api/3.1.1", + "X-Fern-SDK-Version": "3.1.2", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -667,7 +667,7 @@ export class Components { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `sites/${encodeURIComponent(siteId)}/components/${encodeURIComponent(componentId)}/properties` ), method: "POST", @@ -675,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.1", - "User-Agent": "webflow-api/3.1.1", + "X-Fern-SDK-Version": "3.1.2", + "User-Agent": "webflow-api/3.1.2", "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 0ead87cc..adb153b7 100644 --- a/src/api/resources/ecommerce/client/Client.ts +++ b/src/api/resources/ecommerce/client/Client.ts @@ -11,7 +11,7 @@ import * as errors from "../../../../errors/index"; export declare namespace Ecommerce { interface Options { - environment?: core.Supplier; + environment?: core.Supplier; accessToken: core.Supplier; } @@ -55,7 +55,7 @@ export class Ecommerce { ): Promise { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `sites/${encodeURIComponent(siteId)}/ecommerce/settings` ), method: "GET", @@ -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.1", - "User-Agent": "webflow-api/3.1.1", + "X-Fern-SDK-Version": "3.1.2", + "User-Agent": "webflow-api/3.1.2", "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 17bc44f7..ac7079bd 100644 --- a/src/api/resources/forms/client/Client.ts +++ b/src/api/resources/forms/client/Client.ts @@ -11,7 +11,7 @@ import * as errors from "../../../../errors/index"; export declare namespace Forms { interface Options { - environment?: core.Supplier; + environment?: core.Supplier; accessToken: core.Supplier; } @@ -70,7 +70,7 @@ export class Forms { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `sites/${encodeURIComponent(siteId)}/forms` ), method: "GET", @@ -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.1", - "User-Agent": "webflow-api/3.1.1", + "X-Fern-SDK-Version": "3.1.2", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -193,7 +193,7 @@ export class Forms { public async get(formId: string, requestOptions?: Forms.RequestOptions): Promise { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `forms/${encodeURIComponent(formId)}` ), method: "GET", @@ -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.1", - "User-Agent": "webflow-api/3.1.1", + "X-Fern-SDK-Version": "3.1.2", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -334,7 +334,7 @@ export class Forms { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `forms/${encodeURIComponent(formId)}/submissions` ), method: "GET", @@ -342,8 +342,8 @@ export class Forms { 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-SDK-Version": "3.1.2", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -458,7 +458,7 @@ export class Forms { ): Promise { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `form_submissions/${encodeURIComponent(formSubmissionId)}` ), method: "GET", @@ -466,8 +466,8 @@ export class Forms { 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-SDK-Version": "3.1.2", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -582,7 +582,7 @@ export class Forms { 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, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `form_submissions/${encodeURIComponent(formSubmissionId)}` ), method: "DELETE", @@ -590,8 +590,8 @@ export class Forms { 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-SDK-Version": "3.1.2", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -706,7 +706,7 @@ export class Forms { ): Promise { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `form_submissions/${encodeURIComponent(formSubmissionId)}` ), method: "PATCH", @@ -714,8 +714,8 @@ export class Forms { 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-SDK-Version": "3.1.2", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -858,7 +858,7 @@ export class Forms { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `sites/${encodeURIComponent(siteId)}/form_submissions` ), method: "GET", @@ -866,8 +866,8 @@ export class Forms { 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-SDK-Version": "3.1.2", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, diff --git a/src/api/resources/inventory/client/Client.ts b/src/api/resources/inventory/client/Client.ts index 864cb36f..5421aab5 100644 --- a/src/api/resources/inventory/client/Client.ts +++ b/src/api/resources/inventory/client/Client.ts @@ -11,7 +11,7 @@ import * as errors from "../../../../errors/index"; export declare namespace Inventory { interface Options { - environment?: core.Supplier; + environment?: core.Supplier; accessToken: core.Supplier; } @@ -60,7 +60,7 @@ export class Inventory { ): Promise { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `collections/${encodeURIComponent(collectionId)}/items/${encodeURIComponent(itemId)}/inventory` ), method: "GET", @@ -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.1", - "User-Agent": "webflow-api/3.1.1", + "X-Fern-SDK-Version": "3.1.2", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -198,7 +198,7 @@ export class Inventory { ): Promise { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `collections/${encodeURIComponent(collectionId)}/items/${encodeURIComponent(itemId)}/inventory` ), method: "PATCH", @@ -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.1", - "User-Agent": "webflow-api/3.1.1", + "X-Fern-SDK-Version": "3.1.2", + "User-Agent": "webflow-api/3.1.2", "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 e618dd83..3c32f5bc 100644 --- a/src/api/resources/orders/client/Client.ts +++ b/src/api/resources/orders/client/Client.ts @@ -11,7 +11,7 @@ import * as errors from "../../../../errors/index"; export declare namespace Orders { interface Options { - environment?: core.Supplier; + environment?: core.Supplier; accessToken: core.Supplier; } @@ -74,7 +74,7 @@ export class Orders { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `sites/${encodeURIComponent(siteId)}/orders` ), method: "GET", @@ -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.1", - "User-Agent": "webflow-api/3.1.1", + "X-Fern-SDK-Version": "3.1.2", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -200,7 +200,7 @@ export class Orders { public async get(siteId: string, orderId: string, requestOptions?: Orders.RequestOptions): Promise { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `sites/${encodeURIComponent(siteId)}/orders/${encodeURIComponent(orderId)}` ), method: "GET", @@ -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.1", - "User-Agent": "webflow-api/3.1.1", + "X-Fern-SDK-Version": "3.1.2", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -334,7 +334,7 @@ export class Orders { ): Promise { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `sites/${encodeURIComponent(siteId)}/orders/${encodeURIComponent(orderId)}` ), method: "PATCH", @@ -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.1", - "User-Agent": "webflow-api/3.1.1", + "X-Fern-SDK-Version": "3.1.2", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -471,7 +471,7 @@ export class Orders { ): Promise { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `sites/${encodeURIComponent(siteId)}/orders/${encodeURIComponent(orderId)}/fulfill` ), method: "POST", @@ -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.1", - "User-Agent": "webflow-api/3.1.1", + "X-Fern-SDK-Version": "3.1.2", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -606,7 +606,7 @@ export class Orders { ): Promise { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `sites/${encodeURIComponent(siteId)}/orders/${encodeURIComponent(orderId)}/unfulfill` ), method: "POST", @@ -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.1", - "User-Agent": "webflow-api/3.1.1", + "X-Fern-SDK-Version": "3.1.2", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -739,7 +739,7 @@ export class Orders { ): Promise { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `sites/${encodeURIComponent(siteId)}/orders/${encodeURIComponent(orderId)}/refund` ), method: "POST", @@ -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.1", - "User-Agent": "webflow-api/3.1.1", + "X-Fern-SDK-Version": "3.1.2", + "User-Agent": "webflow-api/3.1.2", "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 cb565d69..bac479f5 100644 --- a/src/api/resources/pages/client/Client.ts +++ b/src/api/resources/pages/client/Client.ts @@ -12,7 +12,7 @@ import { Scripts } from "../resources/scripts/client/Client"; export declare namespace Pages { interface Options { - environment?: core.Supplier; + environment?: core.Supplier; accessToken: core.Supplier; } @@ -75,7 +75,7 @@ export class Pages { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `sites/${encodeURIComponent(siteId)}/pages` ), method: "GET", @@ -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.1", - "User-Agent": "webflow-api/3.1.1", + "X-Fern-SDK-Version": "3.1.2", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -206,7 +206,7 @@ export class Pages { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `pages/${encodeURIComponent(pageId)}` ), method: "GET", @@ -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.1", - "User-Agent": "webflow-api/3.1.1", + "X-Fern-SDK-Version": "3.1.2", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -365,7 +365,7 @@ export class Pages { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `pages/${encodeURIComponent(pageId)}` ), method: "PUT", @@ -373,8 +373,8 @@ export class Pages { 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-SDK-Version": "3.1.2", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -514,7 +514,7 @@ export class Pages { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `pages/${encodeURIComponent(pageId)}/dom` ), method: "GET", @@ -522,8 +522,8 @@ export class Pages { 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-SDK-Version": "3.1.2", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -669,7 +669,7 @@ export class Pages { _queryParams["localeId"] = localeId; const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `pages/${encodeURIComponent(pageId)}/dom` ), method: "POST", @@ -677,8 +677,8 @@ export class Pages { 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-SDK-Version": "3.1.2", + "User-Agent": "webflow-api/3.1.2", "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 59d9db00..c4d6064d 100644 --- a/src/api/resources/pages/resources/scripts/client/Client.ts +++ b/src/api/resources/pages/resources/scripts/client/Client.ts @@ -11,7 +11,7 @@ import * as errors from "../../../../../../errors/index"; export declare namespace Scripts { interface Options { - environment?: core.Supplier; + environment?: core.Supplier; accessToken: core.Supplier; } @@ -53,7 +53,7 @@ export class Scripts { ): Promise { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `pages/${encodeURIComponent(pageId)}/custom_code` ), method: "GET", @@ -61,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.1", - "User-Agent": "webflow-api/3.1.1", + "X-Fern-SDK-Version": "3.1.2", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -193,7 +193,7 @@ export class Scripts { ): Promise { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `pages/${encodeURIComponent(pageId)}/custom_code` ), method: "PUT", @@ -201,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.1", - "User-Agent": "webflow-api/3.1.1", + "X-Fern-SDK-Version": "3.1.2", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -319,7 +319,7 @@ export class Scripts { public async deleteCustomCode(pageId: string, requestOptions?: Scripts.RequestOptions): Promise { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `pages/${encodeURIComponent(pageId)}/custom_code` ), method: "DELETE", @@ -327,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.1", - "User-Agent": "webflow-api/3.1.1", + "X-Fern-SDK-Version": "3.1.2", + "User-Agent": "webflow-api/3.1.2", "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 3821c2d5..3b0ea51d 100644 --- a/src/api/resources/products/client/Client.ts +++ b/src/api/resources/products/client/Client.ts @@ -11,7 +11,7 @@ import * as errors from "../../../../errors/index"; export declare namespace Products { interface Options { - environment?: core.Supplier; + environment?: core.Supplier; accessToken: core.Supplier; } @@ -70,7 +70,7 @@ export class Products { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `sites/${encodeURIComponent(siteId)}/products` ), method: "GET", @@ -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.1", - "User-Agent": "webflow-api/3.1.1", + "X-Fern-SDK-Version": "3.1.2", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -173,16 +173,12 @@ export class Products { } /** - * Create a new product and SKU. + * Create a new ecommerce product and defaultSKU. A product, at minimum, must have a single SKU. * - * When you create a product, you will always create a SKU, since a Product Item must have, at minimum, a single SKU. - * - * To create a Product with multiple SKUs - for example a T-shirt in sizes small, medium and large: - * - Create parameters in `sku-properties`, also known as [product options and variants.](https://help.webflow.com/hc/en-us/articles/33961334531347-Create-product-options-and-variants). - * - A single `sku-property` would be `color`. Within the `color` property, list the various colors of T-shirts as an array of `enum` values: `royal-blue`, `crimson-red`, and `forrest-green`. - * - Once, you've created a Product and its `sku-properties` with `enum` values, Webflow will create a **default SKU**, which will automatically be a combination of the first `sku-properties` you've created. - * - In our example, the default SKU will be a Royal Blue T-Shirt, because our first `enum` of our Color `sku-property` is Royal Blue. - * - After you've created your product, you can create additional SKUs using the [Create SKU endpoint.](/data/reference/ecommerce/products/create-sku) + * To create a product with multiple SKUs: + * - First, create a list of `sku-properties`, also known as [product options](https://help.webflow.com/hc/en-us/articles/33961334531347-Create-product-options-and-variants). For example, a T-shirt product may have a "color" `sku-property`, with a list of enum values: red, yellow, and blue, another `sku-property` may be "size", with a list of enum values: small, medium, and large. + * - Once, a product is created with a list of `sku-properties`, Webflow will create a **default SKU**, which is always a combination of the first `enum` values of each `sku-property`. (e.g. Small - Red - T-Shirt) + * - After creation, you can create additional SKUs for the product, using the [Create SKUs endpoint.](/data/reference/ecommerce/products/create-sku) * * Upon creation, the default product type will be `Advanced`, which ensures all Product and SKU fields will be shown to users in the Designer. * @@ -201,16 +197,70 @@ export class Products { * @throws {@link Webflow.InternalServerError} * * @example - * await client.products.create("580e63e98c9a982ac9b8b741") + * await client.products.create("580e63e98c9a982ac9b8b741", { + * publishStatus: "staging", + * product: { + * fieldData: { + * name: "Colorful T-shirt", + * slug: "colorful-t-shirt", + * description: "Our best-selling t-shirt available in multiple colors and sizes", + * skuProperties: [{ + * id: "color", + * name: "Color", + * enum: [{ + * id: "red", + * name: "Red", + * slug: "red" + * }, { + * id: "yellow", + * name: "Yellow", + * slug: "yellow" + * }, { + * id: "blue", + * name: "Blue", + * slug: "blue" + * }] + * }, { + * id: "size", + * name: "Size", + * enum: [{ + * id: "small", + * name: "Small", + * slug: "small" + * }, { + * id: "medium", + * name: "Medium", + * slug: "medium" + * }, { + * id: "large", + * name: "Large", + * slug: "large" + * }] + * }] + * } + * }, + * sku: { + * fieldData: { + * name: "Colorful T-shirt - Red Small", + * slug: "colorful-t-shirt-red-small", + * price: { + * value: 2499, + * unit: "USD", + * currency: "USD" + * }, + * mainImage: "https://rocketamp-sample-store.myshopify.com/cdn/shop/products/Gildan_2000_Antique_Cherry_Red_Front_1024x1024.jpg?v=1527232987" + * } + * } + * }) */ public async create( siteId: string, - request: Webflow.ProductSkuCreate = {}, + request: Webflow.ProductSkuCreate, requestOptions?: Products.RequestOptions ): Promise { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `sites/${encodeURIComponent(siteId)}/products` ), method: "POST", @@ -218,8 +268,8 @@ export class Products { 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-SDK-Version": "3.1.2", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -344,7 +394,7 @@ export class Products { ): Promise { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `sites/${encodeURIComponent(siteId)}/products/${encodeURIComponent(productId)}` ), method: "GET", @@ -352,8 +402,8 @@ export class Products { 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-SDK-Version": "3.1.2", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -478,7 +528,7 @@ export class Products { ): Promise { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `sites/${encodeURIComponent(siteId)}/products/${encodeURIComponent(productId)}` ), method: "PATCH", @@ -486,8 +536,8 @@ export class Products { 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-SDK-Version": "3.1.2", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -608,7 +658,17 @@ export class Products { * * @example * await client.products.createSku("580e63e98c9a982ac9b8b741", "580e63fc8c9a982ac9b8b745", { - * skus: [{}] + * skus: [{ + * fieldData: { + * name: "Colorful T-shirt - Default", + * slug: "colorful-t-shirt-default", + * price: { + * value: 2499, + * unit: "USD", + * currency: "USD" + * } + * } + * }] * }) */ public async createSku( @@ -619,7 +679,7 @@ export class Products { ): Promise { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `sites/${encodeURIComponent(siteId)}/products/${encodeURIComponent(productId)}/skus` ), method: "POST", @@ -627,8 +687,8 @@ export class Products { 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-SDK-Version": "3.1.2", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -750,7 +810,17 @@ export class Products { * * @example * await client.products.updateSku("580e63e98c9a982ac9b8b741", "580e63fc8c9a982ac9b8b745", "5e8518516e147040726cc415", { - * sku: {} + * sku: { + * fieldData: { + * name: "Colorful T-shirt - Default", + * slug: "colorful-t-shirt-default", + * price: { + * value: 2499, + * unit: "USD", + * currency: "USD" + * } + * } + * } * }) */ public async updateSku( @@ -762,7 +832,7 @@ export class Products { ): Promise { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `sites/${encodeURIComponent(siteId)}/products/${encodeURIComponent( productId )}/skus/${encodeURIComponent(skuId)}` @@ -772,8 +842,8 @@ export class Products { 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-SDK-Version": "3.1.2", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, diff --git a/src/api/resources/products/client/requests/ProductSkuCreate.ts b/src/api/resources/products/client/requests/ProductSkuCreate.ts index f5eeb9a9..d8dd5b6c 100644 --- a/src/api/resources/products/client/requests/ProductSkuCreate.ts +++ b/src/api/resources/products/client/requests/ProductSkuCreate.ts @@ -6,10 +6,64 @@ import * as Webflow from "../../../../index"; /** * @example - * {} + * { + * publishStatus: "staging", + * product: { + * fieldData: { + * name: "Colorful T-shirt", + * slug: "colorful-t-shirt", + * description: "Our best-selling t-shirt available in multiple colors and sizes", + * skuProperties: [{ + * id: "color", + * name: "Color", + * enum: [{ + * id: "red", + * name: "Red", + * slug: "red" + * }, { + * id: "yellow", + * name: "Yellow", + * slug: "yellow" + * }, { + * id: "blue", + * name: "Blue", + * slug: "blue" + * }] + * }, { + * id: "size", + * name: "Size", + * enum: [{ + * id: "small", + * name: "Small", + * slug: "small" + * }, { + * id: "medium", + * name: "Medium", + * slug: "medium" + * }, { + * id: "large", + * name: "Large", + * slug: "large" + * }] + * }] + * } + * }, + * sku: { + * fieldData: { + * name: "Colorful T-shirt - Red Small", + * slug: "colorful-t-shirt-red-small", + * price: { + * value: 2499, + * unit: "USD", + * currency: "USD" + * }, + * mainImage: "https://rocketamp-sample-store.myshopify.com/cdn/shop/products/Gildan_2000_Antique_Cherry_Red_Front_1024x1024.jpg?v=1527232987" + * } + * } + * } */ export interface ProductSkuCreate { publishStatus?: Webflow.PublishStatus; - product?: Webflow.Product; - sku?: Webflow.Sku; + product: Webflow.ProductSkuCreateProduct; + sku: Webflow.ProductSkuCreateSku; } diff --git a/src/api/resources/products/client/requests/ProductsCreateSkuRequest.ts b/src/api/resources/products/client/requests/ProductsCreateSkuRequest.ts index 6d2e7fd0..3abc641b 100644 --- a/src/api/resources/products/client/requests/ProductsCreateSkuRequest.ts +++ b/src/api/resources/products/client/requests/ProductsCreateSkuRequest.ts @@ -7,7 +7,17 @@ import * as Webflow from "../../../../index"; /** * @example * { - * skus: [{}] + * skus: [{ + * fieldData: { + * name: "Colorful T-shirt - Default", + * slug: "colorful-t-shirt-default", + * price: { + * value: 2499, + * unit: "USD", + * currency: "USD" + * } + * } + * }] * } */ export interface ProductsCreateSkuRequest { diff --git a/src/api/resources/products/client/requests/ProductsUpdateSkuRequest.ts b/src/api/resources/products/client/requests/ProductsUpdateSkuRequest.ts index 9f79e47a..168ef74b 100644 --- a/src/api/resources/products/client/requests/ProductsUpdateSkuRequest.ts +++ b/src/api/resources/products/client/requests/ProductsUpdateSkuRequest.ts @@ -7,7 +7,17 @@ import * as Webflow from "../../../../index"; /** * @example * { - * sku: {} + * sku: { + * fieldData: { + * name: "Colorful T-shirt - Default", + * slug: "colorful-t-shirt-default", + * price: { + * value: 2499, + * unit: "USD", + * currency: "USD" + * } + * } + * } * } */ export interface ProductsUpdateSkuRequest { diff --git a/src/api/resources/products/types/ProductSkuCreateProduct.ts b/src/api/resources/products/types/ProductSkuCreateProduct.ts new file mode 100644 index 00000000..c8638f46 --- /dev/null +++ b/src/api/resources/products/types/ProductSkuCreateProduct.ts @@ -0,0 +1,9 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Webflow from "../../../index"; + +export interface ProductSkuCreateProduct { + fieldData?: Webflow.ProductFieldData; +} diff --git a/src/api/resources/products/types/ProductSkuCreateSku.ts b/src/api/resources/products/types/ProductSkuCreateSku.ts new file mode 100644 index 00000000..c704fa2f --- /dev/null +++ b/src/api/resources/products/types/ProductSkuCreateSku.ts @@ -0,0 +1,9 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Webflow from "../../../index"; + +export interface ProductSkuCreateSku { + fieldData?: Webflow.SkuFieldData; +} diff --git a/src/api/resources/products/types/ProductsCreateSkuResponse.ts b/src/api/resources/products/types/ProductsCreateSkuResponse.ts index 0f1f0c50..c0a565fa 100644 --- a/src/api/resources/products/types/ProductsCreateSkuResponse.ts +++ b/src/api/resources/products/types/ProductsCreateSkuResponse.ts @@ -5,5 +5,5 @@ import * as Webflow from "../../../index"; export interface ProductsCreateSkuResponse { - skus?: Webflow.Sku[]; + skus: Webflow.Sku[]; } diff --git a/src/api/resources/products/types/index.ts b/src/api/resources/products/types/index.ts index e286df49..61d70f8d 100644 --- a/src/api/resources/products/types/index.ts +++ b/src/api/resources/products/types/index.ts @@ -1 +1,3 @@ +export * from "./ProductSkuCreateProduct"; +export * from "./ProductSkuCreateSku"; export * from "./ProductsCreateSkuResponse"; diff --git a/src/api/resources/scripts/client/Client.ts b/src/api/resources/scripts/client/Client.ts index d0325277..7eb642ff 100644 --- a/src/api/resources/scripts/client/Client.ts +++ b/src/api/resources/scripts/client/Client.ts @@ -11,7 +11,7 @@ import * as errors from "../../../../errors/index"; export declare namespace Scripts { interface Options { - environment?: core.Supplier; + environment?: core.Supplier; accessToken: core.Supplier; } @@ -54,7 +54,7 @@ export class Scripts { public async list(siteId: string, requestOptions?: Scripts.RequestOptions): Promise { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `sites/${encodeURIComponent(siteId)}/registered_scripts` ), method: "GET", @@ -62,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.1", - "User-Agent": "webflow-api/3.1.1", + "X-Fern-SDK-Version": "3.1.2", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -187,7 +187,7 @@ export class Scripts { ): Promise { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `sites/${encodeURIComponent(siteId)}/registered_scripts/hosted` ), method: "POST", @@ -195,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.1", - "User-Agent": "webflow-api/3.1.1", + "X-Fern-SDK-Version": "3.1.2", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -324,7 +324,7 @@ export class Scripts { ): Promise { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `sites/${encodeURIComponent(siteId)}/registered_scripts/inline` ), method: "POST", @@ -332,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.1", - "User-Agent": "webflow-api/3.1.1", + "X-Fern-SDK-Version": "3.1.2", + "User-Agent": "webflow-api/3.1.2", "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 49fdc368..c2164bb2 100644 --- a/src/api/resources/sites/client/Client.ts +++ b/src/api/resources/sites/client/Client.ts @@ -11,12 +11,14 @@ import * as errors from "../../../../errors/index"; import { Redirects } from "../resources/redirects/client/Client"; import { Plans } from "../resources/plans/client/Client"; import { RobotsTxt } from "../resources/robotsTxt/client/Client"; +import { WellKnown } from "../resources/wellKnown/client/Client"; import { ActivityLogs } from "../resources/activityLogs/client/Client"; +import { Comments } from "../resources/comments/client/Client"; import { Scripts } from "../resources/scripts/client/Client"; export declare namespace Sites { interface Options { - environment?: core.Supplier; + environment?: core.Supplier; accessToken: core.Supplier; } @@ -68,7 +70,7 @@ export class Sites { ): Promise { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `workspaces/${encodeURIComponent(workspaceId)}/sites` ), method: "POST", @@ -76,8 +78,8 @@ export class Sites { 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-SDK-Version": "3.1.2", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -191,7 +193,7 @@ export class Sites { public async list(requestOptions?: Sites.RequestOptions): Promise { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, "sites" ), method: "GET", @@ -199,8 +201,8 @@ export class Sites { 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-SDK-Version": "3.1.2", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -296,7 +298,7 @@ export class Sites { public async get(siteId: string, requestOptions?: Sites.RequestOptions): Promise { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `sites/${encodeURIComponent(siteId)}` ), method: "GET", @@ -304,8 +306,8 @@ export class Sites { 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-SDK-Version": "3.1.2", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -416,7 +418,7 @@ export class Sites { public async delete(siteId: string, requestOptions?: Sites.RequestOptions): Promise { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `sites/${encodeURIComponent(siteId)}` ), method: "DELETE", @@ -424,8 +426,8 @@ export class Sites { 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-SDK-Version": "3.1.2", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -537,7 +539,7 @@ export class Sites { ): Promise { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `sites/${encodeURIComponent(siteId)}` ), method: "PATCH", @@ -545,8 +547,8 @@ export class Sites { 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-SDK-Version": "3.1.2", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -661,7 +663,7 @@ export class Sites { public async getCustomDomain(siteId: string, requestOptions?: Sites.RequestOptions): Promise { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `sites/${encodeURIComponent(siteId)}/custom_domains` ), method: "GET", @@ -669,8 +671,8 @@ export class Sites { 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-SDK-Version": "3.1.2", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -787,7 +789,7 @@ export class Sites { ): Promise { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `sites/${encodeURIComponent(siteId)}/publish` ), method: "POST", @@ -795,8 +797,8 @@ export class Sites { 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-SDK-Version": "3.1.2", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -899,12 +901,24 @@ export class Sites { return (this._robotsTxt ??= new RobotsTxt(this._options)); } + protected _wellKnown: WellKnown | undefined; + + public get wellKnown(): WellKnown { + return (this._wellKnown ??= new WellKnown(this._options)); + } + protected _activityLogs: ActivityLogs | undefined; public get activityLogs(): ActivityLogs { return (this._activityLogs ??= new ActivityLogs(this._options)); } + protected _comments: Comments | undefined; + + public get comments(): Comments { + return (this._comments ??= new Comments(this._options)); + } + protected _scripts: Scripts | undefined; public get scripts(): Scripts { diff --git a/src/api/resources/sites/index.ts b/src/api/resources/sites/index.ts index 848e75ab..a931b363 100644 --- a/src/api/resources/sites/index.ts +++ b/src/api/resources/sites/index.ts @@ -1,3 +1,3 @@ export * from "./types"; -export * from "./client"; export * from "./resources"; +export * from "./client"; diff --git a/src/api/resources/sites/resources/activityLogs/client/Client.ts b/src/api/resources/sites/resources/activityLogs/client/Client.ts index dee394dd..7f75b0f5 100644 --- a/src/api/resources/sites/resources/activityLogs/client/Client.ts +++ b/src/api/resources/sites/resources/activityLogs/client/Client.ts @@ -11,7 +11,7 @@ import * as errors from "../../../../../../errors/index"; export declare namespace ActivityLogs { interface Options { - environment?: core.Supplier; + environment?: core.Supplier; accessToken: core.Supplier; } @@ -66,7 +66,7 @@ export class ActivityLogs { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `sites/${encodeURIComponent(siteId)}/activity_logs` ), method: "GET", @@ -74,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.1", - "User-Agent": "webflow-api/3.1.1", + "X-Fern-SDK-Version": "3.1.2", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, diff --git a/src/api/resources/sites/resources/comments/client/Client.ts b/src/api/resources/sites/resources/comments/client/Client.ts new file mode 100644 index 00000000..d33ce471 --- /dev/null +++ b/src/api/resources/sites/resources/comments/client/Client.ts @@ -0,0 +1,341 @@ +/** + * 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"; +import { Replies } from "../resources/replies/client/Client"; + +export declare namespace Comments { + 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 Comments { + constructor(protected readonly _options: Comments.Options) {} + + /** + * List all comment threads for a site. + * + * Required scope | `comments:read` + * + * @param {string} siteId - Unique identifier for a Site + * @param {Webflow.sites.CommentsListCommentThreadsRequest} request + * @param {Comments.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.sites.comments.listCommentThreads("580e63e98c9a982ac9b8b741", { + * localeId: "65427cf400e02b306eaa04a0" + * }) + */ + public async listCommentThreads( + siteId: string, + request: Webflow.sites.CommentsListCommentThreadsRequest = {}, + requestOptions?: Comments.RequestOptions + ): Promise { + const { localeId, offset, limit, sortBy, sortOrder } = request; + const _queryParams: Record = {}; + if (localeId != null) { + _queryParams["localeId"] = localeId; + } + + if (offset != null) { + _queryParams["offset"] = offset.toString(); + } + + if (limit != null) { + _queryParams["limit"] = limit.toString(); + } + + if (sortBy != null) { + _queryParams["sortBy"] = sortBy; + } + + if (sortOrder != null) { + _queryParams["sortOrder"] = sortOrder; + } + + const _response = await core.fetcher({ + url: urlJoin( + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, + `sites/${encodeURIComponent(siteId)}/comments` + ), + method: "GET", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "webflow-api", + "X-Fern-SDK-Version": "3.1.2", + "User-Agent": "webflow-api/3.1.2", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, + }, + contentType: "application/json", + queryParameters: _queryParams, + requestType: "json", + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return serializers.CommentThreadList.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}/comments."); + case "unknown": + throw new errors.WebflowError({ + message: _response.error.errorMessage, + }); + } + } + + /** + * Get details of a specific comment thread. + * + * Required scope | `comments:read` + * + * @param {string} siteId - Unique identifier for a Site + * @param {string} commentThreadId - Unique identifier for a Comment Thread + * @param {Webflow.sites.CommentsGetCommentThreadRequest} request + * @param {Comments.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.sites.comments.getCommentThread("580e63e98c9a982ac9b8b741", "580e63e98c9a982ac9b8b741", { + * localeId: "65427cf400e02b306eaa04a0" + * }) + */ + public async getCommentThread( + siteId: string, + commentThreadId: string, + request: Webflow.sites.CommentsGetCommentThreadRequest = {}, + requestOptions?: Comments.RequestOptions + ): Promise { + const { localeId, offset, limit, sortBy, sortOrder } = request; + const _queryParams: Record = {}; + if (localeId != null) { + _queryParams["localeId"] = localeId; + } + + if (offset != null) { + _queryParams["offset"] = offset.toString(); + } + + if (limit != null) { + _queryParams["limit"] = limit.toString(); + } + + if (sortBy != null) { + _queryParams["sortBy"] = sortBy; + } + + if (sortOrder != null) { + _queryParams["sortOrder"] = sortOrder; + } + + const _response = await core.fetcher({ + url: urlJoin( + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, + `sites/${encodeURIComponent(siteId)}/comments/${encodeURIComponent(commentThreadId)}` + ), + method: "GET", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "webflow-api", + "X-Fern-SDK-Version": "3.1.2", + "User-Agent": "webflow-api/3.1.2", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, + }, + contentType: "application/json", + queryParameters: _queryParams, + requestType: "json", + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return serializers.CommentThread.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}/comments/{comment_thread_id}." + ); + case "unknown": + throw new errors.WebflowError({ + message: _response.error.errorMessage, + }); + } + } + + protected _replies: Replies | undefined; + + public get replies(): Replies { + return (this._replies ??= new Replies(this._options)); + } + + protected async _getAuthorizationHeader(): Promise { + return `Bearer ${await core.Supplier.get(this._options.accessToken)}`; + } +} diff --git a/src/api/resources/sites/resources/comments/client/index.ts b/src/api/resources/sites/resources/comments/client/index.ts new file mode 100644 index 00000000..415726b7 --- /dev/null +++ b/src/api/resources/sites/resources/comments/client/index.ts @@ -0,0 +1 @@ +export * from "./requests"; diff --git a/src/api/resources/sites/resources/comments/client/requests/CommentsGetCommentThreadRequest.ts b/src/api/resources/sites/resources/comments/client/requests/CommentsGetCommentThreadRequest.ts new file mode 100644 index 00000000..451ff87b --- /dev/null +++ b/src/api/resources/sites/resources/comments/client/requests/CommentsGetCommentThreadRequest.ts @@ -0,0 +1,34 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Webflow from "../../../../../../index"; + +/** + * @example + * { + * localeId: "65427cf400e02b306eaa04a0" + * } + */ +export interface CommentsGetCommentThreadRequest { + /** + * Unique identifier for a specific locale. Applicable, when using localization. + */ + localeId?: string; + /** + * Offset used for pagination if the results have more than limit records + */ + offset?: number; + /** + * Maximum number of records to be returned (max limit: 100) + */ + limit?: number; + /** + * Sort results by the provided value. Only allowed when sortOrder is provided. + */ + sortBy?: Webflow.sites.CommentsGetCommentThreadRequestSortBy; + /** + * Sorts the results by asc or desc + */ + sortOrder?: Webflow.sites.CommentsGetCommentThreadRequestSortOrder; +} diff --git a/src/api/resources/sites/resources/comments/client/requests/CommentsListCommentThreadsRequest.ts b/src/api/resources/sites/resources/comments/client/requests/CommentsListCommentThreadsRequest.ts new file mode 100644 index 00000000..2f9fac0b --- /dev/null +++ b/src/api/resources/sites/resources/comments/client/requests/CommentsListCommentThreadsRequest.ts @@ -0,0 +1,34 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Webflow from "../../../../../../index"; + +/** + * @example + * { + * localeId: "65427cf400e02b306eaa04a0" + * } + */ +export interface CommentsListCommentThreadsRequest { + /** + * Unique identifier for a specific locale. Applicable, when using localization. + */ + localeId?: string; + /** + * Offset used for pagination if the results have more than limit records + */ + offset?: number; + /** + * Maximum number of records to be returned (max limit: 100) + */ + limit?: number; + /** + * Sort results by the provided value. Only allowed when sortOrder is provided. + */ + sortBy?: Webflow.sites.CommentsListCommentThreadsRequestSortBy; + /** + * Sorts the results by asc or desc + */ + sortOrder?: Webflow.sites.CommentsListCommentThreadsRequestSortOrder; +} diff --git a/src/api/resources/sites/resources/comments/client/requests/index.ts b/src/api/resources/sites/resources/comments/client/requests/index.ts new file mode 100644 index 00000000..d02c904e --- /dev/null +++ b/src/api/resources/sites/resources/comments/client/requests/index.ts @@ -0,0 +1,2 @@ +export { type CommentsListCommentThreadsRequest } from "./CommentsListCommentThreadsRequest"; +export { type CommentsGetCommentThreadRequest } from "./CommentsGetCommentThreadRequest"; diff --git a/src/api/resources/sites/resources/comments/index.ts b/src/api/resources/sites/resources/comments/index.ts new file mode 100644 index 00000000..a931b363 --- /dev/null +++ b/src/api/resources/sites/resources/comments/index.ts @@ -0,0 +1,3 @@ +export * from "./types"; +export * from "./resources"; +export * from "./client"; diff --git a/src/api/resources/sites/resources/comments/resources/index.ts b/src/api/resources/sites/resources/comments/resources/index.ts new file mode 100644 index 00000000..dd762da8 --- /dev/null +++ b/src/api/resources/sites/resources/comments/resources/index.ts @@ -0,0 +1,3 @@ +export * as replies from "./replies"; +export * from "./replies/types"; +export * from "./replies/client/requests"; diff --git a/src/api/resources/sites/resources/comments/resources/replies/client/Client.ts b/src/api/resources/sites/resources/comments/resources/replies/client/Client.ts new file mode 100644 index 00000000..dbcbd127 --- /dev/null +++ b/src/api/resources/sites/resources/comments/resources/replies/client/Client.ts @@ -0,0 +1,187 @@ +/** + * 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 Replies { + 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 Replies { + constructor(protected readonly _options: Replies.Options) {} + + /** + * List all replies to a specific comment thread. + * + * Required scope | `comments:read` + * + * @param {string} siteId - Unique identifier for a Site + * @param {string} commentThreadId - Unique identifier for a Comment Thread + * @param {Webflow.sites.comments.RepliesListRepliesRequest} request + * @param {Replies.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.sites.comments.replies.listReplies("580e63e98c9a982ac9b8b741", "580e63e98c9a982ac9b8b741", { + * localeId: "65427cf400e02b306eaa04a0" + * }) + */ + public async listReplies( + siteId: string, + commentThreadId: string, + request: Webflow.sites.comments.RepliesListRepliesRequest = {}, + requestOptions?: Replies.RequestOptions + ): Promise { + const { localeId, offset, limit, sortBy, sortOrder } = request; + const _queryParams: Record = {}; + if (localeId != null) { + _queryParams["localeId"] = localeId; + } + + if (offset != null) { + _queryParams["offset"] = offset.toString(); + } + + if (limit != null) { + _queryParams["limit"] = limit.toString(); + } + + if (sortBy != null) { + _queryParams["sortBy"] = sortBy; + } + + if (sortOrder != null) { + _queryParams["sortOrder"] = sortOrder; + } + + const _response = await core.fetcher({ + url: urlJoin( + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, + `sites/${encodeURIComponent(siteId)}/comments/${encodeURIComponent(commentThreadId)}/replies` + ), + method: "GET", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "webflow-api", + "X-Fern-SDK-Version": "3.1.2", + "User-Agent": "webflow-api/3.1.2", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, + }, + contentType: "application/json", + queryParameters: _queryParams, + requestType: "json", + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return serializers.CommentReplyList.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}/comments/{comment_thread_id}/replies." + ); + 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/sites/resources/comments/resources/replies/client/index.ts b/src/api/resources/sites/resources/comments/resources/replies/client/index.ts new file mode 100644 index 00000000..415726b7 --- /dev/null +++ b/src/api/resources/sites/resources/comments/resources/replies/client/index.ts @@ -0,0 +1 @@ +export * from "./requests"; diff --git a/src/api/resources/sites/resources/comments/resources/replies/client/requests/RepliesListRepliesRequest.ts b/src/api/resources/sites/resources/comments/resources/replies/client/requests/RepliesListRepliesRequest.ts new file mode 100644 index 00000000..45d0c654 --- /dev/null +++ b/src/api/resources/sites/resources/comments/resources/replies/client/requests/RepliesListRepliesRequest.ts @@ -0,0 +1,34 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Webflow from "../../../../../../../../index"; + +/** + * @example + * { + * localeId: "65427cf400e02b306eaa04a0" + * } + */ +export interface RepliesListRepliesRequest { + /** + * Unique identifier for a specific locale. Applicable, when using localization. + */ + localeId?: string; + /** + * Offset used for pagination if the results have more than limit records + */ + offset?: number; + /** + * Maximum number of records to be returned (max limit: 100) + */ + limit?: number; + /** + * Sort results by the provided value. Only allowed when sortOrder is provided. + */ + sortBy?: Webflow.sites.comments.RepliesListRepliesRequestSortBy; + /** + * Sorts the results by asc or desc + */ + sortOrder?: Webflow.sites.comments.RepliesListRepliesRequestSortOrder; +} diff --git a/src/api/resources/sites/resources/comments/resources/replies/client/requests/index.ts b/src/api/resources/sites/resources/comments/resources/replies/client/requests/index.ts new file mode 100644 index 00000000..6cb8756b --- /dev/null +++ b/src/api/resources/sites/resources/comments/resources/replies/client/requests/index.ts @@ -0,0 +1 @@ +export { type RepliesListRepliesRequest } from "./RepliesListRepliesRequest"; diff --git a/src/api/resources/sites/resources/comments/resources/replies/index.ts b/src/api/resources/sites/resources/comments/resources/replies/index.ts new file mode 100644 index 00000000..c9240f83 --- /dev/null +++ b/src/api/resources/sites/resources/comments/resources/replies/index.ts @@ -0,0 +1,2 @@ +export * from "./types"; +export * from "./client"; diff --git a/src/api/resources/sites/resources/comments/resources/replies/types/RepliesListRepliesRequestSortBy.ts b/src/api/resources/sites/resources/comments/resources/replies/types/RepliesListRepliesRequestSortBy.ts new file mode 100644 index 00000000..6beecf5b --- /dev/null +++ b/src/api/resources/sites/resources/comments/resources/replies/types/RepliesListRepliesRequestSortBy.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export type RepliesListRepliesRequestSortBy = "createdOn" | "lastUpdated"; + +export const RepliesListRepliesRequestSortBy = { + CreatedOn: "createdOn", + LastUpdated: "lastUpdated", +} as const; diff --git a/src/api/resources/sites/resources/comments/resources/replies/types/RepliesListRepliesRequestSortOrder.ts b/src/api/resources/sites/resources/comments/resources/replies/types/RepliesListRepliesRequestSortOrder.ts new file mode 100644 index 00000000..e2e97e17 --- /dev/null +++ b/src/api/resources/sites/resources/comments/resources/replies/types/RepliesListRepliesRequestSortOrder.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export type RepliesListRepliesRequestSortOrder = "asc" | "desc"; + +export const RepliesListRepliesRequestSortOrder = { + Asc: "asc", + Desc: "desc", +} as const; diff --git a/src/api/resources/sites/resources/comments/resources/replies/types/index.ts b/src/api/resources/sites/resources/comments/resources/replies/types/index.ts new file mode 100644 index 00000000..50d9aa3d --- /dev/null +++ b/src/api/resources/sites/resources/comments/resources/replies/types/index.ts @@ -0,0 +1,2 @@ +export * from "./RepliesListRepliesRequestSortBy"; +export * from "./RepliesListRepliesRequestSortOrder"; diff --git a/src/api/resources/sites/resources/comments/types/CommentsGetCommentThreadRequestSortBy.ts b/src/api/resources/sites/resources/comments/types/CommentsGetCommentThreadRequestSortBy.ts new file mode 100644 index 00000000..b4890b59 --- /dev/null +++ b/src/api/resources/sites/resources/comments/types/CommentsGetCommentThreadRequestSortBy.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export type CommentsGetCommentThreadRequestSortBy = "createdOn" | "lastUpdated"; + +export const CommentsGetCommentThreadRequestSortBy = { + CreatedOn: "createdOn", + LastUpdated: "lastUpdated", +} as const; diff --git a/src/api/resources/sites/resources/comments/types/CommentsGetCommentThreadRequestSortOrder.ts b/src/api/resources/sites/resources/comments/types/CommentsGetCommentThreadRequestSortOrder.ts new file mode 100644 index 00000000..4d59c9ec --- /dev/null +++ b/src/api/resources/sites/resources/comments/types/CommentsGetCommentThreadRequestSortOrder.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export type CommentsGetCommentThreadRequestSortOrder = "asc" | "desc"; + +export const CommentsGetCommentThreadRequestSortOrder = { + Asc: "asc", + Desc: "desc", +} as const; diff --git a/src/api/resources/sites/resources/comments/types/CommentsListCommentThreadsRequestSortBy.ts b/src/api/resources/sites/resources/comments/types/CommentsListCommentThreadsRequestSortBy.ts new file mode 100644 index 00000000..4f903c7c --- /dev/null +++ b/src/api/resources/sites/resources/comments/types/CommentsListCommentThreadsRequestSortBy.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export type CommentsListCommentThreadsRequestSortBy = "createdOn" | "lastUpdated"; + +export const CommentsListCommentThreadsRequestSortBy = { + CreatedOn: "createdOn", + LastUpdated: "lastUpdated", +} as const; diff --git a/src/api/resources/sites/resources/comments/types/CommentsListCommentThreadsRequestSortOrder.ts b/src/api/resources/sites/resources/comments/types/CommentsListCommentThreadsRequestSortOrder.ts new file mode 100644 index 00000000..f8c50a9b --- /dev/null +++ b/src/api/resources/sites/resources/comments/types/CommentsListCommentThreadsRequestSortOrder.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export type CommentsListCommentThreadsRequestSortOrder = "asc" | "desc"; + +export const CommentsListCommentThreadsRequestSortOrder = { + Asc: "asc", + Desc: "desc", +} as const; diff --git a/src/api/resources/sites/resources/comments/types/index.ts b/src/api/resources/sites/resources/comments/types/index.ts new file mode 100644 index 00000000..0d1f184f --- /dev/null +++ b/src/api/resources/sites/resources/comments/types/index.ts @@ -0,0 +1,4 @@ +export * from "./CommentsListCommentThreadsRequestSortBy"; +export * from "./CommentsListCommentThreadsRequestSortOrder"; +export * from "./CommentsGetCommentThreadRequestSortBy"; +export * from "./CommentsGetCommentThreadRequestSortOrder"; diff --git a/src/api/resources/sites/resources/index.ts b/src/api/resources/sites/resources/index.ts index 35fcc5b7..e0f7c245 100644 --- a/src/api/resources/sites/resources/index.ts +++ b/src/api/resources/sites/resources/index.ts @@ -1,7 +1,13 @@ +export * as wellKnown from "./wellKnown"; +export * from "./wellKnown/types"; +export * as comments from "./comments"; +export * from "./comments/types"; export * as redirects from "./redirects"; export * as plans from "./plans"; export * as robotsTxt from "./robotsTxt"; export * as activityLogs from "./activityLogs"; export * as scripts from "./scripts"; +export * from "./wellKnown/client/requests"; export * from "./activityLogs/client/requests"; +export * from "./comments/client/requests"; export * from "./scripts/client/requests"; diff --git a/src/api/resources/sites/resources/plans/client/Client.ts b/src/api/resources/sites/resources/plans/client/Client.ts index 24b35aea..118700a9 100644 --- a/src/api/resources/sites/resources/plans/client/Client.ts +++ b/src/api/resources/sites/resources/plans/client/Client.ts @@ -11,7 +11,7 @@ import * as errors from "../../../../../../errors/index"; export declare namespace Plans { interface Options { - environment?: core.Supplier; + environment?: core.Supplier; accessToken: core.Supplier; } @@ -52,7 +52,7 @@ export class Plans { public async getSitePlan(siteId: string, requestOptions?: Plans.RequestOptions): Promise { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `sites/${encodeURIComponent(siteId)}/plan` ), method: "GET", @@ -60,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.1", - "User-Agent": "webflow-api/3.1.1", + "X-Fern-SDK-Version": "3.1.2", + "User-Agent": "webflow-api/3.1.2", "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 ebc41a36..a88b7b64 100644 --- a/src/api/resources/sites/resources/redirects/client/Client.ts +++ b/src/api/resources/sites/resources/redirects/client/Client.ts @@ -11,7 +11,7 @@ import * as errors from "../../../../../../errors/index"; export declare namespace Redirects { interface Options { - environment?: core.Supplier; + environment?: core.Supplier; accessToken: core.Supplier; } @@ -54,7 +54,7 @@ export class Redirects { public async list(siteId: string, requestOptions?: Redirects.RequestOptions): Promise { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `sites/${encodeURIComponent(siteId)}/redirects` ), method: "GET", @@ -62,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.1", - "User-Agent": "webflow-api/3.1.1", + "X-Fern-SDK-Version": "3.1.2", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -184,7 +184,7 @@ export class Redirects { ): Promise { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `sites/${encodeURIComponent(siteId)}/redirects` ), method: "POST", @@ -192,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.1", - "User-Agent": "webflow-api/3.1.1", + "X-Fern-SDK-Version": "3.1.2", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -315,7 +315,7 @@ export class Redirects { ): Promise { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `sites/${encodeURIComponent(siteId)}/redirects/${encodeURIComponent(redirectId)}` ), method: "DELETE", @@ -323,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.1", - "User-Agent": "webflow-api/3.1.1", + "X-Fern-SDK-Version": "3.1.2", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -447,7 +447,7 @@ export class Redirects { ): Promise { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `sites/${encodeURIComponent(siteId)}/redirects/${encodeURIComponent(redirectId)}` ), method: "PATCH", @@ -455,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.1", - "User-Agent": "webflow-api/3.1.1", + "X-Fern-SDK-Version": "3.1.2", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, diff --git a/src/api/resources/sites/resources/robotsTxt/client/Client.ts b/src/api/resources/sites/resources/robotsTxt/client/Client.ts index 366c03e8..b010a215 100644 --- a/src/api/resources/sites/resources/robotsTxt/client/Client.ts +++ b/src/api/resources/sites/resources/robotsTxt/client/Client.ts @@ -11,7 +11,7 @@ import * as errors from "../../../../../../errors/index"; export declare namespace RobotsTxt { interface Options { - environment?: core.Supplier; + environment?: core.Supplier; accessToken: core.Supplier; } @@ -33,6 +33,8 @@ export class RobotsTxt { /** * Retrieve the robots.txt configuration for various user agents. * + * This endpoint requires an Enterprise workspace. + * * Required scope: `site_config:read` * * @param {string} siteId - Unique identifier for a Site @@ -50,7 +52,7 @@ export class RobotsTxt { 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, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `sites/${encodeURIComponent(siteId)}/robots_txt` ), method: "GET", @@ -58,8 +60,8 @@ export class RobotsTxt { 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-SDK-Version": "3.1.2", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -150,6 +152,8 @@ export class RobotsTxt { /** * Replace the `robots.txt` configuration for various user agents. * + * This endpoint requires an Enterprise workspace. + * * Required scope | `site_config:write` * * @param {string} siteId - Unique identifier for a Site @@ -179,7 +183,7 @@ export class RobotsTxt { ): Promise { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `sites/${encodeURIComponent(siteId)}/robots_txt` ), method: "PUT", @@ -187,8 +191,8 @@ export class RobotsTxt { 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-SDK-Version": "3.1.2", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -286,6 +290,8 @@ export class RobotsTxt { * * **Note:** Deleting a user-agent with no rules will make the user-agent's access unrestricted unless other directives apply. * + * This endpoint requires an Enterprise workspace. + * * Required scope: `site_config:write` * * @param {string} siteId - Unique identifier for a Site @@ -314,7 +320,7 @@ export class RobotsTxt { ): Promise { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `sites/${encodeURIComponent(siteId)}/robots_txt` ), method: "DELETE", @@ -322,8 +328,8 @@ export class RobotsTxt { 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-SDK-Version": "3.1.2", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -421,6 +427,8 @@ export class RobotsTxt { /** * Update the `robots.txt` configuration for various user agents. * + * This endpoint requires an Enterprise workspace. + * * Required scope | `site_config:write` * * @param {string} siteId - Unique identifier for a Site @@ -450,7 +458,7 @@ export class RobotsTxt { ): Promise { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `sites/${encodeURIComponent(siteId)}/robots_txt` ), method: "PATCH", @@ -458,8 +466,8 @@ export class RobotsTxt { 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-SDK-Version": "3.1.2", + "User-Agent": "webflow-api/3.1.2", "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 68d709cb..a0351114 100644 --- a/src/api/resources/sites/resources/scripts/client/Client.ts +++ b/src/api/resources/sites/resources/scripts/client/Client.ts @@ -11,7 +11,7 @@ import * as errors from "../../../../../../errors/index"; export declare namespace Scripts { interface Options { - environment?: core.Supplier; + environment?: core.Supplier; accessToken: core.Supplier; } @@ -57,7 +57,7 @@ export class Scripts { ): Promise { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `sites/${encodeURIComponent(siteId)}/custom_code` ), method: "GET", @@ -65,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.1", - "User-Agent": "webflow-api/3.1.1", + "X-Fern-SDK-Version": "3.1.2", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -196,7 +196,7 @@ export class Scripts { ): Promise { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `sites/${encodeURIComponent(siteId)}/custom_code` ), method: "PUT", @@ -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.1", - "User-Agent": "webflow-api/3.1.1", + "X-Fern-SDK-Version": "3.1.2", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -318,7 +318,7 @@ export class Scripts { public async deleteCustomCode(siteId: string, requestOptions?: Scripts.RequestOptions): Promise { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `sites/${encodeURIComponent(siteId)}/custom_code` ), method: "DELETE", @@ -326,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.1", - "User-Agent": "webflow-api/3.1.1", + "X-Fern-SDK-Version": "3.1.2", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -452,7 +452,7 @@ export class Scripts { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `sites/${encodeURIComponent(siteId)}/custom_code/blocks` ), method: "GET", @@ -460,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.1", - "User-Agent": "webflow-api/3.1.1", + "X-Fern-SDK-Version": "3.1.2", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, diff --git a/src/api/resources/sites/resources/wellKnown/client/Client.ts b/src/api/resources/sites/resources/wellKnown/client/Client.ts new file mode 100644 index 00000000..d6e6a29b --- /dev/null +++ b/src/api/resources/sites/resources/wellKnown/client/Client.ts @@ -0,0 +1,296 @@ +/** + * 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 * as serializers from "../../../../../../serialization/index"; +import urlJoin from "url-join"; +import * as errors from "../../../../../../errors/index"; + +export declare namespace WellKnown { + 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 WellKnown { + constructor(protected readonly _options: WellKnown.Options) {} + + /** + * Upload a supported well-known file to a site. + * + * The current restrictions on well-known files are as follows: + * - Each file must be smaller than 100kb + * - Less than 30 total files + * - Have one of the following file extensions (or no extension): `.txt`, `.json`, `.noext` + * + * + * `.noext` is a special file extension that removes other extensions. For example, `apple-app-site-association.noext.txt` will be uploaded as `apple-app-site-association`. Use this extension for tools that have trouble uploading extensionless files. + * + * + * This endpoint requires an Enterprise workspace. + * + * Required scope: `site_config:write` + * + * @param {string} siteId - Unique identifier for a Site + * @param {Webflow.sites.WellKnownFile} request + * @param {WellKnown.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.sites.wellKnown.put("580e63e98c9a982ac9b8b741", { + * fileName: "fileName", + * fileData: "fileData" + * }) + */ + public async put( + siteId: string, + request: Webflow.sites.WellKnownFile, + requestOptions?: WellKnown.RequestOptions + ): Promise { + const _response = await core.fetcher({ + url: urlJoin( + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, + `sites/${encodeURIComponent(siteId)}/well_known` + ), + method: "PUT", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "webflow-api", + "X-Fern-SDK-Version": "3.1.2", + "User-Agent": "webflow-api/3.1.2", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, + }, + contentType: "application/json", + requestType: "json", + body: serializers.sites.WellKnownFile.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; + } + + 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}/well_known."); + case "unknown": + throw new errors.WebflowError({ + message: _response.error.errorMessage, + }); + } + } + + /** + * Delete existing well-known files from a site. + * + * This endpoint requires an Enterprise workspace. + * + * Required scope: `site_config:write` + * + * @param {string} siteId - Unique identifier for a Site + * @param {Webflow.sites.WellKnownDeleteRequest} request + * @param {WellKnown.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.sites.wellKnown.delete("580e63e98c9a982ac9b8b741") + */ + public async delete( + siteId: string, + request: Webflow.sites.WellKnownDeleteRequest = {}, + requestOptions?: WellKnown.RequestOptions + ): Promise { + const _response = await core.fetcher({ + url: urlJoin( + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, + `sites/${encodeURIComponent(siteId)}/well_known` + ), + method: "DELETE", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "webflow-api", + "X-Fern-SDK-Version": "3.1.2", + "User-Agent": "webflow-api/3.1.2", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, + }, + contentType: "application/json", + requestType: "json", + body: serializers.sites.WellKnownDeleteRequest.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; + } + + 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}/well_known." + ); + 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/sites/resources/wellKnown/client/index.ts b/src/api/resources/sites/resources/wellKnown/client/index.ts new file mode 100644 index 00000000..415726b7 --- /dev/null +++ b/src/api/resources/sites/resources/wellKnown/client/index.ts @@ -0,0 +1 @@ +export * from "./requests"; diff --git a/src/api/resources/sites/resources/wellKnown/client/requests/WellKnownDeleteRequest.ts b/src/api/resources/sites/resources/wellKnown/client/requests/WellKnownDeleteRequest.ts new file mode 100644 index 00000000..12b026fe --- /dev/null +++ b/src/api/resources/sites/resources/wellKnown/client/requests/WellKnownDeleteRequest.ts @@ -0,0 +1,12 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * @example + * {} + */ +export interface WellKnownDeleteRequest { + /** A list of file names to delete */ + fileNames?: string[]; +} diff --git a/src/api/resources/sites/resources/wellKnown/client/requests/WellKnownFile.ts b/src/api/resources/sites/resources/wellKnown/client/requests/WellKnownFile.ts new file mode 100644 index 00000000..14b408f6 --- /dev/null +++ b/src/api/resources/sites/resources/wellKnown/client/requests/WellKnownFile.ts @@ -0,0 +1,21 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Webflow from "../../../../../../index"; + +/** + * @example + * { + * fileName: "fileName", + * fileData: "fileData" + * } + */ +export interface WellKnownFile { + /** The name of the file */ + fileName: string; + /** The contents of the file */ + fileData: string; + /** The content type of the file. Defaults to application/json */ + contentType?: Webflow.sites.WellKnownFileContentType; +} diff --git a/src/api/resources/sites/resources/wellKnown/client/requests/index.ts b/src/api/resources/sites/resources/wellKnown/client/requests/index.ts new file mode 100644 index 00000000..80d597d9 --- /dev/null +++ b/src/api/resources/sites/resources/wellKnown/client/requests/index.ts @@ -0,0 +1,2 @@ +export { type WellKnownFile } from "./WellKnownFile"; +export { type WellKnownDeleteRequest } from "./WellKnownDeleteRequest"; diff --git a/src/api/resources/sites/resources/wellKnown/index.ts b/src/api/resources/sites/resources/wellKnown/index.ts new file mode 100644 index 00000000..c9240f83 --- /dev/null +++ b/src/api/resources/sites/resources/wellKnown/index.ts @@ -0,0 +1,2 @@ +export * from "./types"; +export * from "./client"; diff --git a/src/api/resources/sites/resources/wellKnown/types/WellKnownFileContentType.ts b/src/api/resources/sites/resources/wellKnown/types/WellKnownFileContentType.ts new file mode 100644 index 00000000..459443e3 --- /dev/null +++ b/src/api/resources/sites/resources/wellKnown/types/WellKnownFileContentType.ts @@ -0,0 +1,13 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * The content type of the file. Defaults to application/json + */ +export type WellKnownFileContentType = "application/json" | "text/plain"; + +export const WellKnownFileContentType = { + ApplicationJson: "application/json", + TextPlain: "text/plain", +} as const; diff --git a/src/api/resources/sites/resources/wellKnown/types/index.ts b/src/api/resources/sites/resources/wellKnown/types/index.ts new file mode 100644 index 00000000..e9347565 --- /dev/null +++ b/src/api/resources/sites/resources/wellKnown/types/index.ts @@ -0,0 +1 @@ +export * from "./WellKnownFileContentType"; diff --git a/src/api/resources/token/client/Client.ts b/src/api/resources/token/client/Client.ts index cf6acf0c..66e67b22 100644 --- a/src/api/resources/token/client/Client.ts +++ b/src/api/resources/token/client/Client.ts @@ -11,7 +11,7 @@ import * as errors from "../../../../errors/index"; export declare namespace Token { interface Options { - environment?: core.Supplier; + environment?: core.Supplier; accessToken: core.Supplier; } @@ -46,7 +46,7 @@ export class Token { public async authorizedBy(requestOptions?: Token.RequestOptions): Promise { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, "token/authorized_by" ), method: "GET", @@ -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.1", - "User-Agent": "webflow-api/3.1.1", + "X-Fern-SDK-Version": "3.1.2", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -128,7 +128,7 @@ export class Token { public async introspect(requestOptions?: Token.RequestOptions): Promise { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, "token/introspect" ), method: "GET", @@ -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.1", - "User-Agent": "webflow-api/3.1.1", + "X-Fern-SDK-Version": "3.1.2", + "User-Agent": "webflow-api/3.1.2", "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 95b20b60..fcbee63c 100644 --- a/src/api/resources/users/client/Client.ts +++ b/src/api/resources/users/client/Client.ts @@ -11,7 +11,7 @@ import * as errors from "../../../../errors/index"; export declare namespace Users { interface Options { - environment?: core.Supplier; + environment?: core.Supplier; accessToken: core.Supplier; } @@ -70,7 +70,7 @@ export class Users { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `sites/${encodeURIComponent(siteId)}/users` ), method: "GET", @@ -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.1", - "User-Agent": "webflow-api/3.1.1", + "X-Fern-SDK-Version": "3.1.2", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -192,7 +192,7 @@ export class Users { public async get(siteId: string, userId: string, requestOptions?: Users.RequestOptions): Promise { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `sites/${encodeURIComponent(siteId)}/users/${encodeURIComponent(userId)}` ), method: "GET", @@ -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.1", - "User-Agent": "webflow-api/3.1.1", + "X-Fern-SDK-Version": "3.1.2", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -315,7 +315,7 @@ export class Users { public async delete(siteId: string, userId: string, requestOptions?: Users.RequestOptions): Promise { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `sites/${encodeURIComponent(siteId)}/users/${encodeURIComponent(userId)}` ), method: "DELETE", @@ -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.1", - "User-Agent": "webflow-api/3.1.1", + "X-Fern-SDK-Version": "3.1.2", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -448,7 +448,7 @@ export class Users { ): Promise { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `sites/${encodeURIComponent(siteId)}/users/${encodeURIComponent(userId)}` ), method: "PATCH", @@ -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.1", - "User-Agent": "webflow-api/3.1.1", + "X-Fern-SDK-Version": "3.1.2", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -586,7 +586,7 @@ export class Users { ): Promise { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `sites/${encodeURIComponent(siteId)}/users/invite` ), method: "POST", @@ -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.1", - "User-Agent": "webflow-api/3.1.1", + "X-Fern-SDK-Version": "3.1.2", + "User-Agent": "webflow-api/3.1.2", "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 2b527749..b4eaa2c3 100644 --- a/src/api/resources/webhooks/client/Client.ts +++ b/src/api/resources/webhooks/client/Client.ts @@ -11,7 +11,7 @@ import * as errors from "../../../../errors/index"; export declare namespace Webhooks { interface Options { - environment?: core.Supplier; + environment?: core.Supplier; accessToken: core.Supplier; } @@ -53,7 +53,7 @@ export class Webhooks { public async list(siteId: string, requestOptions?: Webhooks.RequestOptions): Promise { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `sites/${encodeURIComponent(siteId)}/webhooks` ), method: "GET", @@ -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.1", - "User-Agent": "webflow-api/3.1.1", + "X-Fern-SDK-Version": "3.1.2", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -186,7 +186,7 @@ export class Webhooks { ): Promise { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `sites/${encodeURIComponent(siteId)}/webhooks` ), method: "POST", @@ -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.1", - "User-Agent": "webflow-api/3.1.1", + "X-Fern-SDK-Version": "3.1.2", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -308,7 +308,7 @@ export class Webhooks { public async get(webhookId: string, requestOptions?: Webhooks.RequestOptions): Promise { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `webhooks/${encodeURIComponent(webhookId)}` ), method: "GET", @@ -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.1", - "User-Agent": "webflow-api/3.1.1", + "X-Fern-SDK-Version": "3.1.2", + "User-Agent": "webflow-api/3.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -425,7 +425,7 @@ export class Webhooks { public async delete(webhookId: string, requestOptions?: Webhooks.RequestOptions): Promise { const _response = await core.fetcher({ url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi).base, `webhooks/${encodeURIComponent(webhookId)}` ), method: "DELETE", @@ -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.1", - "User-Agent": "webflow-api/3.1.1", + "X-Fern-SDK-Version": "3.1.2", + "User-Agent": "webflow-api/3.1.2", "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 3b875559..54c7a8b0 100644 --- a/src/api/types/Asset.ts +++ b/src/api/types/Asset.ts @@ -9,25 +9,25 @@ import * as Webflow from "../index"; */ 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; + 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[]; + 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 2f5052d8..7d2c25c8 100644 --- a/src/api/types/AssetVariant.ts +++ b/src/api/types/AssetVariant.ts @@ -7,19 +7,19 @@ */ 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/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/CommentReply.ts b/src/api/types/CommentReply.ts new file mode 100644 index 00000000..da62cc86 --- /dev/null +++ b/src/api/types/CommentReply.ts @@ -0,0 +1,34 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Webflow from "../index"; + +/** + * A comment thread represents a conversation between users on a specific page. Each comment thread has a unique identifier and can contain multiple comments. + */ +export interface CommentReply { + /** Unique identifier for the comment thread */ + id: string; + /** The comment reply unique identifier */ + commentId: string; + /** The site unique identifier */ + siteId: string; + /** The page unique identifier */ + pageId: string; + /** The locale unique identifier */ + localeId?: string; + /** The breakpoint the comment was left on */ + breakpoint: string; + /** The content of the comment reply */ + content: string; + /** Boolean determining if the comment thread is resolved */ + isResolved: boolean; + author: Webflow.CommentReplyAuthor; + /** List of mentioned users is an empty array until email notifications are sent. */ + mentionedUsers?: Webflow.CommentReplyMentionedUsersItem[]; + /** The date the item was last updated */ + lastUpdated: string; + /** The date the item was created */ + createdOn: string; +} diff --git a/src/api/types/CommentReplyAuthor.ts b/src/api/types/CommentReplyAuthor.ts new file mode 100644 index 00000000..a2e04427 --- /dev/null +++ b/src/api/types/CommentReplyAuthor.ts @@ -0,0 +1,12 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export interface CommentReplyAuthor { + /** The unique identifier of the author */ + id: string; + /** Email of the author */ + email: string; + /** Name of the author */ + name: string; +} diff --git a/src/api/types/CommentReplyList.ts b/src/api/types/CommentReplyList.ts new file mode 100644 index 00000000..16884f3c --- /dev/null +++ b/src/api/types/CommentReplyList.ts @@ -0,0 +1,13 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Webflow from "../index"; + +/** + * A list of comment replies. + */ +export interface CommentReplyList { + comments: Webflow.CommentReply[]; + pagination: Webflow.CommentReplyListPagination; +} diff --git a/src/api/types/CommentReplyListPagination.ts b/src/api/types/CommentReplyListPagination.ts new file mode 100644 index 00000000..e96f3972 --- /dev/null +++ b/src/api/types/CommentReplyListPagination.ts @@ -0,0 +1,12 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export interface CommentReplyListPagination { + /** The limit specified in the request (default 100) */ + limit: number; + /** The offset specified for pagination */ + offset: number; + /** Total number of comment replies */ + total: number; +} diff --git a/src/api/types/CommentReplyMentionedUsersItem.ts b/src/api/types/CommentReplyMentionedUsersItem.ts new file mode 100644 index 00000000..3d1a27ba --- /dev/null +++ b/src/api/types/CommentReplyMentionedUsersItem.ts @@ -0,0 +1,12 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export interface CommentReplyMentionedUsersItem { + /** The unique identifier of the mentioned user */ + id: string; + /** Email of the user */ + email: string; + /** Name of the User */ + name: string; +} diff --git a/src/api/types/CommentThread.ts b/src/api/types/CommentThread.ts new file mode 100644 index 00000000..1d787a15 --- /dev/null +++ b/src/api/types/CommentThread.ts @@ -0,0 +1,36 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Webflow from "../index"; + +/** + * A comment thread represents a conversation between users on a specific page. Each comment thread has a unique identifier and can contain multiple comments. Retrieve comment replies using the repiles API endpoint. + */ +export interface CommentThread { + /** Unique identifier for the comment thread */ + id: string; + /** The site unique identifier */ + siteId: string; + /** The page unique identifier */ + pageId: string; + /** The locale unique identifier */ + localeId?: string; + /** The item unique identifier */ + itemId?: string; + /** The breakpoint the comment was left on */ + breakpoint: string; + /** The URL of the page the comment was left on */ + url: string; + /** The content of the comment reply */ + content: string; + /** Boolean determining if the comment thread is resolved */ + isResolved: boolean; + author: Webflow.CommentThreadAuthor; + /** List of mentioned users. This is an empty array until email notifications are sent, which can take up to 5 minutes after the comment is created. */ + mentionedUsers: Webflow.CommentThreadMentionedUsersItem[]; + /** The date the item was created */ + createdOn: string; + /** The date the item was last updated */ + lastUpdated: string; +} diff --git a/src/api/types/CommentThreadAuthor.ts b/src/api/types/CommentThreadAuthor.ts new file mode 100644 index 00000000..3dd3cdb4 --- /dev/null +++ b/src/api/types/CommentThreadAuthor.ts @@ -0,0 +1,12 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export interface CommentThreadAuthor { + /** The unique identifier of the author */ + userId: string; + /** Email of the author */ + email: string; + /** Name of the author */ + name: string; +} diff --git a/src/api/types/CommentThreadList.ts b/src/api/types/CommentThreadList.ts new file mode 100644 index 00000000..dd90cfcc --- /dev/null +++ b/src/api/types/CommentThreadList.ts @@ -0,0 +1,13 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Webflow from "../index"; + +/** + * A list of comment threads on the site. Contains the content of the first reply. + */ +export interface CommentThreadList { + comments: Webflow.CommentThread[]; + pagination: Webflow.CommentThreadListPagination; +} diff --git a/src/api/types/CommentThreadListPagination.ts b/src/api/types/CommentThreadListPagination.ts new file mode 100644 index 00000000..6399f3e5 --- /dev/null +++ b/src/api/types/CommentThreadListPagination.ts @@ -0,0 +1,12 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export interface CommentThreadListPagination { + /** The limit specified in the request (default 100) */ + limit: number; + /** The offset specified for pagination */ + offset: number; + /** Total number of comment threads */ + total: number; +} diff --git a/src/api/types/CommentThreadMentionedUsersItem.ts b/src/api/types/CommentThreadMentionedUsersItem.ts new file mode 100644 index 00000000..851363c9 --- /dev/null +++ b/src/api/types/CommentThreadMentionedUsersItem.ts @@ -0,0 +1,12 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export interface CommentThreadMentionedUsersItem { + /** The unique identifier of the mentioned user */ + userId: string; + /** Email of the user */ + email: string; + /** Name of the User */ + name: string; +} diff --git a/src/api/types/ComponentNode.ts b/src/api/types/ComponentNode.ts index 33b9349c..6b1d4a62 100644 --- a/src/api/types/ComponentNode.ts +++ b/src/api/types/ComponentNode.ts @@ -9,9 +9,9 @@ import * as Webflow from "../index"; */ export interface ComponentNode { /** The unique identifier of the component instance node */ - id?: string; + id: string; /** The unique identifier of the component */ - componentId?: string; + componentId: string; /** List of component properties with overrides for a component instance. */ - propertyOverrides?: Webflow.ComponentProperty[]; + propertyOverrides: Webflow.ComponentProperty[]; } diff --git a/src/api/types/FieldType.ts b/src/api/types/FieldType.ts index 2cda2301..76d3bc98 100644 --- a/src/api/types/FieldType.ts +++ b/src/api/types/FieldType.ts @@ -10,11 +10,13 @@ export type FieldType = | "DateTime" | "Email" | "ExtFileRef" + | "File" | "Image" | "Link" | "MultiImage" | "MultiReference" | "Number" + | "Option" | "Phone" | "PlainText" | "Reference" @@ -27,11 +29,13 @@ export const FieldType = { DateTime: "DateTime", Email: "Email", ExtFileRef: "ExtFileRef", + File: "File", Image: "Image", Link: "Link", MultiImage: "MultiImage", MultiReference: "MultiReference", Number: "Number", + Option: "Option", Phone: "Phone", PlainText: "PlainText", Reference: "Reference", diff --git a/src/api/types/ImageNode.ts b/src/api/types/ImageNode.ts index fa70785b..8134be46 100644 --- a/src/api/types/ImageNode.ts +++ b/src/api/types/ImageNode.ts @@ -9,9 +9,9 @@ import * as Webflow from "../index"; */ export interface ImageNode { /** Node UUID */ - id?: string; + id: string; /** The image details of the node */ - image?: Webflow.ImageNodeImage; + image: Webflow.ImageNodeImage; /** The custom attributes of the node */ attributes?: Record; } diff --git a/src/api/types/Pagination.ts b/src/api/types/Pagination.ts index 1ee7cd06..3f34a0c1 100644 --- a/src/api/types/Pagination.ts +++ b/src/api/types/Pagination.ts @@ -7,9 +7,9 @@ */ export interface Pagination { /** The limit used for pagination */ - limit?: number; + limit: number; /** The offset used for pagination */ - offset?: number; + offset: number; /** The total number of records */ - total?: number; + total: number; } diff --git a/src/api/types/SkuFieldData.ts b/src/api/types/SkuFieldData.ts index 9c4e5e84..19807009 100644 --- a/src/api/types/SkuFieldData.ts +++ b/src/api/types/SkuFieldData.ts @@ -25,4 +25,10 @@ export interface SkuFieldData { trackInventory?: boolean; /** Quantity of SKU that will be tracked as items are ordered. */ quantity?: number; + /** The URL for the main image of the SKU */ + mainImage?: string; + /** A unique identifier for the SKU */ + sku?: string; + /** The properties of the SKU */ + skuProperties?: Webflow.SkuPropertyList[]; } diff --git a/src/api/types/SkuFieldDataPrice.ts b/src/api/types/SkuFieldDataPrice.ts index 3266db3a..d37d51d9 100644 --- a/src/api/types/SkuFieldDataPrice.ts +++ b/src/api/types/SkuFieldDataPrice.ts @@ -10,4 +10,6 @@ export interface SkuFieldDataPrice { value?: number; /** Currency of Item */ unit?: string; + /** Currency of Item (alternative representation) */ + currency?: string; } diff --git a/src/api/types/SkuValueList.ts b/src/api/types/SkuValueList.ts index a090b5d2..be5dd1f7 100644 --- a/src/api/types/SkuValueList.ts +++ b/src/api/types/SkuValueList.ts @@ -3,6 +3,6 @@ */ /** - * A dictionary that maps a SKU property to a SKU value. The key of the dictionary is the SKU property ID, and the value is the SKU value ID. + * A mapping between SKU properties and their values, represented as key-value pairs. Each key represents a SKU Property ID (e.g. "color") and maps to its corresponding SKU Value ID (e.g. "blue"). This structure defines the specific variant combination for a SKU. */ export type SkuValueList = Record; diff --git a/src/api/types/TextNode.ts b/src/api/types/TextNode.ts index cbd68242..13015905 100644 --- a/src/api/types/TextNode.ts +++ b/src/api/types/TextNode.ts @@ -9,9 +9,9 @@ import * as Webflow from "../index"; */ export interface TextNode { /** Node UUID */ - id?: string; + id: string; /** The text content of the node */ - text?: Webflow.TextNodeText; + text: Webflow.TextNodeText; /** The custom attributes of the node */ attributes?: Record; } diff --git a/src/api/types/index.ts b/src/api/types/index.ts index d6442032..07c364a5 100644 --- a/src/api/types/index.ts +++ b/src/api/types/index.ts @@ -61,6 +61,16 @@ export * from "./BulkCollectionItemFieldData"; export * from "./BulkCollectionItem"; export * from "./CollectionItemPatchSingleFieldData"; export * from "./CollectionItemPatchSingle"; +export * from "./CommentThreadAuthor"; +export * from "./CommentThreadMentionedUsersItem"; +export * from "./CommentThread"; +export * from "./CommentThreadListPagination"; +export * from "./CommentThreadList"; +export * from "./CommentReplyAuthor"; +export * from "./CommentReplyMentionedUsersItem"; +export * from "./CommentReply"; +export * from "./CommentReplyListPagination"; +export * from "./CommentReplyList"; export * from "./PageSeo"; export * from "./PageOpenGraph"; export * from "./Page"; diff --git a/src/environments.ts b/src/environments.ts index fcea4017..84e3537b 100644 --- a/src/environments.ts +++ b/src/environments.ts @@ -2,8 +2,22 @@ * This file was auto-generated by Fern from our API Definition. */ +export interface WebflowEnvironmentUrls { + base: string; + dataApi: string; + contentDeliveryApi: string; + production: string; + cdn: string; +} + export const WebflowEnvironment = { - Default: "https://api.webflow.com/v2", + DataApi: { + base: "https://api.webflow.com/v2", + dataApi: "https://api.webflow.com/v2", + contentDeliveryApi: "https://api-cdn.webflow.com/v2", + production: "https://api.webflow.com/v2", + cdn: "https://api-cdn.webflow.com/v2", + }, } as const; -export type WebflowEnvironment = typeof WebflowEnvironment.Default; +export type WebflowEnvironment = typeof WebflowEnvironment.DataApi; diff --git a/src/serialization/resources/collections/resources/items/client/requests/ItemsDeleteItemsLiveRequest.ts b/src/serialization/resources/collections/resources/items/client/requests/ItemsDeleteItemsLiveRequest.ts index cb601ac2..8977f03a 100644 --- a/src/serialization/resources/collections/resources/items/client/requests/ItemsDeleteItemsLiveRequest.ts +++ b/src/serialization/resources/collections/resources/items/client/requests/ItemsDeleteItemsLiveRequest.ts @@ -11,11 +11,11 @@ export const ItemsDeleteItemsLiveRequest: core.serialization.Schema< serializers.collections.ItemsDeleteItemsLiveRequest.Raw, Webflow.collections.ItemsDeleteItemsLiveRequest > = core.serialization.object({ - items: core.serialization.list(ItemsDeleteItemsLiveRequestItemsItem).optional(), + items: core.serialization.list(ItemsDeleteItemsLiveRequestItemsItem), }); export declare namespace ItemsDeleteItemsLiveRequest { interface Raw { - items?: ItemsDeleteItemsLiveRequestItemsItem.Raw[] | null; + items: ItemsDeleteItemsLiveRequestItemsItem.Raw[]; } } diff --git a/src/serialization/resources/collections/resources/items/client/requests/ItemsDeleteItemsRequest.ts b/src/serialization/resources/collections/resources/items/client/requests/ItemsDeleteItemsRequest.ts index 28d2785c..19db962e 100644 --- a/src/serialization/resources/collections/resources/items/client/requests/ItemsDeleteItemsRequest.ts +++ b/src/serialization/resources/collections/resources/items/client/requests/ItemsDeleteItemsRequest.ts @@ -11,11 +11,11 @@ export const ItemsDeleteItemsRequest: core.serialization.Schema< serializers.collections.ItemsDeleteItemsRequest.Raw, Webflow.collections.ItemsDeleteItemsRequest > = core.serialization.object({ - items: core.serialization.list(ItemsDeleteItemsRequestItemsItem).optional(), + items: core.serialization.list(ItemsDeleteItemsRequestItemsItem), }); export declare namespace ItemsDeleteItemsRequest { interface Raw { - items?: ItemsDeleteItemsRequestItemsItem.Raw[] | null; + items: ItemsDeleteItemsRequestItemsItem.Raw[]; } } diff --git a/src/serialization/resources/products/client/requests/ProductSkuCreate.ts b/src/serialization/resources/products/client/requests/ProductSkuCreate.ts index 48fee055..27e7b36e 100644 --- a/src/serialization/resources/products/client/requests/ProductSkuCreate.ts +++ b/src/serialization/resources/products/client/requests/ProductSkuCreate.ts @@ -6,20 +6,20 @@ import * as serializers from "../../../../index"; import * as Webflow from "../../../../../api/index"; import * as core from "../../../../../core"; import { PublishStatus } from "../../../../types/PublishStatus"; -import { Product } from "../../../../types/Product"; -import { Sku } from "../../../../types/Sku"; +import { ProductSkuCreateProduct } from "../../types/ProductSkuCreateProduct"; +import { ProductSkuCreateSku } from "../../types/ProductSkuCreateSku"; export const ProductSkuCreate: core.serialization.Schema = core.serialization.object({ publishStatus: PublishStatus.optional(), - product: Product.optional(), - sku: Sku.optional(), + product: ProductSkuCreateProduct, + sku: ProductSkuCreateSku, }); export declare namespace ProductSkuCreate { interface Raw { publishStatus?: PublishStatus.Raw | null; - product?: Product.Raw | null; - sku?: Sku.Raw | null; + product: ProductSkuCreateProduct.Raw; + sku: ProductSkuCreateSku.Raw; } } diff --git a/src/serialization/resources/products/types/ProductSkuCreateProduct.ts b/src/serialization/resources/products/types/ProductSkuCreateProduct.ts new file mode 100644 index 00000000..8e6003b8 --- /dev/null +++ b/src/serialization/resources/products/types/ProductSkuCreateProduct.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 { ProductFieldData } from "../../../types/ProductFieldData"; + +export const ProductSkuCreateProduct: core.serialization.ObjectSchema< + serializers.ProductSkuCreateProduct.Raw, + Webflow.ProductSkuCreateProduct +> = core.serialization.object({ + fieldData: ProductFieldData.optional(), +}); + +export declare namespace ProductSkuCreateProduct { + interface Raw { + fieldData?: ProductFieldData.Raw | null; + } +} diff --git a/src/serialization/resources/products/types/ProductSkuCreateSku.ts b/src/serialization/resources/products/types/ProductSkuCreateSku.ts new file mode 100644 index 00000000..7a2e3082 --- /dev/null +++ b/src/serialization/resources/products/types/ProductSkuCreateSku.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 { SkuFieldData } from "../../../types/SkuFieldData"; + +export const ProductSkuCreateSku: core.serialization.ObjectSchema< + serializers.ProductSkuCreateSku.Raw, + Webflow.ProductSkuCreateSku +> = core.serialization.object({ + fieldData: SkuFieldData.optional(), +}); + +export declare namespace ProductSkuCreateSku { + interface Raw { + fieldData?: SkuFieldData.Raw | null; + } +} diff --git a/src/serialization/resources/products/types/ProductsCreateSkuResponse.ts b/src/serialization/resources/products/types/ProductsCreateSkuResponse.ts index 4ca5e4a7..c92b5e4e 100644 --- a/src/serialization/resources/products/types/ProductsCreateSkuResponse.ts +++ b/src/serialization/resources/products/types/ProductsCreateSkuResponse.ts @@ -11,11 +11,11 @@ export const ProductsCreateSkuResponse: core.serialization.ObjectSchema< serializers.ProductsCreateSkuResponse.Raw, Webflow.ProductsCreateSkuResponse > = core.serialization.object({ - skus: core.serialization.list(Sku).optional(), + skus: core.serialization.list(Sku), }); export declare namespace ProductsCreateSkuResponse { interface Raw { - skus?: Sku.Raw[] | null; + skus: Sku.Raw[]; } } diff --git a/src/serialization/resources/products/types/index.ts b/src/serialization/resources/products/types/index.ts index e286df49..61d70f8d 100644 --- a/src/serialization/resources/products/types/index.ts +++ b/src/serialization/resources/products/types/index.ts @@ -1 +1,3 @@ +export * from "./ProductSkuCreateProduct"; +export * from "./ProductSkuCreateSku"; export * from "./ProductsCreateSkuResponse"; diff --git a/src/serialization/resources/sites/index.ts b/src/serialization/resources/sites/index.ts index c9240f83..a931b363 100644 --- a/src/serialization/resources/sites/index.ts +++ b/src/serialization/resources/sites/index.ts @@ -1,2 +1,3 @@ export * from "./types"; +export * from "./resources"; export * from "./client"; diff --git a/src/serialization/resources/sites/resources/comments/index.ts b/src/serialization/resources/sites/resources/comments/index.ts new file mode 100644 index 00000000..3ce0a3e3 --- /dev/null +++ b/src/serialization/resources/sites/resources/comments/index.ts @@ -0,0 +1,2 @@ +export * from "./types"; +export * from "./resources"; diff --git a/src/serialization/resources/sites/resources/comments/resources/index.ts b/src/serialization/resources/sites/resources/comments/resources/index.ts new file mode 100644 index 00000000..1ee40762 --- /dev/null +++ b/src/serialization/resources/sites/resources/comments/resources/index.ts @@ -0,0 +1,2 @@ +export * as replies from "./replies"; +export * from "./replies/types"; diff --git a/src/serialization/resources/sites/resources/comments/resources/replies/index.ts b/src/serialization/resources/sites/resources/comments/resources/replies/index.ts new file mode 100644 index 00000000..eea524d6 --- /dev/null +++ b/src/serialization/resources/sites/resources/comments/resources/replies/index.ts @@ -0,0 +1 @@ +export * from "./types"; diff --git a/src/serialization/resources/sites/resources/comments/resources/replies/types/RepliesListRepliesRequestSortBy.ts b/src/serialization/resources/sites/resources/comments/resources/replies/types/RepliesListRepliesRequestSortBy.ts new file mode 100644 index 00000000..0c5e60e0 --- /dev/null +++ b/src/serialization/resources/sites/resources/comments/resources/replies/types/RepliesListRepliesRequestSortBy.ts @@ -0,0 +1,16 @@ +/** + * 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 RepliesListRepliesRequestSortBy: core.serialization.Schema< + serializers.sites.comments.RepliesListRepliesRequestSortBy.Raw, + Webflow.sites.comments.RepliesListRepliesRequestSortBy +> = core.serialization.enum_(["createdOn", "lastUpdated"]); + +export declare namespace RepliesListRepliesRequestSortBy { + type Raw = "createdOn" | "lastUpdated"; +} diff --git a/src/serialization/resources/sites/resources/comments/resources/replies/types/RepliesListRepliesRequestSortOrder.ts b/src/serialization/resources/sites/resources/comments/resources/replies/types/RepliesListRepliesRequestSortOrder.ts new file mode 100644 index 00000000..c69aac3f --- /dev/null +++ b/src/serialization/resources/sites/resources/comments/resources/replies/types/RepliesListRepliesRequestSortOrder.ts @@ -0,0 +1,16 @@ +/** + * 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 RepliesListRepliesRequestSortOrder: core.serialization.Schema< + serializers.sites.comments.RepliesListRepliesRequestSortOrder.Raw, + Webflow.sites.comments.RepliesListRepliesRequestSortOrder +> = core.serialization.enum_(["asc", "desc"]); + +export declare namespace RepliesListRepliesRequestSortOrder { + type Raw = "asc" | "desc"; +} diff --git a/src/serialization/resources/sites/resources/comments/resources/replies/types/index.ts b/src/serialization/resources/sites/resources/comments/resources/replies/types/index.ts new file mode 100644 index 00000000..50d9aa3d --- /dev/null +++ b/src/serialization/resources/sites/resources/comments/resources/replies/types/index.ts @@ -0,0 +1,2 @@ +export * from "./RepliesListRepliesRequestSortBy"; +export * from "./RepliesListRepliesRequestSortOrder"; diff --git a/src/serialization/resources/sites/resources/comments/types/CommentsGetCommentThreadRequestSortBy.ts b/src/serialization/resources/sites/resources/comments/types/CommentsGetCommentThreadRequestSortBy.ts new file mode 100644 index 00000000..65c623fa --- /dev/null +++ b/src/serialization/resources/sites/resources/comments/types/CommentsGetCommentThreadRequestSortBy.ts @@ -0,0 +1,16 @@ +/** + * 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 CommentsGetCommentThreadRequestSortBy: core.serialization.Schema< + serializers.sites.CommentsGetCommentThreadRequestSortBy.Raw, + Webflow.sites.CommentsGetCommentThreadRequestSortBy +> = core.serialization.enum_(["createdOn", "lastUpdated"]); + +export declare namespace CommentsGetCommentThreadRequestSortBy { + type Raw = "createdOn" | "lastUpdated"; +} diff --git a/src/serialization/resources/sites/resources/comments/types/CommentsGetCommentThreadRequestSortOrder.ts b/src/serialization/resources/sites/resources/comments/types/CommentsGetCommentThreadRequestSortOrder.ts new file mode 100644 index 00000000..48f607bb --- /dev/null +++ b/src/serialization/resources/sites/resources/comments/types/CommentsGetCommentThreadRequestSortOrder.ts @@ -0,0 +1,16 @@ +/** + * 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 CommentsGetCommentThreadRequestSortOrder: core.serialization.Schema< + serializers.sites.CommentsGetCommentThreadRequestSortOrder.Raw, + Webflow.sites.CommentsGetCommentThreadRequestSortOrder +> = core.serialization.enum_(["asc", "desc"]); + +export declare namespace CommentsGetCommentThreadRequestSortOrder { + type Raw = "asc" | "desc"; +} diff --git a/src/serialization/resources/sites/resources/comments/types/CommentsListCommentThreadsRequestSortBy.ts b/src/serialization/resources/sites/resources/comments/types/CommentsListCommentThreadsRequestSortBy.ts new file mode 100644 index 00000000..4671c2ee --- /dev/null +++ b/src/serialization/resources/sites/resources/comments/types/CommentsListCommentThreadsRequestSortBy.ts @@ -0,0 +1,16 @@ +/** + * 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 CommentsListCommentThreadsRequestSortBy: core.serialization.Schema< + serializers.sites.CommentsListCommentThreadsRequestSortBy.Raw, + Webflow.sites.CommentsListCommentThreadsRequestSortBy +> = core.serialization.enum_(["createdOn", "lastUpdated"]); + +export declare namespace CommentsListCommentThreadsRequestSortBy { + type Raw = "createdOn" | "lastUpdated"; +} diff --git a/src/serialization/resources/sites/resources/comments/types/CommentsListCommentThreadsRequestSortOrder.ts b/src/serialization/resources/sites/resources/comments/types/CommentsListCommentThreadsRequestSortOrder.ts new file mode 100644 index 00000000..f978dba3 --- /dev/null +++ b/src/serialization/resources/sites/resources/comments/types/CommentsListCommentThreadsRequestSortOrder.ts @@ -0,0 +1,16 @@ +/** + * 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 CommentsListCommentThreadsRequestSortOrder: core.serialization.Schema< + serializers.sites.CommentsListCommentThreadsRequestSortOrder.Raw, + Webflow.sites.CommentsListCommentThreadsRequestSortOrder +> = core.serialization.enum_(["asc", "desc"]); + +export declare namespace CommentsListCommentThreadsRequestSortOrder { + type Raw = "asc" | "desc"; +} diff --git a/src/serialization/resources/sites/resources/comments/types/index.ts b/src/serialization/resources/sites/resources/comments/types/index.ts new file mode 100644 index 00000000..0d1f184f --- /dev/null +++ b/src/serialization/resources/sites/resources/comments/types/index.ts @@ -0,0 +1,4 @@ +export * from "./CommentsListCommentThreadsRequestSortBy"; +export * from "./CommentsListCommentThreadsRequestSortOrder"; +export * from "./CommentsGetCommentThreadRequestSortBy"; +export * from "./CommentsGetCommentThreadRequestSortOrder"; diff --git a/src/serialization/resources/sites/resources/index.ts b/src/serialization/resources/sites/resources/index.ts new file mode 100644 index 00000000..134f72ad --- /dev/null +++ b/src/serialization/resources/sites/resources/index.ts @@ -0,0 +1,5 @@ +export * as wellKnown from "./wellKnown"; +export * from "./wellKnown/types"; +export * as comments from "./comments"; +export * from "./comments/types"; +export * from "./wellKnown/client/requests"; diff --git a/src/serialization/resources/sites/resources/wellKnown/client/index.ts b/src/serialization/resources/sites/resources/wellKnown/client/index.ts new file mode 100644 index 00000000..415726b7 --- /dev/null +++ b/src/serialization/resources/sites/resources/wellKnown/client/index.ts @@ -0,0 +1 @@ +export * from "./requests"; diff --git a/src/serialization/resources/sites/resources/wellKnown/client/requests/WellKnownDeleteRequest.ts b/src/serialization/resources/sites/resources/wellKnown/client/requests/WellKnownDeleteRequest.ts new file mode 100644 index 00000000..268f0571 --- /dev/null +++ b/src/serialization/resources/sites/resources/wellKnown/client/requests/WellKnownDeleteRequest.ts @@ -0,0 +1,20 @@ +/** + * 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 WellKnownDeleteRequest: core.serialization.Schema< + serializers.sites.WellKnownDeleteRequest.Raw, + Webflow.sites.WellKnownDeleteRequest +> = core.serialization.object({ + fileNames: core.serialization.list(core.serialization.string()).optional(), +}); + +export declare namespace WellKnownDeleteRequest { + interface Raw { + fileNames?: string[] | null; + } +} diff --git a/src/serialization/resources/sites/resources/wellKnown/client/requests/WellKnownFile.ts b/src/serialization/resources/sites/resources/wellKnown/client/requests/WellKnownFile.ts new file mode 100644 index 00000000..c26ad88f --- /dev/null +++ b/src/serialization/resources/sites/resources/wellKnown/client/requests/WellKnownFile.ts @@ -0,0 +1,25 @@ +/** + * 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 { WellKnownFileContentType } from "../../types/WellKnownFileContentType"; + +export const WellKnownFile: core.serialization.Schema< + serializers.sites.WellKnownFile.Raw, + Webflow.sites.WellKnownFile +> = core.serialization.object({ + fileName: core.serialization.string(), + fileData: core.serialization.string(), + contentType: WellKnownFileContentType.optional(), +}); + +export declare namespace WellKnownFile { + interface Raw { + fileName: string; + fileData: string; + contentType?: WellKnownFileContentType.Raw | null; + } +} diff --git a/src/serialization/resources/sites/resources/wellKnown/client/requests/index.ts b/src/serialization/resources/sites/resources/wellKnown/client/requests/index.ts new file mode 100644 index 00000000..64acd63b --- /dev/null +++ b/src/serialization/resources/sites/resources/wellKnown/client/requests/index.ts @@ -0,0 +1,2 @@ +export { WellKnownFile } from "./WellKnownFile"; +export { WellKnownDeleteRequest } from "./WellKnownDeleteRequest"; diff --git a/src/serialization/resources/sites/resources/wellKnown/index.ts b/src/serialization/resources/sites/resources/wellKnown/index.ts new file mode 100644 index 00000000..c9240f83 --- /dev/null +++ b/src/serialization/resources/sites/resources/wellKnown/index.ts @@ -0,0 +1,2 @@ +export * from "./types"; +export * from "./client"; diff --git a/src/serialization/resources/sites/resources/wellKnown/types/WellKnownFileContentType.ts b/src/serialization/resources/sites/resources/wellKnown/types/WellKnownFileContentType.ts new file mode 100644 index 00000000..293cc580 --- /dev/null +++ b/src/serialization/resources/sites/resources/wellKnown/types/WellKnownFileContentType.ts @@ -0,0 +1,16 @@ +/** + * 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 WellKnownFileContentType: core.serialization.Schema< + serializers.sites.WellKnownFileContentType.Raw, + Webflow.sites.WellKnownFileContentType +> = core.serialization.enum_(["application/json", "text/plain"]); + +export declare namespace WellKnownFileContentType { + type Raw = "application/json" | "text/plain"; +} diff --git a/src/serialization/resources/sites/resources/wellKnown/types/index.ts b/src/serialization/resources/sites/resources/wellKnown/types/index.ts new file mode 100644 index 00000000..e9347565 --- /dev/null +++ b/src/serialization/resources/sites/resources/wellKnown/types/index.ts @@ -0,0 +1 @@ +export * from "./WellKnownFileContentType"; 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/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(), + commentId: core.serialization.string(), + siteId: core.serialization.string(), + pageId: core.serialization.string(), + localeId: core.serialization.string().optional(), + breakpoint: core.serialization.string(), + content: core.serialization.string(), + isResolved: core.serialization.boolean(), + author: CommentReplyAuthor, + mentionedUsers: core.serialization.list(CommentReplyMentionedUsersItem).optional(), + lastUpdated: core.serialization.string(), + createdOn: core.serialization.string(), + }); + +export declare namespace CommentReply { + interface Raw { + id: string; + commentId: string; + siteId: string; + pageId: string; + localeId?: string | null; + breakpoint: string; + content: string; + isResolved: boolean; + author: CommentReplyAuthor.Raw; + mentionedUsers?: CommentReplyMentionedUsersItem.Raw[] | null; + lastUpdated: string; + createdOn: string; + } +} diff --git a/src/serialization/types/CommentReplyAuthor.ts b/src/serialization/types/CommentReplyAuthor.ts new file mode 100644 index 00000000..43c33b43 --- /dev/null +++ b/src/serialization/types/CommentReplyAuthor.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 CommentReplyAuthor: core.serialization.ObjectSchema< + serializers.CommentReplyAuthor.Raw, + Webflow.CommentReplyAuthor +> = core.serialization.object({ + id: core.serialization.string(), + email: core.serialization.string(), + name: core.serialization.string(), +}); + +export declare namespace CommentReplyAuthor { + interface Raw { + id: string; + email: string; + name: string; + } +} diff --git a/src/serialization/types/CommentReplyList.ts b/src/serialization/types/CommentReplyList.ts new file mode 100644 index 00000000..114fd508 --- /dev/null +++ b/src/serialization/types/CommentReplyList.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"; +import { CommentReply } from "./CommentReply"; +import { CommentReplyListPagination } from "./CommentReplyListPagination"; + +export const CommentReplyList: core.serialization.ObjectSchema< + serializers.CommentReplyList.Raw, + Webflow.CommentReplyList +> = core.serialization.object({ + comments: core.serialization.list(CommentReply), + pagination: CommentReplyListPagination, +}); + +export declare namespace CommentReplyList { + interface Raw { + comments: CommentReply.Raw[]; + pagination: CommentReplyListPagination.Raw; + } +} diff --git a/src/serialization/types/CommentReplyListPagination.ts b/src/serialization/types/CommentReplyListPagination.ts new file mode 100644 index 00000000..86ed8d08 --- /dev/null +++ b/src/serialization/types/CommentReplyListPagination.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 CommentReplyListPagination: core.serialization.ObjectSchema< + serializers.CommentReplyListPagination.Raw, + Webflow.CommentReplyListPagination +> = core.serialization.object({ + limit: core.serialization.number(), + offset: core.serialization.number(), + total: core.serialization.number(), +}); + +export declare namespace CommentReplyListPagination { + interface Raw { + limit: number; + offset: number; + total: number; + } +} diff --git a/src/serialization/types/CommentReplyMentionedUsersItem.ts b/src/serialization/types/CommentReplyMentionedUsersItem.ts new file mode 100644 index 00000000..d08e20e5 --- /dev/null +++ b/src/serialization/types/CommentReplyMentionedUsersItem.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 CommentReplyMentionedUsersItem: core.serialization.ObjectSchema< + serializers.CommentReplyMentionedUsersItem.Raw, + Webflow.CommentReplyMentionedUsersItem +> = core.serialization.object({ + id: core.serialization.string(), + email: core.serialization.string(), + name: core.serialization.string(), +}); + +export declare namespace CommentReplyMentionedUsersItem { + interface Raw { + id: string; + email: string; + name: string; + } +} diff --git a/src/serialization/types/CommentThread.ts b/src/serialization/types/CommentThread.ts new file mode 100644 index 00000000..636bcc25 --- /dev/null +++ b/src/serialization/types/CommentThread.ts @@ -0,0 +1,44 @@ +/** + * 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 { CommentThreadAuthor } from "./CommentThreadAuthor"; +import { CommentThreadMentionedUsersItem } from "./CommentThreadMentionedUsersItem"; + +export const CommentThread: core.serialization.ObjectSchema = + core.serialization.object({ + id: core.serialization.string(), + siteId: core.serialization.string(), + pageId: core.serialization.string(), + localeId: core.serialization.string().optional(), + itemId: core.serialization.string().optional(), + breakpoint: core.serialization.string(), + url: core.serialization.string(), + content: core.serialization.string(), + isResolved: core.serialization.boolean(), + author: CommentThreadAuthor, + mentionedUsers: core.serialization.list(CommentThreadMentionedUsersItem), + createdOn: core.serialization.string(), + lastUpdated: core.serialization.string(), + }); + +export declare namespace CommentThread { + interface Raw { + id: string; + siteId: string; + pageId: string; + localeId?: string | null; + itemId?: string | null; + breakpoint: string; + url: string; + content: string; + isResolved: boolean; + author: CommentThreadAuthor.Raw; + mentionedUsers: CommentThreadMentionedUsersItem.Raw[]; + createdOn: string; + lastUpdated: string; + } +} diff --git a/src/serialization/types/CommentThreadAuthor.ts b/src/serialization/types/CommentThreadAuthor.ts new file mode 100644 index 00000000..0b876243 --- /dev/null +++ b/src/serialization/types/CommentThreadAuthor.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 CommentThreadAuthor: core.serialization.ObjectSchema< + serializers.CommentThreadAuthor.Raw, + Webflow.CommentThreadAuthor +> = core.serialization.object({ + userId: core.serialization.string(), + email: core.serialization.string(), + name: core.serialization.string(), +}); + +export declare namespace CommentThreadAuthor { + interface Raw { + userId: string; + email: string; + name: string; + } +} diff --git a/src/serialization/types/CommentThreadList.ts b/src/serialization/types/CommentThreadList.ts new file mode 100644 index 00000000..20858bb6 --- /dev/null +++ b/src/serialization/types/CommentThreadList.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"; +import { CommentThread } from "./CommentThread"; +import { CommentThreadListPagination } from "./CommentThreadListPagination"; + +export const CommentThreadList: core.serialization.ObjectSchema< + serializers.CommentThreadList.Raw, + Webflow.CommentThreadList +> = core.serialization.object({ + comments: core.serialization.list(CommentThread), + pagination: CommentThreadListPagination, +}); + +export declare namespace CommentThreadList { + interface Raw { + comments: CommentThread.Raw[]; + pagination: CommentThreadListPagination.Raw; + } +} diff --git a/src/serialization/types/CommentThreadListPagination.ts b/src/serialization/types/CommentThreadListPagination.ts new file mode 100644 index 00000000..83f463ed --- /dev/null +++ b/src/serialization/types/CommentThreadListPagination.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 CommentThreadListPagination: core.serialization.ObjectSchema< + serializers.CommentThreadListPagination.Raw, + Webflow.CommentThreadListPagination +> = core.serialization.object({ + limit: core.serialization.number(), + offset: core.serialization.number(), + total: core.serialization.number(), +}); + +export declare namespace CommentThreadListPagination { + interface Raw { + limit: number; + offset: number; + total: number; + } +} diff --git a/src/serialization/types/CommentThreadMentionedUsersItem.ts b/src/serialization/types/CommentThreadMentionedUsersItem.ts new file mode 100644 index 00000000..2eabece3 --- /dev/null +++ b/src/serialization/types/CommentThreadMentionedUsersItem.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 CommentThreadMentionedUsersItem: core.serialization.ObjectSchema< + serializers.CommentThreadMentionedUsersItem.Raw, + Webflow.CommentThreadMentionedUsersItem +> = core.serialization.object({ + userId: core.serialization.string(), + email: core.serialization.string(), + name: core.serialization.string(), +}); + +export declare namespace CommentThreadMentionedUsersItem { + interface Raw { + userId: string; + email: string; + name: string; + } +} diff --git a/src/serialization/types/ComponentNode.ts b/src/serialization/types/ComponentNode.ts index 4118e39d..41f7160c 100644 --- a/src/serialization/types/ComponentNode.ts +++ b/src/serialization/types/ComponentNode.ts @@ -9,15 +9,15 @@ import { ComponentProperty } from "./ComponentProperty"; export const ComponentNode: 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/FieldType.ts b/src/serialization/types/FieldType.ts index 57d06f96..536ad037 100644 --- a/src/serialization/types/FieldType.ts +++ b/src/serialization/types/FieldType.ts @@ -12,11 +12,13 @@ export const FieldType: core.serialization.Schema = 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/SkuFieldData.ts b/src/serialization/types/SkuFieldData.ts index 4bd54836..6c789187 100644 --- a/src/serialization/types/SkuFieldData.ts +++ b/src/serialization/types/SkuFieldData.ts @@ -10,6 +10,7 @@ import { SkuFieldDataPrice } from "./SkuFieldDataPrice"; import { SkuFieldDataCompareAtPrice } from "./SkuFieldDataCompareAtPrice"; import { SkuFieldDataEcSkuBillingMethod } from "./SkuFieldDataEcSkuBillingMethod"; import { SkuFieldDataEcSkuSubscriptionPlan } from "./SkuFieldDataEcSkuSubscriptionPlan"; +import { SkuPropertyList } from "./SkuPropertyList"; export const SkuFieldData: core.serialization.ObjectSchema = core.serialization.object({ @@ -28,6 +29,12 @@ export const SkuFieldData: core.serialization.ObjectSchema = core.serialization.object({ value: core.serialization.number().optional(), unit: core.serialization.string().optional(), + currency: core.serialization.string().optional(), }); export declare namespace SkuFieldDataPrice { interface Raw { value?: number | null; unit?: string | null; + currency?: 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/index.ts b/src/serialization/types/index.ts index d6442032..07c364a5 100644 --- a/src/serialization/types/index.ts +++ b/src/serialization/types/index.ts @@ -61,6 +61,16 @@ export * from "./BulkCollectionItemFieldData"; export * from "./BulkCollectionItem"; export * from "./CollectionItemPatchSingleFieldData"; export * from "./CollectionItemPatchSingle"; +export * from "./CommentThreadAuthor"; +export * from "./CommentThreadMentionedUsersItem"; +export * from "./CommentThread"; +export * from "./CommentThreadListPagination"; +export * from "./CommentThreadList"; +export * from "./CommentReplyAuthor"; +export * from "./CommentReplyMentionedUsersItem"; +export * from "./CommentReply"; +export * from "./CommentReplyListPagination"; +export * from "./CommentReplyList"; export * from "./PageSeo"; export * from "./PageOpenGraph"; export * from "./Page"; diff --git a/src/version.ts b/src/version.ts index f2681032..7a11434f 100644 --- a/src/version.ts +++ b/src/version.ts @@ -1 +1 @@ -export const SDK_VERSION = "3.1.1"; +export const SDK_VERSION = "3.1.2"; diff --git a/yarn.lock b/yarn.lock index e88507ce..09104f9f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -19,7 +19,7 @@ js-tokens "^4.0.0" picocolors "^1.0.0" -"@babel/compat-data@^7.26.5": +"@babel/compat-data@^7.26.8": version "7.26.8" resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.26.8.tgz#821c1d35641c355284d4a870b8a4a7b0c141e367" integrity sha512-oH5UPLMWR3L2wEFLnFJ1TZXqHufiTKAiLfqw5zkhS4dKXLJ10yVztfil/twG8EDTA4F/tvVNw9nOl4ZMslB8rQ== @@ -45,23 +45,23 @@ json5 "^2.2.3" semver "^6.3.1" -"@babel/generator@^7.26.10", "@babel/generator@^7.7.2": - version "7.26.10" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.26.10.tgz#a60d9de49caca16744e6340c3658dfef6138c3f7" - integrity sha512-rRHT8siFIXQrAYOYqZQVsAr8vJ+cBNqcVAY6m5V8/4QqzaPl+zDBe6cLEPRDuNOUf3ww8RfJVlOyQMoSI+5Ang== +"@babel/generator@^7.26.10", "@babel/generator@^7.27.0", "@babel/generator@^7.7.2": + version "7.27.0" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.27.0.tgz#764382b5392e5b9aff93cadb190d0745866cbc2c" + integrity sha512-VybsKvpiN1gU1sdMZIp7FcqphVVKEwcuj02x73uvcHE0PTihx1nlBcowYWhDwjpoAXRv43+gDzyggGnn1XZhVw== dependencies: - "@babel/parser" "^7.26.10" - "@babel/types" "^7.26.10" + "@babel/parser" "^7.27.0" + "@babel/types" "^7.27.0" "@jridgewell/gen-mapping" "^0.3.5" "@jridgewell/trace-mapping" "^0.3.25" jsesc "^3.0.2" "@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== + version "7.27.0" + resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.27.0.tgz#de0c753b1cd1d9ab55d473c5a5cf7170f0a81880" + integrity sha512-LVk7fbXml0H2xH34dFzKQ7TDZ2G4/rVTOrq9V+icbbadjbVxxeFeDsNHv2SrZeWoA+6ZiTyWYWtScEIW07EAcA== dependencies: - "@babel/compat-data" "^7.26.5" + "@babel/compat-data" "^7.26.8" "@babel/helper-validator-option" "^7.25.9" browserslist "^4.24.0" lru-cache "^5.1.1" @@ -105,19 +105,19 @@ integrity sha512-e/zv1co8pp55dNdEcCynfj9X7nyUKUXoUEwfXqaZt0omVOmDe9oOTdKStH4GmAw6zxMFs50ZayuMfHDKlO7Tfw== "@babel/helpers@^7.26.10": - version "7.26.10" - resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.26.10.tgz#6baea3cd62ec2d0c1068778d63cb1314f6637384" - integrity sha512-UPYc3SauzZ3JGgj87GgZ89JVdC5dj0AoetR5Bw6wj4niittNyFh6+eOGonYvJ1ao6B8lEa3Q3klS7ADZ53bc5g== + version "7.27.0" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.27.0.tgz#53d156098defa8243eab0f32fa17589075a1b808" + integrity sha512-U5eyP/CTFPuNE3qk+WZMxFkp/4zUzdceQlfzf7DdGdhp+Fezd7HD+i8Y24ZuTMKX3wQBld449jijbGq6OdGNQg== dependencies: - "@babel/template" "^7.26.9" - "@babel/types" "^7.26.10" + "@babel/template" "^7.27.0" + "@babel/types" "^7.27.0" -"@babel/parser@^7.1.0", "@babel/parser@^7.14.7", "@babel/parser@^7.20.7", "@babel/parser@^7.23.9", "@babel/parser@^7.26.10", "@babel/parser@^7.26.9": - version "7.26.10" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.26.10.tgz#e9bdb82f14b97df6569b0b038edd436839c57749" - integrity sha512-6aQR2zGE/QFi8JpDLjUZEPYOs7+mhKXm86VaKFiLP35JQwQb6bwUE+XbvkH0EptsYhbNBSUGaUBLKqxH1xSgsA== +"@babel/parser@^7.1.0", "@babel/parser@^7.14.7", "@babel/parser@^7.20.7", "@babel/parser@^7.23.9", "@babel/parser@^7.26.10", "@babel/parser@^7.27.0": + version "7.27.0" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.27.0.tgz#3d7d6ee268e41d2600091cbd4e145ffee85a44ec" + integrity sha512-iaepho73/2Pz7w2eMS0Q5f83+0RKI7i4xmiYeBmDzfRVbQtTOG7Ts0S4HzJVsTMGI9keU8rNfuZr8DKfSt7Yyg== dependencies: - "@babel/types" "^7.26.10" + "@babel/types" "^7.27.0" "@babel/plugin-syntax-async-generators@^7.8.4": version "7.8.4" @@ -238,32 +238,32 @@ dependencies: "@babel/helper-plugin-utils" "^7.25.9" -"@babel/template@^7.26.9", "@babel/template@^7.3.3": - version "7.26.9" - resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.26.9.tgz#4577ad3ddf43d194528cff4e1fa6b232fa609bb2" - integrity sha512-qyRplbeIpNZhmzOysF/wFMuP9sctmh2cFzRAZOn1YapxBsE1i9bJIY586R/WBLfLcmcBlM8ROBiQURnnNy+zfA== +"@babel/template@^7.26.9", "@babel/template@^7.27.0", "@babel/template@^7.3.3": + version "7.27.0" + resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.27.0.tgz#b253e5406cc1df1c57dcd18f11760c2dbf40c0b4" + integrity sha512-2ncevenBqXI6qRMukPlXwHKHchC7RyMuu4xv5JBXRfOGVcTy1mXCD12qrp7Jsoxll1EV3+9sE4GugBVRjT2jFA== dependencies: "@babel/code-frame" "^7.26.2" - "@babel/parser" "^7.26.9" - "@babel/types" "^7.26.9" + "@babel/parser" "^7.27.0" + "@babel/types" "^7.27.0" "@babel/traverse@^7.25.9", "@babel/traverse@^7.26.10": - version "7.26.10" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.26.10.tgz#43cca33d76005dbaa93024fae536cc1946a4c380" - integrity sha512-k8NuDrxr0WrPH5Aupqb2LCVURP/S0vBEn5mK6iH+GIYob66U5EtoZvcdudR2jQ4cmTwhEwW1DLB+Yyas9zjF6A== + version "7.27.0" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.27.0.tgz#11d7e644779e166c0442f9a07274d02cd91d4a70" + integrity sha512-19lYZFzYVQkkHkl4Cy4WrAVcqBkgvV2YM2TU3xG6DIwO7O3ecbDPfW3yM3bjAGcqcQHi+CCtjMR3dIEHxsd6bA== dependencies: "@babel/code-frame" "^7.26.2" - "@babel/generator" "^7.26.10" - "@babel/parser" "^7.26.10" - "@babel/template" "^7.26.9" - "@babel/types" "^7.26.10" + "@babel/generator" "^7.27.0" + "@babel/parser" "^7.27.0" + "@babel/template" "^7.27.0" + "@babel/types" "^7.27.0" 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.10", "@babel/types@^7.26.9", "@babel/types@^7.3.3": - version "7.26.10" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.26.10.tgz#396382f6335bd4feb65741eacfc808218f859259" - integrity sha512-emqcG3vHrpxUKTrxcblR36dcrcoRDvKmnL/dCL6ZsHaShW80qxCAcNhzQZrpeM765VzEos+xOi4s+r4IXzTwdQ== +"@babel/types@^7.0.0", "@babel/types@^7.20.7", "@babel/types@^7.25.9", "@babel/types@^7.26.10", "@babel/types@^7.27.0", "@babel/types@^7.3.3": + version "7.27.0" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.27.0.tgz#ef9acb6b06c3173f6632d993ecb6d4ae470b4559" + integrity sha512-H45s8fVLYjbhFH62dIJ3WtmJ6RSPt/3DRO0ZcT2SUiYiQyz3BLVb9ADEnLl91m74aQPS3AzzeajZHYOalWe3bg== dependencies: "@babel/helper-string-parser" "^7.25.9" "@babel/helper-validator-identifier" "^7.25.9" @@ -557,9 +557,9 @@ "@types/babel__traverse" "*" "@types/babel__generator@*": - version "7.6.8" - resolved "https://registry.yarnpkg.com/@types/babel__generator/-/babel__generator-7.6.8.tgz#f836c61f48b1346e7d2b0d93c6dacc5b9535d3ab" - integrity sha512-ASsj+tpEDsEiFr1arWrlN6V3mdfjRMZt6LtK/Vp/kreFLnr5QH5+DhvD5nINYZXzwJvXeGq+05iUXcAzVrqWtw== + version "7.27.0" + resolved "https://registry.yarnpkg.com/@types/babel__generator/-/babel__generator-7.27.0.tgz#b5819294c51179957afaec341442f9341e4108a9" + integrity sha512-ufFd2Xi92OAVPYsy+P4n7/U7e68fex0+Ee8gSG9KX7eo084CWiQ4sdxktvdl0bOPupXtVJPY19zk6EwWqUQ8lg== dependencies: "@babel/types" "^7.0.0" @@ -571,7 +571,7 @@ "@babel/parser" "^7.1.0" "@babel/types" "^7.0.0" -"@types/babel__traverse@*", "@types/babel__traverse@^7.0.6": +"@types/babel__traverse@*", "@types/babel__traverse@7.20.6", "@types/babel__traverse@^7.0.6": version "7.20.6" resolved "https://registry.yarnpkg.com/@types/babel__traverse/-/babel__traverse-7.20.6.tgz#8dc9f0ae0f202c08d8d4dab648912c8d6038e3f7" integrity sha512-r1bzfrm0tomOI8g1SzvCaQHo6Lcv6zu0EA+W2kHrt8dyrHQxGzBBL4kdkzIS+jBMV+EYcMAEAqXqYaLJq5rOZg== @@ -595,9 +595,9 @@ "@types/json-schema" "*" "@types/estree@*", "@types/estree@^1.0.6": - version "1.0.6" - resolved "https://registry.yarnpkg.com/@types/estree/-/estree-1.0.6.tgz#628effeeae2064a1b4e79f78e81d87b7e5fc7b50" - integrity sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw== + version "1.0.7" + resolved "https://registry.yarnpkg.com/@types/estree/-/estree-1.0.7.tgz#4158d3105276773d5b7695cd4834b1722e4f37a8" + integrity sha512-w28IoSUCJpidD/TGviZwwMJckNESJZXFu7NBZ5YJ4mEUnNraUn9Pm8HSZm/jDF1pDWYKspWE7oVphigUPRakIQ== "@types/graceful-fs@^4.1.3": version "4.1.9" @@ -656,11 +656,11 @@ form-data "^4.0.0" "@types/node@*": - version "22.13.10" - resolved "https://registry.yarnpkg.com/@types/node/-/node-22.13.10.tgz#df9ea358c5ed991266becc3109dc2dc9125d77e4" - integrity sha512-I6LPUvlRH+O6VRUqYOcMudhaIdUVWfsjnZavnsraHvpBwaEyMN29ry+0UVJhImYL16xsscu0aske3yA+uPOWfw== + version "22.14.0" + resolved "https://registry.yarnpkg.com/@types/node/-/node-22.14.0.tgz#d3bfa3936fef0dbacd79ea3eb17d521c628bb47e" + integrity sha512-Kmpl+z84ILoG+3T/zQFyAJsU6EPTmOCj8/2+83fSN6djd6I4o7uOuGIH6vq3PrjY5BGitSbFuMN18j3iknubbA== dependencies: - undici-types "~6.20.0" + undici-types "~6.21.0" "@types/node@17.0.33": version "17.0.33" @@ -1187,9 +1187,9 @@ camelcase@^6.2.0: integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA== caniuse-lite@^1.0.30001688: - version "1.0.30001704" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001704.tgz#6644fe909d924ac3a7125e8a0ab6af95b1f32990" - integrity sha512-+L2IgBbV6gXB4ETf0keSvLr7JUrRVbIaB/lrQ1+z8mRcQiisG5k+lG6O4n6Y5q6f5EuNfaYXKgymucphlEXQew== + version "1.0.30001712" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001712.tgz#41ee150f12de11b5f57c5889d4f30deb451deedf" + integrity sha512-MBqPpGYYdQ7/hfKiet9SCI+nmN5/hp4ZzveOJubl5DTAMa5oggjAuoi0Z4onBpKPFI2ePGnQuQIzF3VxDjDJig== chalk@^4.0.0, chalk@^4.1.0: version "4.1.2" @@ -1338,7 +1338,7 @@ cross-spawn@^7.0.3: shebang-command "^2.0.0" which "^2.0.1" -crypto-browserify@^3.12.1: +crypto-browserify@^3.12.0: version "3.12.1" resolved "https://registry.yarnpkg.com/crypto-browserify/-/crypto-browserify-3.12.1.tgz#bb8921bec9acc81633379aa8f52d69b0b69e0dac" integrity sha512-r4ESw/IlusD17lgQi1O20Fa3qNnsckR126TdUuBgAu7GBYSIPvdNyONd3Zrxh0xCwA4+6w/TDArBPsMvhur+KQ== @@ -1453,9 +1453,9 @@ dunder-proto@^1.0.1: gopd "^1.2.0" electron-to-chromium@^1.5.73: - version "1.5.116" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.5.116.tgz#b779d73cd0cc75305d12ae4f061d7f7bcee4c761" - integrity sha512-mufxTCJzLBQVvSdZzX1s5YAuXsN1M4tTyYxOOL1TcSKtIzQ9rjIrm7yFK80rN5dwGTePgdoABDSHpuVtRQh0Zw== + version "1.5.134" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.5.134.tgz#d90008c4f8a506c1a6d1b329f922d83e18904101" + integrity sha512-zSwzrLg3jNP3bwsLqWHmS5z2nIOQ5ngMnfMZOWWtXnqqQkPVyOipxK98w+1beLw1TB+EImPNcG8wVP/cLVs2Og== elliptic@^6.5.3, elliptic@^6.5.5: version "6.6.1" @@ -2633,9 +2633,9 @@ npm-run-path@^4.0.1: path-key "^3.0.0" nwsapi@^2.2.2: - version "2.2.18" - resolved "https://registry.yarnpkg.com/nwsapi/-/nwsapi-2.2.18.tgz#3c4d7927e1ef4d042d319438ecfda6cd81b7ee41" - integrity sha512-p1TRH/edngVEHVbwqWnxUViEmq5znDvyB+Sik5cmuLpGOIfDf/39zLiq3swPF8Vakqn+gvNiOQAZu8djYlQILA== + version "2.2.20" + resolved "https://registry.yarnpkg.com/nwsapi/-/nwsapi-2.2.20.tgz#22e53253c61e7b0e7e93cef42c891154bcca11ef" + integrity sha512-/ieB+mDe4MrrKMT8z+mQL8klXydZWGR5Dowt4RAGKbJ3kIGEx3X4ljUo+6V73IXtUPWgfOlU5B9MlGxFO5T+cA== object-inspect@^1.13.3: version "1.13.4" @@ -2753,9 +2753,9 @@ picomatch@^2.0.4, picomatch@^2.2.3, picomatch@^2.3.1: integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== pirates@^4.0.4: - version "4.0.6" - resolved "https://registry.yarnpkg.com/pirates/-/pirates-4.0.6.tgz#3018ae32ecfcff6c29ba2267cbf21166ac1f36b9" - integrity sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg== + version "4.0.7" + resolved "https://registry.yarnpkg.com/pirates/-/pirates-4.0.7.tgz#643b4a18c4257c8a65104b73f3049ce9a0a15e22" + integrity sha512-TfySrs/5nm8fQJDcBDuUng3VOUKsd7S+zqvbOTiGXHfxX4wK31ard+hoNuvkicM/2YFzlpDgABOevKSsB4G/FA== pkg-dir@^4.2.0: version "4.2.0" @@ -3287,10 +3287,10 @@ typescript@4.6.4: resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.6.4.tgz#caa78bbc3a59e6a5c510d35703f6a09877ce45e9" integrity sha512-9ia/jWHIEbo49HfjrLGfKbZSuWo9iTMwXO+Ca3pRsSpbsMbc7/IU8NKdCZVRRBafVPGnoJeFL76ZOAA84I9fEg== -undici-types@~6.20.0: - version "6.20.0" - resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-6.20.0.tgz#8171bf22c1f588d1554d55bf204bc624af388433" - integrity sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg== +undici-types@~6.21.0: + version "6.21.0" + resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-6.21.0.tgz#691d00af3909be93a7faa13be61b3a5b50ef12cb" + integrity sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ== universalify@^0.2.0: version "0.2.0" @@ -3370,9 +3370,9 @@ webpack-sources@^3.2.3: integrity sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w== webpack@^5.94.0: - version "5.98.0" - resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.98.0.tgz#44ae19a8f2ba97537978246072fb89d10d1fbd17" - integrity sha512-UFynvx+gM44Gv9qFgj0acCQK2VE1CtdfwFdimkapco3hlPCJ/zeq73n2yVKimVbtm+TnApIugGhLJnkU6gjYXA== + version "5.99.5" + resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.99.5.tgz#86e3b3a5a03377ea5da271c929934003f5ac5dd8" + integrity sha512-q+vHBa6H9qwBLUlHL4Y7L0L1/LlyBKZtS9FHNCQmtayxjI5RKC9yD8gpvLeqGv5lCQp1Re04yi0MF40pf30Pvg== dependencies: "@types/eslint-scope" "^3.7.7" "@types/estree" "^1.0.6"