diff --git a/.fern/metadata.json b/.fern/metadata.json index 62c4d643..c710a155 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": "296506977541e3dff661bd5dfeb4fe64f201051f", "sdkVersion": "3.3.5" } diff --git a/.fern/replay.lock b/.fern/replay.lock new file mode 100644 index 00000000..521c751d --- /dev/null +++ b/.fern/replay.lock @@ -0,0 +1,10 @@ +# DO NOT EDIT MANUALLY - Managed by Fern Replay +version: "1.0" +generations: + - commit_sha: 31e9cf381301cb8c5ebd112a72394ebc59a2aaf0 + tree_hash: 77d48608365a4c68dddf8d438a73ab5b3e41e005 + timestamp: 2026-06-16T22:52:31.856Z + cli_version: unknown + generator_versions: {} +current_generation: 31e9cf381301cb8c5ebd112a72394ebc59a2aaf0 +patches: [] diff --git a/.fernignore b/.fernignore index 408c3334..a8a4b552 100644 --- a/.fernignore +++ b/.fernignore @@ -13,4 +13,7 @@ tests/wire/workspaces/auditLogs.test.ts jest.config.mjs # Security scanning -.github/workflows/socket_reachability.yml \ No newline at end of file +.github/workflows/socket_reachability.yml +.fern/replay.lock +.fern/replay.yml +.gitattributes diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 00000000..74928d6a --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +.fern/replay.lock linguist-generated=true diff --git a/reference.md b/reference.md index ade8c4b2..927d4ddb 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 +## Analyze Reports +
client.analyze.reports.traffic(site_id, { ...params }) -> Webflow.TrafficResponse
@@ -5258,13 +5197,15 @@ await client.collections.items.updateItems("580e63fc8c9a982ac9b8b745", {
-List all published items in a collection. +Returns a daily time series of a single metric — sessions, users, or pageviews — over a time window. - - 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. - +Filter the report with top-level query parameters (`country`, `deviceType`, `pagePath`, etc.) or via the `filter` parameter for multi-value and negation matching. -Required scope | `CMS:read` +This endpoint requires a workspace with the Analyze add-on. + +Each access token can have one Analyze request in flight at a time, across all Analyze endpoints. Additional concurrent requests return `429 Too Many Requests`; wait for your in-flight request to finish, or for the `Retry-After` interval, then retry. + +Required scope | `sites:read`
@@ -5279,14 +5220,20 @@ 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.analyze.reports.traffic("580e63e98c9a982ac9b8b741", { + startTime: new Date("2026-04-01T00:00:00.000Z"), + endTime: new Date("2026-04-08T00:00:00.000Z"), + metricScope: "session", + bucketTimeZone: "America/New_York", + deviceType: "desktop", + country: "US", + pagePath: "/towels", + trafficSource: "SO", + referrer: "google.com", + browser: "Chrome", + utmCampaign: "dont-panic-2026", + utmMedium: "email", + utmSource: "hitchhikers-guide" }); ``` @@ -5303,7 +5250,7 @@ await client.collections.items.listItemsLive("580e63fc8c9a982ac9b8b745", {
-**collection_id:** `string` — Unique identifier for a Collection +**site_id:** `string` — Unique identifier for a Site
@@ -5311,7 +5258,7 @@ await client.collections.items.listItemsLive("580e63fc8c9a982ac9b8b745", {
-**request:** `Webflow.collections.ItemsListItemsLiveRequest` +**request:** `Webflow.analyze.ReportsTrafficRequest`
@@ -5319,7 +5266,7 @@ await client.collections.items.listItemsLive("580e63fc8c9a982ac9b8b745", {
-**requestOptions:** `ItemsClient.RequestOptions` +**requestOptions:** `ReportsClient.RequestOptions`
@@ -5331,7 +5278,7 @@ await client.collections.items.listItemsLive("580e63fc8c9a982ac9b8b745", {
-
client.collections.items.createItemLive(collection_id, { ...params }) -> Webflow.CollectionItem +
client.analyze.reports.topPages(site_id, { ...params }) -> Webflow.TopPagesResponse
@@ -5343,13 +5290,17 @@ await client.collections.items.listItemsLive("580e63fc8c9a982ac9b8b745", {
-Create item(s) in a collection that will be immediately published to the live site. +Returns the most-visited pages over a time window, ranked by `sortBy` (sessions, users, or pageviews). +Each row carries all three scope counts; `sortBy` only governs ordering. Filter the report with top-level query parameters (`country`, `deviceType`, `pagePath`, etc.) or via the `filter` parameter for multi-value and negation matching. -To create items across multiple locales, [please use this endpoint.](/data/reference/cms/collection-items/staged-items/create-items) +Set `timeseries[bucketTimeZone]` to attach a daily pageview `timeseries` to each row. Bucket counts are always pageviews regardless of `sortBy` — row-level counts honor the requested sort; the timeseries does not. +This endpoint requires a workspace with the Analyze add-on. -Required scope | `CMS:write` +Each access token can have one Analyze request in flight at a time, across all Analyze endpoints. Additional concurrent requests return `429 Too Many Requests`; wait for your in-flight request to finish, or for the `Retry-After` interval, then retry. + +Required scope | `sites:read`
@@ -5364,50 +5315,20 @@ 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.analyze.reports.topPages("580e63e98c9a982ac9b8b741", { + startTime: new Date("2026-04-01T00:00:00.000Z"), + endTime: new Date("2026-04-08T00:00:00.000Z"), + sortBy: "session", + limit: 1, + deviceType: "desktop", + country: "US", + pagePath: "/towels", + trafficSource: "SO", + referrer: "google.com", + browser: "Chrome", + utmCampaign: "dont-panic-2026", + utmMedium: "email", + utmSource: "hitchhikers-guide" }); ``` @@ -5424,7 +5345,7 @@ await client.collections.items.createItemLive("580e63fc8c9a982ac9b8b745", {
-**collection_id:** `string` — Unique identifier for a Collection +**site_id:** `string` — Unique identifier for a Site
@@ -5432,7 +5353,7 @@ await client.collections.items.createItemLive("580e63fc8c9a982ac9b8b745", {
-**request:** `Webflow.collections.ItemsCreateItemLiveRequest` +**request:** `Webflow.analyze.ReportsTopPagesRequest`
@@ -5440,7 +5361,7 @@ await client.collections.items.createItemLive("580e63fc8c9a982ac9b8b745", {
-**requestOptions:** `ItemsClient.RequestOptions` +**requestOptions:** `ReportsClient.RequestOptions`
@@ -5452,7 +5373,7 @@ await client.collections.items.createItemLive("580e63fc8c9a982ac9b8b745", {
-
client.collections.items.deleteItemsLive(collection_id, { ...params }) -> void +
client.analyze.reports.topDimensions(site_id, { ...params }) -> Webflow.TopDimensionsResponse
@@ -5464,11 +5385,15 @@ await client.collections.items.createItemLive("580e63fc8c9a982ac9b8b745", {
-Unpublish up to 100 items from the live site and set the `isDraft` property to `true`. +Returns the top values within a chosen `dimension` — top countries, top traffic sources, top campaigns, top audiences, and so on — over a time window, ranked by sessions or users. -Items will only be unpublished in the primary locale unless a `cmsLocaleId` is included in the request. +Filter the report with top-level query parameters (`country`, `deviceType`, `pagePath`, etc.) or via the `filter` parameter for multi-value and negation matching. -Required scope | `CMS:write` +This endpoint requires a workspace with the Analyze add-on. + +Each access token can have one Analyze request in flight at a time, across all Analyze endpoints. Additional concurrent requests return `429 Too Many Requests`; wait for your in-flight request to finish, or for the `Retry-After` interval, then retry. + +Required scope | `sites:read`
@@ -5483,10 +5408,21 @@ Required scope | `CMS:write`
```typescript -await client.collections.items.deleteItemsLive("580e63fc8c9a982ac9b8b745", { - items: [{ - id: "580e64008c9a982ac9b8b754" - }] +await client.analyze.reports.topDimensions("580e63e98c9a982ac9b8b741", { + startTime: new Date("2026-04-01T00:00:00.000Z"), + endTime: new Date("2026-04-08T00:00:00.000Z"), + dimension: "country", + metricScope: "session", + limit: 1, + deviceType: "desktop", + country: "US", + pagePath: "/towels", + trafficSource: "SO", + referrer: "google.com", + browser: "Chrome", + utmCampaign: "dont-panic-2026", + utmMedium: "email", + utmSource: "hitchhikers-guide" }); ``` @@ -5503,7 +5439,7 @@ await client.collections.items.deleteItemsLive("580e63fc8c9a982ac9b8b745", {
-**collection_id:** `string` — Unique identifier for a Collection +**site_id:** `string` — Unique identifier for a Site
@@ -5511,7 +5447,7 @@ await client.collections.items.deleteItemsLive("580e63fc8c9a982ac9b8b745", {
-**request:** `Webflow.collections.ItemsDeleteItemsLiveRequest` +**request:** `Webflow.analyze.ReportsTopDimensionsRequest`
@@ -5519,7 +5455,7 @@ await client.collections.items.deleteItemsLive("580e63fc8c9a982ac9b8b745", {
-**requestOptions:** `ItemsClient.RequestOptions` +**requestOptions:** `ReportsClient.RequestOptions`
@@ -5531,7 +5467,7 @@ await client.collections.items.deleteItemsLive("580e63fc8c9a982ac9b8b745", {
-
client.collections.items.updateItemsLive(collection_id, { ...params }) -> Webflow.CollectionItemListNoPagination +
client.analyze.reports.topEvents(site_id, { ...params }) -> Webflow.TopEventsResponse
@@ -5543,11 +5479,17 @@ await client.collections.items.deleteItemsLive("580e63fc8c9a982ac9b8b745", {
-Update a single published item or multiple published items (up to 100) in a Collection +Returns the top events over a time window, ranked by how often they occurred. -Items will only be updated in the primary locale, unless a `cmsLocaleId` is included in the request. +Events are counted individually, not rolled up into sessions, users, or pageviews — so this report has no `metricScope`. Each row's `count` is how many times the event occurred. Filter the report with top-level query parameters (`country`, `deviceType`, `pagePath`, etc.) or via the `filter` parameter for multi-value and negation matching. -Required scope | `CMS:write` +Set `timeseries[bucketTimeZone]` to attach a daily event count `timeseries` to each row. + +This endpoint requires a workspace with the Analyze add-on. + +Each access token can have one Analyze request in flight at a time, across all Analyze endpoints. Additional concurrent requests return `429 Too Many Requests`; wait for your in-flight request to finish, or for the `Retry-After` interval, then retry. + +Required scope | `sites:read`
@@ -5562,41 +5504,18 @@ 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.analyze.reports.topEvents("580e63e98c9a982ac9b8b741", { + startTime: new Date("2026-04-01T00:00:00.000Z"), + endTime: new Date("2026-04-08T00:00:00.000Z"), + limit: 1, + deviceType: "desktop", + country: "US", + pagePath: "/towels", + trafficSource: "SO", + browser: "Chrome", + utmCampaign: "dont-panic-2026", + utmMedium: "email", + utmSource: "hitchhikers-guide" }); ``` @@ -5613,7 +5532,7 @@ await client.collections.items.updateItemsLive("580e63fc8c9a982ac9b8b745", {
-**collection_id:** `string` — Unique identifier for a Collection +**site_id:** `string` — Unique identifier for a Site
@@ -5621,7 +5540,7 @@ await client.collections.items.updateItemsLive("580e63fc8c9a982ac9b8b745", {
-**request:** `Webflow.collections.ItemsUpdateItemsLiveRequest` +**request:** `Webflow.analyze.ReportsTopEventsRequest`
@@ -5629,7 +5548,7 @@ await client.collections.items.updateItemsLive("580e63fc8c9a982ac9b8b745", {
-**requestOptions:** `ItemsClient.RequestOptions` +**requestOptions:** `ReportsClient.RequestOptions`
@@ -5641,7 +5560,7 @@ await client.collections.items.updateItemsLive("580e63fc8c9a982ac9b8b745", {
-
client.collections.items.createItems(collection_id, { ...params }) -> Webflow.BulkCollectionItem +
client.analyze.reports.timeOnPage(site_id, { ...params }) -> Webflow.TimeOnPageResponse
@@ -5653,14 +5572,15 @@ await client.collections.items.updateItemsLive("580e63fc8c9a982ac9b8b745", {
-Create an item or multiple items in a CMS Collection across multiple corresponding locales. +Returns the average time on page over a time window — as a single aggregate value, or bucketed by day or week when `timeseries` is supplied. - - - 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. - +Choose how the average is computed with `metricScope` (per session, user, or pageview). Filter the report with top-level query parameters (`country`, `deviceType`, `pagePath`, etc.) or via the `filter` parameter for multi-value and negation matching. -Required scope | `CMS:write` +This endpoint requires a workspace with the Analyze add-on. + +Each access token can have one Analyze request in flight at a time, across all Analyze endpoints. Additional concurrent requests return `429 Too Many Requests`; wait for your in-flight request to finish, or for the `Retry-After` interval, then retry. + +Required scope | `sites:read`
@@ -5675,15 +5595,19 @@ Required scope | `CMS:write`
```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" - } +await client.analyze.reports.timeOnPage("580e63e98c9a982ac9b8b741", { + startTime: new Date("2026-04-01T00:00:00.000Z"), + endTime: new Date("2026-04-08T00:00:00.000Z"), + metricScope: "session", + deviceType: "desktop", + country: "US", + pagePath: "/towels", + trafficSource: "SO", + referrer: "google.com", + browser: "Chrome", + utmCampaign: "dont-panic-2026", + utmMedium: "email", + utmSource: "hitchhikers-guide" }); ``` @@ -5700,7 +5624,7 @@ await client.collections.items.createItems("580e63fc8c9a982ac9b8b745", {
-**collection_id:** `string` — Unique identifier for a Collection +**site_id:** `string` — Unique identifier for a Site
@@ -5708,7 +5632,7 @@ await client.collections.items.createItems("580e63fc8c9a982ac9b8b745", {
-**request:** `Webflow.collections.CreateBulkCollectionItemRequestBody` +**request:** `Webflow.analyze.ReportsTimeOnPageRequest`
@@ -5716,7 +5640,7 @@ await client.collections.items.createItems("580e63fc8c9a982ac9b8b745", {
-**requestOptions:** `ItemsClient.RequestOptions` +**requestOptions:** `ReportsClient.RequestOptions`
@@ -5728,7 +5652,8 @@ await client.collections.items.createItems("580e63fc8c9a982ac9b8b745", {
-
client.collections.items.getItem(collection_id, item_id, { ...params }) -> Webflow.CollectionItem +## Collections Fields +
client.collections.fields.create(collection_id, { ...params }) -> Webflow.FieldCreate
@@ -5740,9 +5665,13 @@ await client.collections.items.createItems("580e63fc8c9a982ac9b8b745", {
-Get details of a selected Collection Item. +Create a custom field in a collection. -Required scope | `CMS:read` +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) + +Required scope | `cms:write`
@@ -5757,8 +5686,13 @@ Required scope | `CMS:read`
```typescript -await client.collections.items.getItem("580e63fc8c9a982ac9b8b745", "580e64008c9a982ac9b8b754", { - cmsLocaleId: "cmsLocaleId" +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" }); ``` @@ -5783,15 +5717,7 @@ await client.collections.items.getItem("580e63fc8c9a982ac9b8b745", "580e64008c9a
-**item_id:** `string` — Unique identifier for an Item - -
-
- -
-
- -**request:** `Webflow.collections.ItemsGetItemRequest` +**request:** `Webflow.FieldCreate`
@@ -5799,7 +5725,7 @@ await client.collections.items.getItem("580e63fc8c9a982ac9b8b745", "580e64008c9a
-**requestOptions:** `ItemsClient.RequestOptions` +**requestOptions:** `FieldsClient.RequestOptions`
@@ -5811,7 +5737,7 @@ await client.collections.items.getItem("580e63fc8c9a982ac9b8b745", "580e64008c9a
-
client.collections.items.deleteItem(collection_id, item_id, { ...params }) -> void +
client.collections.fields.delete(collection_id, field_id) -> void
@@ -5823,9 +5749,9 @@ await client.collections.items.getItem("580e63fc8c9a982ac9b8b745", "580e64008c9a
-Delete an item from a collection. +Delete a custom field in a collection. This endpoint does not currently support bulk deletion. -Required scope | `CMS:write` +Required scope | `cms:write`
@@ -5840,9 +5766,7 @@ Required scope | `CMS:write`
```typescript -await client.collections.items.deleteItem("580e63fc8c9a982ac9b8b745", "580e64008c9a982ac9b8b754", { - cmsLocaleId: "cmsLocaleId" -}); +await client.collections.fields.delete("580e63fc8c9a982ac9b8b745", "580e63fc8c9a982ac9b8b745"); ```
@@ -5866,15 +5790,7 @@ await client.collections.items.deleteItem("580e63fc8c9a982ac9b8b745", "580e64008
-**item_id:** `string` — Unique identifier for an Item - -
-
- -
-
- -**request:** `Webflow.collections.ItemsDeleteItemRequest` +**field_id:** `string` — Unique identifier for a Field in a collection
@@ -5882,7 +5798,7 @@ await client.collections.items.deleteItem("580e63fc8c9a982ac9b8b745", "580e64008
-**requestOptions:** `ItemsClient.RequestOptions` +**requestOptions:** `FieldsClient.RequestOptions`
@@ -5894,7 +5810,7 @@ await client.collections.items.deleteItem("580e63fc8c9a982ac9b8b745", "580e64008
-
client.collections.items.updateItem(collection_id, item_id, { ...params }) -> Webflow.CollectionItem +
client.collections.fields.update(collection_id, field_id, { ...params }) -> Webflow.Field
@@ -5906,9 +5822,9 @@ await client.collections.items.deleteItem("580e63fc8c9a982ac9b8b745", "580e64008
-Update a selected Item in a Collection. +Update a custom field in a collection. -Required scope | `CMS:write` +Required scope | `cms:write`
@@ -5923,50 +5839,10 @@ Required scope | `CMS:write`
```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" - } - } - } +await client.collections.fields.update("580e63fc8c9a982ac9b8b745", "580e63fc8c9a982ac9b8b745", { + isRequired: false, + displayName: "Post Body", + helpText: "Add the body of your post here" }); ``` @@ -5991,7 +5867,7 @@ await client.collections.items.updateItem("580e63fc8c9a982ac9b8b745", "580e64008
-**item_id:** `string` — Unique identifier for an Item +**field_id:** `string` — Unique identifier for a Field in a collection
@@ -5999,7 +5875,7 @@ await client.collections.items.updateItem("580e63fc8c9a982ac9b8b745", "580e64008
-**request:** `Webflow.collections.ItemsUpdateItemRequest` +**request:** `Webflow.collections.FieldUpdate`
@@ -6007,7 +5883,7 @@ await client.collections.items.updateItem("580e63fc8c9a982ac9b8b745", "580e64008
-**requestOptions:** `ItemsClient.RequestOptions` +**requestOptions:** `FieldsClient.RequestOptions`
@@ -6019,7 +5895,8 @@ await client.collections.items.updateItem("580e63fc8c9a982ac9b8b745", "580e64008
-
client.collections.items.getItemLive(collection_id, item_id, { ...params }) -> Webflow.CollectionItem +## Collections Items +
client.collections.items.listItems(collection_id, { ...params }) -> Webflow.CollectionItemList
@@ -6031,11 +5908,7 @@ 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. - +List of all Items within a Collection. Required scope | `CMS:read`
@@ -6052,8 +5925,14 @@ Required scope | `CMS:read`
```typescript -await client.collections.items.getItemLive("580e63fc8c9a982ac9b8b745", "580e64008c9a982ac9b8b754", { - cmsLocaleId: "cmsLocaleId" +await client.collections.items.listItems("580e63fc8c9a982ac9b8b745", { + cmsLocaleId: "cmsLocaleId", + offset: 1, + limit: 1, + name: "name", + slug: "slug", + sortBy: "createdOn", + sortOrder: "asc" }); ``` @@ -6078,15 +5957,7 @@ await client.collections.items.getItemLive("580e63fc8c9a982ac9b8b745", "580e6400
-**item_id:** `string` — Unique identifier for an Item - -
-
- -
-
- -**request:** `Webflow.collections.ItemsGetItemLiveRequest` +**request:** `Webflow.collections.ItemsListItemsRequest`
@@ -6106,7 +5977,7 @@ await client.collections.items.getItemLive("580e63fc8c9a982ac9b8b745", "580e6400
-
client.collections.items.deleteItemLive(collection_id, item_id, { ...params }) -> void +
client.collections.items.createItem(collection_id, { ...params }) -> Webflow.CollectionItem
@@ -6118,92 +5989,10 @@ await client.collections.items.getItemLive("580e63fc8c9a982ac9b8b745", "580e6400
-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` -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -await client.collections.items.deleteItemLive("580e63fc8c9a982ac9b8b745", "580e64008c9a982ac9b8b754", { - cmsLocaleId: "cmsLocaleId" -}); - -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**collection_id:** `string` — Unique identifier for a Collection - -
-
- -
-
- -**item_id:** `string` — Unique identifier for an Item - -
-
- -
-
- -**request:** `Webflow.collections.ItemsDeleteItemLiveRequest` - -
-
- -
-
- -**requestOptions:** `ItemsClient.RequestOptions` - -
-
-
-
- - - - -
- -
client.collections.items.updateItemLive(collection_id, item_id, { ...params }) -> Webflow.CollectionItem -
-
- -#### 📝 Description - -
-
+Create Item(s) in a Collection. -
-
-Update a selected live Item in a Collection. The updates for this Item will be 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`
@@ -6220,7 +6009,7 @@ Required scope | `CMS:write`
```typescript -await client.collections.items.updateItemLive("580e63fc8c9a982ac9b8b745", "580e64008c9a982ac9b8b754", { +await client.collections.items.createItem("580e63fc8c9a982ac9b8b745", { skipInvalidFiles: true, body: { isArchived: false, @@ -6288,15 +6077,7 @@ await client.collections.items.updateItemLive("580e63fc8c9a982ac9b8b745", "580e6
-**item_id:** `string` — Unique identifier for an Item - -
-
- -
-
- -**request:** `Webflow.collections.ItemsUpdateItemLiveRequest` +**request:** `Webflow.collections.ItemsCreateItemRequest`
@@ -6316,7 +6097,7 @@ await client.collections.items.updateItemLive("580e63fc8c9a982ac9b8b745", "580e6
-
client.collections.items.publishItem(collection_id, { ...params }) -> Webflow.ItemsPublishItemResponse +
client.collections.items.deleteItems(collection_id, { ...params }) -> void
@@ -6328,9 +6109,11 @@ await client.collections.items.updateItemLive("580e63fc8c9a982ac9b8b745", "580e6
-Publish an item or multiple items. +Delete Items from a Collection. -Required scope | `cms:write` +Items will only be deleted in the primary locale unless a `cmsLocaleId` is included in the request. + +Required scope | `CMS:write`
@@ -6345,8 +6128,10 @@ Required scope | `cms:write`
```typescript -await client.collections.items.publishItem("580e63fc8c9a982ac9b8b745", { - itemIds: ["643fd856d66b6528195ee2ca", "643fd856d66b6528195ee2cb", "643fd856d66b6528195ee2cc"] +await client.collections.items.deleteItems("580e63fc8c9a982ac9b8b745", { + items: [{ + id: "580e64008c9a982ac9b8b754" + }] }); ``` @@ -6371,7 +6156,7 @@ await client.collections.items.publishItem("580e63fc8c9a982ac9b8b745", {
-**request:** `Webflow.ItemsPublishItemRequest` +**request:** `Webflow.collections.ItemsDeleteItemsRequest`
@@ -6391,8 +6176,7 @@ await client.collections.items.publishItem("580e63fc8c9a982ac9b8b745", {
-## Pages Scripts -
client.pages.scripts.getCustomCode(page_id) -> Webflow.ScriptApplyList +
client.collections.items.updateItems(collection_id, { ...params }) -> Webflow.ItemsUpdateItemsResponse
@@ -6404,9 +6188,13 @@ await client.collections.items.publishItem("580e63fc8c9a982ac9b8b745", {
-Get all scripts applied to a page. +Update a single item or multiple items in a Collection. -Required scope | `custom_code:read` +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`
@@ -6421,7 +6209,42 @@ Required scope | `custom_code:read`
```typescript -await client.pages.scripts.getCustomCode("63c720f9347c2139b248e552"); +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 + } + }] +}); ```
@@ -6437,7 +6260,7 @@ await client.pages.scripts.getCustomCode("63c720f9347c2139b248e552");
-**page_id:** `string` — Unique identifier for a Page +**collection_id:** `string` — Unique identifier for a Collection
@@ -6445,7 +6268,15 @@ await client.pages.scripts.getCustomCode("63c720f9347c2139b248e552");
-**requestOptions:** `ScriptsClient.RequestOptions` +**request:** `Webflow.collections.ItemsUpdateItemsRequest` + +
+
+ +
+
+ +**requestOptions:** `ItemsClient.RequestOptions`
@@ -6457,7 +6288,7 @@ await client.pages.scripts.getCustomCode("63c720f9347c2139b248e552");
-
client.pages.scripts.upsertCustomCode(page_id, { ...params }) -> Webflow.ScriptApplyList +
client.collections.items.listItemsLive(collection_id, { ...params }) -> Webflow.CollectionItemList
@@ -6469,13 +6300,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. +List all published items in a collection. - - 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. - + + 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 | `custom_code:write` +Required scope | `CMS:read`
@@ -6490,19 +6321,14 @@ 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.collections.items.listItemsLive("580e63fc8c9a982ac9b8b745", { + cmsLocaleId: "cmsLocaleId", + offset: 1, + limit: 1, + name: "name", + slug: "slug", + sortBy: "createdOn", + sortOrder: "asc" }); ``` @@ -6519,6 +6345,1303 @@ await client.pages.scripts.upsertCustomCode("63c720f9347c2139b248e552", {
+**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` + +
+
+ +
+
+ +**requestOptions:** `ItemsClient.RequestOptions` + +
+
+
+
+ + +
+
+
+ +
client.collections.items.deleteItem(collection_id, item_id, { ...params }) -> void +
+
+ +#### 📝 Description + +
+
+ +
+
+ +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` +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.collections.items.deleteItemLive("580e63fc8c9a982ac9b8b745", "580e64008c9a982ac9b8b754", { + cmsLocaleId: "cmsLocaleId" +}); + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**collection_id:** `string` — Unique identifier for a Collection + +
+
+ +
+
+ +**item_id:** `string` — Unique identifier for an Item + +
+
+ +
+
+ +**request:** `Webflow.collections.ItemsDeleteItemLiveRequest` + +
+
+ +
+
+ +**requestOptions:** `ItemsClient.RequestOptions` + +
+
+
+
+ + +
+
+
+ +
client.collections.items.updateItemLive(collection_id, item_id, { ...params }) -> Webflow.CollectionItem +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Update a selected live Item in a Collection. The updates for this Item will be published to the live site. + +Required scope | `CMS:write` +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```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" + } + } + } +}); + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**collection_id:** `string` — Unique identifier for a Collection + +
+
+ +
+
+ +**item_id:** `string` — Unique identifier for an Item + +
+
+ +
+
+ +**request:** `Webflow.collections.ItemsUpdateItemLiveRequest` + +
+
+ +
+
+ +**requestOptions:** `ItemsClient.RequestOptions` + +
+
+
+
+ + +
+
+
+ +
client.collections.items.publishItem(collection_id, { ...params }) -> Webflow.ItemsPublishItemResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Publish an item or multiple items. + +Required scope | `cms:write` +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.collections.items.publishItem("580e63fc8c9a982ac9b8b745", { + itemIds: ["643fd856d66b6528195ee2ca", "643fd856d66b6528195ee2cb", "643fd856d66b6528195ee2cc"] +}); + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**collection_id:** `string` — Unique identifier for a Collection + +
+
+ +
+
+ +**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 + +
+
+ +
+
+ +**page_id:** `string` — Unique identifier for a Page + +
+
+ +
+
+ +**requestOptions:** `ScriptsClient.RequestOptions` + +
+
+
+
+ + +
+
+
+ +
client.pages.scripts.upsertCustomCode(page_id, { ...params }) -> Webflow.ScriptApplyList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +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. + + + 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` +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```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" + }] +}); + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**page_id:** `string` — Unique identifier for a Page + +
+
+ +
+
+ +**request:** `Webflow.ScriptApplyList` + +
+
+ +
+
+ +**requestOptions:** `ScriptsClient.RequestOptions` + +
+
+
+
+ + +
+
+
+ +
client.pages.scripts.deleteCustomCode(page_id) -> void +
+
+ +#### 📝 Description + +
+
+ +
+
+ +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. + +Access to this endpoint requires a bearer token obtained from an [OAuth Code Grant Flow](/data/reference/oauth-app). + +Required scope | `custom_code:write` +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.pages.scripts.deleteCustomCode("63c720f9347c2139b248e552"); + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ **page_id:** `string` — Unique identifier for a Page
@@ -6527,15 +7650,77 @@ await client.pages.scripts.upsertCustomCode("63c720f9347c2139b248e552", {
-**request:** `Webflow.ScriptApplyList` +**requestOptions:** `ScriptsClient.RequestOptions`
+
+
+ + +
+
+
+## Sites Redirects +
client.sites.redirects.list(site_id) -> Webflow.Redirects
-**requestOptions:** `ScriptsClient.RequestOptions` +#### 📝 Description + +
+
+ +
+
+ +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. + +This endpoint requires an Enterprise workspace. + +Required scope: `sites:read` +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.sites.redirects.list("580e63e98c9a982ac9b8b741"); + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**site_id:** `string` — Unique identifier for a Site + +
+
+ +
+
+ +**requestOptions:** `RedirectsClient.RequestOptions`
@@ -6547,7 +7732,7 @@ await client.pages.scripts.upsertCustomCode("63c720f9347c2139b248e552", {
-
client.pages.scripts.deleteCustomCode(page_id) -> void +
client.sites.redirects.create(site_id, { ...params }) -> Webflow.Redirect
@@ -6559,13 +7744,13 @@ 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. +Add a new 301 redirection rule to a site. -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. +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. -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 +7765,167 @@ Required scope | `custom_code:write`
```typescript -await client.pages.scripts.deleteCustomCode("63c720f9347c2139b248e552"); +await client.sites.redirects.create("580e63e98c9a982ac9b8b741", { + id: "42e1a2b7aa1a13f768a0042a", + fromUrl: "/mostly-harmless", + toUrl: "/earth" +}); + +``` +
+
+ + + +#### ⚙️ Parameters + +
+
+ +
+
+ +**site_id:** `string` — Unique identifier for a Site + +
+
+ +
+
+ +**request:** `Webflow.Redirect` + +
+
+ +
+
+ +**requestOptions:** `RedirectsClient.RequestOptions` + +
+
+
+
+ + + + +
+ +
client.sites.redirects.delete(site_id, redirect_id) -> Webflow.Redirects +
+
+ +#### 📝 Description + +
+
+ +
+
+ +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. + +This endpoint requires an Enterprise workspace. + +Required scope: `sites:write` +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.sites.redirects.delete("580e63e98c9a982ac9b8b741", "66c4cb9a20cac35ed19500e6"); + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**site_id:** `string` — Unique identifier for a Site + +
+
+ +
+
+ +**redirect_id:** `string` — Unique identifier site redirect + +
+
+ +
+
+ +**requestOptions:** `RedirectsClient.RequestOptions` + +
+
+
+
+ + +
+
+
+ +
client.sites.redirects.update(site_id, redirect_id, { ...params }) -> Webflow.Redirect +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Update a 301 redirection rule from a site. + +This endpoint requires an Enterprise workspace. + +Required scope: `sites:write` +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.sites.redirects.update("580e63e98c9a982ac9b8b741", "66c4cb9a20cac35ed19500e6", { + id: "42e1a2b7aa1a13f768a0042a", + fromUrl: "/mostly-harmless", + toUrl: "/earth" +}); ```
@@ -6596,7 +7941,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 +7965,7 @@ await client.pages.scripts.deleteCustomCode("63c720f9347c2139b248e552");
-**requestOptions:** `ScriptsClient.RequestOptions` +**requestOptions:** `RedirectsClient.RequestOptions`
@@ -6616,8 +7977,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 +7990,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 +8009,7 @@ Required scope: `sites:read`
```typescript -await client.sites.redirects.list("580e63e98c9a982ac9b8b741"); +await client.sites.plans.getSitePlan("580e63e98c9a982ac9b8b741"); ```
@@ -6674,7 +8033,7 @@ await client.sites.redirects.list("580e63e98c9a982ac9b8b741");
-**requestOptions:** `RedirectsClient.RequestOptions` +**requestOptions:** `PlansClient.RequestOptions`
@@ -6686,7 +8045,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 +8058,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 +8077,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 +8101,7 @@ await client.sites.redirects.create("580e63e98c9a982ac9b8b741", {
-**request:** `Webflow.Redirect` - -
-
- -
-
- -**requestOptions:** `RedirectsClient.RequestOptions` +**requestOptions:** `RobotsTxtClient.RequestOptions`
@@ -6767,7 +8113,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 +8125,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 +8144,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 +8175,7 @@ await client.sites.redirects.delete("580e63e98c9a982ac9b8b741", "66c4cb9a20cac35
-**redirect_id:** `string` — Unique identifier site redirect +**request:** `Webflow.Robots`
@@ -6832,7 +8183,7 @@ await client.sites.redirects.delete("580e63e98c9a982ac9b8b741", "66c4cb9a20cac35
-**requestOptions:** `RedirectsClient.RequestOptions` +**requestOptions:** `RobotsTxtClient.RequestOptions`
@@ -6844,7 +8195,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 +8207,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 +8228,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 +8258,7 @@ await client.sites.redirects.update("580e63e98c9a982ac9b8b741", "66c4cb9a20cac35
-**redirect_id:** `string` — Unique identifier site redirect - -
-
- -
-
- -**request:** `Webflow.Redirect` +**request:** `Webflow.Robots`
@@ -6919,7 +8266,7 @@ await client.sites.redirects.update("580e63e98c9a982ac9b8b741", "66c4cb9a20cac35
-**requestOptions:** `RedirectsClient.RequestOptions` +**requestOptions:** `RobotsTxtClient.RequestOptions`
@@ -6931,8 +8278,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 +8290,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 +8309,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 +8340,15 @@ await client.sites.plans.getSitePlan("580e63e98c9a982ac9b8b741");
-**requestOptions:** `PlansClient.RequestOptions` +**request:** `Webflow.Robots` + +
+
+ +
+
+ +**requestOptions:** `RobotsTxtClient.RequestOptions`
@@ -6999,8 +8360,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 +8373,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 +8401,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 +8429,15 @@ await client.sites.robotsTxt.get("580e63e98c9a982ac9b8b741");
-**requestOptions:** `RobotsTxtClient.RequestOptions` +**request:** `Webflow.sites.WellKnownFile` + +
+
+ +
+
+ +**requestOptions:** `WellKnownClient.RequestOptions`
@@ -7067,7 +8449,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 +8461,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 +8480,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 +8504,7 @@ await client.sites.robotsTxt.put("580e63e98c9a982ac9b8b741", {
-**request:** `Webflow.Robots` +**request:** `Webflow.sites.WellKnownDeleteRequest`
@@ -7137,7 +8512,7 @@ await client.sites.robotsTxt.put("580e63e98c9a982ac9b8b741", {
-**requestOptions:** `RobotsTxtClient.RequestOptions` +**requestOptions:** `WellKnownClient.RequestOptions`
@@ -7149,7 +8524,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 +8537,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 +8554,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 +8578,7 @@ await client.sites.robotsTxt.delete("580e63e98c9a982ac9b8b741", {
-**request:** `Webflow.Robots` - -
-
- -
-
- -**requestOptions:** `RobotsTxtClient.RequestOptions` +**requestOptions:** `GoogleTagClient.RequestOptions`
@@ -7232,7 +8590,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 +8602,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 +8619,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 +8643,7 @@ await client.sites.robotsTxt.patch("580e63e98c9a982ac9b8b741", {
-**request:** `Webflow.Robots` - -
-
- -
-
- -**requestOptions:** `RobotsTxtClient.RequestOptions` +**requestOptions:** `GoogleTagClient.RequestOptions`
@@ -7314,8 +8655,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 +8667,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 +8686,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 +8716,7 @@ await client.sites.wellKnown.put("580e63e98c9a982ac9b8b741", {
-**request:** `Webflow.sites.WellKnownFile` +**request:** `Webflow.GoogleTagIds`
@@ -7391,7 +8724,7 @@ await client.sites.wellKnown.put("580e63e98c9a982ac9b8b741", {
-**requestOptions:** `WellKnownClient.RequestOptions` +**requestOptions:** `GoogleTagClient.RequestOptions`
@@ -7403,7 +8736,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 +8748,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 +8765,7 @@ Required scope: `site_config:write`
```typescript -await client.sites.wellKnown.delete("580e63e98c9a982ac9b8b741"); +await client.sites.googleTag.delete("580e63e98c9a982ac9b8b741", "G-XXXXXXXXXX"); ```
@@ -7458,7 +8789,7 @@ await client.sites.wellKnown.delete("580e63e98c9a982ac9b8b741");
-**request:** `Webflow.sites.WellKnownDeleteRequest` +**tag_id:** `string` — The Google Tag ID (e.g. G-XXXXXXXXXX)
@@ -7466,7 +8797,7 @@ await client.sites.wellKnown.delete("580e63e98c9a982ac9b8b741");
-**requestOptions:** `WellKnownClient.RequestOptions` +**requestOptions:** `GoogleTagClient.RequestOptions`
@@ -7842,6 +9173,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 +9244,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 +9407,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..8e98ba3e 100644 --- a/src/Client.ts +++ b/src/Client.ts @@ -1,8 +1,10 @@ // This file was auto-generated by Fern from our API Definition. +import { AnalyzeClient } from "./api/resources/analyze/client/Client"; 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,12 +34,14 @@ 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; protected _orders: OrdersClient | undefined; protected _inventory: InventoryClient | undefined; protected _ecommerce: EcommerceClient | undefined; + protected _analyze: AnalyzeClient | undefined; protected _workspaces: WorkspacesClient | undefined; constructor(options: WebflowClient.Options) { @@ -72,6 +76,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)); } @@ -96,6 +104,10 @@ export class WebflowClient { return (this._ecommerce ??= new EcommerceClient(this._options)); } + public get analyze(): AnalyzeClient { + return (this._analyze ??= new AnalyzeClient(this._options)); + } + public get workspaces(): WorkspacesClient { return (this._workspaces ??= new WorkspacesClient(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/analyze/client/Client.ts b/src/api/resources/analyze/client/Client.ts new file mode 100644 index 00000000..b5f1d17f --- /dev/null +++ b/src/api/resources/analyze/client/Client.ts @@ -0,0 +1,22 @@ +// This file was auto-generated by Fern from our API Definition. + +import type { BaseClientOptions } from "../../../../BaseClient"; +import { type NormalizedClientOptionsWithAuth, normalizeClientOptionsWithAuth } from "../../../../BaseClient"; +import { ReportsClient } from "../resources/reports/client/Client"; + +export declare namespace AnalyzeClient { + export type Options = BaseClientOptions; +} + +export class AnalyzeClient { + protected readonly _options: NormalizedClientOptionsWithAuth; + protected _reports: ReportsClient | undefined; + + constructor(options: AnalyzeClient.Options) { + this._options = normalizeClientOptionsWithAuth(options); + } + + public get reports(): ReportsClient { + return (this._reports ??= new ReportsClient(this._options)); + } +} diff --git a/src/api/resources/analyze/client/index.ts b/src/api/resources/analyze/client/index.ts new file mode 100644 index 00000000..cb0ff5c3 --- /dev/null +++ b/src/api/resources/analyze/client/index.ts @@ -0,0 +1 @@ +export {}; diff --git a/src/api/resources/analyze/exports.ts b/src/api/resources/analyze/exports.ts new file mode 100644 index 00000000..6bfa4f0e --- /dev/null +++ b/src/api/resources/analyze/exports.ts @@ -0,0 +1,5 @@ +// This file was auto-generated by Fern from our API Definition. + +export { AnalyzeClient } from "./client/Client"; +export * from "./client/index"; +export * from "./resources/index"; diff --git a/src/api/resources/analyze/index.ts b/src/api/resources/analyze/index.ts new file mode 100644 index 00000000..33a87f10 --- /dev/null +++ b/src/api/resources/analyze/index.ts @@ -0,0 +1,2 @@ +export * from "./client"; +export * from "./resources"; diff --git a/src/api/resources/analyze/resources/index.ts b/src/api/resources/analyze/resources/index.ts new file mode 100644 index 00000000..f4b9e857 --- /dev/null +++ b/src/api/resources/analyze/resources/index.ts @@ -0,0 +1,3 @@ +export * as reports from "./reports"; +export * from "./reports/client/requests"; +export * from "./reports/types"; diff --git a/src/api/resources/analyze/resources/reports/client/Client.ts b/src/api/resources/analyze/resources/reports/client/Client.ts new file mode 100644 index 00000000..1ca83bc6 --- /dev/null +++ b/src/api/resources/analyze/resources/reports/client/Client.ts @@ -0,0 +1,1099 @@ +// 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 ReportsClient { + export type Options = BaseClientOptions; + + export interface RequestOptions extends BaseRequestOptions {} +} + +export class ReportsClient { + protected readonly _options: NormalizedClientOptionsWithAuth; + + constructor(options: ReportsClient.Options) { + this._options = normalizeClientOptionsWithAuth(options); + } + + /** + * Returns a daily time series of a single metric — sessions, users, or pageviews — over a time window. + * + * Filter the report with top-level query parameters (`country`, `deviceType`, `pagePath`, etc.) or via the `filter` parameter for multi-value and negation matching. + * + * This endpoint requires a workspace with the Analyze add-on. + * + * Each access token can have one Analyze request in flight at a time, across all Analyze endpoints. Additional concurrent requests return `429 Too Many Requests`; wait for your in-flight request to finish, or for the `Retry-After` interval, then retry. + * + * Required scope | `sites:read` + * + * @param {string} site_id - Unique identifier for a Site + * @param {Webflow.analyze.ReportsTrafficRequest} request + * @param {ReportsClient.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.analyze.reports.traffic("580e63e98c9a982ac9b8b741", { + * startTime: new Date("2026-04-01T00:00:00.000Z"), + * endTime: new Date("2026-04-08T00:00:00.000Z"), + * metricScope: "session", + * bucketTimeZone: "America/New_York", + * deviceType: "desktop", + * country: "US", + * pagePath: "/towels", + * trafficSource: "SO", + * referrer: "google.com", + * browser: "Chrome", + * utmCampaign: "dont-panic-2026", + * utmMedium: "email", + * utmSource: "hitchhikers-guide" + * }) + */ + public traffic( + site_id: string, + request: Webflow.analyze.ReportsTrafficRequest, + requestOptions?: ReportsClient.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__traffic(site_id, request, requestOptions)); + } + + private async __traffic( + site_id: string, + request: Webflow.analyze.ReportsTrafficRequest, + requestOptions?: ReportsClient.RequestOptions, + ): Promise> { + const { + startTime, + endTime, + metricScope, + bucketTimeZone, + deviceType, + country, + pagePath, + trafficSource, + referrer, + browser, + utmCampaign, + utmMedium, + utmSource, + filter, + } = request; + const _queryParams: Record = { + startTime: startTime.toISOString(), + endTime: endTime.toISOString(), + metricScope: serializers.TrafficMetricScope.jsonOrThrow(metricScope, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + omitUndefined: true, + }), + bucketTimeZone, + deviceType: + deviceType != null + ? serializers.analyze.ReportsTrafficRequestDeviceType.jsonOrThrow(deviceType, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + omitUndefined: true, + }) + : undefined, + country, + pagePath, + trafficSource, + referrer, + browser, + utmCampaign, + utmMedium, + utmSource, + filter: + filter != null + ? serializers.TrafficFilter.jsonOrThrow(filter, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + omitUndefined: true, + breadcrumbsPrefix: ["request", "filter"], + }) + : filter, + }; + 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)}/analyze/reports/traffic`, + ), + 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.TrafficResponse.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}/analyze/reports/traffic", + ); + } + + /** + * Returns the most-visited pages over a time window, ranked by `sortBy` (sessions, users, or pageviews). + * + * Each row carries all three scope counts; `sortBy` only governs ordering. Filter the report with top-level query parameters (`country`, `deviceType`, `pagePath`, etc.) or via the `filter` parameter for multi-value and negation matching. + * + * Set `timeseries[bucketTimeZone]` to attach a daily pageview `timeseries` to each row. Bucket counts are always pageviews regardless of `sortBy` — row-level counts honor the requested sort; the timeseries does not. + * + * This endpoint requires a workspace with the Analyze add-on. + * + * Each access token can have one Analyze request in flight at a time, across all Analyze endpoints. Additional concurrent requests return `429 Too Many Requests`; wait for your in-flight request to finish, or for the `Retry-After` interval, then retry. + * + * Required scope | `sites:read` + * + * @param {string} site_id - Unique identifier for a Site + * @param {Webflow.analyze.ReportsTopPagesRequest} request + * @param {ReportsClient.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.analyze.reports.topPages("580e63e98c9a982ac9b8b741", { + * startTime: new Date("2026-04-01T00:00:00.000Z"), + * endTime: new Date("2026-04-08T00:00:00.000Z"), + * sortBy: "session", + * limit: 1, + * deviceType: "desktop", + * country: "US", + * pagePath: "/towels", + * trafficSource: "SO", + * referrer: "google.com", + * browser: "Chrome", + * utmCampaign: "dont-panic-2026", + * utmMedium: "email", + * utmSource: "hitchhikers-guide" + * }) + */ + public topPages( + site_id: string, + request: Webflow.analyze.ReportsTopPagesRequest, + requestOptions?: ReportsClient.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__topPages(site_id, request, requestOptions)); + } + + private async __topPages( + site_id: string, + request: Webflow.analyze.ReportsTopPagesRequest, + requestOptions?: ReportsClient.RequestOptions, + ): Promise> { + const { + startTime, + endTime, + sortBy, + limit, + timeseries, + deviceType, + country, + pagePath, + trafficSource, + referrer, + browser, + utmCampaign, + utmMedium, + utmSource, + filter, + } = request; + const _queryParams: Record = { + startTime: startTime.toISOString(), + endTime: endTime.toISOString(), + sortBy: + sortBy != null + ? serializers.TopPagesSortBy.jsonOrThrow(sortBy, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + omitUndefined: true, + }) + : undefined, + limit, + timeseries: + timeseries != null + ? serializers.AnalyzeDailyTimeseriesQuery.jsonOrThrow(timeseries, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + omitUndefined: true, + breadcrumbsPrefix: ["request", "timeseries"], + }) + : timeseries, + deviceType: + deviceType != null + ? serializers.analyze.ReportsTopPagesRequestDeviceType.jsonOrThrow(deviceType, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + omitUndefined: true, + }) + : undefined, + country, + pagePath, + trafficSource, + referrer, + browser, + utmCampaign, + utmMedium, + utmSource, + filter: + filter != null + ? serializers.TopPagesFilter.jsonOrThrow(filter, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + omitUndefined: true, + breadcrumbsPrefix: ["request", "filter"], + }) + : filter, + }; + 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)}/analyze/reports/top_pages`, + ), + 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.TopPagesResponse.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}/analyze/reports/top_pages", + ); + } + + /** + * Returns the top values within a chosen `dimension` — top countries, top traffic sources, top campaigns, top audiences, and so on — over a time window, ranked by sessions or users. + * + * Filter the report with top-level query parameters (`country`, `deviceType`, `pagePath`, etc.) or via the `filter` parameter for multi-value and negation matching. + * + * This endpoint requires a workspace with the Analyze add-on. + * + * Each access token can have one Analyze request in flight at a time, across all Analyze endpoints. Additional concurrent requests return `429 Too Many Requests`; wait for your in-flight request to finish, or for the `Retry-After` interval, then retry. + * + * Required scope | `sites:read` + * + * @param {string} site_id - Unique identifier for a Site + * @param {Webflow.analyze.ReportsTopDimensionsRequest} request + * @param {ReportsClient.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.analyze.reports.topDimensions("580e63e98c9a982ac9b8b741", { + * startTime: new Date("2026-04-01T00:00:00.000Z"), + * endTime: new Date("2026-04-08T00:00:00.000Z"), + * dimension: "country", + * metricScope: "session", + * limit: 1, + * deviceType: "desktop", + * country: "US", + * pagePath: "/towels", + * trafficSource: "SO", + * referrer: "google.com", + * browser: "Chrome", + * utmCampaign: "dont-panic-2026", + * utmMedium: "email", + * utmSource: "hitchhikers-guide" + * }) + */ + public topDimensions( + site_id: string, + request: Webflow.analyze.ReportsTopDimensionsRequest, + requestOptions?: ReportsClient.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__topDimensions(site_id, request, requestOptions)); + } + + private async __topDimensions( + site_id: string, + request: Webflow.analyze.ReportsTopDimensionsRequest, + requestOptions?: ReportsClient.RequestOptions, + ): Promise> { + const { + startTime, + endTime, + dimension, + metricScope, + limit, + deviceType, + country, + pagePath, + trafficSource, + referrer, + browser, + utmCampaign, + utmMedium, + utmSource, + filter, + } = request; + const _queryParams: Record = { + startTime: startTime.toISOString(), + endTime: endTime.toISOString(), + dimension: serializers.TopDimensionsDimension.jsonOrThrow(dimension, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + omitUndefined: true, + }), + metricScope: serializers.TopDimensionsMetricScope.jsonOrThrow(metricScope, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + omitUndefined: true, + }), + limit, + deviceType: + deviceType != null + ? serializers.analyze.ReportsTopDimensionsRequestDeviceType.jsonOrThrow(deviceType, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + omitUndefined: true, + }) + : undefined, + country, + pagePath, + trafficSource, + referrer, + browser, + utmCampaign, + utmMedium, + utmSource, + filter: + filter != null + ? serializers.TopDimensionsFilter.jsonOrThrow(filter, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + omitUndefined: true, + breadcrumbsPrefix: ["request", "filter"], + }) + : filter, + }; + 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)}/analyze/reports/top_dimensions`, + ), + 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.TopDimensionsResponse.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}/analyze/reports/top_dimensions", + ); + } + + /** + * Returns the top events over a time window, ranked by how often they occurred. + * + * Events are counted individually, not rolled up into sessions, users, or pageviews — so this report has no `metricScope`. Each row's `count` is how many times the event occurred. Filter the report with top-level query parameters (`country`, `deviceType`, `pagePath`, etc.) or via the `filter` parameter for multi-value and negation matching. + * + * Set `timeseries[bucketTimeZone]` to attach a daily event count `timeseries` to each row. + * + * This endpoint requires a workspace with the Analyze add-on. + * + * Each access token can have one Analyze request in flight at a time, across all Analyze endpoints. Additional concurrent requests return `429 Too Many Requests`; wait for your in-flight request to finish, or for the `Retry-After` interval, then retry. + * + * Required scope | `sites:read` + * + * @param {string} site_id - Unique identifier for a Site + * @param {Webflow.analyze.ReportsTopEventsRequest} request + * @param {ReportsClient.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.analyze.reports.topEvents("580e63e98c9a982ac9b8b741", { + * startTime: new Date("2026-04-01T00:00:00.000Z"), + * endTime: new Date("2026-04-08T00:00:00.000Z"), + * limit: 1, + * deviceType: "desktop", + * country: "US", + * pagePath: "/towels", + * trafficSource: "SO", + * browser: "Chrome", + * utmCampaign: "dont-panic-2026", + * utmMedium: "email", + * utmSource: "hitchhikers-guide" + * }) + */ + public topEvents( + site_id: string, + request: Webflow.analyze.ReportsTopEventsRequest, + requestOptions?: ReportsClient.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__topEvents(site_id, request, requestOptions)); + } + + private async __topEvents( + site_id: string, + request: Webflow.analyze.ReportsTopEventsRequest, + requestOptions?: ReportsClient.RequestOptions, + ): Promise> { + const { + startTime, + endTime, + limit, + timeseries, + deviceType, + country, + pagePath, + trafficSource, + browser, + utmCampaign, + utmMedium, + utmSource, + filter, + } = request; + const _queryParams: Record = { + startTime: startTime.toISOString(), + endTime: endTime.toISOString(), + limit, + timeseries: + timeseries != null + ? serializers.AnalyzeDailyTimeseriesQuery.jsonOrThrow(timeseries, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + omitUndefined: true, + breadcrumbsPrefix: ["request", "timeseries"], + }) + : timeseries, + deviceType: + deviceType != null + ? serializers.analyze.ReportsTopEventsRequestDeviceType.jsonOrThrow(deviceType, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + omitUndefined: true, + }) + : undefined, + country, + pagePath, + trafficSource, + browser, + utmCampaign, + utmMedium, + utmSource, + filter: + filter != null + ? serializers.TopEventsFilter.jsonOrThrow(filter, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + omitUndefined: true, + breadcrumbsPrefix: ["request", "filter"], + }) + : filter, + }; + 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)}/analyze/reports/top_events`, + ), + 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.TopEventsResponse.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}/analyze/reports/top_events", + ); + } + + /** + * Returns the average time on page over a time window — as a single aggregate value, or bucketed by day or week when `timeseries` is supplied. + * + * Choose how the average is computed with `metricScope` (per session, user, or pageview). Filter the report with top-level query parameters (`country`, `deviceType`, `pagePath`, etc.) or via the `filter` parameter for multi-value and negation matching. + * + * This endpoint requires a workspace with the Analyze add-on. + * + * Each access token can have one Analyze request in flight at a time, across all Analyze endpoints. Additional concurrent requests return `429 Too Many Requests`; wait for your in-flight request to finish, or for the `Retry-After` interval, then retry. + * + * Required scope | `sites:read` + * + * @param {string} site_id - Unique identifier for a Site + * @param {Webflow.analyze.ReportsTimeOnPageRequest} request + * @param {ReportsClient.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.analyze.reports.timeOnPage("580e63e98c9a982ac9b8b741", { + * startTime: new Date("2026-04-01T00:00:00.000Z"), + * endTime: new Date("2026-04-08T00:00:00.000Z"), + * metricScope: "session", + * deviceType: "desktop", + * country: "US", + * pagePath: "/towels", + * trafficSource: "SO", + * referrer: "google.com", + * browser: "Chrome", + * utmCampaign: "dont-panic-2026", + * utmMedium: "email", + * utmSource: "hitchhikers-guide" + * }) + */ + public timeOnPage( + site_id: string, + request: Webflow.analyze.ReportsTimeOnPageRequest, + requestOptions?: ReportsClient.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__timeOnPage(site_id, request, requestOptions)); + } + + private async __timeOnPage( + site_id: string, + request: Webflow.analyze.ReportsTimeOnPageRequest, + requestOptions?: ReportsClient.RequestOptions, + ): Promise> { + const { + startTime, + endTime, + metricScope, + timeseries, + deviceType, + country, + pagePath, + trafficSource, + referrer, + browser, + utmCampaign, + utmMedium, + utmSource, + filter, + } = request; + const _queryParams: Record = { + startTime: startTime.toISOString(), + endTime: endTime.toISOString(), + metricScope: serializers.TimeOnPageMetricScope.jsonOrThrow(metricScope, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + omitUndefined: true, + }), + timeseries: + timeseries != null + ? serializers.TimeOnPageTimeseriesQuery.jsonOrThrow(timeseries, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + omitUndefined: true, + breadcrumbsPrefix: ["request", "timeseries"], + }) + : timeseries, + deviceType: + deviceType != null + ? serializers.analyze.ReportsTimeOnPageRequestDeviceType.jsonOrThrow(deviceType, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + omitUndefined: true, + }) + : undefined, + country, + pagePath, + trafficSource, + referrer, + browser, + utmCampaign, + utmMedium, + utmSource, + filter: + filter != null + ? serializers.TimeOnPageFilter.jsonOrThrow(filter, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + omitUndefined: true, + breadcrumbsPrefix: ["request", "filter"], + }) + : filter, + }; + 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)}/analyze/reports/time_on_page`, + ), + 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.TimeOnPageResponse.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}/analyze/reports/time_on_page", + ); + } +} diff --git a/src/api/resources/analyze/resources/reports/client/index.ts b/src/api/resources/analyze/resources/reports/client/index.ts new file mode 100644 index 00000000..415726b7 --- /dev/null +++ b/src/api/resources/analyze/resources/reports/client/index.ts @@ -0,0 +1 @@ +export * from "./requests"; diff --git a/src/api/resources/analyze/resources/reports/client/requests/ReportsTimeOnPageRequest.ts b/src/api/resources/analyze/resources/reports/client/requests/ReportsTimeOnPageRequest.ts new file mode 100644 index 00000000..d050e1c1 --- /dev/null +++ b/src/api/resources/analyze/resources/reports/client/requests/ReportsTimeOnPageRequest.ts @@ -0,0 +1,54 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Webflow from "../../../../../../index"; + +/** + * @example + * { + * startTime: new Date("2026-04-01T00:00:00.000Z"), + * endTime: new Date("2026-04-08T00:00:00.000Z"), + * metricScope: "session", + * deviceType: "desktop", + * country: "US", + * pagePath: "/towels", + * trafficSource: "SO", + * referrer: "google.com", + * browser: "Chrome", + * utmCampaign: "dont-panic-2026", + * utmMedium: "email", + * utmSource: "hitchhikers-guide" + * } + */ +export interface ReportsTimeOnPageRequest { + /** Inclusive start of the reporting window. Must be a UTC timestamp in ISO 8601 / RFC 3339 format ending in `Z` (for example, `2026-04-01T00:00:00Z`); numeric offsets such as `-04:00` or `+00:00` are not accepted. Must be on or after `2025-04-09T00:00:00Z`. */ + startTime: Date; + /** Exclusive end of the reporting window. Must be a UTC timestamp in ISO 8601 / RFC 3339 format ending in `Z` (for example, `2026-04-08T00:00:00Z`); numeric offsets such as `-04:00` or `+00:00` are not accepted. Must be greater than `startTime` and within 100 days of it. */ + endTime: Date; + /** How the average time on page is computed — per session, user, or pageview. */ + metricScope: Webflow.TimeOnPageMetricScope; + /** Include bucketed average time data using the supplied granularity and IANA time zone. Omit this parameter to return a single aggregate value for the requested window. */ + timeseries?: Webflow.TimeOnPageTimeseriesQuery; + /** Restrict the report to a single device type. */ + deviceType?: Webflow.analyze.ReportsTimeOnPageRequestDeviceType; + /** Restrict the report to a single country. ISO 3166-1 alpha-2 (two letters, normalized to uppercase). */ + country?: string; + /** Restrict the report to a single page path. */ + pagePath?: string; + /** Restrict the report to a single traffic source code (for example, `SO` for Organic Search). */ + trafficSource?: string; + /** Restrict the report to a single referrer domain. */ + referrer?: string; + /** Restrict the report to a single browser. */ + browser?: string; + /** Restrict the report to a single `utm_campaign` value. */ + utmCampaign?: string; + /** Restrict the report to a single `utm_medium` value. */ + utmMedium?: string; + /** Restrict the report to a single `utm_source` value. */ + utmSource?: string; + /** + * Filter the report by dimension. Use bracket notation. Scalars take a single value (`filter[country][eq]=US`, `filter[country][ne]=US`). Arrays use indexed brackets (`filter[country][in][0]=US&filter[country][in][1]=CA`, `filter[country][nin][0]=US&filter[country][nin][1]=CA`). + * Each dimension entry takes at least one of `eq`, `in`, `ne`, or `nin`. Filter a given dimension in one place — either a top-level query parameter or a `filter` entry. See the `TimeOnPageFilter` schema for the full list of supported dimensions. + */ + filter?: Webflow.TimeOnPageFilter; +} diff --git a/src/api/resources/analyze/resources/reports/client/requests/ReportsTopDimensionsRequest.ts b/src/api/resources/analyze/resources/reports/client/requests/ReportsTopDimensionsRequest.ts new file mode 100644 index 00000000..2b908a77 --- /dev/null +++ b/src/api/resources/analyze/resources/reports/client/requests/ReportsTopDimensionsRequest.ts @@ -0,0 +1,58 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Webflow from "../../../../../../index"; + +/** + * @example + * { + * startTime: new Date("2026-04-01T00:00:00.000Z"), + * endTime: new Date("2026-04-08T00:00:00.000Z"), + * dimension: "country", + * metricScope: "session", + * limit: 1, + * deviceType: "desktop", + * country: "US", + * pagePath: "/towels", + * trafficSource: "SO", + * referrer: "google.com", + * browser: "Chrome", + * utmCampaign: "dont-panic-2026", + * utmMedium: "email", + * utmSource: "hitchhikers-guide" + * } + */ +export interface ReportsTopDimensionsRequest { + /** Inclusive start of the reporting window. Must be a UTC timestamp in ISO 8601 / RFC 3339 format ending in `Z` (for example, `2026-04-01T00:00:00Z`); numeric offsets such as `-04:00` or `+00:00` are not accepted. Must be on or after `2025-04-09T00:00:00Z`. */ + startTime: Date; + /** Exclusive end of the reporting window. Must be a UTC timestamp in ISO 8601 / RFC 3339 format ending in `Z` (for example, `2026-04-08T00:00:00Z`); numeric offsets such as `-04:00` or `+00:00` are not accepted. Must be greater than `startTime` and within 100 days of it. */ + endTime: Date; + /** The dimension whose top values are ranked. See `TopDimensionsDimension` for the supported values. */ + dimension: Webflow.TopDimensionsDimension; + /** The unit each row's `count` is measured in — sessions or users. */ + metricScope: Webflow.TopDimensionsMetricScope; + /** Maximum number of rows to return. Defaults to `25`, up to a maximum of `100`. */ + limit?: number; + /** Restrict the report to a single device type. */ + deviceType?: Webflow.analyze.ReportsTopDimensionsRequestDeviceType; + /** Restrict the report to a single country. ISO 3166-1 alpha-2 (two letters, normalized to uppercase). */ + country?: string; + /** Restrict the report to a single page path. */ + pagePath?: string; + /** Restrict the report to a single traffic source code (for example, `SO` for Organic Search). */ + trafficSource?: string; + /** Restrict the report to a single referrer domain. */ + referrer?: string; + /** Restrict the report to a single browser. */ + browser?: string; + /** Restrict the report to a single `utm_campaign` value. */ + utmCampaign?: string; + /** Restrict the report to a single `utm_medium` value. */ + utmMedium?: string; + /** Restrict the report to a single `utm_source` value. */ + utmSource?: string; + /** + * Filter the report by dimension. Use bracket notation. Scalars take a single value (`filter[country][eq]=US`, `filter[country][ne]=US`). Arrays use indexed brackets (`filter[country][in][0]=US&filter[country][in][1]=CA`, `filter[country][nin][0]=US&filter[country][nin][1]=CA`). + * Each dimension entry takes at least one of `eq`, `in`, `ne`, or `nin`. Filter a given dimension in one place — either a top-level query parameter or a `filter` entry. See the `TopDimensionsFilter` schema for the full list of supported dimensions. + */ + filter?: Webflow.TopDimensionsFilter; +} diff --git a/src/api/resources/analyze/resources/reports/client/requests/ReportsTopEventsRequest.ts b/src/api/resources/analyze/resources/reports/client/requests/ReportsTopEventsRequest.ts new file mode 100644 index 00000000..2485523c --- /dev/null +++ b/src/api/resources/analyze/resources/reports/client/requests/ReportsTopEventsRequest.ts @@ -0,0 +1,51 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Webflow from "../../../../../../index"; + +/** + * @example + * { + * startTime: new Date("2026-04-01T00:00:00.000Z"), + * endTime: new Date("2026-04-08T00:00:00.000Z"), + * limit: 1, + * deviceType: "desktop", + * country: "US", + * pagePath: "/towels", + * trafficSource: "SO", + * browser: "Chrome", + * utmCampaign: "dont-panic-2026", + * utmMedium: "email", + * utmSource: "hitchhikers-guide" + * } + */ +export interface ReportsTopEventsRequest { + /** Inclusive start of the reporting window. Must be a UTC timestamp in ISO 8601 / RFC 3339 format ending in `Z` (for example, `2026-04-01T00:00:00Z`); numeric offsets such as `-04:00` or `+00:00` are not accepted. Must be on or after `2025-04-09T00:00:00Z`. */ + startTime: Date; + /** Exclusive end of the reporting window. Must be a UTC timestamp in ISO 8601 / RFC 3339 format ending in `Z` (for example, `2026-04-08T00:00:00Z`); numeric offsets such as `-04:00` or `+00:00` are not accepted. Must be greater than `startTime` and within 100 days of it. */ + endTime: Date; + /** Maximum number of rows to return. Defaults to `25`, up to a maximum of `250`. */ + limit?: number; + /** Include a daily event count `timeseries` for each row, bucketed in the supplied IANA time zone. Omit this parameter to return ranked rows without per-event timeseries data. */ + timeseries?: Webflow.AnalyzeDailyTimeseriesQuery; + /** Restrict the report to a single device type. */ + deviceType?: Webflow.analyze.ReportsTopEventsRequestDeviceType; + /** Restrict the report to a single country. ISO 3166-1 alpha-2 (two letters, normalized to uppercase). */ + country?: string; + /** Restrict the report to a single page path. */ + pagePath?: string; + /** Restrict the report to a single traffic source code (for example, `SO` for Organic Search). */ + trafficSource?: string; + /** Restrict the report to a single browser. */ + browser?: string; + /** Restrict the report to a single `utm_campaign` value. */ + utmCampaign?: string; + /** Restrict the report to a single `utm_medium` value. */ + utmMedium?: string; + /** Restrict the report to a single `utm_source` value. */ + utmSource?: string; + /** + * Filter the report by dimension. Use bracket notation. Scalars take a single value (`filter[country][eq]=US`, `filter[country][ne]=US`). Arrays use indexed brackets (`filter[country][in][0]=US&filter[country][in][1]=CA`, `filter[country][nin][0]=US&filter[country][nin][1]=CA`). + * Each dimension entry takes at least one of `eq`, `in`, `ne`, or `nin`. Filter a given dimension in one place — either a top-level query parameter or a `filter` entry. See the `TopEventsFilter` schema for the full list of supported dimensions. + */ + filter?: Webflow.TopEventsFilter; +} diff --git a/src/api/resources/analyze/resources/reports/client/requests/ReportsTopPagesRequest.ts b/src/api/resources/analyze/resources/reports/client/requests/ReportsTopPagesRequest.ts new file mode 100644 index 00000000..f90fdacd --- /dev/null +++ b/src/api/resources/analyze/resources/reports/client/requests/ReportsTopPagesRequest.ts @@ -0,0 +1,57 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Webflow from "../../../../../../index"; + +/** + * @example + * { + * startTime: new Date("2026-04-01T00:00:00.000Z"), + * endTime: new Date("2026-04-08T00:00:00.000Z"), + * sortBy: "session", + * limit: 1, + * deviceType: "desktop", + * country: "US", + * pagePath: "/towels", + * trafficSource: "SO", + * referrer: "google.com", + * browser: "Chrome", + * utmCampaign: "dont-panic-2026", + * utmMedium: "email", + * utmSource: "hitchhikers-guide" + * } + */ +export interface ReportsTopPagesRequest { + /** Inclusive start of the reporting window. Must be a UTC timestamp in ISO 8601 / RFC 3339 format ending in `Z` (for example, `2026-04-01T00:00:00Z`); numeric offsets such as `-04:00` or `+00:00` are not accepted. Must be on or after `2025-04-09T00:00:00Z`. */ + startTime: Date; + /** Exclusive end of the reporting window. Must be a UTC timestamp in ISO 8601 / RFC 3339 format ending in `Z` (for example, `2026-04-08T00:00:00Z`); numeric offsets such as `-04:00` or `+00:00` are not accepted. Must be greater than `startTime` and within 100 days of it. */ + endTime: Date; + /** Metric used to rank rows in the response, descending. Defaults to `session`. */ + sortBy?: Webflow.TopPagesSortBy; + /** Maximum number of rows to return. Defaults to `25`, up to a maximum of `250`. */ + limit?: number; + /** Include a daily pageview `timeseries` for each row, bucketed in the supplied IANA time zone. Omit this parameter to return ranked rows without per-page timeseries data. */ + timeseries?: Webflow.AnalyzeDailyTimeseriesQuery; + /** Restrict the report to a single device type. */ + deviceType?: Webflow.analyze.ReportsTopPagesRequestDeviceType; + /** Restrict the report to a single country. ISO 3166-1 alpha-2 (two letters, normalized to uppercase). */ + country?: string; + /** Restrict the report to a single page path. */ + pagePath?: string; + /** Restrict the report to a single traffic source code (for example, `SO` for Organic Search). */ + trafficSource?: string; + /** Restrict the report to a single referrer domain. */ + referrer?: string; + /** Restrict the report to a single browser. */ + browser?: string; + /** Restrict the report to a single `utm_campaign` value. */ + utmCampaign?: string; + /** Restrict the report to a single `utm_medium` value. */ + utmMedium?: string; + /** Restrict the report to a single `utm_source` value. */ + utmSource?: string; + /** + * Filter the report by dimension. Use bracket notation. Scalars take a single value (`filter[country][eq]=US`, `filter[country][ne]=US`). Arrays use indexed brackets (`filter[country][in][0]=US&filter[country][in][1]=CA`, `filter[country][nin][0]=US&filter[country][nin][1]=CA`). + * Each dimension entry takes at least one of `eq`, `in`, `ne`, or `nin`. Filter a given dimension in one place — either a top-level query parameter or a `filter` entry. See the `TopPagesFilter` schema for the full list of supported dimensions. + */ + filter?: Webflow.TopPagesFilter; +} diff --git a/src/api/resources/analyze/resources/reports/client/requests/ReportsTrafficRequest.ts b/src/api/resources/analyze/resources/reports/client/requests/ReportsTrafficRequest.ts new file mode 100644 index 00000000..3a94566d --- /dev/null +++ b/src/api/resources/analyze/resources/reports/client/requests/ReportsTrafficRequest.ts @@ -0,0 +1,55 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Webflow from "../../../../../../index"; + +/** + * @example + * { + * startTime: new Date("2026-04-01T00:00:00.000Z"), + * endTime: new Date("2026-04-08T00:00:00.000Z"), + * metricScope: "session", + * bucketTimeZone: "America/New_York", + * deviceType: "desktop", + * country: "US", + * pagePath: "/towels", + * trafficSource: "SO", + * referrer: "google.com", + * browser: "Chrome", + * utmCampaign: "dont-panic-2026", + * utmMedium: "email", + * utmSource: "hitchhikers-guide" + * } + */ +export interface ReportsTrafficRequest { + /** Inclusive start of the reporting window. Must be a UTC timestamp in ISO 8601 / RFC 3339 format ending in `Z` (for example, `2026-04-01T00:00:00Z`); numeric offsets such as `-04:00` or `+00:00` are not accepted. Must be on or after `2025-04-09T00:00:00Z`. */ + startTime: Date; + /** Exclusive end of the reporting window. Must be a UTC timestamp in ISO 8601 / RFC 3339 format ending in `Z` (for example, `2026-04-08T00:00:00Z`); numeric offsets such as `-04:00` or `+00:00` are not accepted. Must be greater than `startTime` and within 100 days of it. */ + endTime: Date; + /** The unit each `count` data point is measured in. */ + metricScope: Webflow.TrafficMetricScope; + /** IANA time zone used to align daily bucket boundaries. */ + bucketTimeZone: Webflow.AnalyzeBucketTimeZone; + /** Restrict the report to a single device type. */ + deviceType?: Webflow.analyze.ReportsTrafficRequestDeviceType; + /** Restrict the report to a single country. ISO 3166-1 alpha-2 (two letters, normalized to uppercase). */ + country?: string; + /** Restrict the report to a single page path. */ + pagePath?: string; + /** Restrict the report to a single traffic source code (for example, `SO` for Organic Search). */ + trafficSource?: string; + /** Restrict the report to a single referrer domain. */ + referrer?: string; + /** Restrict the report to a single browser. */ + browser?: string; + /** Restrict the report to a single `utm_campaign` value. */ + utmCampaign?: string; + /** Restrict the report to a single `utm_medium` value. */ + utmMedium?: string; + /** Restrict the report to a single `utm_source` value. */ + utmSource?: string; + /** + * Filter the report by dimension. Use bracket notation. Scalars take a single value (`filter[country][eq]=US`, `filter[country][ne]=US`). Arrays use indexed brackets (`filter[country][in][0]=US&filter[country][in][1]=CA`, `filter[country][nin][0]=US&filter[country][nin][1]=CA`). + * Each dimension entry takes at least one of `eq`, `in`, `ne`, or `nin`. Filter a given dimension in one place — either a top-level query parameter or a `filter` entry. See the `TrafficFilter` schema for the full list of supported dimensions. + */ + filter?: Webflow.TrafficFilter; +} diff --git a/src/api/resources/analyze/resources/reports/client/requests/index.ts b/src/api/resources/analyze/resources/reports/client/requests/index.ts new file mode 100644 index 00000000..972f223e --- /dev/null +++ b/src/api/resources/analyze/resources/reports/client/requests/index.ts @@ -0,0 +1,5 @@ +export type { ReportsTimeOnPageRequest } from "./ReportsTimeOnPageRequest"; +export type { ReportsTopDimensionsRequest } from "./ReportsTopDimensionsRequest"; +export type { ReportsTopEventsRequest } from "./ReportsTopEventsRequest"; +export type { ReportsTopPagesRequest } from "./ReportsTopPagesRequest"; +export type { ReportsTrafficRequest } from "./ReportsTrafficRequest"; diff --git a/src/api/resources/analyze/resources/reports/exports.ts b/src/api/resources/analyze/resources/reports/exports.ts new file mode 100644 index 00000000..476ee9ab --- /dev/null +++ b/src/api/resources/analyze/resources/reports/exports.ts @@ -0,0 +1,4 @@ +// This file was auto-generated by Fern from our API Definition. + +export { ReportsClient } from "./client/Client"; +export * from "./client/index"; diff --git a/src/api/resources/analyze/resources/reports/index.ts b/src/api/resources/analyze/resources/reports/index.ts new file mode 100644 index 00000000..d2ec2302 --- /dev/null +++ b/src/api/resources/analyze/resources/reports/index.ts @@ -0,0 +1,2 @@ +export * from "./client"; +export * from "./types"; diff --git a/src/api/resources/analyze/resources/reports/types/ReportsTimeOnPageRequestDeviceType.ts b/src/api/resources/analyze/resources/reports/types/ReportsTimeOnPageRequestDeviceType.ts new file mode 100644 index 00000000..a7d696e3 --- /dev/null +++ b/src/api/resources/analyze/resources/reports/types/ReportsTimeOnPageRequestDeviceType.ts @@ -0,0 +1,9 @@ +// This file was auto-generated by Fern from our API Definition. + +export const ReportsTimeOnPageRequestDeviceType = { + Desktop: "desktop", + Mobile: "mobile", + Tablet: "tablet", +} as const; +export type ReportsTimeOnPageRequestDeviceType = + (typeof ReportsTimeOnPageRequestDeviceType)[keyof typeof ReportsTimeOnPageRequestDeviceType]; diff --git a/src/api/resources/analyze/resources/reports/types/ReportsTopDimensionsRequestDeviceType.ts b/src/api/resources/analyze/resources/reports/types/ReportsTopDimensionsRequestDeviceType.ts new file mode 100644 index 00000000..4a211e3d --- /dev/null +++ b/src/api/resources/analyze/resources/reports/types/ReportsTopDimensionsRequestDeviceType.ts @@ -0,0 +1,9 @@ +// This file was auto-generated by Fern from our API Definition. + +export const ReportsTopDimensionsRequestDeviceType = { + Desktop: "desktop", + Mobile: "mobile", + Tablet: "tablet", +} as const; +export type ReportsTopDimensionsRequestDeviceType = + (typeof ReportsTopDimensionsRequestDeviceType)[keyof typeof ReportsTopDimensionsRequestDeviceType]; diff --git a/src/api/resources/analyze/resources/reports/types/ReportsTopEventsRequestDeviceType.ts b/src/api/resources/analyze/resources/reports/types/ReportsTopEventsRequestDeviceType.ts new file mode 100644 index 00000000..3ae8caf9 --- /dev/null +++ b/src/api/resources/analyze/resources/reports/types/ReportsTopEventsRequestDeviceType.ts @@ -0,0 +1,9 @@ +// This file was auto-generated by Fern from our API Definition. + +export const ReportsTopEventsRequestDeviceType = { + Desktop: "desktop", + Mobile: "mobile", + Tablet: "tablet", +} as const; +export type ReportsTopEventsRequestDeviceType = + (typeof ReportsTopEventsRequestDeviceType)[keyof typeof ReportsTopEventsRequestDeviceType]; diff --git a/src/api/resources/analyze/resources/reports/types/ReportsTopPagesRequestDeviceType.ts b/src/api/resources/analyze/resources/reports/types/ReportsTopPagesRequestDeviceType.ts new file mode 100644 index 00000000..9bd378e3 --- /dev/null +++ b/src/api/resources/analyze/resources/reports/types/ReportsTopPagesRequestDeviceType.ts @@ -0,0 +1,9 @@ +// This file was auto-generated by Fern from our API Definition. + +export const ReportsTopPagesRequestDeviceType = { + Desktop: "desktop", + Mobile: "mobile", + Tablet: "tablet", +} as const; +export type ReportsTopPagesRequestDeviceType = + (typeof ReportsTopPagesRequestDeviceType)[keyof typeof ReportsTopPagesRequestDeviceType]; diff --git a/src/api/resources/analyze/resources/reports/types/ReportsTrafficRequestDeviceType.ts b/src/api/resources/analyze/resources/reports/types/ReportsTrafficRequestDeviceType.ts new file mode 100644 index 00000000..128537db --- /dev/null +++ b/src/api/resources/analyze/resources/reports/types/ReportsTrafficRequestDeviceType.ts @@ -0,0 +1,9 @@ +// This file was auto-generated by Fern from our API Definition. + +export const ReportsTrafficRequestDeviceType = { + Desktop: "desktop", + Mobile: "mobile", + Tablet: "tablet", +} as const; +export type ReportsTrafficRequestDeviceType = + (typeof ReportsTrafficRequestDeviceType)[keyof typeof ReportsTrafficRequestDeviceType]; diff --git a/src/api/resources/analyze/resources/reports/types/index.ts b/src/api/resources/analyze/resources/reports/types/index.ts new file mode 100644 index 00000000..5faa9573 --- /dev/null +++ b/src/api/resources/analyze/resources/reports/types/index.ts @@ -0,0 +1,5 @@ +export * from "./ReportsTimeOnPageRequestDeviceType"; +export * from "./ReportsTopDimensionsRequestDeviceType"; +export * from "./ReportsTopEventsRequestDeviceType"; +export * from "./ReportsTopPagesRequestDeviceType"; +export * from "./ReportsTrafficRequestDeviceType"; 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..5876670a 100644 --- a/src/api/resources/index.ts +++ b/src/api/resources/index.ts @@ -1,3 +1,4 @@ +export * as analyze from "./analyze"; export * as assets from "./assets"; export * from "./assets/client/requests"; export * as collections from "./collections"; @@ -6,6 +7,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/AnalyzeBucketTimeZone.ts b/src/api/types/AnalyzeBucketTimeZone.ts new file mode 100644 index 00000000..ef160973 --- /dev/null +++ b/src/api/types/AnalyzeBucketTimeZone.ts @@ -0,0 +1,6 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * Valid IANA time zone used to align time bucket boundaries. Use canonical names such as `UTC` or `America/New_York`. Bucket timestamps are returned as UTC instants for local bucket starts in this time zone; for example, `America/New_York` local midnight on April 1, 2026 is returned as `2026-04-01T04:00:00.000Z`. + */ +export type AnalyzeBucketTimeZone = string; diff --git a/src/api/types/AnalyzeDailyBucketing.ts b/src/api/types/AnalyzeDailyBucketing.ts new file mode 100644 index 00000000..f9d244f2 --- /dev/null +++ b/src/api/types/AnalyzeDailyBucketing.ts @@ -0,0 +1,12 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Webflow from "../index"; + +/** + * Daily bucketing applied to a response. + */ +export interface AnalyzeDailyBucketing { + /** Bucket size used for this response. */ + granularityPeriod: "day"; + bucketTimeZone: Webflow.AnalyzeBucketTimeZone; +} diff --git a/src/api/types/AnalyzeDailyTimeseriesQuery.ts b/src/api/types/AnalyzeDailyTimeseriesQuery.ts new file mode 100644 index 00000000..58075686 --- /dev/null +++ b/src/api/types/AnalyzeDailyTimeseriesQuery.ts @@ -0,0 +1,10 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Webflow from "../index"; + +/** + * Options that opt a report into daily timeseries data. + */ +export interface AnalyzeDailyTimeseriesQuery { + bucketTimeZone: Webflow.AnalyzeBucketTimeZone; +} diff --git a/src/api/types/AnalyzeFilterOperators.ts b/src/api/types/AnalyzeFilterOperators.ts new file mode 100644 index 00000000..bf6447ad --- /dev/null +++ b/src/api/types/AnalyzeFilterOperators.ts @@ -0,0 +1,15 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * Operators for filtering a single dimension. Specify at least one of `eq`, `in`, `ne`, or `nin`. + */ +export interface AnalyzeFilterOperators { + /** Match values exactly equal to the provided value. */ + eq?: string; + /** Match values in the provided list. Use indexed bracket notation — `filter[][in][0]=value1&filter[][in][1]=value2`. Comma-separated values (for example, `filter[][in]=value1,value2`) are not supported. */ + in?: string[]; + /** Exclude values exactly equal to the provided value. */ + ne?: string; + /** Exclude values in the provided list. Use indexed bracket notation — `filter[][nin][0]=value1&filter[][nin][1]=value2`. Comma-separated values (for example, `filter[][nin]=value1,value2`) are not supported. */ + nin?: string[]; +} diff --git a/src/api/types/AnalyzeTimeOnPageBucketing.ts b/src/api/types/AnalyzeTimeOnPageBucketing.ts new file mode 100644 index 00000000..9e739c6f --- /dev/null +++ b/src/api/types/AnalyzeTimeOnPageBucketing.ts @@ -0,0 +1,11 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Webflow from "../index"; + +/** + * Bucketing applied to a time on page response. + */ +export interface AnalyzeTimeOnPageBucketing { + granularityPeriod: Webflow.TimeOnPageGranularityPeriod; + bucketTimeZone: Webflow.AnalyzeBucketTimeZone; +} diff --git a/src/api/types/AnalyzeWindow.ts b/src/api/types/AnalyzeWindow.ts new file mode 100644 index 00000000..ec7864dd --- /dev/null +++ b/src/api/types/AnalyzeWindow.ts @@ -0,0 +1,11 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * A reporting time window. `endTime` must be greater than `startTime`. + */ +export interface AnalyzeWindow { + /** Inclusive start of the reporting window, in ISO 8601 / RFC 3339 format. */ + startTime: Date; + /** Exclusive end of the reporting window, in ISO 8601 / RFC 3339 format. */ + endTime: Date; +} 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..3f372525 100644 --- a/src/api/types/ErrorCode.ts +++ b/src/api/types/ErrorCode.ts @@ -2,7 +2,11 @@ /** Error code */ export const ErrorCode = { + AnalyzeFilterConflict: "analyze_filter_conflict", + AnalyzeInputValidation: "analyze_input_validation", + AnalyzeUnsupportedFilter: "analyze_unsupported_filter", BadRequest: "bad_request", + BeforeHistoricalFloor: "before_historical_floor", CollectionNotFound: "collection_not_found", Conflict: "conflict", DuplicateCollection: "duplicate_collection", @@ -15,6 +19,7 @@ export const ErrorCode = { InvalidAuthVersion: "invalid_auth_version", InvalidCredentials: "invalid_credentials", InvalidDomain: "invalid_domain", + InvalidTimeRange: "invalid_time_range", InvalidUserEmail: "invalid_user_email", ItemNotFound: "item_not_found", MissingScopes: "missing_scopes", @@ -24,6 +29,8 @@ export const ErrorCode = { NotEnterprisePlanWorkspace: "not_enterprise_plan_workspace", OrderNotFound: "order_not_found", ResourceNotFound: "resource_not_found", + ServiceUnavailable: "service_unavailable", + TimeRangeTooWide: "time_range_too_wide", 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/SiteActivityLogItem.ts b/src/api/types/SiteActivityLogItem.ts index 60414917..90abd254 100644 --- a/src/api/types/SiteActivityLogItem.ts +++ b/src/api/types/SiteActivityLogItem.ts @@ -14,4 +14,12 @@ export interface SiteActivityLogItem { newValue?: string; previousValue?: string; payload?: Record; + /** The system that originated the event. `WEBFLOW_AI` for Webflow AI features, `WEBFLOW_MCP` for an external MCP server or Bridge App, `DESIGNER` for human writes from the Designer, and `SYSTEM` for automated Webflow processes such as backups or migrations. `null` for legacy events recorded before attribution was available. */ + source?: Webflow.SiteActivityLogItemSource; + /** The type of actor responsible for the event. `user` for a human who directly triggered or accepted the action, `agent` for a fully autonomous AI agent, `workflow` for a user-created workflow that ran autonomously, and `rule` for an autonomous rule that fired on a trigger. `null` for legacy events. */ + actorType?: Webflow.SiteActivityLogItemActorType; + /** Unique identifier of the actor that originated the event. `null` when not available. */ + actorId?: string; + /** Display name of the actor that originated the event. `null` when not available. */ + actorName?: string; } diff --git a/src/api/types/SiteActivityLogItemActorType.ts b/src/api/types/SiteActivityLogItemActorType.ts new file mode 100644 index 00000000..8fa8da76 --- /dev/null +++ b/src/api/types/SiteActivityLogItemActorType.ts @@ -0,0 +1,11 @@ +// This file was auto-generated by Fern from our API Definition. + +/** The type of actor responsible for the event. `user` for a human who directly triggered or accepted the action, `agent` for a fully autonomous AI agent, `workflow` for a user-created workflow that ran autonomously, and `rule` for an autonomous rule that fired on a trigger. `null` for legacy events. */ +export const SiteActivityLogItemActorType = { + User: "user", + Agent: "agent", + Workflow: "workflow", + Rule: "rule", +} as const; +export type SiteActivityLogItemActorType = + (typeof SiteActivityLogItemActorType)[keyof typeof SiteActivityLogItemActorType]; diff --git a/src/api/types/SiteActivityLogItemSource.ts b/src/api/types/SiteActivityLogItemSource.ts new file mode 100644 index 00000000..5367bbe8 --- /dev/null +++ b/src/api/types/SiteActivityLogItemSource.ts @@ -0,0 +1,10 @@ +// This file was auto-generated by Fern from our API Definition. + +/** The system that originated the event. `WEBFLOW_AI` for Webflow AI features, `WEBFLOW_MCP` for an external MCP server or Bridge App, `DESIGNER` for human writes from the Designer, and `SYSTEM` for automated Webflow processes such as backups or migrations. `null` for legacy events recorded before attribution was available. */ +export const SiteActivityLogItemSource = { + WebflowAi: "WEBFLOW_AI", + WebflowMcp: "WEBFLOW_MCP", + Designer: "DESIGNER", + System: "SYSTEM", +} as const; +export type SiteActivityLogItemSource = (typeof SiteActivityLogItemSource)[keyof typeof SiteActivityLogItemSource]; 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/TimeOnPageDataPoint.ts b/src/api/types/TimeOnPageDataPoint.ts new file mode 100644 index 00000000..cb96b1f1 --- /dev/null +++ b/src/api/types/TimeOnPageDataPoint.ts @@ -0,0 +1,11 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * A single average time on page data point. When `timeseries` is omitted, the response holds one aggregate point covering the whole window; otherwise it returns one point per requested bucket. + */ +export interface TimeOnPageDataPoint { + /** Start of the bucket, in ISO 8601 / RFC 3339 format. For an aggregate result, this is the start of the requested window. */ + timestamp: Date; + /** Average time on page for this bucket, in seconds, in units of the request's `metricScope`. */ + averageSeconds: number; +} diff --git a/src/api/types/TimeOnPageFilter.ts b/src/api/types/TimeOnPageFilter.ts new file mode 100644 index 00000000..eb16e3bf --- /dev/null +++ b/src/api/types/TimeOnPageFilter.ts @@ -0,0 +1,40 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Webflow from "../index"; + +/** + * Filter the time on page report by dimension. Each property is an optional set of `AnalyzeFilterOperators` (`eq`, `in`, `ne`, `nin`) applied to the named dimension. Filter a given dimension in one place — either inside `filter` or as a top-level query parameter. + */ +export interface TimeOnPageFilter { + audienceIds?: Webflow.AnalyzeFilterOperators; + browser?: Webflow.AnalyzeFilterOperators; + collectionId?: Webflow.AnalyzeFilterOperators; + country?: Webflow.AnalyzeFilterOperators; + dayOfWeek?: Webflow.AnalyzeFilterOperators; + deviceBrand?: Webflow.AnalyzeFilterOperators; + deviceType?: Webflow.AnalyzeFilterOperators; + domain?: Webflow.AnalyzeFilterOperators; + itemSlug?: Webflow.AnalyzeFilterOperators; + language?: Webflow.AnalyzeFilterOperators; + locale?: Webflow.AnalyzeFilterOperators; + nextCollectionId?: Webflow.AnalyzeFilterOperators; + nextItemSlug?: Webflow.AnalyzeFilterOperators; + nextPageId?: Webflow.AnalyzeFilterOperators; + os?: Webflow.AnalyzeFilterOperators; + pageId?: Webflow.AnalyzeFilterOperators; + pagePath?: Webflow.AnalyzeFilterOperators; + previousCollectionId?: Webflow.AnalyzeFilterOperators; + previousItemSlug?: Webflow.AnalyzeFilterOperators; + previousPageId?: Webflow.AnalyzeFilterOperators; + referrer?: Webflow.AnalyzeFilterOperators; + region?: Webflow.AnalyzeFilterOperators; + timeOfDay?: Webflow.AnalyzeFilterOperators; + timezone?: Webflow.AnalyzeFilterOperators; + trafficSource?: Webflow.AnalyzeFilterOperators; + utmCampaign?: Webflow.AnalyzeFilterOperators; + utmContent?: Webflow.AnalyzeFilterOperators; + utmMedium?: Webflow.AnalyzeFilterOperators; + utmSource?: Webflow.AnalyzeFilterOperators; + utmTerm?: Webflow.AnalyzeFilterOperators; + visitStatus?: Webflow.AnalyzeFilterOperators; +} diff --git a/src/api/types/TimeOnPageGranularityPeriod.ts b/src/api/types/TimeOnPageGranularityPeriod.ts new file mode 100644 index 00000000..8cb69da5 --- /dev/null +++ b/src/api/types/TimeOnPageGranularityPeriod.ts @@ -0,0 +1,9 @@ +// This file was auto-generated by Fern from our API Definition. + +/** Bucket size for a time on page timeseries. `day` returns one value per day and `week` returns one value per week. */ +export const TimeOnPageGranularityPeriod = { + Day: "day", + Week: "week", +} as const; +export type TimeOnPageGranularityPeriod = + (typeof TimeOnPageGranularityPeriod)[keyof typeof TimeOnPageGranularityPeriod]; diff --git a/src/api/types/TimeOnPageMetricScope.ts b/src/api/types/TimeOnPageMetricScope.ts new file mode 100644 index 00000000..7ea7d2ab --- /dev/null +++ b/src/api/types/TimeOnPageMetricScope.ts @@ -0,0 +1,14 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * The unit each `averageSeconds` value is averaged over. + * - `session`: average time on page per session. + * - `user`: average time on page per unique user. + * - `pageview`: average time on page per pageview. + */ +export const TimeOnPageMetricScope = { + Session: "session", + User: "user", + Pageview: "pageview", +} as const; +export type TimeOnPageMetricScope = (typeof TimeOnPageMetricScope)[keyof typeof TimeOnPageMetricScope]; diff --git a/src/api/types/TimeOnPageResponse.ts b/src/api/types/TimeOnPageResponse.ts new file mode 100644 index 00000000..f1c035a7 --- /dev/null +++ b/src/api/types/TimeOnPageResponse.ts @@ -0,0 +1,17 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Webflow from "../index"; + +/** + * Response payload for the time on page report. + */ +export interface TimeOnPageResponse { + /** Discriminator identifying the report type. */ + report: "time_on_page"; + window: Webflow.AnalyzeWindow; + metricScope: Webflow.TimeOnPageMetricScope; + bucketing?: Webflow.AnalyzeTimeOnPageBucketing; + /** Average time on page over the requested window — one aggregate point when `timeseries` is omitted, otherwise one point per bucket. */ + data: Webflow.TimeOnPageDataPoint[]; + filter?: Webflow.TimeOnPageFilter; +} diff --git a/src/api/types/TimeOnPageTimeseriesQuery.ts b/src/api/types/TimeOnPageTimeseriesQuery.ts new file mode 100644 index 00000000..0ec6465c --- /dev/null +++ b/src/api/types/TimeOnPageTimeseriesQuery.ts @@ -0,0 +1,11 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Webflow from "../index"; + +/** + * Options that opt the time on page report into bucketed timeseries data. + */ +export interface TimeOnPageTimeseriesQuery { + granularityPeriod: Webflow.TimeOnPageGranularityPeriod; + bucketTimeZone: Webflow.AnalyzeBucketTimeZone; +} diff --git a/src/api/types/TopDimensionsDimension.ts b/src/api/types/TopDimensionsDimension.ts new file mode 100644 index 00000000..1259eb77 --- /dev/null +++ b/src/api/types/TopDimensionsDimension.ts @@ -0,0 +1,38 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * The dimension whose top values are ranked. + * - `country`: ISO 3166-1 alpha-2 country code (e.g., `US`). + * - `region`: first-level subdivision below country, keyed by ISO 3166-2 code (e.g., `US-CA`, with `name` `California, United States`). + * - `deviceType`: `desktop`, `mobile`, or `tablet`. + * - `os`: operating system name (e.g., `iOS`, `Windows NT`). + * - `browser`: browser name (e.g., `Chrome`, `Safari`). + * - `language`: the visitor's stated language preference (from the `Accept-Language` request header). + * - `locale`: the locale declared on the visited page (the page's `` value). + * - `referrer`: referrer domain (e.g., `google.com`). + * - `trafficSource`: traffic source category, keyed by a code: `DN` Direct, `SP` Paid Search, `SO` Organic Search, `CP` Paid Social, `CO` Organic Social, `EM` Email, `RC` Recirculation, `OP` Other Paid, `OT` Other, `AI` Generative AI. `attributeKey` is the code; `name` is the label. + * - `utmCampaign`: `utm_campaign` value. + * - `utmContent`: `utm_content` value. + * - `utmMedium`: `utm_medium` value. + * - `utmSource`: `utm_source` value. + * - `utmTerm`: `utm_term` value. + * - `audienceIds`: Webflow audience identifier. For this dimension, `attributeKey` is the audience ID and `name` is the audience's display name (falling back to the ID if no display name is set). + */ +export const TopDimensionsDimension = { + Country: "country", + Region: "region", + DeviceType: "deviceType", + Os: "os", + Browser: "browser", + Language: "language", + Locale: "locale", + Referrer: "referrer", + TrafficSource: "trafficSource", + UtmCampaign: "utmCampaign", + UtmContent: "utmContent", + UtmMedium: "utmMedium", + UtmSource: "utmSource", + UtmTerm: "utmTerm", + AudienceIds: "audienceIds", +} as const; +export type TopDimensionsDimension = (typeof TopDimensionsDimension)[keyof typeof TopDimensionsDimension]; diff --git a/src/api/types/TopDimensionsFilter.ts b/src/api/types/TopDimensionsFilter.ts new file mode 100644 index 00000000..2b13ed9a --- /dev/null +++ b/src/api/types/TopDimensionsFilter.ts @@ -0,0 +1,40 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Webflow from "../index"; + +/** + * Filter the top dimensions report by dimension. Each property is an optional set of `AnalyzeFilterOperators` (`eq`, `in`, `ne`, `nin`) applied to the named dimension. Filter a given dimension in one place — either inside `filter` or as a top-level query parameter. + */ +export interface TopDimensionsFilter { + audienceIds?: Webflow.AnalyzeFilterOperators; + browser?: Webflow.AnalyzeFilterOperators; + collectionId?: Webflow.AnalyzeFilterOperators; + country?: Webflow.AnalyzeFilterOperators; + dayOfWeek?: Webflow.AnalyzeFilterOperators; + deviceBrand?: Webflow.AnalyzeFilterOperators; + deviceType?: Webflow.AnalyzeFilterOperators; + domain?: Webflow.AnalyzeFilterOperators; + itemSlug?: Webflow.AnalyzeFilterOperators; + language?: Webflow.AnalyzeFilterOperators; + locale?: Webflow.AnalyzeFilterOperators; + nextCollectionId?: Webflow.AnalyzeFilterOperators; + nextItemSlug?: Webflow.AnalyzeFilterOperators; + nextPageId?: Webflow.AnalyzeFilterOperators; + os?: Webflow.AnalyzeFilterOperators; + pageId?: Webflow.AnalyzeFilterOperators; + pagePath?: Webflow.AnalyzeFilterOperators; + previousCollectionId?: Webflow.AnalyzeFilterOperators; + previousItemSlug?: Webflow.AnalyzeFilterOperators; + previousPageId?: Webflow.AnalyzeFilterOperators; + referrer?: Webflow.AnalyzeFilterOperators; + region?: Webflow.AnalyzeFilterOperators; + timeOfDay?: Webflow.AnalyzeFilterOperators; + timezone?: Webflow.AnalyzeFilterOperators; + trafficSource?: Webflow.AnalyzeFilterOperators; + utmCampaign?: Webflow.AnalyzeFilterOperators; + utmContent?: Webflow.AnalyzeFilterOperators; + utmMedium?: Webflow.AnalyzeFilterOperators; + utmSource?: Webflow.AnalyzeFilterOperators; + utmTerm?: Webflow.AnalyzeFilterOperators; + visitStatus?: Webflow.AnalyzeFilterOperators; +} diff --git a/src/api/types/TopDimensionsMetricScope.ts b/src/api/types/TopDimensionsMetricScope.ts new file mode 100644 index 00000000..c0208937 --- /dev/null +++ b/src/api/types/TopDimensionsMetricScope.ts @@ -0,0 +1,12 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * The unit each row's `count` is measured in. + * - `session`: number of sessions attributed to the dimension value. + * - `user`: number of unique users attributed to the dimension value. + */ +export const TopDimensionsMetricScope = { + Session: "session", + User: "user", +} as const; +export type TopDimensionsMetricScope = (typeof TopDimensionsMetricScope)[keyof typeof TopDimensionsMetricScope]; diff --git a/src/api/types/TopDimensionsResponse.ts b/src/api/types/TopDimensionsResponse.ts new file mode 100644 index 00000000..c50ebcb0 --- /dev/null +++ b/src/api/types/TopDimensionsResponse.ts @@ -0,0 +1,19 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Webflow from "../index"; + +/** + * Response payload for the top dimensions report. + */ +export interface TopDimensionsResponse { + /** Discriminator identifying the report type. */ + report: "top_dimensions"; + window: Webflow.AnalyzeWindow; + dimension: Webflow.TopDimensionsDimension; + metricScope: Webflow.TopDimensionsMetricScope; + /** The row cap that was applied to this response (echoes the resolved request value, including the default). */ + limit: number; + /** Dimension values ranked by `count`, descending. At most `limit` rows. */ + data: Webflow.TopDimensionsRow[]; + filter?: Webflow.TopDimensionsFilter; +} diff --git a/src/api/types/TopDimensionsRow.ts b/src/api/types/TopDimensionsRow.ts new file mode 100644 index 00000000..20281d62 --- /dev/null +++ b/src/api/types/TopDimensionsRow.ts @@ -0,0 +1,13 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * A single value within the chosen dimension, with its count for the requested `metricScope`. + */ +export interface TopDimensionsRow { + /** Identifier for the dimension value. Pass this back into a `filter` on any Analyze report to scope that report to this value. */ + attributeKey: string; + /** Display label for the dimension value. For many dimensions this matches `attributeKey`; for others (such as `region`, `trafficSource`, and `audienceIds`) it's a human-readable label. */ + name: string; + /** Non-negative count for this dimension value, in units of the request's `metricScope`. */ + count: number; +} diff --git a/src/api/types/TopEventsCmsContextEntry.ts b/src/api/types/TopEventsCmsContextEntry.ts new file mode 100644 index 00000000..2871eaf8 --- /dev/null +++ b/src/api/types/TopEventsCmsContextEntry.ts @@ -0,0 +1,11 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * CMS collection-list rendering context for a top event row. + */ +export interface TopEventsCmsContextEntry { + /** Identifier of the CMS collection. */ + collectionId: string; + /** Identifier of the CMS item. */ + itemId: string; +} diff --git a/src/api/types/TopEventsComponentContextEntry.ts b/src/api/types/TopEventsComponentContextEntry.ts new file mode 100644 index 00000000..5ec23099 --- /dev/null +++ b/src/api/types/TopEventsComponentContextEntry.ts @@ -0,0 +1,11 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * Component rendering context for a top event row. + */ +export interface TopEventsComponentContextEntry { + /** Identifier of the component definition. */ + componentId: string; + /** Identifier of the component instance. */ + instanceId: string; +} diff --git a/src/api/types/TopEventsFilter.ts b/src/api/types/TopEventsFilter.ts new file mode 100644 index 00000000..962914e2 --- /dev/null +++ b/src/api/types/TopEventsFilter.ts @@ -0,0 +1,33 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Webflow from "../index"; + +/** + * Filter the top events report by dimension. Each property is an optional set of `AnalyzeFilterOperators` (`eq`, `in`, `ne`, `nin`) applied to the named dimension. Filter a given dimension in one place — either inside `filter` or as a top-level query parameter. + */ +export interface TopEventsFilter { + audienceIds?: Webflow.AnalyzeFilterOperators; + browser?: Webflow.AnalyzeFilterOperators; + collectionId?: Webflow.AnalyzeFilterOperators; + country?: Webflow.AnalyzeFilterOperators; + dayOfWeek?: Webflow.AnalyzeFilterOperators; + deviceBrand?: Webflow.AnalyzeFilterOperators; + deviceType?: Webflow.AnalyzeFilterOperators; + domain?: Webflow.AnalyzeFilterOperators; + itemSlug?: Webflow.AnalyzeFilterOperators; + language?: Webflow.AnalyzeFilterOperators; + locale?: Webflow.AnalyzeFilterOperators; + os?: Webflow.AnalyzeFilterOperators; + pageId?: Webflow.AnalyzeFilterOperators; + pagePath?: Webflow.AnalyzeFilterOperators; + region?: Webflow.AnalyzeFilterOperators; + timeOfDay?: Webflow.AnalyzeFilterOperators; + timezone?: Webflow.AnalyzeFilterOperators; + trafficSource?: Webflow.AnalyzeFilterOperators; + utmCampaign?: Webflow.AnalyzeFilterOperators; + utmContent?: Webflow.AnalyzeFilterOperators; + utmMedium?: Webflow.AnalyzeFilterOperators; + utmSource?: Webflow.AnalyzeFilterOperators; + utmTerm?: Webflow.AnalyzeFilterOperators; + visitStatus?: Webflow.AnalyzeFilterOperators; +} diff --git a/src/api/types/TopEventsResponse.ts b/src/api/types/TopEventsResponse.ts new file mode 100644 index 00000000..1dc5b42c --- /dev/null +++ b/src/api/types/TopEventsResponse.ts @@ -0,0 +1,18 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Webflow from "../index"; + +/** + * Response payload for the top events report. + */ +export interface TopEventsResponse { + /** Discriminator identifying the report type. */ + report: "top_events"; + window: Webflow.AnalyzeWindow; + /** The row cap that was applied to this response (echoes the resolved request value, including the default). */ + limit: number; + bucketing?: Webflow.AnalyzeDailyBucketing; + /** Events ranked by `count`, descending. At most `limit` rows. */ + data: Webflow.TopEventsRow[]; + filter?: Webflow.TopEventsFilter; +} diff --git a/src/api/types/TopEventsRow.ts b/src/api/types/TopEventsRow.ts new file mode 100644 index 00000000..99e85752 --- /dev/null +++ b/src/api/types/TopEventsRow.ts @@ -0,0 +1,29 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Webflow from "../index"; + +/** + * A single event in the ranked response, with its event count over the requested window. Events are counted individually, not rolled up into sessions, users, or pageviews, so this report has no `metricScope` — `count` is always the number of times the event fired. + */ +export interface TopEventsRow { + /** Opaque identifier of the event. */ + eventId: string; + /** Display name of the event. Omitted when the event has no name (customer-defined events may leave it blank). */ + name?: string; + /** Identifier of the Webflow page the event is associated with. Omitted when the upstream has no page context for the event. */ + pageId?: string; + /** Display name of the associated page. Omitted when the page label is unknown. */ + pageName?: string; + /** Number of times the event fired during the requested window. */ + count: number; + /** Component rendering context for the event. Omitted when the event is not rendered inside a component. */ + componentContext?: Webflow.TopEventsComponentContextEntry[]; + /** CMS collection-list rendering context for the event. Omitted when the event is not rendered inside a CMS collection list. */ + cmsContext?: Webflow.TopEventsCmsContextEntry[]; + /** Identifier of the CMS collection the associated page belongs to. Present only for events on CMS-templated pages. */ + collectionId?: string; + /** Slug of the CMS item the associated page represents. Present only for events on CMS-templated pages. */ + itemSlug?: string; + /** Daily count timeseries for this event over the requested window. Returned when `timeseries` is requested. */ + timeseries?: Webflow.TopEventsTimeseriesPoint[]; +} diff --git a/src/api/types/TopEventsTimeseriesPoint.ts b/src/api/types/TopEventsTimeseriesPoint.ts new file mode 100644 index 00000000..f46d7ef7 --- /dev/null +++ b/src/api/types/TopEventsTimeseriesPoint.ts @@ -0,0 +1,13 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * A single **daily** bucket in a per-event timeseries. Returned only when `timeseries` is requested. + * + * Buckets are aligned to local day boundaries in the response's `bucketing.bucketTimeZone`; the `timestamp` is the UTC instant for that local bucket start. A row's `timeseries` contains daily buckets for the requested window. When `timeseries` is requested but the event did not occur in the window, `timeseries` is an empty array — distinguishing "asked, none" from "didn't ask". + */ +export interface TopEventsTimeseriesPoint { + /** Start of the daily bucket, in ISO 8601 / RFC 3339 format. */ + timestamp: Date; + /** Number of times the event occurred on this day. */ + count: number; +} diff --git a/src/api/types/TopPagesFilter.ts b/src/api/types/TopPagesFilter.ts new file mode 100644 index 00000000..3ab68f1a --- /dev/null +++ b/src/api/types/TopPagesFilter.ts @@ -0,0 +1,40 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Webflow from "../index"; + +/** + * Filter the top pages report by dimension. Each property is an optional set of `AnalyzeFilterOperators` (`eq`, `in`, `ne`, `nin`) applied to the named dimension. Filter a given dimension in one place — either inside `filter` or as a top-level query parameter. + */ +export interface TopPagesFilter { + audienceIds?: Webflow.AnalyzeFilterOperators; + browser?: Webflow.AnalyzeFilterOperators; + collectionId?: Webflow.AnalyzeFilterOperators; + country?: Webflow.AnalyzeFilterOperators; + dayOfWeek?: Webflow.AnalyzeFilterOperators; + deviceBrand?: Webflow.AnalyzeFilterOperators; + deviceType?: Webflow.AnalyzeFilterOperators; + domain?: Webflow.AnalyzeFilterOperators; + itemSlug?: Webflow.AnalyzeFilterOperators; + language?: Webflow.AnalyzeFilterOperators; + locale?: Webflow.AnalyzeFilterOperators; + nextCollectionId?: Webflow.AnalyzeFilterOperators; + nextItemSlug?: Webflow.AnalyzeFilterOperators; + nextPageId?: Webflow.AnalyzeFilterOperators; + os?: Webflow.AnalyzeFilterOperators; + pageId?: Webflow.AnalyzeFilterOperators; + pagePath?: Webflow.AnalyzeFilterOperators; + previousCollectionId?: Webflow.AnalyzeFilterOperators; + previousItemSlug?: Webflow.AnalyzeFilterOperators; + previousPageId?: Webflow.AnalyzeFilterOperators; + referrer?: Webflow.AnalyzeFilterOperators; + region?: Webflow.AnalyzeFilterOperators; + timeOfDay?: Webflow.AnalyzeFilterOperators; + timezone?: Webflow.AnalyzeFilterOperators; + trafficSource?: Webflow.AnalyzeFilterOperators; + utmCampaign?: Webflow.AnalyzeFilterOperators; + utmContent?: Webflow.AnalyzeFilterOperators; + utmMedium?: Webflow.AnalyzeFilterOperators; + utmSource?: Webflow.AnalyzeFilterOperators; + utmTerm?: Webflow.AnalyzeFilterOperators; + visitStatus?: Webflow.AnalyzeFilterOperators; +} diff --git a/src/api/types/TopPagesResponse.ts b/src/api/types/TopPagesResponse.ts new file mode 100644 index 00000000..45a226d1 --- /dev/null +++ b/src/api/types/TopPagesResponse.ts @@ -0,0 +1,19 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Webflow from "../index"; + +/** + * Response payload for the top pages report. + */ +export interface TopPagesResponse { + /** Discriminator identifying the report type. */ + report: "top_pages"; + window: Webflow.AnalyzeWindow; + sortBy: Webflow.TopPagesSortBy; + /** The row cap that was applied to this response (echoes the resolved request value, including the default). */ + limit: number; + bucketing?: Webflow.AnalyzeDailyBucketing; + /** Pages ranked by `sortBy`, descending. At most `limit` rows. */ + data: Webflow.TopPagesRow[]; + filter?: Webflow.TopPagesFilter; +} diff --git a/src/api/types/TopPagesRow.ts b/src/api/types/TopPagesRow.ts new file mode 100644 index 00000000..be2f4c4a --- /dev/null +++ b/src/api/types/TopPagesRow.ts @@ -0,0 +1,25 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Webflow from "../index"; + +/** + * A single page in the ranked response. Every row carries all three scope counts (`sessionCount`, `userCount`, `pageviewCount`); `sortBy` governs only the row ordering. + */ +export interface TopPagesRow { + /** Identifier of the Webflow page. */ + pageId: string; + /** Display title for the page. Resolves to the page's CMS item name when applicable, otherwise the page label. Falls back to `pageId` when no title is available. */ + title: string; + /** Sessions attributed to this page during the requested window. */ + sessionCount: number; + /** Unique users that visited this page during the requested window. */ + userCount: number; + /** Pageviews recorded for this page during the requested window. */ + pageviewCount: number; + /** Identifier of the CMS collection this page belongs to. Present only for CMS-templated pages. */ + collectionId?: string; + /** Slug of the CMS item this row represents. Present only for CMS-templated pages. */ + itemSlug?: string; + /** Daily pageview timeseries for this page over the requested window. Returned when `timeseries` is requested. */ + timeseries?: Webflow.TopPagesTimeseriesPoint[]; +} diff --git a/src/api/types/TopPagesSortBy.ts b/src/api/types/TopPagesSortBy.ts new file mode 100644 index 00000000..25170ea1 --- /dev/null +++ b/src/api/types/TopPagesSortBy.ts @@ -0,0 +1,14 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * The metric used to rank rows in the response, descending. Row-level `sessionCount`, `userCount`, and `pageviewCount` are always all returned regardless of `sortBy`. + * - `session`: rank by session count (default). + * - `user`: rank by unique user count. + * - `pageview`: rank by pageview count. + */ +export const TopPagesSortBy = { + Session: "session", + User: "user", + Pageview: "pageview", +} as const; +export type TopPagesSortBy = (typeof TopPagesSortBy)[keyof typeof TopPagesSortBy]; diff --git a/src/api/types/TopPagesTimeseriesPoint.ts b/src/api/types/TopPagesTimeseriesPoint.ts new file mode 100644 index 00000000..28f59bc2 --- /dev/null +++ b/src/api/types/TopPagesTimeseriesPoint.ts @@ -0,0 +1,15 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * A single **daily** bucket in a per-page timeseries. Returned only when `timeseries` is requested. + * + * Buckets are aligned to local day boundaries in the response's `bucketing.bucketTimeZone`; the `timestamp` is the UTC instant for that local bucket start. A row's `timeseries` contains daily buckets for the requested window. + * + * Bucket counts are always pageviews, regardless of the request's `sortBy`. Row-level `sessionCount` / `userCount` / `pageviewCount` reflect `sortBy`. + */ +export interface TopPagesTimeseriesPoint { + /** Start of the daily bucket, in ISO 8601 / RFC 3339 format. */ + timestamp: Date; + /** Pageviews recorded for this day. */ + pageviewCount: number; +} diff --git a/src/api/types/TrafficDataPoint.ts b/src/api/types/TrafficDataPoint.ts new file mode 100644 index 00000000..65fa47d2 --- /dev/null +++ b/src/api/types/TrafficDataPoint.ts @@ -0,0 +1,11 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * A single daily bucket in a traffic time series. Buckets are aligned to local day boundaries in the response's `bucketing.bucketTimeZone`; the `timestamp` is the UTC instant for that local bucket start. + */ +export interface TrafficDataPoint { + /** Start of the daily bucket, in ISO 8601 / RFC 3339 format. */ + timestamp: Date; + /** Non-negative count for this day, in units of the request's `metricScope`. */ + count: number; +} diff --git a/src/api/types/TrafficFilter.ts b/src/api/types/TrafficFilter.ts new file mode 100644 index 00000000..8e9d0ef2 --- /dev/null +++ b/src/api/types/TrafficFilter.ts @@ -0,0 +1,40 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Webflow from "../index"; + +/** + * Filter the traffic report by dimension. Each property is an optional set of `AnalyzeFilterOperators` (`eq`, `in`, `ne`, `nin`) applied to the named dimension. Filter a given dimension in one place — either inside `filter` or as a top-level query parameter. + */ +export interface TrafficFilter { + audienceIds?: Webflow.AnalyzeFilterOperators; + browser?: Webflow.AnalyzeFilterOperators; + collectionId?: Webflow.AnalyzeFilterOperators; + country?: Webflow.AnalyzeFilterOperators; + dayOfWeek?: Webflow.AnalyzeFilterOperators; + deviceBrand?: Webflow.AnalyzeFilterOperators; + deviceType?: Webflow.AnalyzeFilterOperators; + domain?: Webflow.AnalyzeFilterOperators; + itemSlug?: Webflow.AnalyzeFilterOperators; + language?: Webflow.AnalyzeFilterOperators; + locale?: Webflow.AnalyzeFilterOperators; + nextCollectionId?: Webflow.AnalyzeFilterOperators; + nextItemSlug?: Webflow.AnalyzeFilterOperators; + nextPageId?: Webflow.AnalyzeFilterOperators; + os?: Webflow.AnalyzeFilterOperators; + pageId?: Webflow.AnalyzeFilterOperators; + pagePath?: Webflow.AnalyzeFilterOperators; + previousCollectionId?: Webflow.AnalyzeFilterOperators; + previousItemSlug?: Webflow.AnalyzeFilterOperators; + previousPageId?: Webflow.AnalyzeFilterOperators; + referrer?: Webflow.AnalyzeFilterOperators; + region?: Webflow.AnalyzeFilterOperators; + timeOfDay?: Webflow.AnalyzeFilterOperators; + timezone?: Webflow.AnalyzeFilterOperators; + trafficSource?: Webflow.AnalyzeFilterOperators; + utmCampaign?: Webflow.AnalyzeFilterOperators; + utmContent?: Webflow.AnalyzeFilterOperators; + utmMedium?: Webflow.AnalyzeFilterOperators; + utmSource?: Webflow.AnalyzeFilterOperators; + utmTerm?: Webflow.AnalyzeFilterOperators; + visitStatus?: Webflow.AnalyzeFilterOperators; +} diff --git a/src/api/types/TrafficMetricScope.ts b/src/api/types/TrafficMetricScope.ts new file mode 100644 index 00000000..a8d8c1e1 --- /dev/null +++ b/src/api/types/TrafficMetricScope.ts @@ -0,0 +1,14 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * The unit each `count` data point is measured in. + * - `session`: number of sessions. + * - `user`: number of unique users. + * - `pageview`: number of pageviews. + */ +export const TrafficMetricScope = { + Session: "session", + User: "user", + Pageview: "pageview", +} as const; +export type TrafficMetricScope = (typeof TrafficMetricScope)[keyof typeof TrafficMetricScope]; diff --git a/src/api/types/TrafficResponse.ts b/src/api/types/TrafficResponse.ts new file mode 100644 index 00000000..0a8786d7 --- /dev/null +++ b/src/api/types/TrafficResponse.ts @@ -0,0 +1,17 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Webflow from "../index"; + +/** + * Response payload for the traffic report. + */ +export interface TrafficResponse { + /** Discriminator identifying the report type. */ + report: "traffic"; + window: Webflow.AnalyzeWindow; + metricScope: Webflow.TrafficMetricScope; + bucketing: Webflow.AnalyzeDailyBucketing; + /** Time-ordered series of data points covering the requested window. */ + data: Webflow.TrafficDataPoint[]; + filter?: Webflow.TrafficFilter; +} diff --git a/src/api/types/index.ts b/src/api/types/index.ts index ce98580e..e8043f49 100644 --- a/src/api/types/index.ts +++ b/src/api/types/index.ts @@ -1,3 +1,9 @@ +export * from "./AnalyzeBucketTimeZone"; +export * from "./AnalyzeDailyBucketing"; +export * from "./AnalyzeDailyTimeseriesQuery"; +export * from "./AnalyzeFilterOperators"; +export * from "./AnalyzeTimeOnPageBucketing"; +export * from "./AnalyzeWindow"; export * from "./Application"; export * from "./Asset"; export * from "./AssetFolder"; @@ -65,6 +71,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 +109,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"; @@ -184,8 +203,10 @@ export * from "./SingleLocaleCreatedPayload"; export * from "./SingleLocaleCreatedPayloadFieldData"; export * from "./Site"; export * from "./SiteActivityLogItem"; +export * from "./SiteActivityLogItemActorType"; export * from "./SiteActivityLogItemEvent"; export * from "./SiteActivityLogItemResourceOperation"; +export * from "./SiteActivityLogItemSource"; export * from "./SiteActivityLogItemUser"; export * from "./SiteActivityLogResponse"; export * from "./SiteDataCollectionType"; @@ -197,6 +218,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"; @@ -224,6 +246,32 @@ export * from "./TextInputNodeWrite"; export * from "./TextNode"; export * from "./TextNodeText"; export * from "./TextNodeWrite"; +export * from "./TimeOnPageDataPoint"; +export * from "./TimeOnPageFilter"; +export * from "./TimeOnPageGranularityPeriod"; +export * from "./TimeOnPageMetricScope"; +export * from "./TimeOnPageResponse"; +export * from "./TimeOnPageTimeseriesQuery"; +export * from "./TopDimensionsDimension"; +export * from "./TopDimensionsFilter"; +export * from "./TopDimensionsMetricScope"; +export * from "./TopDimensionsResponse"; +export * from "./TopDimensionsRow"; +export * from "./TopEventsCmsContextEntry"; +export * from "./TopEventsComponentContextEntry"; +export * from "./TopEventsFilter"; +export * from "./TopEventsResponse"; +export * from "./TopEventsRow"; +export * from "./TopEventsTimeseriesPoint"; +export * from "./TopPagesFilter"; +export * from "./TopPagesResponse"; +export * from "./TopPagesRow"; +export * from "./TopPagesSortBy"; +export * from "./TopPagesTimeseriesPoint"; +export * from "./TrafficDataPoint"; +export * from "./TrafficFilter"; +export * from "./TrafficMetricScope"; +export * from "./TrafficResponse"; export * from "./TriggerType"; export * from "./UpdatedOrder"; export * from "./UserAccess"; diff --git a/src/serialization/resources/analyze/index.ts b/src/serialization/resources/analyze/index.ts new file mode 100644 index 00000000..3e5335fe --- /dev/null +++ b/src/serialization/resources/analyze/index.ts @@ -0,0 +1 @@ +export * from "./resources"; diff --git a/src/serialization/resources/analyze/resources/index.ts b/src/serialization/resources/analyze/resources/index.ts new file mode 100644 index 00000000..c2088110 --- /dev/null +++ b/src/serialization/resources/analyze/resources/index.ts @@ -0,0 +1,2 @@ +export * as reports from "./reports"; +export * from "./reports/types"; diff --git a/src/serialization/resources/analyze/resources/reports/index.ts b/src/serialization/resources/analyze/resources/reports/index.ts new file mode 100644 index 00000000..eea524d6 --- /dev/null +++ b/src/serialization/resources/analyze/resources/reports/index.ts @@ -0,0 +1 @@ +export * from "./types"; diff --git a/src/serialization/resources/analyze/resources/reports/types/ReportsTimeOnPageRequestDeviceType.ts b/src/serialization/resources/analyze/resources/reports/types/ReportsTimeOnPageRequestDeviceType.ts new file mode 100644 index 00000000..21c99f93 --- /dev/null +++ b/src/serialization/resources/analyze/resources/reports/types/ReportsTimeOnPageRequestDeviceType.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 ReportsTimeOnPageRequestDeviceType: core.serialization.Schema< + serializers.analyze.ReportsTimeOnPageRequestDeviceType.Raw, + Webflow.analyze.ReportsTimeOnPageRequestDeviceType +> = core.serialization.enum_(["desktop", "mobile", "tablet"]); + +export declare namespace ReportsTimeOnPageRequestDeviceType { + export type Raw = "desktop" | "mobile" | "tablet"; +} diff --git a/src/serialization/resources/analyze/resources/reports/types/ReportsTopDimensionsRequestDeviceType.ts b/src/serialization/resources/analyze/resources/reports/types/ReportsTopDimensionsRequestDeviceType.ts new file mode 100644 index 00000000..1de33c6e --- /dev/null +++ b/src/serialization/resources/analyze/resources/reports/types/ReportsTopDimensionsRequestDeviceType.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 ReportsTopDimensionsRequestDeviceType: core.serialization.Schema< + serializers.analyze.ReportsTopDimensionsRequestDeviceType.Raw, + Webflow.analyze.ReportsTopDimensionsRequestDeviceType +> = core.serialization.enum_(["desktop", "mobile", "tablet"]); + +export declare namespace ReportsTopDimensionsRequestDeviceType { + export type Raw = "desktop" | "mobile" | "tablet"; +} diff --git a/src/serialization/resources/analyze/resources/reports/types/ReportsTopEventsRequestDeviceType.ts b/src/serialization/resources/analyze/resources/reports/types/ReportsTopEventsRequestDeviceType.ts new file mode 100644 index 00000000..567df47a --- /dev/null +++ b/src/serialization/resources/analyze/resources/reports/types/ReportsTopEventsRequestDeviceType.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 ReportsTopEventsRequestDeviceType: core.serialization.Schema< + serializers.analyze.ReportsTopEventsRequestDeviceType.Raw, + Webflow.analyze.ReportsTopEventsRequestDeviceType +> = core.serialization.enum_(["desktop", "mobile", "tablet"]); + +export declare namespace ReportsTopEventsRequestDeviceType { + export type Raw = "desktop" | "mobile" | "tablet"; +} diff --git a/src/serialization/resources/analyze/resources/reports/types/ReportsTopPagesRequestDeviceType.ts b/src/serialization/resources/analyze/resources/reports/types/ReportsTopPagesRequestDeviceType.ts new file mode 100644 index 00000000..880cb883 --- /dev/null +++ b/src/serialization/resources/analyze/resources/reports/types/ReportsTopPagesRequestDeviceType.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 ReportsTopPagesRequestDeviceType: core.serialization.Schema< + serializers.analyze.ReportsTopPagesRequestDeviceType.Raw, + Webflow.analyze.ReportsTopPagesRequestDeviceType +> = core.serialization.enum_(["desktop", "mobile", "tablet"]); + +export declare namespace ReportsTopPagesRequestDeviceType { + export type Raw = "desktop" | "mobile" | "tablet"; +} diff --git a/src/serialization/resources/analyze/resources/reports/types/ReportsTrafficRequestDeviceType.ts b/src/serialization/resources/analyze/resources/reports/types/ReportsTrafficRequestDeviceType.ts new file mode 100644 index 00000000..b4ed49fa --- /dev/null +++ b/src/serialization/resources/analyze/resources/reports/types/ReportsTrafficRequestDeviceType.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 ReportsTrafficRequestDeviceType: core.serialization.Schema< + serializers.analyze.ReportsTrafficRequestDeviceType.Raw, + Webflow.analyze.ReportsTrafficRequestDeviceType +> = core.serialization.enum_(["desktop", "mobile", "tablet"]); + +export declare namespace ReportsTrafficRequestDeviceType { + export type Raw = "desktop" | "mobile" | "tablet"; +} diff --git a/src/serialization/resources/analyze/resources/reports/types/index.ts b/src/serialization/resources/analyze/resources/reports/types/index.ts new file mode 100644 index 00000000..5faa9573 --- /dev/null +++ b/src/serialization/resources/analyze/resources/reports/types/index.ts @@ -0,0 +1,5 @@ +export * from "./ReportsTimeOnPageRequestDeviceType"; +export * from "./ReportsTopDimensionsRequestDeviceType"; +export * from "./ReportsTopEventsRequestDeviceType"; +export * from "./ReportsTopPagesRequestDeviceType"; +export * from "./ReportsTrafficRequestDeviceType"; 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..607b1bfd 100644 --- a/src/serialization/resources/index.ts +++ b/src/serialization/resources/index.ts @@ -1,3 +1,4 @@ +export * as analyze from "./analyze"; export * as assets from "./assets"; export * from "./assets/client/requests"; export * as collections from "./collections"; @@ -5,6 +6,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/AnalyzeBucketTimeZone.ts b/src/serialization/types/AnalyzeBucketTimeZone.ts new file mode 100644 index 00000000..afa275c5 --- /dev/null +++ b/src/serialization/types/AnalyzeBucketTimeZone.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 AnalyzeBucketTimeZone: core.serialization.Schema< + serializers.AnalyzeBucketTimeZone.Raw, + Webflow.AnalyzeBucketTimeZone +> = core.serialization.string(); + +export declare namespace AnalyzeBucketTimeZone { + export type Raw = string; +} diff --git a/src/serialization/types/AnalyzeDailyBucketing.ts b/src/serialization/types/AnalyzeDailyBucketing.ts new file mode 100644 index 00000000..937677ed --- /dev/null +++ b/src/serialization/types/AnalyzeDailyBucketing.ts @@ -0,0 +1,21 @@ +// 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 { AnalyzeBucketTimeZone } from "./AnalyzeBucketTimeZone"; + +export const AnalyzeDailyBucketing: core.serialization.ObjectSchema< + serializers.AnalyzeDailyBucketing.Raw, + Webflow.AnalyzeDailyBucketing +> = core.serialization.object({ + granularityPeriod: core.serialization.stringLiteral("day"), + bucketTimeZone: AnalyzeBucketTimeZone, +}); + +export declare namespace AnalyzeDailyBucketing { + export interface Raw { + granularityPeriod: "day"; + bucketTimeZone: AnalyzeBucketTimeZone.Raw; + } +} diff --git a/src/serialization/types/AnalyzeDailyTimeseriesQuery.ts b/src/serialization/types/AnalyzeDailyTimeseriesQuery.ts new file mode 100644 index 00000000..54e494c4 --- /dev/null +++ b/src/serialization/types/AnalyzeDailyTimeseriesQuery.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 { AnalyzeBucketTimeZone } from "./AnalyzeBucketTimeZone"; + +export const AnalyzeDailyTimeseriesQuery: core.serialization.ObjectSchema< + serializers.AnalyzeDailyTimeseriesQuery.Raw, + Webflow.AnalyzeDailyTimeseriesQuery +> = core.serialization.object({ + bucketTimeZone: AnalyzeBucketTimeZone, +}); + +export declare namespace AnalyzeDailyTimeseriesQuery { + export interface Raw { + bucketTimeZone: AnalyzeBucketTimeZone.Raw; + } +} diff --git a/src/serialization/types/AnalyzeFilterOperators.ts b/src/serialization/types/AnalyzeFilterOperators.ts new file mode 100644 index 00000000..c97eadcf --- /dev/null +++ b/src/serialization/types/AnalyzeFilterOperators.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 AnalyzeFilterOperators: core.serialization.ObjectSchema< + serializers.AnalyzeFilterOperators.Raw, + Webflow.AnalyzeFilterOperators +> = core.serialization.object({ + eq: core.serialization.string().optional(), + in: core.serialization.list(core.serialization.string()).optional(), + ne: core.serialization.string().optional(), + nin: core.serialization.list(core.serialization.string()).optional(), +}); + +export declare namespace AnalyzeFilterOperators { + export interface Raw { + eq?: string | null; + in?: string[] | null; + ne?: string | null; + nin?: string[] | null; + } +} diff --git a/src/serialization/types/AnalyzeTimeOnPageBucketing.ts b/src/serialization/types/AnalyzeTimeOnPageBucketing.ts new file mode 100644 index 00000000..aae0c73f --- /dev/null +++ b/src/serialization/types/AnalyzeTimeOnPageBucketing.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 { AnalyzeBucketTimeZone } from "./AnalyzeBucketTimeZone"; +import { TimeOnPageGranularityPeriod } from "./TimeOnPageGranularityPeriod"; + +export const AnalyzeTimeOnPageBucketing: core.serialization.ObjectSchema< + serializers.AnalyzeTimeOnPageBucketing.Raw, + Webflow.AnalyzeTimeOnPageBucketing +> = core.serialization.object({ + granularityPeriod: TimeOnPageGranularityPeriod, + bucketTimeZone: AnalyzeBucketTimeZone, +}); + +export declare namespace AnalyzeTimeOnPageBucketing { + export interface Raw { + granularityPeriod: TimeOnPageGranularityPeriod.Raw; + bucketTimeZone: AnalyzeBucketTimeZone.Raw; + } +} diff --git a/src/serialization/types/AnalyzeWindow.ts b/src/serialization/types/AnalyzeWindow.ts new file mode 100644 index 00000000..0c6e517e --- /dev/null +++ b/src/serialization/types/AnalyzeWindow.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 AnalyzeWindow: core.serialization.ObjectSchema = + core.serialization.object({ + startTime: core.serialization.date(), + endTime: core.serialization.date(), + }); + +export declare namespace AnalyzeWindow { + export interface Raw { + startTime: string; + endTime: string; + } +} 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..d2ff3a61 100644 --- a/src/serialization/types/ErrorCode.ts +++ b/src/serialization/types/ErrorCode.ts @@ -6,7 +6,11 @@ import type * as serializers from "../index"; export const ErrorCode: core.serialization.Schema = core.serialization.enum_([ + "analyze_filter_conflict", + "analyze_input_validation", + "analyze_unsupported_filter", "bad_request", + "before_historical_floor", "collection_not_found", "conflict", "duplicate_collection", @@ -19,6 +23,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/SiteActivityLogItem.ts b/src/serialization/types/SiteActivityLogItem.ts index d923b15a..f5a1c424 100644 --- a/src/serialization/types/SiteActivityLogItem.ts +++ b/src/serialization/types/SiteActivityLogItem.ts @@ -3,8 +3,10 @@ import type * as Webflow from "../../api/index"; import * as core from "../../core"; import type * as serializers from "../index"; +import { SiteActivityLogItemActorType } from "./SiteActivityLogItemActorType"; import { SiteActivityLogItemEvent } from "./SiteActivityLogItemEvent"; import { SiteActivityLogItemResourceOperation } from "./SiteActivityLogItemResourceOperation"; +import { SiteActivityLogItemSource } from "./SiteActivityLogItemSource"; import { SiteActivityLogItemUser } from "./SiteActivityLogItemUser"; export const SiteActivityLogItem: core.serialization.ObjectSchema< @@ -22,6 +24,10 @@ export const SiteActivityLogItem: core.serialization.ObjectSchema< newValue: core.serialization.string().optional(), previousValue: core.serialization.string().optional(), payload: core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), + source: SiteActivityLogItemSource.optional(), + actorType: SiteActivityLogItemActorType.optional(), + actorId: core.serialization.string().optional(), + actorName: core.serialization.string().optional(), }); export declare namespace SiteActivityLogItem { @@ -37,5 +43,9 @@ export declare namespace SiteActivityLogItem { newValue?: string | null; previousValue?: string | null; payload?: Record | null; + source?: SiteActivityLogItemSource.Raw | null; + actorType?: SiteActivityLogItemActorType.Raw | null; + actorId?: string | null; + actorName?: string | null; } } diff --git a/src/serialization/types/SiteActivityLogItemActorType.ts b/src/serialization/types/SiteActivityLogItemActorType.ts new file mode 100644 index 00000000..d4b5a785 --- /dev/null +++ b/src/serialization/types/SiteActivityLogItemActorType.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 SiteActivityLogItemActorType: core.serialization.Schema< + serializers.SiteActivityLogItemActorType.Raw, + Webflow.SiteActivityLogItemActorType +> = core.serialization.enum_(["user", "agent", "workflow", "rule"]); + +export declare namespace SiteActivityLogItemActorType { + export type Raw = "user" | "agent" | "workflow" | "rule"; +} diff --git a/src/serialization/types/SiteActivityLogItemSource.ts b/src/serialization/types/SiteActivityLogItemSource.ts new file mode 100644 index 00000000..54fc4ef9 --- /dev/null +++ b/src/serialization/types/SiteActivityLogItemSource.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 SiteActivityLogItemSource: core.serialization.Schema< + serializers.SiteActivityLogItemSource.Raw, + Webflow.SiteActivityLogItemSource +> = core.serialization.enum_(["WEBFLOW_AI", "WEBFLOW_MCP", "DESIGNER", "SYSTEM"]); + +export declare namespace SiteActivityLogItemSource { + export type Raw = "WEBFLOW_AI" | "WEBFLOW_MCP" | "DESIGNER" | "SYSTEM"; +} 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/TimeOnPageDataPoint.ts b/src/serialization/types/TimeOnPageDataPoint.ts new file mode 100644 index 00000000..ba13764f --- /dev/null +++ b/src/serialization/types/TimeOnPageDataPoint.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 TimeOnPageDataPoint: core.serialization.ObjectSchema< + serializers.TimeOnPageDataPoint.Raw, + Webflow.TimeOnPageDataPoint +> = core.serialization.object({ + timestamp: core.serialization.date(), + averageSeconds: core.serialization.number(), +}); + +export declare namespace TimeOnPageDataPoint { + export interface Raw { + timestamp: string; + averageSeconds: number; + } +} diff --git a/src/serialization/types/TimeOnPageFilter.ts b/src/serialization/types/TimeOnPageFilter.ts new file mode 100644 index 00000000..34210da8 --- /dev/null +++ b/src/serialization/types/TimeOnPageFilter.ts @@ -0,0 +1,79 @@ +// 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 { AnalyzeFilterOperators } from "./AnalyzeFilterOperators"; + +export const TimeOnPageFilter: core.serialization.ObjectSchema< + serializers.TimeOnPageFilter.Raw, + Webflow.TimeOnPageFilter +> = core.serialization.object({ + audienceIds: AnalyzeFilterOperators.optional(), + browser: AnalyzeFilterOperators.optional(), + collectionId: AnalyzeFilterOperators.optional(), + country: AnalyzeFilterOperators.optional(), + dayOfWeek: AnalyzeFilterOperators.optional(), + deviceBrand: AnalyzeFilterOperators.optional(), + deviceType: AnalyzeFilterOperators.optional(), + domain: AnalyzeFilterOperators.optional(), + itemSlug: AnalyzeFilterOperators.optional(), + language: AnalyzeFilterOperators.optional(), + locale: AnalyzeFilterOperators.optional(), + nextCollectionId: AnalyzeFilterOperators.optional(), + nextItemSlug: AnalyzeFilterOperators.optional(), + nextPageId: AnalyzeFilterOperators.optional(), + os: AnalyzeFilterOperators.optional(), + pageId: AnalyzeFilterOperators.optional(), + pagePath: AnalyzeFilterOperators.optional(), + previousCollectionId: AnalyzeFilterOperators.optional(), + previousItemSlug: AnalyzeFilterOperators.optional(), + previousPageId: AnalyzeFilterOperators.optional(), + referrer: AnalyzeFilterOperators.optional(), + region: AnalyzeFilterOperators.optional(), + timeOfDay: AnalyzeFilterOperators.optional(), + timezone: AnalyzeFilterOperators.optional(), + trafficSource: AnalyzeFilterOperators.optional(), + utmCampaign: AnalyzeFilterOperators.optional(), + utmContent: AnalyzeFilterOperators.optional(), + utmMedium: AnalyzeFilterOperators.optional(), + utmSource: AnalyzeFilterOperators.optional(), + utmTerm: AnalyzeFilterOperators.optional(), + visitStatus: AnalyzeFilterOperators.optional(), +}); + +export declare namespace TimeOnPageFilter { + export interface Raw { + audienceIds?: AnalyzeFilterOperators.Raw | null; + browser?: AnalyzeFilterOperators.Raw | null; + collectionId?: AnalyzeFilterOperators.Raw | null; + country?: AnalyzeFilterOperators.Raw | null; + dayOfWeek?: AnalyzeFilterOperators.Raw | null; + deviceBrand?: AnalyzeFilterOperators.Raw | null; + deviceType?: AnalyzeFilterOperators.Raw | null; + domain?: AnalyzeFilterOperators.Raw | null; + itemSlug?: AnalyzeFilterOperators.Raw | null; + language?: AnalyzeFilterOperators.Raw | null; + locale?: AnalyzeFilterOperators.Raw | null; + nextCollectionId?: AnalyzeFilterOperators.Raw | null; + nextItemSlug?: AnalyzeFilterOperators.Raw | null; + nextPageId?: AnalyzeFilterOperators.Raw | null; + os?: AnalyzeFilterOperators.Raw | null; + pageId?: AnalyzeFilterOperators.Raw | null; + pagePath?: AnalyzeFilterOperators.Raw | null; + previousCollectionId?: AnalyzeFilterOperators.Raw | null; + previousItemSlug?: AnalyzeFilterOperators.Raw | null; + previousPageId?: AnalyzeFilterOperators.Raw | null; + referrer?: AnalyzeFilterOperators.Raw | null; + region?: AnalyzeFilterOperators.Raw | null; + timeOfDay?: AnalyzeFilterOperators.Raw | null; + timezone?: AnalyzeFilterOperators.Raw | null; + trafficSource?: AnalyzeFilterOperators.Raw | null; + utmCampaign?: AnalyzeFilterOperators.Raw | null; + utmContent?: AnalyzeFilterOperators.Raw | null; + utmMedium?: AnalyzeFilterOperators.Raw | null; + utmSource?: AnalyzeFilterOperators.Raw | null; + utmTerm?: AnalyzeFilterOperators.Raw | null; + visitStatus?: AnalyzeFilterOperators.Raw | null; + } +} diff --git a/src/serialization/types/TimeOnPageGranularityPeriod.ts b/src/serialization/types/TimeOnPageGranularityPeriod.ts new file mode 100644 index 00000000..9187135a --- /dev/null +++ b/src/serialization/types/TimeOnPageGranularityPeriod.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 TimeOnPageGranularityPeriod: core.serialization.Schema< + serializers.TimeOnPageGranularityPeriod.Raw, + Webflow.TimeOnPageGranularityPeriod +> = core.serialization.enum_(["day", "week"]); + +export declare namespace TimeOnPageGranularityPeriod { + export type Raw = "day" | "week"; +} diff --git a/src/serialization/types/TimeOnPageMetricScope.ts b/src/serialization/types/TimeOnPageMetricScope.ts new file mode 100644 index 00000000..aa012184 --- /dev/null +++ b/src/serialization/types/TimeOnPageMetricScope.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 TimeOnPageMetricScope: core.serialization.Schema< + serializers.TimeOnPageMetricScope.Raw, + Webflow.TimeOnPageMetricScope +> = core.serialization.enum_(["session", "user", "pageview"]); + +export declare namespace TimeOnPageMetricScope { + export type Raw = "session" | "user" | "pageview"; +} diff --git a/src/serialization/types/TimeOnPageResponse.ts b/src/serialization/types/TimeOnPageResponse.ts new file mode 100644 index 00000000..72991c30 --- /dev/null +++ b/src/serialization/types/TimeOnPageResponse.ts @@ -0,0 +1,33 @@ +// 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 { AnalyzeTimeOnPageBucketing } from "./AnalyzeTimeOnPageBucketing"; +import { AnalyzeWindow } from "./AnalyzeWindow"; +import { TimeOnPageDataPoint } from "./TimeOnPageDataPoint"; +import { TimeOnPageFilter } from "./TimeOnPageFilter"; +import { TimeOnPageMetricScope } from "./TimeOnPageMetricScope"; + +export const TimeOnPageResponse: core.serialization.ObjectSchema< + serializers.TimeOnPageResponse.Raw, + Webflow.TimeOnPageResponse +> = core.serialization.object({ + report: core.serialization.stringLiteral("time_on_page"), + window: AnalyzeWindow, + metricScope: TimeOnPageMetricScope, + bucketing: AnalyzeTimeOnPageBucketing.optional(), + data: core.serialization.list(TimeOnPageDataPoint), + filter: TimeOnPageFilter.optional(), +}); + +export declare namespace TimeOnPageResponse { + export interface Raw { + report: "time_on_page"; + window: AnalyzeWindow.Raw; + metricScope: TimeOnPageMetricScope.Raw; + bucketing?: AnalyzeTimeOnPageBucketing.Raw | null; + data: TimeOnPageDataPoint.Raw[]; + filter?: TimeOnPageFilter.Raw | null; + } +} diff --git a/src/serialization/types/TimeOnPageTimeseriesQuery.ts b/src/serialization/types/TimeOnPageTimeseriesQuery.ts new file mode 100644 index 00000000..6c253228 --- /dev/null +++ b/src/serialization/types/TimeOnPageTimeseriesQuery.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 { AnalyzeBucketTimeZone } from "./AnalyzeBucketTimeZone"; +import { TimeOnPageGranularityPeriod } from "./TimeOnPageGranularityPeriod"; + +export const TimeOnPageTimeseriesQuery: core.serialization.ObjectSchema< + serializers.TimeOnPageTimeseriesQuery.Raw, + Webflow.TimeOnPageTimeseriesQuery +> = core.serialization.object({ + granularityPeriod: TimeOnPageGranularityPeriod, + bucketTimeZone: AnalyzeBucketTimeZone, +}); + +export declare namespace TimeOnPageTimeseriesQuery { + export interface Raw { + granularityPeriod: TimeOnPageGranularityPeriod.Raw; + bucketTimeZone: AnalyzeBucketTimeZone.Raw; + } +} diff --git a/src/serialization/types/TopDimensionsDimension.ts b/src/serialization/types/TopDimensionsDimension.ts new file mode 100644 index 00000000..39d9bb3f --- /dev/null +++ b/src/serialization/types/TopDimensionsDimension.ts @@ -0,0 +1,45 @@ +// 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 TopDimensionsDimension: core.serialization.Schema< + serializers.TopDimensionsDimension.Raw, + Webflow.TopDimensionsDimension +> = core.serialization.enum_([ + "country", + "region", + "deviceType", + "os", + "browser", + "language", + "locale", + "referrer", + "trafficSource", + "utmCampaign", + "utmContent", + "utmMedium", + "utmSource", + "utmTerm", + "audienceIds", +]); + +export declare namespace TopDimensionsDimension { + export type Raw = + | "country" + | "region" + | "deviceType" + | "os" + | "browser" + | "language" + | "locale" + | "referrer" + | "trafficSource" + | "utmCampaign" + | "utmContent" + | "utmMedium" + | "utmSource" + | "utmTerm" + | "audienceIds"; +} diff --git a/src/serialization/types/TopDimensionsFilter.ts b/src/serialization/types/TopDimensionsFilter.ts new file mode 100644 index 00000000..f8c01a04 --- /dev/null +++ b/src/serialization/types/TopDimensionsFilter.ts @@ -0,0 +1,79 @@ +// 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 { AnalyzeFilterOperators } from "./AnalyzeFilterOperators"; + +export const TopDimensionsFilter: core.serialization.ObjectSchema< + serializers.TopDimensionsFilter.Raw, + Webflow.TopDimensionsFilter +> = core.serialization.object({ + audienceIds: AnalyzeFilterOperators.optional(), + browser: AnalyzeFilterOperators.optional(), + collectionId: AnalyzeFilterOperators.optional(), + country: AnalyzeFilterOperators.optional(), + dayOfWeek: AnalyzeFilterOperators.optional(), + deviceBrand: AnalyzeFilterOperators.optional(), + deviceType: AnalyzeFilterOperators.optional(), + domain: AnalyzeFilterOperators.optional(), + itemSlug: AnalyzeFilterOperators.optional(), + language: AnalyzeFilterOperators.optional(), + locale: AnalyzeFilterOperators.optional(), + nextCollectionId: AnalyzeFilterOperators.optional(), + nextItemSlug: AnalyzeFilterOperators.optional(), + nextPageId: AnalyzeFilterOperators.optional(), + os: AnalyzeFilterOperators.optional(), + pageId: AnalyzeFilterOperators.optional(), + pagePath: AnalyzeFilterOperators.optional(), + previousCollectionId: AnalyzeFilterOperators.optional(), + previousItemSlug: AnalyzeFilterOperators.optional(), + previousPageId: AnalyzeFilterOperators.optional(), + referrer: AnalyzeFilterOperators.optional(), + region: AnalyzeFilterOperators.optional(), + timeOfDay: AnalyzeFilterOperators.optional(), + timezone: AnalyzeFilterOperators.optional(), + trafficSource: AnalyzeFilterOperators.optional(), + utmCampaign: AnalyzeFilterOperators.optional(), + utmContent: AnalyzeFilterOperators.optional(), + utmMedium: AnalyzeFilterOperators.optional(), + utmSource: AnalyzeFilterOperators.optional(), + utmTerm: AnalyzeFilterOperators.optional(), + visitStatus: AnalyzeFilterOperators.optional(), +}); + +export declare namespace TopDimensionsFilter { + export interface Raw { + audienceIds?: AnalyzeFilterOperators.Raw | null; + browser?: AnalyzeFilterOperators.Raw | null; + collectionId?: AnalyzeFilterOperators.Raw | null; + country?: AnalyzeFilterOperators.Raw | null; + dayOfWeek?: AnalyzeFilterOperators.Raw | null; + deviceBrand?: AnalyzeFilterOperators.Raw | null; + deviceType?: AnalyzeFilterOperators.Raw | null; + domain?: AnalyzeFilterOperators.Raw | null; + itemSlug?: AnalyzeFilterOperators.Raw | null; + language?: AnalyzeFilterOperators.Raw | null; + locale?: AnalyzeFilterOperators.Raw | null; + nextCollectionId?: AnalyzeFilterOperators.Raw | null; + nextItemSlug?: AnalyzeFilterOperators.Raw | null; + nextPageId?: AnalyzeFilterOperators.Raw | null; + os?: AnalyzeFilterOperators.Raw | null; + pageId?: AnalyzeFilterOperators.Raw | null; + pagePath?: AnalyzeFilterOperators.Raw | null; + previousCollectionId?: AnalyzeFilterOperators.Raw | null; + previousItemSlug?: AnalyzeFilterOperators.Raw | null; + previousPageId?: AnalyzeFilterOperators.Raw | null; + referrer?: AnalyzeFilterOperators.Raw | null; + region?: AnalyzeFilterOperators.Raw | null; + timeOfDay?: AnalyzeFilterOperators.Raw | null; + timezone?: AnalyzeFilterOperators.Raw | null; + trafficSource?: AnalyzeFilterOperators.Raw | null; + utmCampaign?: AnalyzeFilterOperators.Raw | null; + utmContent?: AnalyzeFilterOperators.Raw | null; + utmMedium?: AnalyzeFilterOperators.Raw | null; + utmSource?: AnalyzeFilterOperators.Raw | null; + utmTerm?: AnalyzeFilterOperators.Raw | null; + visitStatus?: AnalyzeFilterOperators.Raw | null; + } +} diff --git a/src/serialization/types/TopDimensionsMetricScope.ts b/src/serialization/types/TopDimensionsMetricScope.ts new file mode 100644 index 00000000..b1fda725 --- /dev/null +++ b/src/serialization/types/TopDimensionsMetricScope.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 TopDimensionsMetricScope: core.serialization.Schema< + serializers.TopDimensionsMetricScope.Raw, + Webflow.TopDimensionsMetricScope +> = core.serialization.enum_(["session", "user"]); + +export declare namespace TopDimensionsMetricScope { + export type Raw = "session" | "user"; +} diff --git a/src/serialization/types/TopDimensionsResponse.ts b/src/serialization/types/TopDimensionsResponse.ts new file mode 100644 index 00000000..6a4becd1 --- /dev/null +++ b/src/serialization/types/TopDimensionsResponse.ts @@ -0,0 +1,35 @@ +// 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 { AnalyzeWindow } from "./AnalyzeWindow"; +import { TopDimensionsDimension } from "./TopDimensionsDimension"; +import { TopDimensionsFilter } from "./TopDimensionsFilter"; +import { TopDimensionsMetricScope } from "./TopDimensionsMetricScope"; +import { TopDimensionsRow } from "./TopDimensionsRow"; + +export const TopDimensionsResponse: core.serialization.ObjectSchema< + serializers.TopDimensionsResponse.Raw, + Webflow.TopDimensionsResponse +> = core.serialization.object({ + report: core.serialization.stringLiteral("top_dimensions"), + window: AnalyzeWindow, + dimension: TopDimensionsDimension, + metricScope: TopDimensionsMetricScope, + limit: core.serialization.number(), + data: core.serialization.list(TopDimensionsRow), + filter: TopDimensionsFilter.optional(), +}); + +export declare namespace TopDimensionsResponse { + export interface Raw { + report: "top_dimensions"; + window: AnalyzeWindow.Raw; + dimension: TopDimensionsDimension.Raw; + metricScope: TopDimensionsMetricScope.Raw; + limit: number; + data: TopDimensionsRow.Raw[]; + filter?: TopDimensionsFilter.Raw | null; + } +} diff --git a/src/serialization/types/TopDimensionsRow.ts b/src/serialization/types/TopDimensionsRow.ts new file mode 100644 index 00000000..88c1c8f2 --- /dev/null +++ b/src/serialization/types/TopDimensionsRow.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 TopDimensionsRow: core.serialization.ObjectSchema< + serializers.TopDimensionsRow.Raw, + Webflow.TopDimensionsRow +> = core.serialization.object({ + attributeKey: core.serialization.string(), + name: core.serialization.string(), + count: core.serialization.number(), +}); + +export declare namespace TopDimensionsRow { + export interface Raw { + attributeKey: string; + name: string; + count: number; + } +} diff --git a/src/serialization/types/TopEventsCmsContextEntry.ts b/src/serialization/types/TopEventsCmsContextEntry.ts new file mode 100644 index 00000000..2252b34f --- /dev/null +++ b/src/serialization/types/TopEventsCmsContextEntry.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 TopEventsCmsContextEntry: core.serialization.ObjectSchema< + serializers.TopEventsCmsContextEntry.Raw, + Webflow.TopEventsCmsContextEntry +> = core.serialization.object({ + collectionId: core.serialization.string(), + itemId: core.serialization.string(), +}); + +export declare namespace TopEventsCmsContextEntry { + export interface Raw { + collectionId: string; + itemId: string; + } +} diff --git a/src/serialization/types/TopEventsComponentContextEntry.ts b/src/serialization/types/TopEventsComponentContextEntry.ts new file mode 100644 index 00000000..d1efdeb4 --- /dev/null +++ b/src/serialization/types/TopEventsComponentContextEntry.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 TopEventsComponentContextEntry: core.serialization.ObjectSchema< + serializers.TopEventsComponentContextEntry.Raw, + Webflow.TopEventsComponentContextEntry +> = core.serialization.object({ + componentId: core.serialization.string(), + instanceId: core.serialization.string(), +}); + +export declare namespace TopEventsComponentContextEntry { + export interface Raw { + componentId: string; + instanceId: string; + } +} diff --git a/src/serialization/types/TopEventsFilter.ts b/src/serialization/types/TopEventsFilter.ts new file mode 100644 index 00000000..0d4c2b1b --- /dev/null +++ b/src/serialization/types/TopEventsFilter.ts @@ -0,0 +1,65 @@ +// 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 { AnalyzeFilterOperators } from "./AnalyzeFilterOperators"; + +export const TopEventsFilter: core.serialization.ObjectSchema< + serializers.TopEventsFilter.Raw, + Webflow.TopEventsFilter +> = core.serialization.object({ + audienceIds: AnalyzeFilterOperators.optional(), + browser: AnalyzeFilterOperators.optional(), + collectionId: AnalyzeFilterOperators.optional(), + country: AnalyzeFilterOperators.optional(), + dayOfWeek: AnalyzeFilterOperators.optional(), + deviceBrand: AnalyzeFilterOperators.optional(), + deviceType: AnalyzeFilterOperators.optional(), + domain: AnalyzeFilterOperators.optional(), + itemSlug: AnalyzeFilterOperators.optional(), + language: AnalyzeFilterOperators.optional(), + locale: AnalyzeFilterOperators.optional(), + os: AnalyzeFilterOperators.optional(), + pageId: AnalyzeFilterOperators.optional(), + pagePath: AnalyzeFilterOperators.optional(), + region: AnalyzeFilterOperators.optional(), + timeOfDay: AnalyzeFilterOperators.optional(), + timezone: AnalyzeFilterOperators.optional(), + trafficSource: AnalyzeFilterOperators.optional(), + utmCampaign: AnalyzeFilterOperators.optional(), + utmContent: AnalyzeFilterOperators.optional(), + utmMedium: AnalyzeFilterOperators.optional(), + utmSource: AnalyzeFilterOperators.optional(), + utmTerm: AnalyzeFilterOperators.optional(), + visitStatus: AnalyzeFilterOperators.optional(), +}); + +export declare namespace TopEventsFilter { + export interface Raw { + audienceIds?: AnalyzeFilterOperators.Raw | null; + browser?: AnalyzeFilterOperators.Raw | null; + collectionId?: AnalyzeFilterOperators.Raw | null; + country?: AnalyzeFilterOperators.Raw | null; + dayOfWeek?: AnalyzeFilterOperators.Raw | null; + deviceBrand?: AnalyzeFilterOperators.Raw | null; + deviceType?: AnalyzeFilterOperators.Raw | null; + domain?: AnalyzeFilterOperators.Raw | null; + itemSlug?: AnalyzeFilterOperators.Raw | null; + language?: AnalyzeFilterOperators.Raw | null; + locale?: AnalyzeFilterOperators.Raw | null; + os?: AnalyzeFilterOperators.Raw | null; + pageId?: AnalyzeFilterOperators.Raw | null; + pagePath?: AnalyzeFilterOperators.Raw | null; + region?: AnalyzeFilterOperators.Raw | null; + timeOfDay?: AnalyzeFilterOperators.Raw | null; + timezone?: AnalyzeFilterOperators.Raw | null; + trafficSource?: AnalyzeFilterOperators.Raw | null; + utmCampaign?: AnalyzeFilterOperators.Raw | null; + utmContent?: AnalyzeFilterOperators.Raw | null; + utmMedium?: AnalyzeFilterOperators.Raw | null; + utmSource?: AnalyzeFilterOperators.Raw | null; + utmTerm?: AnalyzeFilterOperators.Raw | null; + visitStatus?: AnalyzeFilterOperators.Raw | null; + } +} diff --git a/src/serialization/types/TopEventsResponse.ts b/src/serialization/types/TopEventsResponse.ts new file mode 100644 index 00000000..ace002f5 --- /dev/null +++ b/src/serialization/types/TopEventsResponse.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 { AnalyzeDailyBucketing } from "./AnalyzeDailyBucketing"; +import { AnalyzeWindow } from "./AnalyzeWindow"; +import { TopEventsFilter } from "./TopEventsFilter"; +import { TopEventsRow } from "./TopEventsRow"; + +export const TopEventsResponse: core.serialization.ObjectSchema< + serializers.TopEventsResponse.Raw, + Webflow.TopEventsResponse +> = core.serialization.object({ + report: core.serialization.stringLiteral("top_events"), + window: AnalyzeWindow, + limit: core.serialization.number(), + bucketing: AnalyzeDailyBucketing.optional(), + data: core.serialization.list(TopEventsRow), + filter: TopEventsFilter.optional(), +}); + +export declare namespace TopEventsResponse { + export interface Raw { + report: "top_events"; + window: AnalyzeWindow.Raw; + limit: number; + bucketing?: AnalyzeDailyBucketing.Raw | null; + data: TopEventsRow.Raw[]; + filter?: TopEventsFilter.Raw | null; + } +} diff --git a/src/serialization/types/TopEventsRow.ts b/src/serialization/types/TopEventsRow.ts new file mode 100644 index 00000000..257f67a6 --- /dev/null +++ b/src/serialization/types/TopEventsRow.ts @@ -0,0 +1,37 @@ +// 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 { TopEventsCmsContextEntry } from "./TopEventsCmsContextEntry"; +import { TopEventsComponentContextEntry } from "./TopEventsComponentContextEntry"; +import { TopEventsTimeseriesPoint } from "./TopEventsTimeseriesPoint"; + +export const TopEventsRow: core.serialization.ObjectSchema = + core.serialization.object({ + eventId: core.serialization.string(), + name: core.serialization.string().optional(), + pageId: core.serialization.string().optional(), + pageName: core.serialization.string().optional(), + count: core.serialization.number(), + componentContext: core.serialization.list(TopEventsComponentContextEntry).optional(), + cmsContext: core.serialization.list(TopEventsCmsContextEntry).optional(), + collectionId: core.serialization.string().optional(), + itemSlug: core.serialization.string().optional(), + timeseries: core.serialization.list(TopEventsTimeseriesPoint).optional(), + }); + +export declare namespace TopEventsRow { + export interface Raw { + eventId: string; + name?: string | null; + pageId?: string | null; + pageName?: string | null; + count: number; + componentContext?: TopEventsComponentContextEntry.Raw[] | null; + cmsContext?: TopEventsCmsContextEntry.Raw[] | null; + collectionId?: string | null; + itemSlug?: string | null; + timeseries?: TopEventsTimeseriesPoint.Raw[] | null; + } +} diff --git a/src/serialization/types/TopEventsTimeseriesPoint.ts b/src/serialization/types/TopEventsTimeseriesPoint.ts new file mode 100644 index 00000000..4af55d95 --- /dev/null +++ b/src/serialization/types/TopEventsTimeseriesPoint.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 TopEventsTimeseriesPoint: core.serialization.ObjectSchema< + serializers.TopEventsTimeseriesPoint.Raw, + Webflow.TopEventsTimeseriesPoint +> = core.serialization.object({ + timestamp: core.serialization.date(), + count: core.serialization.number(), +}); + +export declare namespace TopEventsTimeseriesPoint { + export interface Raw { + timestamp: string; + count: number; + } +} diff --git a/src/serialization/types/TopPagesFilter.ts b/src/serialization/types/TopPagesFilter.ts new file mode 100644 index 00000000..0bfd347f --- /dev/null +++ b/src/serialization/types/TopPagesFilter.ts @@ -0,0 +1,77 @@ +// 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 { AnalyzeFilterOperators } from "./AnalyzeFilterOperators"; + +export const TopPagesFilter: core.serialization.ObjectSchema = + core.serialization.object({ + audienceIds: AnalyzeFilterOperators.optional(), + browser: AnalyzeFilterOperators.optional(), + collectionId: AnalyzeFilterOperators.optional(), + country: AnalyzeFilterOperators.optional(), + dayOfWeek: AnalyzeFilterOperators.optional(), + deviceBrand: AnalyzeFilterOperators.optional(), + deviceType: AnalyzeFilterOperators.optional(), + domain: AnalyzeFilterOperators.optional(), + itemSlug: AnalyzeFilterOperators.optional(), + language: AnalyzeFilterOperators.optional(), + locale: AnalyzeFilterOperators.optional(), + nextCollectionId: AnalyzeFilterOperators.optional(), + nextItemSlug: AnalyzeFilterOperators.optional(), + nextPageId: AnalyzeFilterOperators.optional(), + os: AnalyzeFilterOperators.optional(), + pageId: AnalyzeFilterOperators.optional(), + pagePath: AnalyzeFilterOperators.optional(), + previousCollectionId: AnalyzeFilterOperators.optional(), + previousItemSlug: AnalyzeFilterOperators.optional(), + previousPageId: AnalyzeFilterOperators.optional(), + referrer: AnalyzeFilterOperators.optional(), + region: AnalyzeFilterOperators.optional(), + timeOfDay: AnalyzeFilterOperators.optional(), + timezone: AnalyzeFilterOperators.optional(), + trafficSource: AnalyzeFilterOperators.optional(), + utmCampaign: AnalyzeFilterOperators.optional(), + utmContent: AnalyzeFilterOperators.optional(), + utmMedium: AnalyzeFilterOperators.optional(), + utmSource: AnalyzeFilterOperators.optional(), + utmTerm: AnalyzeFilterOperators.optional(), + visitStatus: AnalyzeFilterOperators.optional(), + }); + +export declare namespace TopPagesFilter { + export interface Raw { + audienceIds?: AnalyzeFilterOperators.Raw | null; + browser?: AnalyzeFilterOperators.Raw | null; + collectionId?: AnalyzeFilterOperators.Raw | null; + country?: AnalyzeFilterOperators.Raw | null; + dayOfWeek?: AnalyzeFilterOperators.Raw | null; + deviceBrand?: AnalyzeFilterOperators.Raw | null; + deviceType?: AnalyzeFilterOperators.Raw | null; + domain?: AnalyzeFilterOperators.Raw | null; + itemSlug?: AnalyzeFilterOperators.Raw | null; + language?: AnalyzeFilterOperators.Raw | null; + locale?: AnalyzeFilterOperators.Raw | null; + nextCollectionId?: AnalyzeFilterOperators.Raw | null; + nextItemSlug?: AnalyzeFilterOperators.Raw | null; + nextPageId?: AnalyzeFilterOperators.Raw | null; + os?: AnalyzeFilterOperators.Raw | null; + pageId?: AnalyzeFilterOperators.Raw | null; + pagePath?: AnalyzeFilterOperators.Raw | null; + previousCollectionId?: AnalyzeFilterOperators.Raw | null; + previousItemSlug?: AnalyzeFilterOperators.Raw | null; + previousPageId?: AnalyzeFilterOperators.Raw | null; + referrer?: AnalyzeFilterOperators.Raw | null; + region?: AnalyzeFilterOperators.Raw | null; + timeOfDay?: AnalyzeFilterOperators.Raw | null; + timezone?: AnalyzeFilterOperators.Raw | null; + trafficSource?: AnalyzeFilterOperators.Raw | null; + utmCampaign?: AnalyzeFilterOperators.Raw | null; + utmContent?: AnalyzeFilterOperators.Raw | null; + utmMedium?: AnalyzeFilterOperators.Raw | null; + utmSource?: AnalyzeFilterOperators.Raw | null; + utmTerm?: AnalyzeFilterOperators.Raw | null; + visitStatus?: AnalyzeFilterOperators.Raw | null; + } +} diff --git a/src/serialization/types/TopPagesResponse.ts b/src/serialization/types/TopPagesResponse.ts new file mode 100644 index 00000000..9abc5532 --- /dev/null +++ b/src/serialization/types/TopPagesResponse.ts @@ -0,0 +1,35 @@ +// 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 { AnalyzeDailyBucketing } from "./AnalyzeDailyBucketing"; +import { AnalyzeWindow } from "./AnalyzeWindow"; +import { TopPagesFilter } from "./TopPagesFilter"; +import { TopPagesRow } from "./TopPagesRow"; +import { TopPagesSortBy } from "./TopPagesSortBy"; + +export const TopPagesResponse: core.serialization.ObjectSchema< + serializers.TopPagesResponse.Raw, + Webflow.TopPagesResponse +> = core.serialization.object({ + report: core.serialization.stringLiteral("top_pages"), + window: AnalyzeWindow, + sortBy: TopPagesSortBy, + limit: core.serialization.number(), + bucketing: AnalyzeDailyBucketing.optional(), + data: core.serialization.list(TopPagesRow), + filter: TopPagesFilter.optional(), +}); + +export declare namespace TopPagesResponse { + export interface Raw { + report: "top_pages"; + window: AnalyzeWindow.Raw; + sortBy: TopPagesSortBy.Raw; + limit: number; + bucketing?: AnalyzeDailyBucketing.Raw | null; + data: TopPagesRow.Raw[]; + filter?: TopPagesFilter.Raw | null; + } +} diff --git a/src/serialization/types/TopPagesRow.ts b/src/serialization/types/TopPagesRow.ts new file mode 100644 index 00000000..afac374c --- /dev/null +++ b/src/serialization/types/TopPagesRow.ts @@ -0,0 +1,31 @@ +// 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 { TopPagesTimeseriesPoint } from "./TopPagesTimeseriesPoint"; + +export const TopPagesRow: core.serialization.ObjectSchema = + core.serialization.object({ + pageId: core.serialization.string(), + title: core.serialization.string(), + sessionCount: core.serialization.number(), + userCount: core.serialization.number(), + pageviewCount: core.serialization.number(), + collectionId: core.serialization.string().optional(), + itemSlug: core.serialization.string().optional(), + timeseries: core.serialization.list(TopPagesTimeseriesPoint).optional(), + }); + +export declare namespace TopPagesRow { + export interface Raw { + pageId: string; + title: string; + sessionCount: number; + userCount: number; + pageviewCount: number; + collectionId?: string | null; + itemSlug?: string | null; + timeseries?: TopPagesTimeseriesPoint.Raw[] | null; + } +} diff --git a/src/serialization/types/TopPagesSortBy.ts b/src/serialization/types/TopPagesSortBy.ts new file mode 100644 index 00000000..c2405631 --- /dev/null +++ b/src/serialization/types/TopPagesSortBy.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 TopPagesSortBy: core.serialization.Schema = + core.serialization.enum_(["session", "user", "pageview"]); + +export declare namespace TopPagesSortBy { + export type Raw = "session" | "user" | "pageview"; +} diff --git a/src/serialization/types/TopPagesTimeseriesPoint.ts b/src/serialization/types/TopPagesTimeseriesPoint.ts new file mode 100644 index 00000000..45911efa --- /dev/null +++ b/src/serialization/types/TopPagesTimeseriesPoint.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 TopPagesTimeseriesPoint: core.serialization.ObjectSchema< + serializers.TopPagesTimeseriesPoint.Raw, + Webflow.TopPagesTimeseriesPoint +> = core.serialization.object({ + timestamp: core.serialization.date(), + pageviewCount: core.serialization.number(), +}); + +export declare namespace TopPagesTimeseriesPoint { + export interface Raw { + timestamp: string; + pageviewCount: number; + } +} diff --git a/src/serialization/types/TrafficDataPoint.ts b/src/serialization/types/TrafficDataPoint.ts new file mode 100644 index 00000000..8056c08c --- /dev/null +++ b/src/serialization/types/TrafficDataPoint.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 TrafficDataPoint: core.serialization.ObjectSchema< + serializers.TrafficDataPoint.Raw, + Webflow.TrafficDataPoint +> = core.serialization.object({ + timestamp: core.serialization.date(), + count: core.serialization.number(), +}); + +export declare namespace TrafficDataPoint { + export interface Raw { + timestamp: string; + count: number; + } +} diff --git a/src/serialization/types/TrafficFilter.ts b/src/serialization/types/TrafficFilter.ts new file mode 100644 index 00000000..6310d7a8 --- /dev/null +++ b/src/serialization/types/TrafficFilter.ts @@ -0,0 +1,77 @@ +// 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 { AnalyzeFilterOperators } from "./AnalyzeFilterOperators"; + +export const TrafficFilter: core.serialization.ObjectSchema = + core.serialization.object({ + audienceIds: AnalyzeFilterOperators.optional(), + browser: AnalyzeFilterOperators.optional(), + collectionId: AnalyzeFilterOperators.optional(), + country: AnalyzeFilterOperators.optional(), + dayOfWeek: AnalyzeFilterOperators.optional(), + deviceBrand: AnalyzeFilterOperators.optional(), + deviceType: AnalyzeFilterOperators.optional(), + domain: AnalyzeFilterOperators.optional(), + itemSlug: AnalyzeFilterOperators.optional(), + language: AnalyzeFilterOperators.optional(), + locale: AnalyzeFilterOperators.optional(), + nextCollectionId: AnalyzeFilterOperators.optional(), + nextItemSlug: AnalyzeFilterOperators.optional(), + nextPageId: AnalyzeFilterOperators.optional(), + os: AnalyzeFilterOperators.optional(), + pageId: AnalyzeFilterOperators.optional(), + pagePath: AnalyzeFilterOperators.optional(), + previousCollectionId: AnalyzeFilterOperators.optional(), + previousItemSlug: AnalyzeFilterOperators.optional(), + previousPageId: AnalyzeFilterOperators.optional(), + referrer: AnalyzeFilterOperators.optional(), + region: AnalyzeFilterOperators.optional(), + timeOfDay: AnalyzeFilterOperators.optional(), + timezone: AnalyzeFilterOperators.optional(), + trafficSource: AnalyzeFilterOperators.optional(), + utmCampaign: AnalyzeFilterOperators.optional(), + utmContent: AnalyzeFilterOperators.optional(), + utmMedium: AnalyzeFilterOperators.optional(), + utmSource: AnalyzeFilterOperators.optional(), + utmTerm: AnalyzeFilterOperators.optional(), + visitStatus: AnalyzeFilterOperators.optional(), + }); + +export declare namespace TrafficFilter { + export interface Raw { + audienceIds?: AnalyzeFilterOperators.Raw | null; + browser?: AnalyzeFilterOperators.Raw | null; + collectionId?: AnalyzeFilterOperators.Raw | null; + country?: AnalyzeFilterOperators.Raw | null; + dayOfWeek?: AnalyzeFilterOperators.Raw | null; + deviceBrand?: AnalyzeFilterOperators.Raw | null; + deviceType?: AnalyzeFilterOperators.Raw | null; + domain?: AnalyzeFilterOperators.Raw | null; + itemSlug?: AnalyzeFilterOperators.Raw | null; + language?: AnalyzeFilterOperators.Raw | null; + locale?: AnalyzeFilterOperators.Raw | null; + nextCollectionId?: AnalyzeFilterOperators.Raw | null; + nextItemSlug?: AnalyzeFilterOperators.Raw | null; + nextPageId?: AnalyzeFilterOperators.Raw | null; + os?: AnalyzeFilterOperators.Raw | null; + pageId?: AnalyzeFilterOperators.Raw | null; + pagePath?: AnalyzeFilterOperators.Raw | null; + previousCollectionId?: AnalyzeFilterOperators.Raw | null; + previousItemSlug?: AnalyzeFilterOperators.Raw | null; + previousPageId?: AnalyzeFilterOperators.Raw | null; + referrer?: AnalyzeFilterOperators.Raw | null; + region?: AnalyzeFilterOperators.Raw | null; + timeOfDay?: AnalyzeFilterOperators.Raw | null; + timezone?: AnalyzeFilterOperators.Raw | null; + trafficSource?: AnalyzeFilterOperators.Raw | null; + utmCampaign?: AnalyzeFilterOperators.Raw | null; + utmContent?: AnalyzeFilterOperators.Raw | null; + utmMedium?: AnalyzeFilterOperators.Raw | null; + utmSource?: AnalyzeFilterOperators.Raw | null; + utmTerm?: AnalyzeFilterOperators.Raw | null; + visitStatus?: AnalyzeFilterOperators.Raw | null; + } +} diff --git a/src/serialization/types/TrafficMetricScope.ts b/src/serialization/types/TrafficMetricScope.ts new file mode 100644 index 00000000..35063b7e --- /dev/null +++ b/src/serialization/types/TrafficMetricScope.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 TrafficMetricScope: core.serialization.Schema< + serializers.TrafficMetricScope.Raw, + Webflow.TrafficMetricScope +> = core.serialization.enum_(["session", "user", "pageview"]); + +export declare namespace TrafficMetricScope { + export type Raw = "session" | "user" | "pageview"; +} diff --git a/src/serialization/types/TrafficResponse.ts b/src/serialization/types/TrafficResponse.ts new file mode 100644 index 00000000..6ac4bff3 --- /dev/null +++ b/src/serialization/types/TrafficResponse.ts @@ -0,0 +1,33 @@ +// 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 { AnalyzeDailyBucketing } from "./AnalyzeDailyBucketing"; +import { AnalyzeWindow } from "./AnalyzeWindow"; +import { TrafficDataPoint } from "./TrafficDataPoint"; +import { TrafficFilter } from "./TrafficFilter"; +import { TrafficMetricScope } from "./TrafficMetricScope"; + +export const TrafficResponse: core.serialization.ObjectSchema< + serializers.TrafficResponse.Raw, + Webflow.TrafficResponse +> = core.serialization.object({ + report: core.serialization.stringLiteral("traffic"), + window: AnalyzeWindow, + metricScope: TrafficMetricScope, + bucketing: AnalyzeDailyBucketing, + data: core.serialization.list(TrafficDataPoint), + filter: TrafficFilter.optional(), +}); + +export declare namespace TrafficResponse { + export interface Raw { + report: "traffic"; + window: AnalyzeWindow.Raw; + metricScope: TrafficMetricScope.Raw; + bucketing: AnalyzeDailyBucketing.Raw; + data: TrafficDataPoint.Raw[]; + filter?: TrafficFilter.Raw | null; + } +} diff --git a/src/serialization/types/index.ts b/src/serialization/types/index.ts index ce98580e..e8043f49 100644 --- a/src/serialization/types/index.ts +++ b/src/serialization/types/index.ts @@ -1,3 +1,9 @@ +export * from "./AnalyzeBucketTimeZone"; +export * from "./AnalyzeDailyBucketing"; +export * from "./AnalyzeDailyTimeseriesQuery"; +export * from "./AnalyzeFilterOperators"; +export * from "./AnalyzeTimeOnPageBucketing"; +export * from "./AnalyzeWindow"; export * from "./Application"; export * from "./Asset"; export * from "./AssetFolder"; @@ -65,6 +71,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 +109,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"; @@ -184,8 +203,10 @@ export * from "./SingleLocaleCreatedPayload"; export * from "./SingleLocaleCreatedPayloadFieldData"; export * from "./Site"; export * from "./SiteActivityLogItem"; +export * from "./SiteActivityLogItemActorType"; export * from "./SiteActivityLogItemEvent"; export * from "./SiteActivityLogItemResourceOperation"; +export * from "./SiteActivityLogItemSource"; export * from "./SiteActivityLogItemUser"; export * from "./SiteActivityLogResponse"; export * from "./SiteDataCollectionType"; @@ -197,6 +218,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"; @@ -224,6 +246,32 @@ export * from "./TextInputNodeWrite"; export * from "./TextNode"; export * from "./TextNodeText"; export * from "./TextNodeWrite"; +export * from "./TimeOnPageDataPoint"; +export * from "./TimeOnPageFilter"; +export * from "./TimeOnPageGranularityPeriod"; +export * from "./TimeOnPageMetricScope"; +export * from "./TimeOnPageResponse"; +export * from "./TimeOnPageTimeseriesQuery"; +export * from "./TopDimensionsDimension"; +export * from "./TopDimensionsFilter"; +export * from "./TopDimensionsMetricScope"; +export * from "./TopDimensionsResponse"; +export * from "./TopDimensionsRow"; +export * from "./TopEventsCmsContextEntry"; +export * from "./TopEventsComponentContextEntry"; +export * from "./TopEventsFilter"; +export * from "./TopEventsResponse"; +export * from "./TopEventsRow"; +export * from "./TopEventsTimeseriesPoint"; +export * from "./TopPagesFilter"; +export * from "./TopPagesResponse"; +export * from "./TopPagesRow"; +export * from "./TopPagesSortBy"; +export * from "./TopPagesTimeseriesPoint"; +export * from "./TrafficDataPoint"; +export * from "./TrafficFilter"; +export * from "./TrafficMetricScope"; +export * from "./TrafficResponse"; export * from "./TriggerType"; export * from "./UpdatedOrder"; export * from "./UserAccess"; diff --git a/tests/wire/analyze/reports.test.ts b/tests/wire/analyze/reports.test.ts new file mode 100644 index 00000000..f238159c --- /dev/null +++ b/tests/wire/analyze/reports.test.ts @@ -0,0 +1,2477 @@ +// 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("ReportsClient", () => { + test("traffic (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 = { + report: "traffic", + window: { startTime: "2026-04-01T00:00:00Z", endTime: "2026-04-08T00:00:00Z" }, + metricScope: "session", + bucketing: { granularityPeriod: "day", bucketTimeZone: "UTC" }, + data: [ + { timestamp: "2026-04-01T00:00:00Z", count: 1234 }, + { timestamp: "2026-04-02T00:00:00Z", count: 1180 }, + { timestamp: "2026-04-03T00:00:00Z", count: 1322 }, + { timestamp: "2026-04-04T00:00:00Z", count: 980 }, + { timestamp: "2026-04-05T00:00:00Z", count: 1041 }, + { timestamp: "2026-04-06T00:00:00Z", count: 1487 }, + { timestamp: "2026-04-07T00:00:00Z", count: 1602 }, + ], + filter: { + audienceIds: { eq: "US", in: ["US", "CA"], ne: "US", nin: ["US", "CA"] }, + browser: { eq: "Chrome", in: ["US", "CA"], ne: "US", nin: ["US", "CA"] }, + collectionId: { eq: "US", in: ["US", "CA"], ne: "US", nin: ["US", "CA"] }, + country: { eq: "US", in: ["US", "CA"], ne: "US", nin: ["US", "CA"] }, + dayOfWeek: { eq: "US", in: ["US", "CA"], ne: "US", nin: ["US", "CA"] }, + deviceBrand: { eq: "US", in: ["US", "CA"], ne: "US", nin: ["US", "CA"] }, + deviceType: { eq: "desktop", in: ["US", "CA"], ne: "US", nin: ["US", "CA"] }, + domain: { eq: "US", in: ["US", "CA"], ne: "US", nin: ["US", "CA"] }, + itemSlug: { eq: "US", in: ["US", "CA"], ne: "US", nin: ["US", "CA"] }, + language: { eq: "US", in: ["US", "CA"], ne: "US", nin: ["US", "CA"] }, + locale: { eq: "US", in: ["US", "CA"], ne: "US", nin: ["US", "CA"] }, + nextCollectionId: { eq: "US", in: ["US", "CA"], ne: "US", nin: ["US", "CA"] }, + nextItemSlug: { eq: "US", in: ["US", "CA"], ne: "US", nin: ["US", "CA"] }, + nextPageId: { eq: "US", in: ["US", "CA"], ne: "US", nin: ["US", "CA"] }, + os: { eq: "US", in: ["US", "CA"], ne: "US", nin: ["US", "CA"] }, + pageId: { eq: "US", in: ["US", "CA"], ne: "US", nin: ["US", "CA"] }, + pagePath: { eq: "/towels", in: ["US", "CA"], ne: "US", nin: ["US", "CA"] }, + previousCollectionId: { eq: "US", in: ["US", "CA"], ne: "US", nin: ["US", "CA"] }, + previousItemSlug: { eq: "US", in: ["US", "CA"], ne: "US", nin: ["US", "CA"] }, + previousPageId: { eq: "US", in: ["US", "CA"], ne: "US", nin: ["US", "CA"] }, + referrer: { eq: "google.com", in: ["US", "CA"], ne: "US", nin: ["US", "CA"] }, + region: { eq: "US", in: ["US", "CA"], ne: "US", nin: ["US", "CA"] }, + timeOfDay: { eq: "US", in: ["US", "CA"], ne: "US", nin: ["US", "CA"] }, + timezone: { eq: "US", in: ["US", "CA"], ne: "US", nin: ["US", "CA"] }, + trafficSource: { eq: "SO", in: ["US", "CA"], ne: "US", nin: ["US", "CA"] }, + utmCampaign: { eq: "dont-panic-2026", in: ["US", "CA"], ne: "US", nin: ["US", "CA"] }, + utmContent: { eq: "US", in: ["US", "CA"], ne: "US", nin: ["US", "CA"] }, + utmMedium: { eq: "email", in: ["US", "CA"], ne: "US", nin: ["US", "CA"] }, + utmSource: { eq: "hitchhikers-guide", in: ["US", "CA"], ne: "US", nin: ["US", "CA"] }, + utmTerm: { eq: "US", in: ["US", "CA"], ne: "US", nin: ["US", "CA"] }, + visitStatus: { eq: "US", in: ["US", "CA"], ne: "US", nin: ["US", "CA"] }, + }, + }; + server + .mockEndpoint() + .get("/sites/580e63e98c9a982ac9b8b741/analyze/reports/traffic") + .respondWith() + .statusCode(200) + .jsonBody(rawResponseBody) + .build(); + + const response = await client.analyze.reports.traffic("580e63e98c9a982ac9b8b741", { + startTime: new Date("2026-04-01T00:00:00.000Z"), + endTime: new Date("2026-04-08T00:00:00.000Z"), + metricScope: "session", + bucketTimeZone: "America/New_York", + deviceType: "desktop", + country: "US", + pagePath: "/towels", + trafficSource: "SO", + referrer: "google.com", + browser: "Chrome", + utmCampaign: "dont-panic-2026", + utmMedium: "email", + utmSource: "hitchhikers-guide", + }); + expect(response).toEqual({ + report: "traffic", + window: { + startTime: new Date("2026-04-01T00:00:00.000Z"), + endTime: new Date("2026-04-08T00:00:00.000Z"), + }, + metricScope: "session", + bucketing: { + granularityPeriod: "day", + bucketTimeZone: "UTC", + }, + data: [ + { + timestamp: new Date("2026-04-01T00:00:00.000Z"), + count: 1234, + }, + { + timestamp: new Date("2026-04-02T00:00:00.000Z"), + count: 1180, + }, + { + timestamp: new Date("2026-04-03T00:00:00.000Z"), + count: 1322, + }, + { + timestamp: new Date("2026-04-04T00:00:00.000Z"), + count: 980, + }, + { + timestamp: new Date("2026-04-05T00:00:00.000Z"), + count: 1041, + }, + { + timestamp: new Date("2026-04-06T00:00:00.000Z"), + count: 1487, + }, + { + timestamp: new Date("2026-04-07T00:00:00.000Z"), + count: 1602, + }, + ], + filter: { + audienceIds: { + eq: "US", + in: ["US", "CA"], + ne: "US", + nin: ["US", "CA"], + }, + browser: { + eq: "Chrome", + in: ["US", "CA"], + ne: "US", + nin: ["US", "CA"], + }, + collectionId: { + eq: "US", + in: ["US", "CA"], + ne: "US", + nin: ["US", "CA"], + }, + country: { + eq: "US", + in: ["US", "CA"], + ne: "US", + nin: ["US", "CA"], + }, + dayOfWeek: { + eq: "US", + in: ["US", "CA"], + ne: "US", + nin: ["US", "CA"], + }, + deviceBrand: { + eq: "US", + in: ["US", "CA"], + ne: "US", + nin: ["US", "CA"], + }, + deviceType: { + eq: "desktop", + in: ["US", "CA"], + ne: "US", + nin: ["US", "CA"], + }, + domain: { + eq: "US", + in: ["US", "CA"], + ne: "US", + nin: ["US", "CA"], + }, + itemSlug: { + eq: "US", + in: ["US", "CA"], + ne: "US", + nin: ["US", "CA"], + }, + language: { + eq: "US", + in: ["US", "CA"], + ne: "US", + nin: ["US", "CA"], + }, + locale: { + eq: "US", + in: ["US", "CA"], + ne: "US", + nin: ["US", "CA"], + }, + nextCollectionId: { + eq: "US", + in: ["US", "CA"], + ne: "US", + nin: ["US", "CA"], + }, + nextItemSlug: { + eq: "US", + in: ["US", "CA"], + ne: "US", + nin: ["US", "CA"], + }, + nextPageId: { + eq: "US", + in: ["US", "CA"], + ne: "US", + nin: ["US", "CA"], + }, + os: { + eq: "US", + in: ["US", "CA"], + ne: "US", + nin: ["US", "CA"], + }, + pageId: { + eq: "US", + in: ["US", "CA"], + ne: "US", + nin: ["US", "CA"], + }, + pagePath: { + eq: "/towels", + in: ["US", "CA"], + ne: "US", + nin: ["US", "CA"], + }, + previousCollectionId: { + eq: "US", + in: ["US", "CA"], + ne: "US", + nin: ["US", "CA"], + }, + previousItemSlug: { + eq: "US", + in: ["US", "CA"], + ne: "US", + nin: ["US", "CA"], + }, + previousPageId: { + eq: "US", + in: ["US", "CA"], + ne: "US", + nin: ["US", "CA"], + }, + referrer: { + eq: "google.com", + in: ["US", "CA"], + ne: "US", + nin: ["US", "CA"], + }, + region: { + eq: "US", + in: ["US", "CA"], + ne: "US", + nin: ["US", "CA"], + }, + timeOfDay: { + eq: "US", + in: ["US", "CA"], + ne: "US", + nin: ["US", "CA"], + }, + timezone: { + eq: "US", + in: ["US", "CA"], + ne: "US", + nin: ["US", "CA"], + }, + trafficSource: { + eq: "SO", + in: ["US", "CA"], + ne: "US", + nin: ["US", "CA"], + }, + utmCampaign: { + eq: "dont-panic-2026", + in: ["US", "CA"], + ne: "US", + nin: ["US", "CA"], + }, + utmContent: { + eq: "US", + in: ["US", "CA"], + ne: "US", + nin: ["US", "CA"], + }, + utmMedium: { + eq: "email", + in: ["US", "CA"], + ne: "US", + nin: ["US", "CA"], + }, + utmSource: { + eq: "hitchhikers-guide", + in: ["US", "CA"], + ne: "US", + nin: ["US", "CA"], + }, + utmTerm: { + eq: "US", + in: ["US", "CA"], + ne: "US", + nin: ["US", "CA"], + }, + visitStatus: { + eq: "US", + in: ["US", "CA"], + ne: "US", + nin: ["US", "CA"], + }, + }, + }); + }); + + test("traffic (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/analyze/reports/traffic") + .respondWith() + .statusCode(400) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.analyze.reports.traffic("site_id", { + startTime: new Date("2024-01-15T09:30:00.000Z"), + endTime: new Date("2024-01-15T09:30:00.000Z"), + metricScope: "session", + bucketTimeZone: "bucketTimeZone", + }); + }).rejects.toThrow(Webflow.BadRequestError); + }); + + test("traffic (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/analyze/reports/traffic") + .respondWith() + .statusCode(401) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.analyze.reports.traffic("site_id", { + startTime: new Date("2024-01-15T09:30:00.000Z"), + endTime: new Date("2024-01-15T09:30:00.000Z"), + metricScope: "session", + bucketTimeZone: "bucketTimeZone", + }); + }).rejects.toThrow(Webflow.UnauthorizedError); + }); + + test("traffic (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/analyze/reports/traffic") + .respondWith() + .statusCode(403) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.analyze.reports.traffic("site_id", { + startTime: new Date("2024-01-15T09:30:00.000Z"), + endTime: new Date("2024-01-15T09:30:00.000Z"), + metricScope: "session", + bucketTimeZone: "bucketTimeZone", + }); + }).rejects.toThrow(Webflow.ForbiddenError); + }); + + test("traffic (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/analyze/reports/traffic") + .respondWith() + .statusCode(404) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.analyze.reports.traffic("site_id", { + startTime: new Date("2024-01-15T09:30:00.000Z"), + endTime: new Date("2024-01-15T09:30:00.000Z"), + metricScope: "session", + bucketTimeZone: "bucketTimeZone", + }); + }).rejects.toThrow(Webflow.NotFoundError); + }); + + test("traffic (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/analyze/reports/traffic") + .respondWith() + .statusCode(429) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.analyze.reports.traffic("site_id", { + startTime: new Date("2024-01-15T09:30:00.000Z"), + endTime: new Date("2024-01-15T09:30:00.000Z"), + metricScope: "session", + bucketTimeZone: "bucketTimeZone", + }); + }).rejects.toThrow(Webflow.TooManyRequestsError); + }); + + test("traffic (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/analyze/reports/traffic") + .respondWith() + .statusCode(500) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.analyze.reports.traffic("site_id", { + startTime: new Date("2024-01-15T09:30:00.000Z"), + endTime: new Date("2024-01-15T09:30:00.000Z"), + metricScope: "session", + bucketTimeZone: "bucketTimeZone", + }); + }).rejects.toThrow(Webflow.InternalServerError); + }); + + test("topPages (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 = { + report: "top_pages", + window: { startTime: "2026-04-01T00:00:00Z", endTime: "2026-04-08T00:00:00Z" }, + sortBy: "session", + limit: 25, + bucketing: { granularityPeriod: "day", bucketTimeZone: "UTC" }, + data: [ + { + pageId: "65f1b2c4a8d3e5f7a9c1b2d3", + title: "Don't Panic — Towels & Travel Gear", + sessionCount: 4242, + userCount: 3900, + pageviewCount: 5400, + collectionId: "6494a077f0050acad8774bd1", + itemSlug: "so-long-and-thanks-for-all-the-fish", + timeseries: [ + { timestamp: "2026-04-01T00:00:00Z", pageviewCount: 720 }, + { timestamp: "2026-04-02T00:00:00Z", pageviewCount: 810 }, + { timestamp: "2026-04-03T00:00:00Z", pageviewCount: 690 }, + { timestamp: "2026-04-04T00:00:00Z", pageviewCount: 750 }, + { timestamp: "2026-04-05T00:00:00Z", pageviewCount: 820 }, + { timestamp: "2026-04-06T00:00:00Z", pageviewCount: 780 }, + { timestamp: "2026-04-07T00:00:00Z", pageviewCount: 830 }, + ], + }, + { + pageId: "65f1b2c4a8d3e5f7a9c1b2d4", + title: "So Long, and Thanks for All the Fish", + sessionCount: 1800, + userCount: 1700, + pageviewCount: 2300, + collectionId: "6494a077f0050acad8774bd1", + itemSlug: "so-long-and-thanks-for-all-the-fish", + timeseries: [ + { timestamp: "2026-04-01T00:00:00Z", pageviewCount: 280 }, + { timestamp: "2026-04-02T00:00:00Z", pageviewCount: 350 }, + { timestamp: "2026-04-03T00:00:00Z", pageviewCount: 310 }, + { timestamp: "2026-04-04T00:00:00Z", pageviewCount: 320 }, + { timestamp: "2026-04-05T00:00:00Z", pageviewCount: 340 }, + { timestamp: "2026-04-06T00:00:00Z", pageviewCount: 360 }, + { timestamp: "2026-04-07T00:00:00Z", pageviewCount: 340 }, + ], + }, + ], + filter: { + audienceIds: { eq: "US", in: ["US", "CA"], ne: "US", nin: ["US", "CA"] }, + browser: { eq: "Chrome", in: ["US", "CA"], ne: "US", nin: ["US", "CA"] }, + collectionId: { eq: "US", in: ["US", "CA"], ne: "US", nin: ["US", "CA"] }, + country: { eq: "US", in: ["US", "CA"], ne: "US", nin: ["US", "CA"] }, + dayOfWeek: { eq: "US", in: ["US", "CA"], ne: "US", nin: ["US", "CA"] }, + deviceBrand: { eq: "US", in: ["US", "CA"], ne: "US", nin: ["US", "CA"] }, + deviceType: { eq: "desktop", in: ["US", "CA"], ne: "US", nin: ["US", "CA"] }, + domain: { eq: "US", in: ["US", "CA"], ne: "US", nin: ["US", "CA"] }, + itemSlug: { eq: "US", in: ["US", "CA"], ne: "US", nin: ["US", "CA"] }, + language: { eq: "US", in: ["US", "CA"], ne: "US", nin: ["US", "CA"] }, + locale: { eq: "US", in: ["US", "CA"], ne: "US", nin: ["US", "CA"] }, + nextCollectionId: { eq: "US", in: ["US", "CA"], ne: "US", nin: ["US", "CA"] }, + nextItemSlug: { eq: "US", in: ["US", "CA"], ne: "US", nin: ["US", "CA"] }, + nextPageId: { eq: "US", in: ["US", "CA"], ne: "US", nin: ["US", "CA"] }, + os: { eq: "US", in: ["US", "CA"], ne: "US", nin: ["US", "CA"] }, + pageId: { eq: "US", in: ["US", "CA"], ne: "US", nin: ["US", "CA"] }, + pagePath: { eq: "/towels", in: ["US", "CA"], ne: "US", nin: ["US", "CA"] }, + previousCollectionId: { eq: "US", in: ["US", "CA"], ne: "US", nin: ["US", "CA"] }, + previousItemSlug: { eq: "US", in: ["US", "CA"], ne: "US", nin: ["US", "CA"] }, + previousPageId: { eq: "US", in: ["US", "CA"], ne: "US", nin: ["US", "CA"] }, + referrer: { eq: "google.com", in: ["US", "CA"], ne: "US", nin: ["US", "CA"] }, + region: { eq: "US", in: ["US", "CA"], ne: "US", nin: ["US", "CA"] }, + timeOfDay: { eq: "US", in: ["US", "CA"], ne: "US", nin: ["US", "CA"] }, + timezone: { eq: "US", in: ["US", "CA"], ne: "US", nin: ["US", "CA"] }, + trafficSource: { eq: "SO", in: ["US", "CA"], ne: "US", nin: ["US", "CA"] }, + utmCampaign: { eq: "dont-panic-2026", in: ["US", "CA"], ne: "US", nin: ["US", "CA"] }, + utmContent: { eq: "US", in: ["US", "CA"], ne: "US", nin: ["US", "CA"] }, + utmMedium: { eq: "email", in: ["US", "CA"], ne: "US", nin: ["US", "CA"] }, + utmSource: { eq: "hitchhikers-guide", in: ["US", "CA"], ne: "US", nin: ["US", "CA"] }, + utmTerm: { eq: "US", in: ["US", "CA"], ne: "US", nin: ["US", "CA"] }, + visitStatus: { eq: "US", in: ["US", "CA"], ne: "US", nin: ["US", "CA"] }, + }, + }; + server + .mockEndpoint() + .get("/sites/580e63e98c9a982ac9b8b741/analyze/reports/top_pages") + .respondWith() + .statusCode(200) + .jsonBody(rawResponseBody) + .build(); + + const response = await client.analyze.reports.topPages("580e63e98c9a982ac9b8b741", { + startTime: new Date("2026-04-01T00:00:00.000Z"), + endTime: new Date("2026-04-08T00:00:00.000Z"), + sortBy: "session", + limit: 1, + deviceType: "desktop", + country: "US", + pagePath: "/towels", + trafficSource: "SO", + referrer: "google.com", + browser: "Chrome", + utmCampaign: "dont-panic-2026", + utmMedium: "email", + utmSource: "hitchhikers-guide", + }); + expect(response).toEqual({ + report: "top_pages", + window: { + startTime: new Date("2026-04-01T00:00:00.000Z"), + endTime: new Date("2026-04-08T00:00:00.000Z"), + }, + sortBy: "session", + limit: 25, + bucketing: { + granularityPeriod: "day", + bucketTimeZone: "UTC", + }, + data: [ + { + pageId: "65f1b2c4a8d3e5f7a9c1b2d3", + title: "Don't Panic \u2014 Towels & Travel Gear", + sessionCount: 4242, + userCount: 3900, + pageviewCount: 5400, + collectionId: "6494a077f0050acad8774bd1", + itemSlug: "so-long-and-thanks-for-all-the-fish", + timeseries: [ + { + timestamp: new Date("2026-04-01T00:00:00.000Z"), + pageviewCount: 720, + }, + { + timestamp: new Date("2026-04-02T00:00:00.000Z"), + pageviewCount: 810, + }, + { + timestamp: new Date("2026-04-03T00:00:00.000Z"), + pageviewCount: 690, + }, + { + timestamp: new Date("2026-04-04T00:00:00.000Z"), + pageviewCount: 750, + }, + { + timestamp: new Date("2026-04-05T00:00:00.000Z"), + pageviewCount: 820, + }, + { + timestamp: new Date("2026-04-06T00:00:00.000Z"), + pageviewCount: 780, + }, + { + timestamp: new Date("2026-04-07T00:00:00.000Z"), + pageviewCount: 830, + }, + ], + }, + { + pageId: "65f1b2c4a8d3e5f7a9c1b2d4", + title: "So Long, and Thanks for All the Fish", + sessionCount: 1800, + userCount: 1700, + pageviewCount: 2300, + collectionId: "6494a077f0050acad8774bd1", + itemSlug: "so-long-and-thanks-for-all-the-fish", + timeseries: [ + { + timestamp: new Date("2026-04-01T00:00:00.000Z"), + pageviewCount: 280, + }, + { + timestamp: new Date("2026-04-02T00:00:00.000Z"), + pageviewCount: 350, + }, + { + timestamp: new Date("2026-04-03T00:00:00.000Z"), + pageviewCount: 310, + }, + { + timestamp: new Date("2026-04-04T00:00:00.000Z"), + pageviewCount: 320, + }, + { + timestamp: new Date("2026-04-05T00:00:00.000Z"), + pageviewCount: 340, + }, + { + timestamp: new Date("2026-04-06T00:00:00.000Z"), + pageviewCount: 360, + }, + { + timestamp: new Date("2026-04-07T00:00:00.000Z"), + pageviewCount: 340, + }, + ], + }, + ], + filter: { + audienceIds: { + eq: "US", + in: ["US", "CA"], + ne: "US", + nin: ["US", "CA"], + }, + browser: { + eq: "Chrome", + in: ["US", "CA"], + ne: "US", + nin: ["US", "CA"], + }, + collectionId: { + eq: "US", + in: ["US", "CA"], + ne: "US", + nin: ["US", "CA"], + }, + country: { + eq: "US", + in: ["US", "CA"], + ne: "US", + nin: ["US", "CA"], + }, + dayOfWeek: { + eq: "US", + in: ["US", "CA"], + ne: "US", + nin: ["US", "CA"], + }, + deviceBrand: { + eq: "US", + in: ["US", "CA"], + ne: "US", + nin: ["US", "CA"], + }, + deviceType: { + eq: "desktop", + in: ["US", "CA"], + ne: "US", + nin: ["US", "CA"], + }, + domain: { + eq: "US", + in: ["US", "CA"], + ne: "US", + nin: ["US", "CA"], + }, + itemSlug: { + eq: "US", + in: ["US", "CA"], + ne: "US", + nin: ["US", "CA"], + }, + language: { + eq: "US", + in: ["US", "CA"], + ne: "US", + nin: ["US", "CA"], + }, + locale: { + eq: "US", + in: ["US", "CA"], + ne: "US", + nin: ["US", "CA"], + }, + nextCollectionId: { + eq: "US", + in: ["US", "CA"], + ne: "US", + nin: ["US", "CA"], + }, + nextItemSlug: { + eq: "US", + in: ["US", "CA"], + ne: "US", + nin: ["US", "CA"], + }, + nextPageId: { + eq: "US", + in: ["US", "CA"], + ne: "US", + nin: ["US", "CA"], + }, + os: { + eq: "US", + in: ["US", "CA"], + ne: "US", + nin: ["US", "CA"], + }, + pageId: { + eq: "US", + in: ["US", "CA"], + ne: "US", + nin: ["US", "CA"], + }, + pagePath: { + eq: "/towels", + in: ["US", "CA"], + ne: "US", + nin: ["US", "CA"], + }, + previousCollectionId: { + eq: "US", + in: ["US", "CA"], + ne: "US", + nin: ["US", "CA"], + }, + previousItemSlug: { + eq: "US", + in: ["US", "CA"], + ne: "US", + nin: ["US", "CA"], + }, + previousPageId: { + eq: "US", + in: ["US", "CA"], + ne: "US", + nin: ["US", "CA"], + }, + referrer: { + eq: "google.com", + in: ["US", "CA"], + ne: "US", + nin: ["US", "CA"], + }, + region: { + eq: "US", + in: ["US", "CA"], + ne: "US", + nin: ["US", "CA"], + }, + timeOfDay: { + eq: "US", + in: ["US", "CA"], + ne: "US", + nin: ["US", "CA"], + }, + timezone: { + eq: "US", + in: ["US", "CA"], + ne: "US", + nin: ["US", "CA"], + }, + trafficSource: { + eq: "SO", + in: ["US", "CA"], + ne: "US", + nin: ["US", "CA"], + }, + utmCampaign: { + eq: "dont-panic-2026", + in: ["US", "CA"], + ne: "US", + nin: ["US", "CA"], + }, + utmContent: { + eq: "US", + in: ["US", "CA"], + ne: "US", + nin: ["US", "CA"], + }, + utmMedium: { + eq: "email", + in: ["US", "CA"], + ne: "US", + nin: ["US", "CA"], + }, + utmSource: { + eq: "hitchhikers-guide", + in: ["US", "CA"], + ne: "US", + nin: ["US", "CA"], + }, + utmTerm: { + eq: "US", + in: ["US", "CA"], + ne: "US", + nin: ["US", "CA"], + }, + visitStatus: { + eq: "US", + in: ["US", "CA"], + ne: "US", + nin: ["US", "CA"], + }, + }, + }); + }); + + test("topPages (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/analyze/reports/top_pages") + .respondWith() + .statusCode(400) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.analyze.reports.topPages("site_id", { + startTime: new Date("2024-01-15T09:30:00.000Z"), + endTime: new Date("2024-01-15T09:30:00.000Z"), + }); + }).rejects.toThrow(Webflow.BadRequestError); + }); + + test("topPages (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/analyze/reports/top_pages") + .respondWith() + .statusCode(401) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.analyze.reports.topPages("site_id", { + startTime: new Date("2024-01-15T09:30:00.000Z"), + endTime: new Date("2024-01-15T09:30:00.000Z"), + }); + }).rejects.toThrow(Webflow.UnauthorizedError); + }); + + test("topPages (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/analyze/reports/top_pages") + .respondWith() + .statusCode(403) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.analyze.reports.topPages("site_id", { + startTime: new Date("2024-01-15T09:30:00.000Z"), + endTime: new Date("2024-01-15T09:30:00.000Z"), + }); + }).rejects.toThrow(Webflow.ForbiddenError); + }); + + test("topPages (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/analyze/reports/top_pages") + .respondWith() + .statusCode(404) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.analyze.reports.topPages("site_id", { + startTime: new Date("2024-01-15T09:30:00.000Z"), + endTime: new Date("2024-01-15T09:30:00.000Z"), + }); + }).rejects.toThrow(Webflow.NotFoundError); + }); + + test("topPages (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/analyze/reports/top_pages") + .respondWith() + .statusCode(429) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.analyze.reports.topPages("site_id", { + startTime: new Date("2024-01-15T09:30:00.000Z"), + endTime: new Date("2024-01-15T09:30:00.000Z"), + }); + }).rejects.toThrow(Webflow.TooManyRequestsError); + }); + + test("topPages (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/analyze/reports/top_pages") + .respondWith() + .statusCode(500) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.analyze.reports.topPages("site_id", { + startTime: new Date("2024-01-15T09:30:00.000Z"), + endTime: new Date("2024-01-15T09:30:00.000Z"), + }); + }).rejects.toThrow(Webflow.InternalServerError); + }); + + test("topDimensions (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 = { + report: "top_dimensions", + window: { startTime: "2026-04-01T00:00:00Z", endTime: "2026-04-08T00:00:00Z" }, + dimension: "region", + metricScope: "session", + limit: 10, + data: [ + { attributeKey: "GB-ENG", name: "England, United Kingdom", count: 767 }, + { attributeKey: "US-CA", name: "California, United States", count: 686 }, + { attributeKey: "US-NY", name: "New York, United States", count: 350 }, + { attributeKey: "US-TX", name: "Texas, United States", count: 314 }, + { attributeKey: "US-FL", name: "Florida, United States", count: 255 }, + ], + filter: { + audienceIds: { eq: "US", in: ["US", "CA"], ne: "US", nin: ["US", "CA"] }, + browser: { eq: "Chrome", in: ["US", "CA"], ne: "US", nin: ["US", "CA"] }, + collectionId: { eq: "US", in: ["US", "CA"], ne: "US", nin: ["US", "CA"] }, + country: { eq: "US", in: ["US", "CA"], ne: "US", nin: ["US", "CA"] }, + dayOfWeek: { eq: "US", in: ["US", "CA"], ne: "US", nin: ["US", "CA"] }, + deviceBrand: { eq: "US", in: ["US", "CA"], ne: "US", nin: ["US", "CA"] }, + deviceType: { eq: "desktop", in: ["US", "CA"], ne: "US", nin: ["US", "CA"] }, + domain: { eq: "US", in: ["US", "CA"], ne: "US", nin: ["US", "CA"] }, + itemSlug: { eq: "US", in: ["US", "CA"], ne: "US", nin: ["US", "CA"] }, + language: { eq: "US", in: ["US", "CA"], ne: "US", nin: ["US", "CA"] }, + locale: { eq: "US", in: ["US", "CA"], ne: "US", nin: ["US", "CA"] }, + nextCollectionId: { eq: "US", in: ["US", "CA"], ne: "US", nin: ["US", "CA"] }, + nextItemSlug: { eq: "US", in: ["US", "CA"], ne: "US", nin: ["US", "CA"] }, + nextPageId: { eq: "US", in: ["US", "CA"], ne: "US", nin: ["US", "CA"] }, + os: { eq: "US", in: ["US", "CA"], ne: "US", nin: ["US", "CA"] }, + pageId: { eq: "US", in: ["US", "CA"], ne: "US", nin: ["US", "CA"] }, + pagePath: { eq: "/towels", in: ["US", "CA"], ne: "US", nin: ["US", "CA"] }, + previousCollectionId: { eq: "US", in: ["US", "CA"], ne: "US", nin: ["US", "CA"] }, + previousItemSlug: { eq: "US", in: ["US", "CA"], ne: "US", nin: ["US", "CA"] }, + previousPageId: { eq: "US", in: ["US", "CA"], ne: "US", nin: ["US", "CA"] }, + referrer: { eq: "google.com", in: ["US", "CA"], ne: "US", nin: ["US", "CA"] }, + region: { eq: "US", in: ["US", "CA"], ne: "US", nin: ["US", "CA"] }, + timeOfDay: { eq: "US", in: ["US", "CA"], ne: "US", nin: ["US", "CA"] }, + timezone: { eq: "US", in: ["US", "CA"], ne: "US", nin: ["US", "CA"] }, + trafficSource: { eq: "SO", in: ["US", "CA"], ne: "US", nin: ["US", "CA"] }, + utmCampaign: { eq: "dont-panic-2026", in: ["US", "CA"], ne: "US", nin: ["US", "CA"] }, + utmContent: { eq: "US", in: ["US", "CA"], ne: "US", nin: ["US", "CA"] }, + utmMedium: { eq: "email", in: ["US", "CA"], ne: "US", nin: ["US", "CA"] }, + utmSource: { eq: "hitchhikers-guide", in: ["US", "CA"], ne: "US", nin: ["US", "CA"] }, + utmTerm: { eq: "US", in: ["US", "CA"], ne: "US", nin: ["US", "CA"] }, + visitStatus: { eq: "US", in: ["US", "CA"], ne: "US", nin: ["US", "CA"] }, + }, + }; + server + .mockEndpoint() + .get("/sites/580e63e98c9a982ac9b8b741/analyze/reports/top_dimensions") + .respondWith() + .statusCode(200) + .jsonBody(rawResponseBody) + .build(); + + const response = await client.analyze.reports.topDimensions("580e63e98c9a982ac9b8b741", { + startTime: new Date("2026-04-01T00:00:00.000Z"), + endTime: new Date("2026-04-08T00:00:00.000Z"), + dimension: "country", + metricScope: "session", + limit: 1, + deviceType: "desktop", + country: "US", + pagePath: "/towels", + trafficSource: "SO", + referrer: "google.com", + browser: "Chrome", + utmCampaign: "dont-panic-2026", + utmMedium: "email", + utmSource: "hitchhikers-guide", + }); + expect(response).toEqual({ + report: "top_dimensions", + window: { + startTime: new Date("2026-04-01T00:00:00.000Z"), + endTime: new Date("2026-04-08T00:00:00.000Z"), + }, + dimension: "region", + metricScope: "session", + limit: 10, + data: [ + { + attributeKey: "GB-ENG", + name: "England, United Kingdom", + count: 767, + }, + { + attributeKey: "US-CA", + name: "California, United States", + count: 686, + }, + { + attributeKey: "US-NY", + name: "New York, United States", + count: 350, + }, + { + attributeKey: "US-TX", + name: "Texas, United States", + count: 314, + }, + { + attributeKey: "US-FL", + name: "Florida, United States", + count: 255, + }, + ], + filter: { + audienceIds: { + eq: "US", + in: ["US", "CA"], + ne: "US", + nin: ["US", "CA"], + }, + browser: { + eq: "Chrome", + in: ["US", "CA"], + ne: "US", + nin: ["US", "CA"], + }, + collectionId: { + eq: "US", + in: ["US", "CA"], + ne: "US", + nin: ["US", "CA"], + }, + country: { + eq: "US", + in: ["US", "CA"], + ne: "US", + nin: ["US", "CA"], + }, + dayOfWeek: { + eq: "US", + in: ["US", "CA"], + ne: "US", + nin: ["US", "CA"], + }, + deviceBrand: { + eq: "US", + in: ["US", "CA"], + ne: "US", + nin: ["US", "CA"], + }, + deviceType: { + eq: "desktop", + in: ["US", "CA"], + ne: "US", + nin: ["US", "CA"], + }, + domain: { + eq: "US", + in: ["US", "CA"], + ne: "US", + nin: ["US", "CA"], + }, + itemSlug: { + eq: "US", + in: ["US", "CA"], + ne: "US", + nin: ["US", "CA"], + }, + language: { + eq: "US", + in: ["US", "CA"], + ne: "US", + nin: ["US", "CA"], + }, + locale: { + eq: "US", + in: ["US", "CA"], + ne: "US", + nin: ["US", "CA"], + }, + nextCollectionId: { + eq: "US", + in: ["US", "CA"], + ne: "US", + nin: ["US", "CA"], + }, + nextItemSlug: { + eq: "US", + in: ["US", "CA"], + ne: "US", + nin: ["US", "CA"], + }, + nextPageId: { + eq: "US", + in: ["US", "CA"], + ne: "US", + nin: ["US", "CA"], + }, + os: { + eq: "US", + in: ["US", "CA"], + ne: "US", + nin: ["US", "CA"], + }, + pageId: { + eq: "US", + in: ["US", "CA"], + ne: "US", + nin: ["US", "CA"], + }, + pagePath: { + eq: "/towels", + in: ["US", "CA"], + ne: "US", + nin: ["US", "CA"], + }, + previousCollectionId: { + eq: "US", + in: ["US", "CA"], + ne: "US", + nin: ["US", "CA"], + }, + previousItemSlug: { + eq: "US", + in: ["US", "CA"], + ne: "US", + nin: ["US", "CA"], + }, + previousPageId: { + eq: "US", + in: ["US", "CA"], + ne: "US", + nin: ["US", "CA"], + }, + referrer: { + eq: "google.com", + in: ["US", "CA"], + ne: "US", + nin: ["US", "CA"], + }, + region: { + eq: "US", + in: ["US", "CA"], + ne: "US", + nin: ["US", "CA"], + }, + timeOfDay: { + eq: "US", + in: ["US", "CA"], + ne: "US", + nin: ["US", "CA"], + }, + timezone: { + eq: "US", + in: ["US", "CA"], + ne: "US", + nin: ["US", "CA"], + }, + trafficSource: { + eq: "SO", + in: ["US", "CA"], + ne: "US", + nin: ["US", "CA"], + }, + utmCampaign: { + eq: "dont-panic-2026", + in: ["US", "CA"], + ne: "US", + nin: ["US", "CA"], + }, + utmContent: { + eq: "US", + in: ["US", "CA"], + ne: "US", + nin: ["US", "CA"], + }, + utmMedium: { + eq: "email", + in: ["US", "CA"], + ne: "US", + nin: ["US", "CA"], + }, + utmSource: { + eq: "hitchhikers-guide", + in: ["US", "CA"], + ne: "US", + nin: ["US", "CA"], + }, + utmTerm: { + eq: "US", + in: ["US", "CA"], + ne: "US", + nin: ["US", "CA"], + }, + visitStatus: { + eq: "US", + in: ["US", "CA"], + ne: "US", + nin: ["US", "CA"], + }, + }, + }); + }); + + test("topDimensions (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/analyze/reports/top_dimensions") + .respondWith() + .statusCode(400) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.analyze.reports.topDimensions("site_id", { + startTime: new Date("2024-01-15T09:30:00.000Z"), + endTime: new Date("2024-01-15T09:30:00.000Z"), + dimension: "country", + metricScope: "session", + }); + }).rejects.toThrow(Webflow.BadRequestError); + }); + + test("topDimensions (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/analyze/reports/top_dimensions") + .respondWith() + .statusCode(401) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.analyze.reports.topDimensions("site_id", { + startTime: new Date("2024-01-15T09:30:00.000Z"), + endTime: new Date("2024-01-15T09:30:00.000Z"), + dimension: "country", + metricScope: "session", + }); + }).rejects.toThrow(Webflow.UnauthorizedError); + }); + + test("topDimensions (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/analyze/reports/top_dimensions") + .respondWith() + .statusCode(403) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.analyze.reports.topDimensions("site_id", { + startTime: new Date("2024-01-15T09:30:00.000Z"), + endTime: new Date("2024-01-15T09:30:00.000Z"), + dimension: "country", + metricScope: "session", + }); + }).rejects.toThrow(Webflow.ForbiddenError); + }); + + test("topDimensions (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/analyze/reports/top_dimensions") + .respondWith() + .statusCode(404) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.analyze.reports.topDimensions("site_id", { + startTime: new Date("2024-01-15T09:30:00.000Z"), + endTime: new Date("2024-01-15T09:30:00.000Z"), + dimension: "country", + metricScope: "session", + }); + }).rejects.toThrow(Webflow.NotFoundError); + }); + + test("topDimensions (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/analyze/reports/top_dimensions") + .respondWith() + .statusCode(429) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.analyze.reports.topDimensions("site_id", { + startTime: new Date("2024-01-15T09:30:00.000Z"), + endTime: new Date("2024-01-15T09:30:00.000Z"), + dimension: "country", + metricScope: "session", + }); + }).rejects.toThrow(Webflow.TooManyRequestsError); + }); + + test("topDimensions (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/analyze/reports/top_dimensions") + .respondWith() + .statusCode(500) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.analyze.reports.topDimensions("site_id", { + startTime: new Date("2024-01-15T09:30:00.000Z"), + endTime: new Date("2024-01-15T09:30:00.000Z"), + dimension: "country", + metricScope: "session", + }); + }).rejects.toThrow(Webflow.InternalServerError); + }); + + test("topEvents (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 = { + report: "top_events", + window: { startTime: "2026-04-01T00:00:00Z", endTime: "2026-04-08T00:00:00Z" }, + limit: 25, + bucketing: { granularityPeriod: "day", bucketTimeZone: "UTC" }, + data: [ + { + eventId: "fb30dabb-a11d-f91d-ddc6-24e806ebc00c", + name: "Towel preview 2:00", + pageId: "65f1b2c4a8d3e5f7a9c1b2d3", + pageName: "Don't Panic — Towels & Travel Gear", + count: 4300, + componentContext: [ + { componentId: "6852c6615505960ed3f3f8e1", instanceId: "6852c6615505960ed3f3f8e2" }, + ], + cmsContext: [{ collectionId: "6494a31fafe5722c6251db3d", itemId: "6852c6615505960ed3f3f8e3" }], + collectionId: "6494a077f0050acad8774bd1", + itemSlug: "so-long-and-thanks-for-all-the-fish", + timeseries: [ + { timestamp: "2026-04-01T00:00:00Z", count: 620 }, + { timestamp: "2026-04-02T00:00:00Z", count: 580 }, + { timestamp: "2026-04-03T00:00:00Z", count: 640 }, + { timestamp: "2026-04-04T00:00:00Z", count: 600 }, + { timestamp: "2026-04-05T00:00:00Z", count: 610 }, + { timestamp: "2026-04-06T00:00:00Z", count: 630 }, + { timestamp: "2026-04-07T00:00:00Z", count: 620 }, + ], + }, + { + eventId: "7cefcbd4-8420-4b49-a534-5c7f6dfc3075", + name: "Subscribe to the Guide", + pageId: "65f1b2c4a8d3e5f7a9c1b2d4", + pageName: "So Long, and Thanks for All the Fish", + count: 1820, + componentContext: [ + { componentId: "6852c6615505960ed3f3f8e1", instanceId: "6852c6615505960ed3f3f8e2" }, + ], + cmsContext: [{ collectionId: "6494a31fafe5722c6251db3d", itemId: "6852c6615505960ed3f3f8e3" }], + collectionId: "6494a077f0050acad8774bd1", + itemSlug: "so-long-and-thanks-for-all-the-fish", + timeseries: [ + { timestamp: "2026-04-01T00:00:00Z", count: 260 }, + { timestamp: "2026-04-02T00:00:00Z", count: 250 }, + { timestamp: "2026-04-03T00:00:00Z", count: 270 }, + { timestamp: "2026-04-04T00:00:00Z", count: 255 }, + { timestamp: "2026-04-05T00:00:00Z", count: 260 }, + { timestamp: "2026-04-06T00:00:00Z", count: 265 }, + { timestamp: "2026-04-07T00:00:00Z", count: 260 }, + ], + }, + ], + filter: { + audienceIds: { eq: "US", in: ["US", "CA"], ne: "US", nin: ["US", "CA"] }, + browser: { eq: "Chrome", in: ["US", "CA"], ne: "US", nin: ["US", "CA"] }, + collectionId: { eq: "US", in: ["US", "CA"], ne: "US", nin: ["US", "CA"] }, + country: { eq: "US", in: ["US", "CA"], ne: "US", nin: ["US", "CA"] }, + dayOfWeek: { eq: "US", in: ["US", "CA"], ne: "US", nin: ["US", "CA"] }, + deviceBrand: { eq: "US", in: ["US", "CA"], ne: "US", nin: ["US", "CA"] }, + deviceType: { eq: "desktop", in: ["US", "CA"], ne: "US", nin: ["US", "CA"] }, + domain: { eq: "US", in: ["US", "CA"], ne: "US", nin: ["US", "CA"] }, + itemSlug: { eq: "US", in: ["US", "CA"], ne: "US", nin: ["US", "CA"] }, + language: { eq: "US", in: ["US", "CA"], ne: "US", nin: ["US", "CA"] }, + locale: { eq: "US", in: ["US", "CA"], ne: "US", nin: ["US", "CA"] }, + os: { eq: "US", in: ["US", "CA"], ne: "US", nin: ["US", "CA"] }, + pageId: { eq: "US", in: ["US", "CA"], ne: "US", nin: ["US", "CA"] }, + pagePath: { eq: "/towels", in: ["US", "CA"], ne: "US", nin: ["US", "CA"] }, + region: { eq: "US", in: ["US", "CA"], ne: "US", nin: ["US", "CA"] }, + timeOfDay: { eq: "US", in: ["US", "CA"], ne: "US", nin: ["US", "CA"] }, + timezone: { eq: "US", in: ["US", "CA"], ne: "US", nin: ["US", "CA"] }, + trafficSource: { eq: "SO", in: ["US", "CA"], ne: "US", nin: ["US", "CA"] }, + utmCampaign: { eq: "dont-panic-2026", in: ["US", "CA"], ne: "US", nin: ["US", "CA"] }, + utmContent: { eq: "US", in: ["US", "CA"], ne: "US", nin: ["US", "CA"] }, + utmMedium: { eq: "email", in: ["US", "CA"], ne: "US", nin: ["US", "CA"] }, + utmSource: { eq: "hitchhikers-guide", in: ["US", "CA"], ne: "US", nin: ["US", "CA"] }, + utmTerm: { eq: "US", in: ["US", "CA"], ne: "US", nin: ["US", "CA"] }, + visitStatus: { eq: "US", in: ["US", "CA"], ne: "US", nin: ["US", "CA"] }, + }, + }; + server + .mockEndpoint() + .get("/sites/580e63e98c9a982ac9b8b741/analyze/reports/top_events") + .respondWith() + .statusCode(200) + .jsonBody(rawResponseBody) + .build(); + + const response = await client.analyze.reports.topEvents("580e63e98c9a982ac9b8b741", { + startTime: new Date("2026-04-01T00:00:00.000Z"), + endTime: new Date("2026-04-08T00:00:00.000Z"), + limit: 1, + deviceType: "desktop", + country: "US", + pagePath: "/towels", + trafficSource: "SO", + browser: "Chrome", + utmCampaign: "dont-panic-2026", + utmMedium: "email", + utmSource: "hitchhikers-guide", + }); + expect(response).toEqual({ + report: "top_events", + window: { + startTime: new Date("2026-04-01T00:00:00.000Z"), + endTime: new Date("2026-04-08T00:00:00.000Z"), + }, + limit: 25, + bucketing: { + granularityPeriod: "day", + bucketTimeZone: "UTC", + }, + data: [ + { + eventId: "fb30dabb-a11d-f91d-ddc6-24e806ebc00c", + name: "Towel preview 2:00", + pageId: "65f1b2c4a8d3e5f7a9c1b2d3", + pageName: "Don't Panic \u2014 Towels & Travel Gear", + count: 4300, + componentContext: [ + { + componentId: "6852c6615505960ed3f3f8e1", + instanceId: "6852c6615505960ed3f3f8e2", + }, + ], + cmsContext: [ + { + collectionId: "6494a31fafe5722c6251db3d", + itemId: "6852c6615505960ed3f3f8e3", + }, + ], + collectionId: "6494a077f0050acad8774bd1", + itemSlug: "so-long-and-thanks-for-all-the-fish", + timeseries: [ + { + timestamp: new Date("2026-04-01T00:00:00.000Z"), + count: 620, + }, + { + timestamp: new Date("2026-04-02T00:00:00.000Z"), + count: 580, + }, + { + timestamp: new Date("2026-04-03T00:00:00.000Z"), + count: 640, + }, + { + timestamp: new Date("2026-04-04T00:00:00.000Z"), + count: 600, + }, + { + timestamp: new Date("2026-04-05T00:00:00.000Z"), + count: 610, + }, + { + timestamp: new Date("2026-04-06T00:00:00.000Z"), + count: 630, + }, + { + timestamp: new Date("2026-04-07T00:00:00.000Z"), + count: 620, + }, + ], + }, + { + eventId: "7cefcbd4-8420-4b49-a534-5c7f6dfc3075", + name: "Subscribe to the Guide", + pageId: "65f1b2c4a8d3e5f7a9c1b2d4", + pageName: "So Long, and Thanks for All the Fish", + count: 1820, + componentContext: [ + { + componentId: "6852c6615505960ed3f3f8e1", + instanceId: "6852c6615505960ed3f3f8e2", + }, + ], + cmsContext: [ + { + collectionId: "6494a31fafe5722c6251db3d", + itemId: "6852c6615505960ed3f3f8e3", + }, + ], + collectionId: "6494a077f0050acad8774bd1", + itemSlug: "so-long-and-thanks-for-all-the-fish", + timeseries: [ + { + timestamp: new Date("2026-04-01T00:00:00.000Z"), + count: 260, + }, + { + timestamp: new Date("2026-04-02T00:00:00.000Z"), + count: 250, + }, + { + timestamp: new Date("2026-04-03T00:00:00.000Z"), + count: 270, + }, + { + timestamp: new Date("2026-04-04T00:00:00.000Z"), + count: 255, + }, + { + timestamp: new Date("2026-04-05T00:00:00.000Z"), + count: 260, + }, + { + timestamp: new Date("2026-04-06T00:00:00.000Z"), + count: 265, + }, + { + timestamp: new Date("2026-04-07T00:00:00.000Z"), + count: 260, + }, + ], + }, + ], + filter: { + audienceIds: { + eq: "US", + in: ["US", "CA"], + ne: "US", + nin: ["US", "CA"], + }, + browser: { + eq: "Chrome", + in: ["US", "CA"], + ne: "US", + nin: ["US", "CA"], + }, + collectionId: { + eq: "US", + in: ["US", "CA"], + ne: "US", + nin: ["US", "CA"], + }, + country: { + eq: "US", + in: ["US", "CA"], + ne: "US", + nin: ["US", "CA"], + }, + dayOfWeek: { + eq: "US", + in: ["US", "CA"], + ne: "US", + nin: ["US", "CA"], + }, + deviceBrand: { + eq: "US", + in: ["US", "CA"], + ne: "US", + nin: ["US", "CA"], + }, + deviceType: { + eq: "desktop", + in: ["US", "CA"], + ne: "US", + nin: ["US", "CA"], + }, + domain: { + eq: "US", + in: ["US", "CA"], + ne: "US", + nin: ["US", "CA"], + }, + itemSlug: { + eq: "US", + in: ["US", "CA"], + ne: "US", + nin: ["US", "CA"], + }, + language: { + eq: "US", + in: ["US", "CA"], + ne: "US", + nin: ["US", "CA"], + }, + locale: { + eq: "US", + in: ["US", "CA"], + ne: "US", + nin: ["US", "CA"], + }, + os: { + eq: "US", + in: ["US", "CA"], + ne: "US", + nin: ["US", "CA"], + }, + pageId: { + eq: "US", + in: ["US", "CA"], + ne: "US", + nin: ["US", "CA"], + }, + pagePath: { + eq: "/towels", + in: ["US", "CA"], + ne: "US", + nin: ["US", "CA"], + }, + region: { + eq: "US", + in: ["US", "CA"], + ne: "US", + nin: ["US", "CA"], + }, + timeOfDay: { + eq: "US", + in: ["US", "CA"], + ne: "US", + nin: ["US", "CA"], + }, + timezone: { + eq: "US", + in: ["US", "CA"], + ne: "US", + nin: ["US", "CA"], + }, + trafficSource: { + eq: "SO", + in: ["US", "CA"], + ne: "US", + nin: ["US", "CA"], + }, + utmCampaign: { + eq: "dont-panic-2026", + in: ["US", "CA"], + ne: "US", + nin: ["US", "CA"], + }, + utmContent: { + eq: "US", + in: ["US", "CA"], + ne: "US", + nin: ["US", "CA"], + }, + utmMedium: { + eq: "email", + in: ["US", "CA"], + ne: "US", + nin: ["US", "CA"], + }, + utmSource: { + eq: "hitchhikers-guide", + in: ["US", "CA"], + ne: "US", + nin: ["US", "CA"], + }, + utmTerm: { + eq: "US", + in: ["US", "CA"], + ne: "US", + nin: ["US", "CA"], + }, + visitStatus: { + eq: "US", + in: ["US", "CA"], + ne: "US", + nin: ["US", "CA"], + }, + }, + }); + }); + + test("topEvents (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/analyze/reports/top_events") + .respondWith() + .statusCode(400) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.analyze.reports.topEvents("site_id", { + startTime: new Date("2024-01-15T09:30:00.000Z"), + endTime: new Date("2024-01-15T09:30:00.000Z"), + }); + }).rejects.toThrow(Webflow.BadRequestError); + }); + + test("topEvents (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/analyze/reports/top_events") + .respondWith() + .statusCode(401) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.analyze.reports.topEvents("site_id", { + startTime: new Date("2024-01-15T09:30:00.000Z"), + endTime: new Date("2024-01-15T09:30:00.000Z"), + }); + }).rejects.toThrow(Webflow.UnauthorizedError); + }); + + test("topEvents (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/analyze/reports/top_events") + .respondWith() + .statusCode(403) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.analyze.reports.topEvents("site_id", { + startTime: new Date("2024-01-15T09:30:00.000Z"), + endTime: new Date("2024-01-15T09:30:00.000Z"), + }); + }).rejects.toThrow(Webflow.ForbiddenError); + }); + + test("topEvents (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/analyze/reports/top_events") + .respondWith() + .statusCode(404) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.analyze.reports.topEvents("site_id", { + startTime: new Date("2024-01-15T09:30:00.000Z"), + endTime: new Date("2024-01-15T09:30:00.000Z"), + }); + }).rejects.toThrow(Webflow.NotFoundError); + }); + + test("topEvents (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/analyze/reports/top_events") + .respondWith() + .statusCode(429) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.analyze.reports.topEvents("site_id", { + startTime: new Date("2024-01-15T09:30:00.000Z"), + endTime: new Date("2024-01-15T09:30:00.000Z"), + }); + }).rejects.toThrow(Webflow.TooManyRequestsError); + }); + + test("topEvents (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/analyze/reports/top_events") + .respondWith() + .statusCode(500) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.analyze.reports.topEvents("site_id", { + startTime: new Date("2024-01-15T09:30:00.000Z"), + endTime: new Date("2024-01-15T09:30:00.000Z"), + }); + }).rejects.toThrow(Webflow.InternalServerError); + }); + + test("timeOnPage (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 = { + report: "time_on_page", + window: { startTime: "2026-04-01T00:00:00Z", endTime: "2026-04-08T00:00:00Z" }, + metricScope: "session", + bucketing: { granularityPeriod: "day", bucketTimeZone: "UTC" }, + data: [ + { timestamp: "2026-04-01T00:00:00Z", averageSeconds: 47.2 }, + { timestamp: "2026-04-02T00:00:00Z", averageSeconds: 51.8 }, + { timestamp: "2026-04-03T00:00:00Z", averageSeconds: 44.5 }, + { timestamp: "2026-04-04T00:00:00Z", averageSeconds: 49.1 }, + { timestamp: "2026-04-05T00:00:00Z", averageSeconds: 53 }, + { timestamp: "2026-04-06T00:00:00Z", averageSeconds: 42 }, + { timestamp: "2026-04-07T00:00:00Z", averageSeconds: 50.3 }, + ], + filter: { + audienceIds: { eq: "US", in: ["US", "CA"], ne: "US", nin: ["US", "CA"] }, + browser: { eq: "Chrome", in: ["US", "CA"], ne: "US", nin: ["US", "CA"] }, + collectionId: { eq: "US", in: ["US", "CA"], ne: "US", nin: ["US", "CA"] }, + country: { eq: "US", in: ["US", "CA"], ne: "US", nin: ["US", "CA"] }, + dayOfWeek: { eq: "US", in: ["US", "CA"], ne: "US", nin: ["US", "CA"] }, + deviceBrand: { eq: "US", in: ["US", "CA"], ne: "US", nin: ["US", "CA"] }, + deviceType: { eq: "desktop", in: ["US", "CA"], ne: "US", nin: ["US", "CA"] }, + domain: { eq: "US", in: ["US", "CA"], ne: "US", nin: ["US", "CA"] }, + itemSlug: { eq: "US", in: ["US", "CA"], ne: "US", nin: ["US", "CA"] }, + language: { eq: "US", in: ["US", "CA"], ne: "US", nin: ["US", "CA"] }, + locale: { eq: "US", in: ["US", "CA"], ne: "US", nin: ["US", "CA"] }, + nextCollectionId: { eq: "US", in: ["US", "CA"], ne: "US", nin: ["US", "CA"] }, + nextItemSlug: { eq: "US", in: ["US", "CA"], ne: "US", nin: ["US", "CA"] }, + nextPageId: { eq: "US", in: ["US", "CA"], ne: "US", nin: ["US", "CA"] }, + os: { eq: "US", in: ["US", "CA"], ne: "US", nin: ["US", "CA"] }, + pageId: { eq: "US", in: ["US", "CA"], ne: "US", nin: ["US", "CA"] }, + pagePath: { eq: "/towels", in: ["US", "CA"], ne: "US", nin: ["US", "CA"] }, + previousCollectionId: { eq: "US", in: ["US", "CA"], ne: "US", nin: ["US", "CA"] }, + previousItemSlug: { eq: "US", in: ["US", "CA"], ne: "US", nin: ["US", "CA"] }, + previousPageId: { eq: "US", in: ["US", "CA"], ne: "US", nin: ["US", "CA"] }, + referrer: { eq: "google.com", in: ["US", "CA"], ne: "US", nin: ["US", "CA"] }, + region: { eq: "US", in: ["US", "CA"], ne: "US", nin: ["US", "CA"] }, + timeOfDay: { eq: "US", in: ["US", "CA"], ne: "US", nin: ["US", "CA"] }, + timezone: { eq: "US", in: ["US", "CA"], ne: "US", nin: ["US", "CA"] }, + trafficSource: { eq: "SO", in: ["US", "CA"], ne: "US", nin: ["US", "CA"] }, + utmCampaign: { eq: "dont-panic-2026", in: ["US", "CA"], ne: "US", nin: ["US", "CA"] }, + utmContent: { eq: "US", in: ["US", "CA"], ne: "US", nin: ["US", "CA"] }, + utmMedium: { eq: "email", in: ["US", "CA"], ne: "US", nin: ["US", "CA"] }, + utmSource: { eq: "hitchhikers-guide", in: ["US", "CA"], ne: "US", nin: ["US", "CA"] }, + utmTerm: { eq: "US", in: ["US", "CA"], ne: "US", nin: ["US", "CA"] }, + visitStatus: { eq: "US", in: ["US", "CA"], ne: "US", nin: ["US", "CA"] }, + }, + }; + server + .mockEndpoint() + .get("/sites/580e63e98c9a982ac9b8b741/analyze/reports/time_on_page") + .respondWith() + .statusCode(200) + .jsonBody(rawResponseBody) + .build(); + + const response = await client.analyze.reports.timeOnPage("580e63e98c9a982ac9b8b741", { + startTime: new Date("2026-04-01T00:00:00.000Z"), + endTime: new Date("2026-04-08T00:00:00.000Z"), + metricScope: "session", + deviceType: "desktop", + country: "US", + pagePath: "/towels", + trafficSource: "SO", + referrer: "google.com", + browser: "Chrome", + utmCampaign: "dont-panic-2026", + utmMedium: "email", + utmSource: "hitchhikers-guide", + }); + expect(response).toEqual({ + report: "time_on_page", + window: { + startTime: new Date("2026-04-01T00:00:00.000Z"), + endTime: new Date("2026-04-08T00:00:00.000Z"), + }, + metricScope: "session", + bucketing: { + granularityPeriod: "day", + bucketTimeZone: "UTC", + }, + data: [ + { + timestamp: new Date("2026-04-01T00:00:00.000Z"), + averageSeconds: 47.2, + }, + { + timestamp: new Date("2026-04-02T00:00:00.000Z"), + averageSeconds: 51.8, + }, + { + timestamp: new Date("2026-04-03T00:00:00.000Z"), + averageSeconds: 44.5, + }, + { + timestamp: new Date("2026-04-04T00:00:00.000Z"), + averageSeconds: 49.1, + }, + { + timestamp: new Date("2026-04-05T00:00:00.000Z"), + averageSeconds: 53, + }, + { + timestamp: new Date("2026-04-06T00:00:00.000Z"), + averageSeconds: 42, + }, + { + timestamp: new Date("2026-04-07T00:00:00.000Z"), + averageSeconds: 50.3, + }, + ], + filter: { + audienceIds: { + eq: "US", + in: ["US", "CA"], + ne: "US", + nin: ["US", "CA"], + }, + browser: { + eq: "Chrome", + in: ["US", "CA"], + ne: "US", + nin: ["US", "CA"], + }, + collectionId: { + eq: "US", + in: ["US", "CA"], + ne: "US", + nin: ["US", "CA"], + }, + country: { + eq: "US", + in: ["US", "CA"], + ne: "US", + nin: ["US", "CA"], + }, + dayOfWeek: { + eq: "US", + in: ["US", "CA"], + ne: "US", + nin: ["US", "CA"], + }, + deviceBrand: { + eq: "US", + in: ["US", "CA"], + ne: "US", + nin: ["US", "CA"], + }, + deviceType: { + eq: "desktop", + in: ["US", "CA"], + ne: "US", + nin: ["US", "CA"], + }, + domain: { + eq: "US", + in: ["US", "CA"], + ne: "US", + nin: ["US", "CA"], + }, + itemSlug: { + eq: "US", + in: ["US", "CA"], + ne: "US", + nin: ["US", "CA"], + }, + language: { + eq: "US", + in: ["US", "CA"], + ne: "US", + nin: ["US", "CA"], + }, + locale: { + eq: "US", + in: ["US", "CA"], + ne: "US", + nin: ["US", "CA"], + }, + nextCollectionId: { + eq: "US", + in: ["US", "CA"], + ne: "US", + nin: ["US", "CA"], + }, + nextItemSlug: { + eq: "US", + in: ["US", "CA"], + ne: "US", + nin: ["US", "CA"], + }, + nextPageId: { + eq: "US", + in: ["US", "CA"], + ne: "US", + nin: ["US", "CA"], + }, + os: { + eq: "US", + in: ["US", "CA"], + ne: "US", + nin: ["US", "CA"], + }, + pageId: { + eq: "US", + in: ["US", "CA"], + ne: "US", + nin: ["US", "CA"], + }, + pagePath: { + eq: "/towels", + in: ["US", "CA"], + ne: "US", + nin: ["US", "CA"], + }, + previousCollectionId: { + eq: "US", + in: ["US", "CA"], + ne: "US", + nin: ["US", "CA"], + }, + previousItemSlug: { + eq: "US", + in: ["US", "CA"], + ne: "US", + nin: ["US", "CA"], + }, + previousPageId: { + eq: "US", + in: ["US", "CA"], + ne: "US", + nin: ["US", "CA"], + }, + referrer: { + eq: "google.com", + in: ["US", "CA"], + ne: "US", + nin: ["US", "CA"], + }, + region: { + eq: "US", + in: ["US", "CA"], + ne: "US", + nin: ["US", "CA"], + }, + timeOfDay: { + eq: "US", + in: ["US", "CA"], + ne: "US", + nin: ["US", "CA"], + }, + timezone: { + eq: "US", + in: ["US", "CA"], + ne: "US", + nin: ["US", "CA"], + }, + trafficSource: { + eq: "SO", + in: ["US", "CA"], + ne: "US", + nin: ["US", "CA"], + }, + utmCampaign: { + eq: "dont-panic-2026", + in: ["US", "CA"], + ne: "US", + nin: ["US", "CA"], + }, + utmContent: { + eq: "US", + in: ["US", "CA"], + ne: "US", + nin: ["US", "CA"], + }, + utmMedium: { + eq: "email", + in: ["US", "CA"], + ne: "US", + nin: ["US", "CA"], + }, + utmSource: { + eq: "hitchhikers-guide", + in: ["US", "CA"], + ne: "US", + nin: ["US", "CA"], + }, + utmTerm: { + eq: "US", + in: ["US", "CA"], + ne: "US", + nin: ["US", "CA"], + }, + visitStatus: { + eq: "US", + in: ["US", "CA"], + ne: "US", + nin: ["US", "CA"], + }, + }, + }); + }); + + test("timeOnPage (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/analyze/reports/time_on_page") + .respondWith() + .statusCode(400) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.analyze.reports.timeOnPage("site_id", { + startTime: new Date("2024-01-15T09:30:00.000Z"), + endTime: new Date("2024-01-15T09:30:00.000Z"), + metricScope: "session", + }); + }).rejects.toThrow(Webflow.BadRequestError); + }); + + test("timeOnPage (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/analyze/reports/time_on_page") + .respondWith() + .statusCode(401) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.analyze.reports.timeOnPage("site_id", { + startTime: new Date("2024-01-15T09:30:00.000Z"), + endTime: new Date("2024-01-15T09:30:00.000Z"), + metricScope: "session", + }); + }).rejects.toThrow(Webflow.UnauthorizedError); + }); + + test("timeOnPage (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/analyze/reports/time_on_page") + .respondWith() + .statusCode(403) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.analyze.reports.timeOnPage("site_id", { + startTime: new Date("2024-01-15T09:30:00.000Z"), + endTime: new Date("2024-01-15T09:30:00.000Z"), + metricScope: "session", + }); + }).rejects.toThrow(Webflow.ForbiddenError); + }); + + test("timeOnPage (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/analyze/reports/time_on_page") + .respondWith() + .statusCode(404) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.analyze.reports.timeOnPage("site_id", { + startTime: new Date("2024-01-15T09:30:00.000Z"), + endTime: new Date("2024-01-15T09:30:00.000Z"), + metricScope: "session", + }); + }).rejects.toThrow(Webflow.NotFoundError); + }); + + test("timeOnPage (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/analyze/reports/time_on_page") + .respondWith() + .statusCode(429) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.analyze.reports.timeOnPage("site_id", { + startTime: new Date("2024-01-15T09:30:00.000Z"), + endTime: new Date("2024-01-15T09:30:00.000Z"), + metricScope: "session", + }); + }).rejects.toThrow(Webflow.TooManyRequestsError); + }); + + test("timeOnPage (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/analyze/reports/time_on_page") + .respondWith() + .statusCode(500) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.analyze.reports.timeOnPage("site_id", { + startTime: new Date("2024-01-15T09:30:00.000Z"), + endTime: new Date("2024-01-15T09:30:00.000Z"), + metricScope: "session", + }); + }).rejects.toThrow(Webflow.InternalServerError); + }); +}); 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/activityLogs.test.ts b/tests/wire/sites/activityLogs.test.ts index f1d21136..5b803ff0 100644 --- a/tests/wire/sites/activityLogs.test.ts +++ b/tests/wire/sites/activityLogs.test.ts @@ -24,9 +24,23 @@ describe("ActivityLogsClient", () => { user: { id: "6509cd56e90eec668b009712", displayName: "John Doe" }, resourceId: "654c16c7b229e56bcf26870c", resourceName: "foo-bar", + source: "DESIGNER", + actorType: "user", + }, + { + id: "6a2b59c5e2f5e75d3b7e6588", + createdOn: "2026-06-12T00:58:45Z", + lastUpdated: "2026-06-12T00:58:56Z", + event: "page_dom_modified", + resourceOperation: "MODIFIED", + user: { id: "6509cd56e90eec668b009712", displayName: "John Doe" }, + resourceName: "Home", + payload: { pageTitle: "Home", pageId: "6785866e9dc60263a82cd380", count: 2 }, + source: "WEBFLOW_AI", + actorType: "user", }, ], - pagination: { limit: 25, offset: 0, total: 1 }, + pagination: { limit: 25, offset: 0, total: 2 }, }; server .mockEndpoint() @@ -54,12 +68,33 @@ describe("ActivityLogsClient", () => { }, resourceId: "654c16c7b229e56bcf26870c", resourceName: "foo-bar", + source: "DESIGNER", + actorType: "user", + }, + { + id: "6a2b59c5e2f5e75d3b7e6588", + createdOn: new Date("2026-06-12T00:58:45.000Z"), + lastUpdated: new Date("2026-06-12T00:58:56.000Z"), + event: "page_dom_modified", + resourceOperation: "MODIFIED", + user: { + id: "6509cd56e90eec668b009712", + displayName: "John Doe", + }, + resourceName: "Home", + payload: { + pageTitle: "Home", + pageId: "6785866e9dc60263a82cd380", + count: 2, + }, + source: "WEBFLOW_AI", + actorType: "user", }, ], pagination: { limit: 25, offset: 0, - total: 1, + total: 2, }, }); }); 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..256531e1 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.3" + resolved "https://registry.yarnpkg.com/@types/node/-/node-25.9.3.tgz#11dfe7a33e68fa5c560f0aa76cc5595621ef26b9" + integrity sha512-603BddQMv3pUcr4U2dhujk83N2tTDVr/34wII2B6bJy6g+8WD6yUb11jszNs0gdi4PesVWl7ABt8nYMVpnLUcg== dependencies: - undici-types "~7.18.0" + undici-types ">=7.24.0 <7.24.7" "@types/node@^18.19.70": version "18.19.130" @@ -1006,9 +990,9 @@ acorn-walk@^8.0.2: acorn "^8.11.0" acorn@^8.1.0, acorn@^8.11.0, acorn@^8.15.0, acorn@^8.16.0, acorn@^8.8.1: - version "8.16.0" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.16.0.tgz#4ce79c89be40afe7afe8f3adb902a1f1ce9ac08a" - integrity sha512-UVJyE9MttOsBQIDKw1skb9nAwQuR5wuGD3+82K6JgJlm/Y+KI92oNsMNGZCYdDsVtRHSak0pcV5Dno5+4jh9sw== + version "8.17.0" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.17.0.tgz#1785adb84faf8d8add10369b93826fc2bd08f1fe" + integrity sha512-xRQbDb9BnwDafYNn6Vwl839DYVjqXYb1XVGtWAZ1kcDc6iwAL4hg3B1dZlRiuENFeO2H53gFG3in621AdERVAg== agent-base@6: version "6.0.2" @@ -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.37" + resolved "https://registry.yarnpkg.com/baseline-browser-mapping/-/baseline-browser-mapping-2.10.37.tgz#3e636475b6b293244e2b23e2c71a2ab9d9e6ba7d" + integrity sha512-girxaJ7WZssDOFhzCGZTDKoTa1gk6A1TbflaYTpykLJ4UU9Fz9kx1aREM8JCuoVHbL8X8T/mJg7w2oYSq72Oig== 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.30001799" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001799.tgz#5c909138c27f1a61219d3e092071c1cc7d32dc55" + integrity sha512-hG1bReV+OUU+MOqK4t/ZWI0tZOyz3rqS9XuhOUz1cIcbwBKjOyJEJuw9ER5JuNyqxNk8u/JUVbGibBOL1yrjFw== 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.375" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.5.375.tgz#54a9a616dc2b3765e7263d98d14c2135408954d9" + integrity sha512-ZWP5eB4BVPW/ZYo9252hQZHZ5XavtsTgpbhcmMmRwymavC5AsLWQWBPaKMeNd2LW0KGby5HPXvj7+sr4ta5j/Q== 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.24.0" + resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.24.0.tgz#cf14b9768a774cb6a5087220c0dc6e55df6ec35a" + integrity sha512-SkE2t82KlkkxQRVMVLAGKxLfORGQfrkx5dkj+vlgXRVNEdPc4eZcR+J/Fvj8C+yKSFH5L0q3NFlyufOVQnCcYQ== 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" @@ -1871,15 +1855,15 @@ for-each@^0.3.5: is-callable "^1.2.7" form-data@^4.0.0, form-data@^4.0.4: - version "4.0.5" - resolved "https://registry.yarnpkg.com/form-data/-/form-data-4.0.5.tgz#b49e48858045ff4cbf6b03e1805cebcad3679053" - integrity sha512-8RipRLol37bNs2bhoV67fiTEvdTrbMUYcFTiy3+wuuOnUog2QBHCZWXDRijWQfAkhBj2Uf5UnVaiWwA5vdd82w== + version "4.0.6" + resolved "https://registry.yarnpkg.com/form-data/-/form-data-4.0.6.tgz#28e864e1b786dbebb68db1f452f9635278665827" + integrity sha512-vKatAh4SlVfgbv+YtmhiRjhEMJsYpsG1Y2rMQtR+SVSbytsSD1YGzDIcrAJmdFec88u/+VoGmxnl+80gL1tRCQ== dependencies: asynckit "^0.4.0" combined-stream "^1.0.8" es-set-tostringtag "^2.1.0" - hasown "^2.0.2" - mime-types "^2.1.12" + hasown "^2.0.4" + mime-types "^2.1.35" formdata-node@^6.0.3: version "6.0.3" @@ -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.2" + resolved "https://registry.yarnpkg.com/graphql/-/graphql-16.14.2.tgz#83faf25869e3df727cc855161db5da85b0e5b2c0" + integrity sha512-Chq1s4CY7jmh8gO2qvLIJyfCDIN+EHLFW/9iShnp1z8FjBQMoodWP1kDC36VAMXXIvAjj4ARa7ntfAV2BrjsbA== -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, hasown@^2.0.4: + version "2.0.4" + resolved "https://registry.yarnpkg.com/hasown/-/hasown-2.0.4.tgz#8c62d8cb90beb2aad5d0a5b67581ad9854c3f003" + integrity sha512-T2UbfbBEF32wiepXIsMlTW9+dDYC6wMh/t/vYA4tuOMKqWz/n3vr1NFSxQiyP+zk2mXsoMA/i/7qV6LKut1t1A== 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.35: 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.47" + resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.47.tgz#521bb2786da8eb140b748841c0b3b3a75334ffc4" + integrity sha512-Uzmd6LXpouKo8EUK68IjH4+E01w/hXyV3R3g/geCJo+rXLNfh1xucB+LOzYEOQPSiUK3h/xZf0cQGcSsmyL2Og== normalize-path@^3.0.0: version "3.0.0" @@ -2915,9 +2904,9 @@ npm-run-path@^4.0.1: path-key "^3.0.0" nwsapi@^2.2.2: - version "2.2.23" - resolved "https://registry.yarnpkg.com/nwsapi/-/nwsapi-2.2.23.tgz#59712c3a88e6de2bb0b6ccc1070397267019cf6c" - integrity sha512-7wfH4sLbt4M0gCDzGE6vzQBo0bfTKjU7Sfpqy/7gs1qBfYz2vEJH6vXcBKpO3+6Yu1telwd0t9HpyOoLEQQbIQ== + version "2.2.24" + resolved "https://registry.yarnpkg.com/nwsapi/-/nwsapi-2.2.24.tgz#f8927043d4c9b516abdebe804a32c8d1f9484d1f" + integrity sha512-7YRhZ3jS45LwmSCT4b2sVFHt/WuovaktDU07QrtOBY2PXskss5a9jfmR9jptyumwXST+rFjrmppMY1KT/yn35A== once@^1.3.0: version "1.4.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.4" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.8.4.tgz#c73eceebae0616934be8dff28a7fd70757c8e696" + integrity sha512-rUCObTnP32Q08R2uuIrt7r9PlEonuTmtuXYcW6s5kjdlj3xbnwe+21yXptAUYcMAABLkYYTtnmzb3w3EDZfueA== 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.1" + resolved "https://registry.yarnpkg.com/terser-webpack-plugin/-/terser-webpack-plugin-5.6.1.tgz#47bc41bd8b8fab8383b62ec763b7394829097e7b" + integrity sha512-201R5j+sJpK8nFWwKVyNfZot8FaJbLZDq5evriVzbV1wDtSXDjRUDRfJzHpAaxFDMEhsZL1QkeqM61wgsS3KaQ== 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.3: + version "7.4.3" + resolved "https://registry.yarnpkg.com/tldts-core/-/tldts-core-7.4.3.tgz#d43401c0499cd884eeaf1ccf073df841a1e4e2dd" + integrity sha512-27ep5H9PzdBrNd5OFM/j3WCU8F3kPwM9D0BOaOf7uYfxMJfyr0K5Tjj69Gri+sZlh2WXd5buIm47NuPF29CDiw== 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.3" + resolved "https://registry.yarnpkg.com/tldts/-/tldts-7.4.3.tgz#536c93aecffc96d41ce5627a4b7e12f9c2cfceb5" + integrity sha512-A3BDQBeeukYPzB4QdQ1DtdlUmp4x2OCH8n5UVhEWbyANxNep8GavottKzd1xYKFJKjUgMyPT7EzOfnBO55s8Sg== dependencies: - tldts-core "^7.0.25" + tldts-core "^7.4.3" 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.6.1" + resolved "https://registry.yarnpkg.com/ts-loader/-/ts-loader-9.6.1.tgz#4a5e87a24c2f9f0e6f1fee3e844e4591f2628e55" + integrity sha512-8FMHnmxtpncUAu0ZjkqpXnOTlwc9eY95esH8WVN94guTPPdkg2ofVdiVM5j8L2lmjiGerXd56zXb/D2JyVQPLg== 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== @@ -3656,11 +3646,10 @@ walker@^1.0.8: makeerror "1.0.12" watchpack@^2.5.1: - version "2.5.1" - resolved "https://registry.yarnpkg.com/watchpack/-/watchpack-2.5.1.tgz#dd38b601f669e0cbf567cb802e75cead82cde102" - integrity sha512-Zn5uXdcFNIA1+1Ei5McRd+iRzfhENPCe7LeABkJtNulSxjma+l7ltNx55BWZkRlwRnpOgHqxnjyaDgJnNXnqzg== + version "2.5.2" + resolved "https://registry.yarnpkg.com/watchpack/-/watchpack-2.5.2.tgz#e12e82d84674266fc1c6dbfe38891b92ff0522ec" + integrity sha512-6i/00NBjP4yGPs+caKSyRfpTF/8Torsu0MOW3mMzIbhgISFder8i7xbqgHlLMwJrdiN8ndBV3UA1/AfzPSr+jg== dependencies: - glob-to-regexp "^0.4.1" graceful-fs "^4.1.2" webidl-conversions@^3.0.0: @@ -3673,17 +3662,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 +3681,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 +3725,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.22" + resolved "https://registry.yarnpkg.com/which-typed-array/-/which-typed-array-1.1.22.tgz#8f3cc78aefb40b437346dd40a1dbfa5d1da43fe9" + integrity sha512-fvO4ExWMFsqyhG3AiPAObMuY1lxaqgYcxbc49CNdWDDECOJNgQyvsOWVwbZc+qf3rzRtxojBK+CMEv0Ld5CYpw== 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 +3781,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"