From a4be2f5887d60a2ecf13bf6626272317489dd4bc Mon Sep 17 00:00:00 2001 From: fern-api <115122769+fern-api[bot]@users.noreply.github.com> Date: Wed, 27 May 2026 11:27:16 +0000 Subject: [PATCH] SDK regeneration --- .fern/metadata.json | 4 +- reference.md | 2937 +++++++++++------ src/Client.ts | 6 + src/api/errors/ServiceUnavailableError.ts | 22 + src/api/errors/index.ts | 1 + src/api/resources/assets/client/Client.ts | 6 +- .../client/requests/AssetsListRequest.ts | 8 +- .../resources/customFonts/client/Client.ts | 1046 ++++++ src/api/resources/customFonts/client/index.ts | 1 + .../requests/CustomFontBatchDeleteRequest.ts | 15 + .../requests/CustomFontsCreateRequest.ts | 31 + .../client/requests/CustomFontsListRequest.ts | 15 + .../requests/CustomFontsReplaceFileRequest.ts | 19 + .../requests/CustomFontsUpdateRequest.ts | 18 + .../customFonts/client/requests/index.ts | 5 + src/api/resources/customFonts/exports.ts | 4 + src/api/resources/customFonts/index.ts | 2 + .../CustomFontBatchDeleteRequestItemsItem.ts | 6 + .../CustomFontsCreateRequestFontDisplay.ts | 12 + .../types/CustomFontsGetResponse.ts | 7 + .../CustomFontsUpdateRequestFontDisplay.ts | 12 + .../types/CustomFontsUpdateResponse.ts | 7 + src/api/resources/customFonts/types/index.ts | 5 + src/api/resources/index.ts | 3 + .../client/requests/PageMetadataWrite.ts | 5 +- .../pages/resources/scripts/client/Client.ts | 4 + src/api/resources/scripts/client/Client.ts | 6 + src/api/resources/sites/client/Client.ts | 11 +- .../client/requests/SitesPublishRequest.ts | 2 + .../resources/googleTag/client/Client.ts | 547 +++ .../sites/resources/googleTag/client/index.ts | 1 + .../sites/resources/googleTag/exports.ts | 4 + .../sites/resources/googleTag/index.ts | 1 + src/api/resources/sites/resources/index.ts | 1 + .../sites/resources/scripts/client/Client.ts | 6 + .../sites/types/SitesPublishResponse.ts | 2 + .../types/SitesPublishResponsePublishScope.ts | 9 + src/api/resources/sites/types/index.ts | 1 + src/api/resources/token/client/Client.ts | 2 +- src/api/resources/webhooks/client/Client.ts | 2 +- src/api/types/Asset.ts | 5 + src/api/types/CustomFont.ts | 27 + src/api/types/CustomFontAxis.ts | 17 + .../types/CustomFontBatchDeleteResponse.ts | 11 + ...ustomFontBatchDeleteResponseDeletedItem.ts | 6 + ...CustomFontBatchDeleteResponseFailedItem.ts | 10 + src/api/types/CustomFontCreateResponse.ts | 11 + src/api/types/CustomFontFontDisplay.ts | 11 + src/api/types/CustomFontFormat.ts | 12 + src/api/types/CustomFontUpload.ts | 14 + src/api/types/CustomFontUploadFields.ts | 33 + src/api/types/CustomFonts.ts | 11 + src/api/types/ErrorCode.ts | 1 + src/api/types/FormSubmission.ts | 2 + src/api/types/FormSubmissionTriggerPayload.ts | 2 + src/api/types/GoogleTagId.ts | 13 + src/api/types/GoogleTagIds.ts | 11 + src/api/types/PageCreatedWebhookPayload.ts | 8 + src/api/types/PageDeletedWebhookPayload.ts | 8 + .../PageMetadataUpdatedWebhookPayload.ts | 8 + src/api/types/SitePublishPayload.ts | 6 + .../types/SitePublishPayloadPublishScope.ts | 9 + src/api/types/index.ts | 14 + .../resources/customFonts/client/index.ts | 1 + .../requests/CustomFontBatchDeleteRequest.ts | 19 + .../requests/CustomFontsCreateRequest.ts | 32 + .../requests/CustomFontsReplaceFileRequest.ts | 23 + .../requests/CustomFontsUpdateRequest.ts | 25 + .../customFonts/client/requests/index.ts | 4 + .../resources/customFonts/index.ts | 2 + .../CustomFontBatchDeleteRequestItemsItem.ts | 18 + .../CustomFontsCreateRequestFontDisplay.ts | 14 + .../types/CustomFontsGetResponse.ts | 19 + .../CustomFontsUpdateRequestFontDisplay.ts | 14 + .../types/CustomFontsUpdateResponse.ts | 19 + .../resources/customFonts/types/index.ts | 5 + src/serialization/resources/index.ts | 3 + .../client/requests/SitesPublishRequest.ts | 2 + .../sites/types/SitesPublishResponse.ts | 3 + .../types/SitesPublishResponsePublishScope.ts | 14 + .../resources/sites/types/index.ts | 1 + src/serialization/types/Asset.ts | 2 + src/serialization/types/CustomFont.ts | 35 + src/serialization/types/CustomFontAxis.ts | 24 + .../types/CustomFontBatchDeleteResponse.ts | 22 + ...ustomFontBatchDeleteResponseDeletedItem.ts | 18 + ...CustomFontBatchDeleteResponseFailedItem.ts | 22 + .../types/CustomFontCreateResponse.ts | 22 + .../types/CustomFontFontDisplay.ts | 14 + src/serialization/types/CustomFontFormat.ts | 12 + src/serialization/types/CustomFontUpload.ts | 23 + .../types/CustomFontUploadFields.ts | 42 + src/serialization/types/CustomFonts.ts | 20 + src/serialization/types/ErrorCode.ts | 2 + src/serialization/types/FormSubmission.ts | 2 + .../types/FormSubmissionTriggerPayload.ts | 2 + src/serialization/types/GoogleTagId.ts | 20 + src/serialization/types/GoogleTagIds.ts | 17 + .../types/PageCreatedWebhookPayload.ts | 8 + .../types/PageDeletedWebhookPayload.ts | 8 + .../PageMetadataUpdatedWebhookPayload.ts | 8 + src/serialization/types/SitePublishPayload.ts | 5 + .../types/SitePublishPayloadPublishScope.ts | 14 + src/serialization/types/index.ts | 14 + tests/wire/assets.test.ts | 7 + tests/wire/customFonts.test.ts | 1624 +++++++++ tests/wire/forms.test.ts | 6 + tests/wire/sites.test.ts | 2 + tests/wire/sites/forms.test.ts | 8 + tests/wire/sites/googleTag.test.ts | 655 ++++ yarn.lock | 582 ++-- 111 files changed, 7163 insertions(+), 1341 deletions(-) create mode 100644 src/api/errors/ServiceUnavailableError.ts create mode 100644 src/api/resources/customFonts/client/Client.ts create mode 100644 src/api/resources/customFonts/client/index.ts create mode 100644 src/api/resources/customFonts/client/requests/CustomFontBatchDeleteRequest.ts create mode 100644 src/api/resources/customFonts/client/requests/CustomFontsCreateRequest.ts create mode 100644 src/api/resources/customFonts/client/requests/CustomFontsListRequest.ts create mode 100644 src/api/resources/customFonts/client/requests/CustomFontsReplaceFileRequest.ts create mode 100644 src/api/resources/customFonts/client/requests/CustomFontsUpdateRequest.ts create mode 100644 src/api/resources/customFonts/client/requests/index.ts create mode 100644 src/api/resources/customFonts/exports.ts create mode 100644 src/api/resources/customFonts/index.ts create mode 100644 src/api/resources/customFonts/types/CustomFontBatchDeleteRequestItemsItem.ts create mode 100644 src/api/resources/customFonts/types/CustomFontsCreateRequestFontDisplay.ts create mode 100644 src/api/resources/customFonts/types/CustomFontsGetResponse.ts create mode 100644 src/api/resources/customFonts/types/CustomFontsUpdateRequestFontDisplay.ts create mode 100644 src/api/resources/customFonts/types/CustomFontsUpdateResponse.ts create mode 100644 src/api/resources/customFonts/types/index.ts create mode 100644 src/api/resources/sites/resources/googleTag/client/Client.ts create mode 100644 src/api/resources/sites/resources/googleTag/client/index.ts create mode 100644 src/api/resources/sites/resources/googleTag/exports.ts create mode 100644 src/api/resources/sites/resources/googleTag/index.ts create mode 100644 src/api/resources/sites/types/SitesPublishResponsePublishScope.ts create mode 100644 src/api/types/CustomFont.ts create mode 100644 src/api/types/CustomFontAxis.ts create mode 100644 src/api/types/CustomFontBatchDeleteResponse.ts create mode 100644 src/api/types/CustomFontBatchDeleteResponseDeletedItem.ts create mode 100644 src/api/types/CustomFontBatchDeleteResponseFailedItem.ts create mode 100644 src/api/types/CustomFontCreateResponse.ts create mode 100644 src/api/types/CustomFontFontDisplay.ts create mode 100644 src/api/types/CustomFontFormat.ts create mode 100644 src/api/types/CustomFontUpload.ts create mode 100644 src/api/types/CustomFontUploadFields.ts create mode 100644 src/api/types/CustomFonts.ts create mode 100644 src/api/types/GoogleTagId.ts create mode 100644 src/api/types/GoogleTagIds.ts create mode 100644 src/api/types/SitePublishPayloadPublishScope.ts create mode 100644 src/serialization/resources/customFonts/client/index.ts create mode 100644 src/serialization/resources/customFonts/client/requests/CustomFontBatchDeleteRequest.ts create mode 100644 src/serialization/resources/customFonts/client/requests/CustomFontsCreateRequest.ts create mode 100644 src/serialization/resources/customFonts/client/requests/CustomFontsReplaceFileRequest.ts create mode 100644 src/serialization/resources/customFonts/client/requests/CustomFontsUpdateRequest.ts create mode 100644 src/serialization/resources/customFonts/client/requests/index.ts create mode 100644 src/serialization/resources/customFonts/index.ts create mode 100644 src/serialization/resources/customFonts/types/CustomFontBatchDeleteRequestItemsItem.ts create mode 100644 src/serialization/resources/customFonts/types/CustomFontsCreateRequestFontDisplay.ts create mode 100644 src/serialization/resources/customFonts/types/CustomFontsGetResponse.ts create mode 100644 src/serialization/resources/customFonts/types/CustomFontsUpdateRequestFontDisplay.ts create mode 100644 src/serialization/resources/customFonts/types/CustomFontsUpdateResponse.ts create mode 100644 src/serialization/resources/customFonts/types/index.ts create mode 100644 src/serialization/resources/sites/types/SitesPublishResponsePublishScope.ts create mode 100644 src/serialization/types/CustomFont.ts create mode 100644 src/serialization/types/CustomFontAxis.ts create mode 100644 src/serialization/types/CustomFontBatchDeleteResponse.ts create mode 100644 src/serialization/types/CustomFontBatchDeleteResponseDeletedItem.ts create mode 100644 src/serialization/types/CustomFontBatchDeleteResponseFailedItem.ts create mode 100644 src/serialization/types/CustomFontCreateResponse.ts create mode 100644 src/serialization/types/CustomFontFontDisplay.ts create mode 100644 src/serialization/types/CustomFontFormat.ts create mode 100644 src/serialization/types/CustomFontUpload.ts create mode 100644 src/serialization/types/CustomFontUploadFields.ts create mode 100644 src/serialization/types/CustomFonts.ts create mode 100644 src/serialization/types/GoogleTagId.ts create mode 100644 src/serialization/types/GoogleTagIds.ts create mode 100644 src/serialization/types/SitePublishPayloadPublishScope.ts create mode 100644 tests/wire/customFonts.test.ts create mode 100644 tests/wire/sites/googleTag.test.ts diff --git a/.fern/metadata.json b/.fern/metadata.json index 62c4d643..5d8e3c2b 100644 --- a/.fern/metadata.json +++ b/.fern/metadata.json @@ -1,5 +1,5 @@ { - "cliVersion": "4.65.1", + "cliVersion": "5.35.2", "generatorName": "fernapi/fern-typescript-node-sdk", "generatorVersion": "3.53.13", "generatorConfig": { @@ -34,6 +34,6 @@ } } }, - "originGitCommit": "998225e70e3e266cc158f022dfdd12904d54da2d", + "originGitCommit": "35c6085f140fce134e7c17748617167aecd0d63c", "sdkVersion": "3.3.5" } diff --git a/reference.md b/reference.md index ade8c4b2..e8546993 100644 --- a/reference.md +++ b/reference.md @@ -71,7 +71,7 @@ await client.token.authorizedBy(); Information about the authorization token -Access to this endpoint requires a bearer token from a [Data Client App](/data/docs/getting-started-data-clients). +Access to this endpoint requires a bearer token from a [Data Client App](/data/docs/data-clients/getting-started). @@ -533,12 +533,15 @@ await client.sites.getCustomDomain("580e63e98c9a982ac9b8b741");
-Publishes a site to one or more more domains. +Publishes a site or an individual page to one or more domains. +If multiple individual pages are published to staging, publishing from staging to production publishes all staged changes. To publish to a specific custom domain, use the domain IDs from the [Get Custom Domains](/data/reference/sites/get-custom-domain) endpoint. You must include at least one of the `customDomains` or `publishToWebflowSubdomain` properties in the request body. +To publish an individual page instead of the entire site, provide the ID of the page in the `pageId` parameter. + This endpoint has a specific rate limit of one successful publish queue per minute. Required scope | `sites:write` @@ -1828,6 +1831,8 @@ Get a list of scripts that have been registered to a site. A site can have a max To apply a script to a site or page, the script must first be registered to a site via the [Register Script](/data/reference/custom-code/custom-code/register-hosted) endpoints. Once registered, the script can be applied to a Site or Page using the appropriate endpoints. See the documentation on [working with Custom Code](/data/docs/custom-code) for more information. +Access to this endpoint requires a bearer token obtained from an [OAuth Code Grant Flow](/data/reference/oauth-app). + Required scope | `custom_code:read`
@@ -1897,6 +1902,8 @@ Register a hosted script to a site. To apply a script to a site or page, the script must first be registered to a site via the [Register Script](/data/reference/custom-code/custom-code/register-hosted) endpoints. Once registered, the script can be applied to a Site or Page using the appropriate endpoints. See the documentation on [working with Custom Code](/data/docs/custom-code) for more information. +Access to this endpoint requires a bearer token obtained from an [OAuth Code Grant Flow](/data/reference/oauth-app). + Required scope | `custom_code:write` @@ -1979,6 +1986,8 @@ Register an inline script to a site. Inline scripts are limited to 2000 characte To apply a script to a site or page, the script must first be registered to a site via the [Register Script](/data/reference/custom-code/custom-code/register-hosted) endpoints. Once registered, the script can be applied to a Site or Page using the appropriate endpoints. See the documentation on [working with Custom Code](/data/docs/custom-code) for more information. +Access to this endpoint requires a bearer token obtained from an [OAuth Code Grant Flow](/data/reference/oauth-app). + Required scope | `custom_code:write` @@ -2075,7 +2084,8 @@ Required scope | `assets:read` await client.assets.list("580e63e98c9a982ac9b8b741", { localeId: "65427cf400e02b306eaa04a0", offset: 1, - limit: 1 + limit: 1, + folderId: "folderId" }); ``` @@ -2625,8 +2635,8 @@ await client.assets.getFolder("6390c49774a71f0e3c1a08ee"); -## Webhooks -
client.webhooks.list(site_id) -> Webflow.WebhookList +## Custom Fonts +
client.customFonts.list(site_id, { ...params }) -> Webflow.CustomFonts
@@ -2638,7 +2648,7 @@ await client.assets.getFolder("6390c49774a71f0e3c1a08ee");
-List all App-created Webhooks registered for a given site +List the custom fonts uploaded to a site. Required scope | `sites:read`
@@ -2655,7 +2665,10 @@ Required scope | `sites:read`
```typescript -await client.webhooks.list("580e63e98c9a982ac9b8b741"); +await client.customFonts.list("580e63e98c9a982ac9b8b741", { + offset: 1, + limit: 1 +}); ```
@@ -2679,7 +2692,15 @@ await client.webhooks.list("580e63e98c9a982ac9b8b741");
-**requestOptions:** `WebhooksClient.RequestOptions` +**request:** `Webflow.CustomFontsListRequest` + +
+
+ +
+
+ +**requestOptions:** `CustomFontsClient.RequestOptions`
@@ -2691,7 +2712,7 @@ await client.webhooks.list("580e63e98c9a982ac9b8b741");
-
client.webhooks.create(site_id, { ...params }) -> Webflow.Webhook +
client.customFonts.create(site_id, { ...params }) -> Webflow.CustomFontCreateResponse
@@ -2703,11 +2724,14 @@ await client.webhooks.list("580e63e98c9a982ac9b8b741");
-Create a new Webhook. +Register a custom font on a site and get a presigned S3 URL to upload the font binary. -Limit of 75 registrations per `triggerType`, per site. +The response includes a `customFont` object and an `upload` object. Use the `upload.url` and `upload.fields` +to POST the font binary directly to S3 as `multipart/form-data`. The binary must go in a field named `file` +and must be the last field in the form (an AWS S3 requirement). S3 returns `201 Created` on a successful upload. + +To learn more, see [Custom fonts](/data/docs/custom-fonts). -Access to this endpoint requires a bearer token from a [Data Client App](/data/docs/getting-started-data-clients). Required scope | `sites:write`
@@ -2723,14 +2747,13 @@ Required scope | `sites:write`
```typescript -await client.webhooks.create("580e63e98c9a982ac9b8b741", { - id: "582266e0cd48de0f0e3c6d8b", - triggerType: "form_submission", - url: "https://webhook.site/7f7f7f7f-7f7f-7f7f-7f7f-7f7f7f7f7f7f", - workspaceId: "4f4e46fd476ea8c507000001", - siteId: "562ac0395358780a1f5e6fbd", - lastTriggered: new Date("2023-02-08T23:59:28.000Z"), - createdOn: new Date("2022-11-08T23:59:28.000Z") +await client.customFonts.create("580e63e98c9a982ac9b8b741", { + fileName: "AcmeSans-Regular.woff2", + fileHash: "3c7d87c9575702bc3b1e991f4d3c638e", + fontFamily: "Acme Sans", + weight: 400, + italic: false, + fontDisplay: "auto" }); ``` @@ -2755,7 +2778,7 @@ await client.webhooks.create("580e63e98c9a982ac9b8b741", {
-**request:** `Webflow.Webhook` +**request:** `Webflow.CustomFontsCreateRequest`
@@ -2763,7 +2786,7 @@ await client.webhooks.create("580e63e98c9a982ac9b8b741", {
-**requestOptions:** `WebhooksClient.RequestOptions` +**requestOptions:** `CustomFontsClient.RequestOptions`
@@ -2775,7 +2798,7 @@ await client.webhooks.create("580e63e98c9a982ac9b8b741", {
-
client.webhooks.get(webhook_id) -> Webflow.Webhook +
client.customFonts.get(site_id, font_id) -> Webflow.CustomFontsGetResponse
@@ -2787,9 +2810,9 @@ await client.webhooks.create("580e63e98c9a982ac9b8b741", {
-Get a specific Webhook instance +Get details about a custom font on a site. -Required scope: `sites:read` +Required scope | `sites:read`
@@ -2804,7 +2827,7 @@ Required scope: `sites:read`
```typescript -await client.webhooks.get("580e64008c9a982ac9b8b754"); +await client.customFonts.get("580e63e98c9a982ac9b8b741", "66f3a1b2c4d5e6f7a8b9c0d1"); ```
@@ -2820,7 +2843,7 @@ await client.webhooks.get("580e64008c9a982ac9b8b754");
-**webhook_id:** `string` — Unique identifier for a Webhook +**site_id:** `string` — Unique identifier for a Site
@@ -2828,7 +2851,15 @@ await client.webhooks.get("580e64008c9a982ac9b8b754");
-**requestOptions:** `WebhooksClient.RequestOptions` +**font_id:** `string` — Unique identifier for a custom font on a site + +
+
+ +
+
+ +**requestOptions:** `CustomFontsClient.RequestOptions`
@@ -2840,7 +2871,7 @@ await client.webhooks.get("580e64008c9a982ac9b8b754");
-
client.webhooks.delete(webhook_id) -> void +
client.customFonts.delete(site_id, font_id) -> void
@@ -2852,9 +2883,9 @@ await client.webhooks.get("580e64008c9a982ac9b8b754");
-Remove a Webhook +Delete a custom font from a site. -Required scope: `sites:read` +Required scope | `sites:write`
@@ -2869,7 +2900,7 @@ Required scope: `sites:read`
```typescript -await client.webhooks.delete("580e64008c9a982ac9b8b754"); +await client.customFonts.delete("580e63e98c9a982ac9b8b741", "66f3a1b2c4d5e6f7a8b9c0d1"); ```
@@ -2885,7 +2916,7 @@ await client.webhooks.delete("580e64008c9a982ac9b8b754");
-**webhook_id:** `string` — Unique identifier for a Webhook +**site_id:** `string` — Unique identifier for a Site
@@ -2893,7 +2924,15 @@ await client.webhooks.delete("580e64008c9a982ac9b8b754");
-**requestOptions:** `WebhooksClient.RequestOptions` +**font_id:** `string` — Unique identifier for a custom font on a site + +
+
+ +
+
+ +**requestOptions:** `CustomFontsClient.RequestOptions`
@@ -2905,8 +2944,7 @@ await client.webhooks.delete("580e64008c9a982ac9b8b754");
-## Forms -
client.forms.list(site_id, { ...params }) -> Webflow.FormList +
client.customFonts.update(site_id, font_id, { ...params }) -> Webflow.CustomFontsUpdateResponse
@@ -2918,9 +2956,12 @@ await client.webhooks.delete("580e64008c9a982ac9b8b754");
-List forms for a given site. +Update the metadata of a custom font. The font binary is not changed by this endpoint. +To replace the binary, use [Replace custom font file](#operation/replace-custom-font-file). -Required scope | `forms:read` +The request body must include at least one of `fontFamily`, `weight`, `italic`, or `fontDisplay`. + +Required scope | `sites:write`
@@ -2935,10 +2976,7 @@ Required scope | `forms:read`
```typescript -await client.forms.list("580e63e98c9a982ac9b8b741", { - limit: 1, - offset: 1 -}); +await client.customFonts.update("580e63e98c9a982ac9b8b741", "66f3a1b2c4d5e6f7a8b9c0d1"); ```
@@ -2962,7 +3000,7 @@ await client.forms.list("580e63e98c9a982ac9b8b741", {
-**request:** `Webflow.FormsListRequest` +**font_id:** `string` — Unique identifier for a custom font on a site
@@ -2970,7 +3008,15 @@ await client.forms.list("580e63e98c9a982ac9b8b741", {
-**requestOptions:** `FormsClient.RequestOptions` +**request:** `Webflow.CustomFontsUpdateRequest` + +
+
+ +
+
+ +**requestOptions:** `CustomFontsClient.RequestOptions`
@@ -2982,7 +3028,7 @@ await client.forms.list("580e63e98c9a982ac9b8b741", {
-
client.forms.get(form_id) -> Webflow.Form +
client.customFonts.replaceFile(site_id, font_id, { ...params }) -> Webflow.CustomFontCreateResponse
@@ -2994,9 +3040,14 @@ await client.forms.list("580e63e98c9a982ac9b8b741", {
-Get information about a given form. +Replace the binary of an existing custom font while preserving its ID and any references to it. +The upload handshake is identical to [Create custom font](#operation/create-custom-font). -Required scope | `forms:read` +If the existing font has a non-empty `axes` array (a variable font), you must include an `axes` field +in the request. Send `axes: []` to declare that the new binary is a static font, or send the new variable +axes to declare it is still variable. Omitting `axes` when the existing font is variable returns `400`. + +Required scope | `sites:write`
@@ -3011,7 +3062,10 @@ Required scope | `forms:read`
```typescript -await client.forms.get("580e63e98c9a982ac9b8b741"); +await client.customFonts.replaceFile("580e63e98c9a982ac9b8b741", "66f3a1b2c4d5e6f7a8b9c0d1", { + fileName: "AcmeSans-Regular-v2.woff2", + fileHash: "3c7d87c9575702bc3b1e991f4d3c638e" +}); ```
@@ -3027,7 +3081,7 @@ await client.forms.get("580e63e98c9a982ac9b8b741");
-**form_id:** `string` — Unique identifier for a Form +**site_id:** `string` — Unique identifier for a Site
@@ -3035,7 +3089,23 @@ await client.forms.get("580e63e98c9a982ac9b8b741");
-**requestOptions:** `FormsClient.RequestOptions` +**font_id:** `string` — Unique identifier for a custom font on a site + +
+
+ +
+
+ +**request:** `Webflow.CustomFontsReplaceFileRequest` + +
+
+ +
+
+ +**requestOptions:** `CustomFontsClient.RequestOptions`
@@ -3047,7 +3117,7 @@ await client.forms.get("580e63e98c9a982ac9b8b741");
-
client.forms.listSubmissions(form_id, { ...params }) -> Webflow.FormSubmissionList +
client.customFonts.batchDelete(site_id, { ...params }) -> Webflow.CustomFontBatchDeleteResponse
@@ -3059,15 +3129,14 @@ await client.forms.get("580e63e98c9a982ac9b8b741");
-List form submissions for a given form - - - When a form is used in a component definition, each instance of the form is considered a unique form. +Delete 1-100 custom fonts in a single request. The response is always `200 OK` for a valid request body. +Per-font results are reported in the `deleted` and `failed` arrays. - To get a combined list of submissions for a form that appears across multiple component instances, use the [List Form Submissions by Site](/data/reference/forms/form-submissions/list-submissions-by-site) endpoint. - +The endpoint is idempotent: fonts that do not exist appear in `failed` with `name: "NotFound"` rather than +failing the entire request. You can safely retry a partial failure by re-sending only the IDs that did not +appear in `deleted`. -Required scope | `forms:read` +Required scope | `sites:write`
@@ -3082,9 +3151,10 @@ Required scope | `forms:read`
```typescript -await client.forms.listSubmissions("580e63e98c9a982ac9b8b741", { - offset: 1, - limit: 1 +await client.customFonts.batchDelete("580e63e98c9a982ac9b8b741", { + items: [{ + id: "66f3a1b2c4d5e6f7a8b9c0d1" + }] }); ``` @@ -3101,7 +3171,7 @@ await client.forms.listSubmissions("580e63e98c9a982ac9b8b741", {
-**form_id:** `string` — Unique identifier for a Form +**site_id:** `string` — Unique identifier for a Site
@@ -3109,7 +3179,7 @@ await client.forms.listSubmissions("580e63e98c9a982ac9b8b741", {
-**request:** `Webflow.FormsListSubmissionsRequest` +**request:** `Webflow.CustomFontBatchDeleteRequest`
@@ -3117,7 +3187,7 @@ await client.forms.listSubmissions("580e63e98c9a982ac9b8b741", {
-**requestOptions:** `FormsClient.RequestOptions` +**requestOptions:** `CustomFontsClient.RequestOptions`
@@ -3129,7 +3199,8 @@ await client.forms.listSubmissions("580e63e98c9a982ac9b8b741", {
-
client.forms.getSubmission(form_submission_id) -> Webflow.FormSubmission +## Webhooks +
client.webhooks.list(site_id) -> Webflow.WebhookList
@@ -3141,9 +3212,9 @@ await client.forms.listSubmissions("580e63e98c9a982ac9b8b741", {
-Get information about a given form submissio. +List all App-created Webhooks registered for a given site -Required scope | `forms:read` +Required scope | `sites:read`
@@ -3158,7 +3229,7 @@ Required scope | `forms:read`
```typescript -await client.forms.getSubmission("580e63e98c9a982ac9b8b741"); +await client.webhooks.list("580e63e98c9a982ac9b8b741"); ```
@@ -3174,7 +3245,7 @@ await client.forms.getSubmission("580e63e98c9a982ac9b8b741");
-**form_submission_id:** `string` — Unique identifier for a Form Submission +**site_id:** `string` — Unique identifier for a Site
@@ -3182,7 +3253,7 @@ await client.forms.getSubmission("580e63e98c9a982ac9b8b741");
-**requestOptions:** `FormsClient.RequestOptions` +**requestOptions:** `WebhooksClient.RequestOptions`
@@ -3194,7 +3265,7 @@ await client.forms.getSubmission("580e63e98c9a982ac9b8b741");
-
client.forms.deleteSubmission(form_submission_id) -> void +
client.webhooks.create(site_id, { ...params }) -> Webflow.Webhook
@@ -3206,10 +3277,12 @@ await client.forms.getSubmission("580e63e98c9a982ac9b8b741");
-Delete a form submission +Create a new Webhook. +Limit of 75 registrations per `triggerType`, per site. -Required scope | `forms:write` +Access to this endpoint requires a bearer token from a [Data Client App](/data/docs/data-clients/getting-started). +Required scope | `sites:write`
@@ -3224,7 +3297,15 @@ Required scope | `forms:write`
```typescript -await client.forms.deleteSubmission("580e63e98c9a982ac9b8b741"); +await client.webhooks.create("580e63e98c9a982ac9b8b741", { + id: "582266e0cd48de0f0e3c6d8b", + triggerType: "form_submission", + url: "https://webhook.site/7f7f7f7f-7f7f-7f7f-7f7f-7f7f7f7f7f7f", + workspaceId: "4f4e46fd476ea8c507000001", + siteId: "562ac0395358780a1f5e6fbd", + lastTriggered: new Date("2023-02-08T23:59:28.000Z"), + createdOn: new Date("2022-11-08T23:59:28.000Z") +}); ```
@@ -3240,7 +3321,7 @@ await client.forms.deleteSubmission("580e63e98c9a982ac9b8b741");
-**form_submission_id:** `string` — Unique identifier for a Form Submission +**site_id:** `string` — Unique identifier for a Site
@@ -3248,7 +3329,15 @@ await client.forms.deleteSubmission("580e63e98c9a982ac9b8b741");
-**requestOptions:** `FormsClient.RequestOptions` +**request:** `Webflow.Webhook` + +
+
+ +
+
+ +**requestOptions:** `WebhooksClient.RequestOptions`
@@ -3260,7 +3349,7 @@ await client.forms.deleteSubmission("580e63e98c9a982ac9b8b741");
-
client.forms.updateSubmission(form_submission_id, { ...params }) -> Webflow.FormSubmission +
client.webhooks.get(webhook_id) -> Webflow.Webhook
@@ -3272,9 +3361,9 @@ await client.forms.deleteSubmission("580e63e98c9a982ac9b8b741");
-Update hidden fields on a form submission +Get a specific Webhook instance -Required scope | `forms:write` +Required scope: `sites:read`
@@ -3289,7 +3378,7 @@ Required scope | `forms:write`
```typescript -await client.forms.updateSubmission("580e63e98c9a982ac9b8b741"); +await client.webhooks.get("580e64008c9a982ac9b8b754"); ```
@@ -3305,15 +3394,7 @@ await client.forms.updateSubmission("580e63e98c9a982ac9b8b741");
-**form_submission_id:** `string` — Unique identifier for a Form Submission - -
-
- -
-
- -**request:** `Webflow.FormsUpdateSubmissionRequest` +**webhook_id:** `string` — Unique identifier for a Webhook
@@ -3321,7 +3402,7 @@ await client.forms.updateSubmission("580e63e98c9a982ac9b8b741");
-**requestOptions:** `FormsClient.RequestOptions` +**requestOptions:** `WebhooksClient.RequestOptions`
@@ -3333,8 +3414,7 @@ await client.forms.updateSubmission("580e63e98c9a982ac9b8b741");
-## Products -
client.products.list(site_id, { ...params }) -> Webflow.ProductAndSkUsList +
client.webhooks.delete(webhook_id) -> void
@@ -3346,12 +3426,9 @@ await client.forms.updateSubmission("580e63e98c9a982ac9b8b741");
-Retrieve all products for a site. - -Use `limit` and `offset` to page through all products with subsequent requests. All SKUs for each product -will also be fetched and returned. The `limit`, `offset` and `total` values represent Products only and do not include any SKUs. +Remove a Webhook -Required scope | `ecommerce:read` +Required scope: `sites:read`
@@ -3366,10 +3443,7 @@ Required scope | `ecommerce:read`
```typescript -await client.products.list("580e63e98c9a982ac9b8b741", { - offset: 1, - limit: 1 -}); +await client.webhooks.delete("580e64008c9a982ac9b8b754"); ```
@@ -3385,15 +3459,7 @@ await client.products.list("580e63e98c9a982ac9b8b741", {
-**site_id:** `string` — Unique identifier for a Site - -
-
- -
-
- -**request:** `Webflow.ProductsListRequest` +**webhook_id:** `string` — Unique identifier for a Webhook
@@ -3401,7 +3467,7 @@ await client.products.list("580e63e98c9a982ac9b8b741", {
-**requestOptions:** `ProductsClient.RequestOptions` +**requestOptions:** `WebhooksClient.RequestOptions`
@@ -3413,7 +3479,8 @@ await client.products.list("580e63e98c9a982ac9b8b741", {
-
client.products.create(site_id, { ...params }) -> Webflow.ProductAndSkUs +## Forms +
client.forms.list(site_id, { ...params }) -> Webflow.FormList
@@ -3425,16 +3492,9 @@ await client.products.list("580e63e98c9a982ac9b8b741", {
-Create a new ecommerce product and defaultSKU. A product, at minimum, must have a single SKU. - -To create a product with multiple SKUs: - - First, create a list of `sku-properties`, also known as [product options](https://help.webflow.com/hc/en-us/articles/33961334531347-Create-product-options-and-variants). For example, a T-shirt product may have a "color" `sku-property`, with a list of enum values: red, yellow, and blue, another `sku-property` may be "size", with a list of enum values: small, medium, and large. - - Once, a product is created with a list of `sku-properties`, Webflow will create a **default SKU**, which is always a combination of the first `enum` values of each `sku-property`. (e.g. Small - Red - T-Shirt) - - After creation, you can create additional SKUs for the product, using the [Create SKUs endpoint.](/data/reference/ecommerce/products/create-sku) - -Upon creation, the default product type will be `Advanced`, which ensures all Product and SKU fields will be shown to users in the Designer. +List forms for a given site. -Required scope | `ecommerce:write` +Required scope | `forms:read`
@@ -3449,60 +3509,9 @@ Required scope | `ecommerce:write`
```typescript -await client.products.create("580e63e98c9a982ac9b8b741", { - publishStatus: "staging", - product: { - fieldData: { - name: "Colorful T-shirt", - slug: "colorful-t-shirt", - description: "Our best-selling t-shirt available in multiple colors and sizes", - skuProperties: [{ - id: "color", - name: "Color", - "enum": [{ - id: "red", - name: "Red", - slug: "red" - }, { - id: "yellow", - name: "Yellow", - slug: "yellow" - }, { - id: "blue", - name: "Blue", - slug: "blue" - }] - }, { - id: "size", - name: "Size", - "enum": [{ - id: "small", - name: "Small", - slug: "small" - }, { - id: "medium", - name: "Medium", - slug: "medium" - }, { - id: "large", - name: "Large", - slug: "large" - }] - }] - } - }, - sku: { - fieldData: { - name: "Colorful T-shirt - Red Small", - slug: "colorful-t-shirt-red-small", - price: { - value: 2499, - unit: "USD", - currency: "USD" - }, - mainImage: "https://rocketamp-sample-store.myshopify.com/cdn/shop/products/Gildan_2000_Antique_Cherry_Red_Front_1024x1024.jpg?v=1527232987" - } - } +await client.forms.list("580e63e98c9a982ac9b8b741", { + limit: 1, + offset: 1 }); ``` @@ -3527,7 +3536,7 @@ await client.products.create("580e63e98c9a982ac9b8b741", {
-**request:** `Webflow.ProductSkuCreate` +**request:** `Webflow.FormsListRequest`
@@ -3535,7 +3544,7 @@ await client.products.create("580e63e98c9a982ac9b8b741", {
-**requestOptions:** `ProductsClient.RequestOptions` +**requestOptions:** `FormsClient.RequestOptions`
@@ -3547,7 +3556,7 @@ await client.products.create("580e63e98c9a982ac9b8b741", {
-
client.products.get(site_id, product_id) -> Webflow.ProductAndSkUs +
client.forms.get(form_id) -> Webflow.Form
@@ -3559,10 +3568,9 @@ await client.products.create("580e63e98c9a982ac9b8b741", {
-Retrieve a single product by its ID. All of its SKUs will also be -retrieved. +Get information about a given form. -Required scope | `ecommerce:read` +Required scope | `forms:read`
@@ -3577,7 +3585,7 @@ Required scope | `ecommerce:read`
```typescript -await client.products.get("580e63e98c9a982ac9b8b741", "580e63fc8c9a982ac9b8b745"); +await client.forms.get("580e63e98c9a982ac9b8b741"); ```
@@ -3593,15 +3601,7 @@ await client.products.get("580e63e98c9a982ac9b8b741", "580e63fc8c9a982ac9b8b745"
-**site_id:** `string` — Unique identifier for a Site - -
-
- -
-
- -**product_id:** `string` — Unique identifier for a Product +**form_id:** `string` — Unique identifier for a Form
@@ -3609,7 +3609,7 @@ await client.products.get("580e63e98c9a982ac9b8b741", "580e63fc8c9a982ac9b8b745"
-**requestOptions:** `ProductsClient.RequestOptions` +**requestOptions:** `FormsClient.RequestOptions`
@@ -3621,7 +3621,7 @@ await client.products.get("580e63e98c9a982ac9b8b741", "580e63fc8c9a982ac9b8b745"
-
client.products.update(site_id, product_id, { ...params }) -> Webflow.Product +
client.forms.listSubmissions(form_id, { ...params }) -> Webflow.FormSubmissionList
@@ -3633,11 +3633,15 @@ await client.products.get("580e63e98c9a982ac9b8b741", "580e63fc8c9a982ac9b8b745"
-Update an existing Product. +List form submissions for a given form -Updating an existing Product will set the product type to `Advanced`, which ensures all Product and SKU fields will be shown to users in the Designer. + + When a form is used in a component definition, each instance of the form is considered a unique form. -Required scope | `ecommerce:write` + To get a combined list of submissions for a form that appears across multiple component instances, use the [List Form Submissions by Site](/data/reference/forms/form-submissions/list-submissions-by-site) endpoint. + + +Required scope | `forms:read`
@@ -3652,7 +3656,10 @@ Required scope | `ecommerce:write`
```typescript -await client.products.update("580e63e98c9a982ac9b8b741", "580e63fc8c9a982ac9b8b745"); +await client.forms.listSubmissions("580e63e98c9a982ac9b8b741", { + offset: 1, + limit: 1 +}); ```
@@ -3668,15 +3675,7 @@ await client.products.update("580e63e98c9a982ac9b8b741", "580e63fc8c9a982ac9b8b7
-**site_id:** `string` — Unique identifier for a Site - -
-
- -
-
- -**product_id:** `string` — Unique identifier for a Product +**form_id:** `string` — Unique identifier for a Form
@@ -3684,7 +3683,7 @@ await client.products.update("580e63e98c9a982ac9b8b741", "580e63fc8c9a982ac9b8b7
-**request:** `Webflow.ProductSkuUpdate` +**request:** `Webflow.FormsListSubmissionsRequest`
@@ -3692,7 +3691,7 @@ await client.products.update("580e63e98c9a982ac9b8b741", "580e63fc8c9a982ac9b8b7
-**requestOptions:** `ProductsClient.RequestOptions` +**requestOptions:** `FormsClient.RequestOptions`
@@ -3704,7 +3703,7 @@ await client.products.update("580e63e98c9a982ac9b8b741", "580e63fc8c9a982ac9b8b7
-
client.products.createSku(site_id, product_id, { ...params }) -> Webflow.ProductsCreateSkuResponse +
client.forms.getSubmission(form_submission_id) -> Webflow.FormSubmission
@@ -3716,11 +3715,9 @@ await client.products.update("580e63e98c9a982ac9b8b741", "580e63fc8c9a982ac9b8b7
-Create additional SKUs to manage every [option and variant of your Product.](https://help.webflow.com/hc/en-us/articles/33961334531347-Create-product-options-and-variants) - -Creating SKUs through the API will set the product type to `Advanced`, which ensures all Product and SKU fields will be shown to users in the Designer. +Get information about a given form submissio. -Required scope | `ecommerce:write` +Required scope | `forms:read`
@@ -3735,24 +3732,7 @@ Required scope | `ecommerce:write`
```typescript -await client.products.createSku("580e63e98c9a982ac9b8b741", "580e63fc8c9a982ac9b8b745", { - skus: [{ - id: "66072fb71b89448912e2681c", - cmsLocaleId: "653ad57de882f528b32e810e", - lastPublished: new Date("2023-03-17T18:47:35.000Z"), - lastUpdated: new Date("2023-03-17T18:47:35.000Z"), - createdOn: new Date("2023-03-17T18:47:35.000Z"), - fieldData: { - name: "Colorful T-shirt - Default", - slug: "colorful-t-shirt-default", - price: { - value: 2499, - unit: "USD", - currency: "USD" - } - } - }] -}); +await client.forms.getSubmission("580e63e98c9a982ac9b8b741"); ```
@@ -3768,23 +3748,7 @@ await client.products.createSku("580e63e98c9a982ac9b8b741", "580e63fc8c9a982ac9b
-**site_id:** `string` — Unique identifier for a Site - -
-
- -
-
- -**product_id:** `string` — Unique identifier for a Product - -
-
- -
-
- -**request:** `Webflow.ProductsCreateSkuRequest` +**form_submission_id:** `string` — Unique identifier for a Form Submission
@@ -3792,7 +3756,7 @@ await client.products.createSku("580e63e98c9a982ac9b8b741", "580e63fc8c9a982ac9b
-**requestOptions:** `ProductsClient.RequestOptions` +**requestOptions:** `FormsClient.RequestOptions`
@@ -3804,7 +3768,7 @@ await client.products.createSku("580e63e98c9a982ac9b8b741", "580e63fc8c9a982ac9b
-
client.products.updateSku(site_id, product_id, sku_id, { ...params }) -> Webflow.Sku +
client.forms.deleteSubmission(form_submission_id) -> void
@@ -3816,11 +3780,10 @@ await client.products.createSku("580e63e98c9a982ac9b8b741", "580e63fc8c9a982ac9b
-Update a specified SKU. +Delete a form submission -Updating an existing SKU will set the Product type to `Advanced`, which ensures all Product and SKU fields will be shown to users in the Designer. -Required scope | `ecommerce:write` +Required scope | `forms:write`
@@ -3835,24 +3798,7 @@ Required scope | `ecommerce:write`
```typescript -await client.products.updateSku("580e63e98c9a982ac9b8b741", "580e63fc8c9a982ac9b8b745", "5e8518516e147040726cc415", { - sku: { - id: "66072fb71b89448912e2681c", - cmsLocaleId: "653ad57de882f528b32e810e", - lastPublished: new Date("2023-03-17T18:47:35.000Z"), - lastUpdated: new Date("2023-03-17T18:47:35.000Z"), - createdOn: new Date("2023-03-17T18:47:35.000Z"), - fieldData: { - name: "Colorful T-shirt - Default", - slug: "colorful-t-shirt-default", - price: { - value: 2499, - unit: "USD", - currency: "USD" - } - } - } -}); +await client.forms.deleteSubmission("580e63e98c9a982ac9b8b741"); ```
@@ -3868,31 +3814,7 @@ await client.products.updateSku("580e63e98c9a982ac9b8b741", "580e63fc8c9a982ac9b
-**site_id:** `string` — Unique identifier for a Site - -
-
- -
-
- -**product_id:** `string` — Unique identifier for a Product - -
-
- -
-
- -**sku_id:** `string` — Unique identifier for a SKU - -
-
- -
-
- -**request:** `Webflow.ProductsUpdateSkuRequest` +**form_submission_id:** `string` — Unique identifier for a Form Submission
@@ -3900,7 +3822,7 @@ await client.products.updateSku("580e63e98c9a982ac9b8b741", "580e63fc8c9a982ac9b
-**requestOptions:** `ProductsClient.RequestOptions` +**requestOptions:** `FormsClient.RequestOptions`
@@ -3912,8 +3834,7 @@ await client.products.updateSku("580e63e98c9a982ac9b8b741", "580e63fc8c9a982ac9b
-## Orders -
client.orders.list(site_id, { ...params }) -> Webflow.OrderList +
client.forms.updateSubmission(form_submission_id, { ...params }) -> Webflow.FormSubmission
@@ -3925,9 +3846,9 @@ await client.products.updateSku("580e63e98c9a982ac9b8b741", "580e63fc8c9a982ac9b
-List all orders created for a given site. +Update hidden fields on a form submission -Required scope | `ecommerce:read` +Required scope | `forms:write`
@@ -3942,11 +3863,7 @@ Required scope | `ecommerce:read`
```typescript -await client.orders.list("580e63e98c9a982ac9b8b741", { - status: "pending", - offset: 1, - limit: 1 -}); +await client.forms.updateSubmission("580e63e98c9a982ac9b8b741"); ```
@@ -3962,7 +3879,7 @@ await client.orders.list("580e63e98c9a982ac9b8b741", {
-**site_id:** `string` — Unique identifier for a Site +**form_submission_id:** `string` — Unique identifier for a Form Submission
@@ -3970,7 +3887,7 @@ await client.orders.list("580e63e98c9a982ac9b8b741", {
-**request:** `Webflow.OrdersListRequest` +**request:** `Webflow.FormsUpdateSubmissionRequest`
@@ -3978,7 +3895,7 @@ await client.orders.list("580e63e98c9a982ac9b8b741", {
-**requestOptions:** `OrdersClient.RequestOptions` +**requestOptions:** `FormsClient.RequestOptions`
@@ -3990,7 +3907,8 @@ await client.orders.list("580e63e98c9a982ac9b8b741", {
-
client.orders.get(site_id, order_id) -> Webflow.Order +## Products +
client.products.list(site_id, { ...params }) -> Webflow.ProductAndSkUsList
@@ -4002,8 +3920,10 @@ await client.orders.list("580e63e98c9a982ac9b8b741", {
-Retrieve a single product by its ID. All of its SKUs will also be -retrieved. +Retrieve all products for a site. + +Use `limit` and `offset` to page through all products with subsequent requests. All SKUs for each product +will also be fetched and returned. The `limit`, `offset` and `total` values represent Products only and do not include any SKUs. Required scope | `ecommerce:read`
@@ -4020,7 +3940,10 @@ Required scope | `ecommerce:read`
```typescript -await client.orders.get("580e63e98c9a982ac9b8b741", "5e8518516e147040726cc415"); +await client.products.list("580e63e98c9a982ac9b8b741", { + offset: 1, + limit: 1 +}); ```
@@ -4044,7 +3967,7 @@ await client.orders.get("580e63e98c9a982ac9b8b741", "5e8518516e147040726cc415");
-**order_id:** `string` — Unique identifier for an Order +**request:** `Webflow.ProductsListRequest`
@@ -4052,7 +3975,7 @@ await client.orders.get("580e63e98c9a982ac9b8b741", "5e8518516e147040726cc415");
-**requestOptions:** `OrdersClient.RequestOptions` +**requestOptions:** `ProductsClient.RequestOptions`
@@ -4064,7 +3987,7 @@ await client.orders.get("580e63e98c9a982ac9b8b741", "5e8518516e147040726cc415");
-
client.orders.update(site_id, order_id, { ...params }) -> Webflow.Order +
client.products.create(site_id, { ...params }) -> Webflow.ProductAndSkUs
@@ -4076,9 +3999,14 @@ await client.orders.get("580e63e98c9a982ac9b8b741", "5e8518516e147040726cc415");
-This API lets you update the fields, `comment`, `shippingProvider`, -and/or `shippingTracking` for a given order. All three fields can be -updated simultaneously or independently. +Create a new ecommerce product and defaultSKU. A product, at minimum, must have a single SKU. + +To create a product with multiple SKUs: + - First, create a list of `sku-properties`, also known as [product options](https://help.webflow.com/hc/en-us/articles/33961334531347-Create-product-options-and-variants). For example, a T-shirt product may have a "color" `sku-property`, with a list of enum values: red, yellow, and blue, another `sku-property` may be "size", with a list of enum values: small, medium, and large. + - Once, a product is created with a list of `sku-properties`, Webflow will create a **default SKU**, which is always a combination of the first `enum` values of each `sku-property`. (e.g. Small - Red - T-Shirt) + - After creation, you can create additional SKUs for the product, using the [Create SKUs endpoint.](/data/reference/ecommerce/products/create-sku) + +Upon creation, the default product type will be `Advanced`, which ensures all Product and SKU fields will be shown to users in the Designer. Required scope | `ecommerce:write`
@@ -4095,31 +4023,77 @@ Required scope | `ecommerce:write`
```typescript -await client.orders.update("580e63e98c9a982ac9b8b741", "5e8518516e147040726cc415"); - -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
+await client.products.create("580e63e98c9a982ac9b8b741", { + publishStatus: "staging", + product: { + fieldData: { + name: "Colorful T-shirt", + slug: "colorful-t-shirt", + description: "Our best-selling t-shirt available in multiple colors and sizes", + skuProperties: [{ + id: "color", + name: "Color", + "enum": [{ + id: "red", + name: "Red", + slug: "red" + }, { + id: "yellow", + name: "Yellow", + slug: "yellow" + }, { + id: "blue", + name: "Blue", + slug: "blue" + }] + }, { + id: "size", + name: "Size", + "enum": [{ + id: "small", + name: "Small", + slug: "small" + }, { + id: "medium", + name: "Medium", + slug: "medium" + }, { + id: "large", + name: "Large", + slug: "large" + }] + }] + } + }, + sku: { + fieldData: { + name: "Colorful T-shirt - Red Small", + slug: "colorful-t-shirt-red-small", + price: { + value: 2499, + unit: "USD", + currency: "USD" + }, + mainImage: "https://rocketamp-sample-store.myshopify.com/cdn/shop/products/Gildan_2000_Antique_Cherry_Red_Front_1024x1024.jpg?v=1527232987" + } + } +}); -**site_id:** `string` — Unique identifier for a Site - +``` +
+
+#### ⚙️ Parameters +
-**order_id:** `string` — Unique identifier for an Order +
+
+ +**site_id:** `string` — Unique identifier for a Site
@@ -4127,7 +4101,7 @@ await client.orders.update("580e63e98c9a982ac9b8b741", "5e8518516e147040726cc415
-**request:** `Webflow.OrdersUpdateRequest` +**request:** `Webflow.ProductSkuCreate`
@@ -4135,7 +4109,7 @@ await client.orders.update("580e63e98c9a982ac9b8b741", "5e8518516e147040726cc415
-**requestOptions:** `OrdersClient.RequestOptions` +**requestOptions:** `ProductsClient.RequestOptions`
@@ -4147,7 +4121,7 @@ await client.orders.update("580e63e98c9a982ac9b8b741", "5e8518516e147040726cc415
-
client.orders.updateFulfill(site_id, order_id, { ...params }) -> Webflow.Order +
client.products.get(site_id, product_id) -> Webflow.ProductAndSkUs
@@ -4159,9 +4133,10 @@ await client.orders.update("580e63e98c9a982ac9b8b741", "5e8518516e147040726cc415
-Updates an order's status to fulfilled +Retrieve a single product by its ID. All of its SKUs will also be +retrieved. -Required scope | `ecommerce:write` +Required scope | `ecommerce:read`
@@ -4176,7 +4151,7 @@ Required scope | `ecommerce:write`
```typescript -await client.orders.updateFulfill("580e63e98c9a982ac9b8b741", "5e8518516e147040726cc415"); +await client.products.get("580e63e98c9a982ac9b8b741", "580e63fc8c9a982ac9b8b745"); ```
@@ -4200,15 +4175,7 @@ await client.orders.updateFulfill("580e63e98c9a982ac9b8b741", "5e8518516e1470407
-**order_id:** `string` — Unique identifier for an Order - -
-
- -
-
- -**request:** `Webflow.OrdersUpdateFulfillRequest` +**product_id:** `string` — Unique identifier for a Product
@@ -4216,7 +4183,7 @@ await client.orders.updateFulfill("580e63e98c9a982ac9b8b741", "5e8518516e1470407
-**requestOptions:** `OrdersClient.RequestOptions` +**requestOptions:** `ProductsClient.RequestOptions`
@@ -4228,7 +4195,7 @@ await client.orders.updateFulfill("580e63e98c9a982ac9b8b741", "5e8518516e1470407
-
client.orders.updateUnfulfill(site_id, order_id) -> Webflow.Order +
client.products.update(site_id, product_id, { ...params }) -> Webflow.Product
@@ -4240,7 +4207,9 @@ await client.orders.updateFulfill("580e63e98c9a982ac9b8b741", "5e8518516e1470407
-Updates an order's status to unfulfilled +Update an existing Product. + +Updating an existing Product will set the product type to `Advanced`, which ensures all Product and SKU fields will be shown to users in the Designer. Required scope | `ecommerce:write`
@@ -4257,7 +4226,7 @@ Required scope | `ecommerce:write`
```typescript -await client.orders.updateUnfulfill("580e63e98c9a982ac9b8b741", "5e8518516e147040726cc415"); +await client.products.update("580e63e98c9a982ac9b8b741", "580e63fc8c9a982ac9b8b745"); ```
@@ -4281,7 +4250,7 @@ await client.orders.updateUnfulfill("580e63e98c9a982ac9b8b741", "5e8518516e14704
-**order_id:** `string` — Unique identifier for an Order +**product_id:** `string` — Unique identifier for a Product
@@ -4289,7 +4258,15 @@ await client.orders.updateUnfulfill("580e63e98c9a982ac9b8b741", "5e8518516e14704
-**requestOptions:** `OrdersClient.RequestOptions` +**request:** `Webflow.ProductSkuUpdate` + +
+
+ +
+
+ +**requestOptions:** `ProductsClient.RequestOptions`
@@ -4301,7 +4278,7 @@ await client.orders.updateUnfulfill("580e63e98c9a982ac9b8b741", "5e8518516e14704
-
client.orders.refund(site_id, order_id, { ...params }) -> Webflow.Order +
client.products.createSku(site_id, product_id, { ...params }) -> Webflow.ProductsCreateSkuResponse
@@ -4313,8 +4290,9 @@ await client.orders.updateUnfulfill("580e63e98c9a982ac9b8b741", "5e8518516e14704
-This API will reverse a Stripe charge and refund an order back to a -customer. It will also set the order's status to `refunded`. +Create additional SKUs to manage every [option and variant of your Product.](https://help.webflow.com/hc/en-us/articles/33961334531347-Create-product-options-and-variants) + +Creating SKUs through the API will set the product type to `Advanced`, which ensures all Product and SKU fields will be shown to users in the Designer. Required scope | `ecommerce:write`
@@ -4331,7 +4309,24 @@ Required scope | `ecommerce:write`
```typescript -await client.orders.refund("580e63e98c9a982ac9b8b741", "5e8518516e147040726cc415"); +await client.products.createSku("580e63e98c9a982ac9b8b741", "580e63fc8c9a982ac9b8b745", { + skus: [{ + id: "66072fb71b89448912e2681c", + cmsLocaleId: "653ad57de882f528b32e810e", + lastPublished: new Date("2023-03-17T18:47:35.000Z"), + lastUpdated: new Date("2023-03-17T18:47:35.000Z"), + createdOn: new Date("2023-03-17T18:47:35.000Z"), + fieldData: { + name: "Colorful T-shirt - Default", + slug: "colorful-t-shirt-default", + price: { + value: 2499, + unit: "USD", + currency: "USD" + } + } + }] +}); ```
@@ -4355,7 +4350,7 @@ await client.orders.refund("580e63e98c9a982ac9b8b741", "5e8518516e147040726cc415
-**order_id:** `string` — Unique identifier for an Order +**product_id:** `string` — Unique identifier for a Product
@@ -4363,7 +4358,7 @@ await client.orders.refund("580e63e98c9a982ac9b8b741", "5e8518516e147040726cc415
-**request:** `Webflow.OrdersRefundRequest` +**request:** `Webflow.ProductsCreateSkuRequest`
@@ -4371,7 +4366,7 @@ await client.orders.refund("580e63e98c9a982ac9b8b741", "5e8518516e147040726cc415
-**requestOptions:** `OrdersClient.RequestOptions` +**requestOptions:** `ProductsClient.RequestOptions`
@@ -4383,8 +4378,7 @@ await client.orders.refund("580e63e98c9a982ac9b8b741", "5e8518516e147040726cc415
-## Inventory -
client.inventory.list(sku_collection_id, sku_id) -> Webflow.InventoryItem +
client.products.updateSku(site_id, product_id, sku_id, { ...params }) -> Webflow.Sku
@@ -4396,9 +4390,11 @@ await client.orders.refund("580e63e98c9a982ac9b8b741", "5e8518516e147040726cc415
-List the current inventory levels for a particular SKU item. +Update a specified SKU. -Required scope | `ecommerce:read` +Updating an existing SKU will set the Product type to `Advanced`, which ensures all Product and SKU fields will be shown to users in the Designer. + +Required scope | `ecommerce:write`
@@ -4413,7 +4409,24 @@ Required scope | `ecommerce:read`
```typescript -await client.inventory.list("6377a7c4b7a79608c34a46f7", "5e8518516e147040726cc415"); +await client.products.updateSku("580e63e98c9a982ac9b8b741", "580e63fc8c9a982ac9b8b745", "5e8518516e147040726cc415", { + sku: { + id: "66072fb71b89448912e2681c", + cmsLocaleId: "653ad57de882f528b32e810e", + lastPublished: new Date("2023-03-17T18:47:35.000Z"), + lastUpdated: new Date("2023-03-17T18:47:35.000Z"), + createdOn: new Date("2023-03-17T18:47:35.000Z"), + fieldData: { + name: "Colorful T-shirt - Default", + slug: "colorful-t-shirt-default", + price: { + value: 2499, + unit: "USD", + currency: "USD" + } + } + } +}); ```
@@ -4429,7 +4442,15 @@ await client.inventory.list("6377a7c4b7a79608c34a46f7", "5e8518516e147040726cc41
-**sku_collection_id:** `string` — Unique identifier for a SKU collection. Use the List Collections API to find this ID. +**site_id:** `string` — Unique identifier for a Site + +
+
+ +
+
+ +**product_id:** `string` — Unique identifier for a Product
@@ -4445,7 +4466,15 @@ await client.inventory.list("6377a7c4b7a79608c34a46f7", "5e8518516e147040726cc41
-**requestOptions:** `InventoryClient.RequestOptions` +**request:** `Webflow.ProductsUpdateSkuRequest` + +
+
+ +
+
+ +**requestOptions:** `ProductsClient.RequestOptions`
@@ -4457,7 +4486,8 @@ await client.inventory.list("6377a7c4b7a79608c34a46f7", "5e8518516e147040726cc41
-
client.inventory.update(sku_collection_id, sku_id, { ...params }) -> Webflow.InventoryItem +## Orders +
client.orders.list(site_id, { ...params }) -> Webflow.OrderList
@@ -4469,13 +4499,9 @@ await client.inventory.list("6377a7c4b7a79608c34a46f7", "5e8518516e147040726cc41
-Updates the current inventory levels for a particular SKU item. - -Updates may be given in one or two methods, absolutely or incrementally. -- Absolute updates are done by setting `quantity` directly. -- Incremental updates are by specifying the inventory delta in `updateQuantity` which is then added to the `quantity` stored on the server. +List all orders created for a given site. -Required scope | `ecommerce:write` +Required scope | `ecommerce:read`
@@ -4490,8 +4516,10 @@ Required scope | `ecommerce:write`
```typescript -await client.inventory.update("6377a7c4b7a79608c34a46f7", "5e8518516e147040726cc415", { - inventoryType: "infinite" +await client.orders.list("580e63e98c9a982ac9b8b741", { + status: "pending", + offset: 1, + limit: 1 }); ``` @@ -4508,15 +4536,7 @@ await client.inventory.update("6377a7c4b7a79608c34a46f7", "5e8518516e147040726cc
-**sku_collection_id:** `string` — Unique identifier for a SKU collection. Use the List Collections API to find this ID. - -
-
- -
-
- -**sku_id:** `string` — Unique identifier for a SKU +**site_id:** `string` — Unique identifier for a Site
@@ -4524,7 +4544,7 @@ await client.inventory.update("6377a7c4b7a79608c34a46f7", "5e8518516e147040726cc
-**request:** `Webflow.InventoryUpdateRequest` +**request:** `Webflow.OrdersListRequest`
@@ -4532,7 +4552,7 @@ await client.inventory.update("6377a7c4b7a79608c34a46f7", "5e8518516e147040726cc
-**requestOptions:** `InventoryClient.RequestOptions` +**requestOptions:** `OrdersClient.RequestOptions`
@@ -4544,8 +4564,7 @@ await client.inventory.update("6377a7c4b7a79608c34a46f7", "5e8518516e147040726cc
-## Ecommerce -
client.ecommerce.getSettings(site_id) -> Webflow.EcommerceSettings +
client.orders.get(site_id, order_id) -> Webflow.Order
@@ -4557,7 +4576,8 @@ await client.inventory.update("6377a7c4b7a79608c34a46f7", "5e8518516e147040726cc
-Retrieve ecommerce settings for a site. +Retrieve a single product by its ID. All of its SKUs will also be +retrieved. Required scope | `ecommerce:read`
@@ -4574,7 +4594,7 @@ Required scope | `ecommerce:read`
```typescript -await client.ecommerce.getSettings("580e63e98c9a982ac9b8b741"); +await client.orders.get("580e63e98c9a982ac9b8b741", "5e8518516e147040726cc415"); ```
@@ -4598,7 +4618,15 @@ await client.ecommerce.getSettings("580e63e98c9a982ac9b8b741");
-**requestOptions:** `EcommerceClient.RequestOptions` +**order_id:** `string` — Unique identifier for an Order + +
+
+ +
+
+ +**requestOptions:** `OrdersClient.RequestOptions`
@@ -4610,8 +4638,7 @@ await client.ecommerce.getSettings("580e63e98c9a982ac9b8b741");
-## Collections Fields -
client.collections.fields.create(collection_id, { ...params }) -> Webflow.FieldCreate +
client.orders.update(site_id, order_id, { ...params }) -> Webflow.Order
@@ -4623,13 +4650,11 @@ await client.ecommerce.getSettings("580e63e98c9a982ac9b8b741");
-Create a custom field in a collection. - -Field validation is currently not available through the API. - -Bulk creation of fields is not supported with this endpoint. To add multiple fields at once, include them when you [create the collection.](/data/v2.0.0/reference/cms/collections/create) +This API lets you update the fields, `comment`, `shippingProvider`, +and/or `shippingTracking` for a given order. All three fields can be +updated simultaneously or independently. -Required scope | `cms:write` +Required scope | `ecommerce:write`
@@ -4644,14 +4669,7 @@ Required scope | `cms:write`
```typescript -await client.collections.fields.create("580e63fc8c9a982ac9b8b745", { - id: "562ac0395358780a1f5e6fbc", - isEditable: true, - isRequired: false, - type: "RichText", - displayName: "Post Body", - helpText: "Add the body of your post here" -}); +await client.orders.update("580e63e98c9a982ac9b8b741", "5e8518516e147040726cc415"); ```
@@ -4667,7 +4685,7 @@ await client.collections.fields.create("580e63fc8c9a982ac9b8b745", {
-**collection_id:** `string` — Unique identifier for a Collection +**site_id:** `string` — Unique identifier for a Site
@@ -4675,7 +4693,7 @@ await client.collections.fields.create("580e63fc8c9a982ac9b8b745", {
-**request:** `Webflow.FieldCreate` +**order_id:** `string` — Unique identifier for an Order
@@ -4683,7 +4701,15 @@ await client.collections.fields.create("580e63fc8c9a982ac9b8b745", {
-**requestOptions:** `FieldsClient.RequestOptions` +**request:** `Webflow.OrdersUpdateRequest` + +
+
+ +
+
+ +**requestOptions:** `OrdersClient.RequestOptions`
@@ -4695,7 +4721,7 @@ await client.collections.fields.create("580e63fc8c9a982ac9b8b745", {
-
client.collections.fields.delete(collection_id, field_id) -> void +
client.orders.updateFulfill(site_id, order_id, { ...params }) -> Webflow.Order
@@ -4707,9 +4733,9 @@ await client.collections.fields.create("580e63fc8c9a982ac9b8b745", {
-Delete a custom field in a collection. This endpoint does not currently support bulk deletion. +Updates an order's status to fulfilled -Required scope | `cms:write` +Required scope | `ecommerce:write`
@@ -4724,7 +4750,7 @@ Required scope | `cms:write`
```typescript -await client.collections.fields.delete("580e63fc8c9a982ac9b8b745", "580e63fc8c9a982ac9b8b745"); +await client.orders.updateFulfill("580e63e98c9a982ac9b8b741", "5e8518516e147040726cc415"); ```
@@ -4740,7 +4766,7 @@ await client.collections.fields.delete("580e63fc8c9a982ac9b8b745", "580e63fc8c9a
-**collection_id:** `string` — Unique identifier for a Collection +**site_id:** `string` — Unique identifier for a Site
@@ -4748,7 +4774,7 @@ await client.collections.fields.delete("580e63fc8c9a982ac9b8b745", "580e63fc8c9a
-**field_id:** `string` — Unique identifier for a Field in a collection +**order_id:** `string` — Unique identifier for an Order
@@ -4756,7 +4782,15 @@ await client.collections.fields.delete("580e63fc8c9a982ac9b8b745", "580e63fc8c9a
-**requestOptions:** `FieldsClient.RequestOptions` +**request:** `Webflow.OrdersUpdateFulfillRequest` + +
+
+ +
+
+ +**requestOptions:** `OrdersClient.RequestOptions`
@@ -4768,7 +4802,7 @@ await client.collections.fields.delete("580e63fc8c9a982ac9b8b745", "580e63fc8c9a
-
client.collections.fields.update(collection_id, field_id, { ...params }) -> Webflow.Field +
client.orders.updateUnfulfill(site_id, order_id) -> Webflow.Order
@@ -4780,9 +4814,9 @@ await client.collections.fields.delete("580e63fc8c9a982ac9b8b745", "580e63fc8c9a
-Update a custom field in a collection. +Updates an order's status to unfulfilled -Required scope | `cms:write` +Required scope | `ecommerce:write`
@@ -4797,11 +4831,7 @@ Required scope | `cms:write`
```typescript -await client.collections.fields.update("580e63fc8c9a982ac9b8b745", "580e63fc8c9a982ac9b8b745", { - isRequired: false, - displayName: "Post Body", - helpText: "Add the body of your post here" -}); +await client.orders.updateUnfulfill("580e63e98c9a982ac9b8b741", "5e8518516e147040726cc415"); ```
@@ -4817,15 +4847,7 @@ await client.collections.fields.update("580e63fc8c9a982ac9b8b745", "580e63fc8c9a
-**collection_id:** `string` — Unique identifier for a Collection - -
-
- -
-
- -**field_id:** `string` — Unique identifier for a Field in a collection +**site_id:** `string` — Unique identifier for a Site
@@ -4833,7 +4855,7 @@ await client.collections.fields.update("580e63fc8c9a982ac9b8b745", "580e63fc8c9a
-**request:** `Webflow.collections.FieldUpdate` +**order_id:** `string` — Unique identifier for an Order
@@ -4841,7 +4863,7 @@ await client.collections.fields.update("580e63fc8c9a982ac9b8b745", "580e63fc8c9a
-**requestOptions:** `FieldsClient.RequestOptions` +**requestOptions:** `OrdersClient.RequestOptions`
@@ -4853,8 +4875,7 @@ await client.collections.fields.update("580e63fc8c9a982ac9b8b745", "580e63fc8c9a
-## Collections Items -
client.collections.items.listItems(collection_id, { ...params }) -> Webflow.CollectionItemList +
client.orders.refund(site_id, order_id, { ...params }) -> Webflow.Order
@@ -4866,9 +4887,10 @@ await client.collections.fields.update("580e63fc8c9a982ac9b8b745", "580e63fc8c9a
-List of all Items within a Collection. +This API will reverse a Stripe charge and refund an order back to a +customer. It will also set the order's status to `refunded`. -Required scope | `CMS:read` +Required scope | `ecommerce:write`
@@ -4883,15 +4905,7 @@ Required scope | `CMS:read`
```typescript -await client.collections.items.listItems("580e63fc8c9a982ac9b8b745", { - cmsLocaleId: "cmsLocaleId", - offset: 1, - limit: 1, - name: "name", - slug: "slug", - sortBy: "createdOn", - sortOrder: "asc" -}); +await client.orders.refund("580e63e98c9a982ac9b8b741", "5e8518516e147040726cc415"); ```
@@ -4907,7 +4921,7 @@ await client.collections.items.listItems("580e63fc8c9a982ac9b8b745", {
-**collection_id:** `string` — Unique identifier for a Collection +**site_id:** `string` — Unique identifier for a Site
@@ -4915,7 +4929,7 @@ await client.collections.items.listItems("580e63fc8c9a982ac9b8b745", {
-**request:** `Webflow.collections.ItemsListItemsRequest` +**order_id:** `string` — Unique identifier for an Order
@@ -4923,7 +4937,15 @@ await client.collections.items.listItems("580e63fc8c9a982ac9b8b745", {
-**requestOptions:** `ItemsClient.RequestOptions` +**request:** `Webflow.OrdersRefundRequest` + +
+
+ +
+
+ +**requestOptions:** `OrdersClient.RequestOptions`
@@ -4935,7 +4957,8 @@ await client.collections.items.listItems("580e63fc8c9a982ac9b8b745", {
-
client.collections.items.createItem(collection_id, { ...params }) -> Webflow.CollectionItem +## Inventory +
client.inventory.list(sku_collection_id, sku_id) -> Webflow.InventoryItem
@@ -4947,12 +4970,9 @@ await client.collections.items.listItems("580e63fc8c9a982ac9b8b745", {
-Create Item(s) in a Collection. - - -To create items across multiple locales, please use [this endpoint.](/data/reference/cms/collection-items/staged-items/create-items) +List the current inventory levels for a particular SKU item. -Required scope | `CMS:write` +Required scope | `ecommerce:read`
@@ -4967,51 +4987,7 @@ Required scope | `CMS:write`
```typescript -await client.collections.items.createItem("580e63fc8c9a982ac9b8b745", { - skipInvalidFiles: true, - body: { - isArchived: false, - isDraft: false, - fieldData: { - name: "The Hitchhiker's Guide to the Galaxy", - slug: "hitchhikers-guide-to-the-galaxy", - "plain-text": "Don't Panic.", - "rich-text": "

A Guide to Interstellar Travel

A towel is about the most massively useful thing an interstellar hitchhiker can have. Don't forget yours!

", - "main-image": { - "fileId": "62b720ef280c7a7a3be8cabe", - "url": "/files/62b720ef280c7a7a3be8cabe_image.png" - }, - "image-gallery": [ - { - "fileId": "62b720ef280c7a7a3be8cabd", - "url": "/files/62b720ef280c7a7a3be8cabd_image.png" - }, - { - "fileId": "62b720ef280c7a7a3be8cabe", - "url": "/files/62b720ef280c7a7a3be8cabe_image.png" - } - ], - "intro-video": "https://www.youtube.com/watch?v=aJ83KAggd-4", - "official-site": "https://hitchhikers.fandom.com/wiki/The_Hitchhiker%27s_Guide_to_the_Galaxy", - "contact-email": "zaphod.beeblebrox@heartofgold.gov", - "support-phone": "424-242-4242", - "answer-to-everything": 42, - "release-date": "1979-10-12T00:00:00.000Z", - "is-featured": true, - "brand-color": "#000000", - category: "62b720ef280c7a7a3be8cabf", - author: "62b720ef280c7a7a3be8cab0", - tags: [ - "62b720ef280c7a7a3be8cab1", - "62b720ef280c7a7a3be8cab2" - ], - "downloadable-asset": { - "fileId": "62b720ef280c7a7a3be8cab3", - "url": "/files/62b720ef280c7a7a3be8cab3_document.pdf" - } - } - } -}); +await client.inventory.list("6377a7c4b7a79608c34a46f7", "5e8518516e147040726cc415"); ```
@@ -5027,7 +5003,7 @@ await client.collections.items.createItem("580e63fc8c9a982ac9b8b745", {
-**collection_id:** `string` — Unique identifier for a Collection +**sku_collection_id:** `string` — Unique identifier for a SKU collection. Use the List Collections API to find this ID.
@@ -5035,7 +5011,7 @@ await client.collections.items.createItem("580e63fc8c9a982ac9b8b745", {
-**request:** `Webflow.collections.ItemsCreateItemRequest` +**sku_id:** `string` — Unique identifier for a SKU
@@ -5043,7 +5019,7 @@ await client.collections.items.createItem("580e63fc8c9a982ac9b8b745", {
-**requestOptions:** `ItemsClient.RequestOptions` +**requestOptions:** `InventoryClient.RequestOptions`
@@ -5055,7 +5031,7 @@ await client.collections.items.createItem("580e63fc8c9a982ac9b8b745", {
-
client.collections.items.deleteItems(collection_id, { ...params }) -> void +
client.inventory.update(sku_collection_id, sku_id, { ...params }) -> Webflow.InventoryItem
@@ -5067,11 +5043,13 @@ await client.collections.items.createItem("580e63fc8c9a982ac9b8b745", {
-Delete Items from a Collection. +Updates the current inventory levels for a particular SKU item. -Items will only be deleted in the primary locale unless a `cmsLocaleId` is included in the request. +Updates may be given in one or two methods, absolutely or incrementally. +- Absolute updates are done by setting `quantity` directly. +- Incremental updates are by specifying the inventory delta in `updateQuantity` which is then added to the `quantity` stored on the server. -Required scope | `CMS:write` +Required scope | `ecommerce:write`
@@ -5086,10 +5064,8 @@ Required scope | `CMS:write`
```typescript -await client.collections.items.deleteItems("580e63fc8c9a982ac9b8b745", { - items: [{ - id: "580e64008c9a982ac9b8b754" - }] +await client.inventory.update("6377a7c4b7a79608c34a46f7", "5e8518516e147040726cc415", { + inventoryType: "infinite" }); ``` @@ -5106,7 +5082,7 @@ await client.collections.items.deleteItems("580e63fc8c9a982ac9b8b745", {
-**collection_id:** `string` — Unique identifier for a Collection +**sku_collection_id:** `string` — Unique identifier for a SKU collection. Use the List Collections API to find this ID.
@@ -5114,7 +5090,7 @@ await client.collections.items.deleteItems("580e63fc8c9a982ac9b8b745", {
-**request:** `Webflow.collections.ItemsDeleteItemsRequest` +**sku_id:** `string` — Unique identifier for a SKU
@@ -5122,7 +5098,15 @@ await client.collections.items.deleteItems("580e63fc8c9a982ac9b8b745", {
-**requestOptions:** `ItemsClient.RequestOptions` +**request:** `Webflow.InventoryUpdateRequest` + +
+
+ +
+
+ +**requestOptions:** `InventoryClient.RequestOptions`
@@ -5134,7 +5118,8 @@ await client.collections.items.deleteItems("580e63fc8c9a982ac9b8b745", {
-
client.collections.items.updateItems(collection_id, { ...params }) -> Webflow.ItemsUpdateItemsResponse +## Ecommerce +
client.ecommerce.getSettings(site_id) -> Webflow.EcommerceSettings
@@ -5146,13 +5131,9 @@ await client.collections.items.deleteItems("580e63fc8c9a982ac9b8b745", {
-Update a single item or multiple items in a Collection. - -The limit for this endpoint is 100 items. - -Items will only be updated in the primary locale, unless a `cmsLocaleId` is included in the request. +Retrieve ecommerce settings for a site. -Required scope | `CMS:write` +Required scope | `ecommerce:read`
@@ -5167,42 +5148,7 @@ Required scope | `CMS:write`
```typescript -await client.collections.items.updateItems("580e63fc8c9a982ac9b8b745", { - skipInvalidFiles: true, - items: [{ - id: "66f6ed9576ddacf3149d5ea6", - cmsLocaleId: "66f6e966c9e1dc700a857ca5", - fieldData: { - name: "Ne Paniquez Pas", - slug: "ne-paniquez-pas", - featured: false - } - }, { - id: "66f6ed9576ddacf3149d5ea6", - cmsLocaleId: "66f6e966c9e1dc700a857ca4", - fieldData: { - name: "No Entrar en P\u00E1nico", - slug: "no-entrar-en-panico", - featured: false - } - }, { - id: "66f6ed9576ddacf3149d5eaa", - cmsLocaleId: "66f6e966c9e1dc700a857ca5", - fieldData: { - name: "Au Revoir et Merci pour Tous les Poissons", - slug: "au-revoir-et-merci", - featured: false - } - }, { - id: "66f6ed9576ddacf3149d5eaa", - cmsLocaleId: "66f6e966c9e1dc700a857ca4", - fieldData: { - name: "Hasta Luego y Gracias por Todo el Pescado", - slug: "hasta-luego-y-gracias", - featured: false - } - }] -}); +await client.ecommerce.getSettings("580e63e98c9a982ac9b8b741"); ```
@@ -5218,15 +5164,7 @@ await client.collections.items.updateItems("580e63fc8c9a982ac9b8b745", {
-**collection_id:** `string` — Unique identifier for a Collection - -
-
- -
-
- -**request:** `Webflow.collections.ItemsUpdateItemsRequest` +**site_id:** `string` — Unique identifier for a Site
@@ -5234,7 +5172,7 @@ await client.collections.items.updateItems("580e63fc8c9a982ac9b8b745", {
-**requestOptions:** `ItemsClient.RequestOptions` +**requestOptions:** `EcommerceClient.RequestOptions`
@@ -5246,7 +5184,8 @@ await client.collections.items.updateItems("580e63fc8c9a982ac9b8b745", {
-
client.collections.items.listItemsLive(collection_id, { ...params }) -> Webflow.CollectionItemList +## Collections Fields +
client.collections.fields.create(collection_id, { ...params }) -> Webflow.FieldCreate
@@ -5258,13 +5197,13 @@ await client.collections.items.updateItems("580e63fc8c9a982ac9b8b745", {
-List all published items in a collection. +Create a custom field in a collection. - - 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. - +Field validation is currently not available through the API. -Required scope | `CMS:read` +Bulk creation of fields is not supported with this endpoint. To add multiple fields at once, include them when you [create the collection.](/data/v2.0.0/reference/cms/collections/create) + +Required scope | `cms:write`
@@ -5279,14 +5218,13 @@ Required scope | `CMS:read`
```typescript -await client.collections.items.listItemsLive("580e63fc8c9a982ac9b8b745", { - cmsLocaleId: "cmsLocaleId", - offset: 1, - limit: 1, - name: "name", - slug: "slug", - sortBy: "createdOn", - sortOrder: "asc" +await client.collections.fields.create("580e63fc8c9a982ac9b8b745", { + id: "562ac0395358780a1f5e6fbc", + isEditable: true, + isRequired: false, + type: "RichText", + displayName: "Post Body", + helpText: "Add the body of your post here" }); ``` @@ -5311,7 +5249,7 @@ await client.collections.items.listItemsLive("580e63fc8c9a982ac9b8b745", {
-**request:** `Webflow.collections.ItemsListItemsLiveRequest` +**request:** `Webflow.FieldCreate`
@@ -5319,7 +5257,7 @@ await client.collections.items.listItemsLive("580e63fc8c9a982ac9b8b745", {
-**requestOptions:** `ItemsClient.RequestOptions` +**requestOptions:** `FieldsClient.RequestOptions`
@@ -5331,7 +5269,7 @@ await client.collections.items.listItemsLive("580e63fc8c9a982ac9b8b745", {
-
client.collections.items.createItemLive(collection_id, { ...params }) -> Webflow.CollectionItem +
client.collections.fields.delete(collection_id, field_id) -> void
@@ -5343,13 +5281,9 @@ await client.collections.items.listItemsLive("580e63fc8c9a982ac9b8b745", {
-Create item(s) in a collection that will be immediately published to the live site. - - -To create items across multiple locales, [please use this endpoint.](/data/reference/cms/collection-items/staged-items/create-items) - +Delete a custom field in a collection. This endpoint does not currently support bulk deletion. -Required scope | `CMS:write` +Required scope | `cms:write`
@@ -5364,51 +5298,7 @@ Required scope | `CMS:write`
```typescript -await client.collections.items.createItemLive("580e63fc8c9a982ac9b8b745", { - skipInvalidFiles: true, - body: { - isArchived: false, - isDraft: false, - fieldData: { - name: "The Hitchhiker's Guide to the Galaxy", - slug: "hitchhikers-guide-to-the-galaxy", - "plain-text": "Don't Panic.", - "rich-text": "

A Guide to Interstellar Travel

A towel is about the most massively useful thing an interstellar hitchhiker can have. Don't forget yours!

", - "main-image": { - "fileId": "62b720ef280c7a7a3be8cabe", - "url": "/files/62b720ef280c7a7a3be8cabe_image.png" - }, - "image-gallery": [ - { - "fileId": "62b720ef280c7a7a3be8cabd", - "url": "/files/62b720ef280c7a7a3be8cabd_image.png" - }, - { - "fileId": "62b720ef280c7a7a3be8cabe", - "url": "/files/62b720ef280c7a7a3be8cabe_image.png" - } - ], - "intro-video": "https://www.youtube.com/watch?v=aJ83KAggd-4", - "official-site": "https://hitchhikers.fandom.com/wiki/The_Hitchhiker%27s_Guide_to_the_Galaxy", - "contact-email": "zaphod.beeblebrox@heartofgold.gov", - "support-phone": "424-242-4242", - "answer-to-everything": 42, - "release-date": "1979-10-12T00:00:00.000Z", - "is-featured": true, - "brand-color": "#000000", - category: "62b720ef280c7a7a3be8cabf", - author: "62b720ef280c7a7a3be8cab0", - tags: [ - "62b720ef280c7a7a3be8cab1", - "62b720ef280c7a7a3be8cab2" - ], - "downloadable-asset": { - "fileId": "62b720ef280c7a7a3be8cab3", - "url": "/files/62b720ef280c7a7a3be8cab3_document.pdf" - } - } - } -}); +await client.collections.fields.delete("580e63fc8c9a982ac9b8b745", "580e63fc8c9a982ac9b8b745"); ```
@@ -5432,7 +5322,7 @@ await client.collections.items.createItemLive("580e63fc8c9a982ac9b8b745", {
-**request:** `Webflow.collections.ItemsCreateItemLiveRequest` +**field_id:** `string` — Unique identifier for a Field in a collection
@@ -5440,7 +5330,7 @@ await client.collections.items.createItemLive("580e63fc8c9a982ac9b8b745", {
-**requestOptions:** `ItemsClient.RequestOptions` +**requestOptions:** `FieldsClient.RequestOptions`
@@ -5452,7 +5342,7 @@ await client.collections.items.createItemLive("580e63fc8c9a982ac9b8b745", {
-
client.collections.items.deleteItemsLive(collection_id, { ...params }) -> void +
client.collections.fields.update(collection_id, field_id, { ...params }) -> Webflow.Field
@@ -5464,11 +5354,9 @@ await client.collections.items.createItemLive("580e63fc8c9a982ac9b8b745", {
-Unpublish up to 100 items from the live site and set the `isDraft` property to `true`. - -Items will only be unpublished in the primary locale unless a `cmsLocaleId` is included in the request. +Update a custom field in a collection. -Required scope | `CMS:write` +Required scope | `cms:write`
@@ -5483,10 +5371,10 @@ Required scope | `CMS:write`
```typescript -await client.collections.items.deleteItemsLive("580e63fc8c9a982ac9b8b745", { - items: [{ - id: "580e64008c9a982ac9b8b754" - }] +await client.collections.fields.update("580e63fc8c9a982ac9b8b745", "580e63fc8c9a982ac9b8b745", { + isRequired: false, + displayName: "Post Body", + helpText: "Add the body of your post here" }); ``` @@ -5511,7 +5399,7 @@ await client.collections.items.deleteItemsLive("580e63fc8c9a982ac9b8b745", {
-**request:** `Webflow.collections.ItemsDeleteItemsLiveRequest` +**field_id:** `string` — Unique identifier for a Field in a collection
@@ -5519,7 +5407,15 @@ await client.collections.items.deleteItemsLive("580e63fc8c9a982ac9b8b745", {
-**requestOptions:** `ItemsClient.RequestOptions` +**request:** `Webflow.collections.FieldUpdate` + +
+
+ +
+
+ +**requestOptions:** `FieldsClient.RequestOptions`
@@ -5531,7 +5427,8 @@ await client.collections.items.deleteItemsLive("580e63fc8c9a982ac9b8b745", {
-
client.collections.items.updateItemsLive(collection_id, { ...params }) -> Webflow.CollectionItemListNoPagination +## Collections Items +
client.collections.items.listItems(collection_id, { ...params }) -> Webflow.CollectionItemList
@@ -5543,11 +5440,9 @@ await client.collections.items.deleteItemsLive("580e63fc8c9a982ac9b8b745", {
-Update a single published item or multiple published items (up to 100) in a Collection - -Items will only be updated in the primary locale, unless a `cmsLocaleId` is included in the request. +List of all Items within a Collection. -Required scope | `CMS:write` +Required scope | `CMS:read`
@@ -5562,41 +5457,14 @@ Required scope | `CMS:write`
```typescript -await client.collections.items.updateItemsLive("580e63fc8c9a982ac9b8b745", { - skipInvalidFiles: true, - items: [{ - id: "66f6ed9576ddacf3149d5ea6", - cmsLocaleId: "66f6e966c9e1dc700a857ca5", - fieldData: { - name: "Ne Paniquez Pas", - slug: "ne-paniquez-pas", - featured: false - } - }, { - id: "66f6ed9576ddacf3149d5ea6", - cmsLocaleId: "66f6e966c9e1dc700a857ca4", - fieldData: { - name: "No Entrar en P\u00E1nico", - slug: "no-entrar-en-panico", - featured: false - } - }, { - id: "66f6ed9576ddacf3149d5eaa", - cmsLocaleId: "66f6e966c9e1dc700a857ca5", - fieldData: { - name: "Au Revoir et Merci pour Tous les Poissons", - slug: "au-revoir-et-merci", - featured: false - } - }, { - id: "66f6ed9576ddacf3149d5eaa", - cmsLocaleId: "66f6e966c9e1dc700a857ca4", - fieldData: { - name: "Hasta Luego y Gracias por Todo el Pescado", - slug: "hasta-luego-y-gracias", - featured: false - } - }] +await client.collections.items.listItems("580e63fc8c9a982ac9b8b745", { + cmsLocaleId: "cmsLocaleId", + offset: 1, + limit: 1, + name: "name", + slug: "slug", + sortBy: "createdOn", + sortOrder: "asc" }); ``` @@ -5621,7 +5489,7 @@ await client.collections.items.updateItemsLive("580e63fc8c9a982ac9b8b745", {
-**request:** `Webflow.collections.ItemsUpdateItemsLiveRequest` +**request:** `Webflow.collections.ItemsListItemsRequest`
@@ -5641,7 +5509,7 @@ await client.collections.items.updateItemsLive("580e63fc8c9a982ac9b8b745", {
-
client.collections.items.createItems(collection_id, { ...params }) -> Webflow.BulkCollectionItem +
client.collections.items.createItem(collection_id, { ...params }) -> Webflow.CollectionItem
@@ -5653,12 +5521,10 @@ await client.collections.items.updateItemsLive("580e63fc8c9a982ac9b8b745", {
-Create an item or multiple items in a CMS Collection across multiple corresponding locales. +Create Item(s) in a Collection. - - - This endpoint can create up to 100 items in a request. - - If the `cmsLocaleIds` parameter is not included in the request, an item will only be created in the primary locale. - + +To create items across multiple locales, please use [this endpoint.](/data/reference/cms/collection-items/staged-items/create-items) Required scope | `CMS:write`
@@ -5675,14 +5541,49 @@ Required scope | `CMS:write`
```typescript -await client.collections.items.createItems("580e63fc8c9a982ac9b8b745", { +await client.collections.items.createItem("580e63fc8c9a982ac9b8b745", { skipInvalidFiles: true, - cmsLocaleIds: ["66f6e966c9e1dc700a857ca3", "66f6e966c9e1dc700a857ca4", "66f6e966c9e1dc700a857ca5"], - isArchived: false, - isDraft: false, - fieldData: { - name: "Don\u2019t Panic", - slug: "dont-panic" + body: { + isArchived: false, + isDraft: false, + fieldData: { + name: "The Hitchhiker's Guide to the Galaxy", + slug: "hitchhikers-guide-to-the-galaxy", + "plain-text": "Don't Panic.", + "rich-text": "

A Guide to Interstellar Travel

A towel is about the most massively useful thing an interstellar hitchhiker can have. Don't forget yours!

", + "main-image": { + "fileId": "62b720ef280c7a7a3be8cabe", + "url": "/files/62b720ef280c7a7a3be8cabe_image.png" + }, + "image-gallery": [ + { + "fileId": "62b720ef280c7a7a3be8cabd", + "url": "/files/62b720ef280c7a7a3be8cabd_image.png" + }, + { + "fileId": "62b720ef280c7a7a3be8cabe", + "url": "/files/62b720ef280c7a7a3be8cabe_image.png" + } + ], + "intro-video": "https://www.youtube.com/watch?v=aJ83KAggd-4", + "official-site": "https://hitchhikers.fandom.com/wiki/The_Hitchhiker%27s_Guide_to_the_Galaxy", + "contact-email": "zaphod.beeblebrox@heartofgold.gov", + "support-phone": "424-242-4242", + "answer-to-everything": 42, + "release-date": "1979-10-12T00:00:00.000Z", + "is-featured": true, + "brand-color": "#000000", + category: "62b720ef280c7a7a3be8cabf", + author: "62b720ef280c7a7a3be8cab0", + tags: [ + "62b720ef280c7a7a3be8cab1", + "62b720ef280c7a7a3be8cab2" + ], + "downloadable-asset": { + "fileId": "62b720ef280c7a7a3be8cab3", + "url": "/files/62b720ef280c7a7a3be8cab3_document.pdf" + } + } } }); @@ -5708,7 +5609,7 @@ await client.collections.items.createItems("580e63fc8c9a982ac9b8b745", {
-**request:** `Webflow.collections.CreateBulkCollectionItemRequestBody` +**request:** `Webflow.collections.ItemsCreateItemRequest`
@@ -5728,7 +5629,7 @@ await client.collections.items.createItems("580e63fc8c9a982ac9b8b745", {
-
client.collections.items.getItem(collection_id, item_id, { ...params }) -> Webflow.CollectionItem +
client.collections.items.deleteItems(collection_id, { ...params }) -> void
@@ -5740,9 +5641,11 @@ await client.collections.items.createItems("580e63fc8c9a982ac9b8b745", {
-Get details of a selected Collection Item. +Delete Items from a Collection. -Required scope | `CMS:read` +Items will only be deleted in the primary locale unless a `cmsLocaleId` is included in the request. + +Required scope | `CMS:write`
@@ -5757,8 +5660,10 @@ Required scope | `CMS:read`
```typescript -await client.collections.items.getItem("580e63fc8c9a982ac9b8b745", "580e64008c9a982ac9b8b754", { - cmsLocaleId: "cmsLocaleId" +await client.collections.items.deleteItems("580e63fc8c9a982ac9b8b745", { + items: [{ + id: "580e64008c9a982ac9b8b754" + }] }); ``` @@ -5783,15 +5688,684 @@ await client.collections.items.getItem("580e63fc8c9a982ac9b8b745", "580e64008c9a
-**item_id:** `string` — Unique identifier for an Item - -
-
- -
-
- -**request:** `Webflow.collections.ItemsGetItemRequest` +**request:** `Webflow.collections.ItemsDeleteItemsRequest` + +
+
+ +
+
+ +**requestOptions:** `ItemsClient.RequestOptions` + +
+
+
+
+ + + + +
+ +
client.collections.items.updateItems(collection_id, { ...params }) -> Webflow.ItemsUpdateItemsResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Update a single item or multiple items in a Collection. + +The limit for this endpoint is 100 items. + +Items will only be updated in the primary locale, unless a `cmsLocaleId` is included in the request. + +Required scope | `CMS:write` +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.collections.items.updateItems("580e63fc8c9a982ac9b8b745", { + skipInvalidFiles: true, + items: [{ + id: "66f6ed9576ddacf3149d5ea6", + cmsLocaleId: "66f6e966c9e1dc700a857ca5", + fieldData: { + name: "Ne Paniquez Pas", + slug: "ne-paniquez-pas", + featured: false + } + }, { + id: "66f6ed9576ddacf3149d5ea6", + cmsLocaleId: "66f6e966c9e1dc700a857ca4", + fieldData: { + name: "No Entrar en P\u00E1nico", + slug: "no-entrar-en-panico", + featured: false + } + }, { + id: "66f6ed9576ddacf3149d5eaa", + cmsLocaleId: "66f6e966c9e1dc700a857ca5", + fieldData: { + name: "Au Revoir et Merci pour Tous les Poissons", + slug: "au-revoir-et-merci", + featured: false + } + }, { + id: "66f6ed9576ddacf3149d5eaa", + cmsLocaleId: "66f6e966c9e1dc700a857ca4", + fieldData: { + name: "Hasta Luego y Gracias por Todo el Pescado", + slug: "hasta-luego-y-gracias", + featured: false + } + }] +}); + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**collection_id:** `string` — Unique identifier for a Collection + +
+
+ +
+
+ +**request:** `Webflow.collections.ItemsUpdateItemsRequest` + +
+
+ +
+
+ +**requestOptions:** `ItemsClient.RequestOptions` + +
+
+
+
+ + +
+
+
+ +
client.collections.items.listItemsLive(collection_id, { ...params }) -> Webflow.CollectionItemList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +List all published items in a collection. + + + 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` +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.collections.items.listItemsLive("580e63fc8c9a982ac9b8b745", { + cmsLocaleId: "cmsLocaleId", + offset: 1, + limit: 1, + name: "name", + slug: "slug", + sortBy: "createdOn", + sortOrder: "asc" +}); + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**collection_id:** `string` — Unique identifier for a Collection + +
+
+ +
+
+ +**request:** `Webflow.collections.ItemsListItemsLiveRequest` + +
+
+ +
+
+ +**requestOptions:** `ItemsClient.RequestOptions` + +
+
+
+
+ + +
+
+
+ +
client.collections.items.createItemLive(collection_id, { ...params }) -> Webflow.CollectionItem +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Create item(s) in a collection that will be immediately published to the live site. + + +To create items across multiple locales, [please use this endpoint.](/data/reference/cms/collection-items/staged-items/create-items) + + +Required scope | `CMS:write` +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.collections.items.createItemLive("580e63fc8c9a982ac9b8b745", { + skipInvalidFiles: true, + body: { + isArchived: false, + isDraft: false, + fieldData: { + name: "The Hitchhiker's Guide to the Galaxy", + slug: "hitchhikers-guide-to-the-galaxy", + "plain-text": "Don't Panic.", + "rich-text": "

A Guide to Interstellar Travel

A towel is about the most massively useful thing an interstellar hitchhiker can have. Don't forget yours!

", + "main-image": { + "fileId": "62b720ef280c7a7a3be8cabe", + "url": "/files/62b720ef280c7a7a3be8cabe_image.png" + }, + "image-gallery": [ + { + "fileId": "62b720ef280c7a7a3be8cabd", + "url": "/files/62b720ef280c7a7a3be8cabd_image.png" + }, + { + "fileId": "62b720ef280c7a7a3be8cabe", + "url": "/files/62b720ef280c7a7a3be8cabe_image.png" + } + ], + "intro-video": "https://www.youtube.com/watch?v=aJ83KAggd-4", + "official-site": "https://hitchhikers.fandom.com/wiki/The_Hitchhiker%27s_Guide_to_the_Galaxy", + "contact-email": "zaphod.beeblebrox@heartofgold.gov", + "support-phone": "424-242-4242", + "answer-to-everything": 42, + "release-date": "1979-10-12T00:00:00.000Z", + "is-featured": true, + "brand-color": "#000000", + category: "62b720ef280c7a7a3be8cabf", + author: "62b720ef280c7a7a3be8cab0", + tags: [ + "62b720ef280c7a7a3be8cab1", + "62b720ef280c7a7a3be8cab2" + ], + "downloadable-asset": { + "fileId": "62b720ef280c7a7a3be8cab3", + "url": "/files/62b720ef280c7a7a3be8cab3_document.pdf" + } + } + } +}); + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**collection_id:** `string` — Unique identifier for a Collection + +
+
+ +
+
+ +**request:** `Webflow.collections.ItemsCreateItemLiveRequest` + +
+
+ +
+
+ +**requestOptions:** `ItemsClient.RequestOptions` + +
+
+
+
+ + +
+
+
+ +
client.collections.items.deleteItemsLive(collection_id, { ...params }) -> void +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Unpublish up to 100 items from the live site and set the `isDraft` property to `true`. + +Items will only be unpublished in the primary locale unless a `cmsLocaleId` is included in the request. + +Required scope | `CMS:write` +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.collections.items.deleteItemsLive("580e63fc8c9a982ac9b8b745", { + items: [{ + id: "580e64008c9a982ac9b8b754" + }] +}); + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**collection_id:** `string` — Unique identifier for a Collection + +
+
+ +
+
+ +**request:** `Webflow.collections.ItemsDeleteItemsLiveRequest` + +
+
+ +
+
+ +**requestOptions:** `ItemsClient.RequestOptions` + +
+
+
+
+ + +
+
+
+ +
client.collections.items.updateItemsLive(collection_id, { ...params }) -> Webflow.CollectionItemListNoPagination +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Update a single published item or multiple published items (up to 100) in a Collection + +Items will only be updated in the primary locale, unless a `cmsLocaleId` is included in the request. + +Required scope | `CMS:write` +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.collections.items.updateItemsLive("580e63fc8c9a982ac9b8b745", { + skipInvalidFiles: true, + items: [{ + id: "66f6ed9576ddacf3149d5ea6", + cmsLocaleId: "66f6e966c9e1dc700a857ca5", + fieldData: { + name: "Ne Paniquez Pas", + slug: "ne-paniquez-pas", + featured: false + } + }, { + id: "66f6ed9576ddacf3149d5ea6", + cmsLocaleId: "66f6e966c9e1dc700a857ca4", + fieldData: { + name: "No Entrar en P\u00E1nico", + slug: "no-entrar-en-panico", + featured: false + } + }, { + id: "66f6ed9576ddacf3149d5eaa", + cmsLocaleId: "66f6e966c9e1dc700a857ca5", + fieldData: { + name: "Au Revoir et Merci pour Tous les Poissons", + slug: "au-revoir-et-merci", + featured: false + } + }, { + id: "66f6ed9576ddacf3149d5eaa", + cmsLocaleId: "66f6e966c9e1dc700a857ca4", + fieldData: { + name: "Hasta Luego y Gracias por Todo el Pescado", + slug: "hasta-luego-y-gracias", + featured: false + } + }] +}); + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**collection_id:** `string` — Unique identifier for a Collection + +
+
+ +
+
+ +**request:** `Webflow.collections.ItemsUpdateItemsLiveRequest` + +
+
+ +
+
+ +**requestOptions:** `ItemsClient.RequestOptions` + +
+
+
+
+ + +
+
+
+ +
client.collections.items.createItems(collection_id, { ...params }) -> Webflow.BulkCollectionItem +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Create an item or multiple items in a CMS Collection across multiple corresponding locales. + + + - This endpoint can create up to 100 items in a request. + - If the `cmsLocaleIds` parameter is not included in the request, an item will only be created in the primary locale. + + +Required scope | `CMS:write` +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.collections.items.createItems("580e63fc8c9a982ac9b8b745", { + skipInvalidFiles: true, + cmsLocaleIds: ["66f6e966c9e1dc700a857ca3", "66f6e966c9e1dc700a857ca4", "66f6e966c9e1dc700a857ca5"], + isArchived: false, + isDraft: false, + fieldData: { + name: "Don\u2019t Panic", + slug: "dont-panic" + } +}); + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**collection_id:** `string` — Unique identifier for a Collection + +
+
+ +
+
+ +**request:** `Webflow.collections.CreateBulkCollectionItemRequestBody` + +
+
+ +
+
+ +**requestOptions:** `ItemsClient.RequestOptions` + +
+
+
+
+ + +
+
+
+ +
client.collections.items.getItem(collection_id, item_id, { ...params }) -> Webflow.CollectionItem +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Get details of a selected Collection Item. + +Required scope | `CMS:read` +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.collections.items.getItem("580e63fc8c9a982ac9b8b745", "580e64008c9a982ac9b8b754", { + cmsLocaleId: "cmsLocaleId" +}); + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**collection_id:** `string` — Unique identifier for a Collection + +
+
+ +
+
+ +**item_id:** `string` — Unique identifier for an Item + +
+
+ +
+
+ +**request:** `Webflow.collections.ItemsGetItemRequest`
@@ -5823,7 +6397,304 @@ await client.collections.items.getItem("580e63fc8c9a982ac9b8b745", "580e64008c9a
-Delete an item from a collection. +Delete an item from a collection. + +Required scope | `CMS:write` +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.collections.items.deleteItem("580e63fc8c9a982ac9b8b745", "580e64008c9a982ac9b8b754", { + cmsLocaleId: "cmsLocaleId" +}); + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**collection_id:** `string` — Unique identifier for a Collection + +
+
+ +
+
+ +**item_id:** `string` — Unique identifier for an Item + +
+
+ +
+
+ +**request:** `Webflow.collections.ItemsDeleteItemRequest` + +
+
+ +
+
+ +**requestOptions:** `ItemsClient.RequestOptions` + +
+
+
+
+ + +
+
+
+ +
client.collections.items.updateItem(collection_id, item_id, { ...params }) -> Webflow.CollectionItem +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Update a selected Item in a Collection. + +Required scope | `CMS:write` +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.collections.items.updateItem("580e63fc8c9a982ac9b8b745", "580e64008c9a982ac9b8b754", { + skipInvalidFiles: true, + body: { + isArchived: false, + isDraft: false, + fieldData: { + name: "The Hitchhiker's Guide to the Galaxy", + slug: "hitchhikers-guide-to-the-galaxy", + "plain-text": "Don't Panic.", + "rich-text": "

A Guide to Interstellar Travel

A towel is about the most massively useful thing an interstellar hitchhiker can have. Don't forget yours!

", + "main-image": { + "fileId": "62b720ef280c7a7a3be8cabe", + "url": "/files/62b720ef280c7a7a3be8cabe_image.png" + }, + "image-gallery": [ + { + "fileId": "62b720ef280c7a7a3be8cabd", + "url": "/files/62b720ef280c7a7a3be8cabd_image.png" + }, + { + "fileId": "62b720ef280c7a7a3be8cabe", + "url": "/files/62b720ef280c7a7a3be8cabe_image.png" + } + ], + "intro-video": "https://www.youtube.com/watch?v=aJ83KAggd-4", + "official-site": "https://hitchhikers.fandom.com/wiki/The_Hitchhiker%27s_Guide_to_the_Galaxy", + "contact-email": "zaphod.beeblebrox@heartofgold.gov", + "support-phone": "424-242-4242", + "answer-to-everything": 42, + "release-date": "1979-10-12T00:00:00.000Z", + "is-featured": true, + "brand-color": "#000000", + category: "62b720ef280c7a7a3be8cabf", + author: "62b720ef280c7a7a3be8cab0", + tags: [ + "62b720ef280c7a7a3be8cab1", + "62b720ef280c7a7a3be8cab2" + ], + "downloadable-asset": { + "fileId": "62b720ef280c7a7a3be8cab3", + "url": "/files/62b720ef280c7a7a3be8cab3_document.pdf" + } + } + } +}); + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**collection_id:** `string` — Unique identifier for a Collection + +
+
+ +
+
+ +**item_id:** `string` — Unique identifier for an Item + +
+
+ +
+
+ +**request:** `Webflow.collections.ItemsUpdateItemRequest` + +
+
+ +
+
+ +**requestOptions:** `ItemsClient.RequestOptions` + +
+
+
+
+ + +
+
+
+ +
client.collections.items.getItemLive(collection_id, item_id, { ...params }) -> Webflow.CollectionItem +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Get details of a selected Collection live Item. + + + 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` +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.collections.items.getItemLive("580e63fc8c9a982ac9b8b745", "580e64008c9a982ac9b8b754", { + cmsLocaleId: "cmsLocaleId" +}); + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**collection_id:** `string` — Unique identifier for a Collection + +
+
+ +
+
+ +**item_id:** `string` — Unique identifier for an Item + +
+
+ +
+
+ +**request:** `Webflow.collections.ItemsGetItemLiveRequest` + +
+
+ +
+
+ +**requestOptions:** `ItemsClient.RequestOptions` + +
+
+
+
+ + +
+
+
+ +
client.collections.items.deleteItemLive(collection_id, item_id, { ...params }) -> void +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Unpublish a live item from the site and set the `isDraft` property to `true`. + +For bulk unpublishing, please use [this endpoint.](/data/v2.0.0/reference/cms/collection-items/live-items/delete-items-live) Required scope | `CMS:write`
@@ -5840,7 +6711,7 @@ Required scope | `CMS:write`
```typescript -await client.collections.items.deleteItem("580e63fc8c9a982ac9b8b745", "580e64008c9a982ac9b8b754", { +await client.collections.items.deleteItemLive("580e63fc8c9a982ac9b8b745", "580e64008c9a982ac9b8b754", { cmsLocaleId: "cmsLocaleId" }); @@ -5874,7 +6745,7 @@ await client.collections.items.deleteItem("580e63fc8c9a982ac9b8b745", "580e64008
-**request:** `Webflow.collections.ItemsDeleteItemRequest` +**request:** `Webflow.collections.ItemsDeleteItemLiveRequest`
@@ -5894,7 +6765,7 @@ await client.collections.items.deleteItem("580e63fc8c9a982ac9b8b745", "580e64008
-
client.collections.items.updateItem(collection_id, item_id, { ...params }) -> Webflow.CollectionItem +
client.collections.items.updateItemLive(collection_id, item_id, { ...params }) -> Webflow.CollectionItem
@@ -5906,7 +6777,7 @@ await client.collections.items.deleteItem("580e63fc8c9a982ac9b8b745", "580e64008
-Update a selected Item in a Collection. +Update a selected live Item in a Collection. The updates for this Item will be published to the live site. Required scope | `CMS:write`
@@ -5923,7 +6794,7 @@ Required scope | `CMS:write`
```typescript -await client.collections.items.updateItem("580e63fc8c9a982ac9b8b745", "580e64008c9a982ac9b8b754", { +await client.collections.items.updateItemLive("580e63fc8c9a982ac9b8b745", "580e64008c9a982ac9b8b754", { skipInvalidFiles: true, body: { isArchived: false, @@ -5999,7 +6870,7 @@ await client.collections.items.updateItem("580e63fc8c9a982ac9b8b745", "580e64008
-**request:** `Webflow.collections.ItemsUpdateItemRequest` +**request:** `Webflow.collections.ItemsUpdateItemLiveRequest`
@@ -6019,7 +6890,7 @@ await client.collections.items.updateItem("580e63fc8c9a982ac9b8b745", "580e64008
-
client.collections.items.getItemLive(collection_id, item_id, { ...params }) -> Webflow.CollectionItem +
client.collections.items.publishItem(collection_id, { ...params }) -> Webflow.ItemsPublishItemResponse
@@ -6031,13 +6902,9 @@ await client.collections.items.updateItem("580e63fc8c9a982ac9b8b745", "580e64008
-Get details of a selected Collection live Item. - - - 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. - +Publish an item or multiple items. -Required scope | `CMS:read` +Required scope | `cms:write`
@@ -6052,8 +6919,8 @@ Required scope | `CMS:read`
```typescript -await client.collections.items.getItemLive("580e63fc8c9a982ac9b8b745", "580e64008c9a982ac9b8b754", { - cmsLocaleId: "cmsLocaleId" +await client.collections.items.publishItem("580e63fc8c9a982ac9b8b745", { + itemIds: ["643fd856d66b6528195ee2ca", "643fd856d66b6528195ee2cb", "643fd856d66b6528195ee2cc"] }); ``` @@ -6078,15 +6945,75 @@ await client.collections.items.getItemLive("580e63fc8c9a982ac9b8b745", "580e6400
-**item_id:** `string` — Unique identifier for an Item - +**request:** `Webflow.ItemsPublishItemRequest` + +
+
+ +
+
+ +**requestOptions:** `ItemsClient.RequestOptions` + +
+
+
+
+ + + + +
+ +## Pages Scripts +
client.pages.scripts.getCustomCode(page_id) -> Webflow.ScriptApplyList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Get all scripts applied to a page. + +Access to this endpoint requires a bearer token obtained from an [OAuth Code Grant Flow](/data/reference/oauth-app). + +Required scope | `custom_code:read` +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.pages.scripts.getCustomCode("63c720f9347c2139b248e552"); + +``` +
+
+#### ⚙️ Parameters +
-**request:** `Webflow.collections.ItemsGetItemLiveRequest` +
+
+ +**page_id:** `string` — Unique identifier for a Page
@@ -6094,7 +7021,7 @@ await client.collections.items.getItemLive("580e63fc8c9a982ac9b8b745", "580e6400
-**requestOptions:** `ItemsClient.RequestOptions` +**requestOptions:** `ScriptsClient.RequestOptions`
@@ -6106,7 +7033,7 @@ await client.collections.items.getItemLive("580e63fc8c9a982ac9b8b745", "580e6400
-
client.collections.items.deleteItemLive(collection_id, item_id, { ...params }) -> void +
client.pages.scripts.upsertCustomCode(page_id, { ...params }) -> Webflow.ScriptApplyList
@@ -6118,11 +7045,15 @@ await client.collections.items.getItemLive("580e63fc8c9a982ac9b8b745", "580e6400
-Unpublish a live item from the site and set the `isDraft` property to `true`. +Apply registered scripts to a page. If you have multiple scripts your App needs to apply or maintain on a page, ensure they are always included in the request body for this endpoint. To remove individual scripts, simply call this endpoint without the script in the request body. -For bulk unpublishing, please use [this endpoint.](/data/v2.0.0/reference/cms/collection-items/live-items/delete-items-live) + + To apply a script to a page, the script must first be registered to a Site via the [Register Script](/data/reference/custom-code/custom-code/register-hosted) endpoints. Once registered, the script can be applied to a Site or Page using the appropriate endpoints. See the documentation on [working with Custom Code](/data/docs/custom-code) for more information. + -Required scope | `CMS:write` +Access to this endpoint requires a bearer token obtained from an [OAuth Code Grant Flow](/data/reference/oauth-app). + +Required scope | `custom_code:write`
@@ -6137,8 +7068,19 @@ Required scope | `CMS:write`
```typescript -await client.collections.items.deleteItemLive("580e63fc8c9a982ac9b8b745", "580e64008c9a982ac9b8b754", { - cmsLocaleId: "cmsLocaleId" +await client.pages.scripts.upsertCustomCode("63c720f9347c2139b248e552", { + scripts: [{ + id: "cms_slider", + location: "header", + version: "1.0.0", + attributes: { + "my-attribute": "some-value" + } + }, { + id: "alert", + location: "header", + version: "0.0.1" + }] }); ``` @@ -6155,15 +7097,7 @@ await client.collections.items.deleteItemLive("580e63fc8c9a982ac9b8b745", "580e6
-**collection_id:** `string` — Unique identifier for a Collection - -
-
- -
-
- -**item_id:** `string` — Unique identifier for an Item +**page_id:** `string` — Unique identifier for a Page
@@ -6171,7 +7105,7 @@ await client.collections.items.deleteItemLive("580e63fc8c9a982ac9b8b745", "580e6
-**request:** `Webflow.collections.ItemsDeleteItemLiveRequest` +**request:** `Webflow.ScriptApplyList`
@@ -6179,7 +7113,7 @@ await client.collections.items.deleteItemLive("580e63fc8c9a982ac9b8b745", "580e6
-**requestOptions:** `ItemsClient.RequestOptions` +**requestOptions:** `ScriptsClient.RequestOptions`
@@ -6191,7 +7125,7 @@ await client.collections.items.deleteItemLive("580e63fc8c9a982ac9b8b745", "580e6
-
client.collections.items.updateItemLive(collection_id, item_id, { ...params }) -> Webflow.CollectionItem +
client.pages.scripts.deleteCustomCode(page_id) -> void
@@ -6203,9 +7137,13 @@ await client.collections.items.deleteItemLive("580e63fc8c9a982ac9b8b745", "580e6
-Update a selected live Item in a Collection. The updates for this Item will be published to the live site. +Remove all scripts from a page applied by the App. This endpoint will not remove scripts from the site's registered scripts. -Required scope | `CMS:write` +To remove individual scripts applied by the App, use the [Add/Update Custom Code](/data/reference/custom-code/custom-code-pages/upsert-custom-code) endpoint. + +Access to this endpoint requires a bearer token obtained from an [OAuth Code Grant Flow](/data/reference/oauth-app). + +Required scope | `custom_code:write`
@@ -6220,51 +7158,7 @@ Required scope | `CMS:write`
```typescript -await client.collections.items.updateItemLive("580e63fc8c9a982ac9b8b745", "580e64008c9a982ac9b8b754", { - skipInvalidFiles: true, - body: { - isArchived: false, - isDraft: false, - fieldData: { - name: "The Hitchhiker's Guide to the Galaxy", - slug: "hitchhikers-guide-to-the-galaxy", - "plain-text": "Don't Panic.", - "rich-text": "

A Guide to Interstellar Travel

A towel is about the most massively useful thing an interstellar hitchhiker can have. Don't forget yours!

", - "main-image": { - "fileId": "62b720ef280c7a7a3be8cabe", - "url": "/files/62b720ef280c7a7a3be8cabe_image.png" - }, - "image-gallery": [ - { - "fileId": "62b720ef280c7a7a3be8cabd", - "url": "/files/62b720ef280c7a7a3be8cabd_image.png" - }, - { - "fileId": "62b720ef280c7a7a3be8cabe", - "url": "/files/62b720ef280c7a7a3be8cabe_image.png" - } - ], - "intro-video": "https://www.youtube.com/watch?v=aJ83KAggd-4", - "official-site": "https://hitchhikers.fandom.com/wiki/The_Hitchhiker%27s_Guide_to_the_Galaxy", - "contact-email": "zaphod.beeblebrox@heartofgold.gov", - "support-phone": "424-242-4242", - "answer-to-everything": 42, - "release-date": "1979-10-12T00:00:00.000Z", - "is-featured": true, - "brand-color": "#000000", - category: "62b720ef280c7a7a3be8cabf", - author: "62b720ef280c7a7a3be8cab0", - tags: [ - "62b720ef280c7a7a3be8cab1", - "62b720ef280c7a7a3be8cab2" - ], - "downloadable-asset": { - "fileId": "62b720ef280c7a7a3be8cab3", - "url": "/files/62b720ef280c7a7a3be8cab3_document.pdf" - } - } - } -}); +await client.pages.scripts.deleteCustomCode("63c720f9347c2139b248e552"); ```
@@ -6280,23 +7174,7 @@ await client.collections.items.updateItemLive("580e63fc8c9a982ac9b8b745", "580e6
-**collection_id:** `string` — Unique identifier for a Collection - -
-
- -
-
- -**item_id:** `string` — Unique identifier for an Item - -
-
- -
-
- -**request:** `Webflow.collections.ItemsUpdateItemLiveRequest` +**page_id:** `string` — Unique identifier for a Page
@@ -6304,7 +7182,7 @@ await client.collections.items.updateItemLive("580e63fc8c9a982ac9b8b745", "580e6
-**requestOptions:** `ItemsClient.RequestOptions` +**requestOptions:** `ScriptsClient.RequestOptions`
@@ -6316,7 +7194,8 @@ await client.collections.items.updateItemLive("580e63fc8c9a982ac9b8b745", "580e6
-
client.collections.items.publishItem(collection_id, { ...params }) -> Webflow.ItemsPublishItemResponse +## Sites Redirects +
client.sites.redirects.list(site_id) -> Webflow.Redirects
@@ -6328,9 +7207,13 @@ await client.collections.items.updateItemLive("580e63fc8c9a982ac9b8b745", "580e6
-Publish an item or multiple items. +Fetch a list of all 301 redirect rules configured for a specific site. -Required scope | `cms:write` +Use this endpoint to review, audit, or manage the redirection rules that control how traffic is rerouted on your site. + +This endpoint requires an Enterprise workspace. + +Required scope: `sites:read`
@@ -6345,9 +7228,7 @@ Required scope | `cms:write`
```typescript -await client.collections.items.publishItem("580e63fc8c9a982ac9b8b745", { - itemIds: ["643fd856d66b6528195ee2ca", "643fd856d66b6528195ee2cb", "643fd856d66b6528195ee2cc"] -}); +await client.sites.redirects.list("580e63e98c9a982ac9b8b741"); ```
@@ -6363,15 +7244,7 @@ await client.collections.items.publishItem("580e63fc8c9a982ac9b8b745", {
-**collection_id:** `string` — Unique identifier for a Collection - -
-
- -
-
- -**request:** `Webflow.ItemsPublishItemRequest` +**site_id:** `string` — Unique identifier for a Site
@@ -6379,7 +7252,7 @@ await client.collections.items.publishItem("580e63fc8c9a982ac9b8b745", {
-**requestOptions:** `ItemsClient.RequestOptions` +**requestOptions:** `RedirectsClient.RequestOptions`
@@ -6391,8 +7264,7 @@ await client.collections.items.publishItem("580e63fc8c9a982ac9b8b745", {
-## Pages Scripts -
client.pages.scripts.getCustomCode(page_id) -> Webflow.ScriptApplyList +
client.sites.redirects.create(site_id, { ...params }) -> Webflow.Redirect
@@ -6404,9 +7276,13 @@ await client.collections.items.publishItem("580e63fc8c9a982ac9b8b745", {
-Get all scripts applied to a page. +Add a new 301 redirection rule to a site. -Required scope | `custom_code:read` +This endpoint allows you to define a source path (`fromUrl`) and its corresponding destination path (`toUrl`), which will dictate how traffic is rerouted on your site. This is useful for managing site changes, restructuring URLs, or handling outdated links. + +This endpoint requires an Enterprise workspace. + +Required scope: `sites:write`
@@ -6421,7 +7297,11 @@ Required scope | `custom_code:read`
```typescript -await client.pages.scripts.getCustomCode("63c720f9347c2139b248e552"); +await client.sites.redirects.create("580e63e98c9a982ac9b8b741", { + id: "42e1a2b7aa1a13f768a0042a", + fromUrl: "/mostly-harmless", + toUrl: "/earth" +}); ```
@@ -6437,7 +7317,7 @@ await client.pages.scripts.getCustomCode("63c720f9347c2139b248e552");
-**page_id:** `string` — Unique identifier for a Page +**site_id:** `string` — Unique identifier for a Site
@@ -6445,7 +7325,15 @@ await client.pages.scripts.getCustomCode("63c720f9347c2139b248e552");
-**requestOptions:** `ScriptsClient.RequestOptions` +**request:** `Webflow.Redirect` + +
+
+ +
+
+ +**requestOptions:** `RedirectsClient.RequestOptions`
@@ -6457,7 +7345,7 @@ await client.pages.scripts.getCustomCode("63c720f9347c2139b248e552");
-
client.pages.scripts.upsertCustomCode(page_id, { ...params }) -> Webflow.ScriptApplyList +
client.sites.redirects.delete(site_id, redirect_id) -> Webflow.Redirects
@@ -6469,13 +7357,13 @@ await client.pages.scripts.getCustomCode("63c720f9347c2139b248e552");
-Apply registered scripts to a page. If you have multiple scripts your App needs to apply or maintain on a page, ensure they are always included in the request body for this endpoint. To remove individual scripts, simply call this endpoint without the script in the request body. +Remove a 301 redirection rule from a site. - - To apply a script to a page, the script must first be registered to a Site via the [Register Script](/data/reference/custom-code/custom-code/register-hosted) endpoints. Once registered, the script can be applied to a Site or Page using the appropriate endpoints. See the documentation on [working with Custom Code](/data/docs/custom-code) for more information. - +This is useful for cleaning up outdated or unnecessary redirects, ensuring that your site's routing behavior remains efficient and up-to-date. -Required scope | `custom_code:write` +This endpoint requires an Enterprise workspace. + +Required scope: `sites:write`
@@ -6490,20 +7378,7 @@ Required scope | `custom_code:write`
```typescript -await client.pages.scripts.upsertCustomCode("63c720f9347c2139b248e552", { - scripts: [{ - id: "cms_slider", - location: "header", - version: "1.0.0", - attributes: { - "my-attribute": "some-value" - } - }, { - id: "alert", - location: "header", - version: "0.0.1" - }] -}); +await client.sites.redirects.delete("580e63e98c9a982ac9b8b741", "66c4cb9a20cac35ed19500e6"); ```
@@ -6519,7 +7394,7 @@ await client.pages.scripts.upsertCustomCode("63c720f9347c2139b248e552", {
-**page_id:** `string` — Unique identifier for a Page +**site_id:** `string` — Unique identifier for a Site
@@ -6527,7 +7402,7 @@ await client.pages.scripts.upsertCustomCode("63c720f9347c2139b248e552", {
-**request:** `Webflow.ScriptApplyList` +**redirect_id:** `string` — Unique identifier site redirect
@@ -6535,7 +7410,7 @@ await client.pages.scripts.upsertCustomCode("63c720f9347c2139b248e552", {
-**requestOptions:** `ScriptsClient.RequestOptions` +**requestOptions:** `RedirectsClient.RequestOptions`
@@ -6547,7 +7422,7 @@ await client.pages.scripts.upsertCustomCode("63c720f9347c2139b248e552", {
-
client.pages.scripts.deleteCustomCode(page_id) -> void +
client.sites.redirects.update(site_id, redirect_id, { ...params }) -> Webflow.Redirect
@@ -6559,13 +7434,11 @@ await client.pages.scripts.upsertCustomCode("63c720f9347c2139b248e552", {
-Remove all scripts from a page applied by the App. This endpoint will not remove scripts from the site's registered scripts. - -To remove individual scripts applied by the App, use the [Add/Update Custom Code](/data/reference/custom-code/custom-code-pages/upsert-custom-code) endpoint. +Update a 301 redirection rule from a site. -Access to this endpoint requires a bearer token obtained from an [OAuth Code Grant Flow](/data/reference/oauth-app). +This endpoint requires an Enterprise workspace. -Required scope | `custom_code:write` +Required scope: `sites:write`
@@ -6580,7 +7453,11 @@ Required scope | `custom_code:write`
```typescript -await client.pages.scripts.deleteCustomCode("63c720f9347c2139b248e552"); +await client.sites.redirects.update("580e63e98c9a982ac9b8b741", "66c4cb9a20cac35ed19500e6", { + id: "42e1a2b7aa1a13f768a0042a", + fromUrl: "/mostly-harmless", + toUrl: "/earth" +}); ```
@@ -6596,7 +7473,23 @@ await client.pages.scripts.deleteCustomCode("63c720f9347c2139b248e552");
-**page_id:** `string` — Unique identifier for a Page +**site_id:** `string` — Unique identifier for a Site + +
+
+ +
+
+ +**redirect_id:** `string` — Unique identifier site redirect + +
+
+ +
+
+ +**request:** `Webflow.Redirect`
@@ -6604,7 +7497,7 @@ await client.pages.scripts.deleteCustomCode("63c720f9347c2139b248e552");
-**requestOptions:** `ScriptsClient.RequestOptions` +**requestOptions:** `RedirectsClient.RequestOptions`
@@ -6616,8 +7509,8 @@ await client.pages.scripts.deleteCustomCode("63c720f9347c2139b248e552");
-## Sites Redirects -
client.sites.redirects.list(site_id) -> Webflow.Redirects +## Sites Plans +
client.sites.plans.getSitePlan(site_id) -> Webflow.SitePlan
@@ -6629,13 +7522,11 @@ await client.pages.scripts.deleteCustomCode("63c720f9347c2139b248e552");
-Fetch a list of all 301 redirect rules configured for a specific site. - -Use this endpoint to review, audit, or manage the redirection rules that control how traffic is rerouted on your site. +Get site plan details for the specified Site. This endpoint requires an Enterprise workspace. -Required scope: `sites:read` +Required scope | `sites:read`
@@ -6650,7 +7541,7 @@ Required scope: `sites:read`
```typescript -await client.sites.redirects.list("580e63e98c9a982ac9b8b741"); +await client.sites.plans.getSitePlan("580e63e98c9a982ac9b8b741"); ```
@@ -6674,7 +7565,7 @@ await client.sites.redirects.list("580e63e98c9a982ac9b8b741");
-**requestOptions:** `RedirectsClient.RequestOptions` +**requestOptions:** `PlansClient.RequestOptions`
@@ -6686,7 +7577,8 @@ await client.sites.redirects.list("580e63e98c9a982ac9b8b741");
-
client.sites.redirects.create(site_id, { ...params }) -> Webflow.Redirect +## Sites RobotsTxt +
client.sites.robotsTxt.get(site_id) -> Webflow.Robots
@@ -6698,13 +7590,11 @@ await client.sites.redirects.list("580e63e98c9a982ac9b8b741");
-Add a new 301 redirection rule to a site. - -This endpoint allows you to define a source path (`fromUrl`) and its corresponding destination path (`toUrl`), which will dictate how traffic is rerouted on your site. This is useful for managing site changes, restructuring URLs, or handling outdated links. +Retrieve the robots.txt configuration for various user agents. This endpoint requires an Enterprise workspace. -Required scope: `sites:write` +Required scope: `site_config:read`
@@ -6719,11 +7609,7 @@ Required scope: `sites:write`
```typescript -await client.sites.redirects.create("580e63e98c9a982ac9b8b741", { - id: "42e1a2b7aa1a13f768a0042a", - fromUrl: "/mostly-harmless", - toUrl: "/earth" -}); +await client.sites.robotsTxt.get("580e63e98c9a982ac9b8b741"); ```
@@ -6747,15 +7633,7 @@ await client.sites.redirects.create("580e63e98c9a982ac9b8b741", {
-**request:** `Webflow.Redirect` - -
-
- -
-
- -**requestOptions:** `RedirectsClient.RequestOptions` +**requestOptions:** `RobotsTxtClient.RequestOptions`
@@ -6767,7 +7645,7 @@ await client.sites.redirects.create("580e63e98c9a982ac9b8b741", {
-
client.sites.redirects.delete(site_id, redirect_id) -> Webflow.Redirects +
client.sites.robotsTxt.put(site_id, { ...params }) -> Webflow.Robots
@@ -6779,13 +7657,11 @@ await client.sites.redirects.create("580e63e98c9a982ac9b8b741", {
-Remove a 301 redirection rule from a site. - -This is useful for cleaning up outdated or unnecessary redirects, ensuring that your site's routing behavior remains efficient and up-to-date. +Replace the `robots.txt` configuration for various user agents. This endpoint requires an Enterprise workspace. -Required scope: `sites:write` +Required scope | `site_config:write`
@@ -6800,7 +7676,14 @@ Required scope: `sites:write`
```typescript -await client.sites.redirects.delete("580e63e98c9a982ac9b8b741", "66c4cb9a20cac35ed19500e6"); +await client.sites.robotsTxt.put("580e63e98c9a982ac9b8b741", { + rules: [{ + userAgent: "googlebot", + allows: ["/public"], + disallows: ["/vogon-poetry", "/total-perspective-vortex"] + }], + sitemap: "https://heartofgold.ship/sitemap.xml" +}); ```
@@ -6824,7 +7707,7 @@ await client.sites.redirects.delete("580e63e98c9a982ac9b8b741", "66c4cb9a20cac35
-**redirect_id:** `string` — Unique identifier site redirect +**request:** `Webflow.Robots`
@@ -6832,7 +7715,7 @@ await client.sites.redirects.delete("580e63e98c9a982ac9b8b741", "66c4cb9a20cac35
-**requestOptions:** `RedirectsClient.RequestOptions` +**requestOptions:** `RobotsTxtClient.RequestOptions`
@@ -6844,7 +7727,7 @@ await client.sites.redirects.delete("580e63e98c9a982ac9b8b741", "66c4cb9a20cac35
-
client.sites.redirects.update(site_id, redirect_id, { ...params }) -> Webflow.Redirect +
client.sites.robotsTxt.delete(site_id, { ...params }) -> Webflow.Robots
@@ -6856,11 +7739,13 @@ await client.sites.redirects.delete("580e63e98c9a982ac9b8b741", "66c4cb9a20cac35
-Update a 301 redirection rule from a site. +Remove specific rules for a user-agent in your `robots.txt` file. To delete all rules for a user-agent, provide an empty rule set. This will remove the user-agent's entry entirely, leaving it subject to your site's default crawling behavior. + +**Note:** Deleting a user-agent with no rules will make the user-agent's access unrestricted unless other directives apply. This endpoint requires an Enterprise workspace. -Required scope: `sites:write` +Required scope: `site_config:write`
@@ -6875,10 +7760,12 @@ Required scope: `sites:write`
```typescript -await client.sites.redirects.update("580e63e98c9a982ac9b8b741", "66c4cb9a20cac35ed19500e6", { - id: "42e1a2b7aa1a13f768a0042a", - fromUrl: "/mostly-harmless", - toUrl: "/earth" +await client.sites.robotsTxt.delete("580e63e98c9a982ac9b8b741", { + rules: [{ + userAgent: "*", + allows: ["/public"], + disallows: ["/bubbles"] + }] }); ``` @@ -6903,15 +7790,7 @@ await client.sites.redirects.update("580e63e98c9a982ac9b8b741", "66c4cb9a20cac35
-**redirect_id:** `string` — Unique identifier site redirect - -
-
- -
-
- -**request:** `Webflow.Redirect` +**request:** `Webflow.Robots`
@@ -6919,7 +7798,7 @@ await client.sites.redirects.update("580e63e98c9a982ac9b8b741", "66c4cb9a20cac35
-**requestOptions:** `RedirectsClient.RequestOptions` +**requestOptions:** `RobotsTxtClient.RequestOptions`
@@ -6931,8 +7810,7 @@ await client.sites.redirects.update("580e63e98c9a982ac9b8b741", "66c4cb9a20cac35
-## Sites Plans -
client.sites.plans.getSitePlan(site_id) -> Webflow.SitePlan +
client.sites.robotsTxt.patch(site_id, { ...params }) -> Webflow.Robots
@@ -6944,11 +7822,11 @@ await client.sites.redirects.update("580e63e98c9a982ac9b8b741", "66c4cb9a20cac35
-Get site plan details for the specified Site. +Update the `robots.txt` configuration for various user agents. This endpoint requires an Enterprise workspace. -Required scope | `sites:read` +Required scope | `site_config:write`
@@ -6963,7 +7841,14 @@ Required scope | `sites:read`
```typescript -await client.sites.plans.getSitePlan("580e63e98c9a982ac9b8b741"); +await client.sites.robotsTxt.patch("580e63e98c9a982ac9b8b741", { + rules: [{ + userAgent: "googlebot", + allows: ["/public"], + disallows: ["/vogon-poetry", "/total-perspective-vortex"] + }], + sitemap: "https://heartofgold.ship/sitemap.xml" +}); ```
@@ -6987,7 +7872,15 @@ await client.sites.plans.getSitePlan("580e63e98c9a982ac9b8b741");
-**requestOptions:** `PlansClient.RequestOptions` +**request:** `Webflow.Robots` + +
+
+ +
+
+ +**requestOptions:** `RobotsTxtClient.RequestOptions`
@@ -6999,8 +7892,8 @@ await client.sites.plans.getSitePlan("580e63e98c9a982ac9b8b741");
-## Sites RobotsTxt -
client.sites.robotsTxt.get(site_id) -> Webflow.Robots +## Sites WellKnown +
client.sites.wellKnown.put(site_id, { ...params }) -> void
@@ -7012,11 +7905,20 @@ await client.sites.plans.getSitePlan("580e63e98c9a982ac9b8b741");
-Retrieve the robots.txt configuration for various user agents. +Upload a supported well-known file to a site. + +The current restrictions on well-known files are as follows: + - Each file must be smaller than 100kb + - Less than 30 total files + - Have one of the following file extensions (or no extension): `.txt`, `.json`, `.noext` + + + `.noext` is a special file extension that removes other extensions. For example, `apple-app-site-association.noext.txt` will be uploaded as `apple-app-site-association`. Use this extension for tools that have trouble uploading extensionless files. + This endpoint requires an Enterprise workspace. -Required scope: `site_config:read` +Required scope: `site_config:write`
@@ -7031,7 +7933,11 @@ Required scope: `site_config:read`
```typescript -await client.sites.robotsTxt.get("580e63e98c9a982ac9b8b741"); +await client.sites.wellKnown.put("580e63e98c9a982ac9b8b741", { + fileName: "apple-app-site-association.txt", + fileData: "{\n \"applinks\": {\n \"apps\": [],\n \"details\": [\n {\n \"appID\": \"ABCDE12345.com.example.app\",\n \"paths\": [ \"/*\", \"/some/path/*\" ]\n }\n ]\n }\n}\n", + contentType: "application/json" +}); ```
@@ -7055,7 +7961,15 @@ await client.sites.robotsTxt.get("580e63e98c9a982ac9b8b741");
-**requestOptions:** `RobotsTxtClient.RequestOptions` +**request:** `Webflow.sites.WellKnownFile` + +
+
+ +
+
+ +**requestOptions:** `WellKnownClient.RequestOptions`
@@ -7067,7 +7981,7 @@ await client.sites.robotsTxt.get("580e63e98c9a982ac9b8b741");
-
client.sites.robotsTxt.put(site_id, { ...params }) -> Webflow.Robots +
client.sites.wellKnown.delete(site_id, { ...params }) -> void
@@ -7079,11 +7993,11 @@ await client.sites.robotsTxt.get("580e63e98c9a982ac9b8b741");
-Replace the `robots.txt` configuration for various user agents. +Delete existing well-known files from a site. This endpoint requires an Enterprise workspace. -Required scope | `site_config:write` +Required scope: `site_config:write`
@@ -7098,14 +8012,7 @@ Required scope | `site_config:write`
```typescript -await client.sites.robotsTxt.put("580e63e98c9a982ac9b8b741", { - rules: [{ - userAgent: "googlebot", - allows: ["/public"], - disallows: ["/vogon-poetry", "/total-perspective-vortex"] - }], - sitemap: "https://heartofgold.ship/sitemap.xml" -}); +await client.sites.wellKnown.delete("580e63e98c9a982ac9b8b741"); ```
@@ -7129,7 +8036,7 @@ await client.sites.robotsTxt.put("580e63e98c9a982ac9b8b741", {
-**request:** `Webflow.Robots` +**request:** `Webflow.sites.WellKnownDeleteRequest`
@@ -7137,7 +8044,7 @@ await client.sites.robotsTxt.put("580e63e98c9a982ac9b8b741", {
-**requestOptions:** `RobotsTxtClient.RequestOptions` +**requestOptions:** `WellKnownClient.RequestOptions`
@@ -7149,7 +8056,8 @@ await client.sites.robotsTxt.put("580e63e98c9a982ac9b8b741", {
-
client.sites.robotsTxt.delete(site_id, { ...params }) -> Webflow.Robots +## Sites GoogleTag +
client.sites.googleTag.list(site_id) -> Webflow.GoogleTagIds
@@ -7161,13 +8069,9 @@ await client.sites.robotsTxt.put("580e63e98c9a982ac9b8b741", {
-Remove specific rules for a user-agent in your `robots.txt` file. To delete all rules for a user-agent, provide an empty rule set. This will remove the user-agent's entry entirely, leaving it subject to your site's default crawling behavior. - -**Note:** Deleting a user-agent with no rules will make the user-agent's access unrestricted unless other directives apply. - -This endpoint requires an Enterprise workspace. +List all Google Tag IDs configured for a site, sorted by order. -Required scope: `site_config:write` +Required scope: `sites:read`
@@ -7182,13 +8086,7 @@ Required scope: `site_config:write`
```typescript -await client.sites.robotsTxt.delete("580e63e98c9a982ac9b8b741", { - rules: [{ - userAgent: "*", - allows: ["/public"], - disallows: ["/bubbles"] - }] -}); +await client.sites.googleTag.list("580e63e98c9a982ac9b8b741"); ```
@@ -7212,15 +8110,7 @@ await client.sites.robotsTxt.delete("580e63e98c9a982ac9b8b741", {
-**request:** `Webflow.Robots` - -
-
- -
-
- -**requestOptions:** `RobotsTxtClient.RequestOptions` +**requestOptions:** `GoogleTagClient.RequestOptions`
@@ -7232,7 +8122,7 @@ await client.sites.robotsTxt.delete("580e63e98c9a982ac9b8b741", {
-
client.sites.robotsTxt.patch(site_id, { ...params }) -> Webflow.Robots +
client.sites.googleTag.deleteAll(site_id) -> void
@@ -7244,11 +8134,9 @@ await client.sites.robotsTxt.delete("580e63e98c9a982ac9b8b741", {
-Update the `robots.txt` configuration for various user agents. - -This endpoint requires an Enterprise workspace. +Delete all Google Tag IDs from a site. -Required scope | `site_config:write` +Required scope: `sites:write`
@@ -7263,14 +8151,7 @@ Required scope | `site_config:write`
```typescript -await client.sites.robotsTxt.patch("580e63e98c9a982ac9b8b741", { - rules: [{ - userAgent: "googlebot", - allows: ["/public"], - disallows: ["/vogon-poetry", "/total-perspective-vortex"] - }], - sitemap: "https://heartofgold.ship/sitemap.xml" -}); +await client.sites.googleTag.deleteAll("580e63e98c9a982ac9b8b741"); ```
@@ -7294,15 +8175,7 @@ await client.sites.robotsTxt.patch("580e63e98c9a982ac9b8b741", {
-**request:** `Webflow.Robots` - -
-
- -
-
- -**requestOptions:** `RobotsTxtClient.RequestOptions` +**requestOptions:** `GoogleTagClient.RequestOptions`
@@ -7314,8 +8187,7 @@ await client.sites.robotsTxt.patch("580e63e98c9a982ac9b8b741", {
-## Sites WellKnown -
client.sites.wellKnown.put(site_id, { ...params }) -> void +
client.sites.googleTag.upsert(site_id, { ...params }) -> Webflow.GoogleTagIds
@@ -7327,20 +8199,11 @@ await client.sites.robotsTxt.patch("580e63e98c9a982ac9b8b741", {
-Upload a supported well-known file to a site. - -The current restrictions on well-known files are as follows: - - Each file must be smaller than 100kb - - Less than 30 total files - - Have one of the following file extensions (or no extension): `.txt`, `.json`, `.noext` - - - `.noext` is a special file extension that removes other extensions. For example, `apple-app-site-association.noext.txt` will be uploaded as `apple-app-site-association`. Use this extension for tools that have trouble uploading extensionless files. - +Add or update Google Tag IDs for a site. Existing tags not referenced in the request are preserved. A site may have a maximum of 25 tags total. -This endpoint requires an Enterprise workspace. +`order` is optional on input — it is auto-assigned for new tags and returned on all tags in the response. -Required scope: `site_config:write` +Required scope: `sites:write`
@@ -7355,10 +8218,12 @@ Required scope: `site_config:write`
```typescript -await client.sites.wellKnown.put("580e63e98c9a982ac9b8b741", { - fileName: "apple-app-site-association.txt", - fileData: "{\n \"applinks\": {\n \"apps\": [],\n \"details\": [\n {\n \"appID\": \"ABCDE12345.com.example.app\",\n \"paths\": [ \"/*\", \"/some/path/*\" ]\n }\n ]\n }\n}\n", - contentType: "application/json" +await client.sites.googleTag.upsert("580e63e98c9a982ac9b8b741", { + googleTagIds: [{ + order: 0, + displayName: "Main Analytics Tag", + tagId: "G-1234567890" + }] }); ``` @@ -7383,7 +8248,7 @@ await client.sites.wellKnown.put("580e63e98c9a982ac9b8b741", {
-**request:** `Webflow.sites.WellKnownFile` +**request:** `Webflow.GoogleTagIds`
@@ -7391,7 +8256,7 @@ await client.sites.wellKnown.put("580e63e98c9a982ac9b8b741", {
-**requestOptions:** `WellKnownClient.RequestOptions` +**requestOptions:** `GoogleTagClient.RequestOptions`
@@ -7403,7 +8268,7 @@ await client.sites.wellKnown.put("580e63e98c9a982ac9b8b741", {
-
client.sites.wellKnown.delete(site_id, { ...params }) -> void +
client.sites.googleTag.delete(site_id, tag_id) -> Webflow.GoogleTagIds
@@ -7415,11 +8280,9 @@ await client.sites.wellKnown.put("580e63e98c9a982ac9b8b741", {
-Delete existing well-known files from a site. - -This endpoint requires an Enterprise workspace. +Delete a single Google Tag ID from a site. The `order` values of the remaining tags are renormalized after deletion. -Required scope: `site_config:write` +Required scope: `sites:write`
@@ -7434,7 +8297,7 @@ Required scope: `site_config:write`
```typescript -await client.sites.wellKnown.delete("580e63e98c9a982ac9b8b741"); +await client.sites.googleTag.delete("580e63e98c9a982ac9b8b741", "G-XXXXXXXXXX"); ```
@@ -7458,7 +8321,7 @@ await client.sites.wellKnown.delete("580e63e98c9a982ac9b8b741");
-**request:** `Webflow.sites.WellKnownDeleteRequest` +**tag_id:** `string` — The Google Tag ID (e.g. G-XXXXXXXXXX)
@@ -7466,7 +8329,7 @@ await client.sites.wellKnown.delete("580e63e98c9a982ac9b8b741");
-**requestOptions:** `WellKnownClient.RequestOptions` +**requestOptions:** `GoogleTagClient.RequestOptions`
@@ -7842,6 +8705,8 @@ Get all scripts applied to a site by the App. To apply a script to a site or page, the script must first be registered to a site via the [Register Script](/data/reference/custom-code/custom-code/register-hosted) endpoints. Once registered, the script can be applied to a Site or Page using the appropriate endpoints. See the documentation on [working with Custom Code](/data/docs/custom-code) for more information. +Access to this endpoint requires a bearer token obtained from an [OAuth Code Grant Flow](/data/reference/oauth-app). + Required scope | `custom_code:read`
@@ -7911,6 +8776,8 @@ Apply registered scripts to a site. If you have multiple scripts your App needs To apply a script to a site or page, the script must first be registered to a site via the [Register Script](/data/reference/custom-code/custom-code/register-hosted) endpoints. Once registered, the script can be applied to a Site or Page using the appropriate endpoints. See the documentation on [working with Custom Code](/data/docs/custom-code) for more information. +Access to this endpoint requires a bearer token obtained from an [OAuth Code Grant Flow](/data/reference/oauth-app). + Required scope | `custom_code:write` @@ -8072,6 +8939,8 @@ Get a list of scripts that have been applied to a site and/or individual pages. See the documentation on [working with Custom Code](/data/docs/custom-code) for more information. +Access to this endpoint requires a bearer token obtained from an [OAuth Code Grant Flow](/data/reference/oauth-app). + Required scope | `custom_code:read` diff --git a/src/Client.ts b/src/Client.ts index 1f973607..10fc9e4c 100644 --- a/src/Client.ts +++ b/src/Client.ts @@ -3,6 +3,7 @@ import { AssetsClient } from "./api/resources/assets/client/Client"; import { CollectionsClient } from "./api/resources/collections/client/Client"; import { ComponentsClient } from "./api/resources/components/client/Client"; +import { CustomFontsClient } from "./api/resources/customFonts/client/Client"; import { EcommerceClient } from "./api/resources/ecommerce/client/Client"; import { FormsClient } from "./api/resources/forms/client/Client"; import { InventoryClient } from "./api/resources/inventory/client/Client"; @@ -32,6 +33,7 @@ export class WebflowClient { protected _components: ComponentsClient | undefined; protected _scripts: ScriptsClient | undefined; protected _assets: AssetsClient | undefined; + protected _customFonts: CustomFontsClient | undefined; protected _webhooks: WebhooksClient | undefined; protected _forms: FormsClient | undefined; protected _products: ProductsClient | undefined; @@ -72,6 +74,10 @@ export class WebflowClient { return (this._assets ??= new AssetsClient(this._options)); } + public get customFonts(): CustomFontsClient { + return (this._customFonts ??= new CustomFontsClient(this._options)); + } + public get webhooks(): WebhooksClient { return (this._webhooks ??= new WebhooksClient(this._options)); } diff --git a/src/api/errors/ServiceUnavailableError.ts b/src/api/errors/ServiceUnavailableError.ts new file mode 100644 index 00000000..c8b2993c --- /dev/null +++ b/src/api/errors/ServiceUnavailableError.ts @@ -0,0 +1,22 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as core from "../../core"; +import * as errors from "../../errors/index"; +import type * as Webflow from "../index"; + +export class ServiceUnavailableError extends errors.WebflowError { + constructor(body: Webflow.Error_, rawResponse?: core.RawResponse) { + super({ + message: "ServiceUnavailableError", + statusCode: 503, + body: body, + rawResponse: rawResponse, + }); + Object.setPrototypeOf(this, new.target.prototype); + if (Error.captureStackTrace) { + Error.captureStackTrace(this, this.constructor); + } + + this.name = this.constructor.name; + } +} diff --git a/src/api/errors/index.ts b/src/api/errors/index.ts index fc45046b..3b80a3fa 100644 --- a/src/api/errors/index.ts +++ b/src/api/errors/index.ts @@ -3,5 +3,6 @@ export * from "./ConflictError"; export * from "./ForbiddenError"; export * from "./InternalServerError"; export * from "./NotFoundError"; +export * from "./ServiceUnavailableError"; export * from "./TooManyRequestsError"; export * from "./UnauthorizedError"; diff --git a/src/api/resources/assets/client/Client.ts b/src/api/resources/assets/client/Client.ts index 81e28116..0bc7c9b7 100644 --- a/src/api/resources/assets/client/Client.ts +++ b/src/api/resources/assets/client/Client.ts @@ -45,7 +45,8 @@ export class AssetsClient { * await client.assets.list("580e63e98c9a982ac9b8b741", { * localeId: "65427cf400e02b306eaa04a0", * offset: 1, - * limit: 1 + * limit: 1, + * folderId: "folderId" * }) */ public list( @@ -61,11 +62,12 @@ export class AssetsClient { request: Webflow.AssetsListRequest = {}, requestOptions?: AssetsClient.RequestOptions, ): Promise> { - const { localeId, offset, limit } = request; + const { localeId, offset, limit, folderId } = request; const _queryParams: Record = { localeId, offset, limit, + folderId, }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); const _headers: core.Fetcher.Args["headers"] = mergeHeaders( diff --git a/src/api/resources/assets/client/requests/AssetsListRequest.ts b/src/api/resources/assets/client/requests/AssetsListRequest.ts index d5ca41c6..d0619ab0 100644 --- a/src/api/resources/assets/client/requests/AssetsListRequest.ts +++ b/src/api/resources/assets/client/requests/AssetsListRequest.ts @@ -5,7 +5,8 @@ * { * localeId: "65427cf400e02b306eaa04a0", * offset: 1, - * limit: 1 + * limit: 1, + * folderId: "folderId" * } */ export interface AssetsListRequest { @@ -19,4 +20,9 @@ export interface AssetsListRequest { offset?: number; /** Maximum number of records to be returned (max limit: 100) */ limit?: number; + /** + * Filter assets to those in the specified folder and all descendant folders. + * Must be a 24-character hex ObjectId. + */ + folderId?: string; } diff --git a/src/api/resources/customFonts/client/Client.ts b/src/api/resources/customFonts/client/Client.ts new file mode 100644 index 00000000..c0867b2f --- /dev/null +++ b/src/api/resources/customFonts/client/Client.ts @@ -0,0 +1,1046 @@ +// This file was auto-generated by Fern from our API Definition. + +import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient"; +import { type NormalizedClientOptionsWithAuth, normalizeClientOptionsWithAuth } from "../../../../BaseClient"; +import * as core from "../../../../core"; +import { mergeHeaders } from "../../../../core/headers"; +import * as environments from "../../../../environments"; +import { handleNonStatusCodeError } from "../../../../errors/handleNonStatusCodeError"; +import * as errors from "../../../../errors/index"; +import * as serializers from "../../../../serialization/index"; +import * as Webflow from "../../../index"; + +export declare namespace CustomFontsClient { + export type Options = BaseClientOptions; + + export interface RequestOptions extends BaseRequestOptions {} +} + +/** + * Custom fonts are font files that are uploaded to a Webflow site. + */ +export class CustomFontsClient { + protected readonly _options: NormalizedClientOptionsWithAuth; + + constructor(options: CustomFontsClient.Options) { + this._options = normalizeClientOptionsWithAuth(options); + } + + /** + * List the custom fonts uploaded to a site. + * + * Required scope | `sites:read` + * + * @param {string} site_id - Unique identifier for a Site + * @param {Webflow.CustomFontsListRequest} request + * @param {CustomFontsClient.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.customFonts.list("580e63e98c9a982ac9b8b741", { + * offset: 1, + * limit: 1 + * }) + */ + public list( + site_id: string, + request: Webflow.CustomFontsListRequest = {}, + requestOptions?: CustomFontsClient.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__list(site_id, request, requestOptions)); + } + + private async __list( + site_id: string, + request: Webflow.CustomFontsListRequest = {}, + requestOptions?: CustomFontsClient.RequestOptions, + ): Promise> { + const { offset, limit } = request; + const _queryParams: Record = { + offset, + limit, + }; + const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); + const _headers: core.Fetcher.Args["headers"] = mergeHeaders( + _authRequest.headers, + this._options?.headers, + requestOptions?.headers, + ); + const _response = await core.fetcher({ + url: core.url.join( + (await core.Supplier.get(this._options.baseUrl)) ?? + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi) + .base, + `sites/${core.url.encodePathParam(site_id)}/custom_fonts`, + ), + method: "GET", + headers: _headers, + queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, + abortSignal: requestOptions?.abortSignal, + fetchFn: this._options?.fetch, + logging: this._options.logging, + }); + if (_response.ok) { + return { + data: serializers.CustomFonts.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, + }); + } + } + + return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/sites/{site_id}/custom_fonts"); + } + + /** + * Register a custom font on a site and get a presigned S3 URL to upload the font binary. + * + * The response includes a `customFont` object and an `upload` object. Use the `upload.url` and `upload.fields` + * to POST the font binary directly to S3 as `multipart/form-data`. The binary must go in a field named `file` + * and must be the last field in the form (an AWS S3 requirement). S3 returns `201 Created` on a successful upload. + * + * To learn more, see [Custom fonts](/data/docs/custom-fonts). + * + * Required scope | `sites:write` + * + * @param {string} site_id - Unique identifier for a Site + * @param {Webflow.CustomFontsCreateRequest} request + * @param {CustomFontsClient.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} + * @throws {@link Webflow.ServiceUnavailableError} + * + * @example + * await client.customFonts.create("580e63e98c9a982ac9b8b741", { + * fileName: "AcmeSans-Regular.woff2", + * fileHash: "3c7d87c9575702bc3b1e991f4d3c638e", + * fontFamily: "Acme Sans", + * weight: 400, + * italic: false, + * fontDisplay: "auto" + * }) + */ + public create( + site_id: string, + request: Webflow.CustomFontsCreateRequest, + requestOptions?: CustomFontsClient.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__create(site_id, request, requestOptions)); + } + + private async __create( + site_id: string, + request: Webflow.CustomFontsCreateRequest, + requestOptions?: CustomFontsClient.RequestOptions, + ): Promise> { + const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); + const _headers: core.Fetcher.Args["headers"] = mergeHeaders( + _authRequest.headers, + this._options?.headers, + requestOptions?.headers, + ); + const _response = await core.fetcher({ + url: core.url.join( + (await core.Supplier.get(this._options.baseUrl)) ?? + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi) + .base, + `sites/${core.url.encodePathParam(site_id)}/custom_fonts`, + ), + method: "POST", + headers: _headers, + contentType: "application/json", + queryParameters: requestOptions?.queryParams, + requestType: "json", + body: serializers.CustomFontsCreateRequest.jsonOrThrow(request, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + omitUndefined: true, + }), + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, + abortSignal: requestOptions?.abortSignal, + fetchFn: this._options?.fetch, + logging: this._options.logging, + }); + if (_response.ok) { + return { + data: serializers.CustomFontCreateResponse.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, + ); + case 503: + throw new Webflow.ServiceUnavailableError( + 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, + }); + } + } + + return handleNonStatusCodeError( + _response.error, + _response.rawResponse, + "POST", + "/sites/{site_id}/custom_fonts", + ); + } + + /** + * Get details about a custom font on a site. + * + * Required scope | `sites:read` + * + * @param {string} site_id - Unique identifier for a Site + * @param {string} font_id - Unique identifier for a custom font on a site + * @param {CustomFontsClient.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.customFonts.get("580e63e98c9a982ac9b8b741", "66f3a1b2c4d5e6f7a8b9c0d1") + */ + public get( + site_id: string, + font_id: string, + requestOptions?: CustomFontsClient.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__get(site_id, font_id, requestOptions)); + } + + private async __get( + site_id: string, + font_id: string, + requestOptions?: CustomFontsClient.RequestOptions, + ): Promise> { + const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); + const _headers: core.Fetcher.Args["headers"] = mergeHeaders( + _authRequest.headers, + this._options?.headers, + requestOptions?.headers, + ); + const _response = await core.fetcher({ + url: core.url.join( + (await core.Supplier.get(this._options.baseUrl)) ?? + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi) + .base, + `sites/${core.url.encodePathParam(site_id)}/custom_fonts/${core.url.encodePathParam(font_id)}`, + ), + method: "GET", + headers: _headers, + queryParameters: requestOptions?.queryParams, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, + abortSignal: requestOptions?.abortSignal, + fetchFn: this._options?.fetch, + logging: this._options.logging, + }); + if (_response.ok) { + return { + data: serializers.CustomFontsGetResponse.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, + }); + } + } + + return handleNonStatusCodeError( + _response.error, + _response.rawResponse, + "GET", + "/sites/{site_id}/custom_fonts/{font_id}", + ); + } + + /** + * Delete a custom font from a site. + * + * Required scope | `sites:write` + * + * @param {string} site_id - Unique identifier for a Site + * @param {string} font_id - Unique identifier for a custom font on a site + * @param {CustomFontsClient.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.customFonts.delete("580e63e98c9a982ac9b8b741", "66f3a1b2c4d5e6f7a8b9c0d1") + */ + public delete( + site_id: string, + font_id: string, + requestOptions?: CustomFontsClient.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__delete(site_id, font_id, requestOptions)); + } + + private async __delete( + site_id: string, + font_id: string, + requestOptions?: CustomFontsClient.RequestOptions, + ): Promise> { + const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); + const _headers: core.Fetcher.Args["headers"] = mergeHeaders( + _authRequest.headers, + this._options?.headers, + requestOptions?.headers, + ); + const _response = await core.fetcher({ + url: core.url.join( + (await core.Supplier.get(this._options.baseUrl)) ?? + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi) + .base, + `sites/${core.url.encodePathParam(site_id)}/custom_fonts/${core.url.encodePathParam(font_id)}`, + ), + method: "DELETE", + headers: _headers, + queryParameters: requestOptions?.queryParams, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, + abortSignal: requestOptions?.abortSignal, + fetchFn: this._options?.fetch, + logging: this._options.logging, + }); + 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 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, + }); + } + } + + return handleNonStatusCodeError( + _response.error, + _response.rawResponse, + "DELETE", + "/sites/{site_id}/custom_fonts/{font_id}", + ); + } + + /** + * Update the metadata of a custom font. The font binary is not changed by this endpoint. + * To replace the binary, use [Replace custom font file](#operation/replace-custom-font-file). + * + * The request body must include at least one of `fontFamily`, `weight`, `italic`, or `fontDisplay`. + * + * Required scope | `sites:write` + * + * @param {string} site_id - Unique identifier for a Site + * @param {string} font_id - Unique identifier for a custom font on a site + * @param {Webflow.CustomFontsUpdateRequest} request + * @param {CustomFontsClient.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.customFonts.update("580e63e98c9a982ac9b8b741", "66f3a1b2c4d5e6f7a8b9c0d1") + */ + public update( + site_id: string, + font_id: string, + request: Webflow.CustomFontsUpdateRequest = {}, + requestOptions?: CustomFontsClient.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__update(site_id, font_id, request, requestOptions)); + } + + private async __update( + site_id: string, + font_id: string, + request: Webflow.CustomFontsUpdateRequest = {}, + requestOptions?: CustomFontsClient.RequestOptions, + ): Promise> { + const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); + const _headers: core.Fetcher.Args["headers"] = mergeHeaders( + _authRequest.headers, + this._options?.headers, + requestOptions?.headers, + ); + const _response = await core.fetcher({ + url: core.url.join( + (await core.Supplier.get(this._options.baseUrl)) ?? + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi) + .base, + `sites/${core.url.encodePathParam(site_id)}/custom_fonts/${core.url.encodePathParam(font_id)}`, + ), + method: "PATCH", + headers: _headers, + contentType: "application/json", + queryParameters: requestOptions?.queryParams, + requestType: "json", + body: serializers.CustomFontsUpdateRequest.jsonOrThrow(request, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + omitUndefined: true, + }), + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, + abortSignal: requestOptions?.abortSignal, + fetchFn: this._options?.fetch, + logging: this._options.logging, + }); + if (_response.ok) { + return { + data: serializers.CustomFontsUpdateResponse.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, + }); + } + } + + return handleNonStatusCodeError( + _response.error, + _response.rawResponse, + "PATCH", + "/sites/{site_id}/custom_fonts/{font_id}", + ); + } + + /** + * Replace the binary of an existing custom font while preserving its ID and any references to it. + * The upload handshake is identical to [Create custom font](#operation/create-custom-font). + * + * If the existing font has a non-empty `axes` array (a variable font), you must include an `axes` field + * in the request. Send `axes: []` to declare that the new binary is a static font, or send the new variable + * axes to declare it is still variable. Omitting `axes` when the existing font is variable returns `400`. + * + * Required scope | `sites:write` + * + * @param {string} site_id - Unique identifier for a Site + * @param {string} font_id - Unique identifier for a custom font on a site + * @param {Webflow.CustomFontsReplaceFileRequest} request + * @param {CustomFontsClient.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.customFonts.replaceFile("580e63e98c9a982ac9b8b741", "66f3a1b2c4d5e6f7a8b9c0d1", { + * fileName: "AcmeSans-Regular-v2.woff2", + * fileHash: "3c7d87c9575702bc3b1e991f4d3c638e" + * }) + */ + public replaceFile( + site_id: string, + font_id: string, + request: Webflow.CustomFontsReplaceFileRequest, + requestOptions?: CustomFontsClient.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__replaceFile(site_id, font_id, request, requestOptions)); + } + + private async __replaceFile( + site_id: string, + font_id: string, + request: Webflow.CustomFontsReplaceFileRequest, + requestOptions?: CustomFontsClient.RequestOptions, + ): Promise> { + const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); + const _headers: core.Fetcher.Args["headers"] = mergeHeaders( + _authRequest.headers, + this._options?.headers, + requestOptions?.headers, + ); + const _response = await core.fetcher({ + url: core.url.join( + (await core.Supplier.get(this._options.baseUrl)) ?? + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi) + .base, + `sites/${core.url.encodePathParam(site_id)}/custom_fonts/${core.url.encodePathParam(font_id)}/file`, + ), + method: "PUT", + headers: _headers, + contentType: "application/json", + queryParameters: requestOptions?.queryParams, + requestType: "json", + body: serializers.CustomFontsReplaceFileRequest.jsonOrThrow(request, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + omitUndefined: true, + }), + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, + abortSignal: requestOptions?.abortSignal, + fetchFn: this._options?.fetch, + logging: this._options.logging, + }); + if (_response.ok) { + return { + data: serializers.CustomFontCreateResponse.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, + }); + } + } + + return handleNonStatusCodeError( + _response.error, + _response.rawResponse, + "PUT", + "/sites/{site_id}/custom_fonts/{font_id}/file", + ); + } + + /** + * Delete 1-100 custom fonts in a single request. The response is always `200 OK` for a valid request body. + * Per-font results are reported in the `deleted` and `failed` arrays. + * + * The endpoint is idempotent: fonts that do not exist appear in `failed` with `name: "NotFound"` rather than + * failing the entire request. You can safely retry a partial failure by re-sending only the IDs that did not + * appear in `deleted`. + * + * Required scope | `sites:write` + * + * @param {string} site_id - Unique identifier for a Site + * @param {Webflow.CustomFontBatchDeleteRequest} request + * @param {CustomFontsClient.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.customFonts.batchDelete("580e63e98c9a982ac9b8b741", { + * items: [{ + * id: "66f3a1b2c4d5e6f7a8b9c0d1" + * }] + * }) + */ + public batchDelete( + site_id: string, + request: Webflow.CustomFontBatchDeleteRequest, + requestOptions?: CustomFontsClient.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__batchDelete(site_id, request, requestOptions)); + } + + private async __batchDelete( + site_id: string, + request: Webflow.CustomFontBatchDeleteRequest, + requestOptions?: CustomFontsClient.RequestOptions, + ): Promise> { + const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); + const _headers: core.Fetcher.Args["headers"] = mergeHeaders( + _authRequest.headers, + this._options?.headers, + requestOptions?.headers, + ); + const _response = await core.fetcher({ + url: core.url.join( + (await core.Supplier.get(this._options.baseUrl)) ?? + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi) + .base, + `sites/${core.url.encodePathParam(site_id)}/custom_fonts/batchDelete`, + ), + method: "POST", + headers: _headers, + contentType: "application/json", + queryParameters: requestOptions?.queryParams, + requestType: "json", + body: serializers.CustomFontBatchDeleteRequest.jsonOrThrow(request, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + omitUndefined: true, + }), + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, + abortSignal: requestOptions?.abortSignal, + fetchFn: this._options?.fetch, + logging: this._options.logging, + }); + if (_response.ok) { + return { + data: serializers.CustomFontBatchDeleteResponse.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, + }); + } + } + + return handleNonStatusCodeError( + _response.error, + _response.rawResponse, + "POST", + "/sites/{site_id}/custom_fonts/batchDelete", + ); + } +} diff --git a/src/api/resources/customFonts/client/index.ts b/src/api/resources/customFonts/client/index.ts new file mode 100644 index 00000000..415726b7 --- /dev/null +++ b/src/api/resources/customFonts/client/index.ts @@ -0,0 +1 @@ +export * from "./requests"; diff --git a/src/api/resources/customFonts/client/requests/CustomFontBatchDeleteRequest.ts b/src/api/resources/customFonts/client/requests/CustomFontBatchDeleteRequest.ts new file mode 100644 index 00000000..3cefdd92 --- /dev/null +++ b/src/api/resources/customFonts/client/requests/CustomFontBatchDeleteRequest.ts @@ -0,0 +1,15 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Webflow from "../../../../index"; + +/** + * @example + * { + * items: [{ + * id: "66f3a1b2c4d5e6f7a8b9c0d1" + * }] + * } + */ +export interface CustomFontBatchDeleteRequest { + items: Webflow.CustomFontBatchDeleteRequestItemsItem[]; +} diff --git a/src/api/resources/customFonts/client/requests/CustomFontsCreateRequest.ts b/src/api/resources/customFonts/client/requests/CustomFontsCreateRequest.ts new file mode 100644 index 00000000..c002cd65 --- /dev/null +++ b/src/api/resources/customFonts/client/requests/CustomFontsCreateRequest.ts @@ -0,0 +1,31 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Webflow from "../../../../index"; + +/** + * @example + * { + * fileName: "AcmeSans-Regular.woff2", + * fileHash: "3c7d87c9575702bc3b1e991f4d3c638e", + * fontFamily: "Acme Sans", + * weight: 400, + * italic: false, + * fontDisplay: "auto" + * } + */ +export interface CustomFontsCreateRequest { + /** File name including extension. Accepted extensions are `.woff2`, `.woff`, `.ttf`, `.otf`, and `.eot`. Maximum 256 characters. */ + fileName: string; + /** Lowercase hex MD5 hash of the font binary (exactly 32 characters) */ + fileHash: string; + /** The CSS font-family name (1-256 characters). Commas are stripped server-side. */ + fontFamily: string; + /** CSS font-weight value (1-1000) */ + weight: number; + /** Whether the font is italic */ + italic: boolean; + /** CSS font-display value */ + fontDisplay: Webflow.CustomFontsCreateRequestFontDisplay; + /** Variable font axes. Omit or pass an empty array for static fonts. */ + axes?: Webflow.CustomFontAxis[]; +} diff --git a/src/api/resources/customFonts/client/requests/CustomFontsListRequest.ts b/src/api/resources/customFonts/client/requests/CustomFontsListRequest.ts new file mode 100644 index 00000000..2c2740d9 --- /dev/null +++ b/src/api/resources/customFonts/client/requests/CustomFontsListRequest.ts @@ -0,0 +1,15 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * @example + * { + * offset: 1, + * limit: 1 + * } + */ +export interface CustomFontsListRequest { + /** 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/customFonts/client/requests/CustomFontsReplaceFileRequest.ts b/src/api/resources/customFonts/client/requests/CustomFontsReplaceFileRequest.ts new file mode 100644 index 00000000..6c73a2e9 --- /dev/null +++ b/src/api/resources/customFonts/client/requests/CustomFontsReplaceFileRequest.ts @@ -0,0 +1,19 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Webflow from "../../../../index"; + +/** + * @example + * { + * fileName: "AcmeSans-Regular-v2.woff2", + * fileHash: "3c7d87c9575702bc3b1e991f4d3c638e" + * } + */ +export interface CustomFontsReplaceFileRequest { + /** File name including extension. Accepted extensions are `.woff2`, `.woff`, `.ttf`, `.otf`, and `.eot`. Maximum 256 characters. */ + fileName: string; + /** Lowercase hex MD5 hash of the font binary (exactly 32 characters) */ + fileHash: string; + /** Variable font axes for the replacement binary. Required when the existing font has a non-empty `axes` array. */ + axes?: Webflow.CustomFontAxis[]; +} diff --git a/src/api/resources/customFonts/client/requests/CustomFontsUpdateRequest.ts b/src/api/resources/customFonts/client/requests/CustomFontsUpdateRequest.ts new file mode 100644 index 00000000..12ba184c --- /dev/null +++ b/src/api/resources/customFonts/client/requests/CustomFontsUpdateRequest.ts @@ -0,0 +1,18 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Webflow from "../../../../index"; + +/** + * @example + * {} + */ +export interface CustomFontsUpdateRequest { + /** The CSS font-family name (1-256 characters) */ + fontFamily?: string; + /** CSS font-weight value (1-1000) */ + weight?: number; + /** Whether the font is italic */ + italic?: boolean; + /** CSS font-display value */ + fontDisplay?: Webflow.CustomFontsUpdateRequestFontDisplay; +} diff --git a/src/api/resources/customFonts/client/requests/index.ts b/src/api/resources/customFonts/client/requests/index.ts new file mode 100644 index 00000000..b7afe56b --- /dev/null +++ b/src/api/resources/customFonts/client/requests/index.ts @@ -0,0 +1,5 @@ +export type { CustomFontBatchDeleteRequest } from "./CustomFontBatchDeleteRequest"; +export type { CustomFontsCreateRequest } from "./CustomFontsCreateRequest"; +export type { CustomFontsListRequest } from "./CustomFontsListRequest"; +export type { CustomFontsReplaceFileRequest } from "./CustomFontsReplaceFileRequest"; +export type { CustomFontsUpdateRequest } from "./CustomFontsUpdateRequest"; diff --git a/src/api/resources/customFonts/exports.ts b/src/api/resources/customFonts/exports.ts new file mode 100644 index 00000000..b7858273 --- /dev/null +++ b/src/api/resources/customFonts/exports.ts @@ -0,0 +1,4 @@ +// This file was auto-generated by Fern from our API Definition. + +export { CustomFontsClient } from "./client/Client"; +export * from "./client/index"; diff --git a/src/api/resources/customFonts/index.ts b/src/api/resources/customFonts/index.ts new file mode 100644 index 00000000..d2ec2302 --- /dev/null +++ b/src/api/resources/customFonts/index.ts @@ -0,0 +1,2 @@ +export * from "./client"; +export * from "./types"; diff --git a/src/api/resources/customFonts/types/CustomFontBatchDeleteRequestItemsItem.ts b/src/api/resources/customFonts/types/CustomFontBatchDeleteRequestItemsItem.ts new file mode 100644 index 00000000..b7910e86 --- /dev/null +++ b/src/api/resources/customFonts/types/CustomFontBatchDeleteRequestItemsItem.ts @@ -0,0 +1,6 @@ +// This file was auto-generated by Fern from our API Definition. + +export interface CustomFontBatchDeleteRequestItemsItem { + /** The ID of the custom font to delete */ + id: string; +} diff --git a/src/api/resources/customFonts/types/CustomFontsCreateRequestFontDisplay.ts b/src/api/resources/customFonts/types/CustomFontsCreateRequestFontDisplay.ts new file mode 100644 index 00000000..0715f832 --- /dev/null +++ b/src/api/resources/customFonts/types/CustomFontsCreateRequestFontDisplay.ts @@ -0,0 +1,12 @@ +// This file was auto-generated by Fern from our API Definition. + +/** CSS font-display value */ +export const CustomFontsCreateRequestFontDisplay = { + Auto: "auto", + Block: "block", + Swap: "swap", + Fallback: "fallback", + Optional: "optional", +} as const; +export type CustomFontsCreateRequestFontDisplay = + (typeof CustomFontsCreateRequestFontDisplay)[keyof typeof CustomFontsCreateRequestFontDisplay]; diff --git a/src/api/resources/customFonts/types/CustomFontsGetResponse.ts b/src/api/resources/customFonts/types/CustomFontsGetResponse.ts new file mode 100644 index 00000000..6ac4539a --- /dev/null +++ b/src/api/resources/customFonts/types/CustomFontsGetResponse.ts @@ -0,0 +1,7 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Webflow from "../../../index"; + +export interface CustomFontsGetResponse { + customFont: Webflow.CustomFont; +} diff --git a/src/api/resources/customFonts/types/CustomFontsUpdateRequestFontDisplay.ts b/src/api/resources/customFonts/types/CustomFontsUpdateRequestFontDisplay.ts new file mode 100644 index 00000000..90afbcca --- /dev/null +++ b/src/api/resources/customFonts/types/CustomFontsUpdateRequestFontDisplay.ts @@ -0,0 +1,12 @@ +// This file was auto-generated by Fern from our API Definition. + +/** CSS font-display value */ +export const CustomFontsUpdateRequestFontDisplay = { + Auto: "auto", + Block: "block", + Swap: "swap", + Fallback: "fallback", + Optional: "optional", +} as const; +export type CustomFontsUpdateRequestFontDisplay = + (typeof CustomFontsUpdateRequestFontDisplay)[keyof typeof CustomFontsUpdateRequestFontDisplay]; diff --git a/src/api/resources/customFonts/types/CustomFontsUpdateResponse.ts b/src/api/resources/customFonts/types/CustomFontsUpdateResponse.ts new file mode 100644 index 00000000..db9c6658 --- /dev/null +++ b/src/api/resources/customFonts/types/CustomFontsUpdateResponse.ts @@ -0,0 +1,7 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Webflow from "../../../index"; + +export interface CustomFontsUpdateResponse { + customFont: Webflow.CustomFont; +} diff --git a/src/api/resources/customFonts/types/index.ts b/src/api/resources/customFonts/types/index.ts new file mode 100644 index 00000000..c22e9878 --- /dev/null +++ b/src/api/resources/customFonts/types/index.ts @@ -0,0 +1,5 @@ +export * from "./CustomFontBatchDeleteRequestItemsItem"; +export * from "./CustomFontsCreateRequestFontDisplay"; +export * from "./CustomFontsGetResponse"; +export * from "./CustomFontsUpdateRequestFontDisplay"; +export * from "./CustomFontsUpdateResponse"; diff --git a/src/api/resources/index.ts b/src/api/resources/index.ts index be03645d..416eb954 100644 --- a/src/api/resources/index.ts +++ b/src/api/resources/index.ts @@ -6,6 +6,9 @@ export * as comments from "./comments"; export * as components from "./components"; export * from "./components/client/requests"; export * from "./components/types"; +export * as customFonts from "./customFonts"; +export * from "./customFonts/client/requests"; +export * from "./customFonts/types"; export * as ecommerce from "./ecommerce"; export * as forms from "./forms"; export * from "./forms/client/requests"; diff --git a/src/api/resources/pages/client/requests/PageMetadataWrite.ts b/src/api/resources/pages/client/requests/PageMetadataWrite.ts index 6e6709e5..da750242 100644 --- a/src/api/resources/pages/client/requests/PageMetadataWrite.ts +++ b/src/api/resources/pages/client/requests/PageMetadataWrite.ts @@ -32,8 +32,9 @@ export interface PageMetadataWrite { /** * Slug for the page. * - * - * **Note:** Updating slugs in secondary locales is only supported in Advanced and Enterprise localization add-on plans. + * **Note:** The slug field is ignored in the following cases — all other fields in the same request still apply: + * - The site's home page, collection template pages, and utility pages (e.g. 404, password, search). + * - For secondary locales, updating the slug requires an Advanced or Enterprise localization add-on plan. */ slug?: string; /** SEO-related fields for the Page */ diff --git a/src/api/resources/pages/resources/scripts/client/Client.ts b/src/api/resources/pages/resources/scripts/client/Client.ts index f95d33e9..f5ef2c4f 100644 --- a/src/api/resources/pages/resources/scripts/client/Client.ts +++ b/src/api/resources/pages/resources/scripts/client/Client.ts @@ -26,6 +26,8 @@ export class ScriptsClient { /** * Get all scripts applied to a page. * + * Access to this endpoint requires a bearer token obtained from an [OAuth Code Grant Flow](/data/reference/oauth-app). + * * Required scope | `custom_code:read` * * @param {string} page_id - Unique identifier for a Page @@ -153,6 +155,8 @@ export class ScriptsClient { * To apply a script to a page, the script must first be registered to a Site via the [Register Script](/data/reference/custom-code/custom-code/register-hosted) endpoints. Once registered, the script can be applied to a Site or Page using the appropriate endpoints. See the documentation on [working with Custom Code](/data/docs/custom-code) for more information. * * + * Access to this endpoint requires a bearer token obtained from an [OAuth Code Grant Flow](/data/reference/oauth-app). + * * Required scope | `custom_code:write` * * @param {string} page_id - Unique identifier for a Page diff --git a/src/api/resources/scripts/client/Client.ts b/src/api/resources/scripts/client/Client.ts index ae91477b..f4652e45 100644 --- a/src/api/resources/scripts/client/Client.ts +++ b/src/api/resources/scripts/client/Client.ts @@ -30,6 +30,8 @@ export class ScriptsClient { * To apply a script to a site or page, the script must first be registered to a site via the [Register Script](/data/reference/custom-code/custom-code/register-hosted) endpoints. Once registered, the script can be applied to a Site or Page using the appropriate endpoints. See the documentation on [working with Custom Code](/data/docs/custom-code) for more information. * * + * Access to this endpoint requires a bearer token obtained from an [OAuth Code Grant Flow](/data/reference/oauth-app). + * * Required scope | `custom_code:read` * * @param {string} site_id - Unique identifier for a Site @@ -162,6 +164,8 @@ export class ScriptsClient { * To apply a script to a site or page, the script must first be registered to a site via the [Register Script](/data/reference/custom-code/custom-code/register-hosted) endpoints. Once registered, the script can be applied to a Site or Page using the appropriate endpoints. See the documentation on [working with Custom Code](/data/docs/custom-code) for more information. * * + * Access to this endpoint requires a bearer token obtained from an [OAuth Code Grant Flow](/data/reference/oauth-app). + * * Required scope | `custom_code:write` * * @param {string} site_id - Unique identifier for a Site @@ -310,6 +314,8 @@ export class ScriptsClient { * To apply a script to a site or page, the script must first be registered to a site via the [Register Script](/data/reference/custom-code/custom-code/register-hosted) endpoints. Once registered, the script can be applied to a Site or Page using the appropriate endpoints. See the documentation on [working with Custom Code](/data/docs/custom-code) for more information. * * + * Access to this endpoint requires a bearer token obtained from an [OAuth Code Grant Flow](/data/reference/oauth-app). + * * Required scope | `custom_code:write` * * @param {string} site_id - Unique identifier for a Site diff --git a/src/api/resources/sites/client/Client.ts b/src/api/resources/sites/client/Client.ts index ae2ebd17..16f1d888 100644 --- a/src/api/resources/sites/client/Client.ts +++ b/src/api/resources/sites/client/Client.ts @@ -12,6 +12,7 @@ import * as Webflow from "../../../index"; import { ActivityLogsClient } from "../resources/activityLogs/client/Client"; import { CommentsClient } from "../resources/comments/client/Client"; import { FormsClient } from "../resources/forms/client/Client"; +import { GoogleTagClient } from "../resources/googleTag/client/Client"; import { PlansClient } from "../resources/plans/client/Client"; import { RedirectsClient } from "../resources/redirects/client/Client"; import { RobotsTxtClient } from "../resources/robotsTxt/client/Client"; @@ -33,6 +34,7 @@ export class SitesClient { protected _plans: PlansClient | undefined; protected _robotsTxt: RobotsTxtClient | undefined; protected _wellKnown: WellKnownClient | undefined; + protected _googleTag: GoogleTagClient | undefined; protected _activityLogs: ActivityLogsClient | undefined; protected _comments: CommentsClient | undefined; protected _scripts: ScriptsClient | undefined; @@ -58,6 +60,10 @@ export class SitesClient { return (this._wellKnown ??= new WellKnownClient(this._options)); } + public get googleTag(): GoogleTagClient { + return (this._googleTag ??= new GoogleTagClient(this._options)); + } + public get activityLogs(): ActivityLogsClient { return (this._activityLogs ??= new ActivityLogsClient(this._options)); } @@ -825,12 +831,15 @@ export class SitesClient { } /** - * Publishes a site to one or more more domains. + * Publishes a site or an individual page to one or more domains. + * If multiple individual pages are published to staging, publishing from staging to production publishes all staged changes. * * To publish to a specific custom domain, use the domain IDs from the [Get Custom Domains](/data/reference/sites/get-custom-domain) endpoint. * * You must include at least one of the `customDomains` or `publishToWebflowSubdomain` properties in the request body. * + * To publish an individual page instead of the entire site, provide the ID of the page in the `pageId` parameter. + * * This endpoint has a specific rate limit of one successful publish queue per minute. * * Required scope | `sites:write` diff --git a/src/api/resources/sites/client/requests/SitesPublishRequest.ts b/src/api/resources/sites/client/requests/SitesPublishRequest.ts index 55b7a596..1ab6b1d2 100644 --- a/src/api/resources/sites/client/requests/SitesPublishRequest.ts +++ b/src/api/resources/sites/client/requests/SitesPublishRequest.ts @@ -12,4 +12,6 @@ export interface SitesPublishRequest { customDomains?: string[]; /** Choice of whether to publish to the default Webflow Subdomain */ publishToWebflowSubdomain?: boolean; + /** The ID of the page to publish */ + pageId?: string; } diff --git a/src/api/resources/sites/resources/googleTag/client/Client.ts b/src/api/resources/sites/resources/googleTag/client/Client.ts new file mode 100644 index 00000000..accb68de --- /dev/null +++ b/src/api/resources/sites/resources/googleTag/client/Client.ts @@ -0,0 +1,547 @@ +// This file was auto-generated by Fern from our API Definition. + +import type { BaseClientOptions, BaseRequestOptions } from "../../../../../../BaseClient"; +import { type NormalizedClientOptionsWithAuth, normalizeClientOptionsWithAuth } from "../../../../../../BaseClient"; +import * as core from "../../../../../../core"; +import { mergeHeaders } from "../../../../../../core/headers"; +import * as environments from "../../../../../../environments"; +import { handleNonStatusCodeError } from "../../../../../../errors/handleNonStatusCodeError"; +import * as errors from "../../../../../../errors/index"; +import * as serializers from "../../../../../../serialization/index"; +import * as Webflow from "../../../../../index"; + +export declare namespace GoogleTagClient { + export type Options = BaseClientOptions; + + export interface RequestOptions extends BaseRequestOptions {} +} + +export class GoogleTagClient { + protected readonly _options: NormalizedClientOptionsWithAuth; + + constructor(options: GoogleTagClient.Options) { + this._options = normalizeClientOptionsWithAuth(options); + } + + /** + * List all Google Tag IDs configured for a site, sorted by order. + * + * Required scope: `sites:read` + * + * @param {string} site_id - Unique identifier for a Site + * @param {GoogleTagClient.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Webflow.BadRequestError} + * @throws {@link Webflow.UnauthorizedError} + * @throws {@link Webflow.NotFoundError} + * @throws {@link Webflow.TooManyRequestsError} + * @throws {@link Webflow.InternalServerError} + * + * @example + * await client.sites.googleTag.list("580e63e98c9a982ac9b8b741") + */ + public list( + site_id: string, + requestOptions?: GoogleTagClient.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__list(site_id, requestOptions)); + } + + private async __list( + site_id: string, + requestOptions?: GoogleTagClient.RequestOptions, + ): Promise> { + const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); + const _headers: core.Fetcher.Args["headers"] = mergeHeaders( + _authRequest.headers, + this._options?.headers, + requestOptions?.headers, + ); + const _response = await core.fetcher({ + url: core.url.join( + (await core.Supplier.get(this._options.baseUrl)) ?? + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi) + .base, + `sites/${core.url.encodePathParam(site_id)}/integrations/google_tags`, + ), + method: "GET", + headers: _headers, + queryParameters: requestOptions?.queryParams, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, + abortSignal: requestOptions?.abortSignal, + fetchFn: this._options?.fetch, + logging: this._options.logging, + }); + if (_response.ok) { + return { + data: serializers.GoogleTagIds.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 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, + }); + } + } + + return handleNonStatusCodeError( + _response.error, + _response.rawResponse, + "GET", + "/sites/{site_id}/integrations/google_tags", + ); + } + + /** + * Delete all Google Tag IDs from a site. + * + * Required scope: `sites:write` + * + * @param {string} site_id - Unique identifier for a Site + * @param {GoogleTagClient.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Webflow.BadRequestError} + * @throws {@link Webflow.UnauthorizedError} + * @throws {@link Webflow.NotFoundError} + * @throws {@link Webflow.TooManyRequestsError} + * @throws {@link Webflow.InternalServerError} + * + * @example + * await client.sites.googleTag.deleteAll("580e63e98c9a982ac9b8b741") + */ + public deleteAll(site_id: string, requestOptions?: GoogleTagClient.RequestOptions): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__deleteAll(site_id, requestOptions)); + } + + private async __deleteAll( + site_id: string, + requestOptions?: GoogleTagClient.RequestOptions, + ): Promise> { + const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); + const _headers: core.Fetcher.Args["headers"] = mergeHeaders( + _authRequest.headers, + this._options?.headers, + requestOptions?.headers, + ); + const _response = await core.fetcher({ + url: core.url.join( + (await core.Supplier.get(this._options.baseUrl)) ?? + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi) + .base, + `sites/${core.url.encodePathParam(site_id)}/integrations/google_tags`, + ), + method: "DELETE", + headers: _headers, + queryParameters: requestOptions?.queryParams, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, + abortSignal: requestOptions?.abortSignal, + fetchFn: this._options?.fetch, + logging: this._options.logging, + }); + 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 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, + }); + } + } + + return handleNonStatusCodeError( + _response.error, + _response.rawResponse, + "DELETE", + "/sites/{site_id}/integrations/google_tags", + ); + } + + /** + * Add or update Google Tag IDs for a site. Existing tags not referenced in the request are preserved. A site may have a maximum of 25 tags total. + * + * `order` is optional on input — it is auto-assigned for new tags and returned on all tags in the response. + * + * Required scope: `sites:write` + * + * @param {string} site_id - Unique identifier for a Site + * @param {Webflow.GoogleTagIds} request + * @param {GoogleTagClient.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Webflow.BadRequestError} + * @throws {@link Webflow.UnauthorizedError} + * @throws {@link Webflow.NotFoundError} + * @throws {@link Webflow.TooManyRequestsError} + * @throws {@link Webflow.InternalServerError} + * + * @example + * await client.sites.googleTag.upsert("580e63e98c9a982ac9b8b741", { + * googleTagIds: [{ + * order: 0, + * displayName: "Main Analytics Tag", + * tagId: "G-1234567890" + * }] + * }) + */ + public upsert( + site_id: string, + request: Webflow.GoogleTagIds, + requestOptions?: GoogleTagClient.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__upsert(site_id, request, requestOptions)); + } + + private async __upsert( + site_id: string, + request: Webflow.GoogleTagIds, + requestOptions?: GoogleTagClient.RequestOptions, + ): Promise> { + const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); + const _headers: core.Fetcher.Args["headers"] = mergeHeaders( + _authRequest.headers, + this._options?.headers, + requestOptions?.headers, + ); + const _response = await core.fetcher({ + url: core.url.join( + (await core.Supplier.get(this._options.baseUrl)) ?? + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi) + .base, + `sites/${core.url.encodePathParam(site_id)}/integrations/google_tags`, + ), + method: "PATCH", + headers: _headers, + contentType: "application/json", + queryParameters: requestOptions?.queryParams, + requestType: "json", + body: serializers.GoogleTagIds.jsonOrThrow(request, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + omitUndefined: true, + }), + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, + abortSignal: requestOptions?.abortSignal, + fetchFn: this._options?.fetch, + logging: this._options.logging, + }); + if (_response.ok) { + return { + data: serializers.GoogleTagIds.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 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, + }); + } + } + + return handleNonStatusCodeError( + _response.error, + _response.rawResponse, + "PATCH", + "/sites/{site_id}/integrations/google_tags", + ); + } + + /** + * Delete a single Google Tag ID from a site. The `order` values of the remaining tags are renormalized after deletion. + * + * Required scope: `sites:write` + * + * @param {string} site_id - Unique identifier for a Site + * @param {string} tag_id - The Google Tag ID (e.g. G-XXXXXXXXXX) + * @param {GoogleTagClient.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Webflow.BadRequestError} + * @throws {@link Webflow.UnauthorizedError} + * @throws {@link Webflow.NotFoundError} + * @throws {@link Webflow.TooManyRequestsError} + * @throws {@link Webflow.InternalServerError} + * + * @example + * await client.sites.googleTag.delete("580e63e98c9a982ac9b8b741", "G-XXXXXXXXXX") + */ + public delete( + site_id: string, + tag_id: string, + requestOptions?: GoogleTagClient.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__delete(site_id, tag_id, requestOptions)); + } + + private async __delete( + site_id: string, + tag_id: string, + requestOptions?: GoogleTagClient.RequestOptions, + ): Promise> { + const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); + const _headers: core.Fetcher.Args["headers"] = mergeHeaders( + _authRequest.headers, + this._options?.headers, + requestOptions?.headers, + ); + const _response = await core.fetcher({ + url: core.url.join( + (await core.Supplier.get(this._options.baseUrl)) ?? + ((await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.DataApi) + .base, + `sites/${core.url.encodePathParam(site_id)}/integrations/google_tags/${core.url.encodePathParam(tag_id)}`, + ), + method: "DELETE", + headers: _headers, + queryParameters: requestOptions?.queryParams, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, + abortSignal: requestOptions?.abortSignal, + fetchFn: this._options?.fetch, + logging: this._options.logging, + }); + if (_response.ok) { + return { + data: serializers.GoogleTagIds.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 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, + }); + } + } + + return handleNonStatusCodeError( + _response.error, + _response.rawResponse, + "DELETE", + "/sites/{site_id}/integrations/google_tags/{tag_id}", + ); + } +} diff --git a/src/api/resources/sites/resources/googleTag/client/index.ts b/src/api/resources/sites/resources/googleTag/client/index.ts new file mode 100644 index 00000000..cb0ff5c3 --- /dev/null +++ b/src/api/resources/sites/resources/googleTag/client/index.ts @@ -0,0 +1 @@ +export {}; diff --git a/src/api/resources/sites/resources/googleTag/exports.ts b/src/api/resources/sites/resources/googleTag/exports.ts new file mode 100644 index 00000000..26cfd817 --- /dev/null +++ b/src/api/resources/sites/resources/googleTag/exports.ts @@ -0,0 +1,4 @@ +// This file was auto-generated by Fern from our API Definition. + +export { GoogleTagClient } from "./client/Client"; +export * from "./client/index"; diff --git a/src/api/resources/sites/resources/googleTag/index.ts b/src/api/resources/sites/resources/googleTag/index.ts new file mode 100644 index 00000000..5ec76921 --- /dev/null +++ b/src/api/resources/sites/resources/googleTag/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 61f7706e..c02fe5d0 100644 --- a/src/api/resources/sites/resources/index.ts +++ b/src/api/resources/sites/resources/index.ts @@ -5,6 +5,7 @@ export * from "./comments/client/requests"; export * from "./comments/types"; export * as forms from "./forms"; export * from "./forms/client/requests"; +export * as googleTag from "./googleTag"; export * as plans from "./plans"; export * as redirects from "./redirects"; export * as robotsTxt from "./robotsTxt"; diff --git a/src/api/resources/sites/resources/scripts/client/Client.ts b/src/api/resources/sites/resources/scripts/client/Client.ts index df0f7072..87faf953 100644 --- a/src/api/resources/sites/resources/scripts/client/Client.ts +++ b/src/api/resources/sites/resources/scripts/client/Client.ts @@ -30,6 +30,8 @@ export class ScriptsClient { * To apply a script to a site or page, the script must first be registered to a site via the [Register Script](/data/reference/custom-code/custom-code/register-hosted) endpoints. Once registered, the script can be applied to a Site or Page using the appropriate endpoints. See the documentation on [working with Custom Code](/data/docs/custom-code) for more information. * * + * Access to this endpoint requires a bearer token obtained from an [OAuth Code Grant Flow](/data/reference/oauth-app). + * * Required scope | `custom_code:read` * * @param {string} site_id - Unique identifier for a Site @@ -157,6 +159,8 @@ export class ScriptsClient { * To apply a script to a site or page, the script must first be registered to a site via the [Register Script](/data/reference/custom-code/custom-code/register-hosted) endpoints. Once registered, the script can be applied to a Site or Page using the appropriate endpoints. See the documentation on [working with Custom Code](/data/docs/custom-code) for more information. * * + * Access to this endpoint requires a bearer token obtained from an [OAuth Code Grant Flow](/data/reference/oauth-app). + * * Required scope | `custom_code:write` * * @param {string} site_id - Unique identifier for a Site @@ -433,6 +437,8 @@ export class ScriptsClient { * See the documentation on [working with Custom Code](/data/docs/custom-code) for more information. * * + * Access to this endpoint requires a bearer token obtained from an [OAuth Code Grant Flow](/data/reference/oauth-app). + * * Required scope | `custom_code:read` * * @param {string} site_id - Unique identifier for a Site diff --git a/src/api/resources/sites/types/SitesPublishResponse.ts b/src/api/resources/sites/types/SitesPublishResponse.ts index 4b7bb2fb..d613b992 100644 --- a/src/api/resources/sites/types/SitesPublishResponse.ts +++ b/src/api/resources/sites/types/SitesPublishResponse.ts @@ -7,4 +7,6 @@ export interface SitesPublishResponse { customDomains?: Webflow.Domain[]; /** Flag for publishing to webflow.io subdomain */ publishToWebflowSubdomain?: boolean; + /** Whether the site or an individual page was published */ + publishScope?: Webflow.SitesPublishResponsePublishScope; } diff --git a/src/api/resources/sites/types/SitesPublishResponsePublishScope.ts b/src/api/resources/sites/types/SitesPublishResponsePublishScope.ts new file mode 100644 index 00000000..c10855d8 --- /dev/null +++ b/src/api/resources/sites/types/SitesPublishResponsePublishScope.ts @@ -0,0 +1,9 @@ +// This file was auto-generated by Fern from our API Definition. + +/** Whether the site or an individual page was published */ +export const SitesPublishResponsePublishScope = { + Site: "site", + Page: "page", +} as const; +export type SitesPublishResponsePublishScope = + (typeof SitesPublishResponsePublishScope)[keyof typeof SitesPublishResponsePublishScope]; diff --git a/src/api/resources/sites/types/index.ts b/src/api/resources/sites/types/index.ts index 7708da86..e8d16a61 100644 --- a/src/api/resources/sites/types/index.ts +++ b/src/api/resources/sites/types/index.ts @@ -1 +1,2 @@ export * from "./SitesPublishResponse"; +export * from "./SitesPublishResponsePublishScope"; diff --git a/src/api/resources/token/client/Client.ts b/src/api/resources/token/client/Client.ts index 87f22111..b95fce29 100644 --- a/src/api/resources/token/client/Client.ts +++ b/src/api/resources/token/client/Client.ts @@ -108,7 +108,7 @@ export class TokenClient { /** * Information about the authorization token * - * Access to this endpoint requires a bearer token from a [Data Client App](/data/docs/getting-started-data-clients). + * Access to this endpoint requires a bearer token from a [Data Client App](/data/docs/data-clients/getting-started). * * @param {TokenClient.RequestOptions} requestOptions - Request-specific configuration. * diff --git a/src/api/resources/webhooks/client/Client.ts b/src/api/resources/webhooks/client/Client.ts index f6534024..8d52f9fe 100644 --- a/src/api/resources/webhooks/client/Client.ts +++ b/src/api/resources/webhooks/client/Client.ts @@ -154,7 +154,7 @@ export class WebhooksClient { * * Limit of 75 registrations per `triggerType`, per site. * - * Access to this endpoint requires a bearer token from a [Data Client App](/data/docs/getting-started-data-clients). + * Access to this endpoint requires a bearer token from a [Data Client App](/data/docs/data-clients/getting-started). * Required scope | `sites:write` * * @param {string} site_id - Unique identifier for a Site diff --git a/src/api/types/Asset.ts b/src/api/types/Asset.ts index 3346e95f..4e66f2ae 100644 --- a/src/api/types/Asset.ts +++ b/src/api/types/Asset.ts @@ -28,4 +28,9 @@ export interface Asset { variants: Webflow.AssetVariant[]; /** The visual description of the asset */ altText?: string; + /** + * The ID of the folder the asset belongs to, or `null` if the asset is at the site root. + * This field is present only in list responses (`GET /sites/{site_id}/assets`). + */ + folderId?: string; } diff --git a/src/api/types/CustomFont.ts b/src/api/types/CustomFont.ts new file mode 100644 index 00000000..b5aa1eaa --- /dev/null +++ b/src/api/types/CustomFont.ts @@ -0,0 +1,27 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Webflow from "../index"; + +/** + * A custom font uploaded to a Webflow site + */ +export interface CustomFont { + /** Unique identifier for the custom font */ + id?: string; + /** The CSS font-family name. Commas are stripped server-side. */ + fontFamily: string; + /** The font file format, derived from the file extension. The value `svg` represents read-only legacy data; new SVG font uploads are not accepted. */ + format?: Webflow.CustomFontFormat; + /** The file name supplied at upload time */ + fileName?: string; + /** The CSS font-weight value (1–1000) */ + weight: number; + /** Whether the font is italic */ + italic: boolean; + /** The CSS font-display value */ + fontDisplay: Webflow.CustomFontFontDisplay; + /** Variable font axes. An empty array indicates a static font. */ + axes: Webflow.CustomFontAxis[]; + /** CDN URL for the font binary */ + hostedUrl?: string; +} diff --git a/src/api/types/CustomFontAxis.ts b/src/api/types/CustomFontAxis.ts new file mode 100644 index 00000000..5bfa8869 --- /dev/null +++ b/src/api/types/CustomFontAxis.ts @@ -0,0 +1,17 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * A variable font axis definition + */ +export interface CustomFontAxis { + /** The four-character OpenType axis tag, consisting of exactly 4 printable ASCII characters (for example, `wght`, `opsz`, `slnt`, `wdth`) */ + tag: string; + /** Optional human-readable label for the axis */ + name?: string; + /** Minimum value for the axis */ + min: number; + /** Maximum value for the axis */ + max: number; + /** Default value for the axis. Must be between `min` and `max` (inclusive). Violating this constraint returns `400 BadArgument` with an error prefixed `fontMetadata.axes`. */ + defaultValue: number; +} diff --git a/src/api/types/CustomFontBatchDeleteResponse.ts b/src/api/types/CustomFontBatchDeleteResponse.ts new file mode 100644 index 00000000..eebbbdd2 --- /dev/null +++ b/src/api/types/CustomFontBatchDeleteResponse.ts @@ -0,0 +1,11 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Webflow from "../index"; + +/** + * Per-item result of a bulk-delete operation + */ +export interface CustomFontBatchDeleteResponse { + deleted: Webflow.CustomFontBatchDeleteResponseDeletedItem[]; + failed: Webflow.CustomFontBatchDeleteResponseFailedItem[]; +} diff --git a/src/api/types/CustomFontBatchDeleteResponseDeletedItem.ts b/src/api/types/CustomFontBatchDeleteResponseDeletedItem.ts new file mode 100644 index 00000000..82cf8e5b --- /dev/null +++ b/src/api/types/CustomFontBatchDeleteResponseDeletedItem.ts @@ -0,0 +1,6 @@ +// This file was auto-generated by Fern from our API Definition. + +export interface CustomFontBatchDeleteResponseDeletedItem { + /** The ID of a successfully deleted custom font */ + id: string; +} diff --git a/src/api/types/CustomFontBatchDeleteResponseFailedItem.ts b/src/api/types/CustomFontBatchDeleteResponseFailedItem.ts new file mode 100644 index 00000000..1604d95e --- /dev/null +++ b/src/api/types/CustomFontBatchDeleteResponseFailedItem.ts @@ -0,0 +1,10 @@ +// This file was auto-generated by Fern from our API Definition. + +export interface CustomFontBatchDeleteResponseFailedItem { + /** The ID of a custom font that could not be deleted */ + id: string; + /** Error name */ + name: string; + /** Human-readable error message */ + msg: string; +} diff --git a/src/api/types/CustomFontCreateResponse.ts b/src/api/types/CustomFontCreateResponse.ts new file mode 100644 index 00000000..442067b7 --- /dev/null +++ b/src/api/types/CustomFontCreateResponse.ts @@ -0,0 +1,11 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Webflow from "../index"; + +/** + * The response to a successful custom font creation or file replacement request + */ +export interface CustomFontCreateResponse { + customFont: Webflow.CustomFont; + upload: Webflow.CustomFontUpload; +} diff --git a/src/api/types/CustomFontFontDisplay.ts b/src/api/types/CustomFontFontDisplay.ts new file mode 100644 index 00000000..3d5a189e --- /dev/null +++ b/src/api/types/CustomFontFontDisplay.ts @@ -0,0 +1,11 @@ +// This file was auto-generated by Fern from our API Definition. + +/** The CSS font-display value */ +export const CustomFontFontDisplay = { + Auto: "auto", + Block: "block", + Swap: "swap", + Fallback: "fallback", + Optional: "optional", +} as const; +export type CustomFontFontDisplay = (typeof CustomFontFontDisplay)[keyof typeof CustomFontFontDisplay]; diff --git a/src/api/types/CustomFontFormat.ts b/src/api/types/CustomFontFormat.ts new file mode 100644 index 00000000..cf68a83d --- /dev/null +++ b/src/api/types/CustomFontFormat.ts @@ -0,0 +1,12 @@ +// This file was auto-generated by Fern from our API Definition. + +/** The font file format, derived from the file extension. The value `svg` represents read-only legacy data; new SVG font uploads are not accepted. */ +export const CustomFontFormat = { + Woff2: "woff2", + Woff: "woff", + Truetype: "truetype", + Opentype: "opentype", + EmbeddedOpentype: "embedded-opentype", + Svg: "svg", +} as const; +export type CustomFontFormat = (typeof CustomFontFormat)[keyof typeof CustomFontFormat]; diff --git a/src/api/types/CustomFontUpload.ts b/src/api/types/CustomFontUpload.ts new file mode 100644 index 00000000..080d0a52 --- /dev/null +++ b/src/api/types/CustomFontUpload.ts @@ -0,0 +1,14 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Webflow from "../index"; + +/** + * Presigned S3 upload details. Post the font binary to `url` as `multipart/form-data`, including every key from `fields` plus the binary itself in a field named `file`. The `file` field must be the last field in the form. + */ +export interface CustomFontUpload { + /** The S3 endpoint to POST the font binary to */ + url: string; + fields: Webflow.CustomFontUploadFields; + /** ISO 8601 timestamp after which the presigned URL expires (approximately 15 minutes from issuance) */ + expiresAt: Date; +} diff --git a/src/api/types/CustomFontUploadFields.ts b/src/api/types/CustomFontUploadFields.ts new file mode 100644 index 00000000..d96edf86 --- /dev/null +++ b/src/api/types/CustomFontUploadFields.ts @@ -0,0 +1,33 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * Form fields to include in the S3 multipart POST. Every key must be sent as a form field before the `file` field. + */ +export interface CustomFontUploadFields { + /** The S3 bucket name */ + bucket: string; + /** The S3 object key */ + key: string; + /** Base64-encoded S3 policy document */ + policy: string; + /** AWS Signature Version 4 algorithm identifier */ + xAmzAlgorithm: string; + /** AWS credential string */ + xAmzCredential: string; + /** Request date in ISO 8601 basic format */ + xAmzDate: string; + /** AWS Signature Version 4 signature */ + xAmzSignature: string; + /** AWS security token (included when temporary credentials are used) */ + xAmzSecurityToken?: string; + /** Base64-encoded MD5 hash of the file binary, derived from the `fileHash` you supplied */ + contentMd5: string; + /** S3 ACL. Always `public-read`, which makes the uploaded font accessible to the Webflow CDN. */ + acl: string; + /** Cache-Control header value applied to the S3 object */ + cacheControl: string; + /** MIME type matched to the file extension */ + contentType: string; + /** S3 returns this HTTP status code on a successful upload */ + successActionStatus: string; +} diff --git a/src/api/types/CustomFonts.ts b/src/api/types/CustomFonts.ts new file mode 100644 index 00000000..b41e79b6 --- /dev/null +++ b/src/api/types/CustomFonts.ts @@ -0,0 +1,11 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Webflow from "../index"; + +/** + * A list of custom fonts + */ +export interface CustomFonts { + customFonts: Webflow.CustomFont[]; + pagination: Webflow.Pagination; +} diff --git a/src/api/types/ErrorCode.ts b/src/api/types/ErrorCode.ts index d0e73bcd..a3ddce3e 100644 --- a/src/api/types/ErrorCode.ts +++ b/src/api/types/ErrorCode.ts @@ -24,6 +24,7 @@ export const ErrorCode = { NotEnterprisePlanWorkspace: "not_enterprise_plan_workspace", OrderNotFound: "order_not_found", ResourceNotFound: "resource_not_found", + ServiceUnavailable: "service_unavailable", TooManyRequests: "too_many_requests", UnsupportedVersion: "unsupported_version", UnsupportedWebhookTriggerType: "unsupported_webhook_trigger_type", diff --git a/src/api/types/FormSubmission.ts b/src/api/types/FormSubmission.ts index aef4b732..32a29a65 100644 --- a/src/api/types/FormSubmission.ts +++ b/src/api/types/FormSubmission.ts @@ -13,4 +13,6 @@ export interface FormSubmission { dateSubmitted?: Date; /** The data submitted in the Form */ formResponse?: Record; + /** The ID of the locale the form was submitted from. `null` for primary-locale submissions or sites without localization. */ + localeId?: string; } diff --git a/src/api/types/FormSubmissionTriggerPayload.ts b/src/api/types/FormSubmissionTriggerPayload.ts index dfa4b2a9..cf874564 100644 --- a/src/api/types/FormSubmissionTriggerPayload.ts +++ b/src/api/types/FormSubmissionTriggerPayload.ts @@ -22,4 +22,6 @@ export interface FormSubmissionTriggerPayload { formId?: string; /** The uniqueID of the Form element */ formElementId?: string; + /** The ID of the locale the form was submitted from. `null` for primary-locale submissions or sites without localization. */ + localeId?: string; } diff --git a/src/api/types/GoogleTagId.ts b/src/api/types/GoogleTagId.ts new file mode 100644 index 00000000..aed843a1 --- /dev/null +++ b/src/api/types/GoogleTagId.ts @@ -0,0 +1,13 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * A Google Tag associated with a site. + */ +export interface GoogleTagId { + /** Display order of the tag. Optional on input; always present on output. Auto-assigned for new tags and renormalized after deletion. */ + order?: number; + /** A human-readable label for the tag. */ + displayName: string; + /** The Google Tag ID. Accepts G-, GT-, AW-, and DC- prefixes. Rejects UA- prefixes. */ + tagId: string; +} diff --git a/src/api/types/GoogleTagIds.ts b/src/api/types/GoogleTagIds.ts new file mode 100644 index 00000000..150493bb --- /dev/null +++ b/src/api/types/GoogleTagIds.ts @@ -0,0 +1,11 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Webflow from "../index"; + +/** + * A list of Google Tags configured for a site. + */ +export interface GoogleTagIds { + /** List of Google Tags configured for a site, sorted by order. */ + googleTagIds: Webflow.GoogleTagId[]; +} diff --git a/src/api/types/PageCreatedWebhookPayload.ts b/src/api/types/PageCreatedWebhookPayload.ts index 2868ed48..e1d1b297 100644 --- a/src/api/types/PageCreatedWebhookPayload.ts +++ b/src/api/types/PageCreatedWebhookPayload.ts @@ -7,6 +7,14 @@ export interface PageCreatedWebhookPayload { siteId?: string; pageId?: string; pageTitle?: string; + /** The display name of the page, or null if not set */ + pageName?: string; + /** Whether the page is archived */ + archived?: boolean; + /** Whether the page is a draft */ + draft?: boolean; + /** Whether the page belongs to a branch */ + isBranch?: boolean; createdOn?: Date; publishedPath?: string; } diff --git a/src/api/types/PageDeletedWebhookPayload.ts b/src/api/types/PageDeletedWebhookPayload.ts index 4af70418..1cec3fc0 100644 --- a/src/api/types/PageDeletedWebhookPayload.ts +++ b/src/api/types/PageDeletedWebhookPayload.ts @@ -7,6 +7,14 @@ export interface PageDeletedWebhookPayload { siteId?: string; pageId?: string; pageTitle?: string; + /** The display name of the page, or null if not set */ + pageName?: string; + /** Whether the page is archived */ + archived?: boolean; + /** Whether the page is a draft */ + draft?: boolean; + /** Whether the page belongs to a branch */ + isBranch?: boolean; deletedOn?: Date; publishedPath?: string; } diff --git a/src/api/types/PageMetadataUpdatedWebhookPayload.ts b/src/api/types/PageMetadataUpdatedWebhookPayload.ts index 841cbb8e..548c853f 100644 --- a/src/api/types/PageMetadataUpdatedWebhookPayload.ts +++ b/src/api/types/PageMetadataUpdatedWebhookPayload.ts @@ -7,6 +7,14 @@ export interface PageMetadataUpdatedWebhookPayload { siteId?: string; pageId?: string; pageTitle?: string; + /** The display name of the page, or null if not set */ + pageName?: string; + /** Whether the page is archived */ + archived?: boolean; + /** Whether the page is a draft */ + draft?: boolean; + /** Whether the page belongs to a branch */ + isBranch?: boolean; lastUpdated?: Date; publishedPath?: string; } diff --git a/src/api/types/SitePublishPayload.ts b/src/api/types/SitePublishPayload.ts index 7b3987d8..576c3a4b 100644 --- a/src/api/types/SitePublishPayload.ts +++ b/src/api/types/SitePublishPayload.ts @@ -1,5 +1,7 @@ // This file was auto-generated by Fern from our API Definition. +import type * as Webflow from "../index"; + /** * The payload of data sent from Webflow */ @@ -12,4 +14,8 @@ export interface SitePublishPayload { domains?: string[]; /** The name and ID of the user who published the site */ publishedBy?: Record; + /** Whether the entire site or an individual page was published */ + publishScope?: Webflow.SitePublishPayloadPublishScope; + /** The ID of the page that was published */ + pageId?: string; } diff --git a/src/api/types/SitePublishPayloadPublishScope.ts b/src/api/types/SitePublishPayloadPublishScope.ts new file mode 100644 index 00000000..119c924a --- /dev/null +++ b/src/api/types/SitePublishPayloadPublishScope.ts @@ -0,0 +1,9 @@ +// This file was auto-generated by Fern from our API Definition. + +/** Whether the entire site or an individual page was published */ +export const SitePublishPayloadPublishScope = { + Page: "page", + Site: "site", +} as const; +export type SitePublishPayloadPublishScope = + (typeof SitePublishPayloadPublishScope)[keyof typeof SitePublishPayloadPublishScope]; diff --git a/src/api/types/index.ts b/src/api/types/index.ts index ce98580e..65e69b12 100644 --- a/src/api/types/index.ts +++ b/src/api/types/index.ts @@ -65,6 +65,17 @@ export * from "./CustomCodeBlock"; export * from "./CustomCodeBlockType"; export * from "./CustomCodeHostedResponse"; export * from "./CustomCodeInlineResponse"; +export * from "./CustomFont"; +export * from "./CustomFontAxis"; +export * from "./CustomFontBatchDeleteResponse"; +export * from "./CustomFontBatchDeleteResponseDeletedItem"; +export * from "./CustomFontBatchDeleteResponseFailedItem"; +export * from "./CustomFontCreateResponse"; +export * from "./CustomFontFontDisplay"; +export * from "./CustomFontFormat"; +export * from "./CustomFonts"; +export * from "./CustomFontUpload"; +export * from "./CustomFontUploadFields"; export * from "./CustomRole"; export * from "./CustomRoleAuditLogItem"; export * from "./CustomRoleAuditLogItemEventSubType"; @@ -92,6 +103,8 @@ export * from "./FormSubmissionTrigger"; export * from "./FormSubmissionTriggerPayload"; export * from "./FormSubmissionTriggerPayloadSchemaItem"; export * from "./FormSubmissionTriggerPayloadSchemaItemFieldType"; +export * from "./GoogleTagId"; +export * from "./GoogleTagIds"; export * from "./ImageNode"; export * from "./ImageNodeImage"; export * from "./InvalidDomain"; @@ -197,6 +210,7 @@ export * from "./SitePlanId"; export * from "./SitePlanName"; export * from "./SitePublish"; export * from "./SitePublishPayload"; +export * from "./SitePublishPayloadPublishScope"; export * from "./Sites"; export * from "./Sku"; export * from "./SkuFieldData"; diff --git a/src/serialization/resources/customFonts/client/index.ts b/src/serialization/resources/customFonts/client/index.ts new file mode 100644 index 00000000..415726b7 --- /dev/null +++ b/src/serialization/resources/customFonts/client/index.ts @@ -0,0 +1 @@ +export * from "./requests"; diff --git a/src/serialization/resources/customFonts/client/requests/CustomFontBatchDeleteRequest.ts b/src/serialization/resources/customFonts/client/requests/CustomFontBatchDeleteRequest.ts new file mode 100644 index 00000000..b3058d88 --- /dev/null +++ b/src/serialization/resources/customFonts/client/requests/CustomFontBatchDeleteRequest.ts @@ -0,0 +1,19 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Webflow from "../../../../../api/index"; +import * as core from "../../../../../core"; +import type * as serializers from "../../../../index"; +import { CustomFontBatchDeleteRequestItemsItem } from "../../types/CustomFontBatchDeleteRequestItemsItem"; + +export const CustomFontBatchDeleteRequest: core.serialization.Schema< + serializers.CustomFontBatchDeleteRequest.Raw, + Webflow.CustomFontBatchDeleteRequest +> = core.serialization.object({ + items: core.serialization.list(CustomFontBatchDeleteRequestItemsItem), +}); + +export declare namespace CustomFontBatchDeleteRequest { + export interface Raw { + items: CustomFontBatchDeleteRequestItemsItem.Raw[]; + } +} diff --git a/src/serialization/resources/customFonts/client/requests/CustomFontsCreateRequest.ts b/src/serialization/resources/customFonts/client/requests/CustomFontsCreateRequest.ts new file mode 100644 index 00000000..8c943c8b --- /dev/null +++ b/src/serialization/resources/customFonts/client/requests/CustomFontsCreateRequest.ts @@ -0,0 +1,32 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Webflow from "../../../../../api/index"; +import * as core from "../../../../../core"; +import type * as serializers from "../../../../index"; +import { CustomFontAxis } from "../../../../types/CustomFontAxis"; +import { CustomFontsCreateRequestFontDisplay } from "../../types/CustomFontsCreateRequestFontDisplay"; + +export const CustomFontsCreateRequest: core.serialization.Schema< + serializers.CustomFontsCreateRequest.Raw, + Webflow.CustomFontsCreateRequest +> = core.serialization.object({ + fileName: core.serialization.string(), + fileHash: core.serialization.string(), + fontFamily: core.serialization.string(), + weight: core.serialization.number(), + italic: core.serialization.boolean(), + fontDisplay: CustomFontsCreateRequestFontDisplay, + axes: core.serialization.list(CustomFontAxis).optional(), +}); + +export declare namespace CustomFontsCreateRequest { + export interface Raw { + fileName: string; + fileHash: string; + fontFamily: string; + weight: number; + italic: boolean; + fontDisplay: CustomFontsCreateRequestFontDisplay.Raw; + axes?: CustomFontAxis.Raw[] | null; + } +} diff --git a/src/serialization/resources/customFonts/client/requests/CustomFontsReplaceFileRequest.ts b/src/serialization/resources/customFonts/client/requests/CustomFontsReplaceFileRequest.ts new file mode 100644 index 00000000..c2e33ffb --- /dev/null +++ b/src/serialization/resources/customFonts/client/requests/CustomFontsReplaceFileRequest.ts @@ -0,0 +1,23 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Webflow from "../../../../../api/index"; +import * as core from "../../../../../core"; +import type * as serializers from "../../../../index"; +import { CustomFontAxis } from "../../../../types/CustomFontAxis"; + +export const CustomFontsReplaceFileRequest: core.serialization.Schema< + serializers.CustomFontsReplaceFileRequest.Raw, + Webflow.CustomFontsReplaceFileRequest +> = core.serialization.object({ + fileName: core.serialization.string(), + fileHash: core.serialization.string(), + axes: core.serialization.list(CustomFontAxis).optional(), +}); + +export declare namespace CustomFontsReplaceFileRequest { + export interface Raw { + fileName: string; + fileHash: string; + axes?: CustomFontAxis.Raw[] | null; + } +} diff --git a/src/serialization/resources/customFonts/client/requests/CustomFontsUpdateRequest.ts b/src/serialization/resources/customFonts/client/requests/CustomFontsUpdateRequest.ts new file mode 100644 index 00000000..47ab7dd1 --- /dev/null +++ b/src/serialization/resources/customFonts/client/requests/CustomFontsUpdateRequest.ts @@ -0,0 +1,25 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Webflow from "../../../../../api/index"; +import * as core from "../../../../../core"; +import type * as serializers from "../../../../index"; +import { CustomFontsUpdateRequestFontDisplay } from "../../types/CustomFontsUpdateRequestFontDisplay"; + +export const CustomFontsUpdateRequest: core.serialization.Schema< + serializers.CustomFontsUpdateRequest.Raw, + Webflow.CustomFontsUpdateRequest +> = core.serialization.object({ + fontFamily: core.serialization.string().optional(), + weight: core.serialization.number().optional(), + italic: core.serialization.boolean().optional(), + fontDisplay: CustomFontsUpdateRequestFontDisplay.optional(), +}); + +export declare namespace CustomFontsUpdateRequest { + export interface Raw { + fontFamily?: string | null; + weight?: number | null; + italic?: boolean | null; + fontDisplay?: CustomFontsUpdateRequestFontDisplay.Raw | null; + } +} diff --git a/src/serialization/resources/customFonts/client/requests/index.ts b/src/serialization/resources/customFonts/client/requests/index.ts new file mode 100644 index 00000000..9ed0132a --- /dev/null +++ b/src/serialization/resources/customFonts/client/requests/index.ts @@ -0,0 +1,4 @@ +export { CustomFontBatchDeleteRequest } from "./CustomFontBatchDeleteRequest"; +export { CustomFontsCreateRequest } from "./CustomFontsCreateRequest"; +export { CustomFontsReplaceFileRequest } from "./CustomFontsReplaceFileRequest"; +export { CustomFontsUpdateRequest } from "./CustomFontsUpdateRequest"; diff --git a/src/serialization/resources/customFonts/index.ts b/src/serialization/resources/customFonts/index.ts new file mode 100644 index 00000000..d2ec2302 --- /dev/null +++ b/src/serialization/resources/customFonts/index.ts @@ -0,0 +1,2 @@ +export * from "./client"; +export * from "./types"; diff --git a/src/serialization/resources/customFonts/types/CustomFontBatchDeleteRequestItemsItem.ts b/src/serialization/resources/customFonts/types/CustomFontBatchDeleteRequestItemsItem.ts new file mode 100644 index 00000000..e697e916 --- /dev/null +++ b/src/serialization/resources/customFonts/types/CustomFontBatchDeleteRequestItemsItem.ts @@ -0,0 +1,18 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Webflow from "../../../../api/index"; +import * as core from "../../../../core"; +import type * as serializers from "../../../index"; + +export const CustomFontBatchDeleteRequestItemsItem: core.serialization.ObjectSchema< + serializers.CustomFontBatchDeleteRequestItemsItem.Raw, + Webflow.CustomFontBatchDeleteRequestItemsItem +> = core.serialization.object({ + id: core.serialization.string(), +}); + +export declare namespace CustomFontBatchDeleteRequestItemsItem { + export interface Raw { + id: string; + } +} diff --git a/src/serialization/resources/customFonts/types/CustomFontsCreateRequestFontDisplay.ts b/src/serialization/resources/customFonts/types/CustomFontsCreateRequestFontDisplay.ts new file mode 100644 index 00000000..d1fa546e --- /dev/null +++ b/src/serialization/resources/customFonts/types/CustomFontsCreateRequestFontDisplay.ts @@ -0,0 +1,14 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Webflow from "../../../../api/index"; +import * as core from "../../../../core"; +import type * as serializers from "../../../index"; + +export const CustomFontsCreateRequestFontDisplay: core.serialization.Schema< + serializers.CustomFontsCreateRequestFontDisplay.Raw, + Webflow.CustomFontsCreateRequestFontDisplay +> = core.serialization.enum_(["auto", "block", "swap", "fallback", "optional"]); + +export declare namespace CustomFontsCreateRequestFontDisplay { + export type Raw = "auto" | "block" | "swap" | "fallback" | "optional"; +} diff --git a/src/serialization/resources/customFonts/types/CustomFontsGetResponse.ts b/src/serialization/resources/customFonts/types/CustomFontsGetResponse.ts new file mode 100644 index 00000000..beb25e15 --- /dev/null +++ b/src/serialization/resources/customFonts/types/CustomFontsGetResponse.ts @@ -0,0 +1,19 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Webflow from "../../../../api/index"; +import * as core from "../../../../core"; +import type * as serializers from "../../../index"; +import { CustomFont } from "../../../types/CustomFont"; + +export const CustomFontsGetResponse: core.serialization.ObjectSchema< + serializers.CustomFontsGetResponse.Raw, + Webflow.CustomFontsGetResponse +> = core.serialization.object({ + customFont: CustomFont, +}); + +export declare namespace CustomFontsGetResponse { + export interface Raw { + customFont: CustomFont.Raw; + } +} diff --git a/src/serialization/resources/customFonts/types/CustomFontsUpdateRequestFontDisplay.ts b/src/serialization/resources/customFonts/types/CustomFontsUpdateRequestFontDisplay.ts new file mode 100644 index 00000000..df0db94d --- /dev/null +++ b/src/serialization/resources/customFonts/types/CustomFontsUpdateRequestFontDisplay.ts @@ -0,0 +1,14 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Webflow from "../../../../api/index"; +import * as core from "../../../../core"; +import type * as serializers from "../../../index"; + +export const CustomFontsUpdateRequestFontDisplay: core.serialization.Schema< + serializers.CustomFontsUpdateRequestFontDisplay.Raw, + Webflow.CustomFontsUpdateRequestFontDisplay +> = core.serialization.enum_(["auto", "block", "swap", "fallback", "optional"]); + +export declare namespace CustomFontsUpdateRequestFontDisplay { + export type Raw = "auto" | "block" | "swap" | "fallback" | "optional"; +} diff --git a/src/serialization/resources/customFonts/types/CustomFontsUpdateResponse.ts b/src/serialization/resources/customFonts/types/CustomFontsUpdateResponse.ts new file mode 100644 index 00000000..38237d79 --- /dev/null +++ b/src/serialization/resources/customFonts/types/CustomFontsUpdateResponse.ts @@ -0,0 +1,19 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Webflow from "../../../../api/index"; +import * as core from "../../../../core"; +import type * as serializers from "../../../index"; +import { CustomFont } from "../../../types/CustomFont"; + +export const CustomFontsUpdateResponse: core.serialization.ObjectSchema< + serializers.CustomFontsUpdateResponse.Raw, + Webflow.CustomFontsUpdateResponse +> = core.serialization.object({ + customFont: CustomFont, +}); + +export declare namespace CustomFontsUpdateResponse { + export interface Raw { + customFont: CustomFont.Raw; + } +} diff --git a/src/serialization/resources/customFonts/types/index.ts b/src/serialization/resources/customFonts/types/index.ts new file mode 100644 index 00000000..c22e9878 --- /dev/null +++ b/src/serialization/resources/customFonts/types/index.ts @@ -0,0 +1,5 @@ +export * from "./CustomFontBatchDeleteRequestItemsItem"; +export * from "./CustomFontsCreateRequestFontDisplay"; +export * from "./CustomFontsGetResponse"; +export * from "./CustomFontsUpdateRequestFontDisplay"; +export * from "./CustomFontsUpdateResponse"; diff --git a/src/serialization/resources/index.ts b/src/serialization/resources/index.ts index fb6e5ea9..ae624e71 100644 --- a/src/serialization/resources/index.ts +++ b/src/serialization/resources/index.ts @@ -5,6 +5,9 @@ export * from "./collections/client/requests"; export * as components from "./components"; export * from "./components/client/requests"; export * from "./components/types"; +export * as customFonts from "./customFonts"; +export * from "./customFonts/client/requests"; +export * from "./customFonts/types"; export * as forms from "./forms"; export * from "./forms/client/requests"; export * as inventory from "./inventory"; diff --git a/src/serialization/resources/sites/client/requests/SitesPublishRequest.ts b/src/serialization/resources/sites/client/requests/SitesPublishRequest.ts index 8cb1612c..01c2e9c3 100644 --- a/src/serialization/resources/sites/client/requests/SitesPublishRequest.ts +++ b/src/serialization/resources/sites/client/requests/SitesPublishRequest.ts @@ -10,11 +10,13 @@ export const SitesPublishRequest: core.serialization.Schema< > = core.serialization.object({ customDomains: core.serialization.list(core.serialization.string()).optional(), publishToWebflowSubdomain: core.serialization.boolean().optional(), + pageId: core.serialization.string().optional(), }); export declare namespace SitesPublishRequest { export interface Raw { customDomains?: string[] | null; publishToWebflowSubdomain?: boolean | null; + pageId?: string | null; } } diff --git a/src/serialization/resources/sites/types/SitesPublishResponse.ts b/src/serialization/resources/sites/types/SitesPublishResponse.ts index f0589df6..ec7928c2 100644 --- a/src/serialization/resources/sites/types/SitesPublishResponse.ts +++ b/src/serialization/resources/sites/types/SitesPublishResponse.ts @@ -4,6 +4,7 @@ import type * as Webflow from "../../../../api/index"; import * as core from "../../../../core"; import type * as serializers from "../../../index"; import { Domain } from "../../../types/Domain"; +import { SitesPublishResponsePublishScope } from "./SitesPublishResponsePublishScope"; export const SitesPublishResponse: core.serialization.ObjectSchema< serializers.SitesPublishResponse.Raw, @@ -11,11 +12,13 @@ export const SitesPublishResponse: core.serialization.ObjectSchema< > = core.serialization.object({ customDomains: core.serialization.list(Domain).optional(), publishToWebflowSubdomain: core.serialization.boolean().optional(), + publishScope: SitesPublishResponsePublishScope.optional(), }); export declare namespace SitesPublishResponse { export interface Raw { customDomains?: Domain.Raw[] | null; publishToWebflowSubdomain?: boolean | null; + publishScope?: SitesPublishResponsePublishScope.Raw | null; } } diff --git a/src/serialization/resources/sites/types/SitesPublishResponsePublishScope.ts b/src/serialization/resources/sites/types/SitesPublishResponsePublishScope.ts new file mode 100644 index 00000000..0e993ae5 --- /dev/null +++ b/src/serialization/resources/sites/types/SitesPublishResponsePublishScope.ts @@ -0,0 +1,14 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Webflow from "../../../../api/index"; +import * as core from "../../../../core"; +import type * as serializers from "../../../index"; + +export const SitesPublishResponsePublishScope: core.serialization.Schema< + serializers.SitesPublishResponsePublishScope.Raw, + Webflow.SitesPublishResponsePublishScope +> = core.serialization.enum_(["site", "page"]); + +export declare namespace SitesPublishResponsePublishScope { + export type Raw = "site" | "page"; +} diff --git a/src/serialization/resources/sites/types/index.ts b/src/serialization/resources/sites/types/index.ts index 7708da86..e8d16a61 100644 --- a/src/serialization/resources/sites/types/index.ts +++ b/src/serialization/resources/sites/types/index.ts @@ -1 +1,2 @@ export * from "./SitesPublishResponse"; +export * from "./SitesPublishResponsePublishScope"; diff --git a/src/serialization/types/Asset.ts b/src/serialization/types/Asset.ts index 3c9b0b10..99ee0056 100644 --- a/src/serialization/types/Asset.ts +++ b/src/serialization/types/Asset.ts @@ -17,6 +17,7 @@ export const Asset: core.serialization.ObjectSchema = + core.serialization.object({ + id: core.serialization.string().optional(), + fontFamily: core.serialization.string(), + format: CustomFontFormat.optional(), + fileName: core.serialization.string().optional(), + weight: core.serialization.number(), + italic: core.serialization.boolean(), + fontDisplay: CustomFontFontDisplay, + axes: core.serialization.list(CustomFontAxis), + hostedUrl: core.serialization.string().optional(), + }); + +export declare namespace CustomFont { + export interface Raw { + id?: string | null; + fontFamily: string; + format?: CustomFontFormat.Raw | null; + fileName?: string | null; + weight: number; + italic: boolean; + fontDisplay: CustomFontFontDisplay.Raw; + axes: CustomFontAxis.Raw[]; + hostedUrl?: string | null; + } +} diff --git a/src/serialization/types/CustomFontAxis.ts b/src/serialization/types/CustomFontAxis.ts new file mode 100644 index 00000000..9319dc96 --- /dev/null +++ b/src/serialization/types/CustomFontAxis.ts @@ -0,0 +1,24 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Webflow from "../../api/index"; +import * as core from "../../core"; +import type * as serializers from "../index"; + +export const CustomFontAxis: core.serialization.ObjectSchema = + core.serialization.object({ + tag: core.serialization.string(), + name: core.serialization.string().optional(), + min: core.serialization.number(), + max: core.serialization.number(), + defaultValue: core.serialization.number(), + }); + +export declare namespace CustomFontAxis { + export interface Raw { + tag: string; + name?: string | null; + min: number; + max: number; + defaultValue: number; + } +} diff --git a/src/serialization/types/CustomFontBatchDeleteResponse.ts b/src/serialization/types/CustomFontBatchDeleteResponse.ts new file mode 100644 index 00000000..6e716814 --- /dev/null +++ b/src/serialization/types/CustomFontBatchDeleteResponse.ts @@ -0,0 +1,22 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Webflow from "../../api/index"; +import * as core from "../../core"; +import type * as serializers from "../index"; +import { CustomFontBatchDeleteResponseDeletedItem } from "./CustomFontBatchDeleteResponseDeletedItem"; +import { CustomFontBatchDeleteResponseFailedItem } from "./CustomFontBatchDeleteResponseFailedItem"; + +export const CustomFontBatchDeleteResponse: core.serialization.ObjectSchema< + serializers.CustomFontBatchDeleteResponse.Raw, + Webflow.CustomFontBatchDeleteResponse +> = core.serialization.object({ + deleted: core.serialization.list(CustomFontBatchDeleteResponseDeletedItem), + failed: core.serialization.list(CustomFontBatchDeleteResponseFailedItem), +}); + +export declare namespace CustomFontBatchDeleteResponse { + export interface Raw { + deleted: CustomFontBatchDeleteResponseDeletedItem.Raw[]; + failed: CustomFontBatchDeleteResponseFailedItem.Raw[]; + } +} diff --git a/src/serialization/types/CustomFontBatchDeleteResponseDeletedItem.ts b/src/serialization/types/CustomFontBatchDeleteResponseDeletedItem.ts new file mode 100644 index 00000000..20a7bb53 --- /dev/null +++ b/src/serialization/types/CustomFontBatchDeleteResponseDeletedItem.ts @@ -0,0 +1,18 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Webflow from "../../api/index"; +import * as core from "../../core"; +import type * as serializers from "../index"; + +export const CustomFontBatchDeleteResponseDeletedItem: core.serialization.ObjectSchema< + serializers.CustomFontBatchDeleteResponseDeletedItem.Raw, + Webflow.CustomFontBatchDeleteResponseDeletedItem +> = core.serialization.object({ + id: core.serialization.string(), +}); + +export declare namespace CustomFontBatchDeleteResponseDeletedItem { + export interface Raw { + id: string; + } +} diff --git a/src/serialization/types/CustomFontBatchDeleteResponseFailedItem.ts b/src/serialization/types/CustomFontBatchDeleteResponseFailedItem.ts new file mode 100644 index 00000000..f2a9e296 --- /dev/null +++ b/src/serialization/types/CustomFontBatchDeleteResponseFailedItem.ts @@ -0,0 +1,22 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Webflow from "../../api/index"; +import * as core from "../../core"; +import type * as serializers from "../index"; + +export const CustomFontBatchDeleteResponseFailedItem: core.serialization.ObjectSchema< + serializers.CustomFontBatchDeleteResponseFailedItem.Raw, + Webflow.CustomFontBatchDeleteResponseFailedItem +> = core.serialization.object({ + id: core.serialization.string(), + name: core.serialization.string(), + msg: core.serialization.string(), +}); + +export declare namespace CustomFontBatchDeleteResponseFailedItem { + export interface Raw { + id: string; + name: string; + msg: string; + } +} diff --git a/src/serialization/types/CustomFontCreateResponse.ts b/src/serialization/types/CustomFontCreateResponse.ts new file mode 100644 index 00000000..276a812b --- /dev/null +++ b/src/serialization/types/CustomFontCreateResponse.ts @@ -0,0 +1,22 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Webflow from "../../api/index"; +import * as core from "../../core"; +import type * as serializers from "../index"; +import { CustomFont } from "./CustomFont"; +import { CustomFontUpload } from "./CustomFontUpload"; + +export const CustomFontCreateResponse: core.serialization.ObjectSchema< + serializers.CustomFontCreateResponse.Raw, + Webflow.CustomFontCreateResponse +> = core.serialization.object({ + customFont: CustomFont, + upload: CustomFontUpload, +}); + +export declare namespace CustomFontCreateResponse { + export interface Raw { + customFont: CustomFont.Raw; + upload: CustomFontUpload.Raw; + } +} diff --git a/src/serialization/types/CustomFontFontDisplay.ts b/src/serialization/types/CustomFontFontDisplay.ts new file mode 100644 index 00000000..218acac4 --- /dev/null +++ b/src/serialization/types/CustomFontFontDisplay.ts @@ -0,0 +1,14 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Webflow from "../../api/index"; +import * as core from "../../core"; +import type * as serializers from "../index"; + +export const CustomFontFontDisplay: core.serialization.Schema< + serializers.CustomFontFontDisplay.Raw, + Webflow.CustomFontFontDisplay +> = core.serialization.enum_(["auto", "block", "swap", "fallback", "optional"]); + +export declare namespace CustomFontFontDisplay { + export type Raw = "auto" | "block" | "swap" | "fallback" | "optional"; +} diff --git a/src/serialization/types/CustomFontFormat.ts b/src/serialization/types/CustomFontFormat.ts new file mode 100644 index 00000000..65ce22f7 --- /dev/null +++ b/src/serialization/types/CustomFontFormat.ts @@ -0,0 +1,12 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Webflow from "../../api/index"; +import * as core from "../../core"; +import type * as serializers from "../index"; + +export const CustomFontFormat: core.serialization.Schema = + core.serialization.enum_(["woff2", "woff", "truetype", "opentype", "embedded-opentype", "svg"]); + +export declare namespace CustomFontFormat { + export type Raw = "woff2" | "woff" | "truetype" | "opentype" | "embedded-opentype" | "svg"; +} diff --git a/src/serialization/types/CustomFontUpload.ts b/src/serialization/types/CustomFontUpload.ts new file mode 100644 index 00000000..0eb856f5 --- /dev/null +++ b/src/serialization/types/CustomFontUpload.ts @@ -0,0 +1,23 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Webflow from "../../api/index"; +import * as core from "../../core"; +import type * as serializers from "../index"; +import { CustomFontUploadFields } from "./CustomFontUploadFields"; + +export const CustomFontUpload: core.serialization.ObjectSchema< + serializers.CustomFontUpload.Raw, + Webflow.CustomFontUpload +> = core.serialization.object({ + url: core.serialization.string(), + fields: CustomFontUploadFields, + expiresAt: core.serialization.date(), +}); + +export declare namespace CustomFontUpload { + export interface Raw { + url: string; + fields: CustomFontUploadFields.Raw; + expiresAt: string; + } +} diff --git a/src/serialization/types/CustomFontUploadFields.ts b/src/serialization/types/CustomFontUploadFields.ts new file mode 100644 index 00000000..2b9dcc49 --- /dev/null +++ b/src/serialization/types/CustomFontUploadFields.ts @@ -0,0 +1,42 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Webflow from "../../api/index"; +import * as core from "../../core"; +import type * as serializers from "../index"; + +export const CustomFontUploadFields: core.serialization.ObjectSchema< + serializers.CustomFontUploadFields.Raw, + Webflow.CustomFontUploadFields +> = core.serialization.object({ + bucket: core.serialization.string(), + key: core.serialization.string(), + policy: core.serialization.property("Policy", core.serialization.string()), + xAmzAlgorithm: core.serialization.property("X-Amz-Algorithm", core.serialization.string()), + xAmzCredential: core.serialization.property("X-Amz-Credential", core.serialization.string()), + xAmzDate: core.serialization.property("X-Amz-Date", core.serialization.string()), + xAmzSignature: core.serialization.property("X-Amz-Signature", core.serialization.string()), + xAmzSecurityToken: core.serialization.property("X-Amz-Security-Token", core.serialization.string().optional()), + contentMd5: core.serialization.property("Content-MD5", core.serialization.string()), + acl: core.serialization.string(), + cacheControl: core.serialization.property("Cache-Control", core.serialization.string()), + contentType: core.serialization.property("Content-Type", core.serialization.string()), + successActionStatus: core.serialization.property("success_action_status", core.serialization.string()), +}); + +export declare namespace CustomFontUploadFields { + export interface Raw { + bucket: string; + key: string; + Policy: string; + "X-Amz-Algorithm": string; + "X-Amz-Credential": string; + "X-Amz-Date": string; + "X-Amz-Signature": string; + "X-Amz-Security-Token"?: string | null; + "Content-MD5": string; + acl: string; + "Cache-Control": string; + "Content-Type": string; + success_action_status: string; + } +} diff --git a/src/serialization/types/CustomFonts.ts b/src/serialization/types/CustomFonts.ts new file mode 100644 index 00000000..41399bf5 --- /dev/null +++ b/src/serialization/types/CustomFonts.ts @@ -0,0 +1,20 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Webflow from "../../api/index"; +import * as core from "../../core"; +import type * as serializers from "../index"; +import { CustomFont } from "./CustomFont"; +import { Pagination } from "./Pagination"; + +export const CustomFonts: core.serialization.ObjectSchema = + core.serialization.object({ + customFonts: core.serialization.list(CustomFont), + pagination: Pagination, + }); + +export declare namespace CustomFonts { + export interface Raw { + customFonts: CustomFont.Raw[]; + pagination: Pagination.Raw; + } +} diff --git a/src/serialization/types/ErrorCode.ts b/src/serialization/types/ErrorCode.ts index 36e3fe74..63c9e566 100644 --- a/src/serialization/types/ErrorCode.ts +++ b/src/serialization/types/ErrorCode.ts @@ -28,6 +28,7 @@ export const ErrorCode: core.serialization.Schema | null; + localeId?: string | null; } } diff --git a/src/serialization/types/FormSubmissionTriggerPayload.ts b/src/serialization/types/FormSubmissionTriggerPayload.ts index e0e7f9a9..cea5c1a6 100644 --- a/src/serialization/types/FormSubmissionTriggerPayload.ts +++ b/src/serialization/types/FormSubmissionTriggerPayload.ts @@ -17,6 +17,7 @@ export const FormSubmissionTriggerPayload: core.serialization.ObjectSchema< id: core.serialization.string().optional(), formId: core.serialization.string().optional(), formElementId: core.serialization.string().optional(), + localeId: core.serialization.string().optional(), }); export declare namespace FormSubmissionTriggerPayload { @@ -29,5 +30,6 @@ export declare namespace FormSubmissionTriggerPayload { id?: string | null; formId?: string | null; formElementId?: string | null; + localeId?: string | null; } } diff --git a/src/serialization/types/GoogleTagId.ts b/src/serialization/types/GoogleTagId.ts new file mode 100644 index 00000000..da81d3a5 --- /dev/null +++ b/src/serialization/types/GoogleTagId.ts @@ -0,0 +1,20 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Webflow from "../../api/index"; +import * as core from "../../core"; +import type * as serializers from "../index"; + +export const GoogleTagId: core.serialization.ObjectSchema = + core.serialization.object({ + order: core.serialization.number().optional(), + displayName: core.serialization.string(), + tagId: core.serialization.string(), + }); + +export declare namespace GoogleTagId { + export interface Raw { + order?: number | null; + displayName: string; + tagId: string; + } +} diff --git a/src/serialization/types/GoogleTagIds.ts b/src/serialization/types/GoogleTagIds.ts new file mode 100644 index 00000000..8ff48fc7 --- /dev/null +++ b/src/serialization/types/GoogleTagIds.ts @@ -0,0 +1,17 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Webflow from "../../api/index"; +import * as core from "../../core"; +import type * as serializers from "../index"; +import { GoogleTagId } from "./GoogleTagId"; + +export const GoogleTagIds: core.serialization.ObjectSchema = + core.serialization.object({ + googleTagIds: core.serialization.list(GoogleTagId), + }); + +export declare namespace GoogleTagIds { + export interface Raw { + googleTagIds: GoogleTagId.Raw[]; + } +} diff --git a/src/serialization/types/PageCreatedWebhookPayload.ts b/src/serialization/types/PageCreatedWebhookPayload.ts index b61870d0..524c3ac9 100644 --- a/src/serialization/types/PageCreatedWebhookPayload.ts +++ b/src/serialization/types/PageCreatedWebhookPayload.ts @@ -11,6 +11,10 @@ export const PageCreatedWebhookPayload: core.serialization.ObjectSchema< siteId: core.serialization.string().optional(), pageId: core.serialization.string().optional(), pageTitle: core.serialization.string().optional(), + pageName: core.serialization.string().optional(), + archived: core.serialization.boolean().optional(), + draft: core.serialization.boolean().optional(), + isBranch: core.serialization.boolean().optional(), createdOn: core.serialization.date().optional(), publishedPath: core.serialization.string().optional(), }); @@ -20,6 +24,10 @@ export declare namespace PageCreatedWebhookPayload { siteId?: string | null; pageId?: string | null; pageTitle?: string | null; + pageName?: string | null; + archived?: boolean | null; + draft?: boolean | null; + isBranch?: boolean | null; createdOn?: string | null; publishedPath?: string | null; } diff --git a/src/serialization/types/PageDeletedWebhookPayload.ts b/src/serialization/types/PageDeletedWebhookPayload.ts index 45ce0c48..23058245 100644 --- a/src/serialization/types/PageDeletedWebhookPayload.ts +++ b/src/serialization/types/PageDeletedWebhookPayload.ts @@ -11,6 +11,10 @@ export const PageDeletedWebhookPayload: core.serialization.ObjectSchema< siteId: core.serialization.string().optional(), pageId: core.serialization.string().optional(), pageTitle: core.serialization.string().optional(), + pageName: core.serialization.string().optional(), + archived: core.serialization.boolean().optional(), + draft: core.serialization.boolean().optional(), + isBranch: core.serialization.boolean().optional(), deletedOn: core.serialization.date().optional(), publishedPath: core.serialization.string().optional(), }); @@ -20,6 +24,10 @@ export declare namespace PageDeletedWebhookPayload { siteId?: string | null; pageId?: string | null; pageTitle?: string | null; + pageName?: string | null; + archived?: boolean | null; + draft?: boolean | null; + isBranch?: boolean | null; deletedOn?: string | null; publishedPath?: string | null; } diff --git a/src/serialization/types/PageMetadataUpdatedWebhookPayload.ts b/src/serialization/types/PageMetadataUpdatedWebhookPayload.ts index 01d872cf..4f2e6d44 100644 --- a/src/serialization/types/PageMetadataUpdatedWebhookPayload.ts +++ b/src/serialization/types/PageMetadataUpdatedWebhookPayload.ts @@ -11,6 +11,10 @@ export const PageMetadataUpdatedWebhookPayload: core.serialization.ObjectSchema< siteId: core.serialization.string().optional(), pageId: core.serialization.string().optional(), pageTitle: core.serialization.string().optional(), + pageName: core.serialization.string().optional(), + archived: core.serialization.boolean().optional(), + draft: core.serialization.boolean().optional(), + isBranch: core.serialization.boolean().optional(), lastUpdated: core.serialization.date().optional(), publishedPath: core.serialization.string().optional(), }); @@ -20,6 +24,10 @@ export declare namespace PageMetadataUpdatedWebhookPayload { siteId?: string | null; pageId?: string | null; pageTitle?: string | null; + pageName?: string | null; + archived?: boolean | null; + draft?: boolean | null; + isBranch?: boolean | null; lastUpdated?: string | null; publishedPath?: string | null; } diff --git a/src/serialization/types/SitePublishPayload.ts b/src/serialization/types/SitePublishPayload.ts index 8d8280ec..700fc005 100644 --- a/src/serialization/types/SitePublishPayload.ts +++ b/src/serialization/types/SitePublishPayload.ts @@ -3,6 +3,7 @@ import type * as Webflow from "../../api/index"; import * as core from "../../core"; import type * as serializers from "../index"; +import { SitePublishPayloadPublishScope } from "./SitePublishPayloadPublishScope"; export const SitePublishPayload: core.serialization.ObjectSchema< serializers.SitePublishPayload.Raw, @@ -12,6 +13,8 @@ export const SitePublishPayload: core.serialization.ObjectSchema< publishedOn: core.serialization.date().optional(), domains: core.serialization.list(core.serialization.string()).optional(), publishedBy: core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), + publishScope: SitePublishPayloadPublishScope.optional(), + pageId: core.serialization.string().optional(), }); export declare namespace SitePublishPayload { @@ -20,5 +23,7 @@ export declare namespace SitePublishPayload { publishedOn?: string | null; domains?: string[] | null; publishedBy?: Record | null; + publishScope?: SitePublishPayloadPublishScope.Raw | null; + pageId?: string | null; } } diff --git a/src/serialization/types/SitePublishPayloadPublishScope.ts b/src/serialization/types/SitePublishPayloadPublishScope.ts new file mode 100644 index 00000000..d19f4c12 --- /dev/null +++ b/src/serialization/types/SitePublishPayloadPublishScope.ts @@ -0,0 +1,14 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Webflow from "../../api/index"; +import * as core from "../../core"; +import type * as serializers from "../index"; + +export const SitePublishPayloadPublishScope: core.serialization.Schema< + serializers.SitePublishPayloadPublishScope.Raw, + Webflow.SitePublishPayloadPublishScope +> = core.serialization.enum_(["page", "site"]); + +export declare namespace SitePublishPayloadPublishScope { + export type Raw = "page" | "site"; +} diff --git a/src/serialization/types/index.ts b/src/serialization/types/index.ts index ce98580e..65e69b12 100644 --- a/src/serialization/types/index.ts +++ b/src/serialization/types/index.ts @@ -65,6 +65,17 @@ export * from "./CustomCodeBlock"; export * from "./CustomCodeBlockType"; export * from "./CustomCodeHostedResponse"; export * from "./CustomCodeInlineResponse"; +export * from "./CustomFont"; +export * from "./CustomFontAxis"; +export * from "./CustomFontBatchDeleteResponse"; +export * from "./CustomFontBatchDeleteResponseDeletedItem"; +export * from "./CustomFontBatchDeleteResponseFailedItem"; +export * from "./CustomFontCreateResponse"; +export * from "./CustomFontFontDisplay"; +export * from "./CustomFontFormat"; +export * from "./CustomFonts"; +export * from "./CustomFontUpload"; +export * from "./CustomFontUploadFields"; export * from "./CustomRole"; export * from "./CustomRoleAuditLogItem"; export * from "./CustomRoleAuditLogItemEventSubType"; @@ -92,6 +103,8 @@ export * from "./FormSubmissionTrigger"; export * from "./FormSubmissionTriggerPayload"; export * from "./FormSubmissionTriggerPayloadSchemaItem"; export * from "./FormSubmissionTriggerPayloadSchemaItemFieldType"; +export * from "./GoogleTagId"; +export * from "./GoogleTagIds"; export * from "./ImageNode"; export * from "./ImageNodeImage"; export * from "./InvalidDomain"; @@ -197,6 +210,7 @@ export * from "./SitePlanId"; export * from "./SitePlanName"; export * from "./SitePublish"; export * from "./SitePublishPayload"; +export * from "./SitePublishPayloadPublishScope"; export * from "./Sites"; export * from "./Sku"; export * from "./SkuFieldData"; diff --git a/tests/wire/assets.test.ts b/tests/wire/assets.test.ts index 98787565..a1e0b85b 100644 --- a/tests/wire/assets.test.ts +++ b/tests/wire/assets.test.ts @@ -39,6 +39,7 @@ describe("AssetsClient", () => { }, ], altText: "A single candy wrapper", + folderId: "6390c49774a71f99f21a08eb", }, { id: "63e5889e7fe4eafa7384cea5", @@ -80,6 +81,7 @@ describe("AssetsClient", () => { localeId: "65427cf400e02b306eaa04a0", offset: 1, limit: 1, + folderId: "folderId", }); expect(response).toEqual({ assets: [ @@ -107,6 +109,7 @@ describe("AssetsClient", () => { }, ], altText: "A single candy wrapper", + folderId: "6390c49774a71f99f21a08eb", }, { id: "63e5889e7fe4eafa7384cea5", @@ -490,6 +493,7 @@ describe("AssetsClient", () => { }, ], altText: "A single candy wrapper", + folderId: "6390c49774a71f99f21a08eb", }; server .mockEndpoint() @@ -525,6 +529,7 @@ describe("AssetsClient", () => { }, ], altText: "A single candy wrapper", + folderId: "6390c49774a71f99f21a08eb", }); }); @@ -763,6 +768,7 @@ describe("AssetsClient", () => { }, ], altText: "A single candy wrapper", + folderId: "6390c49774a71f99f21a08eb", }; server .mockEndpoint() @@ -799,6 +805,7 @@ describe("AssetsClient", () => { }, ], altText: "A single candy wrapper", + folderId: "6390c49774a71f99f21a08eb", }); }); diff --git a/tests/wire/customFonts.test.ts b/tests/wire/customFonts.test.ts new file mode 100644 index 00000000..159b8907 --- /dev/null +++ b/tests/wire/customFonts.test.ts @@ -0,0 +1,1624 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Webflow from "../../src/api/index"; +import { WebflowClient } from "../../src/Client"; +import { mockServerPool } from "../mock-server/MockServerPool"; + +describe("CustomFontsClient", () => { + test("list (1)", async () => { + const server = mockServerPool.createServer(); + const client = new WebflowClient({ + maxRetries: 0, + accessToken: "test", + environment: { base: server.baseUrl, dataApi: server.baseUrl, contentDeliveryApi: server.baseUrl }, + }); + + const rawResponseBody = { + customFonts: [ + { + id: "66f3a1b2c4d5e6f7a8b9c0d1", + fontFamily: "Acme Sans", + format: "woff2", + fileName: "AcmeSans-Regular.woff2", + weight: 400, + italic: false, + fontDisplay: "auto", + axes: [{ tag: "wght", name: "Weight", min: 100, max: 900, defaultValue: 400 }], + hostedUrl: + "https://uploads-ssl.webflow.com/6437e21619d24aff35b2e4f2/66f3a1b2-AcmeSans-Regular.woff2", + }, + ], + pagination: { limit: 100, offset: 0, total: 100 }, + }; + server + .mockEndpoint() + .get("/sites/580e63e98c9a982ac9b8b741/custom_fonts") + .respondWith() + .statusCode(200) + .jsonBody(rawResponseBody) + .build(); + + const response = await client.customFonts.list("580e63e98c9a982ac9b8b741", { + offset: 1, + limit: 1, + }); + expect(response).toEqual({ + customFonts: [ + { + id: "66f3a1b2c4d5e6f7a8b9c0d1", + fontFamily: "Acme Sans", + format: "woff2", + fileName: "AcmeSans-Regular.woff2", + weight: 400, + italic: false, + fontDisplay: "auto", + axes: [ + { + tag: "wght", + name: "Weight", + min: 100, + max: 900, + defaultValue: 400, + }, + ], + hostedUrl: + "https://uploads-ssl.webflow.com/6437e21619d24aff35b2e4f2/66f3a1b2-AcmeSans-Regular.woff2", + }, + ], + pagination: { + limit: 100, + offset: 0, + total: 100, + }, + }); + }); + + test("list (2)", async () => { + const server = mockServerPool.createServer(); + const client = new WebflowClient({ + maxRetries: 0, + accessToken: "test", + environment: { base: server.baseUrl, dataApi: server.baseUrl, contentDeliveryApi: server.baseUrl }, + }); + + const rawResponseBody = { key: "value" }; + server + .mockEndpoint() + .get("/sites/site_id/custom_fonts") + .respondWith() + .statusCode(400) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.customFonts.list("site_id"); + }).rejects.toThrow(Webflow.BadRequestError); + }); + + test("list (3)", async () => { + const server = mockServerPool.createServer(); + const client = new WebflowClient({ + maxRetries: 0, + accessToken: "test", + environment: { base: server.baseUrl, dataApi: server.baseUrl, contentDeliveryApi: server.baseUrl }, + }); + + const rawResponseBody = {}; + server + .mockEndpoint() + .get("/sites/site_id/custom_fonts") + .respondWith() + .statusCode(401) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.customFonts.list("site_id"); + }).rejects.toThrow(Webflow.UnauthorizedError); + }); + + test("list (4)", async () => { + const server = mockServerPool.createServer(); + const client = new WebflowClient({ + maxRetries: 0, + accessToken: "test", + environment: { base: server.baseUrl, dataApi: server.baseUrl, contentDeliveryApi: server.baseUrl }, + }); + + const rawResponseBody = { key: "value" }; + server + .mockEndpoint() + .get("/sites/site_id/custom_fonts") + .respondWith() + .statusCode(403) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.customFonts.list("site_id"); + }).rejects.toThrow(Webflow.ForbiddenError); + }); + + test("list (5)", async () => { + const server = mockServerPool.createServer(); + const client = new WebflowClient({ + maxRetries: 0, + accessToken: "test", + environment: { base: server.baseUrl, dataApi: server.baseUrl, contentDeliveryApi: server.baseUrl }, + }); + + const rawResponseBody = {}; + server + .mockEndpoint() + .get("/sites/site_id/custom_fonts") + .respondWith() + .statusCode(404) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.customFonts.list("site_id"); + }).rejects.toThrow(Webflow.NotFoundError); + }); + + test("list (6)", async () => { + const server = mockServerPool.createServer(); + const client = new WebflowClient({ + maxRetries: 0, + accessToken: "test", + environment: { base: server.baseUrl, dataApi: server.baseUrl, contentDeliveryApi: server.baseUrl }, + }); + + const rawResponseBody = {}; + server + .mockEndpoint() + .get("/sites/site_id/custom_fonts") + .respondWith() + .statusCode(429) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.customFonts.list("site_id"); + }).rejects.toThrow(Webflow.TooManyRequestsError); + }); + + test("list (7)", async () => { + const server = mockServerPool.createServer(); + const client = new WebflowClient({ + maxRetries: 0, + accessToken: "test", + environment: { base: server.baseUrl, dataApi: server.baseUrl, contentDeliveryApi: server.baseUrl }, + }); + + const rawResponseBody = {}; + server + .mockEndpoint() + .get("/sites/site_id/custom_fonts") + .respondWith() + .statusCode(500) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.customFonts.list("site_id"); + }).rejects.toThrow(Webflow.InternalServerError); + }); + + test("create (1)", async () => { + const server = mockServerPool.createServer(); + const client = new WebflowClient({ + maxRetries: 0, + accessToken: "test", + environment: { base: server.baseUrl, dataApi: server.baseUrl, contentDeliveryApi: server.baseUrl }, + }); + const rawRequestBody = { + fileName: "AcmeSans-Regular.woff2", + fileHash: "3c7d87c9575702bc3b1e991f4d3c638e", + fontFamily: "Acme Sans", + weight: 400, + italic: false, + fontDisplay: "auto", + }; + const rawResponseBody = { + customFont: { + id: "66f3a1b2c4d5e6f7a8b9c0d1", + fontFamily: "Acme Sans", + format: "woff2", + fileName: "AcmeSans-Regular.woff2", + weight: 400, + italic: false, + fontDisplay: "auto", + axes: [{ tag: "wght", name: "Weight", min: 100, max: 900, defaultValue: 400 }], + hostedUrl: "https://uploads-ssl.webflow.com/6437e21619d24aff35b2e4f2/66f3a1b2-AcmeSans-Regular.woff2", + }, + upload: { + url: "https://webflow-prod-assets.s3.amazonaws.com/", + fields: { + bucket: "bucket", + key: "6437e21619d24aff35b2e4f2/fonts/66f3a1b2c4d5e6f7a8b9c0d1-AcmeSans-Regular.woff2", + Policy: "Policy", + "X-Amz-Algorithm": "AWS4-HMAC-SHA256", + "X-Amz-Credential": "X-Amz-Credential", + "X-Amz-Date": "X-Amz-Date", + "X-Amz-Signature": "X-Amz-Signature", + "X-Amz-Security-Token": "X-Amz-Security-Token", + "Content-MD5": "Content-MD5", + acl: "public-read", + "Cache-Control": "max-age=31536000", + "Content-Type": "font/woff2", + success_action_status: "201", + }, + expiresAt: "2026-05-06T12:15:00Z", + }, + }; + server + .mockEndpoint() + .post("/sites/580e63e98c9a982ac9b8b741/custom_fonts") + .jsonBody(rawRequestBody) + .respondWith() + .statusCode(200) + .jsonBody(rawResponseBody) + .build(); + + const response = await client.customFonts.create("580e63e98c9a982ac9b8b741", { + fileName: "AcmeSans-Regular.woff2", + fileHash: "3c7d87c9575702bc3b1e991f4d3c638e", + fontFamily: "Acme Sans", + weight: 400, + italic: false, + fontDisplay: "auto", + }); + expect(response).toEqual({ + customFont: { + id: "66f3a1b2c4d5e6f7a8b9c0d1", + fontFamily: "Acme Sans", + format: "woff2", + fileName: "AcmeSans-Regular.woff2", + weight: 400, + italic: false, + fontDisplay: "auto", + axes: [ + { + tag: "wght", + name: "Weight", + min: 100, + max: 900, + defaultValue: 400, + }, + ], + hostedUrl: "https://uploads-ssl.webflow.com/6437e21619d24aff35b2e4f2/66f3a1b2-AcmeSans-Regular.woff2", + }, + upload: { + url: "https://webflow-prod-assets.s3.amazonaws.com/", + fields: { + bucket: "bucket", + key: "6437e21619d24aff35b2e4f2/fonts/66f3a1b2c4d5e6f7a8b9c0d1-AcmeSans-Regular.woff2", + policy: "Policy", + xAmzAlgorithm: "AWS4-HMAC-SHA256", + xAmzCredential: "X-Amz-Credential", + xAmzDate: "X-Amz-Date", + xAmzSignature: "X-Amz-Signature", + xAmzSecurityToken: "X-Amz-Security-Token", + contentMd5: "Content-MD5", + acl: "public-read", + cacheControl: "max-age=31536000", + contentType: "font/woff2", + successActionStatus: "201", + }, + expiresAt: new Date("2026-05-06T12:15:00.000Z"), + }, + }); + }); + + test("create (2)", async () => { + const server = mockServerPool.createServer(); + const client = new WebflowClient({ + maxRetries: 0, + accessToken: "test", + environment: { base: server.baseUrl, dataApi: server.baseUrl, contentDeliveryApi: server.baseUrl }, + }); + const rawRequestBody = { + fileName: "fileName", + fileHash: "fileHash", + fontFamily: "fontFamily", + weight: 1000, + italic: true, + fontDisplay: "auto", + }; + const rawResponseBody = { key: "value" }; + server + .mockEndpoint() + .post("/sites/site_id/custom_fonts") + .jsonBody(rawRequestBody) + .respondWith() + .statusCode(400) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.customFonts.create("site_id", { + fileName: "fileName", + fileHash: "fileHash", + fontFamily: "fontFamily", + weight: 1000, + italic: true, + fontDisplay: "auto", + }); + }).rejects.toThrow(Webflow.BadRequestError); + }); + + test("create (3)", async () => { + const server = mockServerPool.createServer(); + const client = new WebflowClient({ + maxRetries: 0, + accessToken: "test", + environment: { base: server.baseUrl, dataApi: server.baseUrl, contentDeliveryApi: server.baseUrl }, + }); + const rawRequestBody = { + fileName: "fileName", + fileHash: "fileHash", + fontFamily: "fontFamily", + weight: 1000, + italic: true, + fontDisplay: "auto", + }; + const rawResponseBody = {}; + server + .mockEndpoint() + .post("/sites/site_id/custom_fonts") + .jsonBody(rawRequestBody) + .respondWith() + .statusCode(401) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.customFonts.create("site_id", { + fileName: "fileName", + fileHash: "fileHash", + fontFamily: "fontFamily", + weight: 1000, + italic: true, + fontDisplay: "auto", + }); + }).rejects.toThrow(Webflow.UnauthorizedError); + }); + + test("create (4)", async () => { + const server = mockServerPool.createServer(); + const client = new WebflowClient({ + maxRetries: 0, + accessToken: "test", + environment: { base: server.baseUrl, dataApi: server.baseUrl, contentDeliveryApi: server.baseUrl }, + }); + const rawRequestBody = { + fileName: "fileName", + fileHash: "fileHash", + fontFamily: "fontFamily", + weight: 1000, + italic: true, + fontDisplay: "auto", + }; + const rawResponseBody = { key: "value" }; + server + .mockEndpoint() + .post("/sites/site_id/custom_fonts") + .jsonBody(rawRequestBody) + .respondWith() + .statusCode(403) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.customFonts.create("site_id", { + fileName: "fileName", + fileHash: "fileHash", + fontFamily: "fontFamily", + weight: 1000, + italic: true, + fontDisplay: "auto", + }); + }).rejects.toThrow(Webflow.ForbiddenError); + }); + + test("create (5)", async () => { + const server = mockServerPool.createServer(); + const client = new WebflowClient({ + maxRetries: 0, + accessToken: "test", + environment: { base: server.baseUrl, dataApi: server.baseUrl, contentDeliveryApi: server.baseUrl }, + }); + const rawRequestBody = { + fileName: "fileName", + fileHash: "fileHash", + fontFamily: "fontFamily", + weight: 1000, + italic: true, + fontDisplay: "auto", + }; + const rawResponseBody = {}; + server + .mockEndpoint() + .post("/sites/site_id/custom_fonts") + .jsonBody(rawRequestBody) + .respondWith() + .statusCode(404) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.customFonts.create("site_id", { + fileName: "fileName", + fileHash: "fileHash", + fontFamily: "fontFamily", + weight: 1000, + italic: true, + fontDisplay: "auto", + }); + }).rejects.toThrow(Webflow.NotFoundError); + }); + + test("create (6)", async () => { + const server = mockServerPool.createServer(); + const client = new WebflowClient({ + maxRetries: 0, + accessToken: "test", + environment: { base: server.baseUrl, dataApi: server.baseUrl, contentDeliveryApi: server.baseUrl }, + }); + const rawRequestBody = { + fileName: "fileName", + fileHash: "fileHash", + fontFamily: "fontFamily", + weight: 1000, + italic: true, + fontDisplay: "auto", + }; + const rawResponseBody = { key: "value" }; + server + .mockEndpoint() + .post("/sites/site_id/custom_fonts") + .jsonBody(rawRequestBody) + .respondWith() + .statusCode(409) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.customFonts.create("site_id", { + fileName: "fileName", + fileHash: "fileHash", + fontFamily: "fontFamily", + weight: 1000, + italic: true, + fontDisplay: "auto", + }); + }).rejects.toThrow(Webflow.ConflictError); + }); + + test("create (7)", async () => { + const server = mockServerPool.createServer(); + const client = new WebflowClient({ + maxRetries: 0, + accessToken: "test", + environment: { base: server.baseUrl, dataApi: server.baseUrl, contentDeliveryApi: server.baseUrl }, + }); + const rawRequestBody = { + fileName: "fileName", + fileHash: "fileHash", + fontFamily: "fontFamily", + weight: 1000, + italic: true, + fontDisplay: "auto", + }; + const rawResponseBody = {}; + server + .mockEndpoint() + .post("/sites/site_id/custom_fonts") + .jsonBody(rawRequestBody) + .respondWith() + .statusCode(429) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.customFonts.create("site_id", { + fileName: "fileName", + fileHash: "fileHash", + fontFamily: "fontFamily", + weight: 1000, + italic: true, + fontDisplay: "auto", + }); + }).rejects.toThrow(Webflow.TooManyRequestsError); + }); + + test("create (8)", async () => { + const server = mockServerPool.createServer(); + const client = new WebflowClient({ + maxRetries: 0, + accessToken: "test", + environment: { base: server.baseUrl, dataApi: server.baseUrl, contentDeliveryApi: server.baseUrl }, + }); + const rawRequestBody = { + fileName: "fileName", + fileHash: "fileHash", + fontFamily: "fontFamily", + weight: 1000, + italic: true, + fontDisplay: "auto", + }; + const rawResponseBody = {}; + server + .mockEndpoint() + .post("/sites/site_id/custom_fonts") + .jsonBody(rawRequestBody) + .respondWith() + .statusCode(500) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.customFonts.create("site_id", { + fileName: "fileName", + fileHash: "fileHash", + fontFamily: "fontFamily", + weight: 1000, + italic: true, + fontDisplay: "auto", + }); + }).rejects.toThrow(Webflow.InternalServerError); + }); + + test("create (9)", async () => { + const server = mockServerPool.createServer(); + const client = new WebflowClient({ + maxRetries: 0, + accessToken: "test", + environment: { base: server.baseUrl, dataApi: server.baseUrl, contentDeliveryApi: server.baseUrl }, + }); + const rawRequestBody = { + fileName: "fileName", + fileHash: "fileHash", + fontFamily: "fontFamily", + weight: 1000, + italic: true, + fontDisplay: "auto", + }; + const rawResponseBody = {}; + server + .mockEndpoint() + .post("/sites/site_id/custom_fonts") + .jsonBody(rawRequestBody) + .respondWith() + .statusCode(503) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.customFonts.create("site_id", { + fileName: "fileName", + fileHash: "fileHash", + fontFamily: "fontFamily", + weight: 1000, + italic: true, + fontDisplay: "auto", + }); + }).rejects.toThrow(Webflow.ServiceUnavailableError); + }); + + test("get (1)", async () => { + const server = mockServerPool.createServer(); + const client = new WebflowClient({ + maxRetries: 0, + accessToken: "test", + environment: { base: server.baseUrl, dataApi: server.baseUrl, contentDeliveryApi: server.baseUrl }, + }); + + const rawResponseBody = { + customFont: { + id: "66f3a1b2c4d5e6f7a8b9c0d1", + fontFamily: "Acme Sans", + format: "woff2", + fileName: "AcmeSans-Regular.woff2", + weight: 400, + italic: false, + fontDisplay: "auto", + axes: [{ tag: "wght", name: "Weight", min: 100, max: 900, defaultValue: 400 }], + hostedUrl: "https://uploads-ssl.webflow.com/6437e21619d24aff35b2e4f2/66f3a1b2-AcmeSans-Regular.woff2", + }, + }; + server + .mockEndpoint() + .get("/sites/580e63e98c9a982ac9b8b741/custom_fonts/66f3a1b2c4d5e6f7a8b9c0d1") + .respondWith() + .statusCode(200) + .jsonBody(rawResponseBody) + .build(); + + const response = await client.customFonts.get("580e63e98c9a982ac9b8b741", "66f3a1b2c4d5e6f7a8b9c0d1"); + expect(response).toEqual({ + customFont: { + id: "66f3a1b2c4d5e6f7a8b9c0d1", + fontFamily: "Acme Sans", + format: "woff2", + fileName: "AcmeSans-Regular.woff2", + weight: 400, + italic: false, + fontDisplay: "auto", + axes: [ + { + tag: "wght", + name: "Weight", + min: 100, + max: 900, + defaultValue: 400, + }, + ], + hostedUrl: "https://uploads-ssl.webflow.com/6437e21619d24aff35b2e4f2/66f3a1b2-AcmeSans-Regular.woff2", + }, + }); + }); + + test("get (2)", async () => { + const server = mockServerPool.createServer(); + const client = new WebflowClient({ + maxRetries: 0, + accessToken: "test", + environment: { base: server.baseUrl, dataApi: server.baseUrl, contentDeliveryApi: server.baseUrl }, + }); + + const rawResponseBody = { key: "value" }; + server + .mockEndpoint() + .get("/sites/site_id/custom_fonts/font_id") + .respondWith() + .statusCode(400) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.customFonts.get("site_id", "font_id"); + }).rejects.toThrow(Webflow.BadRequestError); + }); + + test("get (3)", async () => { + const server = mockServerPool.createServer(); + const client = new WebflowClient({ + maxRetries: 0, + accessToken: "test", + environment: { base: server.baseUrl, dataApi: server.baseUrl, contentDeliveryApi: server.baseUrl }, + }); + + const rawResponseBody = {}; + server + .mockEndpoint() + .get("/sites/site_id/custom_fonts/font_id") + .respondWith() + .statusCode(401) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.customFonts.get("site_id", "font_id"); + }).rejects.toThrow(Webflow.UnauthorizedError); + }); + + test("get (4)", async () => { + const server = mockServerPool.createServer(); + const client = new WebflowClient({ + maxRetries: 0, + accessToken: "test", + environment: { base: server.baseUrl, dataApi: server.baseUrl, contentDeliveryApi: server.baseUrl }, + }); + + const rawResponseBody = { key: "value" }; + server + .mockEndpoint() + .get("/sites/site_id/custom_fonts/font_id") + .respondWith() + .statusCode(403) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.customFonts.get("site_id", "font_id"); + }).rejects.toThrow(Webflow.ForbiddenError); + }); + + test("get (5)", async () => { + const server = mockServerPool.createServer(); + const client = new WebflowClient({ + maxRetries: 0, + accessToken: "test", + environment: { base: server.baseUrl, dataApi: server.baseUrl, contentDeliveryApi: server.baseUrl }, + }); + + const rawResponseBody = {}; + server + .mockEndpoint() + .get("/sites/site_id/custom_fonts/font_id") + .respondWith() + .statusCode(404) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.customFonts.get("site_id", "font_id"); + }).rejects.toThrow(Webflow.NotFoundError); + }); + + test("get (6)", async () => { + const server = mockServerPool.createServer(); + const client = new WebflowClient({ + maxRetries: 0, + accessToken: "test", + environment: { base: server.baseUrl, dataApi: server.baseUrl, contentDeliveryApi: server.baseUrl }, + }); + + const rawResponseBody = {}; + server + .mockEndpoint() + .get("/sites/site_id/custom_fonts/font_id") + .respondWith() + .statusCode(429) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.customFonts.get("site_id", "font_id"); + }).rejects.toThrow(Webflow.TooManyRequestsError); + }); + + test("get (7)", async () => { + const server = mockServerPool.createServer(); + const client = new WebflowClient({ + maxRetries: 0, + accessToken: "test", + environment: { base: server.baseUrl, dataApi: server.baseUrl, contentDeliveryApi: server.baseUrl }, + }); + + const rawResponseBody = {}; + server + .mockEndpoint() + .get("/sites/site_id/custom_fonts/font_id") + .respondWith() + .statusCode(500) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.customFonts.get("site_id", "font_id"); + }).rejects.toThrow(Webflow.InternalServerError); + }); + + test("delete (1)", async () => { + const server = mockServerPool.createServer(); + const client = new WebflowClient({ + maxRetries: 0, + accessToken: "test", + environment: { base: server.baseUrl, dataApi: server.baseUrl, contentDeliveryApi: server.baseUrl }, + }); + + server + .mockEndpoint() + .delete("/sites/580e63e98c9a982ac9b8b741/custom_fonts/66f3a1b2c4d5e6f7a8b9c0d1") + .respondWith() + .statusCode(200) + .build(); + + const response = await client.customFonts.delete("580e63e98c9a982ac9b8b741", "66f3a1b2c4d5e6f7a8b9c0d1"); + expect(response).toEqual(undefined); + }); + + test("delete (2)", async () => { + const server = mockServerPool.createServer(); + const client = new WebflowClient({ + maxRetries: 0, + accessToken: "test", + environment: { base: server.baseUrl, dataApi: server.baseUrl, contentDeliveryApi: server.baseUrl }, + }); + + const rawResponseBody = { key: "value" }; + server + .mockEndpoint() + .delete("/sites/site_id/custom_fonts/font_id") + .respondWith() + .statusCode(400) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.customFonts.delete("site_id", "font_id"); + }).rejects.toThrow(Webflow.BadRequestError); + }); + + test("delete (3)", async () => { + const server = mockServerPool.createServer(); + const client = new WebflowClient({ + maxRetries: 0, + accessToken: "test", + environment: { base: server.baseUrl, dataApi: server.baseUrl, contentDeliveryApi: server.baseUrl }, + }); + + const rawResponseBody = {}; + server + .mockEndpoint() + .delete("/sites/site_id/custom_fonts/font_id") + .respondWith() + .statusCode(401) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.customFonts.delete("site_id", "font_id"); + }).rejects.toThrow(Webflow.UnauthorizedError); + }); + + test("delete (4)", async () => { + const server = mockServerPool.createServer(); + const client = new WebflowClient({ + maxRetries: 0, + accessToken: "test", + environment: { base: server.baseUrl, dataApi: server.baseUrl, contentDeliveryApi: server.baseUrl }, + }); + + const rawResponseBody = { key: "value" }; + server + .mockEndpoint() + .delete("/sites/site_id/custom_fonts/font_id") + .respondWith() + .statusCode(403) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.customFonts.delete("site_id", "font_id"); + }).rejects.toThrow(Webflow.ForbiddenError); + }); + + test("delete (5)", async () => { + const server = mockServerPool.createServer(); + const client = new WebflowClient({ + maxRetries: 0, + accessToken: "test", + environment: { base: server.baseUrl, dataApi: server.baseUrl, contentDeliveryApi: server.baseUrl }, + }); + + const rawResponseBody = {}; + server + .mockEndpoint() + .delete("/sites/site_id/custom_fonts/font_id") + .respondWith() + .statusCode(404) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.customFonts.delete("site_id", "font_id"); + }).rejects.toThrow(Webflow.NotFoundError); + }); + + test("delete (6)", async () => { + const server = mockServerPool.createServer(); + const client = new WebflowClient({ + maxRetries: 0, + accessToken: "test", + environment: { base: server.baseUrl, dataApi: server.baseUrl, contentDeliveryApi: server.baseUrl }, + }); + + const rawResponseBody = {}; + server + .mockEndpoint() + .delete("/sites/site_id/custom_fonts/font_id") + .respondWith() + .statusCode(429) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.customFonts.delete("site_id", "font_id"); + }).rejects.toThrow(Webflow.TooManyRequestsError); + }); + + test("delete (7)", async () => { + const server = mockServerPool.createServer(); + const client = new WebflowClient({ + maxRetries: 0, + accessToken: "test", + environment: { base: server.baseUrl, dataApi: server.baseUrl, contentDeliveryApi: server.baseUrl }, + }); + + const rawResponseBody = {}; + server + .mockEndpoint() + .delete("/sites/site_id/custom_fonts/font_id") + .respondWith() + .statusCode(500) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.customFonts.delete("site_id", "font_id"); + }).rejects.toThrow(Webflow.InternalServerError); + }); + + test("update (1)", async () => { + const server = mockServerPool.createServer(); + const client = new WebflowClient({ + maxRetries: 0, + accessToken: "test", + environment: { base: server.baseUrl, dataApi: server.baseUrl, contentDeliveryApi: server.baseUrl }, + }); + const rawRequestBody = {}; + const rawResponseBody = { + customFont: { + id: "66f3a1b2c4d5e6f7a8b9c0d1", + fontFamily: "Acme Sans", + format: "woff2", + fileName: "AcmeSans-Regular.woff2", + weight: 400, + italic: false, + fontDisplay: "auto", + axes: [{ tag: "wght", name: "Weight", min: 100, max: 900, defaultValue: 400 }], + hostedUrl: "https://uploads-ssl.webflow.com/6437e21619d24aff35b2e4f2/66f3a1b2-AcmeSans-Regular.woff2", + }, + }; + server + .mockEndpoint() + .patch("/sites/580e63e98c9a982ac9b8b741/custom_fonts/66f3a1b2c4d5e6f7a8b9c0d1") + .jsonBody(rawRequestBody) + .respondWith() + .statusCode(200) + .jsonBody(rawResponseBody) + .build(); + + const response = await client.customFonts.update("580e63e98c9a982ac9b8b741", "66f3a1b2c4d5e6f7a8b9c0d1"); + expect(response).toEqual({ + customFont: { + id: "66f3a1b2c4d5e6f7a8b9c0d1", + fontFamily: "Acme Sans", + format: "woff2", + fileName: "AcmeSans-Regular.woff2", + weight: 400, + italic: false, + fontDisplay: "auto", + axes: [ + { + tag: "wght", + name: "Weight", + min: 100, + max: 900, + defaultValue: 400, + }, + ], + hostedUrl: "https://uploads-ssl.webflow.com/6437e21619d24aff35b2e4f2/66f3a1b2-AcmeSans-Regular.woff2", + }, + }); + }); + + test("update (2)", async () => { + const server = mockServerPool.createServer(); + const client = new WebflowClient({ + maxRetries: 0, + accessToken: "test", + environment: { base: server.baseUrl, dataApi: server.baseUrl, contentDeliveryApi: server.baseUrl }, + }); + const rawRequestBody = {}; + const rawResponseBody = { key: "value" }; + server + .mockEndpoint() + .patch("/sites/site_id/custom_fonts/font_id") + .jsonBody(rawRequestBody) + .respondWith() + .statusCode(400) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.customFonts.update("site_id", "font_id"); + }).rejects.toThrow(Webflow.BadRequestError); + }); + + test("update (3)", async () => { + const server = mockServerPool.createServer(); + const client = new WebflowClient({ + maxRetries: 0, + accessToken: "test", + environment: { base: server.baseUrl, dataApi: server.baseUrl, contentDeliveryApi: server.baseUrl }, + }); + const rawRequestBody = {}; + const rawResponseBody = {}; + server + .mockEndpoint() + .patch("/sites/site_id/custom_fonts/font_id") + .jsonBody(rawRequestBody) + .respondWith() + .statusCode(401) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.customFonts.update("site_id", "font_id"); + }).rejects.toThrow(Webflow.UnauthorizedError); + }); + + test("update (4)", async () => { + const server = mockServerPool.createServer(); + const client = new WebflowClient({ + maxRetries: 0, + accessToken: "test", + environment: { base: server.baseUrl, dataApi: server.baseUrl, contentDeliveryApi: server.baseUrl }, + }); + const rawRequestBody = {}; + const rawResponseBody = { key: "value" }; + server + .mockEndpoint() + .patch("/sites/site_id/custom_fonts/font_id") + .jsonBody(rawRequestBody) + .respondWith() + .statusCode(403) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.customFonts.update("site_id", "font_id"); + }).rejects.toThrow(Webflow.ForbiddenError); + }); + + test("update (5)", async () => { + const server = mockServerPool.createServer(); + const client = new WebflowClient({ + maxRetries: 0, + accessToken: "test", + environment: { base: server.baseUrl, dataApi: server.baseUrl, contentDeliveryApi: server.baseUrl }, + }); + const rawRequestBody = {}; + const rawResponseBody = {}; + server + .mockEndpoint() + .patch("/sites/site_id/custom_fonts/font_id") + .jsonBody(rawRequestBody) + .respondWith() + .statusCode(404) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.customFonts.update("site_id", "font_id"); + }).rejects.toThrow(Webflow.NotFoundError); + }); + + test("update (6)", async () => { + const server = mockServerPool.createServer(); + const client = new WebflowClient({ + maxRetries: 0, + accessToken: "test", + environment: { base: server.baseUrl, dataApi: server.baseUrl, contentDeliveryApi: server.baseUrl }, + }); + const rawRequestBody = {}; + const rawResponseBody = {}; + server + .mockEndpoint() + .patch("/sites/site_id/custom_fonts/font_id") + .jsonBody(rawRequestBody) + .respondWith() + .statusCode(429) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.customFonts.update("site_id", "font_id"); + }).rejects.toThrow(Webflow.TooManyRequestsError); + }); + + test("update (7)", async () => { + const server = mockServerPool.createServer(); + const client = new WebflowClient({ + maxRetries: 0, + accessToken: "test", + environment: { base: server.baseUrl, dataApi: server.baseUrl, contentDeliveryApi: server.baseUrl }, + }); + const rawRequestBody = {}; + const rawResponseBody = {}; + server + .mockEndpoint() + .patch("/sites/site_id/custom_fonts/font_id") + .jsonBody(rawRequestBody) + .respondWith() + .statusCode(500) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.customFonts.update("site_id", "font_id"); + }).rejects.toThrow(Webflow.InternalServerError); + }); + + test("replaceFile (1)", async () => { + const server = mockServerPool.createServer(); + const client = new WebflowClient({ + maxRetries: 0, + accessToken: "test", + environment: { base: server.baseUrl, dataApi: server.baseUrl, contentDeliveryApi: server.baseUrl }, + }); + const rawRequestBody = { fileName: "AcmeSans-Regular-v2.woff2", fileHash: "3c7d87c9575702bc3b1e991f4d3c638e" }; + const rawResponseBody = { + customFont: { + id: "66f3a1b2c4d5e6f7a8b9c0d1", + fontFamily: "Acme Sans", + format: "woff2", + fileName: "AcmeSans-Regular.woff2", + weight: 400, + italic: false, + fontDisplay: "auto", + axes: [{ tag: "wght", name: "Weight", min: 100, max: 900, defaultValue: 400 }], + hostedUrl: "https://uploads-ssl.webflow.com/6437e21619d24aff35b2e4f2/66f3a1b2-AcmeSans-Regular.woff2", + }, + upload: { + url: "https://webflow-prod-assets.s3.amazonaws.com/", + fields: { + bucket: "bucket", + key: "6437e21619d24aff35b2e4f2/fonts/66f3a1b2c4d5e6f7a8b9c0d1-AcmeSans-Regular.woff2", + Policy: "Policy", + "X-Amz-Algorithm": "AWS4-HMAC-SHA256", + "X-Amz-Credential": "X-Amz-Credential", + "X-Amz-Date": "X-Amz-Date", + "X-Amz-Signature": "X-Amz-Signature", + "X-Amz-Security-Token": "X-Amz-Security-Token", + "Content-MD5": "Content-MD5", + acl: "public-read", + "Cache-Control": "max-age=31536000", + "Content-Type": "font/woff2", + success_action_status: "201", + }, + expiresAt: "2026-05-06T12:15:00Z", + }, + }; + server + .mockEndpoint() + .put("/sites/580e63e98c9a982ac9b8b741/custom_fonts/66f3a1b2c4d5e6f7a8b9c0d1/file") + .jsonBody(rawRequestBody) + .respondWith() + .statusCode(200) + .jsonBody(rawResponseBody) + .build(); + + const response = await client.customFonts.replaceFile("580e63e98c9a982ac9b8b741", "66f3a1b2c4d5e6f7a8b9c0d1", { + fileName: "AcmeSans-Regular-v2.woff2", + fileHash: "3c7d87c9575702bc3b1e991f4d3c638e", + }); + expect(response).toEqual({ + customFont: { + id: "66f3a1b2c4d5e6f7a8b9c0d1", + fontFamily: "Acme Sans", + format: "woff2", + fileName: "AcmeSans-Regular.woff2", + weight: 400, + italic: false, + fontDisplay: "auto", + axes: [ + { + tag: "wght", + name: "Weight", + min: 100, + max: 900, + defaultValue: 400, + }, + ], + hostedUrl: "https://uploads-ssl.webflow.com/6437e21619d24aff35b2e4f2/66f3a1b2-AcmeSans-Regular.woff2", + }, + upload: { + url: "https://webflow-prod-assets.s3.amazonaws.com/", + fields: { + bucket: "bucket", + key: "6437e21619d24aff35b2e4f2/fonts/66f3a1b2c4d5e6f7a8b9c0d1-AcmeSans-Regular.woff2", + policy: "Policy", + xAmzAlgorithm: "AWS4-HMAC-SHA256", + xAmzCredential: "X-Amz-Credential", + xAmzDate: "X-Amz-Date", + xAmzSignature: "X-Amz-Signature", + xAmzSecurityToken: "X-Amz-Security-Token", + contentMd5: "Content-MD5", + acl: "public-read", + cacheControl: "max-age=31536000", + contentType: "font/woff2", + successActionStatus: "201", + }, + expiresAt: new Date("2026-05-06T12:15:00.000Z"), + }, + }); + }); + + test("replaceFile (2)", async () => { + const server = mockServerPool.createServer(); + const client = new WebflowClient({ + maxRetries: 0, + accessToken: "test", + environment: { base: server.baseUrl, dataApi: server.baseUrl, contentDeliveryApi: server.baseUrl }, + }); + const rawRequestBody = { fileName: "fileName", fileHash: "fileHash" }; + const rawResponseBody = { key: "value" }; + server + .mockEndpoint() + .put("/sites/site_id/custom_fonts/font_id/file") + .jsonBody(rawRequestBody) + .respondWith() + .statusCode(400) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.customFonts.replaceFile("site_id", "font_id", { + fileName: "fileName", + fileHash: "fileHash", + }); + }).rejects.toThrow(Webflow.BadRequestError); + }); + + test("replaceFile (3)", async () => { + const server = mockServerPool.createServer(); + const client = new WebflowClient({ + maxRetries: 0, + accessToken: "test", + environment: { base: server.baseUrl, dataApi: server.baseUrl, contentDeliveryApi: server.baseUrl }, + }); + const rawRequestBody = { fileName: "fileName", fileHash: "fileHash" }; + const rawResponseBody = {}; + server + .mockEndpoint() + .put("/sites/site_id/custom_fonts/font_id/file") + .jsonBody(rawRequestBody) + .respondWith() + .statusCode(401) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.customFonts.replaceFile("site_id", "font_id", { + fileName: "fileName", + fileHash: "fileHash", + }); + }).rejects.toThrow(Webflow.UnauthorizedError); + }); + + test("replaceFile (4)", async () => { + const server = mockServerPool.createServer(); + const client = new WebflowClient({ + maxRetries: 0, + accessToken: "test", + environment: { base: server.baseUrl, dataApi: server.baseUrl, contentDeliveryApi: server.baseUrl }, + }); + const rawRequestBody = { fileName: "fileName", fileHash: "fileHash" }; + const rawResponseBody = { key: "value" }; + server + .mockEndpoint() + .put("/sites/site_id/custom_fonts/font_id/file") + .jsonBody(rawRequestBody) + .respondWith() + .statusCode(403) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.customFonts.replaceFile("site_id", "font_id", { + fileName: "fileName", + fileHash: "fileHash", + }); + }).rejects.toThrow(Webflow.ForbiddenError); + }); + + test("replaceFile (5)", async () => { + const server = mockServerPool.createServer(); + const client = new WebflowClient({ + maxRetries: 0, + accessToken: "test", + environment: { base: server.baseUrl, dataApi: server.baseUrl, contentDeliveryApi: server.baseUrl }, + }); + const rawRequestBody = { fileName: "fileName", fileHash: "fileHash" }; + const rawResponseBody = {}; + server + .mockEndpoint() + .put("/sites/site_id/custom_fonts/font_id/file") + .jsonBody(rawRequestBody) + .respondWith() + .statusCode(404) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.customFonts.replaceFile("site_id", "font_id", { + fileName: "fileName", + fileHash: "fileHash", + }); + }).rejects.toThrow(Webflow.NotFoundError); + }); + + test("replaceFile (6)", async () => { + const server = mockServerPool.createServer(); + const client = new WebflowClient({ + maxRetries: 0, + accessToken: "test", + environment: { base: server.baseUrl, dataApi: server.baseUrl, contentDeliveryApi: server.baseUrl }, + }); + const rawRequestBody = { fileName: "fileName", fileHash: "fileHash" }; + const rawResponseBody = {}; + server + .mockEndpoint() + .put("/sites/site_id/custom_fonts/font_id/file") + .jsonBody(rawRequestBody) + .respondWith() + .statusCode(429) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.customFonts.replaceFile("site_id", "font_id", { + fileName: "fileName", + fileHash: "fileHash", + }); + }).rejects.toThrow(Webflow.TooManyRequestsError); + }); + + test("replaceFile (7)", async () => { + const server = mockServerPool.createServer(); + const client = new WebflowClient({ + maxRetries: 0, + accessToken: "test", + environment: { base: server.baseUrl, dataApi: server.baseUrl, contentDeliveryApi: server.baseUrl }, + }); + const rawRequestBody = { fileName: "fileName", fileHash: "fileHash" }; + const rawResponseBody = {}; + server + .mockEndpoint() + .put("/sites/site_id/custom_fonts/font_id/file") + .jsonBody(rawRequestBody) + .respondWith() + .statusCode(500) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.customFonts.replaceFile("site_id", "font_id", { + fileName: "fileName", + fileHash: "fileHash", + }); + }).rejects.toThrow(Webflow.InternalServerError); + }); + + test("batchDelete (1)", async () => { + const server = mockServerPool.createServer(); + const client = new WebflowClient({ + maxRetries: 0, + accessToken: "test", + environment: { base: server.baseUrl, dataApi: server.baseUrl, contentDeliveryApi: server.baseUrl }, + }); + const rawRequestBody = { items: [{ id: "66f3a1b2c4d5e6f7a8b9c0d1" }] }; + const rawResponseBody = { + deleted: [{ id: "66f3a1b2c4d5e6f7a8b9c0d1" }], + failed: [{ id: "00000000000000000000abcd", name: "NotFound", msg: "Font not found" }], + }; + server + .mockEndpoint() + .post("/sites/580e63e98c9a982ac9b8b741/custom_fonts/batchDelete") + .jsonBody(rawRequestBody) + .respondWith() + .statusCode(200) + .jsonBody(rawResponseBody) + .build(); + + const response = await client.customFonts.batchDelete("580e63e98c9a982ac9b8b741", { + items: [ + { + id: "66f3a1b2c4d5e6f7a8b9c0d1", + }, + ], + }); + expect(response).toEqual({ + deleted: [ + { + id: "66f3a1b2c4d5e6f7a8b9c0d1", + }, + ], + failed: [ + { + id: "00000000000000000000abcd", + name: "NotFound", + msg: "Font not found", + }, + ], + }); + }); + + test("batchDelete (2)", async () => { + const server = mockServerPool.createServer(); + const client = new WebflowClient({ + maxRetries: 0, + accessToken: "test", + environment: { base: server.baseUrl, dataApi: server.baseUrl, contentDeliveryApi: server.baseUrl }, + }); + const rawRequestBody = { items: [{ id: "id" }, { id: "id" }] }; + const rawResponseBody = { key: "value" }; + server + .mockEndpoint() + .post("/sites/site_id/custom_fonts/batchDelete") + .jsonBody(rawRequestBody) + .respondWith() + .statusCode(400) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.customFonts.batchDelete("site_id", { + items: [ + { + id: "id", + }, + { + id: "id", + }, + ], + }); + }).rejects.toThrow(Webflow.BadRequestError); + }); + + test("batchDelete (3)", async () => { + const server = mockServerPool.createServer(); + const client = new WebflowClient({ + maxRetries: 0, + accessToken: "test", + environment: { base: server.baseUrl, dataApi: server.baseUrl, contentDeliveryApi: server.baseUrl }, + }); + const rawRequestBody = { items: [{ id: "id" }, { id: "id" }] }; + const rawResponseBody = {}; + server + .mockEndpoint() + .post("/sites/site_id/custom_fonts/batchDelete") + .jsonBody(rawRequestBody) + .respondWith() + .statusCode(401) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.customFonts.batchDelete("site_id", { + items: [ + { + id: "id", + }, + { + id: "id", + }, + ], + }); + }).rejects.toThrow(Webflow.UnauthorizedError); + }); + + test("batchDelete (4)", async () => { + const server = mockServerPool.createServer(); + const client = new WebflowClient({ + maxRetries: 0, + accessToken: "test", + environment: { base: server.baseUrl, dataApi: server.baseUrl, contentDeliveryApi: server.baseUrl }, + }); + const rawRequestBody = { items: [{ id: "id" }, { id: "id" }] }; + const rawResponseBody = { key: "value" }; + server + .mockEndpoint() + .post("/sites/site_id/custom_fonts/batchDelete") + .jsonBody(rawRequestBody) + .respondWith() + .statusCode(403) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.customFonts.batchDelete("site_id", { + items: [ + { + id: "id", + }, + { + id: "id", + }, + ], + }); + }).rejects.toThrow(Webflow.ForbiddenError); + }); + + test("batchDelete (5)", async () => { + const server = mockServerPool.createServer(); + const client = new WebflowClient({ + maxRetries: 0, + accessToken: "test", + environment: { base: server.baseUrl, dataApi: server.baseUrl, contentDeliveryApi: server.baseUrl }, + }); + const rawRequestBody = { items: [{ id: "id" }, { id: "id" }] }; + const rawResponseBody = {}; + server + .mockEndpoint() + .post("/sites/site_id/custom_fonts/batchDelete") + .jsonBody(rawRequestBody) + .respondWith() + .statusCode(404) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.customFonts.batchDelete("site_id", { + items: [ + { + id: "id", + }, + { + id: "id", + }, + ], + }); + }).rejects.toThrow(Webflow.NotFoundError); + }); + + test("batchDelete (6)", async () => { + const server = mockServerPool.createServer(); + const client = new WebflowClient({ + maxRetries: 0, + accessToken: "test", + environment: { base: server.baseUrl, dataApi: server.baseUrl, contentDeliveryApi: server.baseUrl }, + }); + const rawRequestBody = { items: [{ id: "id" }, { id: "id" }] }; + const rawResponseBody = {}; + server + .mockEndpoint() + .post("/sites/site_id/custom_fonts/batchDelete") + .jsonBody(rawRequestBody) + .respondWith() + .statusCode(429) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.customFonts.batchDelete("site_id", { + items: [ + { + id: "id", + }, + { + id: "id", + }, + ], + }); + }).rejects.toThrow(Webflow.TooManyRequestsError); + }); + + test("batchDelete (7)", async () => { + const server = mockServerPool.createServer(); + const client = new WebflowClient({ + maxRetries: 0, + accessToken: "test", + environment: { base: server.baseUrl, dataApi: server.baseUrl, contentDeliveryApi: server.baseUrl }, + }); + const rawRequestBody = { items: [{ id: "id" }, { id: "id" }] }; + const rawResponseBody = {}; + server + .mockEndpoint() + .post("/sites/site_id/custom_fonts/batchDelete") + .jsonBody(rawRequestBody) + .respondWith() + .statusCode(500) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.customFonts.batchDelete("site_id", { + items: [ + { + id: "id", + }, + { + id: "id", + }, + ], + }); + }).rejects.toThrow(Webflow.InternalServerError); + }); +}); diff --git a/tests/wire/forms.test.ts b/tests/wire/forms.test.ts index efed7262..217add7e 100644 --- a/tests/wire/forms.test.ts +++ b/tests/wire/forms.test.ts @@ -475,6 +475,7 @@ describe("FormsClient", () => { workspaceId: "62749158efef318abc8d5a0f", dateSubmitted: "2022-09-14T12:35:16Z", formResponse: { "First Name": "Arthur", "Last Name": "Dent" }, + localeId: "6a0cb90f3ecc9d3d47ca8b5b", }, { id: "660d64fabf6e0a0d4edab981", @@ -511,6 +512,7 @@ describe("FormsClient", () => { "First Name": "Arthur", "Last Name": "Dent", }, + localeId: "6a0cb90f3ecc9d3d47ca8b5b", }, { id: "660d64fabf6e0a0d4edab981", @@ -679,6 +681,7 @@ describe("FormsClient", () => { workspaceId: "62749158efef318abc8d5a0f", dateSubmitted: "2022-09-14T12:35:16Z", formResponse: { "First Name": "Arthur", "Last Name": "Dent" }, + localeId: "6a0cb90f3ecc9d3d47ca8b5b", }; server .mockEndpoint() @@ -699,6 +702,7 @@ describe("FormsClient", () => { "First Name": "Arthur", "Last Name": "Dent", }, + localeId: "6a0cb90f3ecc9d3d47ca8b5b", }); }); @@ -1022,6 +1026,7 @@ describe("FormsClient", () => { workspaceId: "62749158efef318abc8d5a0f", dateSubmitted: "2022-09-14T12:35:16Z", formResponse: { "First Name": "Arthur", "Last Name": "Dent" }, + localeId: "6a0cb90f3ecc9d3d47ca8b5b", }; server .mockEndpoint() @@ -1043,6 +1048,7 @@ describe("FormsClient", () => { "First Name": "Arthur", "Last Name": "Dent", }, + localeId: "6a0cb90f3ecc9d3d47ca8b5b", }); }); diff --git a/tests/wire/sites.test.ts b/tests/wire/sites.test.ts index febbdc99..f533151a 100644 --- a/tests/wire/sites.test.ts +++ b/tests/wire/sites.test.ts @@ -1280,6 +1280,7 @@ describe("SitesClient", () => { { id: "589a331aa51e760df7ccb89d", url: "test-api-domain.com", lastPublished: "2022-12-07T16:51:37Z" }, ], publishToWebflowSubdomain: true, + publishScope: "site", }; server .mockEndpoint() @@ -1303,6 +1304,7 @@ describe("SitesClient", () => { }, ], publishToWebflowSubdomain: true, + publishScope: "site", }); }); diff --git a/tests/wire/sites/forms.test.ts b/tests/wire/sites/forms.test.ts index 79f11395..e56cca3f 100644 --- a/tests/wire/sites/forms.test.ts +++ b/tests/wire/sites/forms.test.ts @@ -22,6 +22,7 @@ describe("FormsClient", () => { workspaceId: "62749158efef318abc8d5a0f", dateSubmitted: "2022-09-14T12:35:16Z", formResponse: { "First Name": "Arthur", "Last Name": "Dent" }, + localeId: "6a0cb90f3ecc9d3d47ca8b5b", }, { id: "660d64fabf6e0a0d4edab981", @@ -59,6 +60,7 @@ describe("FormsClient", () => { "First Name": "Arthur", "Last Name": "Dent", }, + localeId: "6a0cb90f3ecc9d3d47ca8b5b", }, { id: "660d64fabf6e0a0d4edab981", @@ -229,6 +231,7 @@ describe("FormsClient", () => { workspaceId: "62749158efef318abc8d5a0f", dateSubmitted: "2022-09-14T12:35:16Z", formResponse: { "First Name": "Arthur", "Last Name": "Dent" }, + localeId: "6a0cb90f3ecc9d3d47ca8b5b", }, { id: "660d64fabf6e0a0d4edab981", @@ -269,6 +272,7 @@ describe("FormsClient", () => { "First Name": "Arthur", "Last Name": "Dent", }, + localeId: "6a0cb90f3ecc9d3d47ca8b5b", }, { id: "660d64fabf6e0a0d4edab981", @@ -437,6 +441,7 @@ describe("FormsClient", () => { workspaceId: "62749158efef318abc8d5a0f", dateSubmitted: "2022-09-14T12:35:16Z", formResponse: { "First Name": "Arthur", "Last Name": "Dent" }, + localeId: "6a0cb90f3ecc9d3d47ca8b5b", }; server .mockEndpoint() @@ -457,6 +462,7 @@ describe("FormsClient", () => { "First Name": "Arthur", "Last Name": "Dent", }, + localeId: "6a0cb90f3ecc9d3d47ca8b5b", }); }); @@ -783,6 +789,7 @@ describe("FormsClient", () => { workspaceId: "62749158efef318abc8d5a0f", dateSubmitted: "2022-09-14T12:35:16Z", formResponse: { "First Name": "Arthur", "Last Name": "Dent" }, + localeId: "6a0cb90f3ecc9d3d47ca8b5b", }; server .mockEndpoint() @@ -807,6 +814,7 @@ describe("FormsClient", () => { "First Name": "Arthur", "Last Name": "Dent", }, + localeId: "6a0cb90f3ecc9d3d47ca8b5b", }); }); diff --git a/tests/wire/sites/googleTag.test.ts b/tests/wire/sites/googleTag.test.ts new file mode 100644 index 00000000..e34ed600 --- /dev/null +++ b/tests/wire/sites/googleTag.test.ts @@ -0,0 +1,655 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Webflow from "../../../src/api/index"; +import { WebflowClient } from "../../../src/Client"; +import { mockServerPool } from "../../mock-server/MockServerPool"; + +describe("GoogleTagClient", () => { + test("list (1)", async () => { + const server = mockServerPool.createServer(); + const client = new WebflowClient({ + maxRetries: 0, + accessToken: "test", + environment: { base: server.baseUrl, dataApi: server.baseUrl, contentDeliveryApi: server.baseUrl }, + }); + + const rawResponseBody = { + googleTagIds: [{ order: 0, displayName: "Main Analytics Tag", tagId: "G-1234567890" }], + }; + server + .mockEndpoint() + .get("/sites/580e63e98c9a982ac9b8b741/integrations/google_tags") + .respondWith() + .statusCode(200) + .jsonBody(rawResponseBody) + .build(); + + const response = await client.sites.googleTag.list("580e63e98c9a982ac9b8b741"); + expect(response).toEqual({ + googleTagIds: [ + { + order: 0, + displayName: "Main Analytics Tag", + tagId: "G-1234567890", + }, + ], + }); + }); + + test("list (2)", async () => { + const server = mockServerPool.createServer(); + const client = new WebflowClient({ + maxRetries: 0, + accessToken: "test", + environment: { base: server.baseUrl, dataApi: server.baseUrl, contentDeliveryApi: server.baseUrl }, + }); + + const rawResponseBody = { key: "value" }; + server + .mockEndpoint() + .get("/sites/site_id/integrations/google_tags") + .respondWith() + .statusCode(400) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.sites.googleTag.list("site_id"); + }).rejects.toThrow(Webflow.BadRequestError); + }); + + test("list (3)", async () => { + const server = mockServerPool.createServer(); + const client = new WebflowClient({ + maxRetries: 0, + accessToken: "test", + environment: { base: server.baseUrl, dataApi: server.baseUrl, contentDeliveryApi: server.baseUrl }, + }); + + const rawResponseBody = {}; + server + .mockEndpoint() + .get("/sites/site_id/integrations/google_tags") + .respondWith() + .statusCode(401) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.sites.googleTag.list("site_id"); + }).rejects.toThrow(Webflow.UnauthorizedError); + }); + + test("list (4)", async () => { + const server = mockServerPool.createServer(); + const client = new WebflowClient({ + maxRetries: 0, + accessToken: "test", + environment: { base: server.baseUrl, dataApi: server.baseUrl, contentDeliveryApi: server.baseUrl }, + }); + + const rawResponseBody = {}; + server + .mockEndpoint() + .get("/sites/site_id/integrations/google_tags") + .respondWith() + .statusCode(404) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.sites.googleTag.list("site_id"); + }).rejects.toThrow(Webflow.NotFoundError); + }); + + test("list (5)", async () => { + const server = mockServerPool.createServer(); + const client = new WebflowClient({ + maxRetries: 0, + accessToken: "test", + environment: { base: server.baseUrl, dataApi: server.baseUrl, contentDeliveryApi: server.baseUrl }, + }); + + const rawResponseBody = {}; + server + .mockEndpoint() + .get("/sites/site_id/integrations/google_tags") + .respondWith() + .statusCode(429) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.sites.googleTag.list("site_id"); + }).rejects.toThrow(Webflow.TooManyRequestsError); + }); + + test("list (6)", async () => { + const server = mockServerPool.createServer(); + const client = new WebflowClient({ + maxRetries: 0, + accessToken: "test", + environment: { base: server.baseUrl, dataApi: server.baseUrl, contentDeliveryApi: server.baseUrl }, + }); + + const rawResponseBody = {}; + server + .mockEndpoint() + .get("/sites/site_id/integrations/google_tags") + .respondWith() + .statusCode(500) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.sites.googleTag.list("site_id"); + }).rejects.toThrow(Webflow.InternalServerError); + }); + + test("deleteAll (1)", async () => { + const server = mockServerPool.createServer(); + const client = new WebflowClient({ + maxRetries: 0, + accessToken: "test", + environment: { base: server.baseUrl, dataApi: server.baseUrl, contentDeliveryApi: server.baseUrl }, + }); + + server + .mockEndpoint() + .delete("/sites/580e63e98c9a982ac9b8b741/integrations/google_tags") + .respondWith() + .statusCode(200) + .build(); + + const response = await client.sites.googleTag.deleteAll("580e63e98c9a982ac9b8b741"); + expect(response).toEqual(undefined); + }); + + test("deleteAll (2)", async () => { + const server = mockServerPool.createServer(); + const client = new WebflowClient({ + maxRetries: 0, + accessToken: "test", + environment: { base: server.baseUrl, dataApi: server.baseUrl, contentDeliveryApi: server.baseUrl }, + }); + + const rawResponseBody = { key: "value" }; + server + .mockEndpoint() + .delete("/sites/site_id/integrations/google_tags") + .respondWith() + .statusCode(400) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.sites.googleTag.deleteAll("site_id"); + }).rejects.toThrow(Webflow.BadRequestError); + }); + + test("deleteAll (3)", async () => { + const server = mockServerPool.createServer(); + const client = new WebflowClient({ + maxRetries: 0, + accessToken: "test", + environment: { base: server.baseUrl, dataApi: server.baseUrl, contentDeliveryApi: server.baseUrl }, + }); + + const rawResponseBody = {}; + server + .mockEndpoint() + .delete("/sites/site_id/integrations/google_tags") + .respondWith() + .statusCode(401) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.sites.googleTag.deleteAll("site_id"); + }).rejects.toThrow(Webflow.UnauthorizedError); + }); + + test("deleteAll (4)", async () => { + const server = mockServerPool.createServer(); + const client = new WebflowClient({ + maxRetries: 0, + accessToken: "test", + environment: { base: server.baseUrl, dataApi: server.baseUrl, contentDeliveryApi: server.baseUrl }, + }); + + const rawResponseBody = {}; + server + .mockEndpoint() + .delete("/sites/site_id/integrations/google_tags") + .respondWith() + .statusCode(404) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.sites.googleTag.deleteAll("site_id"); + }).rejects.toThrow(Webflow.NotFoundError); + }); + + test("deleteAll (5)", async () => { + const server = mockServerPool.createServer(); + const client = new WebflowClient({ + maxRetries: 0, + accessToken: "test", + environment: { base: server.baseUrl, dataApi: server.baseUrl, contentDeliveryApi: server.baseUrl }, + }); + + const rawResponseBody = {}; + server + .mockEndpoint() + .delete("/sites/site_id/integrations/google_tags") + .respondWith() + .statusCode(429) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.sites.googleTag.deleteAll("site_id"); + }).rejects.toThrow(Webflow.TooManyRequestsError); + }); + + test("deleteAll (6)", async () => { + const server = mockServerPool.createServer(); + const client = new WebflowClient({ + maxRetries: 0, + accessToken: "test", + environment: { base: server.baseUrl, dataApi: server.baseUrl, contentDeliveryApi: server.baseUrl }, + }); + + const rawResponseBody = {}; + server + .mockEndpoint() + .delete("/sites/site_id/integrations/google_tags") + .respondWith() + .statusCode(500) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.sites.googleTag.deleteAll("site_id"); + }).rejects.toThrow(Webflow.InternalServerError); + }); + + test("upsert (1)", async () => { + const server = mockServerPool.createServer(); + const client = new WebflowClient({ + maxRetries: 0, + accessToken: "test", + environment: { base: server.baseUrl, dataApi: server.baseUrl, contentDeliveryApi: server.baseUrl }, + }); + const rawRequestBody = { + googleTagIds: [{ order: 0, displayName: "Main Analytics Tag", tagId: "G-1234567890" }], + }; + const rawResponseBody = { + googleTagIds: [{ order: 0, displayName: "Main Analytics Tag", tagId: "G-1234567890" }], + }; + server + .mockEndpoint() + .patch("/sites/580e63e98c9a982ac9b8b741/integrations/google_tags") + .jsonBody(rawRequestBody) + .respondWith() + .statusCode(200) + .jsonBody(rawResponseBody) + .build(); + + const response = await client.sites.googleTag.upsert("580e63e98c9a982ac9b8b741", { + googleTagIds: [ + { + order: 0, + displayName: "Main Analytics Tag", + tagId: "G-1234567890", + }, + ], + }); + expect(response).toEqual({ + googleTagIds: [ + { + order: 0, + displayName: "Main Analytics Tag", + tagId: "G-1234567890", + }, + ], + }); + }); + + test("upsert (2)", async () => { + const server = mockServerPool.createServer(); + const client = new WebflowClient({ + maxRetries: 0, + accessToken: "test", + environment: { base: server.baseUrl, dataApi: server.baseUrl, contentDeliveryApi: server.baseUrl }, + }); + const rawRequestBody = { + googleTagIds: [ + { displayName: "displayName", tagId: "tagId" }, + { displayName: "displayName", tagId: "tagId" }, + ], + }; + const rawResponseBody = { key: "value" }; + server + .mockEndpoint() + .patch("/sites/site_id/integrations/google_tags") + .jsonBody(rawRequestBody) + .respondWith() + .statusCode(400) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.sites.googleTag.upsert("site_id", { + googleTagIds: [ + { + displayName: "displayName", + tagId: "tagId", + }, + { + displayName: "displayName", + tagId: "tagId", + }, + ], + }); + }).rejects.toThrow(Webflow.BadRequestError); + }); + + test("upsert (3)", async () => { + const server = mockServerPool.createServer(); + const client = new WebflowClient({ + maxRetries: 0, + accessToken: "test", + environment: { base: server.baseUrl, dataApi: server.baseUrl, contentDeliveryApi: server.baseUrl }, + }); + const rawRequestBody = { + googleTagIds: [ + { displayName: "displayName", tagId: "tagId" }, + { displayName: "displayName", tagId: "tagId" }, + ], + }; + const rawResponseBody = {}; + server + .mockEndpoint() + .patch("/sites/site_id/integrations/google_tags") + .jsonBody(rawRequestBody) + .respondWith() + .statusCode(401) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.sites.googleTag.upsert("site_id", { + googleTagIds: [ + { + displayName: "displayName", + tagId: "tagId", + }, + { + displayName: "displayName", + tagId: "tagId", + }, + ], + }); + }).rejects.toThrow(Webflow.UnauthorizedError); + }); + + test("upsert (4)", async () => { + const server = mockServerPool.createServer(); + const client = new WebflowClient({ + maxRetries: 0, + accessToken: "test", + environment: { base: server.baseUrl, dataApi: server.baseUrl, contentDeliveryApi: server.baseUrl }, + }); + const rawRequestBody = { + googleTagIds: [ + { displayName: "displayName", tagId: "tagId" }, + { displayName: "displayName", tagId: "tagId" }, + ], + }; + const rawResponseBody = {}; + server + .mockEndpoint() + .patch("/sites/site_id/integrations/google_tags") + .jsonBody(rawRequestBody) + .respondWith() + .statusCode(404) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.sites.googleTag.upsert("site_id", { + googleTagIds: [ + { + displayName: "displayName", + tagId: "tagId", + }, + { + displayName: "displayName", + tagId: "tagId", + }, + ], + }); + }).rejects.toThrow(Webflow.NotFoundError); + }); + + test("upsert (5)", async () => { + const server = mockServerPool.createServer(); + const client = new WebflowClient({ + maxRetries: 0, + accessToken: "test", + environment: { base: server.baseUrl, dataApi: server.baseUrl, contentDeliveryApi: server.baseUrl }, + }); + const rawRequestBody = { + googleTagIds: [ + { displayName: "displayName", tagId: "tagId" }, + { displayName: "displayName", tagId: "tagId" }, + ], + }; + const rawResponseBody = {}; + server + .mockEndpoint() + .patch("/sites/site_id/integrations/google_tags") + .jsonBody(rawRequestBody) + .respondWith() + .statusCode(429) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.sites.googleTag.upsert("site_id", { + googleTagIds: [ + { + displayName: "displayName", + tagId: "tagId", + }, + { + displayName: "displayName", + tagId: "tagId", + }, + ], + }); + }).rejects.toThrow(Webflow.TooManyRequestsError); + }); + + test("upsert (6)", async () => { + const server = mockServerPool.createServer(); + const client = new WebflowClient({ + maxRetries: 0, + accessToken: "test", + environment: { base: server.baseUrl, dataApi: server.baseUrl, contentDeliveryApi: server.baseUrl }, + }); + const rawRequestBody = { + googleTagIds: [ + { displayName: "displayName", tagId: "tagId" }, + { displayName: "displayName", tagId: "tagId" }, + ], + }; + const rawResponseBody = {}; + server + .mockEndpoint() + .patch("/sites/site_id/integrations/google_tags") + .jsonBody(rawRequestBody) + .respondWith() + .statusCode(500) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.sites.googleTag.upsert("site_id", { + googleTagIds: [ + { + displayName: "displayName", + tagId: "tagId", + }, + { + displayName: "displayName", + tagId: "tagId", + }, + ], + }); + }).rejects.toThrow(Webflow.InternalServerError); + }); + + test("delete (1)", async () => { + const server = mockServerPool.createServer(); + const client = new WebflowClient({ + maxRetries: 0, + accessToken: "test", + environment: { base: server.baseUrl, dataApi: server.baseUrl, contentDeliveryApi: server.baseUrl }, + }); + + const rawResponseBody = { + googleTagIds: [{ order: 0, displayName: "Main Analytics Tag", tagId: "G-1234567890" }], + }; + server + .mockEndpoint() + .delete("/sites/580e63e98c9a982ac9b8b741/integrations/google_tags/G-XXXXXXXXXX") + .respondWith() + .statusCode(200) + .jsonBody(rawResponseBody) + .build(); + + const response = await client.sites.googleTag.delete("580e63e98c9a982ac9b8b741", "G-XXXXXXXXXX"); + expect(response).toEqual({ + googleTagIds: [ + { + order: 0, + displayName: "Main Analytics Tag", + tagId: "G-1234567890", + }, + ], + }); + }); + + test("delete (2)", async () => { + const server = mockServerPool.createServer(); + const client = new WebflowClient({ + maxRetries: 0, + accessToken: "test", + environment: { base: server.baseUrl, dataApi: server.baseUrl, contentDeliveryApi: server.baseUrl }, + }); + + const rawResponseBody = { key: "value" }; + server + .mockEndpoint() + .delete("/sites/site_id/integrations/google_tags/tag_id") + .respondWith() + .statusCode(400) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.sites.googleTag.delete("site_id", "tag_id"); + }).rejects.toThrow(Webflow.BadRequestError); + }); + + test("delete (3)", async () => { + const server = mockServerPool.createServer(); + const client = new WebflowClient({ + maxRetries: 0, + accessToken: "test", + environment: { base: server.baseUrl, dataApi: server.baseUrl, contentDeliveryApi: server.baseUrl }, + }); + + const rawResponseBody = {}; + server + .mockEndpoint() + .delete("/sites/site_id/integrations/google_tags/tag_id") + .respondWith() + .statusCode(401) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.sites.googleTag.delete("site_id", "tag_id"); + }).rejects.toThrow(Webflow.UnauthorizedError); + }); + + test("delete (4)", async () => { + const server = mockServerPool.createServer(); + const client = new WebflowClient({ + maxRetries: 0, + accessToken: "test", + environment: { base: server.baseUrl, dataApi: server.baseUrl, contentDeliveryApi: server.baseUrl }, + }); + + const rawResponseBody = {}; + server + .mockEndpoint() + .delete("/sites/site_id/integrations/google_tags/tag_id") + .respondWith() + .statusCode(404) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.sites.googleTag.delete("site_id", "tag_id"); + }).rejects.toThrow(Webflow.NotFoundError); + }); + + test("delete (5)", async () => { + const server = mockServerPool.createServer(); + const client = new WebflowClient({ + maxRetries: 0, + accessToken: "test", + environment: { base: server.baseUrl, dataApi: server.baseUrl, contentDeliveryApi: server.baseUrl }, + }); + + const rawResponseBody = {}; + server + .mockEndpoint() + .delete("/sites/site_id/integrations/google_tags/tag_id") + .respondWith() + .statusCode(429) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.sites.googleTag.delete("site_id", "tag_id"); + }).rejects.toThrow(Webflow.TooManyRequestsError); + }); + + test("delete (6)", async () => { + const server = mockServerPool.createServer(); + const client = new WebflowClient({ + maxRetries: 0, + accessToken: "test", + environment: { base: server.baseUrl, dataApi: server.baseUrl, contentDeliveryApi: server.baseUrl }, + }); + + const rawResponseBody = {}; + server + .mockEndpoint() + .delete("/sites/site_id/integrations/google_tags/tag_id") + .respondWith() + .statusCode(500) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.sites.googleTag.delete("site_id", "tag_id"); + }).rejects.toThrow(Webflow.InternalServerError); + }); +}); diff --git a/yarn.lock b/yarn.lock index 93a2db55..c0eb28fe 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,34 +2,34 @@ # yarn lockfile v1 -"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.12.13", "@babel/code-frame@^7.28.6", "@babel/code-frame@^7.29.0": - version "7.29.0" - resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.29.0.tgz#7cd7a59f15b3cc0dcd803038f7792712a7d0b15c" - integrity sha512-9NhCeYjq9+3uxgdtp20LSiJXJvN0FeCtNGpJxuMFZ1Kv3cWUNb6DOhJwUvcVCzKGR66cw4njwM6hrJLqgOwbcw== +"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.12.13", "@babel/code-frame@^7.29.7": + version "7.29.7" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.29.7.tgz#f2fbbfea87c44a21590ec515b778b2c26d8866e7" + integrity sha512-Aup7aUOfpbAUg2ROOJN6Iw5f9DMBlzu0mIkm/malLQFN/YQgO48wCj0Kxa3sEHJvPVFg7siR+qRInwXd2qhQKw== dependencies: - "@babel/helper-validator-identifier" "^7.28.5" + "@babel/helper-validator-identifier" "^7.29.7" js-tokens "^4.0.0" picocolors "^1.1.1" -"@babel/compat-data@^7.28.6": - version "7.29.0" - resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.29.0.tgz#00d03e8c0ac24dd9be942c5370990cbe1f17d88d" - integrity sha512-T1NCJqT/j9+cn8fvkt7jtwbLBfLC/1y1c7NtCeXFRgzGTsafi68MRv8yzkYSapBnFA6L3U2VSc02ciDzoAJhJg== +"@babel/compat-data@^7.29.7": + version "7.29.7" + resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.29.7.tgz#6f0237f0f36d2e51c0570a636faed9d2d0efe629" + integrity sha512-locTkQyKvwIEgBzVrn8693ebc97F2U8ZHjbXwDXJ5Fn2TCpNwTlKcaKLkdHop5c/icOFE7qt7Q9JC5hnKNa6Gg== "@babel/core@^7.11.6", "@babel/core@^7.12.3", "@babel/core@^7.23.9": - version "7.29.0" - resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.29.0.tgz#5286ad785df7f79d656e88ce86e650d16ca5f322" - integrity sha512-CGOfOJqWjg2qW/Mb6zNsDm+u5vFQ8DxXfbM09z69p5Z6+mE1ikP2jUXw+j42Pf1XTYED2Rni5f95npYeuwMDQA== - dependencies: - "@babel/code-frame" "^7.29.0" - "@babel/generator" "^7.29.0" - "@babel/helper-compilation-targets" "^7.28.6" - "@babel/helper-module-transforms" "^7.28.6" - "@babel/helpers" "^7.28.6" - "@babel/parser" "^7.29.0" - "@babel/template" "^7.28.6" - "@babel/traverse" "^7.29.0" - "@babel/types" "^7.29.0" + version "7.29.7" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.29.7.tgz#80c10b17248082968b57a857b91640971f2070f7" + integrity sha512-RgHBCvtjbOK2gXSNBNIkNoEc9qoVEtau3hj8gEqKQuL3HZAibKarWFEI3Lfm6EYKkLalOh8eSrj9b+ch9H/VBA== + dependencies: + "@babel/code-frame" "^7.29.7" + "@babel/generator" "^7.29.7" + "@babel/helper-compilation-targets" "^7.29.7" + "@babel/helper-module-transforms" "^7.29.7" + "@babel/helpers" "^7.29.7" + "@babel/parser" "^7.29.7" + "@babel/template" "^7.29.7" + "@babel/traverse" "^7.29.7" + "@babel/types" "^7.29.7" "@jridgewell/remapping" "^2.3.5" convert-source-map "^2.0.0" debug "^4.1.0" @@ -37,84 +37,84 @@ json5 "^2.2.3" semver "^6.3.1" -"@babel/generator@^7.29.0", "@babel/generator@^7.7.2": - version "7.29.1" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.29.1.tgz#d09876290111abbb00ef962a7b83a5307fba0d50" - integrity sha512-qsaF+9Qcm2Qv8SRIMMscAvG4O3lJ0F1GuMo5HR/Bp02LopNgnZBC/EkbevHFeGs4ls/oPz9v+Bsmzbkbe+0dUw== +"@babel/generator@^7.29.7", "@babel/generator@^7.7.2": + version "7.29.7" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.29.7.tgz#cca0b8827e6bcf3ba176788e7f3b180ad6db2fa3" + integrity sha512-DkXD5OJQaAQIdZ1bt3UZdEnHAn9Imd3IVBdX03UFe+ony9Ojw5pzr9YVKGDY1jt+Gcn/FnGkNf8r+Vj5NOJWtQ== dependencies: - "@babel/parser" "^7.29.0" - "@babel/types" "^7.29.0" + "@babel/parser" "^7.29.7" + "@babel/types" "^7.29.7" "@jridgewell/gen-mapping" "^0.3.12" "@jridgewell/trace-mapping" "^0.3.28" jsesc "^3.0.2" -"@babel/helper-compilation-targets@^7.28.6": - version "7.28.6" - resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.28.6.tgz#32c4a3f41f12ed1532179b108a4d746e105c2b25" - integrity sha512-JYtls3hqi15fcx5GaSNL7SCTJ2MNmjrkHXg4FSpOA/grxK8KwyZ5bubHsCq8FXCkua6xhuaaBit+3b7+VZRfcA== +"@babel/helper-compilation-targets@^7.29.7": + version "7.29.7" + resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.29.7.tgz#7a1def704302401c47f64fa85589e974ae217042" + integrity sha512-wem6WaBj4NaVYVdNhLPPVacES6ZJ+KBBfSkTMD3YZxbP3rm3Di85tJU5ljaUNhaOynt+Aj0xruhYuzQBt8n71g== dependencies: - "@babel/compat-data" "^7.28.6" - "@babel/helper-validator-option" "^7.27.1" + "@babel/compat-data" "^7.29.7" + "@babel/helper-validator-option" "^7.29.7" browserslist "^4.24.0" lru-cache "^5.1.1" semver "^6.3.1" -"@babel/helper-globals@^7.28.0": - version "7.28.0" - resolved "https://registry.yarnpkg.com/@babel/helper-globals/-/helper-globals-7.28.0.tgz#b9430df2aa4e17bc28665eadeae8aa1d985e6674" - integrity sha512-+W6cISkXFa1jXsDEdYA8HeevQT/FULhxzR99pxphltZcVaugps53THCeiWA8SguxxpSp3gKPiuYfSWopkLQ4hw== +"@babel/helper-globals@^7.29.7": + version "7.29.7" + resolved "https://registry.yarnpkg.com/@babel/helper-globals/-/helper-globals-7.29.7.tgz#f04a96fbd8473241b1079243f5b3f03a3010ab7b" + integrity sha512-3nQVUAtvkKH9zahfWgw96Jc/uFOmjACE1kQz82E2lqWmHBgjzbNlsC22nuQTfahmWeQtTq5nQ/4Nnd2A1wj4zA== -"@babel/helper-module-imports@^7.28.6": - version "7.28.6" - resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.28.6.tgz#60632cbd6ffb70b22823187201116762a03e2d5c" - integrity sha512-l5XkZK7r7wa9LucGw9LwZyyCUscb4x37JWTPz7swwFE/0FMQAGpiWUZn8u9DzkSBWEcK25jmvubfpw2dnAMdbw== +"@babel/helper-module-imports@^7.29.7": + version "7.29.7" + resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.29.7.tgz#ef25048a518e828d7393fac5882ddd73921d7396" + integrity sha512-ejHwrQQYcm9xnTivShn2IDOlIzInN34AXskvq9QicvCtEzq1Vzclu/tKF8Jq1Cg8JG2GL6/EmjgsCT7lXepE3g== dependencies: - "@babel/traverse" "^7.28.6" - "@babel/types" "^7.28.6" + "@babel/traverse" "^7.29.7" + "@babel/types" "^7.29.7" -"@babel/helper-module-transforms@^7.28.6": - version "7.28.6" - resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.28.6.tgz#9312d9d9e56edc35aeb6e95c25d4106b50b9eb1e" - integrity sha512-67oXFAYr2cDLDVGLXTEABjdBJZ6drElUSI7WKp70NrpyISso3plG9SAGEF6y7zbha/wOzUByWWTJvEDVNIUGcA== +"@babel/helper-module-transforms@^7.29.7": + version "7.29.7" + resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.29.7.tgz#b062747a5997ba138637201328bbff77960574ae" + integrity sha512-UPUVSyXbOh627KiCIGQSgwWzGeBKLkaJ9PJEdrngIwMSzxLR4jS4+f1f1jb7VzBbg8nFLaYotvVPFCTqdrmTAg== dependencies: - "@babel/helper-module-imports" "^7.28.6" - "@babel/helper-validator-identifier" "^7.28.5" - "@babel/traverse" "^7.28.6" + "@babel/helper-module-imports" "^7.29.7" + "@babel/helper-validator-identifier" "^7.29.7" + "@babel/traverse" "^7.29.7" -"@babel/helper-plugin-utils@^7.0.0", "@babel/helper-plugin-utils@^7.10.4", "@babel/helper-plugin-utils@^7.12.13", "@babel/helper-plugin-utils@^7.14.5", "@babel/helper-plugin-utils@^7.28.6", "@babel/helper-plugin-utils@^7.8.0": - version "7.28.6" - resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.28.6.tgz#6f13ea251b68c8532e985fd532f28741a8af9ac8" - integrity sha512-S9gzZ/bz83GRysI7gAD4wPT/AI3uCnY+9xn+Mx/KPs2JwHJIz1W8PZkg2cqyt3RNOBM8ejcXhV6y8Og7ly/Dug== +"@babel/helper-plugin-utils@^7.0.0", "@babel/helper-plugin-utils@^7.10.4", "@babel/helper-plugin-utils@^7.12.13", "@babel/helper-plugin-utils@^7.14.5", "@babel/helper-plugin-utils@^7.29.7", "@babel/helper-plugin-utils@^7.8.0": + version "7.29.7" + resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.29.7.tgz#c0a0766f1a13617d8a17407d7ab8f9d486225ea4" + integrity sha512-G7sHYigPY17oO5SYWnfD/0MTBwVR781S/JI643e/JhUYgVgWE/61SoW3NH9KWUKyKq5LVh3npif99Wkt6j86Jw== -"@babel/helper-string-parser@^7.27.1": - version "7.27.1" - resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.27.1.tgz#54da796097ab19ce67ed9f88b47bb2ec49367687" - integrity sha512-qMlSxKbpRlAridDExk92nSobyDdpPijUq2DW6oDnUqd0iOGxmQjyqhMIihI9+zv4LPyZdRje2cavWPbCbWm3eA== +"@babel/helper-string-parser@^7.29.7": + version "7.29.7" + resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.29.7.tgz#7f0871d99824d23137d60f86fcf6130fd5a1b51f" + integrity sha512-Pb5ijPrZ89GDH8223L4UP8i6QApWxs04RbPQJTeWDV0/keR2E36MeKnyr6LYmUUvqRRI+Iv87SuF1W6ErINzYw== -"@babel/helper-validator-identifier@^7.28.5": - version "7.28.5" - resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.28.5.tgz#010b6938fab7cb7df74aa2bbc06aa503b8fe5fb4" - integrity sha512-qSs4ifwzKJSV39ucNjsvc6WVHs6b7S03sOh2OcHF9UHfVPqWWALUsNUVzhSBiItjRZoLHx7nIarVjqKVusUZ1Q== +"@babel/helper-validator-identifier@^7.29.7": + version "7.29.7" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.29.7.tgz#bd87084ced0c796ec46bda492de6e83d29e89fc2" + integrity sha512-qehxGkRj55h/ff8EMaJ+cYhyaKlHIxqYDn682wQD7RNp9UujOQsHog2uS0r2vzr4pW+sXf90NeeayjcNaX3fFg== -"@babel/helper-validator-option@^7.27.1": - version "7.27.1" - resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.27.1.tgz#fa52f5b1e7db1ab049445b421c4471303897702f" - integrity sha512-YvjJow9FxbhFFKDSuFnVCe2WxXk1zWc22fFePVNEaWJEu8IrZVlda6N0uHwzZrUM1il7NC9Mlp4MaJYbYd9JSg== +"@babel/helper-validator-option@^7.29.7": + version "7.29.7" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.29.7.tgz#cf315be940213b354eb4abcc0bd01ebe3f73bc2a" + integrity sha512-N9ZErrD+yW5geCDtBqnOoxmR8+tNKiGuxKlDpuJxfsqpa2dFcexaziGAE/qoHLiDDreVNMupxGmSoNlyvsA3gw== -"@babel/helpers@^7.28.6": - version "7.28.6" - resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.28.6.tgz#fca903a313ae675617936e8998b814c415cbf5d7" - integrity sha512-xOBvwq86HHdB7WUDTfKfT/Vuxh7gElQ+Sfti2Cy6yIWNW05P8iUslOVcZ4/sKbE+/jQaukQAdz/gf3724kYdqw== +"@babel/helpers@^7.29.7": + version "7.29.7" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.29.7.tgz#45abfde7548997e34376c3e69feb475cffb4a607" + integrity sha512-1k2lAGRMfHTcwuNYcCNUmaUffmQv8KWMfh2iJUUeRlwlwH4FdNG7mfPI10NPfLHJFThE4Tyr4mv7kTNZOiPuBg== dependencies: - "@babel/template" "^7.28.6" - "@babel/types" "^7.28.6" + "@babel/template" "^7.29.7" + "@babel/types" "^7.29.7" -"@babel/parser@^7.1.0", "@babel/parser@^7.14.7", "@babel/parser@^7.20.7", "@babel/parser@^7.23.9", "@babel/parser@^7.28.6", "@babel/parser@^7.29.0": - version "7.29.0" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.29.0.tgz#669ef345add7d057e92b7ed15f0bac07611831b6" - integrity sha512-IyDgFV5GeDUVX4YdF/3CPULtVGSXXMLh1xVIgdCgxApktqnQV0r7/8Nqthg+8YLGaAtdyIlo2qIdZrbCv4+7ww== +"@babel/parser@^7.1.0", "@babel/parser@^7.14.7", "@babel/parser@^7.20.7", "@babel/parser@^7.23.9", "@babel/parser@^7.29.7": + version "7.29.7" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.29.7.tgz#837b87387cbf5ec5530cb634b3c622f68edb9334" + integrity sha512-hnORnjP/1P/zFEndoeX+n+t1RwWRJiJpM/jO7FW32Kn9r5+sJB2JWOdYo4L6k78j15eCwY3Gm/7364B1EMwtNg== dependencies: - "@babel/types" "^7.29.0" + "@babel/types" "^7.29.7" "@babel/plugin-syntax-async-generators@^7.8.4": version "7.8.4" @@ -145,11 +145,11 @@ "@babel/helper-plugin-utils" "^7.14.5" "@babel/plugin-syntax-import-attributes@^7.24.7": - version "7.28.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-import-attributes/-/plugin-syntax-import-attributes-7.28.6.tgz#b71d5914665f60124e133696f17cd7669062c503" - integrity sha512-jiLC0ma9XkQT3TKJ9uYvlakm66Pamywo+qwL+oL8HJOvc6TWdZXVfhqJr8CCzbSGUAbDOzlGHJC1U+vRfLQDvw== + version "7.29.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-import-attributes/-/plugin-syntax-import-attributes-7.29.7.tgz#6115264516e95ead0f35a41710906612e447f605" + integrity sha512-zGYcYfq/WmZ4V+kBIXQon9dSSc8ircGZqw9ZaNhhGj9nZkeBu1jHLBDQqYYi5WA9uawvA2sIMbry2nCFhf5Djg== dependencies: - "@babel/helper-plugin-utils" "^7.28.6" + "@babel/helper-plugin-utils" "^7.29.7" "@babel/plugin-syntax-import-meta@^7.10.4": version "7.10.4" @@ -166,11 +166,11 @@ "@babel/helper-plugin-utils" "^7.8.0" "@babel/plugin-syntax-jsx@^7.7.2": - version "7.28.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.28.6.tgz#f8ca28bbd84883b5fea0e447c635b81ba73997ee" - integrity sha512-wgEmr06G6sIpqr8YDwA2dSRTE3bJ+V0IfpzfSY3Lfgd7YWOaAdlykvJi13ZKBt8cZHfgH1IXN+CL656W3uUa4w== + version "7.29.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.29.7.tgz#622c16f9ad63782fe6e83dadc7e40330744b7f1e" + integrity sha512-TSu8+mHCoEaaCDEZ0I3+6mvTBYR4PCxQwf2z9/r5Tbztv6NaLR3B9thGTTxX2WGuGHJqRiAbKPeGTJ5XWXVg6A== dependencies: - "@babel/helper-plugin-utils" "^7.28.6" + "@babel/helper-plugin-utils" "^7.29.7" "@babel/plugin-syntax-logical-assignment-operators@^7.10.4": version "7.10.4" @@ -229,41 +229,41 @@ "@babel/helper-plugin-utils" "^7.14.5" "@babel/plugin-syntax-typescript@^7.7.2": - version "7.28.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.28.6.tgz#c7b2ddf1d0a811145b1de800d1abd146af92e3a2" - integrity sha512-+nDNmQye7nlnuuHDboPbGm00Vqg3oO8niRRL27/4LYHUsHYh0zJ1xWOz0uRwNFmM1Avzk8wZbc6rdiYhomzv/A== - dependencies: - "@babel/helper-plugin-utils" "^7.28.6" - -"@babel/template@^7.28.6", "@babel/template@^7.3.3": - version "7.28.6" - resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.28.6.tgz#0e7e56ecedb78aeef66ce7972b082fce76a23e57" - integrity sha512-YA6Ma2KsCdGb+WC6UpBVFJGXL58MDA6oyONbjyF/+5sBgxY/dwkhLogbMT2GXXyU84/IhRw/2D1Os1B/giz+BQ== - dependencies: - "@babel/code-frame" "^7.28.6" - "@babel/parser" "^7.28.6" - "@babel/types" "^7.28.6" - -"@babel/traverse@^7.28.6", "@babel/traverse@^7.29.0": - version "7.29.0" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.29.0.tgz#f323d05001440253eead3c9c858adbe00b90310a" - integrity sha512-4HPiQr0X7+waHfyXPZpWPfWL/J7dcN1mx9gL6WdQVMbPnF3+ZhSMs8tCxN7oHddJE9fhNE7+lxdnlyemKfJRuA== - dependencies: - "@babel/code-frame" "^7.29.0" - "@babel/generator" "^7.29.0" - "@babel/helper-globals" "^7.28.0" - "@babel/parser" "^7.29.0" - "@babel/template" "^7.28.6" - "@babel/types" "^7.29.0" + version "7.29.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.29.7.tgz#7c29388932313ed58413a0343048d75d92fb5b24" + integrity sha512-ngr+82Sh0xMz25TPCZi+nC2iTzjfCdWS2ONXTp/PtSCHCgaCNBpdMqgvJ2ccdLlClVZ7sisIgB914j/JFe+RZA== + dependencies: + "@babel/helper-plugin-utils" "^7.29.7" + +"@babel/template@^7.29.7", "@babel/template@^7.3.3": + version "7.29.7" + resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.29.7.tgz#4d9d4004f645cdd304de958c725162784ecac700" + integrity sha512-puq+Gf35oI24FeN11LkoUQFqv9uwNeWpxXZi/Ji3rRIoKAzKnxRaZ+Gkj0vKS9ZCiTESfng1N9LyOyXvo+m+Gg== + dependencies: + "@babel/code-frame" "^7.29.7" + "@babel/parser" "^7.29.7" + "@babel/types" "^7.29.7" + +"@babel/traverse@^7.29.7": + version "7.29.7" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.29.7.tgz#c47b07a41b95da0907d026b5dd894d98de7d2f2d" + integrity sha512-EhlfNQtZ+NK22w5BM61ciuiq1m58ed33Wr1Xan//ZRTy6hgjnwyCffRYwzsGXdASJSUJ1guZILsErh1eQcl+zw== + dependencies: + "@babel/code-frame" "^7.29.7" + "@babel/generator" "^7.29.7" + "@babel/helper-globals" "^7.29.7" + "@babel/parser" "^7.29.7" + "@babel/template" "^7.29.7" + "@babel/types" "^7.29.7" debug "^4.3.1" -"@babel/types@^7.0.0", "@babel/types@^7.20.7", "@babel/types@^7.28.6", "@babel/types@^7.29.0", "@babel/types@^7.3.3": - version "7.29.0" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.29.0.tgz#9f5b1e838c446e72cf3cd4b918152b8c605e37c7" - integrity sha512-LwdZHpScM4Qz8Xw2iKSzS+cfglZzJGvofQICy7W7v4caru4EaAmyUuO6BGrbyQ2mYV11W0U8j5mBhd14dd3B0A== +"@babel/types@^7.0.0", "@babel/types@^7.20.7", "@babel/types@^7.29.7", "@babel/types@^7.3.3": + version "7.29.7" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.29.7.tgz#8005e31d82712ee7adaef6e23c63b71a62770a92" + integrity sha512-4zBIxpPzowiZpusoFkyGVwakdRJUyuH5PxQ/PrqghfdFWWasvnCdPfQXHrenDai+gyLARulZjZowCOj6fjT4pA== dependencies: - "@babel/helper-string-parser" "^7.27.1" - "@babel/helper-validator-identifier" "^7.28.5" + "@babel/helper-string-parser" "^7.29.7" + "@babel/helper-validator-identifier" "^7.29.7" "@bcoe/v8-coverage@^0.2.3": version "0.2.3" @@ -387,9 +387,9 @@ resolve-from "^5.0.0" "@istanbuljs/schema@^0.1.2", "@istanbuljs/schema@^0.1.3": - version "0.1.3" - resolved "https://registry.yarnpkg.com/@istanbuljs/schema/-/schema-0.1.3.tgz#e45e384e4b8ec16bce2fd903af78450f6bf7ec98" - integrity sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA== + version "0.1.6" + resolved "https://registry.yarnpkg.com/@istanbuljs/schema/-/schema-0.1.6.tgz#8dc9afa2ac1506cb1a58f89940f1c124446c8df3" + integrity sha512-+Sg6GCR/wy1oSmQDFq4LQDAhm3ETKnorxN+y5nbLULOR3P0c14f2Wurzj3/xqPXtasLFfHd5iRFQ7AJt4KH2cw== "@jest/console@^29.7.0": version "29.7.0" @@ -675,9 +675,9 @@ "@sinonjs/commons" "^3.0.0" "@tootallnate/once@2": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@tootallnate/once/-/once-2.0.0.tgz#f544a148d3ab35801c1f633a7441fd87c2e484bf" - integrity sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A== + version "2.0.1" + resolved "https://registry.yarnpkg.com/@tootallnate/once/-/once-2.0.1.tgz#35adc6222e3662fa2222ce123b961476a746b9ea" + integrity sha512-HqmEUIGRJ5fSXchkVgR5F7qn48bDBzv0kWj/Kfu5e6uci4UlEeng4331LnBkWffb++Ei3FOVLxo8JJWMFBDMeQ== "@types/babel__core@^7.1.14": version "7.20.5" @@ -717,26 +717,10 @@ 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" - integrity sha512-MzMFlSLBqNF2gcHWO0G1vP/YQyfvrxZ0bF+u7mzUdZ1/xK4A4sru+nraZz5i3iEIk1l1uyicaDVTB4QbbEkAYg== - dependencies: - "@types/eslint" "*" - "@types/estree" "*" - -"@types/eslint@*": - version "9.6.1" - resolved "https://registry.yarnpkg.com/@types/eslint/-/eslint-9.6.1.tgz#d5795ad732ce81715f27f75da913004a56751584" - integrity sha512-FXx2pKgId/WyYo2jXw63kk7/+TY7u7AziEJxJAnSFzHlqTAS3Ync6SvgYAN/k4/PQpnnVuzoMuVnByKK2qp0ag== - dependencies: - "@types/estree" "*" - "@types/json-schema" "*" - -"@types/estree@*", "@types/estree@^1.0.8": - version "1.0.8" - resolved "https://registry.yarnpkg.com/@types/estree/-/estree-1.0.8.tgz#958b91c991b1867ced318bedea0e215ee050726e" - integrity sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w== +"@types/estree@^1.0.8": + version "1.0.9" + resolved "https://registry.yarnpkg.com/@types/estree/-/estree-1.0.9.tgz#cf3f0e876d7bee15a93ab925b82bf570a3904a24" + integrity sha512-GhdPgy1el4/ImP05X05Uw4cw2/M93BCUmnEvWZNStlCzEKME4Fkk+YpoA5OiHNQmoS7Cafb8Xa3Pya8m1Qrzeg== "@types/graceful-fs@^4.1.3": version "4.1.9" @@ -781,7 +765,7 @@ "@types/tough-cookie" "*" parse5 "^7.0.0" -"@types/json-schema@*", "@types/json-schema@^7.0.15", "@types/json-schema@^7.0.9": +"@types/json-schema@^7.0.15", "@types/json-schema@^7.0.9": version "7.0.15" resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.15.tgz#596a1747233694d50f6ad8a7869fcb6f56cf5841" integrity sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA== @@ -795,11 +779,11 @@ form-data "^4.0.4" "@types/node@*": - version "25.5.0" - resolved "https://registry.yarnpkg.com/@types/node/-/node-25.5.0.tgz#5c99f37c443d9ccc4985866913f1ed364217da31" - integrity sha512-jp2P3tQMSxWugkCUKLRPVUpGaL5MVFwF8RDuSRztfwgN1wmqJeMSbKlnEtQqU8UrhTmzEmZdu2I6v2dpp7XIxw== + version "25.9.1" + resolved "https://registry.yarnpkg.com/@types/node/-/node-25.9.1.tgz#3bda556db500ae4319c08e7fc9ab94f19013ba0b" + integrity sha512-xfrlY7UD5rMJk3ZVJP8BNzS28J36YJg+xp+LPXV1TdWxr8uMH5A860QNxYDGQe/ylDSgjxE52Q9VnO7p75tJxg== dependencies: - undici-types "~7.18.0" + undici-types ">=7.24.0 <7.24.7" "@types/node@^18.19.70": version "18.19.130" @@ -1032,9 +1016,9 @@ ajv-keywords@^5.1.0: fast-deep-equal "^3.1.3" ajv@^8.0.0, ajv@^8.9.0: - version "8.18.0" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-8.18.0.tgz#8864186b6738d003eb3a933172bb3833e10cefbc" - integrity sha512-PlXPeEWMXMZ7sPYOHqmDyCJzcfNrUr3fGNKtezX14ykXOEIvyK81d+qydx89KY5O71FKMPaQ2vBfBFI5NHR63A== + version "8.20.0" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-8.20.0.tgz#304b3636add88ba7d936760dd50ece006dea95f9" + integrity sha512-Thbli+OlOj+iMPYFBVBfJ3OmCAnaSyNn4M1vz9T6Gka5Jt9ba/HIR56joy65tY6kx/FCF5VXNB819Y7/GUrBGA== dependencies: fast-deep-equal "^3.1.3" fast-uri "^3.0.1" @@ -1174,25 +1158,25 @@ 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.9.0: - version "2.10.7" - resolved "https://registry.yarnpkg.com/baseline-browser-mapping/-/baseline-browser-mapping-2.10.7.tgz#2c017adffe4f7bbe93c2e55526cc1869d36f588c" - integrity sha512-1ghYO3HnxGec0TCGBXiDLVns4eCSx4zJpxnHrlqFQajmhfKMQBzUGDdkMK7fUW7PTHTeLf+j87aTuKuuwWzMGw== +baseline-browser-mapping@^2.10.12: + version "2.10.32" + resolved "https://registry.yarnpkg.com/baseline-browser-mapping/-/baseline-browser-mapping-2.10.32.tgz#b6b553a4285fdd606327a617de36a5351e3aaa64" + integrity sha512-wbPvpyjJPC0zdfdKXxqEL3Ea+bOMD/87X4lftiJkkaBiuG6ALQy1SLmEd7BSmVCuwCQsBrCamgBoLyfFDD1EPg== bn.js@^4.0.0, bn.js@^4.1.0, bn.js@^4.11.9: version "4.12.3" resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.12.3.tgz#2cc2c679188eb35b006f2d0d4710bed8437a769e" integrity sha512-fGTi3gxV/23FTYdAoUtLYp6qySe2KE3teyZitipKNRuVYcBkoP/bB3guXN/XVKUe9mxCHXnc9C4ocyz8OmgN0g== -bn.js@^5.2.1, bn.js@^5.2.2: +bn.js@^5.2.1, bn.js@^5.2.3: version "5.2.3" resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-5.2.3.tgz#16a9e409616b23fef3ccbedb8d42f13bff80295e" integrity sha512-EAcmnPkxpntVL+DS7bO1zhcZNvCkxqtkd0ZY53h06GNQ3DEkkGZ/gKgmDv6DdZQGj9BgfSPKtJJ7Dp1GPP8f7w== brace-expansion@^1.1.7: - version "1.1.12" - resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.12.tgz#ab9b454466e5a8cc3a187beaad580412a9c5b843" - integrity sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg== + version "1.1.15" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.15.tgz#a6d90d54067236e5f42570a3b7378d594d9b7738" + integrity sha512-EwOCDEex4quD37XhqM3omwtMoJjr//isUZz1JopUNWms+4Z2ViyM/k1YIRePpoVNnQhENnxtFjLaxNHrT7xIUg== dependencies: balanced-match "^1.0.0" concat-map "0.0.1" @@ -1250,11 +1234,11 @@ browserify-rsa@^4.0.0, browserify-rsa@^4.1.1: safe-buffer "^5.2.1" browserify-sign@^4.2.3: - version "4.2.5" - resolved "https://registry.yarnpkg.com/browserify-sign/-/browserify-sign-4.2.5.tgz#3979269fa8af55ba18aac35deef11b45515cd27d" - integrity sha512-C2AUdAJg6rlM2W5QMp2Q4KGQMVBwR1lIimTsUnutJ8bMpW5B52pGpR2gEnNBNwijumDo5FojQ0L9JrXA8m4YEw== + version "4.2.6" + resolved "https://registry.yarnpkg.com/browserify-sign/-/browserify-sign-4.2.6.tgz#a8c9fd9a701a3600c7fea3a82c14ab82cad6f451" + integrity sha512-sd+Q65fjlWCYWtZKXiKfrUc8d+4jtp/8f0W2NkwzLtoW4bI6UDnWusLWIurHnmurW0XShIRxpwiOX4EoPtXUAg== dependencies: - bn.js "^5.2.2" + bn.js "^5.2.3" browserify-rsa "^4.1.1" create-hash "^1.2.0" create-hmac "^1.1.7" @@ -1265,15 +1249,15 @@ browserify-sign@^4.2.3: safe-buffer "^5.2.1" browserslist@^4.24.0, browserslist@^4.28.1: - version "4.28.1" - resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.28.1.tgz#7f534594628c53c63101079e27e40de490456a95" - integrity sha512-ZC5Bd0LgJXgwGqUknZY/vkUQ04r8NXnJZ3yYi4vDmSiZmC/pdSN0NbNRPxZpbtO4uAfDUAFffO8IZoM3Gj8IkA== + version "4.28.2" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.28.2.tgz#f50b65362ef48974ca9f50b3680566d786b811d2" + integrity sha512-48xSriZYYg+8qXna9kwqjIVzuQxi+KYWp2+5nCYnYKPTr0LvD89Jqk2Or5ogxz0NUMfIjhh2lIUX/LyX9B4oIg== dependencies: - baseline-browser-mapping "^2.9.0" - caniuse-lite "^1.0.30001759" - electron-to-chromium "^1.5.263" - node-releases "^2.0.27" - update-browserslist-db "^1.2.0" + baseline-browser-mapping "^2.10.12" + caniuse-lite "^1.0.30001782" + electron-to-chromium "^1.5.328" + node-releases "^2.0.36" + update-browserslist-db "^1.2.3" bs-logger@^0.2.6: version "0.2.6" @@ -1307,7 +1291,7 @@ buffer@^6.0.3: base64-js "^1.3.1" ieee754 "^1.2.1" -call-bind-apply-helpers@^1.0.0, call-bind-apply-helpers@^1.0.1, call-bind-apply-helpers@^1.0.2: +call-bind-apply-helpers@^1.0.1, call-bind-apply-helpers@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz#4b5428c222be985d79c3d82657479dbe0b59b2d6" integrity sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ== @@ -1315,14 +1299,14 @@ call-bind-apply-helpers@^1.0.0, call-bind-apply-helpers@^1.0.1, call-bind-apply- es-errors "^1.3.0" function-bind "^1.1.2" -call-bind@^1.0.8: - version "1.0.8" - resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.8.tgz#0736a9660f537e3388826f440d5ec45f744eaa4c" - integrity sha512-oKlSFMcMwpUg2ednkhQ454wfWiU/ul3CkJe/PEHcTKuiX6RpbehUiFMXu13HalGZxfUwCQzZG747YXBn1im9ww== +call-bind@^1.0.9: + version "1.0.9" + resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.9.tgz#39a644700c80bc7d0ca9102fc6d1d43b2fd7eee7" + integrity sha512-a/hy+pNsFUTR+Iz8TCJvXudKVLAnz/DyeSUo10I5yvFDQJBFU2s9uqQpoSrJlroHUKoKqzg+epxyP9lqFdzfBQ== dependencies: - call-bind-apply-helpers "^1.0.0" - es-define-property "^1.0.0" - get-intrinsic "^1.2.4" + call-bind-apply-helpers "^1.0.2" + es-define-property "^1.0.1" + get-intrinsic "^1.3.0" set-function-length "^1.2.2" call-bound@^1.0.3, call-bound@^1.0.4: @@ -1348,10 +1332,10 @@ camelcase@^6.2.0: resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.3.0.tgz#5685b95eb209ac9c0c177467778c9c84df58ba9a" integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA== -caniuse-lite@^1.0.30001759: - version "1.0.30001778" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001778.tgz#79a8a124e3473a20b70616497b987c30d06570a0" - integrity sha512-PN7uxFL+ExFJO61aVmP1aIEG4i9whQd4eoSCebav62UwDyp5OHh06zN4jqKSMePVgxHifCw1QJxdRkA1Pisekg== +caniuse-lite@^1.0.30001782: + version "1.0.30001793" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001793.tgz#238887ddf5fcfc8c36d872394d0a78a517312a72" + integrity sha512-iwSsYWaCOoh26cV8NwNRViHlrfUvYsHDfRVcbtmw0Kg6PJIZZXwMkj1442FYLBGkeUf1juAsU3DTfxW579mrPA== chalk@^4.0.0, chalk@^4.1.0: version "4.1.2" @@ -1641,10 +1625,10 @@ dunder-proto@^1.0.1: es-errors "^1.3.0" gopd "^1.2.0" -electron-to-chromium@^1.5.263: - version "1.5.313" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.5.313.tgz#193e9ae2c2ab6915acb41e833068381e4ef0b3e4" - integrity sha512-QBMrTWEf00GXZmJyx2lbYD45jpI3TUFnNIzJ5BBc8piGUDwMPa1GV6HJWTZVvY/eiN3fSopl7NRbgGp9sZ9LTA== +electron-to-chromium@^1.5.328: + version "1.5.362" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.5.362.tgz#0696661e1e8ea46248e82f62f0a0bfe1aac2ce76" + integrity sha512-PUY2DrLvkjkUuWqq+KPL2iWshrJsZOcIojzRQ7eXFacc9dWga7MGMJAa15VbiejSZB1PAXaRLAiKgruHP8LB1w== elliptic@^6.5.3, elliptic@^6.6.1: version "6.6.1" @@ -1669,13 +1653,13 @@ emoji-regex@^8.0.0: resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37" integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== -enhanced-resolve@^5.0.0, enhanced-resolve@^5.20.0: - version "5.20.0" - resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.20.0.tgz#323c2a70d2aa7fb4bdfd6d3c24dfc705c581295d" - integrity sha512-/ce7+jQ1PQ6rVXwe+jKEg5hW5ciicHwIQUagZkp6IufBoY3YDgdTTY1azVs0qoRgVmvsNB+rbjLJxDAeHHtwsQ== +enhanced-resolve@^5.0.0, enhanced-resolve@^5.22.0: + version "5.22.0" + resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.22.0.tgz#43c5caad657c6fce58fc6142e5ca6fa8528ed460" + integrity sha512-xYcDWrpELkFzz9SpZ3PlI6Eu6eD93Yf0WLDRxikGhWJ3MAir2SNZTIVCVZqZ/NUyx8AdMc2gT9C0gPiw18kG+A== dependencies: graceful-fs "^4.2.4" - tapable "^2.3.0" + tapable "^2.3.3" entities@^6.0.0: version "6.0.1" @@ -1699,15 +1683,15 @@ es-errors@^1.3.0: resolved "https://registry.yarnpkg.com/es-errors/-/es-errors-1.3.0.tgz#05f75a25dab98e4fb1dcd5e1472c0546d5057c8f" integrity sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw== -es-module-lexer@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/es-module-lexer/-/es-module-lexer-2.0.0.tgz#f657cd7a9448dcdda9c070a3cb75e5dc1e85f5b1" - integrity sha512-5POEcUuZybH7IdmGsD8wlf0AI55wMecM9rVBTI/qEAy2c1kTOm3DjFYjrBdI2K3BaJjJYfYFeRtM0t9ssnRuxw== +es-module-lexer@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/es-module-lexer/-/es-module-lexer-2.1.0.tgz#1dfcbb5ea3bbfb63f28e1fc3676c3676d1c9624c" + integrity sha512-n27zTYMjYu1aj4MjCWzSP7G9r75utsaoc8m61weK+W8JMBGGQybd43GstCXZ3WNmSFtGT9wi59qQTW6mhTR5LQ== es-object-atoms@^1.0.0, es-object-atoms@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/es-object-atoms/-/es-object-atoms-1.1.1.tgz#1c4f2c4837327597ce69d2ca190a7fdd172338c1" - integrity sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA== + version "1.1.2" + resolved "https://registry.yarnpkg.com/es-object-atoms/-/es-object-atoms-1.1.2.tgz#a2d0b373205724dfa525d23b0c3e1b1ca582c99b" + integrity sha512-HWcBoN6NileqtSydK2FqHbS/LoDd2pqrnQHLyJzBj4kOp/ky2MWMN694xOfkK8/SnUsW2DH7EfyVlydKCsm1Zw== dependencies: es-errors "^1.3.0" @@ -1837,9 +1821,9 @@ fast-json-stable-stringify@2.x, fast-json-stable-stringify@^2.1.0: integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== fast-uri@^3.0.1: - version "3.1.0" - resolved "https://registry.yarnpkg.com/fast-uri/-/fast-uri-3.1.0.tgz#66eecff6c764c0df9b762e62ca7edcfb53b4edfa" - integrity sha512-iPeeDKJSWf4IEOasVVrknXpaBV0IApz/gp7S2bb7Z4Lljbl2MGJRqInZiUrQwV16cpzw/D3S5j5Julj/gT52AA== + version "3.1.2" + resolved "https://registry.yarnpkg.com/fast-uri/-/fast-uri-3.1.2.tgz#8af3d4fc9d3e71b11572cc2673b514a7d1a8c8ec" + integrity sha512-rVjf7ArG3LTk+FS6Yw81V1DLuZl1bRbNrev6Tmd/9RaroeeRRJhAt7jg/6YFxbvAQXUCavSoZhPPj6oOx+5KjQ== fb-watchman@^2.0.0: version "2.0.2" @@ -1973,11 +1957,11 @@ graceful-fs@^4.1.2, graceful-fs@^4.2.11, graceful-fs@^4.2.4, graceful-fs@^4.2.9: integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ== graphql@^16.8.1: - version "16.13.1" - resolved "https://registry.yarnpkg.com/graphql/-/graphql-16.13.1.tgz#38ae5c76fbc4a009e0004dca6c76c370a1da7b54" - integrity sha512-gGgrVCoDKlIZ8fIqXBBb0pPKqDgki0Z/FSKNiQzSGj2uEYHr1tq5wmBegGwJx6QB5S5cM0khSBpi/JFHMCvsmQ== + version "16.14.0" + resolved "https://registry.yarnpkg.com/graphql/-/graphql-16.14.0.tgz#f1128a74b16a34d1245c8436bb07b488d87b83e1" + integrity sha512-BBvQ/406p+4CZbTpCbVPSxfzrZrbnuWSP1ELYgyS6B+hNeKzgrdB4JczCa5VZUBQrDa9hUngm0KnexY6pJRN5Q== -handlebars@^4.7.8: +handlebars@^4.7.9: version "4.7.9" resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.7.9.tgz#6f139082ab58dc4e5a0e51efe7db5ae890d56a0f" integrity sha512-4E71E0rpOaQuJR2A3xDZ+GM1HyWYv1clR58tC8emQNeQe3RH7MAzSbat+V0wG78LQBo6m6bzSG/L4pBuCsgnUQ== @@ -2039,10 +2023,10 @@ hash.js@^1.0.0, hash.js@^1.0.3: inherits "^2.0.3" minimalistic-assert "^1.0.1" -hasown@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/hasown/-/hasown-2.0.2.tgz#003eaf91be7adc372e84ec59dc37252cedb80003" - integrity sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ== +hasown@^2.0.2, hasown@^2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/hasown/-/hasown-2.0.3.tgz#5e5c2b15b60370a4c7930c383dfb76bf17bc403c" + integrity sha512-ej4AhfhfL2Q2zpMmLo7U1Uv9+PyhIZpgQLGT1F9miIGmiCJIoCgSmczFdrc97mWT4kVY72KA+WnnhJ5pghSvSg== dependencies: function-bind "^1.1.2" @@ -2143,11 +2127,11 @@ is-callable@^1.2.7: integrity sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA== is-core-module@^2.16.1: - version "2.16.1" - resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.16.1.tgz#2a98801a849f43e2add644fbb6bc6229b19a4ef4" - integrity sha512-UfoeMA6fIJ8wTYFEUjelnaGI67v6+N7qXJEvQuIGa99l4xsCruSYOVSQ0uPANn4dAzm8lkYPaKLrrijLq7x23w== + version "2.16.2" + resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.16.2.tgz#3e07450a8080ebce3fbf0cac494f4d2ab324e082" + integrity sha512-evOr8xfXKxE6qSR0hSXL2r3sd7ALj8+7jQEUvPYcm5sgZFdJ+AYzT6yNmJenvIYQBgIGwfwz08sL8zoL7yq2BA== dependencies: - hasown "^2.0.2" + hasown "^2.0.3" is-fullwidth-code-point@^3.0.0: version "3.0.0" @@ -2693,7 +2677,7 @@ jsesc@^3.0.2: resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-3.1.0.tgz#74d335a234f67ed19907fdadfac7ccf9d409825d" integrity sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA== -json-parse-even-better-errors@^2.3.0, json-parse-even-better-errors@^2.3.1: +json-parse-even-better-errors@^2.3.0: version "2.3.1" resolved "https://registry.yarnpkg.com/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz#7c47805a94319928e05777405dc12e1f7a4ee02d" integrity sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w== @@ -2723,10 +2707,10 @@ 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.3.1: - version "4.3.1" - resolved "https://registry.yarnpkg.com/loader-runner/-/loader-runner-4.3.1.tgz#6c76ed29b0ccce9af379208299f07f876de737e3" - integrity sha512-IWqP2SCPhyVFTBtRcgMHdzlf9ul25NwaFx4wCEH/KjAXuuHY4yNjvPXsBokp8jCB936PyWRaPKUNh8NvylLp2Q== +loader-runner@^4.3.2: + version "4.3.2" + resolved "https://registry.yarnpkg.com/loader-runner/-/loader-runner-4.3.2.tgz#9913d3a15971f8f635915e601fb5c9d495d918e9" + integrity sha512-DFEqQ3ihfS9blba08cLfYf1NRAIEm+dDjic073DRDc3/JspI/8wYmtDsHwd3+4hwvdxSK7PGaElfTmm0awWJ4w== locate-path@^5.0.0: version "5.0.0" @@ -2806,7 +2790,12 @@ mime-db@1.52.0: resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.52.0.tgz#bbabcdc02859f4987301c856e3387ce5ec43bf70" integrity sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg== -mime-types@^2.1.12, mime-types@^2.1.27: +mime-db@^1.54.0: + version "1.54.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.54.0.tgz#cddb3ee4f9c64530dff640236661d42cb6a314f5" + integrity sha512-aU5EJuIN2WDemCcAp2vFBfp/m4EAhWJnUNSSw0ixs7/kXbd6Pg64EmwJkNdFhB8aWt1sH2CTXrLxo/iAGV3oPQ== + +mime-types@^2.1.12: version "2.1.35" resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.35.tgz#381a871b62a734450660ae3deee44813f70d959a" integrity sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw== @@ -2897,10 +2886,10 @@ 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.27: - version "2.0.36" - resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.36.tgz#99fd6552aaeda9e17c4713b57a63964a2e325e9d" - integrity sha512-TdC8FSgHz8Mwtw9g5L4gR/Sh9XhSP/0DEkQxfEFXOpiul5IiHgHan2VhYYb6agDSfp4KuvltmGApc8HMgUrIkA== +node-releases@^2.0.36: + version "2.0.46" + resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.46.tgz#d188a129a83f5e03a101aacb58f260f2ee8faaa1" + integrity sha512-GYVXHE2KnrzAfsAjl4uP++evGFCrAU1jta4ubEjIG7YWt/64Gqv66a30yKwWczVjA6j3bM4nBwH7Pk1JmDHaxQ== normalize-path@^3.0.0: version "3.0.0" @@ -3018,16 +3007,16 @@ path-to-regexp@^6.3.0: integrity sha512-Yhpw4T9C6hPpgPeA28us07OJeqZ5EzQTkbfwuhsUg0c237RomFoETJgmp2sa3F/41gfLE6G5cqcYwznmeEeOlQ== pbkdf2@^3.1.2, pbkdf2@^3.1.3, pbkdf2@^3.1.5: - version "3.1.5" - resolved "https://registry.yarnpkg.com/pbkdf2/-/pbkdf2-3.1.5.tgz#444a59d7a259a95536c56e80c89de31cc01ed366" - integrity sha512-Q3CG/cYvCO1ye4QKkuH7EXxs3VC/rI1/trd+qX2+PolbaKG0H+bgcZzrTt96mMyRtejk+JMCiLUn3y29W8qmFQ== + version "3.1.6" + resolved "https://registry.yarnpkg.com/pbkdf2/-/pbkdf2-3.1.6.tgz#935cb1d99e491880cb48cb070bb539a6901e57d6" + integrity sha512-BT6eelPB1EyGHo8pC0o9Bl6k6SYVhKO1jEbd3lcTrtr7XHdjP8BW1YpfCV3G9Kwkxgattk+S5q2/RvuttCsS1g== dependencies: create-hash "^1.2.0" create-hmac "^1.1.7" ripemd160 "^2.0.3" safe-buffer "^5.2.1" sha.js "^2.4.12" - to-buffer "^1.2.1" + to-buffer "^1.2.2" picocolors@^1.1.1: version "1.1.1" @@ -3035,9 +3024,9 @@ picocolors@^1.1.1: integrity sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA== picomatch@^2.0.4, picomatch@^2.2.3, picomatch@^2.3.1: - version "2.3.1" - resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42" - integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== + version "2.3.2" + resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.2.tgz#5a942915e26b372dc0f0e6753149a16e6b1c5601" + integrity sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA== pirates@^4.0.4: version "4.0.7" @@ -3199,10 +3188,11 @@ resolve.exports@^2.0.0: integrity sha512-OcXjMsGdhL4XnbShKpAcSqPMzQoYkYyhbEaeSko47MjRP9NfEQMhZkXL1DoFlt9LWQn4YttrdnV6X2OiyzBi+A== resolve@^1.20.0: - version "1.22.11" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.11.tgz#aad857ce1ffb8bfa9b0b1ac29f1156383f68c262" - integrity sha512-RfqAvLnMl313r7c9oclB1HhUEAezcpLjz95wFH4LVuhk9JF/r22qmVP9AMmOU4vMX7Q8pN8jwNg/CSpdFnMjTQ== + version "1.22.12" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.12.tgz#f5b2a680897c69c238a13cd16b15671f8b73549f" + integrity sha512-TyeJ1zif53BPfHootBGwPRYT1RUt6oGWsaQr8UyZW/eAm9bKoijtvruSDEmZHm92CwS9nj7/fWttqPCgzep8CA== dependencies: + es-errors "^1.3.0" is-core-module "^2.16.1" path-parse "^1.0.7" supports-preserve-symlinks-flag "^1.0.0" @@ -3257,10 +3247,10 @@ semver@^6.3.0, semver@^6.3.1: resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.1.tgz#556d2ef8689146e46dcea4bfdd095f3434dffcb4" integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA== -semver@^7.3.4, semver@^7.5.3, semver@^7.5.4, semver@^7.7.3: - version "7.7.4" - resolved "https://registry.yarnpkg.com/semver/-/semver-7.7.4.tgz#28464e36060e991fa7a11d0279d2d3f3b57a7e8a" - integrity sha512-vFKC2IEtQnVhpT78h1Yp8wzwrf8CM+MzKMHGJZfBtzhZNycRFnXsHk6E5TxIkkMsgNS7mdX3AGB7x2QM2di4lA== +semver@^7.3.4, semver@^7.5.3, semver@^7.5.4, semver@^7.8.0: + version "7.8.1" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.8.1.tgz#bf4970b5e70fda0686363cc18bfe8805d5ed957e" + integrity sha512-rkVq3IXh+4FDGch+KwzX3aV9W3kO54GyEgpvBzSyctDA6Xtd7RJQV1xmXbeQp5v7+VzLOfVqiutSE6GICgPFvg== set-function-length@^1.2.2: version "1.2.2" @@ -3440,15 +3430,15 @@ 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== -tapable@^2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/tapable/-/tapable-2.3.0.tgz#7e3ea6d5ca31ba8e078b560f0d83ce9a14aa8be6" - integrity sha512-g9ljZiwki/LfxmQADO3dEY1CbpmXT5Hm2fJ+QaGKwSXUylMybePR7/67YW7jOrrvjEgL1Fmz5kzyAjWVWLlucg== +tapable@^2.3.0, tapable@^2.3.3: + version "2.3.3" + resolved "https://registry.yarnpkg.com/tapable/-/tapable-2.3.3.tgz#5da7c9992c46038221267985ab28421a8879f160" + integrity sha512-uxc/zpqFg6x7C8vOE7lh6Lbda8eEL9zmVm/PLeTPBRhh1xCgdWaQ+J1CUieGpIfm2HdtsUpRv+HshiasBMcc6A== -terser-webpack-plugin@^5.3.17: - version "5.4.0" - resolved "https://registry.yarnpkg.com/terser-webpack-plugin/-/terser-webpack-plugin-5.4.0.tgz#95fc4cf4437e587be11ecf37d08636089174d76b" - integrity sha512-Bn5vxm48flOIfkdl5CaD2+1CiUVbonWQ3KQPyP7/EuIl9Gbzq/gQFOzaMFUEgVjB1396tcK0SG8XcNJ/2kDH8g== +terser-webpack-plugin@^5.5.0: + version "5.6.0" + resolved "https://registry.yarnpkg.com/terser-webpack-plugin/-/terser-webpack-plugin-5.6.0.tgz#8e7caad248183ab9e91ff08a83b0fc9f0439c3c3" + integrity sha512-Eum+5ajkaOhf5KbM26osvv21kLD7BaGqQ1UA4Ami4arYwylmGUQTgHFpHDdmJod1q4QXa66p0to/FBKID+J1vA== dependencies: "@jridgewell/trace-mapping" "^0.3.25" jest-worker "^27.4.5" @@ -3456,9 +3446,9 @@ terser-webpack-plugin@^5.3.17: terser "^5.31.1" terser@^5.31.1: - version "5.46.0" - resolved "https://registry.yarnpkg.com/terser/-/terser-5.46.0.tgz#1b81e560d584bbdd74a8ede87b4d9477b0ff9695" - integrity sha512-jTwoImyr/QbOWFFso3YoU3ik0jBBDJ6JTOQiy/J2YxVJdZCc+5u7skhNwiOR3FQIygFqVUPHl7qbbxtjW2K3Qg== + version "5.48.0" + resolved "https://registry.yarnpkg.com/terser/-/terser-5.48.0.tgz#8b391171cfbb7ac4a88f9f04ba1cfabc54f643db" + integrity sha512-J/9An6vs9Us6wKRriSFXBWdRZapREHqFzdNUKk0pmu804EMR6dr6winwo7e5JDxN4xahxQsuysyYFwlwj4XN/Q== dependencies: "@jridgewell/source-map" "^0.3.3" acorn "^8.15.0" @@ -3474,17 +3464,17 @@ test-exclude@^6.0.0: glob "^7.1.4" minimatch "^3.0.4" -tldts-core@^7.0.25: - version "7.0.25" - resolved "https://registry.yarnpkg.com/tldts-core/-/tldts-core-7.0.25.tgz#eaee57facdfb5528383d961f5586d49784519de5" - integrity sha512-ZjCZK0rppSBu7rjHYDYsEaMOIbbT+nWF57hKkv4IUmZWBNrBWBOjIElc0mKRgLM8bm7x/BBlof6t2gi/Oq/Asw== +tldts-core@^7.4.0: + version "7.4.0" + resolved "https://registry.yarnpkg.com/tldts-core/-/tldts-core-7.4.0.tgz#a169874d111f2b56f8bcaba1971de312feb586b8" + integrity sha512-/mb9kRld+x1sIMXxWNOAp5m6C+D4GrAORWlJkOJ5dElvxdN1eutz/o7qHLp9gFvDF4Y3/L2xeScoxz6AbEo8rQ== tldts@^7.0.5: - version "7.0.25" - resolved "https://registry.yarnpkg.com/tldts/-/tldts-7.0.25.tgz#e9034876e09b2ad92db547a9307ae6fa65400f8d" - integrity sha512-keinCnPbwXEUG3ilrWQZU+CqcTTzHq9m2HhoUP2l7Xmi8l1LuijAXLpAJ5zRW+ifKTNscs4NdCkfkDCBYm352w== + version "7.4.0" + resolved "https://registry.yarnpkg.com/tldts/-/tldts-7.4.0.tgz#b9debfc700271b6979217a1452da0cc69ca6e6ff" + integrity sha512-yHBe+zVfzNZ3QfTPW/Z6KK1G2t340gFjMHqI/4KKSt/abzYydzuCnpqdaF5gCCABby+9Yfbj59oR5F2Fd5CBzg== dependencies: - tldts-core "^7.0.25" + tldts-core "^7.4.0" tmpl@1.0.5: version "1.0.5" @@ -3518,9 +3508,9 @@ tough-cookie@^4.1.2: url-parse "^1.5.3" tough-cookie@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-6.0.0.tgz#11e418b7864a2c0d874702bc8ce0f011261940e5" - integrity sha512-kXuRi1mtaKMrsLUxz3sQYvVl37B0Ns6MzfrtV5DvJceE9bPyspOqk9xxv7XbZWcfLWbFmm997vl83qUWVJA64w== + version "6.0.1" + resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-6.0.1.tgz#a495f833836609ed983c19bc65639cfbceb54c76" + integrity sha512-LktZQb3IeoUWB9lqR5EWTHgW/VTITCXg4D21M+lvybRVdylLrRMnqaIONLVb5mav8vM19m44HIcGq4qASeu2Qw== dependencies: tldts "^7.0.5" @@ -3537,24 +3527,24 @@ tr46@~0.0.3: integrity sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw== ts-jest@^29.3.4: - version "29.4.6" - resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-29.4.6.tgz#51cb7c133f227396818b71297ad7409bb77106e9" - integrity sha512-fSpWtOO/1AjSNQguk43hb/JCo16oJDnMJf3CdEGNkqsEX3t0KX96xvyX1D7PfLCpVoKu4MfVrqUkFyblYoY4lA== + version "29.4.11" + resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-29.4.11.tgz#42f5de21c37ccc01a580253afae6955abbf4d0b3" + integrity sha512-IrFl7l9AuB/qrNw5quqvAv/hmKMb8dhWOH4jQOGo0Oq8tCeo1O86/iTFG1FaRimgUkF13l4PcepO8ATFT6Ns4g== dependencies: bs-logger "^0.2.6" fast-json-stable-stringify "^2.1.0" - handlebars "^4.7.8" + handlebars "^4.7.9" json5 "^2.2.3" lodash.memoize "^4.1.2" make-error "^1.3.6" - semver "^7.7.3" + semver "^7.8.0" type-fest "^4.41.0" yargs-parser "^21.1.1" ts-loader@^9.5.1: - version "9.5.4" - resolved "https://registry.yarnpkg.com/ts-loader/-/ts-loader-9.5.4.tgz#44b571165c10fb5a90744aa5b7e119233c4f4585" - integrity sha512-nCz0rEwunlTZiy6rXFByQU1kVVpCIgUpc/psFiKVrUwrizdnIbRFu8w7bxhUF0X613DYwT4XzrZHpVyMe758hQ== + version "9.5.7" + resolved "https://registry.yarnpkg.com/ts-loader/-/ts-loader-9.5.7.tgz#582663e853646e18506cd5cc79feb354952731c0" + integrity sha512-/ZNrKgA3K3PtpMYOC71EeMWIloGw3IYEa5/t1cyz2r5/PyUwTXGzYJvcD3kfUvmhlfpz1rhV8B2O6IVTQ0avsg== dependencies: chalk "^4.1.0" enhanced-resolve "^5.0.0" @@ -3596,22 +3586,22 @@ uglify-js@^3.1.4: resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.19.3.tgz#82315e9bbc6f2b25888858acd1fff8441035b77f" integrity sha512-v3Xu+yuwBXisp6QYTcH4UbH+xYJXqnq2m/LtQVWKWzYc1iehYnLixoQDN9FH6/j9/oybfd6W9Ghwkl8+UMKTKQ== +"undici-types@>=7.24.0 <7.24.7": + version "7.24.6" + resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-7.24.6.tgz#61275b485d7fd4e9d269c7cf04ec2873c9cc0f91" + integrity sha512-WRNW+sJgj5OBN4/0JpHFqtqzhpbnV0GuB+OozA9gCL7a993SmU+1JBZCzLNxYsbMfIeDL+lTsphD5jN5N+n0zg== + undici-types@~5.26.4: version "5.26.5" resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-5.26.5.tgz#bcd539893d00b56e964fd2657a4866b221a65617" integrity sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA== -undici-types@~7.18.0: - version "7.18.2" - resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-7.18.2.tgz#29357a89e7b7ca4aef3bf0fd3fd0cd73884229e9" - integrity sha512-AsuCzffGHJybSaRrmr5eHr81mwJU3kjw6M+uprWvCXiNeN9SOGwQ3Jn8jb8m3Z6izVgknn1R0FTCEAP2QrLY/w== - universalify@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.2.0.tgz#6451760566fa857534745ab1dde952d1b1761be0" integrity sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg== -update-browserslist-db@^1.2.0: +update-browserslist-db@^1.2.3: version "1.2.3" resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.2.3.tgz#64d76db58713136acbeb4c49114366cc6cc2e80d" integrity sha512-Js0m9cx+qOgDxo0eMiFGEueWztz+d4+M3rGlmKPT+T4IS/jP4ylw3Nwpu6cpTTP8R1MAC1kF4VbdLt3ARf209w== @@ -3673,17 +3663,16 @@ webidl-conversions@^7.0.0: resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-7.0.0.tgz#256b4e1882be7debbf01d05f0aa2039778ea080a" integrity sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g== -webpack-sources@^3.3.4: - version "3.3.4" - resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-3.3.4.tgz#a338b95eb484ecc75fbb196cbe8a2890618b4891" - integrity sha512-7tP1PdV4vF+lYPnkMR0jMY5/la2ub5Fc/8VQrrU+lXkiM6C4TjVfGw7iKfyhnTQOsD+6Q/iKw0eFciziRgD58Q== +webpack-sources@^3.5.0: + version "3.5.0" + resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-3.5.0.tgz#87bf7f5801a4e985b1f1c92b64b9620a02f76d08" + integrity sha512-HPuy+uuoTCaaoEoI1LQ3JN9+vrPBvEesnnX1jADHy728cHSMlq4wUc4afYqahq2B1mhQVZxCXOkNTnXltr+2vQ== webpack@^5.97.1: - version "5.105.4" - resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.105.4.tgz#1b77fcd55a985ac7ca9de80a746caffa38220169" - integrity sha512-jTywjboN9aHxFlToqb0K0Zs9SbBoW4zRUlGzI2tYNxVYcEi/IPpn+Xi4ye5jTLvX2YeLuic/IvxNot+Q1jMoOw== + version "5.107.2" + resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.107.2.tgz#dea14dcb177b46b29de15f952f7303691ee2b596" + integrity sha512-v7RhXaJbpMlV0D7hC7lb2EbnxkoeUqf9qhKr6lozx3Q48pmFrqqNRmZFUEGmi7pSwm6fCQ2H1IjvCkHqdpVdjQ== dependencies: - "@types/eslint-scope" "^3.7.7" "@types/estree" "^1.0.8" "@types/json-schema" "^7.0.15" "@webassemblyjs/ast" "^1.14.1" @@ -3693,21 +3682,20 @@ webpack@^5.97.1: acorn-import-phases "^1.0.3" browserslist "^4.28.1" chrome-trace-event "^1.0.2" - enhanced-resolve "^5.20.0" - es-module-lexer "^2.0.0" + enhanced-resolve "^5.22.0" + es-module-lexer "^2.1.0" eslint-scope "5.1.1" events "^3.2.0" glob-to-regexp "^0.4.1" graceful-fs "^4.2.11" - json-parse-even-better-errors "^2.3.1" - loader-runner "^4.3.1" - mime-types "^2.1.27" + loader-runner "^4.3.2" + mime-db "^1.54.0" neo-async "^2.6.2" schema-utils "^4.3.3" tapable "^2.3.0" - terser-webpack-plugin "^5.3.17" + terser-webpack-plugin "^5.5.0" watchpack "^2.5.1" - webpack-sources "^3.3.4" + webpack-sources "^3.5.0" whatwg-encoding@^2.0.0: version "2.0.0" @@ -3738,12 +3726,12 @@ whatwg-url@^5.0.0: webidl-conversions "^3.0.0" which-typed-array@^1.1.16: - version "1.1.20" - resolved "https://registry.yarnpkg.com/which-typed-array/-/which-typed-array-1.1.20.tgz#3fdb7adfafe0ea69157b1509f3a1cd892bd1d122" - integrity sha512-LYfpUkmqwl0h9A2HL09Mms427Q1RZWuOHsukfVcKRq9q95iQxdw0ix1JQrqbcDR9PH1QDwf5Qo8OZb5lksZ8Xg== + version "1.1.21" + resolved "https://registry.yarnpkg.com/which-typed-array/-/which-typed-array-1.1.21.tgz#ea7aab68168079646af06b4a36a6f7d7b72e1c0a" + integrity sha512-zbRA8cVm6io/d5W8uIe2hblzN76/Wm3v/yiythQvr+dpBWeqhPSWIDNj4zOyHi4zKbMK6DN34Xsr9jPHJERAEw== dependencies: available-typed-arrays "^1.0.7" - call-bind "^1.0.8" + call-bind "^1.0.9" call-bound "^1.0.4" for-each "^0.3.5" get-proto "^1.0.1" @@ -3794,9 +3782,9 @@ write-file-atomic@^4.0.2: signal-exit "^3.0.7" ws@^8.11.0: - version "8.19.0" - resolved "https://registry.yarnpkg.com/ws/-/ws-8.19.0.tgz#ddc2bdfa5b9ad860204f5a72a4863a8895fd8c8b" - integrity sha512-blAT2mjOEIi0ZzruJfIhb3nps74PRWTCz1IjglWEEpQl5XS/UNama6u2/rjFkDDouqr4L67ry+1aGIALViWjDg== + version "8.21.0" + resolved "https://registry.yarnpkg.com/ws/-/ws-8.21.0.tgz#012e413fc07429945121b0c153158c4343086951" + integrity sha512-Vsp28b7DRcimFQvrqu2Wek3z1iYxDCWqHYB8Qsnk/S4RfaCQzPGPyBNuVjJV3cd6UiKtUtp6sNM77gWvzcCH+g== xml-name-validator@^4.0.0: version "4.0.0"