From 4b9f5a43df4aba320689a2c332675558575e8fc1 Mon Sep 17 00:00:00 2001 From: "fern-api[bot]" <115122769+fern-api[bot]@users.noreply.github.com> Date: Mon, 24 Nov 2025 17:34:47 +0000 Subject: [PATCH] SDK regeneration --- .mock/definition/assets.yml | 3 + .mock/definition/collections.yml | 3 + .mock/definition/collections/items.yml | 14 +- .mock/definition/comments.yml | 1 + .mock/definition/components.yml | 4 + .mock/definition/forms.yml | 87 +- .mock/definition/items.yml | 1 + .mock/definition/orders.yml | 78 ++ .mock/definition/pages.yml | 9 + .mock/definition/scripts.yml | 3 + .mock/definition/sites.yml | 24 + .mock/definition/sites/activityLogs.yml | 4 + .mock/definition/sites/comments.yml | 2 + .mock/definition/sites/forms.yml | 309 +++++++ .mock/definition/sites/scripts.yml | 1 + .mock/definition/webhooks.yml | 4 + .mock/fern.config.json | 2 +- package.json | 4 +- reference.md | 487 +++++++++-- src/Client.ts | 4 +- .../resources/items/client/Client.ts | 14 +- src/api/resources/forms/client/Client.ts | 161 ---- .../resources/forms/client/requests/index.ts | 1 - src/api/resources/sites/client/Client.ts | 6 + .../sites/resources/forms/client/Client.ts | 805 ++++++++++++++++++ .../sites/resources/forms/client/index.ts | 2 + ...ormsListSubmissionsByFormAndSiteRequest.ts | 21 + .../FormsListSubmissionsBySiteRequest.ts | 0 .../requests/FormsUpdateSubmissionRequest.ts | 12 + .../resources/forms/client/requests/index.ts | 3 + .../resources/sites/resources/forms/index.ts | 1 + src/api/resources/sites/resources/index.ts | 2 + .../sites/resources/forms/client/index.ts | 1 + .../requests/FormsUpdateSubmissionRequest.ts | 20 + .../resources/forms/client/requests/index.ts | 1 + .../resources/sites/resources/forms/index.ts | 1 + .../resources/sites/resources/index.ts | 2 + src/version.ts | 2 +- tests/wire/assets.test.ts | 6 + tests/wire/collections.test.ts | 6 + tests/wire/components.test.ts | 20 +- tests/wire/forms.test.ts | 97 +-- tests/wire/orders.test.ts | 158 ++++ tests/wire/pages.test.ts | 18 + tests/wire/scripts.test.ts | 6 + tests/wire/sites.test.ts | 56 ++ tests/wire/sites/activityLogs.test.ts | 8 + tests/wire/sites/comments.test.ts | 4 + tests/wire/sites/forms.test.ts | 258 ++++++ tests/wire/sites/scripts.test.ts | 2 + tests/wire/webhooks.test.ts | 8 + yarn.lock | 235 +++-- 52 files changed, 2433 insertions(+), 548 deletions(-) create mode 100644 .mock/definition/sites/forms.yml create mode 100644 src/api/resources/sites/resources/forms/client/Client.ts create mode 100644 src/api/resources/sites/resources/forms/client/index.ts create mode 100644 src/api/resources/sites/resources/forms/client/requests/FormsListSubmissionsByFormAndSiteRequest.ts rename src/api/resources/{ => sites/resources}/forms/client/requests/FormsListSubmissionsBySiteRequest.ts (100%) create mode 100644 src/api/resources/sites/resources/forms/client/requests/FormsUpdateSubmissionRequest.ts create mode 100644 src/api/resources/sites/resources/forms/client/requests/index.ts create mode 100644 src/api/resources/sites/resources/forms/index.ts create mode 100644 src/serialization/resources/sites/resources/forms/client/index.ts create mode 100644 src/serialization/resources/sites/resources/forms/client/requests/FormsUpdateSubmissionRequest.ts create mode 100644 src/serialization/resources/sites/resources/forms/client/requests/index.ts create mode 100644 src/serialization/resources/sites/resources/forms/index.ts create mode 100644 tests/wire/sites/forms.test.ts diff --git a/.mock/definition/assets.yml b/.mock/definition/assets.yml index 73c7559c..8c142ae3 100644 --- a/.mock/definition/assets.yml +++ b/.mock/definition/assets.yml @@ -242,6 +242,7 @@ service: width: 500 height: 900 quality: 100 + error: error altText: A single candy wrapper delete: path: /assets/{asset_id} @@ -335,6 +336,7 @@ service: width: 500 height: 900 quality: 100 + error: error altText: A single candy wrapper list-folders: path: /sites/{site_id}/asset_folders @@ -371,6 +373,7 @@ service: assetFolders: - id: 6390c49774a71f0e3c1a08ee displayName: emoji icons + parentFolder: 6390c49774a71f99f21a08eb assets: - 63e5889e7fe4eafa7384cea4 - 659595234426a9fcbad57043 diff --git a/.mock/definition/collections.yml b/.mock/definition/collections.yml index 5ddf39bb..b9ee7cd1 100644 --- a/.mock/definition/collections.yml +++ b/.mock/definition/collections.yml @@ -303,18 +303,21 @@ service: type: File slug: guide-file displayName: Guide File + helpText: helpText - id: 7f8e9d0c1b2a3f4e5d6c8b9e isRequired: false isEditable: true type: Email slug: contributor-email displayName: Contributor Email + helpText: helpText - id: 3a4f5e6d7c8b9a0e1d2c4b5f isRequired: false isEditable: true type: Phone slug: emergency-contact displayName: Emergency Contact + helpText: helpText delete: path: /collections/{collection_id} method: DELETE diff --git a/.mock/definition/collections/items.yml b/.mock/definition/collections/items.yml index 09d267c4..53672488 100644 --- a/.mock/definition/collections/items.yml +++ b/.mock/definition/collections/items.yml @@ -673,10 +673,9 @@ 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. - - + + Serving data to applications in real-time? Use the Content Delivery API at `api-cdn.webflow.com` for better performance. The CDN-backed endpoint is optimized for high-volume reads, while the Data API is designed for writes and management operations. + Required scope | `CMS:read` source: @@ -1797,10 +1796,9 @@ 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. - - + + Serving data to applications in real-time? Use the Content Delivery API at `api-cdn.webflow.com` for better performance. The CDN-backed endpoint is optimized for high-volume reads, while the Data API is designed for writes and management operations. + Required scope | `CMS:read` source: diff --git a/.mock/definition/comments.yml b/.mock/definition/comments.yml index 91de1be8..573e375e 100644 --- a/.mock/definition/comments.yml +++ b/.mock/definition/comments.yml @@ -17,6 +17,7 @@ webhooks: siteId: 679826b3b20b045e176bc4b5 pageId: 679826b3b20b045e176bc4bc localeId: 67993753d910db250db64b3e + itemId: 580e64008c9a982ac9b8b754 breakpoint: main url: >- https://webflow.com/design/site-slug-4ec832?workflow=comment&commentId=679d2ddb5196117ad04d1ffa&pageId=679826b3b20b045e176bc4bc diff --git a/.mock/definition/components.yml b/.mock/definition/components.yml index 6a8a0077..9bca51f3 100644 --- a/.mock/definition/components.yml +++ b/.mock/definition/components.yml @@ -69,9 +69,13 @@ service: readonly: true - id: 6258612d1ee792848f805dcf name: Card + group: Buttons + description: A button component that can be used across the site readonly: true - id: 68a2b1d1ee792848f805dcf name: Nav + group: Buttons + description: A button component that can be used across the site readonly: true pagination: limit: 20 diff --git a/.mock/definition/forms.yml b/.mock/definition/forms.yml index 44592f7d..14bc2ad6 100644 --- a/.mock/definition/forms.yml +++ b/.mock/definition/forms.yml @@ -59,13 +59,16 @@ service: fields: '0': displayName: Email + placeholder: Enter your email userVisible: true '1': displayName: Email + placeholder: Enter your email userVisible: true responseSettings: redirectUrl: https://example.com redirectMethod: GET + redirectAction: POST https://example.com sendEmailConfirmation: true id: 589a331aa51e760df7ccb89e siteId: 580e63e98c9a982ac9b8b741 @@ -80,10 +83,12 @@ service: fields: '0': displayName: Email + placeholder: Enter your email userVisible: true responseSettings: redirectUrl: https://example.com redirectMethod: GET + redirectAction: POST https://example.com sendEmailConfirmation: false id: 580ff8d7ba3e45ba9fe588e9 siteId: 580e63e98c9a982ac9b8b741 @@ -136,6 +141,7 @@ service: 660d5bcc9c0772150459dfb1: displayName: Name type: Plain + placeholder: Enter your email userVisible: true 589a331aa51e760df7ccb89d: displayName: Email @@ -145,6 +151,7 @@ service: responseSettings: redirectUrl: https://example.com redirectMethod: GET + redirectAction: POST https://example.com sendEmailConfirmation: true id: 589a331aa51e760df7ccb89e siteId: 580e63e98c9a982ac9b8b741 @@ -350,86 +357,6 @@ service: formResponse: First Name: Arthur Last Name: Dent - list-submissions-by-site: - path: /sites/{site_id}/form_submissions - method: GET - auth: - - OAuth2: - - forms:read - docs: > - List form submissions for a given site. This endpoint differs from the - existing [List Form Submissions - endpoint](/data/reference/forms/form-submissions/list-submissions) by - accepting `siteId` as a path parameter and `elementId` as a query - parameter. You can get the `elementId` from the [List forms - endpoint](/data/reference/forms/forms/list). - - - - - Required scope | `forms:read` - source: - openapi: ../../../openapi/referenced-specs/v2.yml - path-parameters: - site_id: - type: string - docs: Unique identifier for a Site - display-name: List Form Submissions by Site - request: - name: FormsListSubmissionsBySiteRequest - query-parameters: - elementId: - type: optional - docs: Identifier for an element - 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)' - response: - docs: Request was successful - type: root.FormSubmissionList - status-code: 200 - errors: - - root.BadRequestError - - root.UnauthorizedError - - root.ForbiddenError - - root.NotFoundError - - root.TooManyRequestsError - - root.InternalServerError - examples: - - path-parameters: - site_id: 580e63e98c9a982ac9b8b741 - query-parameters: - elementId: 18259716-3e5a-646a-5f41-5dc4b9405aa0 - offset: 1.1 - limit: 1.1 - response: - body: - formSubmissions: - - id: 6321ca84df3949bfc6752327 - displayName: Sample Form - siteId: 62749158efef318abc8d5a0f - workspaceId: 62749158efef318abc8d5a0f - dateSubmitted: '2022-09-14T12:35:16Z' - formResponse: - First Name: Arthur - Last Name: Dent - - id: 660d64fabf6e0a0d4edab981 - displayName: Sample Form - siteId: 62749158efef318abc8d5a0f - workspaceId: 62749158efef318abc8d5a0f - dateSubmitted: '2022-09-14T12:35:16Z' - formResponse: - First Name: Ford - Last Name: Prefect - pagination: - limit: 25 - offset: 0 - total: 2 source: openapi: ../../../openapi/referenced-specs/v2.yml display-name: Forms diff --git a/.mock/definition/items.yml b/.mock/definition/items.yml index f65b6d7b..634f1f75 100644 --- a/.mock/definition/items.yml +++ b/.mock/definition/items.yml @@ -83,6 +83,7 @@ webhooks: siteId: 65427cf400e02b306eaa049c workspaceId: 625860a7a6c16d624927122f collectionId: 664243617fcc8b464b23c4ee + cmsLocaleId: 681442a144bb80bd00480fda docs: Information about a collection item that was published collection_item_unpublished: audiences: [] diff --git a/.mock/definition/orders.yml b/.mock/definition/orders.yml index 0eeeabde..82affd79 100644 --- a/.mock/definition/orders.yml +++ b/.mock/definition/orders.yml @@ -88,6 +88,11 @@ service: Please gift wrap with a personal note saying "Happy Birthday, Ford! 🎉 acceptedOn: '2024-04-10T13:16:21Z' + fulfilledOn: '2018-12-03T22:06:15Z' + refundedOn: '2018-12-03T22:06:15Z' + disputedOn: '2018-12-03T22:06:15Z' + disputeUpdatedOn: '2018-12-03T22:06:15Z' + disputeLastStatus: warning_needs_response customerPaid: unit: USD value: '5892' @@ -187,15 +192,18 @@ service: unit: USD value: '5892' string: \$ 83.09 USD + weight: 5 width: 19 height: 72 length: 18 purchasedItemsCount: 3 stripeDetails: + subscriptionId: sub_1J6xwG2eZvKYlo2CXu9Zt0Tn paymentMethod: pm_1P410gJYFi4lcbXWbeKghqjK paymentIntentId: pi_3P410iJYFi4lcbXW0EKKgcVg customerId: cus_Ptod8KJBiiPgnH chargeId: ch_3P410iJYFi4lcbXW0DxUkzCH + refundReason: requested_by_customer stripeCard: last4: '4242' brand: Visa @@ -203,6 +211,13 @@ service: expires: year: 2025 month: 4 + paypalDetails: + orderId: 1a2b3c4d5e6f7g8h9i0j + payerId: 9k8j7i6h5g4f3e2d1c0b + captureId: qwe123rty456uio789p + refundId: abcde12345fghij67890 + refundReason: Customer requested refund + disputeId: zxcvbnm987poiuytrewq customData: - key: value metadata: @@ -230,7 +245,11 @@ service: comment: Example comment to myself orderComment: '' acceptedOn: '2024-03-29T21:29:21Z' + fulfilledOn: '2018-12-03T22:06:15Z' refundedOn: '2024-04-08T18:25:04Z' + disputedOn: '2018-12-03T22:06:15Z' + disputeUpdatedOn: '2018-12-03T22:06:15Z' + disputeLastStatus: warning_needs_response customerPaid: unit: USD value: '5892' @@ -337,6 +356,7 @@ service: length: 40 purchasedItemsCount: 2 stripeDetails: + subscriptionId: sub_1J6xwG2eZvKYlo2CXu9Zt0Tn paymentMethod: pm_1OzmzBJYFi4lcbXWHKNdXU7j paymentIntentId: pi_3OzmzDJYFi4lcbXW1hTBW6ft customerId: cus_PpRsNHwWdUoRKR @@ -350,6 +370,13 @@ service: expires: year: 2024 month: 4 + paypalDetails: + orderId: 1a2b3c4d5e6f7g8h9i0j + payerId: 9k8j7i6h5g4f3e2d1c0b + captureId: qwe123rty456uio789p + refundId: abcde12345fghij67890 + refundReason: Customer requested refund + disputeId: zxcvbnm987poiuytrewq customData: - key: value metadata: @@ -558,10 +585,12 @@ service: length: 40 purchasedItemsCount: 2 stripeDetails: + subscriptionId: sub_1J6xwG2eZvKYlo2CXu9Zt0Tn paymentMethod: pm_1OzmzBJYFi4lcbXWHKNdXU7j paymentIntentId: pi_3OzmzDJYFi4lcbXW1hTBW6ft customerId: cus_PpRsNHwWdUoRKR chargeId: ch_3OzmzDJYFi4lcbXW1ndkkrH2 + disputeId: disputeId refundId: re_3OzmzDJYFi4lcbXW1kFAmlBk refundReason: fraudulent stripeCard: @@ -571,6 +600,13 @@ service: expires: year: 2024 month: 4 + paypalDetails: + orderId: 1a2b3c4d5e6f7g8h9i0j + payerId: 9k8j7i6h5g4f3e2d1c0b + captureId: qwe123rty456uio789p + refundId: abcde12345fghij67890 + refundReason: Customer requested refund + disputeId: zxcvbnm987poiuytrewq customData: - key: value metadata: @@ -794,10 +830,12 @@ service: length: 40 purchasedItemsCount: 2 stripeDetails: + subscriptionId: sub_1J6xwG2eZvKYlo2CXu9Zt0Tn paymentMethod: pm_1OzmzBJYFi4lcbXWHKNdXU7j paymentIntentId: pi_3OzmzDJYFi4lcbXW1hTBW6ft customerId: cus_PpRsNHwWdUoRKR chargeId: ch_3OzmzDJYFi4lcbXW1ndkkrH2 + disputeId: disputeId refundId: re_3OzmzDJYFi4lcbXW1kFAmlBk refundReason: fraudulent stripeCard: @@ -807,6 +845,13 @@ service: expires: year: 2024 month: 4 + paypalDetails: + orderId: 1a2b3c4d5e6f7g8h9i0j + payerId: 9k8j7i6h5g4f3e2d1c0b + captureId: qwe123rty456uio789p + refundId: abcde12345fghij67890 + refundReason: Customer requested refund + disputeId: zxcvbnm987poiuytrewq customData: - key: value metadata: @@ -1020,10 +1065,12 @@ service: length: 40 purchasedItemsCount: 2 stripeDetails: + subscriptionId: sub_1J6xwG2eZvKYlo2CXu9Zt0Tn paymentMethod: pm_1OzmzBJYFi4lcbXWHKNdXU7j paymentIntentId: pi_3OzmzDJYFi4lcbXW1hTBW6ft customerId: cus_PpRsNHwWdUoRKR chargeId: ch_3OzmzDJYFi4lcbXW1ndkkrH2 + disputeId: disputeId refundId: re_3OzmzDJYFi4lcbXW1kFAmlBk refundReason: fraudulent stripeCard: @@ -1033,6 +1080,13 @@ service: expires: year: 2024 month: 4 + paypalDetails: + orderId: 1a2b3c4d5e6f7g8h9i0j + payerId: 9k8j7i6h5g4f3e2d1c0b + captureId: qwe123rty456uio789p + refundId: abcde12345fghij67890 + refundReason: Customer requested refund + disputeId: zxcvbnm987poiuytrewq customData: - key: value metadata: @@ -1236,10 +1290,12 @@ service: length: 40 purchasedItemsCount: 2 stripeDetails: + subscriptionId: sub_1J6xwG2eZvKYlo2CXu9Zt0Tn paymentMethod: pm_1OzmzBJYFi4lcbXWHKNdXU7j paymentIntentId: pi_3OzmzDJYFi4lcbXW1hTBW6ft customerId: cus_PpRsNHwWdUoRKR chargeId: ch_3OzmzDJYFi4lcbXW1ndkkrH2 + disputeId: disputeId refundId: re_3OzmzDJYFi4lcbXW1kFAmlBk refundReason: fraudulent stripeCard: @@ -1249,6 +1305,13 @@ service: expires: year: 2024 month: 4 + paypalDetails: + orderId: 1a2b3c4d5e6f7g8h9i0j + payerId: 9k8j7i6h5g4f3e2d1c0b + captureId: qwe123rty456uio789p + refundId: abcde12345fghij67890 + refundReason: Customer requested refund + disputeId: zxcvbnm987poiuytrewq customData: - key: value metadata: @@ -1462,10 +1525,12 @@ service: length: 40 purchasedItemsCount: 2 stripeDetails: + subscriptionId: sub_1J6xwG2eZvKYlo2CXu9Zt0Tn paymentMethod: pm_1OzmzBJYFi4lcbXWHKNdXU7j paymentIntentId: pi_3OzmzDJYFi4lcbXW1hTBW6ft customerId: cus_PpRsNHwWdUoRKR chargeId: ch_3OzmzDJYFi4lcbXW1ndkkrH2 + disputeId: disputeId refundId: re_3OzmzDJYFi4lcbXW1kFAmlBk refundReason: fraudulent stripeCard: @@ -1475,6 +1540,13 @@ service: expires: year: 2024 month: 4 + paypalDetails: + orderId: 1a2b3c4d5e6f7g8h9i0j + payerId: 9k8j7i6h5g4f3e2d1c0b + captureId: qwe123rty456uio789p + refundId: abcde12345fghij67890 + refundReason: Customer requested refund + disputeId: zxcvbnm987poiuytrewq customData: - key: value metadata: @@ -1544,6 +1616,10 @@ webhooks: Please gift wrap with a personal note saying "Happy Birthday, Ford! 🎉 acceptedOn: '2024-03-29T21:29:21Z' + fulfilledOn: '2018-12-03T22:06:15Z' + refundedOn: '2018-12-03T22:06:15Z' + disputedOn: '2018-12-03T22:06:15Z' + disputeUpdatedOn: '2018-12-03T22:06:15Z' customerPaid: unit: USD value: '5892' @@ -1647,6 +1723,7 @@ webhooks: length: 40 purchasedItemsCount: 2 stripeDetails: + subscriptionId: sub_1J6xwG2eZvKYlo2CXu9Zt0Tn paymentMethod: pm_1OzmzBJYFi4lcbXWHKNdXU7j paymentIntentId: pi_3OzmzDJYFi4lcbXW1hTBW6ft customerId: cus_PpRsNHwWdUoRKR @@ -1833,6 +1910,7 @@ webhooks: length: 40 purchasedItemsCount: 2 stripeDetails: + subscriptionId: sub_1J6xwG2eZvKYlo2CXu9Zt0Tn paymentMethod: pm_1OzmzBJYFi4lcbXWHKNdXU7j paymentIntentId: pi_3OzmzDJYFi4lcbXW1hTBW6ft customerId: cus_PpRsNHwWdUoRKR diff --git a/.mock/definition/pages.yml b/.mock/definition/pages.yml index 88b8aa21..a4f63b00 100644 --- a/.mock/definition/pages.yml +++ b/.mock/definition/pages.yml @@ -64,6 +64,8 @@ service: siteId: 6258612d1ee792848f805dcf title: Guide to the Galaxy slug: guide-to-the-galaxy + parentId: 6419db964a9c435aa3af6251 + collectionId: 6390c49774a71f12831a08e3 createdOn: '2024-03-11T10:42:00Z' lastUpdated: '2024-03-11T10:42:42Z' archived: false @@ -89,12 +91,15 @@ service: siteId: 6258612d1ee792848f805dcf title: Towel Day Celebrations slug: towel-day + parentId: 6419db964a9c435aa3af6251 + collectionId: 6390c49774a71f12831a08e3 createdOn: '2024-05-25T09:00:00Z' lastUpdated: '2024-05-25T09:42:00Z' archived: false draft: false canBranch: true isBranch: false + branchId: 68026fa68ef6dc744c75b833 seo: title: Celebrate Towel Day - The Hitchhiker's Guide to the Galaxy description: >- @@ -164,6 +169,8 @@ service: siteId: 6258612d1ee792848f805dcf title: Guide to the Galaxy slug: guide-to-the-galaxy + parentId: 6419db964a9c435aa3af6251 + collectionId: 6390c49774a71f12831a08e3 createdOn: '2024-03-11T10:42:00Z' lastUpdated: '2024-03-11T10:42:42Z' archived: false @@ -271,6 +278,8 @@ service: siteId: 6258612d1ee792848f805dcf title: Guide to the Galaxy slug: guide-to-the-galaxy + parentId: 6419db964a9c435aa3af6251 + collectionId: 6390c49774a71f12831a08e3 createdOn: '2024-03-11T10:42:00Z' lastUpdated: '2024-03-11T10:42:42Z' archived: false diff --git a/.mock/definition/scripts.yml b/.mock/definition/scripts.yml index 0989ace5..4ff0c7d9 100644 --- a/.mock/definition/scripts.yml +++ b/.mock/definition/scripts.yml @@ -48,6 +48,7 @@ service: canCopy: false displayName: Alert hostedLocation: https://cdn.webflow.io/.../alert-0.0.1.js + integrityHash: integrityHash createdOn: '2022-10-26T00:28:54.191Z' lastUpdated: lastUpdated version: 0.0.1 @@ -55,6 +56,7 @@ service: canCopy: false displayName: Alert hostedLocation: https://cdn.webflow.io/.../alert-0.0.2.js + integrityHash: integrityHash createdOn: '2022-10-26T00:28:54.191Z' lastUpdated: lastUpdated version: 0.0.2 @@ -225,6 +227,7 @@ service: displayName: Alert hostedLocation: >- https://uploads-ssl.webflow.com/6258612d1ee792848f805dcf%2F64b6c769ff52ba6c3d904a91%2F660d6e15b3d1696f2d2b1447%2Falert-0.0.1.js + integrityHash: integrityHash createdOn: '2022-10-26T00:28:54.191Z' lastUpdated: lastUpdated version: 0.0.1 diff --git a/.mock/definition/sites.yml b/.mock/definition/sites.yml index 052dbbc2..ebc7cd09 100644 --- a/.mock/definition/sites.yml +++ b/.mock/definition/sites.yml @@ -64,12 +64,34 @@ service: createdOn: '2024-10-15T20:24:38Z' displayName: The Hitchiker's Guide shortName: hitchikers-guide + lastPublished: '2016-10-24T19:43:17Z' lastUpdated: '2024-10-15T20:24:38Z' + previewUrl: >- + https://dev-assets.website-files.com/580e63e98c9a982ac9b8b741/201610241243.png + timeZone: America/Los_Angeles parentFolderId: 670ece123598db72d9648be1 customDomains: - id: 589a331aa51e760df7ccb89d url: test-api-domain.com lastPublished: '2022-12-07T16:51:37Z' + locales: + primary: + id: 653fd9af6a07fc9cfd7a5e57 + cmsLocaleId: 653ad57de882f528b32e810e + enabled: false + displayName: English (United States) + displayImageId: displayImageId + redirect: true + subdirectory: '' + tag: en-US + secondary: + - id: 653fd9af6a07fc9cfd7a5e57 + cmsLocaleId: 653ad57de882f528b32e810e + enabled: false + displayName: English (United States) + redirect: true + subdirectory: '' + tag: en-US dataCollectionEnabled: true dataCollectionType: always list: @@ -148,6 +170,7 @@ service: previewUrl: >- https://dev-assets.website-files.com/42e63e98c9a982ac9b8b742/198110121200.png timeZone: DeepSpace/Depression + parentFolderId: 1as2d3f4g5h6j7k8l9z0x1c2v3b4n5m6 customDomains: - id: 589a331aa51e760df7ccb89f url: marvin.blog @@ -181,6 +204,7 @@ service: previewUrl: >- https://dev-assets.website-files.com/42e63e98c9a982ac9b8b743/198210121200.png timeZone: Vogsphere/PoetryHall + parentFolderId: 1as2d3f4g5h6j7k8l9z0x1c2v3b4n5m6 customDomains: - id: 589a331aa51e760df7ccb8a0 url: vogonpoetry.galaxy diff --git a/.mock/definition/sites/activityLogs.yml b/.mock/definition/sites/activityLogs.yml index 88d0822f..fc8d76f3 100644 --- a/.mock/definition/sites/activityLogs.yml +++ b/.mock/definition/sites/activityLogs.yml @@ -65,6 +65,10 @@ service: displayName: John Doe resourceId: 654c16c7b229e56bcf26870c resourceName: foo-bar + newValue: newValue + previousValue: previousValue + payload: + key: value pagination: limit: 25 offset: 0 diff --git a/.mock/definition/sites/comments.yml b/.mock/definition/sites/comments.yml index ac8b3a2d..e2afdd16 100644 --- a/.mock/definition/sites/comments.yml +++ b/.mock/definition/sites/comments.yml @@ -115,6 +115,7 @@ service: siteId: 679826b3b20b045e176bc4b5 pageId: 679826b3b20b045e176bc4bc localeId: 67993753d910db250db64b3e + itemId: 580e64008c9a982ac9b8b754 breakpoint: main url: >- https://webflow.com/design/site-slug-4ec832?workflow=comment&commentId=679d2ddb5196117ad04d1ff8&pageId=679826b3b20b045e176bc4bc @@ -134,6 +135,7 @@ service: siteId: 679826b3b20b045e176bc4b5 pageId: 679826b3b20b045e176bc4bc localeId: 67993753d910db250db64b3e + itemId: 580e64008c9a982ac9b8b754 breakpoint: main url: >- https://webflow.com/design/site-slug-4ec832?workflow=comment&commentId=679d2ddb5196117ad04d1ff8&pageId=679826b3b20b045e176bc4bc diff --git a/.mock/definition/sites/forms.yml b/.mock/definition/sites/forms.yml new file mode 100644 index 00000000..0d5d9a9d --- /dev/null +++ b/.mock/definition/sites/forms.yml @@ -0,0 +1,309 @@ +imports: + root: ../__package__.yml +service: + auth: false + base-path: '' + endpoints: + list-submissions-by-site: + path: /sites/{site_id}/form_submissions + method: GET + auth: + - OAuth2: + - forms:read + docs: > + List form submissions for a given site. This endpoint differs from the + existing [List Form Submissions + endpoint](/data/reference/forms/form-submissions/list-submissions) by + accepting `siteId` as a path parameter and `elementId` as a query + parameter. + + + Add `elementId` when you want to filter form submissions to a specific + form in a site. You can get the `elementId` from the [List forms + endpoint](/data/reference/forms/forms/list) (displayed as + `formElementId` in the response). + + + + + When a form is used in a Webflow component definition, each instance of + the component will yield a unique form. Adding the `elementId` in this + request ensures this API response includes all submissions from that + core form, wherever that form is used in instantiated components. + + + + + + + Required scope | `forms:read` + source: + openapi: ../../../openapi/referenced-specs/v2.yml + path-parameters: + site_id: + type: string + docs: Unique identifier for a Site + display-name: List Form Submissions by Site + request: + name: FormsListSubmissionsBySiteRequest + query-parameters: + elementId: + type: optional + docs: Identifier for an element + 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)' + response: + docs: Request was successful + type: root.FormSubmissionList + status-code: 200 + errors: + - root.BadRequestError + - root.UnauthorizedError + - root.ForbiddenError + - root.NotFoundError + - root.TooManyRequestsError + - root.InternalServerError + examples: + - path-parameters: + site_id: 580e63e98c9a982ac9b8b741 + query-parameters: + elementId: 18259716-3e5a-646a-5f41-5dc4b9405aa0 + offset: 1.1 + limit: 1.1 + response: + body: + formSubmissions: + - id: 6321ca84df3949bfc6752327 + displayName: Sample Form + siteId: 62749158efef318abc8d5a0f + workspaceId: 62749158efef318abc8d5a0f + dateSubmitted: '2022-09-14T12:35:16Z' + formResponse: + First Name: Arthur + Last Name: Dent + - id: 660d64fabf6e0a0d4edab981 + displayName: Sample Form + siteId: 62749158efef318abc8d5a0f + workspaceId: 62749158efef318abc8d5a0f + dateSubmitted: '2022-09-14T12:35:16Z' + formResponse: + First Name: Ford + Last Name: Prefect + pagination: + limit: 25 + offset: 0 + total: 2 + list-submissions-by-form-and-site: + path: /sites/{site_id}/forms/{form_id}/submissions + method: GET + auth: + - OAuth2: + - forms:read + docs: | + List form submissions for a given form within a specific site. + + Required scope | `forms:read` + source: + openapi: ../../../openapi/referenced-specs/v2.yml + path-parameters: + site_id: + type: string + docs: Unique identifier for a Site + form_id: + type: string + docs: Unique identifier for a Form + display-name: List Form Submissions by Form and Site + request: + name: FormsListSubmissionsByFormAndSiteRequest + query-parameters: + 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)' + response: + docs: Request was successful + type: root.FormSubmissionList + status-code: 200 + errors: + - root.BadRequestError + - root.UnauthorizedError + - root.ForbiddenError + - root.NotFoundError + - root.TooManyRequestsError + - root.InternalServerError + examples: + - path-parameters: + site_id: 580e63e98c9a982ac9b8b741 + form_id: 580e63e98c9a982ac9b8b741 + query-parameters: + offset: 1.1 + limit: 1.1 + response: + body: + formSubmissions: + - id: 6321ca84df3949bfc6752327 + displayName: Sample Form + siteId: 62749158efef318abc8d5a0f + workspaceId: 62749158efef318abc8d5a0f + dateSubmitted: '2022-09-14T12:35:16Z' + formResponse: + First Name: Arthur + Last Name: Dent + - id: 660d64fabf6e0a0d4edab981 + displayName: Sample Form + siteId: 62749158efef318abc8d5a0f + workspaceId: 62749158efef318abc8d5a0f + dateSubmitted: '2022-09-14T12:35:16Z' + formResponse: + First Name: Ford + Last Name: Prefect + pagination: + limit: 25 + offset: 0 + total: 2 + get-submission: + path: /sites/{site_id}/form_submissions/{form_submission_id} + method: GET + auth: + - OAuth2: + - forms:read + docs: | + Get information about a form submission within a specific site. + + Required scope | `forms:read` + source: + openapi: ../../../openapi/referenced-specs/v2.yml + path-parameters: + site_id: + type: string + docs: Unique identifier for a Site + form_submission_id: + type: string + docs: Unique identifier for a Form Submission + display-name: Get Form Submission by Site + response: + docs: Request was successful + type: root.FormSubmission + status-code: 200 + errors: + - root.BadRequestError + - root.UnauthorizedError + - root.ForbiddenError + - root.NotFoundError + - root.TooManyRequestsError + - root.InternalServerError + examples: + - path-parameters: + site_id: 580e63e98c9a982ac9b8b741 + form_submission_id: 580e63e98c9a982ac9b8b741 + response: + body: + id: 6321ca84df3949bfc6752327 + displayName: Sample Form + siteId: 62749158efef318abc8d5a0f + workspaceId: 62749158efef318abc8d5a0f + dateSubmitted: '2022-09-14T12:35:16Z' + formResponse: + First Name: Arthur + Last Name: Dent + delete-submission: + path: /sites/{site_id}/form_submissions/{form_submission_id} + method: DELETE + auth: + - OAuth2: + - forms:write + docs: | + Delete a form submission within a specific site. + + Required scope | `forms:write` + source: + openapi: ../../../openapi/referenced-specs/v2.yml + path-parameters: + site_id: + type: string + docs: Unique identifier for a Site + form_submission_id: + type: string + docs: Unique identifier for a Form Submission + display-name: Delete Form Submission by Site + errors: + - root.BadRequestError + - root.UnauthorizedError + - root.ForbiddenError + - root.NotFoundError + - root.ConflictError + - root.TooManyRequestsError + - root.InternalServerError + examples: + - path-parameters: + site_id: 580e63e98c9a982ac9b8b741 + form_submission_id: 580e63e98c9a982ac9b8b741 + update-submission: + path: /sites/{site_id}/form_submissions/{form_submission_id} + method: PATCH + auth: + - OAuth2: + - forms:write + docs: | + Update hidden fields on a form submission within a specific site. + + Required scope | `forms:write` + source: + openapi: ../../../openapi/referenced-specs/v2.yml + path-parameters: + site_id: + type: string + docs: Unique identifier for a Site + form_submission_id: + type: string + docs: Unique identifier for a Form Submission + display-name: Modify Form Submission by Site + request: + name: FormsUpdateSubmissionRequest + body: + properties: + formSubmissionData: + type: optional> + docs: >- + An existing **hidden field** defined on the form schema, and the + corresponding value to set + content-type: application/json + response: + docs: Request was successful + type: root.FormSubmission + status-code: 200 + errors: + - root.BadRequestError + - root.UnauthorizedError + - root.ForbiddenError + - root.NotFoundError + - root.ConflictError + - root.TooManyRequestsError + - root.InternalServerError + examples: + - path-parameters: + site_id: 580e63e98c9a982ac9b8b741 + form_submission_id: 580e63e98c9a982ac9b8b741 + request: {} + response: + body: + id: 6321ca84df3949bfc6752327 + displayName: Sample Form + siteId: 62749158efef318abc8d5a0f + workspaceId: 62749158efef318abc8d5a0f + dateSubmitted: '2022-09-14T12:35:16Z' + formResponse: + First Name: Arthur + Last Name: Dent + source: + openapi: ../../../openapi/referenced-specs/v2.yml diff --git a/.mock/definition/sites/scripts.yml b/.mock/definition/sites/scripts.yml index ed57238c..5128cef5 100644 --- a/.mock/definition/sites/scripts.yml +++ b/.mock/definition/sites/scripts.yml @@ -216,6 +216,7 @@ service: body: blocks: - siteId: 6258612d1ee792848f805dcf + pageId: pageId type: site scripts: - id: chartjs diff --git a/.mock/definition/webhooks.yml b/.mock/definition/webhooks.yml index 7fbd0795..46bbb023 100644 --- a/.mock/definition/webhooks.yml +++ b/.mock/definition/webhooks.yml @@ -117,6 +117,8 @@ service: url: https://webhook.site/7f7f7f7f-7f7f-7f7f-7f7f-7f7f7f7f7f7f workspaceId: 4f4e46fd476ea8c507000001 siteId: 562ac0395358780a1f5e6fbd + filter: + name: My Form lastTriggered: '2023-02-08T23:59:28Z' createdOn: '2022-11-08T23:59:28Z' get: @@ -153,6 +155,8 @@ service: url: https://webhook.site/7f7f7f7f-7f7f-7f7f-7f7f-7f7f7f7f7f7f workspaceId: 4f4e46fd476ea8c507000001 siteId: 562ac0395358780a1f5e6fbd + filter: + name: My Form lastTriggered: '2023-02-08T23:59:28Z' createdOn: '2022-11-08T23:59:28Z' delete: diff --git a/.mock/fern.config.json b/.mock/fern.config.json index a155416e..74f92a24 100644 --- a/.mock/fern.config.json +++ b/.mock/fern.config.json @@ -1,4 +1,4 @@ { "organization" : "webflow", - "version" : "0.101.3" + "version" : "0.108.0" } \ No newline at end of file diff --git a/package.json b/package.json index 59324ee6..46626bee 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "webflow-api", - "version": "3.2.1", + "version": "3.2.2", "private": false, "repository": "https://github.com/webflow/js-webflow-api", "main": "./index.js", @@ -35,7 +35,7 @@ "@types/jest": "^29.5.14", "ts-jest": "^29.3.4", "jest-environment-jsdom": "^29.7.0", - "msw": "2.11.2", + "msw": "^2.8.4", "@types/node": "^18.19.70", "prettier": "^3.4.2", "typescript": "~5.7.2", diff --git a/reference.md b/reference.md index d6d078e7..aa7fae19 100644 --- a/reference.md +++ b/reference.md @@ -3361,83 +3361,6 @@ await client.forms.updateSubmission("580e63e98c9a982ac9b8b741"); -
client.forms.listSubmissionsBySite(siteId, { ...params }) -> Webflow.FormSubmissionList -
-
- -#### 📝 Description - -
-
- -
-
- -List form submissions for a given site. This endpoint differs from the existing [List Form Submissions endpoint](/data/reference/forms/form-submissions/list-submissions) by accepting `siteId` as a path parameter and `elementId` as a query parameter. You can get the `elementId` from the [List forms endpoint](/data/reference/forms/forms/list). - -Required scope | `forms:read` - -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -await client.forms.listSubmissionsBySite("580e63e98c9a982ac9b8b741", { - elementId: "18259716-3e5a-646a-5f41-5dc4b9405aa0", - offset: 1.1, - limit: 1.1, -}); -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**siteId:** `string` — Unique identifier for a Site - -
-
- -
-
- -**request:** `Webflow.FormsListSubmissionsBySiteRequest` - -
-
- -
-
- -**requestOptions:** `Forms.RequestOptions` - -
-
-
-
- -
-
-
- ## Users
client.users.list(siteId, { ...params }) -> Webflow.UserList @@ -5835,10 +5758,9 @@ 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. - - + + Serving data to applications in real-time? Use the Content Delivery API at `api-cdn.webflow.com` for better performance. The CDN-backed endpoint is optimized for high-volume reads, while the Data API is designed for writes and management operations. + Required scope | `CMS:read` @@ -6542,10 +6464,9 @@ 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. - - + + Serving data to applications in real-time? Use the Content Delivery API at `api-cdn.webflow.com` for better performance. The CDN-backed endpoint is optimized for high-volume reads, while the Data API is designed for writes and management operations. + Required scope | `CMS:read` @@ -8632,6 +8553,402 @@ await client.sites.scripts.listCustomCodeBlocks("580e63e98c9a982ac9b8b741", {
+## Sites Forms + +
client.sites.forms.listSubmissionsBySite(siteId, { ...params }) -> Webflow.FormSubmissionList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +List form submissions for a given site. This endpoint differs from the existing [List Form Submissions endpoint](/data/reference/forms/form-submissions/list-submissions) by accepting `siteId` as a path parameter and `elementId` as a query parameter. + +Add `elementId` when you want to filter form submissions to a specific form in a site. You can get the `elementId` from the [List forms endpoint](/data/reference/forms/forms/list) (displayed as `formElementId` in the response). + + +When a form is used in a Webflow component definition, each instance of the component will yield a unique form. Adding the `elementId` in this request ensures this API response includes all submissions from that core form, wherever that form is used in instantiated components. + + +Required scope | `forms:read` + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.sites.forms.listSubmissionsBySite("580e63e98c9a982ac9b8b741", { + elementId: "18259716-3e5a-646a-5f41-5dc4b9405aa0", + offset: 1.1, + limit: 1.1, +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**siteId:** `string` — Unique identifier for a Site + +
+
+ +
+
+ +**request:** `Webflow.sites.FormsListSubmissionsBySiteRequest` + +
+
+ +
+
+ +**requestOptions:** `Forms.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.sites.forms.listSubmissionsByFormAndSite(siteId, formId, { ...params }) -> Webflow.FormSubmissionList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +List form submissions for a given form within a specific site. + +Required scope | `forms:read` + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.sites.forms.listSubmissionsByFormAndSite("580e63e98c9a982ac9b8b741", "580e63e98c9a982ac9b8b741", { + offset: 1.1, + limit: 1.1, +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**siteId:** `string` — Unique identifier for a Site + +
+
+ +
+
+ +**formId:** `string` — Unique identifier for a Form + +
+
+ +
+
+ +**request:** `Webflow.sites.FormsListSubmissionsByFormAndSiteRequest` + +
+
+ +
+
+ +**requestOptions:** `Forms.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.sites.forms.getSubmission(siteId, formSubmissionId) -> Webflow.FormSubmission +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Get information about a form submission within a specific site. + +Required scope | `forms:read` + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.sites.forms.getSubmission("580e63e98c9a982ac9b8b741", "580e63e98c9a982ac9b8b741"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**siteId:** `string` — Unique identifier for a Site + +
+
+ +
+
+ +**formSubmissionId:** `string` — Unique identifier for a Form Submission + +
+
+ +
+
+ +**requestOptions:** `Forms.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.sites.forms.deleteSubmission(siteId, formSubmissionId) -> void +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Delete a form submission within a specific site. + +Required scope | `forms:write` + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.sites.forms.deleteSubmission("580e63e98c9a982ac9b8b741", "580e63e98c9a982ac9b8b741"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**siteId:** `string` — Unique identifier for a Site + +
+
+ +
+
+ +**formSubmissionId:** `string` — Unique identifier for a Form Submission + +
+
+ +
+
+ +**requestOptions:** `Forms.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.sites.forms.updateSubmission(siteId, formSubmissionId, { ...params }) -> Webflow.FormSubmission +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Update hidden fields on a form submission within a specific site. + +Required scope | `forms:write` + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.sites.forms.updateSubmission("580e63e98c9a982ac9b8b741", "580e63e98c9a982ac9b8b741"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**siteId:** `string` — Unique identifier for a Site + +
+
+ +
+
+ +**formSubmissionId:** `string` — Unique identifier for a Form Submission + +
+
+ +
+
+ +**request:** `Webflow.sites.FormsUpdateSubmissionRequest` + +
+
+ +
+
+ +**requestOptions:** `Forms.RequestOptions` + +
+
+
+
+ +
+
+
+ ## Workspaces AuditLogs
client.workspaces.auditLogs.getWorkspaceAuditLogs(workspaceIdOrSlug, { ...params }) -> Webflow.WorkspaceAuditLogResponse diff --git a/src/Client.ts b/src/Client.ts index ca5e992f..a06fbc3e 100644 --- a/src/Client.ts +++ b/src/Client.ts @@ -70,8 +70,8 @@ export class WebflowClient { { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "3.2.1", - "User-Agent": "webflow-api/3.2.1", + "X-Fern-SDK-Version": "3.2.2", + "User-Agent": "webflow-api/3.2.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, diff --git a/src/api/resources/collections/resources/items/client/Client.ts b/src/api/resources/collections/resources/items/client/Client.ts index 44c1c278..e31891b0 100644 --- a/src/api/resources/collections/resources/items/client/Client.ts +++ b/src/api/resources/collections/resources/items/client/Client.ts @@ -773,10 +773,9 @@ 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. - * - * + * + * Serving data to applications in real-time? Use the Content Delivery API at `api-cdn.webflow.com` for better performance. The CDN-backed endpoint is optimized for high-volume reads, while the Data API is designed for writes and management operations. + * * * Required scope | `CMS:read` * @@ -2147,10 +2146,9 @@ 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. - * - * + * + * Serving data to applications in real-time? Use the Content Delivery API at `api-cdn.webflow.com` for better performance. The CDN-backed endpoint is optimized for high-volume reads, while the Data API is designed for writes and management operations. + * * * Required scope | `CMS:read` * diff --git a/src/api/resources/forms/client/Client.ts b/src/api/resources/forms/client/Client.ts index cfd483ac..9a7be23b 100644 --- a/src/api/resources/forms/client/Client.ts +++ b/src/api/resources/forms/client/Client.ts @@ -906,167 +906,6 @@ export class Forms { } } - /** - * List form submissions for a given site. This endpoint differs from the existing [List Form Submissions endpoint](/data/reference/forms/form-submissions/list-submissions) by accepting `siteId` as a path parameter and `elementId` as a query parameter. You can get the `elementId` from the [List forms endpoint](/data/reference/forms/forms/list). - * - * - * - * Required scope | `forms:read` - * - * @param {string} siteId - Unique identifier for a Site - * @param {Webflow.FormsListSubmissionsBySiteRequest} request - * @param {Forms.RequestOptions} requestOptions - Request-specific configuration. - * - * @throws {@link Webflow.BadRequestError} - * @throws {@link Webflow.UnauthorizedError} - * @throws {@link Webflow.ForbiddenError} - * @throws {@link Webflow.NotFoundError} - * @throws {@link Webflow.TooManyRequestsError} - * @throws {@link Webflow.InternalServerError} - * - * @example - * await client.forms.listSubmissionsBySite("580e63e98c9a982ac9b8b741", { - * elementId: "18259716-3e5a-646a-5f41-5dc4b9405aa0", - * offset: 1.1, - * limit: 1.1 - * }) - */ - public listSubmissionsBySite( - siteId: string, - request: Webflow.FormsListSubmissionsBySiteRequest = {}, - requestOptions?: Forms.RequestOptions, - ): core.HttpResponsePromise { - return core.HttpResponsePromise.fromPromise(this.__listSubmissionsBySite(siteId, request, requestOptions)); - } - - private async __listSubmissionsBySite( - siteId: string, - request: Webflow.FormsListSubmissionsBySiteRequest = {}, - requestOptions?: Forms.RequestOptions, - ): Promise> { - const { elementId, offset, limit } = request; - const _queryParams: Record = {}; - if (elementId != null) { - _queryParams["elementId"] = elementId; - } - - if (offset != null) { - _queryParams["offset"] = offset.toString(); - } - - if (limit != null) { - _queryParams["limit"] = limit.toString(); - } - - const _response = await core.fetcher({ - url: urlJoin( - (await core.Supplier.get(this._options.baseUrl)) ?? - ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi) - .base, - `sites/${encodeURIComponent(siteId)}/form_submissions`, - ), - method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), - requestOptions?.headers, - ), - queryParameters: _queryParams, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, - abortSignal: requestOptions?.abortSignal, - }); - if (_response.ok) { - return { - data: serializers.FormSubmissionList.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }), - rawResponse: _response.rawResponse, - }; - } - - if (_response.error.reason === "status-code") { - switch (_response.error.statusCode) { - case 400: - throw new Webflow.BadRequestError(_response.error.body, _response.rawResponse); - case 401: - throw new Webflow.UnauthorizedError( - serializers.Error_.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }), - _response.rawResponse, - ); - case 403: - throw new Webflow.ForbiddenError(_response.error.body, _response.rawResponse); - case 404: - throw new Webflow.NotFoundError( - serializers.Error_.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }), - _response.rawResponse, - ); - case 429: - throw new Webflow.TooManyRequestsError( - serializers.Error_.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }), - _response.rawResponse, - ); - case 500: - throw new Webflow.InternalServerError( - serializers.Error_.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }), - _response.rawResponse, - ); - default: - throw new errors.WebflowError({ - statusCode: _response.error.statusCode, - body: _response.error.body, - rawResponse: _response.rawResponse, - }); - } - } - - switch (_response.error.reason) { - case "non-json": - throw new errors.WebflowError({ - statusCode: _response.error.statusCode, - body: _response.error.rawBody, - rawResponse: _response.rawResponse, - }); - case "timeout": - throw new errors.WebflowTimeoutError( - "Timeout exceeded when calling GET /sites/{site_id}/form_submissions.", - ); - case "unknown": - throw new errors.WebflowError({ - message: _response.error.errorMessage, - rawResponse: _response.rawResponse, - }); - } - } - protected async _getAuthorizationHeader(): Promise { const bearer = await core.Supplier.get(this._options.accessToken); if (bearer != null) { diff --git a/src/api/resources/forms/client/requests/index.ts b/src/api/resources/forms/client/requests/index.ts index 44ba90b9..b3189128 100644 --- a/src/api/resources/forms/client/requests/index.ts +++ b/src/api/resources/forms/client/requests/index.ts @@ -1,4 +1,3 @@ export { type FormsListRequest } from "./FormsListRequest"; export { type FormsListSubmissionsRequest } from "./FormsListSubmissionsRequest"; export { type FormsUpdateSubmissionRequest } from "./FormsUpdateSubmissionRequest"; -export { type FormsListSubmissionsBySiteRequest } from "./FormsListSubmissionsBySiteRequest"; diff --git a/src/api/resources/sites/client/Client.ts b/src/api/resources/sites/client/Client.ts index ccbfcdc7..4d3407a1 100644 --- a/src/api/resources/sites/client/Client.ts +++ b/src/api/resources/sites/client/Client.ts @@ -16,6 +16,7 @@ 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"; +import { Forms } from "../resources/forms/client/Client"; export declare namespace Sites { export interface Options { @@ -51,6 +52,7 @@ export class Sites { protected _activityLogs: ActivityLogs | undefined; protected _comments: Comments | undefined; protected _scripts: Scripts | undefined; + protected _forms: Forms | undefined; constructor(_options: Sites.Options = {}) { this._options = _options; @@ -84,6 +86,10 @@ export class Sites { return (this._scripts ??= new Scripts(this._options)); } + public get forms(): Forms { + return (this._forms ??= new Forms(this._options)); + } + /** * Create a site. * diff --git a/src/api/resources/sites/resources/forms/client/Client.ts b/src/api/resources/sites/resources/forms/client/Client.ts new file mode 100644 index 00000000..9ea368a5 --- /dev/null +++ b/src/api/resources/sites/resources/forms/client/Client.ts @@ -0,0 +1,805 @@ +/** + * 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 { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../../../core/headers.js"; +import urlJoin from "url-join"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; + +export declare namespace Forms { + export interface Options { + environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; + accessToken?: core.Supplier; + /** Additional headers to include in requests. */ + headers?: Record | undefined>; + } + + export 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 | undefined>; + } +} + +export class Forms { + protected readonly _options: Forms.Options; + + constructor(_options: Forms.Options = {}) { + this._options = _options; + } + + /** + * List form submissions for a given site. This endpoint differs from the existing [List Form Submissions endpoint](/data/reference/forms/form-submissions/list-submissions) by accepting `siteId` as a path parameter and `elementId` as a query parameter. + * + * Add `elementId` when you want to filter form submissions to a specific form in a site. You can get the `elementId` from the [List forms endpoint](/data/reference/forms/forms/list) (displayed as `formElementId` in the response). + * + * + * When a form is used in a Webflow component definition, each instance of the component will yield a unique form. Adding the `elementId` in this request ensures this API response includes all submissions from that core form, wherever that form is used in instantiated components. + * + * + * + * + * Required scope | `forms:read` + * + * @param {string} siteId - Unique identifier for a Site + * @param {Webflow.sites.FormsListSubmissionsBySiteRequest} request + * @param {Forms.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Webflow.BadRequestError} + * @throws {@link Webflow.UnauthorizedError} + * @throws {@link Webflow.ForbiddenError} + * @throws {@link Webflow.NotFoundError} + * @throws {@link Webflow.TooManyRequestsError} + * @throws {@link Webflow.InternalServerError} + * + * @example + * await client.sites.forms.listSubmissionsBySite("580e63e98c9a982ac9b8b741", { + * elementId: "18259716-3e5a-646a-5f41-5dc4b9405aa0", + * offset: 1.1, + * limit: 1.1 + * }) + */ + public listSubmissionsBySite( + siteId: string, + request: Webflow.sites.FormsListSubmissionsBySiteRequest = {}, + requestOptions?: Forms.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__listSubmissionsBySite(siteId, request, requestOptions)); + } + + private async __listSubmissionsBySite( + siteId: string, + request: Webflow.sites.FormsListSubmissionsBySiteRequest = {}, + requestOptions?: Forms.RequestOptions, + ): Promise> { + const { elementId, offset, limit } = request; + const _queryParams: Record = {}; + if (elementId != null) { + _queryParams["elementId"] = elementId; + } + + if (offset != null) { + _queryParams["offset"] = offset.toString(); + } + + if (limit != null) { + _queryParams["limit"] = limit.toString(); + } + + const _response = await core.fetcher({ + url: urlJoin( + (await core.Supplier.get(this._options.baseUrl)) ?? + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi) + .base, + `sites/${encodeURIComponent(siteId)}/form_submissions`, + ), + method: "GET", + headers: mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + requestOptions?.headers, + ), + queryParameters: _queryParams, + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return { + data: serializers.FormSubmissionList.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 400: + throw new Webflow.BadRequestError(_response.error.body, _response.rawResponse); + case 401: + throw new Webflow.UnauthorizedError( + serializers.Error_.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + _response.rawResponse, + ); + case 403: + throw new Webflow.ForbiddenError(_response.error.body, _response.rawResponse); + case 404: + throw new Webflow.NotFoundError( + serializers.Error_.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + _response.rawResponse, + ); + case 429: + throw new Webflow.TooManyRequestsError( + serializers.Error_.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + _response.rawResponse, + ); + case 500: + throw new Webflow.InternalServerError( + serializers.Error_.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + _response.rawResponse, + ); + default: + throw new errors.WebflowError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + rawResponse: _response.rawResponse, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.WebflowError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + rawResponse: _response.rawResponse, + }); + case "timeout": + throw new errors.WebflowTimeoutError( + "Timeout exceeded when calling GET /sites/{site_id}/form_submissions.", + ); + case "unknown": + throw new errors.WebflowError({ + message: _response.error.errorMessage, + rawResponse: _response.rawResponse, + }); + } + } + + /** + * List form submissions for a given form within a specific site. + * + * Required scope | `forms:read` + * + * @param {string} siteId - Unique identifier for a Site + * @param {string} formId - Unique identifier for a Form + * @param {Webflow.sites.FormsListSubmissionsByFormAndSiteRequest} request + * @param {Forms.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Webflow.BadRequestError} + * @throws {@link Webflow.UnauthorizedError} + * @throws {@link Webflow.ForbiddenError} + * @throws {@link Webflow.NotFoundError} + * @throws {@link Webflow.TooManyRequestsError} + * @throws {@link Webflow.InternalServerError} + * + * @example + * await client.sites.forms.listSubmissionsByFormAndSite("580e63e98c9a982ac9b8b741", "580e63e98c9a982ac9b8b741", { + * offset: 1.1, + * limit: 1.1 + * }) + */ + public listSubmissionsByFormAndSite( + siteId: string, + formId: string, + request: Webflow.sites.FormsListSubmissionsByFormAndSiteRequest = {}, + requestOptions?: Forms.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise( + this.__listSubmissionsByFormAndSite(siteId, formId, request, requestOptions), + ); + } + + private async __listSubmissionsByFormAndSite( + siteId: string, + formId: string, + request: Webflow.sites.FormsListSubmissionsByFormAndSiteRequest = {}, + requestOptions?: Forms.RequestOptions, + ): Promise> { + const { offset, limit } = request; + const _queryParams: Record = {}; + if (offset != null) { + _queryParams["offset"] = offset.toString(); + } + + if (limit != null) { + _queryParams["limit"] = limit.toString(); + } + + const _response = await core.fetcher({ + url: urlJoin( + (await core.Supplier.get(this._options.baseUrl)) ?? + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi) + .base, + `sites/${encodeURIComponent(siteId)}/forms/${encodeURIComponent(formId)}/submissions`, + ), + method: "GET", + headers: mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + requestOptions?.headers, + ), + queryParameters: _queryParams, + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return { + data: serializers.FormSubmissionList.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 400: + throw new Webflow.BadRequestError(_response.error.body, _response.rawResponse); + case 401: + throw new Webflow.UnauthorizedError( + serializers.Error_.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + _response.rawResponse, + ); + case 403: + throw new Webflow.ForbiddenError(_response.error.body, _response.rawResponse); + case 404: + throw new Webflow.NotFoundError( + serializers.Error_.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + _response.rawResponse, + ); + case 429: + throw new Webflow.TooManyRequestsError( + serializers.Error_.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + _response.rawResponse, + ); + case 500: + throw new Webflow.InternalServerError( + serializers.Error_.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + _response.rawResponse, + ); + default: + throw new errors.WebflowError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + rawResponse: _response.rawResponse, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.WebflowError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + rawResponse: _response.rawResponse, + }); + case "timeout": + throw new errors.WebflowTimeoutError( + "Timeout exceeded when calling GET /sites/{site_id}/forms/{form_id}/submissions.", + ); + case "unknown": + throw new errors.WebflowError({ + message: _response.error.errorMessage, + rawResponse: _response.rawResponse, + }); + } + } + + /** + * Get information about a form submission within a specific site. + * + * Required scope | `forms:read` + * + * @param {string} siteId - Unique identifier for a Site + * @param {string} formSubmissionId - Unique identifier for a Form Submission + * @param {Forms.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Webflow.BadRequestError} + * @throws {@link Webflow.UnauthorizedError} + * @throws {@link Webflow.ForbiddenError} + * @throws {@link Webflow.NotFoundError} + * @throws {@link Webflow.TooManyRequestsError} + * @throws {@link Webflow.InternalServerError} + * + * @example + * await client.sites.forms.getSubmission("580e63e98c9a982ac9b8b741", "580e63e98c9a982ac9b8b741") + */ + public getSubmission( + siteId: string, + formSubmissionId: string, + requestOptions?: Forms.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__getSubmission(siteId, formSubmissionId, requestOptions)); + } + + private async __getSubmission( + siteId: string, + formSubmissionId: string, + requestOptions?: Forms.RequestOptions, + ): Promise> { + const _response = await core.fetcher({ + url: urlJoin( + (await core.Supplier.get(this._options.baseUrl)) ?? + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi) + .base, + `sites/${encodeURIComponent(siteId)}/form_submissions/${encodeURIComponent(formSubmissionId)}`, + ), + method: "GET", + headers: mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + requestOptions?.headers, + ), + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return { + data: serializers.FormSubmission.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 400: + throw new Webflow.BadRequestError(_response.error.body, _response.rawResponse); + case 401: + throw new Webflow.UnauthorizedError( + serializers.Error_.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + _response.rawResponse, + ); + case 403: + throw new Webflow.ForbiddenError(_response.error.body, _response.rawResponse); + case 404: + throw new Webflow.NotFoundError( + serializers.Error_.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + _response.rawResponse, + ); + case 429: + throw new Webflow.TooManyRequestsError( + serializers.Error_.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + _response.rawResponse, + ); + case 500: + throw new Webflow.InternalServerError( + serializers.Error_.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + _response.rawResponse, + ); + default: + throw new errors.WebflowError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + rawResponse: _response.rawResponse, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.WebflowError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + rawResponse: _response.rawResponse, + }); + case "timeout": + throw new errors.WebflowTimeoutError( + "Timeout exceeded when calling GET /sites/{site_id}/form_submissions/{form_submission_id}.", + ); + case "unknown": + throw new errors.WebflowError({ + message: _response.error.errorMessage, + rawResponse: _response.rawResponse, + }); + } + } + + /** + * Delete a form submission within a specific site. + * + * Required scope | `forms:write` + * + * @param {string} siteId - Unique identifier for a Site + * @param {string} formSubmissionId - Unique identifier for a Form Submission + * @param {Forms.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Webflow.BadRequestError} + * @throws {@link Webflow.UnauthorizedError} + * @throws {@link Webflow.ForbiddenError} + * @throws {@link Webflow.NotFoundError} + * @throws {@link Webflow.ConflictError} + * @throws {@link Webflow.TooManyRequestsError} + * @throws {@link Webflow.InternalServerError} + * + * @example + * await client.sites.forms.deleteSubmission("580e63e98c9a982ac9b8b741", "580e63e98c9a982ac9b8b741") + */ + public deleteSubmission( + siteId: string, + formSubmissionId: string, + requestOptions?: Forms.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__deleteSubmission(siteId, formSubmissionId, requestOptions)); + } + + private async __deleteSubmission( + siteId: string, + formSubmissionId: string, + requestOptions?: Forms.RequestOptions, + ): Promise> { + const _response = await core.fetcher({ + url: urlJoin( + (await core.Supplier.get(this._options.baseUrl)) ?? + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi) + .base, + `sites/${encodeURIComponent(siteId)}/form_submissions/${encodeURIComponent(formSubmissionId)}`, + ), + method: "DELETE", + headers: mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + requestOptions?.headers, + ), + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return { data: undefined, rawResponse: _response.rawResponse }; + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 400: + throw new Webflow.BadRequestError(_response.error.body, _response.rawResponse); + case 401: + throw new Webflow.UnauthorizedError( + serializers.Error_.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + _response.rawResponse, + ); + case 403: + throw new Webflow.ForbiddenError(_response.error.body, _response.rawResponse); + case 404: + throw new Webflow.NotFoundError( + serializers.Error_.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + _response.rawResponse, + ); + case 409: + throw new Webflow.ConflictError(_response.error.body, _response.rawResponse); + case 429: + throw new Webflow.TooManyRequestsError( + serializers.Error_.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + _response.rawResponse, + ); + case 500: + throw new Webflow.InternalServerError( + serializers.Error_.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + _response.rawResponse, + ); + default: + throw new errors.WebflowError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + rawResponse: _response.rawResponse, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.WebflowError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + rawResponse: _response.rawResponse, + }); + case "timeout": + throw new errors.WebflowTimeoutError( + "Timeout exceeded when calling DELETE /sites/{site_id}/form_submissions/{form_submission_id}.", + ); + case "unknown": + throw new errors.WebflowError({ + message: _response.error.errorMessage, + rawResponse: _response.rawResponse, + }); + } + } + + /** + * Update hidden fields on a form submission within a specific site. + * + * Required scope | `forms:write` + * + * @param {string} siteId - Unique identifier for a Site + * @param {string} formSubmissionId - Unique identifier for a Form Submission + * @param {Webflow.sites.FormsUpdateSubmissionRequest} request + * @param {Forms.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Webflow.BadRequestError} + * @throws {@link Webflow.UnauthorizedError} + * @throws {@link Webflow.ForbiddenError} + * @throws {@link Webflow.NotFoundError} + * @throws {@link Webflow.ConflictError} + * @throws {@link Webflow.TooManyRequestsError} + * @throws {@link Webflow.InternalServerError} + * + * @example + * await client.sites.forms.updateSubmission("580e63e98c9a982ac9b8b741", "580e63e98c9a982ac9b8b741") + */ + public updateSubmission( + siteId: string, + formSubmissionId: string, + request: Webflow.sites.FormsUpdateSubmissionRequest = {}, + requestOptions?: Forms.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise( + this.__updateSubmission(siteId, formSubmissionId, request, requestOptions), + ); + } + + private async __updateSubmission( + siteId: string, + formSubmissionId: string, + request: Webflow.sites.FormsUpdateSubmissionRequest = {}, + requestOptions?: Forms.RequestOptions, + ): Promise> { + const _response = await core.fetcher({ + url: urlJoin( + (await core.Supplier.get(this._options.baseUrl)) ?? + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi) + .base, + `sites/${encodeURIComponent(siteId)}/form_submissions/${encodeURIComponent(formSubmissionId)}`, + ), + method: "PATCH", + headers: mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + requestOptions?.headers, + ), + contentType: "application/json", + requestType: "json", + body: serializers.sites.FormsUpdateSubmissionRequest.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 { + data: serializers.FormSubmission.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 400: + throw new Webflow.BadRequestError(_response.error.body, _response.rawResponse); + case 401: + throw new Webflow.UnauthorizedError( + serializers.Error_.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + _response.rawResponse, + ); + case 403: + throw new Webflow.ForbiddenError(_response.error.body, _response.rawResponse); + case 404: + throw new Webflow.NotFoundError( + serializers.Error_.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + _response.rawResponse, + ); + case 409: + throw new Webflow.ConflictError(_response.error.body, _response.rawResponse); + case 429: + throw new Webflow.TooManyRequestsError( + serializers.Error_.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + _response.rawResponse, + ); + case 500: + throw new Webflow.InternalServerError( + serializers.Error_.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + _response.rawResponse, + ); + default: + throw new errors.WebflowError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + rawResponse: _response.rawResponse, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.WebflowError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + rawResponse: _response.rawResponse, + }); + case "timeout": + throw new errors.WebflowTimeoutError( + "Timeout exceeded when calling PATCH /sites/{site_id}/form_submissions/{form_submission_id}.", + ); + case "unknown": + throw new errors.WebflowError({ + message: _response.error.errorMessage, + rawResponse: _response.rawResponse, + }); + } + } + + protected async _getAuthorizationHeader(): Promise { + const bearer = await core.Supplier.get(this._options.accessToken); + if (bearer != null) { + return `Bearer ${bearer}`; + } + + return undefined; + } +} diff --git a/src/api/resources/sites/resources/forms/client/index.ts b/src/api/resources/sites/resources/forms/client/index.ts new file mode 100644 index 00000000..f33205a0 --- /dev/null +++ b/src/api/resources/sites/resources/forms/client/index.ts @@ -0,0 +1,2 @@ +export {}; +export * from "./requests"; diff --git a/src/api/resources/sites/resources/forms/client/requests/FormsListSubmissionsByFormAndSiteRequest.ts b/src/api/resources/sites/resources/forms/client/requests/FormsListSubmissionsByFormAndSiteRequest.ts new file mode 100644 index 00000000..a411a145 --- /dev/null +++ b/src/api/resources/sites/resources/forms/client/requests/FormsListSubmissionsByFormAndSiteRequest.ts @@ -0,0 +1,21 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * @example + * { + * offset: 1.1, + * limit: 1.1 + * } + */ +export interface FormsListSubmissionsByFormAndSiteRequest { + /** + * 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; +} diff --git a/src/api/resources/forms/client/requests/FormsListSubmissionsBySiteRequest.ts b/src/api/resources/sites/resources/forms/client/requests/FormsListSubmissionsBySiteRequest.ts similarity index 100% rename from src/api/resources/forms/client/requests/FormsListSubmissionsBySiteRequest.ts rename to src/api/resources/sites/resources/forms/client/requests/FormsListSubmissionsBySiteRequest.ts diff --git a/src/api/resources/sites/resources/forms/client/requests/FormsUpdateSubmissionRequest.ts b/src/api/resources/sites/resources/forms/client/requests/FormsUpdateSubmissionRequest.ts new file mode 100644 index 00000000..d0c8dfb4 --- /dev/null +++ b/src/api/resources/sites/resources/forms/client/requests/FormsUpdateSubmissionRequest.ts @@ -0,0 +1,12 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * @example + * {} + */ +export interface FormsUpdateSubmissionRequest { + /** An existing **hidden field** defined on the form schema, and the corresponding value to set */ + formSubmissionData?: Record; +} diff --git a/src/api/resources/sites/resources/forms/client/requests/index.ts b/src/api/resources/sites/resources/forms/client/requests/index.ts new file mode 100644 index 00000000..78230a13 --- /dev/null +++ b/src/api/resources/sites/resources/forms/client/requests/index.ts @@ -0,0 +1,3 @@ +export { type FormsListSubmissionsBySiteRequest } from "./FormsListSubmissionsBySiteRequest"; +export { type FormsListSubmissionsByFormAndSiteRequest } from "./FormsListSubmissionsByFormAndSiteRequest"; +export { type FormsUpdateSubmissionRequest } from "./FormsUpdateSubmissionRequest"; diff --git a/src/api/resources/sites/resources/forms/index.ts b/src/api/resources/sites/resources/forms/index.ts new file mode 100644 index 00000000..5ec76921 --- /dev/null +++ b/src/api/resources/sites/resources/forms/index.ts @@ -0,0 +1 @@ +export * from "./client"; diff --git a/src/api/resources/sites/resources/index.ts b/src/api/resources/sites/resources/index.ts index e0f7c245..ae08c39f 100644 --- a/src/api/resources/sites/resources/index.ts +++ b/src/api/resources/sites/resources/index.ts @@ -7,7 +7,9 @@ export * as plans from "./plans"; export * as robotsTxt from "./robotsTxt"; export * as activityLogs from "./activityLogs"; export * as scripts from "./scripts"; +export * as forms from "./forms"; export * from "./wellKnown/client/requests"; export * from "./activityLogs/client/requests"; export * from "./comments/client/requests"; export * from "./scripts/client/requests"; +export * from "./forms/client/requests"; diff --git a/src/serialization/resources/sites/resources/forms/client/index.ts b/src/serialization/resources/sites/resources/forms/client/index.ts new file mode 100644 index 00000000..415726b7 --- /dev/null +++ b/src/serialization/resources/sites/resources/forms/client/index.ts @@ -0,0 +1 @@ +export * from "./requests"; diff --git a/src/serialization/resources/sites/resources/forms/client/requests/FormsUpdateSubmissionRequest.ts b/src/serialization/resources/sites/resources/forms/client/requests/FormsUpdateSubmissionRequest.ts new file mode 100644 index 00000000..d2975c47 --- /dev/null +++ b/src/serialization/resources/sites/resources/forms/client/requests/FormsUpdateSubmissionRequest.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 FormsUpdateSubmissionRequest: core.serialization.Schema< + serializers.sites.FormsUpdateSubmissionRequest.Raw, + Webflow.sites.FormsUpdateSubmissionRequest +> = core.serialization.object({ + formSubmissionData: core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), +}); + +export declare namespace FormsUpdateSubmissionRequest { + export interface Raw { + formSubmissionData?: Record | null; + } +} diff --git a/src/serialization/resources/sites/resources/forms/client/requests/index.ts b/src/serialization/resources/sites/resources/forms/client/requests/index.ts new file mode 100644 index 00000000..71e69650 --- /dev/null +++ b/src/serialization/resources/sites/resources/forms/client/requests/index.ts @@ -0,0 +1 @@ +export { FormsUpdateSubmissionRequest } from "./FormsUpdateSubmissionRequest"; diff --git a/src/serialization/resources/sites/resources/forms/index.ts b/src/serialization/resources/sites/resources/forms/index.ts new file mode 100644 index 00000000..5ec76921 --- /dev/null +++ b/src/serialization/resources/sites/resources/forms/index.ts @@ -0,0 +1 @@ +export * from "./client"; diff --git a/src/serialization/resources/sites/resources/index.ts b/src/serialization/resources/sites/resources/index.ts index 134f72ad..6feaa6ba 100644 --- a/src/serialization/resources/sites/resources/index.ts +++ b/src/serialization/resources/sites/resources/index.ts @@ -3,3 +3,5 @@ export * from "./wellKnown/types"; export * as comments from "./comments"; export * from "./comments/types"; export * from "./wellKnown/client/requests"; +export * as forms from "./forms"; +export * from "./forms/client/requests"; diff --git a/src/version.ts b/src/version.ts index 926e51f1..7d5c832f 100644 --- a/src/version.ts +++ b/src/version.ts @@ -1 +1 @@ -export const SDK_VERSION = "3.2.1"; +export const SDK_VERSION = "3.2.2"; diff --git a/tests/wire/assets.test.ts b/tests/wire/assets.test.ts index bdcc5980..09550c88 100644 --- a/tests/wire/assets.test.ts +++ b/tests/wire/assets.test.ts @@ -249,6 +249,7 @@ describe("Assets", () => { width: 500, height: 900, quality: 100, + error: "error", }, ], altText: "A single candy wrapper", @@ -283,6 +284,7 @@ describe("Assets", () => { width: 500, height: 900, quality: 100, + error: "error", }, ], altText: "A single candy wrapper", @@ -330,6 +332,7 @@ describe("Assets", () => { width: 500, height: 900, quality: 100, + error: "error", }, ], altText: "A single candy wrapper", @@ -365,6 +368,7 @@ describe("Assets", () => { width: 500, height: 900, quality: 100, + error: "error", }, ], altText: "A single candy wrapper", @@ -383,6 +387,7 @@ describe("Assets", () => { { id: "6390c49774a71f0e3c1a08ee", displayName: "emoji icons", + parentFolder: "6390c49774a71f99f21a08eb", assets: ["63e5889e7fe4eafa7384cea4", "659595234426a9fcbad57043"], siteId: "6390c49674a71f84b51a08d8", createdOn: "2018-10-14T21:55:49Z", @@ -405,6 +410,7 @@ describe("Assets", () => { { id: "6390c49774a71f0e3c1a08ee", displayName: "emoji icons", + parentFolder: "6390c49774a71f99f21a08eb", assets: ["63e5889e7fe4eafa7384cea4", "659595234426a9fcbad57043"], siteId: "6390c49674a71f84b51a08d8", createdOn: new Date("2018-10-14T21:55:49.000Z"), diff --git a/tests/wire/collections.test.ts b/tests/wire/collections.test.ts index e5f88e65..20c4f5ab 100644 --- a/tests/wire/collections.test.ts +++ b/tests/wire/collections.test.ts @@ -368,6 +368,7 @@ describe("Collections", () => { type: "File", slug: "guide-file", displayName: "Guide File", + helpText: "helpText", }, { id: "7f8e9d0c1b2a3f4e5d6c8b9e", @@ -376,6 +377,7 @@ describe("Collections", () => { type: "Email", slug: "contributor-email", displayName: "Contributor Email", + helpText: "helpText", }, { id: "3a4f5e6d7c8b9a0e1d2c4b5f", @@ -384,6 +386,7 @@ describe("Collections", () => { type: "Phone", slug: "emergency-contact", displayName: "Emergency Contact", + helpText: "helpText", }, ], }; @@ -537,6 +540,7 @@ describe("Collections", () => { type: "File", slug: "guide-file", displayName: "Guide File", + helpText: "helpText", }, { id: "7f8e9d0c1b2a3f4e5d6c8b9e", @@ -545,6 +549,7 @@ describe("Collections", () => { type: "Email", slug: "contributor-email", displayName: "Contributor Email", + helpText: "helpText", }, { id: "3a4f5e6d7c8b9a0e1d2c4b5f", @@ -553,6 +558,7 @@ describe("Collections", () => { type: "Phone", slug: "emergency-contact", displayName: "Emergency Contact", + helpText: "helpText", }, ], }); diff --git a/tests/wire/components.test.ts b/tests/wire/components.test.ts index 91326143..8a669b4e 100644 --- a/tests/wire/components.test.ts +++ b/tests/wire/components.test.ts @@ -29,8 +29,20 @@ describe("Components", () => { description: "A secondary button component that can be used across the site", readonly: true, }, - { id: "6258612d1ee792848f805dcf", name: "Card", readonly: true }, - { id: "68a2b1d1ee792848f805dcf", name: "Nav", readonly: true }, + { + id: "6258612d1ee792848f805dcf", + name: "Card", + group: "Buttons", + description: "A button component that can be used across the site", + readonly: true, + }, + { + id: "68a2b1d1ee792848f805dcf", + name: "Nav", + group: "Buttons", + description: "A button component that can be used across the site", + readonly: true, + }, ], pagination: { limit: 20, offset: 0, total: 4 }, }; @@ -66,11 +78,15 @@ describe("Components", () => { { id: "6258612d1ee792848f805dcf", name: "Card", + group: "Buttons", + description: "A button component that can be used across the site", readonly: true, }, { id: "68a2b1d1ee792848f805dcf", name: "Nav", + group: "Buttons", + description: "A button component that can be used across the site", readonly: true, }, ], diff --git a/tests/wire/forms.test.ts b/tests/wire/forms.test.ts index cb203a6d..2b832eed 100644 --- a/tests/wire/forms.test.ts +++ b/tests/wire/forms.test.ts @@ -20,12 +20,13 @@ describe("Forms", () => { createdOn: "2016-10-24T19:41:29Z", lastUpdated: "2016-10-24T19:43:17Z", fields: { - "0": { displayName: "Email", userVisible: true }, - "1": { displayName: "Email", userVisible: true }, + "0": { displayName: "Email", placeholder: "Enter your email", userVisible: true }, + "1": { displayName: "Email", placeholder: "Enter your email", userVisible: true }, }, responseSettings: { redirectUrl: "https://example.com", redirectMethod: "GET", + redirectAction: "POST https://example.com", sendEmailConfirmation: true, }, id: "589a331aa51e760df7ccb89e", @@ -40,10 +41,11 @@ describe("Forms", () => { displayName: "Name Form", createdOn: "2016-10-24T19:41:29Z", lastUpdated: "2016-10-24T19:43:17Z", - fields: { "0": { displayName: "Email", userVisible: true } }, + fields: { "0": { displayName: "Email", placeholder: "Enter your email", userVisible: true } }, responseSettings: { redirectUrl: "https://example.com", redirectMethod: "GET", + redirectAction: "POST https://example.com", sendEmailConfirmation: false, }, id: "580ff8d7ba3e45ba9fe588e9", @@ -78,16 +80,19 @@ describe("Forms", () => { fields: { "0": { displayName: "Email", + placeholder: "Enter your email", userVisible: true, }, "1": { displayName: "Email", + placeholder: "Enter your email", userVisible: true, }, }, responseSettings: { redirectUrl: "https://example.com", redirectMethod: "GET", + redirectAction: "POST https://example.com", sendEmailConfirmation: true, }, id: "589a331aa51e760df7ccb89e", @@ -105,12 +110,14 @@ describe("Forms", () => { fields: { "0": { displayName: "Email", + placeholder: "Enter your email", userVisible: true, }, }, responseSettings: { redirectUrl: "https://example.com", redirectMethod: "GET", + redirectAction: "POST https://example.com", sendEmailConfirmation: false, }, id: "580ff8d7ba3e45ba9fe588e9", @@ -142,7 +149,12 @@ describe("Forms", () => { createdOn: "2016-10-24T19:41:29Z", lastUpdated: "2016-10-24T19:43:17Z", fields: { - "660d5bcc9c0772150459dfb1": { displayName: "Name", type: "Plain", userVisible: true }, + "660d5bcc9c0772150459dfb1": { + displayName: "Name", + type: "Plain", + placeholder: "Enter your email", + userVisible: true, + }, "589a331aa51e760df7ccb89d": { displayName: "Email", type: "Email", @@ -153,6 +165,7 @@ describe("Forms", () => { responseSettings: { redirectUrl: "https://example.com", redirectMethod: "GET", + redirectAction: "POST https://example.com", sendEmailConfirmation: true, }, id: "589a331aa51e760df7ccb89e", @@ -180,6 +193,7 @@ describe("Forms", () => { "660d5bcc9c0772150459dfb1": { displayName: "Name", type: "Plain", + placeholder: "Enter your email", userVisible: true, }, "589a331aa51e760df7ccb89d": { @@ -192,6 +206,7 @@ describe("Forms", () => { responseSettings: { redirectUrl: "https://example.com", redirectMethod: "GET", + redirectAction: "POST https://example.com", sendEmailConfirmation: true, }, id: "589a331aa51e760df7ccb89e", @@ -369,78 +384,4 @@ describe("Forms", () => { }, }); }); - - test("list-submissions-by-site", async () => { - const server = mockServerPool.createServer(); - const client = new WebflowClient({ - accessToken: "test", - environment: { base: server.baseUrl, dataApi: server.baseUrl, contentDeliveryApi: server.baseUrl }, - }); - - const rawResponseBody = { - formSubmissions: [ - { - id: "6321ca84df3949bfc6752327", - displayName: "Sample Form", - siteId: "62749158efef318abc8d5a0f", - workspaceId: "62749158efef318abc8d5a0f", - dateSubmitted: "2022-09-14T12:35:16Z", - formResponse: { "First Name": "Arthur", "Last Name": "Dent" }, - }, - { - id: "660d64fabf6e0a0d4edab981", - displayName: "Sample Form", - siteId: "62749158efef318abc8d5a0f", - workspaceId: "62749158efef318abc8d5a0f", - dateSubmitted: "2022-09-14T12:35:16Z", - formResponse: { "First Name": "Ford", "Last Name": "Prefect" }, - }, - ], - pagination: { limit: 25, offset: 0, total: 2 }, - }; - server - .mockEndpoint() - .get("/sites/580e63e98c9a982ac9b8b741/form_submissions") - .respondWith() - .statusCode(200) - .jsonBody(rawResponseBody) - .build(); - - const response = await client.forms.listSubmissionsBySite("580e63e98c9a982ac9b8b741", { - elementId: "18259716-3e5a-646a-5f41-5dc4b9405aa0", - offset: 1.1, - limit: 1.1, - }); - expect(response).toEqual({ - formSubmissions: [ - { - id: "6321ca84df3949bfc6752327", - displayName: "Sample Form", - siteId: "62749158efef318abc8d5a0f", - workspaceId: "62749158efef318abc8d5a0f", - dateSubmitted: new Date("2022-09-14T12:35:16.000Z"), - formResponse: { - "First Name": "Arthur", - "Last Name": "Dent", - }, - }, - { - id: "660d64fabf6e0a0d4edab981", - displayName: "Sample Form", - siteId: "62749158efef318abc8d5a0f", - workspaceId: "62749158efef318abc8d5a0f", - dateSubmitted: new Date("2022-09-14T12:35:16.000Z"), - formResponse: { - "First Name": "Ford", - "Last Name": "Prefect", - }, - }, - ], - pagination: { - limit: 25, - offset: 0, - total: 2, - }, - }); - }); }); diff --git a/tests/wire/orders.test.ts b/tests/wire/orders.test.ts index e21f8ddc..419d2e51 100644 --- a/tests/wire/orders.test.ts +++ b/tests/wire/orders.test.ts @@ -22,6 +22,11 @@ describe("Orders", () => { "Customer requested gift wrapping and a personalized note saying: Happy Birthday, Ford! 🎉 Please ensure the item is packed with extra bubble wrap for safe transit.", orderComment: 'Please gift wrap with a personal note saying "Happy Birthday, Ford! 🎉', acceptedOn: "2024-04-10T13:16:21Z", + fulfilledOn: "2018-12-03T22:06:15Z", + refundedOn: "2018-12-03T22:06:15Z", + disputedOn: "2018-12-03T22:06:15Z", + disputeUpdatedOn: "2018-12-03T22:06:15Z", + disputeLastStatus: "warning_needs_response", customerPaid: { unit: "USD", value: "5892", string: "$ 211.55 USD" }, netAmount: { unit: "USD", value: "5892", string: "$ 200.89 USD" }, applicationFee: { unit: "USD", value: "5892", string: "$ 4.23 USD" }, @@ -106,6 +111,7 @@ describe("Orders", () => { url: "https://dev-assets.website-files.com/66072f39417a2a35b2589cc7/66072fb51b89448912e26729_image16.jpeg", }, variantPrice: { unit: "USD", value: "5892", string: "$ 83.09 USD" }, + weight: 5, width: 19, height: 72, length: 18, @@ -113,10 +119,12 @@ describe("Orders", () => { ], purchasedItemsCount: 3, stripeDetails: { + subscriptionId: "sub_1J6xwG2eZvKYlo2CXu9Zt0Tn", paymentMethod: "pm_1P410gJYFi4lcbXWbeKghqjK", paymentIntentId: "pi_3P410iJYFi4lcbXW0EKKgcVg", customerId: "cus_Ptod8KJBiiPgnH", chargeId: "ch_3P410iJYFi4lcbXW0DxUkzCH", + refundReason: "requested_by_customer", }, stripeCard: { last4: "4242", @@ -124,6 +132,14 @@ describe("Orders", () => { ownerName: "Arthur Dent", expires: { year: 2025, month: 4 }, }, + paypalDetails: { + orderId: "1a2b3c4d5e6f7g8h9i0j", + payerId: "9k8j7i6h5g4f3e2d1c0b", + captureId: "qwe123rty456uio789p", + refundId: "abcde12345fghij67890", + refundReason: "Customer requested refund", + disputeId: "zxcvbnm987poiuytrewq", + }, customData: [{ key: "value" }], metadata: { isBuyNow: false }, isCustomerDeleted: false, @@ -154,7 +170,11 @@ describe("Orders", () => { comment: "Example comment to myself", orderComment: "", acceptedOn: "2024-03-29T21:29:21Z", + fulfilledOn: "2018-12-03T22:06:15Z", refundedOn: "2024-04-08T18:25:04Z", + disputedOn: "2018-12-03T22:06:15Z", + disputeUpdatedOn: "2018-12-03T22:06:15Z", + disputeLastStatus: "warning_needs_response", customerPaid: { unit: "USD", value: "5892", string: "$ 118.73 USD" }, netAmount: { unit: "USD", value: "5892", string: "$ 112.62 USD" }, applicationFee: { unit: "USD", value: "5892", string: "$ 2.37 USD" }, @@ -246,6 +266,7 @@ describe("Orders", () => { ], purchasedItemsCount: 2, stripeDetails: { + subscriptionId: "sub_1J6xwG2eZvKYlo2CXu9Zt0Tn", paymentMethod: "pm_1OzmzBJYFi4lcbXWHKNdXU7j", paymentIntentId: "pi_3OzmzDJYFi4lcbXW1hTBW6ft", customerId: "cus_PpRsNHwWdUoRKR", @@ -259,6 +280,14 @@ describe("Orders", () => { ownerName: "Arthur Dent", expires: { year: 2024, month: 4 }, }, + paypalDetails: { + orderId: "1a2b3c4d5e6f7g8h9i0j", + payerId: "9k8j7i6h5g4f3e2d1c0b", + captureId: "qwe123rty456uio789p", + refundId: "abcde12345fghij67890", + refundReason: "Customer requested refund", + disputeId: "zxcvbnm987poiuytrewq", + }, customData: [{ key: "value" }], metadata: { isBuyNow: false }, isCustomerDeleted: false, @@ -322,6 +351,11 @@ describe("Orders", () => { "Customer requested gift wrapping and a personalized note saying: Happy Birthday, Ford! \uD83C\uDF89 Please ensure the item is packed with extra bubble wrap for safe transit.", orderComment: 'Please gift wrap with a personal note saying "Happy Birthday, Ford! \uD83C\uDF89', acceptedOn: new Date("2024-04-10T13:16:21.000Z"), + fulfilledOn: new Date("2018-12-03T22:06:15.000Z"), + refundedOn: new Date("2018-12-03T22:06:15.000Z"), + disputedOn: new Date("2018-12-03T22:06:15.000Z"), + disputeUpdatedOn: new Date("2018-12-03T22:06:15.000Z"), + disputeLastStatus: "warning_needs_response", customerPaid: { unit: "USD", value: "5892", @@ -437,6 +471,7 @@ describe("Orders", () => { value: "5892", string: "$ 83.09 USD", }, + weight: 5, width: 19, height: 72, length: 18, @@ -444,10 +479,12 @@ describe("Orders", () => { ], purchasedItemsCount: 3, stripeDetails: { + subscriptionId: "sub_1J6xwG2eZvKYlo2CXu9Zt0Tn", paymentMethod: "pm_1P410gJYFi4lcbXWbeKghqjK", paymentIntentId: "pi_3P410iJYFi4lcbXW0EKKgcVg", customerId: "cus_Ptod8KJBiiPgnH", chargeId: "ch_3P410iJYFi4lcbXW0DxUkzCH", + refundReason: "requested_by_customer", }, stripeCard: { last4: "4242", @@ -458,6 +495,14 @@ describe("Orders", () => { month: 4, }, }, + paypalDetails: { + orderId: "1a2b3c4d5e6f7g8h9i0j", + payerId: "9k8j7i6h5g4f3e2d1c0b", + captureId: "qwe123rty456uio789p", + refundId: "abcde12345fghij67890", + refundReason: "Customer requested refund", + disputeId: "zxcvbnm987poiuytrewq", + }, customData: [ { key: "value", @@ -498,7 +543,11 @@ describe("Orders", () => { comment: "Example comment to myself", orderComment: "", acceptedOn: new Date("2024-03-29T21:29:21.000Z"), + fulfilledOn: new Date("2018-12-03T22:06:15.000Z"), refundedOn: new Date("2024-04-08T18:25:04.000Z"), + disputedOn: new Date("2018-12-03T22:06:15.000Z"), + disputeUpdatedOn: new Date("2018-12-03T22:06:15.000Z"), + disputeLastStatus: "warning_needs_response", customerPaid: { unit: "USD", value: "5892", @@ -621,6 +670,7 @@ describe("Orders", () => { ], purchasedItemsCount: 2, stripeDetails: { + subscriptionId: "sub_1J6xwG2eZvKYlo2CXu9Zt0Tn", paymentMethod: "pm_1OzmzBJYFi4lcbXWHKNdXU7j", paymentIntentId: "pi_3OzmzDJYFi4lcbXW1hTBW6ft", customerId: "cus_PpRsNHwWdUoRKR", @@ -637,6 +687,14 @@ describe("Orders", () => { month: 4, }, }, + paypalDetails: { + orderId: "1a2b3c4d5e6f7g8h9i0j", + payerId: "9k8j7i6h5g4f3e2d1c0b", + captureId: "qwe123rty456uio789p", + refundId: "abcde12345fghij67890", + refundReason: "Customer requested refund", + disputeId: "zxcvbnm987poiuytrewq", + }, customData: [ { key: "value", @@ -824,14 +882,24 @@ describe("Orders", () => { ], purchasedItemsCount: 2, stripeDetails: { + subscriptionId: "sub_1J6xwG2eZvKYlo2CXu9Zt0Tn", paymentMethod: "pm_1OzmzBJYFi4lcbXWHKNdXU7j", paymentIntentId: "pi_3OzmzDJYFi4lcbXW1hTBW6ft", customerId: "cus_PpRsNHwWdUoRKR", chargeId: "ch_3OzmzDJYFi4lcbXW1ndkkrH2", + disputeId: "disputeId", refundId: "re_3OzmzDJYFi4lcbXW1kFAmlBk", refundReason: "fraudulent", }, stripeCard: { last4: "4242", brand: "Visa", ownerName: "Arthur Dent", expires: { year: 2024, month: 4 } }, + paypalDetails: { + orderId: "1a2b3c4d5e6f7g8h9i0j", + payerId: "9k8j7i6h5g4f3e2d1c0b", + captureId: "qwe123rty456uio789p", + refundId: "abcde12345fghij67890", + refundReason: "Customer requested refund", + disputeId: "zxcvbnm987poiuytrewq", + }, customData: [{ key: "value" }], metadata: { isBuyNow: false }, isCustomerDeleted: false, @@ -1017,10 +1085,12 @@ describe("Orders", () => { ], purchasedItemsCount: 2, stripeDetails: { + subscriptionId: "sub_1J6xwG2eZvKYlo2CXu9Zt0Tn", paymentMethod: "pm_1OzmzBJYFi4lcbXWHKNdXU7j", paymentIntentId: "pi_3OzmzDJYFi4lcbXW1hTBW6ft", customerId: "cus_PpRsNHwWdUoRKR", chargeId: "ch_3OzmzDJYFi4lcbXW1ndkkrH2", + disputeId: "disputeId", refundId: "re_3OzmzDJYFi4lcbXW1kFAmlBk", refundReason: "fraudulent", }, @@ -1033,6 +1103,14 @@ describe("Orders", () => { month: 4, }, }, + paypalDetails: { + orderId: "1a2b3c4d5e6f7g8h9i0j", + payerId: "9k8j7i6h5g4f3e2d1c0b", + captureId: "qwe123rty456uio789p", + refundId: "abcde12345fghij67890", + refundReason: "Customer requested refund", + disputeId: "zxcvbnm987poiuytrewq", + }, customData: [ { key: "value", @@ -1213,14 +1291,24 @@ describe("Orders", () => { ], purchasedItemsCount: 2, stripeDetails: { + subscriptionId: "sub_1J6xwG2eZvKYlo2CXu9Zt0Tn", paymentMethod: "pm_1OzmzBJYFi4lcbXWHKNdXU7j", paymentIntentId: "pi_3OzmzDJYFi4lcbXW1hTBW6ft", customerId: "cus_PpRsNHwWdUoRKR", chargeId: "ch_3OzmzDJYFi4lcbXW1ndkkrH2", + disputeId: "disputeId", refundId: "re_3OzmzDJYFi4lcbXW1kFAmlBk", refundReason: "fraudulent", }, stripeCard: { last4: "4242", brand: "Visa", ownerName: "Arthur Dent", expires: { year: 2024, month: 4 } }, + paypalDetails: { + orderId: "1a2b3c4d5e6f7g8h9i0j", + payerId: "9k8j7i6h5g4f3e2d1c0b", + captureId: "qwe123rty456uio789p", + refundId: "abcde12345fghij67890", + refundReason: "Customer requested refund", + disputeId: "zxcvbnm987poiuytrewq", + }, customData: [{ key: "value" }], metadata: { isBuyNow: false }, isCustomerDeleted: false, @@ -1407,10 +1495,12 @@ describe("Orders", () => { ], purchasedItemsCount: 2, stripeDetails: { + subscriptionId: "sub_1J6xwG2eZvKYlo2CXu9Zt0Tn", paymentMethod: "pm_1OzmzBJYFi4lcbXWHKNdXU7j", paymentIntentId: "pi_3OzmzDJYFi4lcbXW1hTBW6ft", customerId: "cus_PpRsNHwWdUoRKR", chargeId: "ch_3OzmzDJYFi4lcbXW1ndkkrH2", + disputeId: "disputeId", refundId: "re_3OzmzDJYFi4lcbXW1kFAmlBk", refundReason: "fraudulent", }, @@ -1423,6 +1513,14 @@ describe("Orders", () => { month: 4, }, }, + paypalDetails: { + orderId: "1a2b3c4d5e6f7g8h9i0j", + payerId: "9k8j7i6h5g4f3e2d1c0b", + captureId: "qwe123rty456uio789p", + refundId: "abcde12345fghij67890", + refundReason: "Customer requested refund", + disputeId: "zxcvbnm987poiuytrewq", + }, customData: [ { key: "value", @@ -1603,14 +1701,24 @@ describe("Orders", () => { ], purchasedItemsCount: 2, stripeDetails: { + subscriptionId: "sub_1J6xwG2eZvKYlo2CXu9Zt0Tn", paymentMethod: "pm_1OzmzBJYFi4lcbXWHKNdXU7j", paymentIntentId: "pi_3OzmzDJYFi4lcbXW1hTBW6ft", customerId: "cus_PpRsNHwWdUoRKR", chargeId: "ch_3OzmzDJYFi4lcbXW1ndkkrH2", + disputeId: "disputeId", refundId: "re_3OzmzDJYFi4lcbXW1kFAmlBk", refundReason: "fraudulent", }, stripeCard: { last4: "4242", brand: "Visa", ownerName: "Arthur Dent", expires: { year: 2024, month: 4 } }, + paypalDetails: { + orderId: "1a2b3c4d5e6f7g8h9i0j", + payerId: "9k8j7i6h5g4f3e2d1c0b", + captureId: "qwe123rty456uio789p", + refundId: "abcde12345fghij67890", + refundReason: "Customer requested refund", + disputeId: "zxcvbnm987poiuytrewq", + }, customData: [{ key: "value" }], metadata: { isBuyNow: false }, isCustomerDeleted: false, @@ -1797,10 +1905,12 @@ describe("Orders", () => { ], purchasedItemsCount: 2, stripeDetails: { + subscriptionId: "sub_1J6xwG2eZvKYlo2CXu9Zt0Tn", paymentMethod: "pm_1OzmzBJYFi4lcbXWHKNdXU7j", paymentIntentId: "pi_3OzmzDJYFi4lcbXW1hTBW6ft", customerId: "cus_PpRsNHwWdUoRKR", chargeId: "ch_3OzmzDJYFi4lcbXW1ndkkrH2", + disputeId: "disputeId", refundId: "re_3OzmzDJYFi4lcbXW1kFAmlBk", refundReason: "fraudulent", }, @@ -1813,6 +1923,14 @@ describe("Orders", () => { month: 4, }, }, + paypalDetails: { + orderId: "1a2b3c4d5e6f7g8h9i0j", + payerId: "9k8j7i6h5g4f3e2d1c0b", + captureId: "qwe123rty456uio789p", + refundId: "abcde12345fghij67890", + refundReason: "Customer requested refund", + disputeId: "zxcvbnm987poiuytrewq", + }, customData: [ { key: "value", @@ -1993,14 +2111,24 @@ describe("Orders", () => { ], purchasedItemsCount: 2, stripeDetails: { + subscriptionId: "sub_1J6xwG2eZvKYlo2CXu9Zt0Tn", paymentMethod: "pm_1OzmzBJYFi4lcbXWHKNdXU7j", paymentIntentId: "pi_3OzmzDJYFi4lcbXW1hTBW6ft", customerId: "cus_PpRsNHwWdUoRKR", chargeId: "ch_3OzmzDJYFi4lcbXW1ndkkrH2", + disputeId: "disputeId", refundId: "re_3OzmzDJYFi4lcbXW1kFAmlBk", refundReason: "fraudulent", }, stripeCard: { last4: "4242", brand: "Visa", ownerName: "Arthur Dent", expires: { year: 2024, month: 4 } }, + paypalDetails: { + orderId: "1a2b3c4d5e6f7g8h9i0j", + payerId: "9k8j7i6h5g4f3e2d1c0b", + captureId: "qwe123rty456uio789p", + refundId: "abcde12345fghij67890", + refundReason: "Customer requested refund", + disputeId: "zxcvbnm987poiuytrewq", + }, customData: [{ key: "value" }], metadata: { isBuyNow: false }, isCustomerDeleted: false, @@ -2186,10 +2314,12 @@ describe("Orders", () => { ], purchasedItemsCount: 2, stripeDetails: { + subscriptionId: "sub_1J6xwG2eZvKYlo2CXu9Zt0Tn", paymentMethod: "pm_1OzmzBJYFi4lcbXWHKNdXU7j", paymentIntentId: "pi_3OzmzDJYFi4lcbXW1hTBW6ft", customerId: "cus_PpRsNHwWdUoRKR", chargeId: "ch_3OzmzDJYFi4lcbXW1ndkkrH2", + disputeId: "disputeId", refundId: "re_3OzmzDJYFi4lcbXW1kFAmlBk", refundReason: "fraudulent", }, @@ -2202,6 +2332,14 @@ describe("Orders", () => { month: 4, }, }, + paypalDetails: { + orderId: "1a2b3c4d5e6f7g8h9i0j", + payerId: "9k8j7i6h5g4f3e2d1c0b", + captureId: "qwe123rty456uio789p", + refundId: "abcde12345fghij67890", + refundReason: "Customer requested refund", + disputeId: "zxcvbnm987poiuytrewq", + }, customData: [ { key: "value", @@ -2382,14 +2520,24 @@ describe("Orders", () => { ], purchasedItemsCount: 2, stripeDetails: { + subscriptionId: "sub_1J6xwG2eZvKYlo2CXu9Zt0Tn", paymentMethod: "pm_1OzmzBJYFi4lcbXWHKNdXU7j", paymentIntentId: "pi_3OzmzDJYFi4lcbXW1hTBW6ft", customerId: "cus_PpRsNHwWdUoRKR", chargeId: "ch_3OzmzDJYFi4lcbXW1ndkkrH2", + disputeId: "disputeId", refundId: "re_3OzmzDJYFi4lcbXW1kFAmlBk", refundReason: "fraudulent", }, stripeCard: { last4: "4242", brand: "Visa", ownerName: "Arthur Dent", expires: { year: 2024, month: 4 } }, + paypalDetails: { + orderId: "1a2b3c4d5e6f7g8h9i0j", + payerId: "9k8j7i6h5g4f3e2d1c0b", + captureId: "qwe123rty456uio789p", + refundId: "abcde12345fghij67890", + refundReason: "Customer requested refund", + disputeId: "zxcvbnm987poiuytrewq", + }, customData: [{ key: "value" }], metadata: { isBuyNow: false }, isCustomerDeleted: false, @@ -2576,10 +2724,12 @@ describe("Orders", () => { ], purchasedItemsCount: 2, stripeDetails: { + subscriptionId: "sub_1J6xwG2eZvKYlo2CXu9Zt0Tn", paymentMethod: "pm_1OzmzBJYFi4lcbXWHKNdXU7j", paymentIntentId: "pi_3OzmzDJYFi4lcbXW1hTBW6ft", customerId: "cus_PpRsNHwWdUoRKR", chargeId: "ch_3OzmzDJYFi4lcbXW1ndkkrH2", + disputeId: "disputeId", refundId: "re_3OzmzDJYFi4lcbXW1kFAmlBk", refundReason: "fraudulent", }, @@ -2592,6 +2742,14 @@ describe("Orders", () => { month: 4, }, }, + paypalDetails: { + orderId: "1a2b3c4d5e6f7g8h9i0j", + payerId: "9k8j7i6h5g4f3e2d1c0b", + captureId: "qwe123rty456uio789p", + refundId: "abcde12345fghij67890", + refundReason: "Customer requested refund", + disputeId: "zxcvbnm987poiuytrewq", + }, customData: [ { key: "value", diff --git a/tests/wire/pages.test.ts b/tests/wire/pages.test.ts index 738c298c..17499f50 100644 --- a/tests/wire/pages.test.ts +++ b/tests/wire/pages.test.ts @@ -20,6 +20,8 @@ describe("Pages", () => { siteId: "6258612d1ee792848f805dcf", title: "Guide to the Galaxy", slug: "guide-to-the-galaxy", + parentId: "6419db964a9c435aa3af6251", + collectionId: "6390c49774a71f12831a08e3", createdOn: "2024-03-11T10:42:00Z", lastUpdated: "2024-03-11T10:42:42Z", archived: false, @@ -47,12 +49,15 @@ describe("Pages", () => { siteId: "6258612d1ee792848f805dcf", title: "Towel Day Celebrations", slug: "towel-day", + parentId: "6419db964a9c435aa3af6251", + collectionId: "6390c49774a71f12831a08e3", createdOn: "2024-05-25T09:00:00Z", lastUpdated: "2024-05-25T09:42:00Z", archived: false, draft: false, canBranch: true, isBranch: false, + branchId: "68026fa68ef6dc744c75b833", seo: { title: "Celebrate Towel Day - The Hitchhiker's Guide to the Galaxy", description: @@ -91,6 +96,8 @@ describe("Pages", () => { siteId: "6258612d1ee792848f805dcf", title: "Guide to the Galaxy", slug: "guide-to-the-galaxy", + parentId: "6419db964a9c435aa3af6251", + collectionId: "6390c49774a71f12831a08e3", createdOn: new Date("2024-03-11T10:42:00.000Z"), lastUpdated: new Date("2024-03-11T10:42:42.000Z"), archived: false, @@ -118,12 +125,15 @@ describe("Pages", () => { siteId: "6258612d1ee792848f805dcf", title: "Towel Day Celebrations", slug: "towel-day", + parentId: "6419db964a9c435aa3af6251", + collectionId: "6390c49774a71f12831a08e3", createdOn: new Date("2024-05-25T09:00:00.000Z"), lastUpdated: new Date("2024-05-25T09:42:00.000Z"), archived: false, draft: false, canBranch: true, isBranch: false, + branchId: "68026fa68ef6dc744c75b833", seo: { title: "Celebrate Towel Day - The Hitchhiker's Guide to the Galaxy", description: @@ -160,6 +170,8 @@ describe("Pages", () => { siteId: "6258612d1ee792848f805dcf", title: "Guide to the Galaxy", slug: "guide-to-the-galaxy", + parentId: "6419db964a9c435aa3af6251", + collectionId: "6390c49774a71f12831a08e3", createdOn: "2024-03-11T10:42:00Z", lastUpdated: "2024-03-11T10:42:42Z", archived: false, @@ -197,6 +209,8 @@ describe("Pages", () => { siteId: "6258612d1ee792848f805dcf", title: "Guide to the Galaxy", slug: "guide-to-the-galaxy", + parentId: "6419db964a9c435aa3af6251", + collectionId: "6390c49774a71f12831a08e3", createdOn: new Date("2024-03-11T10:42:00.000Z"), lastUpdated: new Date("2024-03-11T10:42:42.000Z"), archived: false, @@ -246,6 +260,8 @@ describe("Pages", () => { siteId: "6258612d1ee792848f805dcf", title: "Guide to the Galaxy", slug: "guide-to-the-galaxy", + parentId: "6419db964a9c435aa3af6251", + collectionId: "6390c49774a71f12831a08e3", createdOn: "2024-03-11T10:42:00Z", lastUpdated: "2024-03-11T10:42:42Z", archived: false, @@ -297,6 +313,8 @@ describe("Pages", () => { siteId: "6258612d1ee792848f805dcf", title: "Guide to the Galaxy", slug: "guide-to-the-galaxy", + parentId: "6419db964a9c435aa3af6251", + collectionId: "6390c49774a71f12831a08e3", createdOn: new Date("2024-03-11T10:42:00.000Z"), lastUpdated: new Date("2024-03-11T10:42:42.000Z"), archived: false, diff --git a/tests/wire/scripts.test.ts b/tests/wire/scripts.test.ts index fc13f7c0..3404b169 100644 --- a/tests/wire/scripts.test.ts +++ b/tests/wire/scripts.test.ts @@ -20,6 +20,7 @@ describe("Scripts", () => { canCopy: false, displayName: "Alert", hostedLocation: "https://cdn.webflow.io/.../alert-0.0.1.js", + integrityHash: "integrityHash", createdOn: "2022-10-26T00:28:54.191Z", lastUpdated: "lastUpdated", version: "0.0.1", @@ -29,6 +30,7 @@ describe("Scripts", () => { canCopy: false, displayName: "Alert", hostedLocation: "https://cdn.webflow.io/.../alert-0.0.2.js", + integrityHash: "integrityHash", createdOn: "2022-10-26T00:28:54.191Z", lastUpdated: "lastUpdated", version: "0.0.2", @@ -62,6 +64,7 @@ describe("Scripts", () => { canCopy: false, displayName: "Alert", hostedLocation: "https://cdn.webflow.io/.../alert-0.0.1.js", + integrityHash: "integrityHash", createdOn: "2022-10-26T00:28:54.191Z", lastUpdated: "lastUpdated", version: "0.0.1", @@ -71,6 +74,7 @@ describe("Scripts", () => { canCopy: false, displayName: "Alert", hostedLocation: "https://cdn.webflow.io/.../alert-0.0.2.js", + integrityHash: "integrityHash", createdOn: "2022-10-26T00:28:54.191Z", lastUpdated: "lastUpdated", version: "0.0.2", @@ -156,6 +160,7 @@ describe("Scripts", () => { displayName: "Alert", hostedLocation: "https://uploads-ssl.webflow.com/6258612d1ee792848f805dcf%2F64b6c769ff52ba6c3d904a91%2F660d6e15b3d1696f2d2b1447%2Falert-0.0.1.js", + integrityHash: "integrityHash", createdOn: "2022-10-26T00:28:54.191Z", lastUpdated: "lastUpdated", version: "0.0.1", @@ -180,6 +185,7 @@ describe("Scripts", () => { displayName: "Alert", hostedLocation: "https://uploads-ssl.webflow.com/6258612d1ee792848f805dcf%2F64b6c769ff52ba6c3d904a91%2F660d6e15b3d1696f2d2b1447%2Falert-0.0.1.js", + integrityHash: "integrityHash", createdOn: "2022-10-26T00:28:54.191Z", lastUpdated: "lastUpdated", version: "0.0.1", diff --git a/tests/wire/sites.test.ts b/tests/wire/sites.test.ts index 77cf6956..b1d3e6aa 100644 --- a/tests/wire/sites.test.ts +++ b/tests/wire/sites.test.ts @@ -19,11 +19,37 @@ describe("Sites", () => { createdOn: "2024-10-15T20:24:38Z", displayName: "The Hitchiker's Guide", shortName: "hitchikers-guide", + lastPublished: "2016-10-24T19:43:17Z", lastUpdated: "2024-10-15T20:24:38Z", + previewUrl: "https://dev-assets.website-files.com/580e63e98c9a982ac9b8b741/201610241243.png", + timeZone: "America/Los_Angeles", parentFolderId: "670ece123598db72d9648be1", customDomains: [ { id: "589a331aa51e760df7ccb89d", url: "test-api-domain.com", lastPublished: "2022-12-07T16:51:37Z" }, ], + locales: { + primary: { + id: "653fd9af6a07fc9cfd7a5e57", + cmsLocaleId: "653ad57de882f528b32e810e", + enabled: false, + displayName: "English (United States)", + displayImageId: "displayImageId", + redirect: true, + subdirectory: "", + tag: "en-US", + }, + secondary: [ + { + id: "653fd9af6a07fc9cfd7a5e57", + cmsLocaleId: "653ad57de882f528b32e810e", + enabled: false, + displayName: "English (United States)", + redirect: true, + subdirectory: "", + tag: "en-US", + }, + ], + }, dataCollectionEnabled: true, dataCollectionType: "always", }; @@ -45,7 +71,10 @@ describe("Sites", () => { createdOn: new Date("2024-10-15T20:24:38.000Z"), displayName: "The Hitchiker's Guide", shortName: "hitchikers-guide", + lastPublished: new Date("2016-10-24T19:43:17.000Z"), lastUpdated: new Date("2024-10-15T20:24:38.000Z"), + previewUrl: "https://dev-assets.website-files.com/580e63e98c9a982ac9b8b741/201610241243.png", + timeZone: "America/Los_Angeles", parentFolderId: "670ece123598db72d9648be1", customDomains: [ { @@ -54,6 +83,29 @@ describe("Sites", () => { lastPublished: new Date("2022-12-07T16:51:37.000Z"), }, ], + locales: { + primary: { + id: "653fd9af6a07fc9cfd7a5e57", + cmsLocaleId: "653ad57de882f528b32e810e", + enabled: false, + displayName: "English (United States)", + displayImageId: "displayImageId", + redirect: true, + subdirectory: "", + tag: "en-US", + }, + secondary: [ + { + id: "653fd9af6a07fc9cfd7a5e57", + cmsLocaleId: "653ad57de882f528b32e810e", + enabled: false, + displayName: "English (United States)", + redirect: true, + subdirectory: "", + tag: "en-US", + }, + ], + }, dataCollectionEnabled: true, dataCollectionType: "always", }); @@ -130,6 +182,7 @@ describe("Sites", () => { lastUpdated: "2016-10-24T19:43:17Z", previewUrl: "https://dev-assets.website-files.com/42e63e98c9a982ac9b8b742/198110121200.png", timeZone: "DeepSpace/Depression", + parentFolderId: "1as2d3f4g5h6j7k8l9z0x1c2v3b4n5m6", customDomains: [ { id: "589a331aa51e760df7ccb89f", url: "marvin.blog", lastPublished: "2022-12-07T16:51:37Z" }, ], @@ -168,6 +221,7 @@ describe("Sites", () => { lastUpdated: "2016-10-24T19:43:17Z", previewUrl: "https://dev-assets.website-files.com/42e63e98c9a982ac9b8b743/198210121200.png", timeZone: "Vogsphere/PoetryHall", + parentFolderId: "1as2d3f4g5h6j7k8l9z0x1c2v3b4n5m6", customDomains: [ { id: "589a331aa51e760df7ccb8a0", @@ -269,6 +323,7 @@ describe("Sites", () => { lastUpdated: new Date("2016-10-24T19:43:17.000Z"), previewUrl: "https://dev-assets.website-files.com/42e63e98c9a982ac9b8b742/198110121200.png", timeZone: "DeepSpace/Depression", + parentFolderId: "1as2d3f4g5h6j7k8l9z0x1c2v3b4n5m6", customDomains: [ { id: "589a331aa51e760df7ccb89f", @@ -311,6 +366,7 @@ describe("Sites", () => { lastUpdated: new Date("2016-10-24T19:43:17.000Z"), previewUrl: "https://dev-assets.website-files.com/42e63e98c9a982ac9b8b743/198210121200.png", timeZone: "Vogsphere/PoetryHall", + parentFolderId: "1as2d3f4g5h6j7k8l9z0x1c2v3b4n5m6", customDomains: [ { id: "589a331aa51e760df7ccb8a0", diff --git a/tests/wire/sites/activityLogs.test.ts b/tests/wire/sites/activityLogs.test.ts index ac7ef3cf..7a521fc1 100644 --- a/tests/wire/sites/activityLogs.test.ts +++ b/tests/wire/sites/activityLogs.test.ts @@ -24,6 +24,9 @@ describe("ActivityLogs", () => { user: { id: "6509cd56e90eec668b009712", displayName: "John Doe" }, resourceId: "654c16c7b229e56bcf26870c", resourceName: "foo-bar", + newValue: "newValue", + previousValue: "previousValue", + payload: { key: "value" }, }, ], pagination: { limit: 25, offset: 0, total: 1 }, @@ -54,6 +57,11 @@ describe("ActivityLogs", () => { }, resourceId: "654c16c7b229e56bcf26870c", resourceName: "foo-bar", + newValue: "newValue", + previousValue: "previousValue", + payload: { + key: "value", + }, }, ], pagination: { diff --git a/tests/wire/sites/comments.test.ts b/tests/wire/sites/comments.test.ts index dc8f3bdb..bdff914d 100644 --- a/tests/wire/sites/comments.test.ts +++ b/tests/wire/sites/comments.test.ts @@ -20,6 +20,7 @@ describe("Comments", () => { 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]] ", @@ -44,6 +45,7 @@ describe("Comments", () => { 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]] ", @@ -88,6 +90,7 @@ describe("Comments", () => { 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]] ", @@ -112,6 +115,7 @@ describe("Comments", () => { 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]] ", diff --git a/tests/wire/sites/forms.test.ts b/tests/wire/sites/forms.test.ts new file mode 100644 index 00000000..c957c27a --- /dev/null +++ b/tests/wire/sites/forms.test.ts @@ -0,0 +1,258 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import { mockServerPool } from "../../mock-server/MockServerPool.js"; +import { WebflowClient } from "../../../src/Client"; + +describe("Forms", () => { + test("list-submissions-by-site", async () => { + const server = mockServerPool.createServer(); + const client = new WebflowClient({ + accessToken: "test", + environment: { base: server.baseUrl, dataApi: server.baseUrl, contentDeliveryApi: server.baseUrl }, + }); + + const rawResponseBody = { + formSubmissions: [ + { + id: "6321ca84df3949bfc6752327", + displayName: "Sample Form", + siteId: "62749158efef318abc8d5a0f", + workspaceId: "62749158efef318abc8d5a0f", + dateSubmitted: "2022-09-14T12:35:16Z", + formResponse: { "First Name": "Arthur", "Last Name": "Dent" }, + }, + { + id: "660d64fabf6e0a0d4edab981", + displayName: "Sample Form", + siteId: "62749158efef318abc8d5a0f", + workspaceId: "62749158efef318abc8d5a0f", + dateSubmitted: "2022-09-14T12:35:16Z", + formResponse: { "First Name": "Ford", "Last Name": "Prefect" }, + }, + ], + pagination: { limit: 25, offset: 0, total: 2 }, + }; + server + .mockEndpoint() + .get("/sites/580e63e98c9a982ac9b8b741/form_submissions") + .respondWith() + .statusCode(200) + .jsonBody(rawResponseBody) + .build(); + + const response = await client.sites.forms.listSubmissionsBySite("580e63e98c9a982ac9b8b741", { + elementId: "18259716-3e5a-646a-5f41-5dc4b9405aa0", + offset: 1.1, + limit: 1.1, + }); + expect(response).toEqual({ + formSubmissions: [ + { + id: "6321ca84df3949bfc6752327", + displayName: "Sample Form", + siteId: "62749158efef318abc8d5a0f", + workspaceId: "62749158efef318abc8d5a0f", + dateSubmitted: new Date("2022-09-14T12:35:16.000Z"), + formResponse: { + "First Name": "Arthur", + "Last Name": "Dent", + }, + }, + { + id: "660d64fabf6e0a0d4edab981", + displayName: "Sample Form", + siteId: "62749158efef318abc8d5a0f", + workspaceId: "62749158efef318abc8d5a0f", + dateSubmitted: new Date("2022-09-14T12:35:16.000Z"), + formResponse: { + "First Name": "Ford", + "Last Name": "Prefect", + }, + }, + ], + pagination: { + limit: 25, + offset: 0, + total: 2, + }, + }); + }); + + test("list-submissions-by-form-and-site", async () => { + const server = mockServerPool.createServer(); + const client = new WebflowClient({ + accessToken: "test", + environment: { base: server.baseUrl, dataApi: server.baseUrl, contentDeliveryApi: server.baseUrl }, + }); + + const rawResponseBody = { + formSubmissions: [ + { + id: "6321ca84df3949bfc6752327", + displayName: "Sample Form", + siteId: "62749158efef318abc8d5a0f", + workspaceId: "62749158efef318abc8d5a0f", + dateSubmitted: "2022-09-14T12:35:16Z", + formResponse: { "First Name": "Arthur", "Last Name": "Dent" }, + }, + { + id: "660d64fabf6e0a0d4edab981", + displayName: "Sample Form", + siteId: "62749158efef318abc8d5a0f", + workspaceId: "62749158efef318abc8d5a0f", + dateSubmitted: "2022-09-14T12:35:16Z", + formResponse: { "First Name": "Ford", "Last Name": "Prefect" }, + }, + ], + pagination: { limit: 25, offset: 0, total: 2 }, + }; + server + .mockEndpoint() + .get("/sites/580e63e98c9a982ac9b8b741/forms/580e63e98c9a982ac9b8b741/submissions") + .respondWith() + .statusCode(200) + .jsonBody(rawResponseBody) + .build(); + + const response = await client.sites.forms.listSubmissionsByFormAndSite( + "580e63e98c9a982ac9b8b741", + "580e63e98c9a982ac9b8b741", + { + offset: 1.1, + limit: 1.1, + }, + ); + expect(response).toEqual({ + formSubmissions: [ + { + id: "6321ca84df3949bfc6752327", + displayName: "Sample Form", + siteId: "62749158efef318abc8d5a0f", + workspaceId: "62749158efef318abc8d5a0f", + dateSubmitted: new Date("2022-09-14T12:35:16.000Z"), + formResponse: { + "First Name": "Arthur", + "Last Name": "Dent", + }, + }, + { + id: "660d64fabf6e0a0d4edab981", + displayName: "Sample Form", + siteId: "62749158efef318abc8d5a0f", + workspaceId: "62749158efef318abc8d5a0f", + dateSubmitted: new Date("2022-09-14T12:35:16.000Z"), + formResponse: { + "First Name": "Ford", + "Last Name": "Prefect", + }, + }, + ], + pagination: { + limit: 25, + offset: 0, + total: 2, + }, + }); + }); + + test("get-submission", async () => { + const server = mockServerPool.createServer(); + const client = new WebflowClient({ + accessToken: "test", + environment: { base: server.baseUrl, dataApi: server.baseUrl, contentDeliveryApi: server.baseUrl }, + }); + + const rawResponseBody = { + id: "6321ca84df3949bfc6752327", + displayName: "Sample Form", + siteId: "62749158efef318abc8d5a0f", + workspaceId: "62749158efef318abc8d5a0f", + dateSubmitted: "2022-09-14T12:35:16Z", + formResponse: { "First Name": "Arthur", "Last Name": "Dent" }, + }; + server + .mockEndpoint() + .get("/sites/580e63e98c9a982ac9b8b741/form_submissions/580e63e98c9a982ac9b8b741") + .respondWith() + .statusCode(200) + .jsonBody(rawResponseBody) + .build(); + + const response = await client.sites.forms.getSubmission("580e63e98c9a982ac9b8b741", "580e63e98c9a982ac9b8b741"); + expect(response).toEqual({ + id: "6321ca84df3949bfc6752327", + displayName: "Sample Form", + siteId: "62749158efef318abc8d5a0f", + workspaceId: "62749158efef318abc8d5a0f", + dateSubmitted: new Date("2022-09-14T12:35:16.000Z"), + formResponse: { + "First Name": "Arthur", + "Last Name": "Dent", + }, + }); + }); + + test("delete-submission", async () => { + const server = mockServerPool.createServer(); + const client = new WebflowClient({ + accessToken: "test", + environment: { base: server.baseUrl, dataApi: server.baseUrl, contentDeliveryApi: server.baseUrl }, + }); + + server + .mockEndpoint() + .delete("/sites/580e63e98c9a982ac9b8b741/form_submissions/580e63e98c9a982ac9b8b741") + .respondWith() + .statusCode(200) + .build(); + + const response = await client.sites.forms.deleteSubmission( + "580e63e98c9a982ac9b8b741", + "580e63e98c9a982ac9b8b741", + ); + expect(response).toEqual(undefined); + }); + + test("update-submission", async () => { + const server = mockServerPool.createServer(); + const client = new WebflowClient({ + accessToken: "test", + environment: { base: server.baseUrl, dataApi: server.baseUrl, contentDeliveryApi: server.baseUrl }, + }); + const rawRequestBody = {}; + const rawResponseBody = { + id: "6321ca84df3949bfc6752327", + displayName: "Sample Form", + siteId: "62749158efef318abc8d5a0f", + workspaceId: "62749158efef318abc8d5a0f", + dateSubmitted: "2022-09-14T12:35:16Z", + formResponse: { "First Name": "Arthur", "Last Name": "Dent" }, + }; + server + .mockEndpoint() + .patch("/sites/580e63e98c9a982ac9b8b741/form_submissions/580e63e98c9a982ac9b8b741") + .jsonBody(rawRequestBody) + .respondWith() + .statusCode(200) + .jsonBody(rawResponseBody) + .build(); + + const response = await client.sites.forms.updateSubmission( + "580e63e98c9a982ac9b8b741", + "580e63e98c9a982ac9b8b741", + ); + expect(response).toEqual({ + id: "6321ca84df3949bfc6752327", + displayName: "Sample Form", + siteId: "62749158efef318abc8d5a0f", + workspaceId: "62749158efef318abc8d5a0f", + dateSubmitted: new Date("2022-09-14T12:35:16.000Z"), + formResponse: { + "First Name": "Arthur", + "Last Name": "Dent", + }, + }); + }); +}); diff --git a/tests/wire/sites/scripts.test.ts b/tests/wire/sites/scripts.test.ts index 9abcff7e..9612b3d5 100644 --- a/tests/wire/sites/scripts.test.ts +++ b/tests/wire/sites/scripts.test.ts @@ -168,6 +168,7 @@ describe("Scripts", () => { blocks: [ { siteId: "6258612d1ee792848f805dcf", + pageId: "pageId", type: "site", scripts: [{ id: "chartjs", location: "header", version: "4.4.2", attributes: { key: "value" } }], createdOn: "2024-04-03T16:49:15Z", @@ -200,6 +201,7 @@ describe("Scripts", () => { blocks: [ { siteId: "6258612d1ee792848f805dcf", + pageId: "pageId", type: "site", scripts: [ { diff --git a/tests/wire/webhooks.test.ts b/tests/wire/webhooks.test.ts index 4f8066df..a2bf9815 100644 --- a/tests/wire/webhooks.test.ts +++ b/tests/wire/webhooks.test.ts @@ -125,6 +125,7 @@ describe("Webhooks", () => { url: "https://webhook.site/7f7f7f7f-7f7f-7f7f-7f7f-7f7f7f7f7f7f", workspaceId: "4f4e46fd476ea8c507000001", siteId: "562ac0395358780a1f5e6fbd", + filter: { name: "My Form" }, lastTriggered: "2023-02-08T23:59:28Z", createdOn: "2022-11-08T23:59:28Z", }; @@ -152,6 +153,9 @@ describe("Webhooks", () => { url: "https://webhook.site/7f7f7f7f-7f7f-7f7f-7f7f-7f7f7f7f7f7f", workspaceId: "4f4e46fd476ea8c507000001", siteId: "562ac0395358780a1f5e6fbd", + filter: { + name: "My Form", + }, lastTriggered: new Date("2023-02-08T23:59:28.000Z"), createdOn: new Date("2022-11-08T23:59:28.000Z"), }); @@ -170,6 +174,7 @@ describe("Webhooks", () => { url: "https://webhook.site/7f7f7f7f-7f7f-7f7f-7f7f-7f7f7f7f7f7f", workspaceId: "4f4e46fd476ea8c507000001", siteId: "562ac0395358780a1f5e6fbd", + filter: { name: "My Form" }, lastTriggered: "2023-02-08T23:59:28Z", createdOn: "2022-11-08T23:59:28Z", }; @@ -188,6 +193,9 @@ describe("Webhooks", () => { url: "https://webhook.site/7f7f7f7f-7f7f-7f7f-7f7f-7f7f7f7f7f7f", workspaceId: "4f4e46fd476ea8c507000001", siteId: "562ac0395358780a1f5e6fbd", + filter: { + name: "My Form", + }, lastTriggered: new Date("2023-02-08T23:59:28.000Z"), createdOn: new Date("2022-11-08T23:59:28.000Z"), }); diff --git a/yarn.lock b/yarn.lock index 36d476f3..602a7a19 100644 --- a/yarn.lock +++ b/yarn.lock @@ -270,56 +270,42 @@ resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== -"@bundled-es-modules/cookie@^2.0.1": - version "2.0.1" - resolved "https://registry.yarnpkg.com/@bundled-es-modules/cookie/-/cookie-2.0.1.tgz#b41376af6a06b3e32a15241d927b840a9b4de507" - integrity sha512-8o+5fRPLNbjbdGRRmJj3h6Hh1AQJf2dk3qQ/5ZFb+PXkRNiSoMGGUKlsgLfrxneb72axVJyIYji64E2+nNfYyw== - dependencies: - cookie "^0.7.2" - -"@bundled-es-modules/statuses@^1.0.1": - version "1.0.1" - resolved "https://registry.yarnpkg.com/@bundled-es-modules/statuses/-/statuses-1.0.1.tgz#761d10f44e51a94902c4da48675b71a76cc98872" - integrity sha512-yn7BklA5acgcBr+7w064fGV+SGIFySjCKpqjcWgBAIfrAkY+4GQTJJHQMeT3V/sgz23VTEVV8TtOmkvJAhFVfg== - dependencies: - statuses "^2.0.1" - -"@inquirer/ansi@^1.0.1": - version "1.0.1" - resolved "https://registry.yarnpkg.com/@inquirer/ansi/-/ansi-1.0.1.tgz#994f7dd16a00c547a7b110e04bf4f4eca1857929" - integrity sha512-yqq0aJW/5XPhi5xOAL1xRCpe1eh8UFVgYFpFsjEqmIR8rKLyP+HINvFXwUaxYICflJrVlxnp7lLN6As735kVpw== +"@inquirer/ansi@^1.0.2": + version "1.0.2" + resolved "https://registry.yarnpkg.com/@inquirer/ansi/-/ansi-1.0.2.tgz#674a4c4d81ad460695cb2a1fc69d78cd187f337e" + integrity sha512-S8qNSZiYzFd0wAcyG5AXCvUHC5Sr7xpZ9wZ2py9XR88jUz8wooStVx5M6dRzczbBWjic9NP7+rY0Xi7qqK/aMQ== "@inquirer/confirm@^5.0.0": - version "5.1.19" - resolved "https://registry.yarnpkg.com/@inquirer/confirm/-/confirm-5.1.19.tgz#bf28b420898999eb7479ab55623a3fbaf1453ff4" - integrity sha512-wQNz9cfcxrtEnUyG5PndC8g3gZ7lGDBzmWiXZkX8ot3vfZ+/BLjR8EvyGX4YzQLeVqtAlY/YScZpW7CW8qMoDQ== + version "5.1.21" + resolved "https://registry.yarnpkg.com/@inquirer/confirm/-/confirm-5.1.21.tgz#610c4acd7797d94890a6e2dde2c98eb1e891dd12" + integrity sha512-KR8edRkIsUayMXV+o3Gv+q4jlhENF9nMYUZs9PA2HzrXeHI8M5uDag70U7RJn9yyiMZSbtF5/UexBtAVtZGSbQ== dependencies: - "@inquirer/core" "^10.3.0" - "@inquirer/type" "^3.0.9" + "@inquirer/core" "^10.3.2" + "@inquirer/type" "^3.0.10" -"@inquirer/core@^10.3.0": - version "10.3.0" - resolved "https://registry.yarnpkg.com/@inquirer/core/-/core-10.3.0.tgz#342e4fd62cbd33ea62089364274995dbec1f2ffe" - integrity sha512-Uv2aPPPSK5jeCplQmQ9xadnFx2Zhj9b5Dj7bU6ZeCdDNNY11nhYy4btcSdtDguHqCT2h5oNeQTcUNSGGLA7NTA== +"@inquirer/core@^10.3.2": + version "10.3.2" + resolved "https://registry.yarnpkg.com/@inquirer/core/-/core-10.3.2.tgz#535979ff3ff4fe1e7cc4f83e2320504c743b7e20" + integrity sha512-43RTuEbfP8MbKzedNqBrlhhNKVwoK//vUFNW3Q3vZ88BLcrs4kYpGg+B2mm5p2K/HfygoCxuKwJJiv8PbGmE0A== dependencies: - "@inquirer/ansi" "^1.0.1" - "@inquirer/figures" "^1.0.14" - "@inquirer/type" "^3.0.9" + "@inquirer/ansi" "^1.0.2" + "@inquirer/figures" "^1.0.15" + "@inquirer/type" "^3.0.10" cli-width "^4.1.0" mute-stream "^2.0.0" signal-exit "^4.1.0" wrap-ansi "^6.2.0" - yoctocolors-cjs "^2.1.2" + yoctocolors-cjs "^2.1.3" -"@inquirer/figures@^1.0.14": - version "1.0.14" - resolved "https://registry.yarnpkg.com/@inquirer/figures/-/figures-1.0.14.tgz#12a7bfd344a83ae6cc5d6004b389ed11f6db6be4" - integrity sha512-DbFgdt+9/OZYFM+19dbpXOSeAstPy884FPy1KjDu4anWwymZeOYhMY1mdFri172htv6mvc/uvIAAi7b7tvjJBQ== +"@inquirer/figures@^1.0.15": + version "1.0.15" + resolved "https://registry.yarnpkg.com/@inquirer/figures/-/figures-1.0.15.tgz#dbb49ed80df11df74268023b496ac5d9acd22b3a" + integrity sha512-t2IEY+unGHOzAaVM5Xx6DEWKeXlDDcNPeDyUpsRc6CUhBfU3VQOEl+Vssh7VNp1dR8MdUJBWhuObjXCsVpjN5g== -"@inquirer/type@^3.0.9": - version "3.0.9" - resolved "https://registry.yarnpkg.com/@inquirer/type/-/type-3.0.9.tgz#f7f9696e9276e4e1ae9332767afb9199992e31d9" - integrity sha512-QPaNt/nmE2bLGQa9b7wwyRJoLZ7pN6rcyXvzU0YCmivmJyq1BVo94G98tStRWkoD1RgDX5C+dPlhhHzNdu/W/w== +"@inquirer/type@^3.0.10": + version "3.0.10" + resolved "https://registry.yarnpkg.com/@inquirer/type/-/type-3.0.10.tgz#11ed564ec78432a200ea2601a212d24af8150d50" + integrity sha512-BvziSRxfz5Ov8ch0z/n3oijRSEcEsHnhggm4xFZe93DHcUCTlutlq9Ox4SVENAfcRD22UQq7T/atg9Wr3k09eA== "@istanbuljs/load-nyc-config@^1.0.0": version "1.1.0" @@ -571,10 +557,10 @@ "@jridgewell/resolve-uri" "^3.1.0" "@jridgewell/sourcemap-codec" "^1.4.14" -"@mswjs/interceptors@^0.39.1": - version "0.39.8" - resolved "https://registry.yarnpkg.com/@mswjs/interceptors/-/interceptors-0.39.8.tgz#0a2cf4cf26a731214ca4156273121f67dff7ebf8" - integrity sha512-2+BzZbjRO7Ct61k8fMNHEtoKjeWI9pIlHFTqBwZ5icHpqszIgEZbjb1MW5Z0+bITTCTl3gk4PDBxs9tA/csXvA== +"@mswjs/interceptors@^0.40.0": + version "0.40.0" + resolved "https://registry.yarnpkg.com/@mswjs/interceptors/-/interceptors-0.40.0.tgz#1b45f215ba8c2983ed133763ca03af92896083d6" + integrity sha512-EFd6cVbHsgLa6wa4RljGj6Wk75qoHxUSyc5asLyyPSyuhIcdS2Q3Phw6ImS1q+CkALthJRShiYfKANcQMuMqsQ== dependencies: "@open-draft/deferred-promise" "^2.2.0" "@open-draft/logger" "^0.3.0" @@ -596,7 +582,7 @@ is-node-process "^1.2.0" outvariant "^1.4.0" -"@open-draft/until@^2.0.0", "@open-draft/until@^2.1.0": +"@open-draft/until@^2.0.0": version "2.1.0" resolved "https://registry.yarnpkg.com/@open-draft/until/-/until-2.1.0.tgz#0acf32f470af2ceaf47f095cdecd40d68666efda" integrity sha512-U69T3ItWHvLwGg5eJ0n3I62nWuE6ilHlmz7zM0npLBRvPRd7e6NYmg54vvRtP5mZG7kZqZCFVdsTWo7BPtBujg== @@ -658,11 +644,6 @@ dependencies: "@babel/types" "^7.20.7" -"@types/cookie@^0.6.0": - version "0.6.0" - resolved "https://registry.yarnpkg.com/@types/cookie/-/cookie-0.6.0.tgz#eac397f28bf1d6ae0ae081363eca2f425bedf0d5" - integrity sha512-4Kh9a6B2bQciAhf7FSuMRRkUWecJgJu9nPnx3yzpsfXX/c50REIqpHY4C82bXP90qrLtXtkDxTZosYO3UpOwlA== - "@types/eslint-scope@^3.7.7": version "3.7.7" resolved "https://registry.yarnpkg.com/@types/eslint-scope/-/eslint-scope-3.7.7.tgz#3108bd5f18b0cdb277c867b3dd449c9ed7079ac5" @@ -741,9 +722,9 @@ form-data "^4.0.4" "@types/node@*": - version "24.10.0" - resolved "https://registry.yarnpkg.com/@types/node/-/node-24.10.0.tgz#6b79086b0dfc54e775a34ba8114dcc4e0221f31f" - integrity sha512-qzQZRBqkFsYyaSWXuEHc2WR9c0a0CXwiE5FWUvn7ZM+vdy1uZLfCunD38UzhuB7YN/J11ndbDBcTmOdxJo9Q7A== + version "24.10.1" + resolved "https://registry.yarnpkg.com/@types/node/-/node-24.10.1.tgz#91e92182c93db8bd6224fca031e2370cef9a8f01" + integrity sha512-GNWcUTRBgIRJD5zj+Tq0fKOJ5XZajIiBroOF0yvj2bSU1WvNdYS/dn9UxwsujGW4JX06dnHyjV2y9rRaybH0iQ== dependencies: undici-types "~7.16.0" @@ -771,7 +752,7 @@ resolved "https://registry.yarnpkg.com/@types/stack-utils/-/stack-utils-2.0.3.tgz#6209321eb2c1712a7e7466422b8cb1fc0d9dd5d8" integrity sha512-9aEbYZ3TbYMznPdcdr3SmIrLXwC/AKZXQeCf9Pgao5CKb8CyHuEX5jzWPTkvregvhRJHcpRO6BFoGW9ycaOkYw== -"@types/statuses@^2.0.4": +"@types/statuses@^2.0.6": version "2.0.6" resolved "https://registry.yarnpkg.com/@types/statuses/-/statuses-2.0.6.tgz#66748315cc9a96d63403baa8671b2c124f8633aa" integrity sha512-xMAgYwceFhRA2zY+XbEA7mxYbA093wdiW8Vu6gZPGWy9cmOyU9XesH1tNcEWsKFd5Vzrqx5T3D38PWx1FIIXkA== @@ -792,9 +773,9 @@ integrity sha512-I4q9QU9MQv4oEOz4tAHJtNz1cwuLxn2F3xcc2iV5WdqLPpUnj30aUuxt1mAxYTG+oe8CZMV/+6rU4S4gRDzqtQ== "@types/yargs@^17.0.8": - version "17.0.34" - resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-17.0.34.tgz#1c2f9635b71d5401827373a01ce2e8a7670ea839" - integrity sha512-KExbHVa92aJpw9WDQvzBaGVE2/Pz+pLZQloT2hjL8IqsZnV62rlPOYvNnLmf/L2dyllfVUOVBj64M0z/46eR2A== + version "17.0.35" + resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-17.0.35.tgz#07013e46aa4d7d7d50a49e15604c1c5340d4eb24" + integrity sha512-qUHkeCyQFxMXg79wQfTtfndEC+N9ZZg76HJftDJp+qH2tV7Gj4OJi7l+PiWwJ+pWtW8GwSmqsDj/oymhrTWXjg== dependencies: "@types/yargs-parser" "*" @@ -1130,10 +1111,10 @@ base64-js@^1.3.1: resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a" integrity sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA== -baseline-browser-mapping@^2.8.19: - version "2.8.23" - resolved "https://registry.yarnpkg.com/baseline-browser-mapping/-/baseline-browser-mapping-2.8.23.tgz#cd43e17eff5cbfb67c92153e7fe856cf6d426421" - integrity sha512-616V5YX4bepJFzNyOfce5Fa8fDJMfoxzOIzDCZwaGL8MKVpFrXqfNUoIpRn9YMI5pXf/VKgzjB4htFMsFKKdiQ== +baseline-browser-mapping@^2.8.25: + version "2.8.31" + resolved "https://registry.yarnpkg.com/baseline-browser-mapping/-/baseline-browser-mapping-2.8.31.tgz#16c0f1814638257932e0486dbfdbb3348d0a5710" + integrity sha512-a28v2eWrrRWPpJSzxc+mKwm0ZtVx/G8SepdQZDArnXYU/XS+IF6mp8aB/4E+hH1tyGCoDo3KlUCdlSxGDsRkAw== bn.js@^4.0.0, bn.js@^4.1.0, bn.js@^4.11.9: version "4.12.2" @@ -1221,14 +1202,14 @@ browserify-sign@^4.2.3: safe-buffer "^5.2.1" browserslist@^4.24.0, browserslist@^4.26.3: - version "4.27.0" - resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.27.0.tgz#755654744feae978fbb123718b2f139bc0fa6697" - integrity sha512-AXVQwdhot1eqLihwasPElhX2tAZiBjWdJ9i/Zcj2S6QYIjkx62OKSfnobkriB81C3l4w0rVy3Nt4jaTBltYEpw== - dependencies: - baseline-browser-mapping "^2.8.19" - caniuse-lite "^1.0.30001751" - electron-to-chromium "^1.5.238" - node-releases "^2.0.26" + version "4.28.0" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.28.0.tgz#9cefece0a386a17a3cd3d22ebf67b9deca1b5929" + integrity sha512-tbydkR/CxfMwelN0vwdP/pLkDwyAASZ+VfWm4EOwlB6SWhx1sYnWLqo8N5j0rAzPfzfRaxt0mM/4wPU/Su84RQ== + dependencies: + baseline-browser-mapping "^2.8.25" + caniuse-lite "^1.0.30001754" + electron-to-chromium "^1.5.249" + node-releases "^2.0.27" update-browserslist-db "^1.1.4" bs-logger@^0.2.6: @@ -1304,10 +1285,10 @@ camelcase@^6.2.0: resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.3.0.tgz#5685b95eb209ac9c0c177467778c9c84df58ba9a" integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA== -caniuse-lite@^1.0.30001751: - version "1.0.30001753" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001753.tgz#419f8fc9bab6f1a1d10d9574d0b3374f823c5b00" - integrity sha512-Bj5H35MD/ebaOV4iDLqPEtiliTN29qkGtEHCwawWn4cYm+bPJM2NsaP30vtZcnERClMzp52J4+aw2UNbK4o+zw== +caniuse-lite@^1.0.30001754: + version "1.0.30001757" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001757.tgz#a46ff91449c69522a462996c6aac4ef95d7ccc5e" + integrity sha512-r0nnL/I28Zi/yjk1el6ilj27tKcdjLsNqAOZr0yVjWPrSQyHgKI2INaEWw21bAQSv2LXRt1XuCS/GomNpWOxsQ== chalk@^4.0.0, chalk@^4.1.0: version "4.1.2" @@ -1404,10 +1385,10 @@ convert-source-map@^2.0.0: resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-2.0.0.tgz#4b560f649fc4e918dd0ab75cf4961e8bc882d82a" integrity sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg== -cookie@^0.7.2: - version "0.7.2" - resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.7.2.tgz#556369c472a2ba910f2979891b526b3436237ed7" - integrity sha512-yki5XnKuf750l50uGTllt6kKILY4nQ1eNIQatoXEByZ5dWgnKqbnqmTrBE5B4N7lrMJKQ2ytWMiTO2o0v6Ew/w== +cookie@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/cookie/-/cookie-1.0.2.tgz#27360701532116bd3f1f9416929d176afe1e4610" + integrity sha512-9Kr/j4O16ISv8zBBhJoi4bXOYNTkFLOqSL3UDB0njXxCXNezjeyVrJyGOWtgfs/q2km1gwBcfH8q1yEGoMYunA== core-util-is@~1.0.0: version "1.0.3" @@ -1597,10 +1578,10 @@ dunder-proto@^1.0.1: es-errors "^1.3.0" gopd "^1.2.0" -electron-to-chromium@^1.5.238: - version "1.5.244" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.5.244.tgz#b9b61e3d24ef4203489951468614f2a360763820" - integrity sha512-OszpBN7xZX4vWMPJwB9illkN/znA8M36GQqQxi6MNy9axWxhOfJyZZJtSLQCpEFLHP2xK33BiWx9aIuIEXVCcw== +electron-to-chromium@^1.5.249: + version "1.5.259" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.5.259.tgz#d4393167ec14c5a046cebaec3ddf3377944ce965" + integrity sha512-I+oLXgpEJzD6Cwuwt1gYjxsDmu/S/Kd41mmLA3O+/uH2pFRO/DvOjUyGozL8j3KeLV6WyZ7ssPwELMsXCcsJAQ== elliptic@^6.5.3, elliptic@^6.6.1: version "6.6.1" @@ -1827,9 +1808,9 @@ for-each@^0.3.5: is-callable "^1.2.7" form-data@^4.0.0, form-data@^4.0.4: - version "4.0.4" - resolved "https://registry.yarnpkg.com/form-data/-/form-data-4.0.4.tgz#784cdcce0669a9d68e94d11ac4eea98088edd2c4" - integrity sha512-KrGhL9Q4zjj0kiUt5OO4Mr/A/jlI2jDYs5eHBpYHPcBEVSiipAvn2Ko2HnPe20rmcuuvMHNdZFp+4IlGTMF0Ow== + version "4.0.5" + resolved "https://registry.yarnpkg.com/form-data/-/form-data-4.0.5.tgz#b49e48858045ff4cbf6b03e1805cebcad3679053" + integrity sha512-8RipRLol37bNs2bhoV67fiTEvdTrbMUYcFTiy3+wuuOnUog2QBHCZWXDRijWQfAkhBj2Uf5UnVaiWwA5vdd82w== dependencies: asynckit "^0.4.0" combined-stream "^1.0.8" @@ -1928,7 +1909,7 @@ graceful-fs@^4.1.2, graceful-fs@^4.2.11, graceful-fs@^4.2.4, graceful-fs@^4.2.9: resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.11.tgz#4183e4e8bf08bb6e05bbb2f7d2e0c8f712ca40e3" integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ== -graphql@^16.8.1: +graphql@^16.12.0: version "16.12.0" resolved "https://registry.yarnpkg.com/graphql/-/graphql-16.12.0.tgz#28cc2462435b1ac3fdc6976d030cef83a0c13ac7" integrity sha512-DKKrynuQRne0PNpEbzuEdHlYOMksHSUI8Zc9Unei5gTsMNA2/vMpoMz/yKba50pejK56qj98qM0SjYxAKi13gQ== @@ -2610,9 +2591,9 @@ js-tokens@^4.0.0: integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== js-yaml@^3.13.1: - version "3.14.1" - resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.14.1.tgz#dae812fdb3825fa306609a8717383c50c36a0537" - integrity sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g== + version "3.14.2" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.14.2.tgz#77485ce1dd7f33c061fd1b16ecea23b55fcb04b0" + integrity sha512-PMSmkqxr106Xa156c2M265Z+FTrPl+oxd/rgOQy2tijQeK5TxQ43psO1ZCwhVOSdnn+RzkzlRz/eY4BgJBYVpg== dependencies: argparse "^1.0.7" esprima "^4.0.0" @@ -2684,7 +2665,7 @@ lines-and-columns@^1.1.6: resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-1.2.4.tgz#eca284f75d2965079309dc0ad9255abb2ebc1632" integrity sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg== -loader-runner@^4.2.0: +loader-runner@^4.3.1: version "4.3.1" resolved "https://registry.yarnpkg.com/loader-runner/-/loader-runner-4.3.1.tgz#6c76ed29b0ccce9af379208299f07f876de737e3" integrity sha512-IWqP2SCPhyVFTBtRcgMHdzlf9ul25NwaFx4wCEH/KjAXuuHY4yNjvPXsBokp8jCB936PyWRaPKUNh8NvylLp2Q== @@ -2806,29 +2787,28 @@ ms@^2.1.3: resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== -msw@2.11.2: - version "2.11.2" - resolved "https://registry.yarnpkg.com/msw/-/msw-2.11.2.tgz#622d83855f456a5f93b1528f6eb6f4c0114623c3" - integrity sha512-MI54hLCsrMwiflkcqlgYYNJJddY5/+S0SnONvhv1owOplvqohKSQyGejpNdUGyCwgs4IH7PqaNbPw/sKOEze9Q== +msw@^2.8.4: + version "2.12.3" + resolved "https://registry.yarnpkg.com/msw/-/msw-2.12.3.tgz#fdafc6d1245f3e04bd04aeb97a2979320e03240c" + integrity sha512-/5rpGC0eK8LlFqsHaBmL19/PVKxu/CCt8pO1vzp9X6SDLsRDh/Ccudkf3Ur5lyaKxJz9ndAx+LaThdv0ySqB6A== dependencies: - "@bundled-es-modules/cookie" "^2.0.1" - "@bundled-es-modules/statuses" "^1.0.1" "@inquirer/confirm" "^5.0.0" - "@mswjs/interceptors" "^0.39.1" + "@mswjs/interceptors" "^0.40.0" "@open-draft/deferred-promise" "^2.2.0" - "@open-draft/until" "^2.1.0" - "@types/cookie" "^0.6.0" - "@types/statuses" "^2.0.4" - graphql "^16.8.1" + "@types/statuses" "^2.0.6" + cookie "^1.0.2" + graphql "^16.12.0" headers-polyfill "^4.0.2" is-node-process "^1.2.0" outvariant "^1.4.3" path-to-regexp "^6.3.0" picocolors "^1.1.1" rettime "^0.7.0" + statuses "^2.0.2" strict-event-emitter "^0.5.1" tough-cookie "^6.0.0" - type-fest "^4.26.1" + type-fest "^5.2.0" + until-async "^3.0.2" yargs "^17.7.2" mute-stream@^2.0.0: @@ -2858,7 +2838,7 @@ node-int64@^0.4.0: resolved "https://registry.yarnpkg.com/node-int64/-/node-int64-0.4.0.tgz#87a9065cdb355d3182d8f94ce11188b825c68a3b" integrity sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw== -node-releases@^2.0.26: +node-releases@^2.0.27: version "2.0.27" resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.27.tgz#eedca519205cf20f650f61d56b070db111231e4e" integrity sha512-nmh3lCkYZ3grZvqcCH+fjmQ7X+H0OeZgP40OierEaAptX4XofMh5kwNbWh7lBduUzCcV/8kZ+NDLCwm2iorIlA== @@ -3378,7 +3358,7 @@ stack-utils@^2.0.3: dependencies: escape-string-regexp "^2.0.0" -statuses@^2.0.1: +statuses@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/statuses/-/statuses-2.0.2.tgz#8f75eecef765b5e1cfcdc080da59409ed424e382" integrity sha512-DvEy55V3DB7uknRo+4iOGT5fP1slR8wQohVdknigZPMpMstaKJQWhwiYBACJE3Ul2pTnATihhBYnRhZQHGBiRw== @@ -3465,6 +3445,11 @@ symbol-tree@^3.2.4: resolved "https://registry.yarnpkg.com/symbol-tree/-/symbol-tree-3.2.4.tgz#430637d248ba77e078883951fb9aa0eed7c63fa2" integrity sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw== +tagged-tag@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/tagged-tag/-/tagged-tag-1.0.0.tgz#a0b5917c2864cba54841495abfa3f6b13edcf4d6" + integrity sha512-yEFYrVhod+hdNyx7g5Bnkkb0G6si8HJurOoOEgC8B/O0uXLHlaey/65KRv6cuWBNhBgHKAROVpc7QyYqE5gFng== + tapable@^2.2.0, tapable@^2.3.0: version "2.3.0" resolved "https://registry.yarnpkg.com/tapable/-/tapable-2.3.0.tgz#7e3ea6d5ca31ba8e078b560f0d83ce9a14aa8be6" @@ -3482,9 +3467,9 @@ terser-webpack-plugin@^5.3.11: terser "^5.31.1" terser@^5.31.1: - version "5.44.0" - resolved "https://registry.yarnpkg.com/terser/-/terser-5.44.0.tgz#ebefb8e5b8579d93111bfdfc39d2cf63879f4a82" - integrity sha512-nIVck8DK+GM/0Frwd+nIhZ84pR/BX7rmXMfYwyg+Sri5oGVE99/E3KvXqpC2xHFxyqXyGHTKBSioxxplrO4I4w== + version "5.44.1" + resolved "https://registry.yarnpkg.com/terser/-/terser-5.44.1.tgz#e391e92175c299b8c284ad6ded609e37303b0a9c" + integrity sha512-t/R3R/n0MSwnnazuPpPNVO60LX0SKL45pyl9YlvxIdkH0Of7D5qM2EVe+yASRIlY5pZ73nclYJfNANGWPwFDZw== dependencies: "@jridgewell/source-map" "^0.3.3" acorn "^8.15.0" @@ -3500,17 +3485,17 @@ test-exclude@^6.0.0: glob "^7.1.4" minimatch "^3.0.4" -tldts-core@^7.0.17: - version "7.0.17" - resolved "https://registry.yarnpkg.com/tldts-core/-/tldts-core-7.0.17.tgz#dadfee3750dd272ed219d7367beb7cbb2ff29eb8" - integrity sha512-DieYoGrP78PWKsrXr8MZwtQ7GLCUeLxihtjC1jZsW1DnvSMdKPitJSe8OSYDM2u5H6g3kWJZpePqkp43TfLh0g== +tldts-core@^7.0.19: + version "7.0.19" + resolved "https://registry.yarnpkg.com/tldts-core/-/tldts-core-7.0.19.tgz#9dd8a457a09b4e65c8266c029f1847fa78dead20" + integrity sha512-lJX2dEWx0SGH4O6p+7FPwYmJ/bu1JbcGJ8RLaG9b7liIgZ85itUVEPbMtWRVrde/0fnDPEPHW10ZsKW3kVsE9A== tldts@^7.0.5: - version "7.0.17" - resolved "https://registry.yarnpkg.com/tldts/-/tldts-7.0.17.tgz#a6cdc067b9e80ea05f3be471c0ea410688cc78b2" - integrity sha512-Y1KQBgDd/NUc+LfOtKS6mNsC9CCaH+m2P1RoIZy7RAPo3C3/t8X45+zgut31cRZtZ3xKPjfn3TkGTrctC2TQIQ== + version "7.0.19" + resolved "https://registry.yarnpkg.com/tldts/-/tldts-7.0.19.tgz#84cd7a7f04e68ec93b93b106fac038c527b99368" + integrity sha512-8PWx8tvC4jDB39BQw1m4x8y5MH1BcQ5xHeL2n7UVFulMPH/3Q0uiamahFJ3lXA0zO2SUyRXuVVbWSDmstlt9YA== dependencies: - tldts-core "^7.0.17" + tldts-core "^7.0.19" tmpl@1.0.5: version "1.0.5" @@ -3598,11 +3583,18 @@ type-fest@^0.21.3: resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.21.3.tgz#d260a24b0198436e133fa26a524a6d65fa3b2e37" integrity sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w== -type-fest@^4.26.1, type-fest@^4.41.0: +type-fest@^4.41.0: version "4.41.0" resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-4.41.0.tgz#6ae1c8e5731273c2bf1f58ad39cbae2c91a46c58" integrity sha512-TeTSQ6H5YHvpqVwBRcnLDCBnDOHWYu7IvGbHT6N8AOymcr9PJGjc1GTtiWZTYg0NCgYwvnYWEkVChQAr9bjfwA== +type-fest@^5.2.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-5.2.0.tgz#7dd671273eb6bcba71af0babe303e8dbab60f795" + integrity sha512-xxCJm+Bckc6kQBknN7i9fnP/xobQRsRQxR01CztFkp/h++yfVxUUcmMgfR2HttJx/dpWjS9ubVuyspJv24Q9DA== + dependencies: + tagged-tag "^1.0.0" + typed-array-buffer@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/typed-array-buffer/-/typed-array-buffer-1.0.3.tgz#a72395450a4869ec033fd549371b47af3a2ee536" @@ -3637,6 +3629,11 @@ universalify@^0.2.0: resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.2.0.tgz#6451760566fa857534745ab1dde952d1b1761be0" integrity sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg== +until-async@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/until-async/-/until-async-3.0.2.tgz#447f1531fdd7bb2b4c7a98869bdb1a4c2a23865f" + integrity sha512-IiSk4HlzAMqTUseHHe3VhIGyuFmN90zMTpD3Z3y8jeQbzLIq500MVM7Jq2vUAnTKAFPJrqwkzr6PoTcPhGcOiw== + update-browserslist-db@^1.1.4: version "1.1.4" resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.1.4.tgz#7802aa2ae91477f255b86e0e46dbc787a206ad4a" @@ -3710,9 +3707,9 @@ webpack-sources@^3.3.3: integrity sha512-yd1RBzSGanHkitROoPFd6qsrxt+oFhg/129YzheDGqeustzX0vTZJZsSsQjVQC4yzBQ56K55XU8gaNCtIzOnTg== webpack@^5.97.1: - version "5.102.1" - resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.102.1.tgz#1003a3024741a96ba99c37431938bf61aad3d988" - integrity sha512-7h/weGm9d/ywQ6qzJ+Xy+r9n/3qgp/thalBbpOi5i223dPXKi04IBtqPN9nTd+jBc7QKfvDbaBnFipYp4sJAUQ== + version "5.103.0" + resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.103.0.tgz#17a7c5a5020d5a3a37c118d002eade5ee2c6f3da" + integrity sha512-HU1JOuV1OavsZ+mfigY0j8d1TgQgbZ6M+J75zDkpEAwYeXjWSqrGJtgnPblJjd/mAyTNQ7ygw0MiKOn6etz8yw== dependencies: "@types/eslint-scope" "^3.7.7" "@types/estree" "^1.0.8" @@ -3731,7 +3728,7 @@ webpack@^5.97.1: glob-to-regexp "^0.4.1" graceful-fs "^4.2.11" json-parse-even-better-errors "^2.3.1" - loader-runner "^4.2.0" + loader-runner "^4.3.1" mime-types "^2.1.27" neo-async "^2.6.2" schema-utils "^4.3.3" @@ -3872,7 +3869,7 @@ yocto-queue@^0.1.0: resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b" integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q== -yoctocolors-cjs@^2.1.2: +yoctocolors-cjs@^2.1.3: version "2.1.3" resolved "https://registry.yarnpkg.com/yoctocolors-cjs/-/yoctocolors-cjs-2.1.3.tgz#7e4964ea8ec422b7a40ac917d3a344cfd2304baa" integrity sha512-U/PBtDf35ff0D8X8D0jfdzHYEPFxAI7jJlxZXwCSez5M3190m+QobIfh+sWDWSHMCWWJN2AWamkegn6vr6YBTw==