Skip to content

Commit

Permalink
Merge pull request #158 from webflow/fern-bot/08-19-2024-0801PM
Browse files Browse the repository at this point in the history
🌿 Fern Regeneration -- August 19, 2024
  • Loading branch information
zplata authored Aug 21, 2024
2 parents ed20f14 + 19dcc11 commit cde9d50
Show file tree
Hide file tree
Showing 51 changed files with 1,136 additions and 454 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "webflow-api",
"version": "2.3.5",
"version": "2.3.6",
"private": false,
"repository": "https://github.com/webflow/js-webflow-api",
"main": "./index.js",
Expand Down
3 changes: 2 additions & 1 deletion src/api/errors/TooManyRequestsError.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@
*/

import * as errors from "../../errors/index";
import * as Webflow from "../index";

export class TooManyRequestsError extends errors.WebflowError {
constructor(body?: unknown) {
constructor(body: Webflow.TooManyRequestsErrorBody) {
super({
message: "TooManyRequestsError",
statusCode: 429,
Expand Down
2 changes: 1 addition & 1 deletion src/api/errors/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
export * from "./UnauthorizedError";
export * from "./ForbiddenError";
export * from "./BadRequestError";
export * from "./NotFoundError";
export * from "./TooManyRequestsError";
export * from "./BadRequestError";
export * from "./InternalServerError";
export * from "./ConflictError";
12 changes: 10 additions & 2 deletions src/api/resources/accessGroups/client/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ export class AccessGroups {
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,
},
Expand Down Expand Up @@ -105,7 +105,15 @@ export class AccessGroups {
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:
Expand Down
96 changes: 80 additions & 16 deletions src/api/resources/assets/client/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export class Assets {
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,
},
Expand Down Expand Up @@ -82,7 +82,15 @@ export class Assets {
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:
Expand Down Expand Up @@ -142,7 +150,7 @@ export class Assets {
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,
},
Expand Down Expand Up @@ -171,7 +179,15 @@ export class Assets {
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:
Expand Down Expand Up @@ -223,7 +239,7 @@ export class Assets {
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,
},
Expand Down Expand Up @@ -251,7 +267,15 @@ export class Assets {
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:
Expand Down Expand Up @@ -303,7 +327,7 @@ export class Assets {
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,
},
Expand All @@ -325,7 +349,15 @@ export class Assets {
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:
Expand Down Expand Up @@ -384,7 +416,7 @@ export class Assets {
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,
},
Expand Down Expand Up @@ -413,7 +445,15 @@ export class Assets {
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:
Expand Down Expand Up @@ -465,7 +505,7 @@ export class Assets {
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,
},
Expand Down Expand Up @@ -493,7 +533,15 @@ export class Assets {
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:
Expand Down Expand Up @@ -552,7 +600,7 @@ export class Assets {
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,
},
Expand Down Expand Up @@ -581,7 +629,15 @@ export class Assets {
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:
Expand Down Expand Up @@ -636,7 +692,7 @@ export class Assets {
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,
},
Expand Down Expand Up @@ -664,7 +720,15 @@ export class Assets {
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:
Expand Down
60 changes: 50 additions & 10 deletions src/api/resources/collections/client/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export class Collections {
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,
},
Expand Down Expand Up @@ -84,7 +84,15 @@ export class Collections {
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:
Expand Down Expand Up @@ -145,7 +153,7 @@ export class Collections {
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,
},
Expand Down Expand Up @@ -174,7 +182,15 @@ export class Collections {
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:
Expand Down Expand Up @@ -226,7 +242,7 @@ export class Collections {
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,
},
Expand Down Expand Up @@ -254,7 +270,15 @@ export class Collections {
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:
Expand Down Expand Up @@ -306,7 +330,7 @@ export class Collections {
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,
},
Expand All @@ -328,7 +352,15 @@ export class Collections {
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:
Expand Down Expand Up @@ -385,7 +417,7 @@ export class Collections {
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,
},
Expand All @@ -407,7 +439,15 @@ export class Collections {
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:
Expand Down
Loading

0 comments on commit cde9d50

Please sign in to comment.