CMS:write
*
* @param {string} collectionId - Unique identifier for a Collection
* @param {Webflow.CollectionItem} request
@@ -187,7 +195,7 @@ export class Items {
Authorization: await this._getAuthorizationHeader(),
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "webflow-api",
- "X-Fern-SDK-Version": "2.3.5",
+ "X-Fern-SDK-Version": "2.3.6",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
@@ -210,7 +218,15 @@ export class Items {
case 404:
throw new Webflow.NotFoundError(_response.error.body);
case 429:
- throw new Webflow.TooManyRequestsError(_response.error.body);
+ throw new Webflow.TooManyRequestsError(
+ await serializers.TooManyRequestsErrorBody.parseOrThrow(_response.error.body, {
+ unrecognizedObjectKeys: "passthrough",
+ allowUnrecognizedUnionMembers: true,
+ allowUnrecognizedEnumValues: true,
+ skipValidation: true,
+ breadcrumbsPrefix: ["response"],
+ })
+ );
case 500:
throw new Webflow.InternalServerError(_response.error.body);
default:
@@ -297,7 +313,7 @@ export class Items {
Authorization: await this._getAuthorizationHeader(),
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "webflow-api",
- "X-Fern-SDK-Version": "2.3.5",
+ "X-Fern-SDK-Version": "2.3.6",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
@@ -326,7 +342,15 @@ export class Items {
case 404:
throw new Webflow.NotFoundError(_response.error.body);
case 429:
- throw new Webflow.TooManyRequestsError(_response.error.body);
+ throw new Webflow.TooManyRequestsError(
+ await serializers.TooManyRequestsErrorBody.parseOrThrow(_response.error.body, {
+ unrecognizedObjectKeys: "passthrough",
+ allowUnrecognizedUnionMembers: true,
+ allowUnrecognizedEnumValues: true,
+ skipValidation: true,
+ breadcrumbsPrefix: ["response"],
+ })
+ );
case 500:
throw new Webflow.InternalServerError(_response.error.body);
default:
@@ -395,7 +419,7 @@ export class Items {
Authorization: await this._getAuthorizationHeader(),
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "webflow-api",
- "X-Fern-SDK-Version": "2.3.5",
+ "X-Fern-SDK-Version": "2.3.6",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
@@ -418,7 +442,15 @@ export class Items {
case 404:
throw new Webflow.NotFoundError(_response.error.body);
case 429:
- throw new Webflow.TooManyRequestsError(_response.error.body);
+ throw new Webflow.TooManyRequestsError(
+ await serializers.TooManyRequestsErrorBody.parseOrThrow(_response.error.body, {
+ unrecognizedObjectKeys: "passthrough",
+ allowUnrecognizedUnionMembers: true,
+ allowUnrecognizedEnumValues: true,
+ skipValidation: true,
+ breadcrumbsPrefix: ["response"],
+ })
+ );
case 500:
throw new Webflow.InternalServerError(_response.error.body);
default:
@@ -477,7 +509,7 @@ export class Items {
Authorization: await this._getAuthorizationHeader(),
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "webflow-api",
- "X-Fern-SDK-Version": "2.3.5",
+ "X-Fern-SDK-Version": "2.3.6",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
@@ -502,7 +534,15 @@ export class Items {
case 404:
throw new Webflow.NotFoundError(_response.error.body);
case 429:
- throw new Webflow.TooManyRequestsError(_response.error.body);
+ throw new Webflow.TooManyRequestsError(
+ await serializers.TooManyRequestsErrorBody.parseOrThrow(_response.error.body, {
+ unrecognizedObjectKeys: "passthrough",
+ allowUnrecognizedUnionMembers: true,
+ allowUnrecognizedEnumValues: true,
+ skipValidation: true,
+ breadcrumbsPrefix: ["response"],
+ })
+ );
case 500:
throw new Webflow.InternalServerError(_response.error.body);
default:
@@ -567,7 +607,7 @@ export class Items {
Authorization: await this._getAuthorizationHeader(),
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "webflow-api",
- "X-Fern-SDK-Version": "2.3.5",
+ "X-Fern-SDK-Version": "2.3.6",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
@@ -596,7 +636,15 @@ export class Items {
case 404:
throw new Webflow.NotFoundError(_response.error.body);
case 429:
- throw new Webflow.TooManyRequestsError(_response.error.body);
+ throw new Webflow.TooManyRequestsError(
+ await serializers.TooManyRequestsErrorBody.parseOrThrow(_response.error.body, {
+ unrecognizedObjectKeys: "passthrough",
+ allowUnrecognizedUnionMembers: true,
+ allowUnrecognizedEnumValues: true,
+ skipValidation: true,
+ breadcrumbsPrefix: ["response"],
+ })
+ );
case 500:
throw new Webflow.InternalServerError(_response.error.body);
default:
@@ -661,7 +709,7 @@ export class Items {
Authorization: await this._getAuthorizationHeader(),
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "webflow-api",
- "X-Fern-SDK-Version": "2.3.5",
+ "X-Fern-SDK-Version": "2.3.6",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
@@ -684,7 +732,15 @@ export class Items {
case 404:
throw new Webflow.NotFoundError(_response.error.body);
case 429:
- throw new Webflow.TooManyRequestsError(_response.error.body);
+ throw new Webflow.TooManyRequestsError(
+ await serializers.TooManyRequestsErrorBody.parseOrThrow(_response.error.body, {
+ unrecognizedObjectKeys: "passthrough",
+ allowUnrecognizedUnionMembers: true,
+ allowUnrecognizedEnumValues: true,
+ skipValidation: true,
+ breadcrumbsPrefix: ["response"],
+ })
+ );
case 500:
throw new Webflow.InternalServerError(_response.error.body);
default:
@@ -755,7 +811,7 @@ export class Items {
Authorization: await this._getAuthorizationHeader(),
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "webflow-api",
- "X-Fern-SDK-Version": "2.3.5",
+ "X-Fern-SDK-Version": "2.3.6",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
@@ -784,7 +840,15 @@ export class Items {
case 404:
throw new Webflow.NotFoundError(_response.error.body);
case 429:
- throw new Webflow.TooManyRequestsError(_response.error.body);
+ throw new Webflow.TooManyRequestsError(
+ await serializers.TooManyRequestsErrorBody.parseOrThrow(_response.error.body, {
+ unrecognizedObjectKeys: "passthrough",
+ allowUnrecognizedUnionMembers: true,
+ allowUnrecognizedEnumValues: true,
+ skipValidation: true,
+ breadcrumbsPrefix: ["response"],
+ })
+ );
case 500:
throw new Webflow.InternalServerError(_response.error.body);
default:
@@ -849,7 +913,7 @@ export class Items {
Authorization: await this._getAuthorizationHeader(),
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "webflow-api",
- "X-Fern-SDK-Version": "2.3.5",
+ "X-Fern-SDK-Version": "2.3.6",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
@@ -878,7 +942,15 @@ export class Items {
case 404:
throw new Webflow.NotFoundError(_response.error.body);
case 429:
- throw new Webflow.TooManyRequestsError(_response.error.body);
+ throw new Webflow.TooManyRequestsError(
+ await serializers.TooManyRequestsErrorBody.parseOrThrow(_response.error.body, {
+ unrecognizedObjectKeys: "passthrough",
+ allowUnrecognizedUnionMembers: true,
+ allowUnrecognizedEnumValues: true,
+ skipValidation: true,
+ breadcrumbsPrefix: ["response"],
+ })
+ );
case 500:
throw new Webflow.InternalServerError(_response.error.body);
default:
@@ -905,7 +977,7 @@ export class Items {
}
/**
- * Remove a live item from the site. Removing a published item will unpublish the item from the live site and set it to draft. This endpoint does not currently support bulk deletion. Required scope | `CMS:write`
+ * Remove a live item from the site. Removing a published item will unpublish the item from the live site and set it to draft. This endpoint does not currently support bulk deletion. Required scope | `CMS:write`
*
* @param {string} collectionId - Unique identifier for a Collection
* @param {string} itemId - Unique identifier for an Item
@@ -943,7 +1015,7 @@ export class Items {
Authorization: await this._getAuthorizationHeader(),
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "webflow-api",
- "X-Fern-SDK-Version": "2.3.5",
+ "X-Fern-SDK-Version": "2.3.6",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
@@ -966,7 +1038,15 @@ export class Items {
case 404:
throw new Webflow.NotFoundError(_response.error.body);
case 429:
- throw new Webflow.TooManyRequestsError(_response.error.body);
+ throw new Webflow.TooManyRequestsError(
+ await serializers.TooManyRequestsErrorBody.parseOrThrow(_response.error.body, {
+ unrecognizedObjectKeys: "passthrough",
+ allowUnrecognizedUnionMembers: true,
+ allowUnrecognizedEnumValues: true,
+ skipValidation: true,
+ breadcrumbsPrefix: ["response"],
+ })
+ );
case 500:
throw new Webflow.InternalServerError(_response.error.body);
default:
@@ -1037,7 +1117,7 @@ export class Items {
Authorization: await this._getAuthorizationHeader(),
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "webflow-api",
- "X-Fern-SDK-Version": "2.3.5",
+ "X-Fern-SDK-Version": "2.3.6",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
@@ -1066,7 +1146,15 @@ export class Items {
case 404:
throw new Webflow.NotFoundError(_response.error.body);
case 429:
- throw new Webflow.TooManyRequestsError(_response.error.body);
+ throw new Webflow.TooManyRequestsError(
+ await serializers.TooManyRequestsErrorBody.parseOrThrow(_response.error.body, {
+ unrecognizedObjectKeys: "passthrough",
+ allowUnrecognizedUnionMembers: true,
+ allowUnrecognizedEnumValues: true,
+ skipValidation: true,
+ breadcrumbsPrefix: ["response"],
+ })
+ );
case 500:
throw new Webflow.InternalServerError(_response.error.body);
default:
@@ -1125,7 +1213,7 @@ export class Items {
Authorization: await this._getAuthorizationHeader(),
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "webflow-api",
- "X-Fern-SDK-Version": "2.3.5",
+ "X-Fern-SDK-Version": "2.3.6",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
@@ -1150,7 +1238,15 @@ export class Items {
case 404:
throw new Webflow.NotFoundError(_response.error.body);
case 429:
- throw new Webflow.TooManyRequestsError(_response.error.body);
+ throw new Webflow.TooManyRequestsError(
+ await serializers.TooManyRequestsErrorBody.parseOrThrow(_response.error.body, {
+ unrecognizedObjectKeys: "passthrough",
+ allowUnrecognizedUnionMembers: true,
+ allowUnrecognizedEnumValues: true,
+ skipValidation: true,
+ breadcrumbsPrefix: ["response"],
+ })
+ );
case 500:
throw new Webflow.InternalServerError(_response.error.body);
default:
diff --git a/src/api/resources/ecommerce/client/Client.ts b/src/api/resources/ecommerce/client/Client.ts
index 4ce73086..b0ada75d 100644
--- a/src/api/resources/ecommerce/client/Client.ts
+++ b/src/api/resources/ecommerce/client/Client.ts
@@ -61,7 +61,7 @@ export class Ecommerce {
Authorization: await this._getAuthorizationHeader(),
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "webflow-api",
- "X-Fern-SDK-Version": "2.3.5",
+ "X-Fern-SDK-Version": "2.3.6",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
@@ -93,7 +93,15 @@ export class Ecommerce {
case 409:
throw new Webflow.ConflictError(_response.error.body);
case 429:
- throw new Webflow.TooManyRequestsError(_response.error.body);
+ throw new Webflow.TooManyRequestsError(
+ await serializers.TooManyRequestsErrorBody.parseOrThrow(_response.error.body, {
+ unrecognizedObjectKeys: "passthrough",
+ allowUnrecognizedUnionMembers: true,
+ allowUnrecognizedEnumValues: true,
+ skipValidation: true,
+ breadcrumbsPrefix: ["response"],
+ })
+ );
case 500:
throw new Webflow.InternalServerError(_response.error.body);
default:
diff --git a/src/api/resources/forms/client/Client.ts b/src/api/resources/forms/client/Client.ts
index 90cf065e..71c06aba 100644
--- a/src/api/resources/forms/client/Client.ts
+++ b/src/api/resources/forms/client/Client.ts
@@ -71,7 +71,7 @@ export class Forms {
Authorization: await this._getAuthorizationHeader(),
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "webflow-api",
- "X-Fern-SDK-Version": "2.3.5",
+ "X-Fern-SDK-Version": "2.3.6",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
@@ -104,7 +104,15 @@ export class Forms {
case 409:
throw new Webflow.ConflictError(_response.error.body);
case 429:
- throw new Webflow.TooManyRequestsError(_response.error.body);
+ throw new Webflow.TooManyRequestsError(
+ await serializers.TooManyRequestsErrorBody.parseOrThrow(_response.error.body, {
+ unrecognizedObjectKeys: "passthrough",
+ allowUnrecognizedUnionMembers: true,
+ allowUnrecognizedEnumValues: true,
+ skipValidation: true,
+ breadcrumbsPrefix: ["response"],
+ })
+ );
case 500:
throw new Webflow.InternalServerError(_response.error.body);
default:
@@ -157,7 +165,7 @@ export class Forms {
Authorization: await this._getAuthorizationHeader(),
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "webflow-api",
- "X-Fern-SDK-Version": "2.3.5",
+ "X-Fern-SDK-Version": "2.3.6",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
@@ -187,7 +195,15 @@ export class Forms {
case 404:
throw new Webflow.NotFoundError(_response.error.body);
case 429:
- throw new Webflow.TooManyRequestsError(_response.error.body);
+ throw new Webflow.TooManyRequestsError(
+ await serializers.TooManyRequestsErrorBody.parseOrThrow(_response.error.body, {
+ unrecognizedObjectKeys: "passthrough",
+ allowUnrecognizedUnionMembers: true,
+ allowUnrecognizedEnumValues: true,
+ skipValidation: true,
+ breadcrumbsPrefix: ["response"],
+ })
+ );
case 500:
throw new Webflow.InternalServerError(_response.error.body);
default:
@@ -217,6 +233,7 @@ export class Forms {
* List form submissions for a given form Required scope | `forms:read`
*
* @param {string} formId - Unique identifier for a Form
+ * @param {Webflow.FormsListSubmissionsRequest} request
* @param {Forms.RequestOptions} requestOptions - Request-specific configuration.
*
* @throws {@link Webflow.BadRequestError}
@@ -231,8 +248,19 @@ export class Forms {
*/
public async listSubmissions(
formId: string,
+ request: Webflow.FormsListSubmissionsRequest = {},
requestOptions?: Forms.RequestOptions
): Promise+ * + * Required scope | `pages:write` * * @param {string} pageId - Unique identifier for a Page * @param {Webflow.DomWrite} request @@ -488,7 +524,7 @@ export class Pages { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "2.3.5", + "X-Fern-SDK-Version": "2.3.6", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, @@ -520,7 +556,15 @@ export class Pages { case 404: throw new Webflow.NotFoundError(_response.error.body); case 429: - throw new Webflow.TooManyRequestsError(_response.error.body); + throw new Webflow.TooManyRequestsError( + await serializers.TooManyRequestsErrorBody.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); case 500: throw new Webflow.InternalServerError(_response.error.body); default: diff --git a/src/api/resources/pages/resources/scripts/client/Client.ts b/src/api/resources/pages/resources/scripts/client/Client.ts index 382afc12..20a0781c 100644 --- a/src/api/resources/pages/resources/scripts/client/Client.ts +++ b/src/api/resources/pages/resources/scripts/client/Client.ts @@ -57,7 +57,7 @@ export class Scripts { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "2.3.5", + "X-Fern-SDK-Version": "2.3.6", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, @@ -85,7 +85,15 @@ export class Scripts { case 404: throw new Webflow.NotFoundError(_response.error.body); case 429: - throw new Webflow.TooManyRequestsError(_response.error.body); + throw new Webflow.TooManyRequestsError( + await serializers.TooManyRequestsErrorBody.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); case 500: throw new Webflow.InternalServerError(_response.error.body); default: @@ -155,7 +163,7 @@ export class Scripts { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "2.3.5", + "X-Fern-SDK-Version": "2.3.6", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, @@ -184,7 +192,15 @@ export class Scripts { case 404: throw new Webflow.NotFoundError(_response.error.body); case 429: - throw new Webflow.TooManyRequestsError(_response.error.body); + throw new Webflow.TooManyRequestsError( + await serializers.TooManyRequestsErrorBody.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); case 500: throw new Webflow.InternalServerError(_response.error.body); default: @@ -236,7 +252,7 @@ export class Scripts { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "2.3.5", + "X-Fern-SDK-Version": "2.3.6", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, @@ -258,7 +274,15 @@ export class Scripts { case 404: throw new Webflow.NotFoundError(_response.error.body); case 429: - throw new Webflow.TooManyRequestsError(_response.error.body); + throw new Webflow.TooManyRequestsError( + await serializers.TooManyRequestsErrorBody.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); case 500: throw new Webflow.InternalServerError(_response.error.body); default: diff --git a/src/api/resources/products/client/Client.ts b/src/api/resources/products/client/Client.ts index c2e0b7b5..d784f418 100644 --- a/src/api/resources/products/client/Client.ts +++ b/src/api/resources/products/client/Client.ts @@ -73,7 +73,7 @@ export class Products { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "2.3.5", + "X-Fern-SDK-Version": "2.3.6", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, @@ -106,7 +106,15 @@ export class Products { case 409: throw new Webflow.ConflictError(_response.error.body); case 429: - throw new Webflow.TooManyRequestsError(_response.error.body); + throw new Webflow.TooManyRequestsError( + await serializers.TooManyRequestsErrorBody.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); case 500: throw new Webflow.InternalServerError(_response.error.body); default: @@ -173,7 +181,7 @@ export class Products { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "2.3.5", + "X-Fern-SDK-Version": "2.3.6", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, @@ -206,7 +214,15 @@ export class Products { case 409: throw new Webflow.ConflictError(_response.error.body); case 429: - throw new Webflow.TooManyRequestsError(_response.error.body); + throw new Webflow.TooManyRequestsError( + await serializers.TooManyRequestsErrorBody.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); case 500: throw new Webflow.InternalServerError(_response.error.body); default: @@ -267,7 +283,7 @@ export class Products { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "2.3.5", + "X-Fern-SDK-Version": "2.3.6", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, @@ -299,7 +315,15 @@ export class Products { case 409: throw new Webflow.ConflictError(_response.error.body); case 429: - throw new Webflow.TooManyRequestsError(_response.error.body); + throw new Webflow.TooManyRequestsError( + await serializers.TooManyRequestsErrorBody.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); case 500: throw new Webflow.InternalServerError(_response.error.body); default: @@ -362,7 +386,7 @@ export class Products { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "2.3.5", + "X-Fern-SDK-Version": "2.3.6", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, @@ -395,7 +419,15 @@ export class Products { case 409: throw new Webflow.ConflictError(_response.error.body); case 429: - throw new Webflow.TooManyRequestsError(_response.error.body); + throw new Webflow.TooManyRequestsError( + await serializers.TooManyRequestsErrorBody.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); case 500: throw new Webflow.InternalServerError(_response.error.body); default: @@ -462,7 +494,7 @@ export class Products { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "2.3.5", + "X-Fern-SDK-Version": "2.3.6", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, @@ -495,7 +527,15 @@ export class Products { case 409: throw new Webflow.ConflictError(_response.error.body); case 429: - throw new Webflow.TooManyRequestsError(_response.error.body); + throw new Webflow.TooManyRequestsError( + await serializers.TooManyRequestsErrorBody.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); case 500: throw new Webflow.InternalServerError(_response.error.body); default: @@ -564,7 +604,7 @@ export class Products { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "2.3.5", + "X-Fern-SDK-Version": "2.3.6", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, @@ -597,7 +637,15 @@ export class Products { case 409: throw new Webflow.ConflictError(_response.error.body); case 429: - throw new Webflow.TooManyRequestsError(_response.error.body); + throw new Webflow.TooManyRequestsError( + await serializers.TooManyRequestsErrorBody.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); case 500: throw new Webflow.InternalServerError(_response.error.body); default: diff --git a/src/api/resources/scripts/client/Client.ts b/src/api/resources/scripts/client/Client.ts index 85449735..ab04dafe 100644 --- a/src/api/resources/scripts/client/Client.ts +++ b/src/api/resources/scripts/client/Client.ts @@ -54,7 +54,7 @@ export class Scripts { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "2.3.5", + "X-Fern-SDK-Version": "2.3.6", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, @@ -82,7 +82,15 @@ export class Scripts { case 404: throw new Webflow.NotFoundError(_response.error.body); case 429: - throw new Webflow.TooManyRequestsError(_response.error.body); + throw new Webflow.TooManyRequestsError( + await serializers.TooManyRequestsErrorBody.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); case 500: throw new Webflow.InternalServerError(_response.error.body); default: @@ -144,7 +152,7 @@ export class Scripts { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "2.3.5", + "X-Fern-SDK-Version": "2.3.6", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, @@ -173,7 +181,15 @@ export class Scripts { case 404: throw new Webflow.NotFoundError(_response.error.body); case 429: - throw new Webflow.TooManyRequestsError(_response.error.body); + throw new Webflow.TooManyRequestsError( + await serializers.TooManyRequestsErrorBody.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); case 500: throw new Webflow.InternalServerError(_response.error.body); default: @@ -234,7 +250,7 @@ export class Scripts { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "2.3.5", + "X-Fern-SDK-Version": "2.3.6", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, @@ -263,7 +279,15 @@ export class Scripts { case 404: throw new Webflow.NotFoundError(_response.error.body); case 429: - throw new Webflow.TooManyRequestsError(_response.error.body); + throw new Webflow.TooManyRequestsError( + await serializers.TooManyRequestsErrorBody.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); case 500: throw new Webflow.InternalServerError(_response.error.body); default: diff --git a/src/api/resources/sites/client/Client.ts b/src/api/resources/sites/client/Client.ts index 069cdc43..8ae993d0 100644 --- a/src/api/resources/sites/client/Client.ts +++ b/src/api/resources/sites/client/Client.ts @@ -35,11 +35,9 @@ export class Sites { * * @param {Sites.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.list() @@ -55,7 +53,7 @@ export class Sites { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "2.3.5", + "X-Fern-SDK-Version": "2.3.6", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, @@ -76,16 +74,20 @@ export class Sites { if (_response.error.reason === "status-code") { switch (_response.error.statusCode) { - case 400: - throw new Webflow.BadRequestError(_response.error.body); case 401: throw new Webflow.UnauthorizedError(_response.error.body); case 404: throw new Webflow.NotFoundError(_response.error.body); case 429: - throw new Webflow.TooManyRequestsError(_response.error.body); - case 500: - throw new Webflow.InternalServerError(_response.error.body); + throw new Webflow.TooManyRequestsError( + await serializers.TooManyRequestsErrorBody.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); default: throw new errors.WebflowError({ statusCode: _response.error.statusCode, @@ -135,7 +137,7 @@ export class Sites { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "2.3.5", + "X-Fern-SDK-Version": "2.3.6", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, @@ -163,7 +165,15 @@ export class Sites { case 404: throw new Webflow.NotFoundError(_response.error.body); case 429: - throw new Webflow.TooManyRequestsError(_response.error.body); + throw new Webflow.TooManyRequestsError( + await serializers.TooManyRequestsErrorBody.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); case 500: throw new Webflow.InternalServerError(_response.error.body); default: @@ -215,7 +225,7 @@ export class Sites { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "2.3.5", + "X-Fern-SDK-Version": "2.3.6", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, @@ -243,7 +253,15 @@ export class Sites { case 404: throw new Webflow.NotFoundError(_response.error.body); case 429: - throw new Webflow.TooManyRequestsError(_response.error.body); + throw new Webflow.TooManyRequestsError( + await serializers.TooManyRequestsErrorBody.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); case 500: throw new Webflow.InternalServerError(_response.error.body); default: @@ -270,7 +288,7 @@ export class Sites { } /** - * Publish a site to one more more domains. Required scope | `sites:write` + * Publish a site to one more more domains. Required scope | `sites:write`Note:This endpoint is specifically for localized pages. Ensure that the locale specified is a valid secondary locale for the site.
* * @param {string} siteId - Unique identifier for a Site * @param {Webflow.SitesPublishRequest} request @@ -300,7 +318,7 @@ export class Sites { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "2.3.5", + "X-Fern-SDK-Version": "2.3.6", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, @@ -325,7 +343,15 @@ export class Sites { case 404: throw new Webflow.NotFoundError(_response.error.body); case 429: - throw new Webflow.TooManyRequestsError(_response.error.body); + throw new Webflow.TooManyRequestsError( + await serializers.TooManyRequestsErrorBody.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); default: throw new errors.WebflowError({ statusCode: _response.error.statusCode, diff --git a/src/api/resources/sites/resources/activityLogs/client/Client.ts b/src/api/resources/sites/resources/activityLogs/client/Client.ts index e7b88510..90d79bd9 100644 --- a/src/api/resources/sites/resources/activityLogs/client/Client.ts +++ b/src/api/resources/sites/resources/activityLogs/client/Client.ts @@ -68,7 +68,7 @@ export class ActivityLogs { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "2.3.5", + "X-Fern-SDK-Version": "2.3.6", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, @@ -95,7 +95,15 @@ export class ActivityLogs { case 404: throw new Webflow.NotFoundError(_response.error.body); case 429: - throw new Webflow.TooManyRequestsError(_response.error.body); + throw new Webflow.TooManyRequestsError( + await serializers.TooManyRequestsErrorBody.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); case 500: throw new Webflow.InternalServerError(_response.error.body); default: diff --git a/src/api/resources/sites/resources/scripts/client/Client.ts b/src/api/resources/sites/resources/scripts/client/Client.ts index 56a4dc77..3150517d 100644 --- a/src/api/resources/sites/resources/scripts/client/Client.ts +++ b/src/api/resources/sites/resources/scripts/client/Client.ts @@ -57,7 +57,7 @@ export class Scripts { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "2.3.5", + "X-Fern-SDK-Version": "2.3.6", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, @@ -85,7 +85,15 @@ export class Scripts { case 404: throw new Webflow.NotFoundError(_response.error.body); case 429: - throw new Webflow.TooManyRequestsError(_response.error.body); + throw new Webflow.TooManyRequestsError( + await serializers.TooManyRequestsErrorBody.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); case 500: throw new Webflow.InternalServerError(_response.error.body); default: @@ -155,7 +163,7 @@ export class Scripts { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "2.3.5", + "X-Fern-SDK-Version": "2.3.6", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, @@ -184,7 +192,15 @@ export class Scripts { case 404: throw new Webflow.NotFoundError(_response.error.body); case 429: - throw new Webflow.TooManyRequestsError(_response.error.body); + throw new Webflow.TooManyRequestsError( + await serializers.TooManyRequestsErrorBody.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); case 500: throw new Webflow.InternalServerError(_response.error.body); default: @@ -236,7 +252,7 @@ export class Scripts { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "2.3.5", + "X-Fern-SDK-Version": "2.3.6", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, @@ -258,7 +274,15 @@ export class Scripts { case 404: throw new Webflow.NotFoundError(_response.error.body); case 429: - throw new Webflow.TooManyRequestsError(_response.error.body); + throw new Webflow.TooManyRequestsError( + await serializers.TooManyRequestsErrorBody.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); case 500: throw new Webflow.InternalServerError(_response.error.body); default: @@ -325,7 +349,7 @@ export class Scripts { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "2.3.5", + "X-Fern-SDK-Version": "2.3.6", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, @@ -354,7 +378,15 @@ export class Scripts { case 404: throw new Webflow.NotFoundError(_response.error.body); case 429: - throw new Webflow.TooManyRequestsError(_response.error.body); + throw new Webflow.TooManyRequestsError( + await serializers.TooManyRequestsErrorBody.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); case 500: throw new Webflow.InternalServerError(_response.error.body); default: diff --git a/src/api/resources/token/client/Client.ts b/src/api/resources/token/client/Client.ts index f9e14dae..6343d00c 100644 --- a/src/api/resources/token/client/Client.ts +++ b/src/api/resources/token/client/Client.ts @@ -50,7 +50,7 @@ export class Token { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "2.3.5", + "X-Fern-SDK-Version": "2.3.6", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, @@ -119,7 +119,7 @@ export class Token { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "2.3.5", + "X-Fern-SDK-Version": "2.3.6", "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 7e6a3e2e..6b8f1991 100644 --- a/src/api/resources/users/client/Client.ts +++ b/src/api/resources/users/client/Client.ts @@ -74,7 +74,7 @@ export class Users { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "2.3.5", + "X-Fern-SDK-Version": "2.3.6", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, @@ -105,7 +105,15 @@ export class Users { case 404: throw new Webflow.NotFoundError(_response.error.body); case 429: - throw new Webflow.TooManyRequestsError(_response.error.body); + throw new Webflow.TooManyRequestsError( + await serializers.TooManyRequestsErrorBody.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); case 500: throw new Webflow.InternalServerError(_response.error.body); default: @@ -159,7 +167,7 @@ export class Users { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "2.3.5", + "X-Fern-SDK-Version": "2.3.6", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, @@ -189,7 +197,15 @@ export class Users { case 404: throw new Webflow.NotFoundError(_response.error.body); case 429: - throw new Webflow.TooManyRequestsError(_response.error.body); + throw new Webflow.TooManyRequestsError( + await serializers.TooManyRequestsErrorBody.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); case 500: throw new Webflow.InternalServerError(_response.error.body); default: @@ -243,7 +259,7 @@ export class Users { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "2.3.5", + "X-Fern-SDK-Version": "2.3.6", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, @@ -267,7 +283,15 @@ export class Users { case 404: throw new Webflow.NotFoundError(_response.error.body); case 429: - throw new Webflow.TooManyRequestsError(_response.error.body); + throw new Webflow.TooManyRequestsError( + await serializers.TooManyRequestsErrorBody.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); case 500: throw new Webflow.InternalServerError(_response.error.body); default: @@ -336,7 +360,7 @@ export class Users { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "2.3.5", + "X-Fern-SDK-Version": "2.3.6", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, @@ -367,7 +391,15 @@ export class Users { case 404: throw new Webflow.NotFoundError(_response.error.body); case 429: - throw new Webflow.TooManyRequestsError(_response.error.body); + throw new Webflow.TooManyRequestsError( + await serializers.TooManyRequestsErrorBody.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); case 500: throw new Webflow.InternalServerError(_response.error.body); default: @@ -429,7 +461,7 @@ export class Users { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "2.3.5", + "X-Fern-SDK-Version": "2.3.6", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, @@ -462,7 +494,15 @@ export class Users { case 409: throw new Webflow.ConflictError(_response.error.body); case 429: - throw new Webflow.TooManyRequestsError(_response.error.body); + throw new Webflow.TooManyRequestsError( + await serializers.TooManyRequestsErrorBody.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); case 500: throw new Webflow.InternalServerError(_response.error.body); default: diff --git a/src/api/resources/webhooks/client/Client.ts b/src/api/resources/webhooks/client/Client.ts index ec07c60d..7b0124b7 100644 --- a/src/api/resources/webhooks/client/Client.ts +++ b/src/api/resources/webhooks/client/Client.ts @@ -54,7 +54,7 @@ export class Webhooks { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "webflow-api", - "X-Fern-SDK-Version": "2.3.5", + "X-Fern-SDK-Version": "2.3.6", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, @@ -82,7 +82,15 @@ export class Webhooks { case 404: throw new Webflow.NotFoundError(_response.error.body); case 429: - throw new Webflow.TooManyRequestsError(_response.error.body); + throw new Webflow.TooManyRequestsError( + await serializers.TooManyRequestsErrorBody.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); case 500: throw new Webflow.InternalServerError(_response.error.body); default: @@ -112,7 +120,7 @@ export class Webhooks { * Create a new Webhook, to be notified when Webflow resources change. Limit of 75 registrations per `triggerType`, per site.Endpoint-specific rate limit
This endpoint has a limit of one successful publish queue per minute.
Access to this endpoint requires a bearer token from a Data Client App.Required scope | `sites:write` * * @param {string} siteId - Unique identifier for a Site - * @param {Webflow.WebhooksCreateRequest} request + * @param {Webflow.Webhook} request * @param {Webhooks.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Webflow.BadRequestError} @@ -123,13 +131,18 @@ export class Webhooks { * * @example * await client.webhooks.create("site_id", { + * id: "582266e0cd48de0f0e3c6d8b", * triggerType: Webflow.TriggerType.FormSubmission, - * url: "https://api.mydomain.com/webhook" + * 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") * }) */ public async create( siteId: string, - request: Webflow.WebhooksCreateRequest, + request: Webflow.Webhook, requestOptions?: Webhooks.RequestOptions ): Promise