From 3c0af9f611f0ada0bb909d0fed443b20e1c17347 Mon Sep 17 00:00:00 2001 From: "fern-api[bot]" <115122769+fern-api[bot]@users.noreply.github.com> Date: Fri, 29 Mar 2024 17:55:49 -0400 Subject: [PATCH] (fix): `assets.list` returns an object not `Asset[]` --- package.json | 2 +- .../resources/accessGroups/client/Client.ts | 2 +- src/api/resources/assets/client/Client.ts | 20 +++--- .../resources/collections/client/Client.ts | 10 +-- .../resources/fields/client/Client.ts | 4 +- .../resources/items/client/Client.ts | 20 +++--- src/api/resources/ecommerce/client/Client.ts | 2 +- src/api/resources/forms/client/Client.ts | 10 +-- src/api/resources/inventory/client/Client.ts | 4 +- src/api/resources/orders/client/Client.ts | 12 ++-- src/api/resources/pages/client/Client.ts | 10 +-- .../pages/resources/scripts/client/Client.ts | 6 +- src/api/resources/products/client/Client.ts | 12 ++-- src/api/resources/scripts/client/Client.ts | 6 +- src/api/resources/sites/client/Client.ts | 8 +-- .../resources/activityLogs/client/Client.ts | 2 +- .../sites/resources/scripts/client/Client.ts | 8 +-- src/api/resources/token/client/Client.ts | 4 +- src/api/resources/users/client/Client.ts | 10 +-- src/api/resources/webhooks/client/Client.ts | 8 +-- src/api/types/Assets.ts | 12 ++++ src/api/types/OauthScope.ts | 68 +++++++++++++------ src/api/types/index.ts | 1 + .../resources/assets/client/index.ts | 1 - .../resources/assets/client/list.ts | 14 ---- src/serialization/resources/index.ts | 2 +- src/serialization/types/Assets.ts | 20 ++++++ src/serialization/types/OauthScope.ts | 38 +++++++---- src/serialization/types/index.ts | 1 + 29 files changed, 186 insertions(+), 131 deletions(-) create mode 100644 src/api/types/Assets.ts delete mode 100644 src/serialization/resources/assets/client/list.ts create mode 100644 src/serialization/types/Assets.ts diff --git a/package.json b/package.json index 2126e1e..abd9fb6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "webflow-api", - "version": "v2.2.0", + "version": "v2.2.1", "private": false, "repository": "https://github.com/webflow/js-webflow-api", "main": "./index.js", diff --git a/src/api/resources/accessGroups/client/Client.ts b/src/api/resources/accessGroups/client/Client.ts index 92795ab..7f47cf3 100644 --- a/src/api/resources/accessGroups/client/Client.ts +++ b/src/api/resources/accessGroups/client/Client.ts @@ -65,7 +65,7 @@ export class AccessGroups { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "v2.2.0", + "X-Fern-SDK-Version": "v2.2.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, diff --git a/src/api/resources/assets/client/Client.ts b/src/api/resources/assets/client/Client.ts index 4e94676..3ed5e4d 100644 --- a/src/api/resources/assets/client/Client.ts +++ b/src/api/resources/assets/client/Client.ts @@ -35,7 +35,7 @@ export class Assets { * @example * await webflow.assets.list("site_id") */ - public async list(siteId: string, requestOptions?: Assets.RequestOptions): Promise { + public async list(siteId: string, requestOptions?: Assets.RequestOptions): Promise { const _response = await core.fetcher({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.WebflowEnvironment.Default, @@ -46,7 +46,7 @@ export class Assets { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "v2.2.0", + "X-Fern-SDK-Version": "v2.2.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, @@ -55,7 +55,7 @@ export class Assets { maxRetries: requestOptions?.maxRetries, }); if (_response.ok) { - return await serializers.assets.list.Response.parseOrThrow(_response.body, { + return await serializers.Assets.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -129,7 +129,7 @@ export class Assets { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "v2.2.0", + "X-Fern-SDK-Version": "v2.2.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, @@ -205,7 +205,7 @@ export class Assets { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "v2.2.0", + "X-Fern-SDK-Version": "v2.2.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, @@ -280,7 +280,7 @@ export class Assets { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "v2.2.0", + "X-Fern-SDK-Version": "v2.2.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, @@ -355,7 +355,7 @@ export class Assets { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "v2.2.0", + "X-Fern-SDK-Version": "v2.2.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, @@ -431,7 +431,7 @@ export class Assets { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "v2.2.0", + "X-Fern-SDK-Version": "v2.2.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, @@ -513,7 +513,7 @@ export class Assets { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "v2.2.0", + "X-Fern-SDK-Version": "v2.2.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, @@ -592,7 +592,7 @@ export class Assets { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "v2.2.0", + "X-Fern-SDK-Version": "v2.2.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, diff --git a/src/api/resources/collections/client/Client.ts b/src/api/resources/collections/client/Client.ts index 1351f4a..35135e2 100644 --- a/src/api/resources/collections/client/Client.ts +++ b/src/api/resources/collections/client/Client.ts @@ -48,7 +48,7 @@ export class Collections { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "v2.2.0", + "X-Fern-SDK-Version": "v2.2.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, @@ -131,7 +131,7 @@ export class Collections { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "v2.2.0", + "X-Fern-SDK-Version": "v2.2.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, @@ -207,7 +207,7 @@ export class Collections { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "v2.2.0", + "X-Fern-SDK-Version": "v2.2.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, @@ -282,7 +282,7 @@ export class Collections { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "v2.2.0", + "X-Fern-SDK-Version": "v2.2.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, @@ -355,7 +355,7 @@ export class Collections { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "v2.2.0", + "X-Fern-SDK-Version": "v2.2.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, diff --git a/src/api/resources/collections/resources/fields/client/Client.ts b/src/api/resources/collections/resources/fields/client/Client.ts index cf9bd7e..a07bde8 100644 --- a/src/api/resources/collections/resources/fields/client/Client.ts +++ b/src/api/resources/collections/resources/fields/client/Client.ts @@ -55,7 +55,7 @@ export class Fields { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "v2.2.0", + "X-Fern-SDK-Version": "v2.2.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, @@ -140,7 +140,7 @@ export class Fields { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "v2.2.0", + "X-Fern-SDK-Version": "v2.2.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, diff --git a/src/api/resources/collections/resources/items/client/Client.ts b/src/api/resources/collections/resources/items/client/Client.ts index 232a931..4c343d8 100644 --- a/src/api/resources/collections/resources/items/client/Client.ts +++ b/src/api/resources/collections/resources/items/client/Client.ts @@ -68,7 +68,7 @@ export class Items { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "v2.2.0", + "X-Fern-SDK-Version": "v2.2.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, @@ -160,7 +160,7 @@ export class Items { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "v2.2.0", + "X-Fern-SDK-Version": "v2.2.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, @@ -246,7 +246,7 @@ export class Items { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "v2.2.0", + "X-Fern-SDK-Version": "v2.2.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, @@ -329,7 +329,7 @@ export class Items { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "v2.2.0", + "X-Fern-SDK-Version": "v2.2.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, @@ -412,7 +412,7 @@ export class Items { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "v2.2.0", + "X-Fern-SDK-Version": "v2.2.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, @@ -503,7 +503,7 @@ export class Items { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "v2.2.0", + "X-Fern-SDK-Version": "v2.2.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, @@ -590,7 +590,7 @@ export class Items { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "v2.2.0", + "X-Fern-SDK-Version": "v2.2.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, @@ -670,7 +670,7 @@ export class Items { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "v2.2.0", + "X-Fern-SDK-Version": "v2.2.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, @@ -756,7 +756,7 @@ export class Items { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "v2.2.0", + "X-Fern-SDK-Version": "v2.2.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, @@ -838,7 +838,7 @@ export class Items { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "v2.2.0", + "X-Fern-SDK-Version": "v2.2.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, diff --git a/src/api/resources/ecommerce/client/Client.ts b/src/api/resources/ecommerce/client/Client.ts index ad89a65..4c12818 100644 --- a/src/api/resources/ecommerce/client/Client.ts +++ b/src/api/resources/ecommerce/client/Client.ts @@ -53,7 +53,7 @@ export class Ecommerce { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "v2.2.0", + "X-Fern-SDK-Version": "v2.2.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, diff --git a/src/api/resources/forms/client/Client.ts b/src/api/resources/forms/client/Client.ts index 09226f8..fdedfce 100644 --- a/src/api/resources/forms/client/Client.ts +++ b/src/api/resources/forms/client/Client.ts @@ -62,7 +62,7 @@ export class Forms { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "v2.2.0", + "X-Fern-SDK-Version": "v2.2.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, @@ -143,7 +143,7 @@ export class Forms { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "v2.2.0", + "X-Fern-SDK-Version": "v2.2.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, @@ -224,7 +224,7 @@ export class Forms { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "v2.2.0", + "X-Fern-SDK-Version": "v2.2.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, @@ -305,7 +305,7 @@ export class Forms { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "v2.2.0", + "X-Fern-SDK-Version": "v2.2.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, @@ -388,7 +388,7 @@ export class Forms { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "v2.2.0", + "X-Fern-SDK-Version": "v2.2.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, diff --git a/src/api/resources/inventory/client/Client.ts b/src/api/resources/inventory/client/Client.ts index 2de650d..39b9f1a 100644 --- a/src/api/resources/inventory/client/Client.ts +++ b/src/api/resources/inventory/client/Client.ts @@ -54,7 +54,7 @@ export class Inventory { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "v2.2.0", + "X-Fern-SDK-Version": "v2.2.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, @@ -146,7 +146,7 @@ export class Inventory { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "v2.2.0", + "X-Fern-SDK-Version": "v2.2.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, diff --git a/src/api/resources/orders/client/Client.ts b/src/api/resources/orders/client/Client.ts index 6814c08..2660fa9 100644 --- a/src/api/resources/orders/client/Client.ts +++ b/src/api/resources/orders/client/Client.ts @@ -68,7 +68,7 @@ export class Orders { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "v2.2.0", + "X-Fern-SDK-Version": "v2.2.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, @@ -152,7 +152,7 @@ export class Orders { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "v2.2.0", + "X-Fern-SDK-Version": "v2.2.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, @@ -245,7 +245,7 @@ export class Orders { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "v2.2.0", + "X-Fern-SDK-Version": "v2.2.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, @@ -334,7 +334,7 @@ export class Orders { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "v2.2.0", + "X-Fern-SDK-Version": "v2.2.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, @@ -424,7 +424,7 @@ export class Orders { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "v2.2.0", + "X-Fern-SDK-Version": "v2.2.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, @@ -513,7 +513,7 @@ export class Orders { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "v2.2.0", + "X-Fern-SDK-Version": "v2.2.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, diff --git a/src/api/resources/pages/client/Client.ts b/src/api/resources/pages/client/Client.ts index 7c96d76..571d86b 100644 --- a/src/api/resources/pages/client/Client.ts +++ b/src/api/resources/pages/client/Client.ts @@ -65,7 +65,7 @@ export class Pages { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "v2.2.0", + "X-Fern-SDK-Version": "v2.2.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, @@ -151,7 +151,7 @@ export class Pages { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "v2.2.0", + "X-Fern-SDK-Version": "v2.2.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, @@ -262,7 +262,7 @@ export class Pages { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "v2.2.0", + "X-Fern-SDK-Version": "v2.2.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, @@ -350,7 +350,7 @@ export class Pages { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "v2.2.0", + "X-Fern-SDK-Version": "v2.2.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, @@ -442,7 +442,7 @@ export class Pages { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "v2.2.0", + "X-Fern-SDK-Version": "v2.2.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, diff --git a/src/api/resources/pages/resources/scripts/client/Client.ts b/src/api/resources/pages/resources/scripts/client/Client.ts index 6f045f6..f7ba167 100644 --- a/src/api/resources/pages/resources/scripts/client/Client.ts +++ b/src/api/resources/pages/resources/scripts/client/Client.ts @@ -49,7 +49,7 @@ export class Scripts { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "v2.2.0", + "X-Fern-SDK-Version": "v2.2.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, @@ -145,7 +145,7 @@ export class Scripts { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "v2.2.0", + "X-Fern-SDK-Version": "v2.2.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, @@ -221,7 +221,7 @@ export class Scripts { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "v2.2.0", + "X-Fern-SDK-Version": "v2.2.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, diff --git a/src/api/resources/products/client/Client.ts b/src/api/resources/products/client/Client.ts index 629e03a..9c9a2c5 100644 --- a/src/api/resources/products/client/Client.ts +++ b/src/api/resources/products/client/Client.ts @@ -64,7 +64,7 @@ export class Products { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "v2.2.0", + "X-Fern-SDK-Version": "v2.2.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, @@ -158,7 +158,7 @@ export class Products { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "v2.2.0", + "X-Fern-SDK-Version": "v2.2.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, @@ -246,7 +246,7 @@ export class Products { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "v2.2.0", + "X-Fern-SDK-Version": "v2.2.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, @@ -378,7 +378,7 @@ export class Products { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "v2.2.0", + "X-Fern-SDK-Version": "v2.2.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, @@ -485,7 +485,7 @@ export class Products { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "v2.2.0", + "X-Fern-SDK-Version": "v2.2.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, @@ -591,7 +591,7 @@ export class Products { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "v2.2.0", + "X-Fern-SDK-Version": "v2.2.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, diff --git a/src/api/resources/scripts/client/Client.ts b/src/api/resources/scripts/client/Client.ts index 387df23..45fd3a1 100644 --- a/src/api/resources/scripts/client/Client.ts +++ b/src/api/resources/scripts/client/Client.ts @@ -46,7 +46,7 @@ export class Scripts { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "v2.2.0", + "X-Fern-SDK-Version": "v2.2.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, @@ -130,7 +130,7 @@ export class Scripts { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "v2.2.0", + "X-Fern-SDK-Version": "v2.2.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, @@ -214,7 +214,7 @@ export class Scripts { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "v2.2.0", + "X-Fern-SDK-Version": "v2.2.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, diff --git a/src/api/resources/sites/client/Client.ts b/src/api/resources/sites/client/Client.ts index eb5de66..64c5a88 100644 --- a/src/api/resources/sites/client/Client.ts +++ b/src/api/resources/sites/client/Client.ts @@ -48,7 +48,7 @@ export class Sites { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "v2.2.0", + "X-Fern-SDK-Version": "v2.2.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, @@ -123,7 +123,7 @@ export class Sites { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "v2.2.0", + "X-Fern-SDK-Version": "v2.2.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, @@ -198,7 +198,7 @@ export class Sites { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "v2.2.0", + "X-Fern-SDK-Version": "v2.2.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, @@ -279,7 +279,7 @@ export class Sites { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "v2.2.0", + "X-Fern-SDK-Version": "v2.2.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, diff --git a/src/api/resources/sites/resources/activityLogs/client/Client.ts b/src/api/resources/sites/resources/activityLogs/client/Client.ts index 7a2d92e..670f9aa 100644 --- a/src/api/resources/sites/resources/activityLogs/client/Client.ts +++ b/src/api/resources/sites/resources/activityLogs/client/Client.ts @@ -59,7 +59,7 @@ export class ActivityLogs { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "v2.2.0", + "X-Fern-SDK-Version": "v2.2.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, diff --git a/src/api/resources/sites/resources/scripts/client/Client.ts b/src/api/resources/sites/resources/scripts/client/Client.ts index 4ace1b8..c4b8b8e 100644 --- a/src/api/resources/sites/resources/scripts/client/Client.ts +++ b/src/api/resources/sites/resources/scripts/client/Client.ts @@ -49,7 +49,7 @@ export class Scripts { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "v2.2.0", + "X-Fern-SDK-Version": "v2.2.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, @@ -145,7 +145,7 @@ export class Scripts { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "v2.2.0", + "X-Fern-SDK-Version": "v2.2.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, @@ -221,7 +221,7 @@ export class Scripts { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "v2.2.0", + "X-Fern-SDK-Version": "v2.2.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, @@ -304,7 +304,7 @@ export class Scripts { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "v2.2.0", + "X-Fern-SDK-Version": "v2.2.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, diff --git a/src/api/resources/token/client/Client.ts b/src/api/resources/token/client/Client.ts index edfe41f..6bf900e 100644 --- a/src/api/resources/token/client/Client.ts +++ b/src/api/resources/token/client/Client.ts @@ -43,7 +43,7 @@ export class Token { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "v2.2.0", + "X-Fern-SDK-Version": "v2.2.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, @@ -108,7 +108,7 @@ export class Token { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "v2.2.0", + "X-Fern-SDK-Version": "v2.2.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, diff --git a/src/api/resources/users/client/Client.ts b/src/api/resources/users/client/Client.ts index 601524d..4db71f5 100644 --- a/src/api/resources/users/client/Client.ts +++ b/src/api/resources/users/client/Client.ts @@ -65,7 +65,7 @@ export class Users { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "v2.2.0", + "X-Fern-SDK-Version": "v2.2.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, @@ -144,7 +144,7 @@ export class Users { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "v2.2.0", + "X-Fern-SDK-Version": "v2.2.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, @@ -222,7 +222,7 @@ export class Users { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "v2.2.0", + "X-Fern-SDK-Version": "v2.2.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, @@ -308,7 +308,7 @@ export class Users { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "v2.2.0", + "X-Fern-SDK-Version": "v2.2.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, @@ -395,7 +395,7 @@ export class Users { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "v2.2.0", + "X-Fern-SDK-Version": "v2.2.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, diff --git a/src/api/resources/webhooks/client/Client.ts b/src/api/resources/webhooks/client/Client.ts index f1e3f90..b2e99f3 100644 --- a/src/api/resources/webhooks/client/Client.ts +++ b/src/api/resources/webhooks/client/Client.ts @@ -46,7 +46,7 @@ export class Webhooks { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "v2.2.0", + "X-Fern-SDK-Version": "v2.2.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, @@ -128,7 +128,7 @@ export class Webhooks { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "v2.2.0", + "X-Fern-SDK-Version": "v2.2.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, @@ -204,7 +204,7 @@ export class Webhooks { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "v2.2.0", + "X-Fern-SDK-Version": "v2.2.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, @@ -279,7 +279,7 @@ export class Webhooks { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "v2.2.0", + "X-Fern-SDK-Version": "v2.2.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, diff --git a/src/api/types/Assets.ts b/src/api/types/Assets.ts new file mode 100644 index 0000000..182d74e --- /dev/null +++ b/src/api/types/Assets.ts @@ -0,0 +1,12 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Webflow from ".."; + +/** + * A list of assets + */ +export interface Assets { + assets?: Webflow.Asset[]; +} diff --git a/src/api/types/OauthScope.ts b/src/api/types/OauthScope.ts index 242fbb2..6e59e23 100644 --- a/src/api/types/OauthScope.ts +++ b/src/api/types/OauthScope.ts @@ -7,50 +7,74 @@ export type OauthScope = * read details about the authorized user */ | "authorized_user:read" /** - * read pages on the site */ - | "read:pages" + * read assets on the site */ + | "assets:read" /** - * read sites on the site */ - | "sites:read" + * write assets on a site */ + | "assets:write" /** - * modify pages on the site */ - | "sites:write" + * read collections and items for a site */ + | "cms:read" + /** + * write to collections and items for a site */ + | "cms:write" /** * read custom code on the site */ | "custom_code:read" /** * modify custom code on the site */ | "custom_code:write" - /** - * delete custom code on the site */ - | "custom_code:delete" - /** - * read users on the site */ - | "users:read" - /** - * modify users on the site */ - | "users:write" /** * read ecommerce data */ | "ecommerce:read" /** * edit ecommerce data */ | "ecommerce:write" + /** + * read form data */ + | "forms:read" + /** + * write form data */ + | "forms:write" + /** + * read pages on the site */ + | "pages:read" + /** + * write to pages on the site */ + | "pages:write" + /** + * read sites on the site */ + | "sites:read" + /** + * modify pages on the site */ + | "sites:write" + /** + * read users on the site */ + | "users:read" /** * read site activity logs */ - | "site_activity:read"; + | "site_activity:read" + /** + * modify users on the site */ + | "users:write"; export const OauthScope = { AuthorizedUserRead: "authorized_user:read", - ReadPages: "read:pages", - SitesRead: "sites:read", - SitesWrite: "sites:write", + AssetsRead: "assets:read", + AssetsWrite: "assets:write", + CmsRead: "cms:read", + CmsWrite: "cms:write", CustomCodeRead: "custom_code:read", CustomCodeWrite: "custom_code:write", - CustomCodeDelete: "custom_code:delete", - UsersRead: "users:read", - UsersWrite: "users:write", EcommerceRead: "ecommerce:read", EcommerceWrite: "ecommerce:write", + FormsRead: "forms:read", + FormsWrite: "forms:write", + PagesRead: "pages:read", + PagesWrite: "pages:write", + SitesRead: "sites:read", + SitesWrite: "sites:write", + UsersRead: "users:read", SiteActivityRead: "site_activity:read", + UsersWrite: "users:write", } as const; diff --git a/src/api/types/index.ts b/src/api/types/index.ts index 08be623..888fad6 100644 --- a/src/api/types/index.ts +++ b/src/api/types/index.ts @@ -47,6 +47,7 @@ export * from "./CustomCodeBlock"; export * from "./ListCustomCodeBlocks"; export * from "./AssetVariant"; export * from "./Asset"; +export * from "./Assets"; export * from "./AssetUploadUploadDetails"; export * from "./AssetUpload"; export * from "./AssetFolder"; diff --git a/src/serialization/resources/assets/client/index.ts b/src/serialization/resources/assets/client/index.ts index 257d03e..415726b 100644 --- a/src/serialization/resources/assets/client/index.ts +++ b/src/serialization/resources/assets/client/index.ts @@ -1,2 +1 @@ -export * as list from "./list"; export * from "./requests"; diff --git a/src/serialization/resources/assets/client/list.ts b/src/serialization/resources/assets/client/list.ts deleted file mode 100644 index 15b796c..0000000 --- a/src/serialization/resources/assets/client/list.ts +++ /dev/null @@ -1,14 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as serializers from "../../.."; -import * as Webflow from "../../../../api"; -import * as core from "../../../../core"; - -export const Response: core.serialization.Schema = - core.serialization.list(core.serialization.lazyObject(async () => (await import("../../..")).Asset)); - -export declare namespace Response { - type Raw = serializers.Asset.Raw[]; -} diff --git a/src/serialization/resources/index.ts b/src/serialization/resources/index.ts index ad26b86..a0e9fbd 100644 --- a/src/serialization/resources/index.ts +++ b/src/serialization/resources/index.ts @@ -11,13 +11,13 @@ export * as orders from "./orders"; export * from "./orders/types"; export * as inventory from "./inventory"; export * from "./inventory/types"; -export * as assets from "./assets"; export * as sites from "./sites"; export * from "./sites/client/requests"; export * from "./collections/client/requests"; export * from "./pages/client/requests"; export * as scripts from "./scripts"; export * from "./scripts/client/requests"; +export * as assets from "./assets"; export * from "./assets/client/requests"; export * as webhooks from "./webhooks"; export * from "./webhooks/client/requests"; diff --git a/src/serialization/types/Assets.ts b/src/serialization/types/Assets.ts new file mode 100644 index 0000000..9030101 --- /dev/null +++ b/src/serialization/types/Assets.ts @@ -0,0 +1,20 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from ".."; +import * as Webflow from "../../api"; +import * as core from "../../core"; + +export const Assets: core.serialization.ObjectSchema = + core.serialization.object({ + assets: core.serialization + .list(core.serialization.lazyObject(async () => (await import("..")).Asset)) + .optional(), + }); + +export declare namespace Assets { + interface Raw { + assets?: serializers.Asset.Raw[] | null; + } +} diff --git a/src/serialization/types/OauthScope.ts b/src/serialization/types/OauthScope.ts index edb440a..887686c 100644 --- a/src/serialization/types/OauthScope.ts +++ b/src/serialization/types/OauthScope.ts @@ -9,31 +9,43 @@ import * as core from "../../core"; export const OauthScope: core.serialization.Schema = core.serialization.enum_([ "authorized_user:read", - "read:pages", - "sites:read", - "sites:write", + "assets:read", + "assets:write", + "cms:read", + "cms:write", "custom_code:read", "custom_code:write", - "custom_code:delete", - "users:read", - "users:write", "ecommerce:read", "ecommerce:write", + "forms:read", + "forms:write", + "pages:read", + "pages:write", + "sites:read", + "sites:write", + "users:read", "site_activity:read", + "users:write", ]); export declare namespace OauthScope { type Raw = | "authorized_user:read" - | "read:pages" - | "sites:read" - | "sites:write" + | "assets:read" + | "assets:write" + | "cms:read" + | "cms:write" | "custom_code:read" | "custom_code:write" - | "custom_code:delete" - | "users:read" - | "users:write" | "ecommerce:read" | "ecommerce:write" - | "site_activity:read"; + | "forms:read" + | "forms:write" + | "pages:read" + | "pages:write" + | "sites:read" + | "sites:write" + | "users:read" + | "site_activity:read" + | "users:write"; } diff --git a/src/serialization/types/index.ts b/src/serialization/types/index.ts index 08be623..888fad6 100644 --- a/src/serialization/types/index.ts +++ b/src/serialization/types/index.ts @@ -47,6 +47,7 @@ export * from "./CustomCodeBlock"; export * from "./ListCustomCodeBlocks"; export * from "./AssetVariant"; export * from "./Asset"; +export * from "./Assets"; export * from "./AssetUploadUploadDetails"; export * from "./AssetUpload"; export * from "./AssetFolder";