diff --git a/reference.md b/reference.md index 296bb30ac1..2633abfe85 100644 --- a/reference.md +++ b/reference.md @@ -11018,6 +11018,126 @@ await client.anomaly.blocks.unblockIp("id"); +## AttackProtection BotDetection + +
client.attackProtection.botDetection.get() -> Management.GetBotDetectionSettingsResponseContent +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Get the Bot Detection configuration of your tenant. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.attackProtection.botDetection.get(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**requestOptions:** `BotDetection.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.attackProtection.botDetection.update({ ...params }) -> Management.UpdateBotDetectionSettingsResponseContent +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Update the Bot Detection configuration of your tenant. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.attackProtection.botDetection.update(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Management.UpdateBotDetectionSettingsRequestContent` + +
+
+ +
+
+ +**requestOptions:** `BotDetection.RequestOptions` + +
+
+
+
+ +
+
+
+ ## AttackProtection BreachedPasswordDetection
client.attackProtection.breachedPasswordDetection.get() -> Management.GetBreachedPasswordDetectionSettingsResponseContent @@ -11258,6 +11378,126 @@ await client.attackProtection.bruteForceProtection.update();
+## AttackProtection Captcha + +
client.attackProtection.captcha.get() -> Management.GetAttackProtectionCaptchaResponseContent +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Get the CAPTCHA configuration for your client. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.attackProtection.captcha.get(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**requestOptions:** `Captcha.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.attackProtection.captcha.update({ ...params }) -> Management.UpdateAttackProtectionCaptchaResponseContent +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Update existing CAPTCHA configuration for your client. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.attackProtection.captcha.update(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Management.UpdateAttackProtectionCaptchaRequestContent` + +
+
+ +
+
+ +**requestOptions:** `Captcha.RequestOptions` + +
+
+
+
+ +
+
+
+ ## AttackProtection SuspiciousIpThrottling
client.attackProtection.suspiciousIpThrottling.get() -> Management.GetSuspiciousIpThrottlingSettingsResponseContent diff --git a/src/management/api/requests/requests.ts b/src/management/api/requests/requests.ts index 837587b858..0a5ad8bfef 100644 --- a/src/management/api/requests/requests.ts +++ b/src/management/api/requests/requests.ts @@ -1763,6 +1763,19 @@ export interface UpdateActionBindingsRequestContent { bindings?: Management.ActionBindingWithRef[]; } +/** + * @example + * {} + */ +export interface UpdateBotDetectionSettingsRequestContent { + bot_detection_level?: Management.BotDetectionLevelEnum; + challenge_password_policy?: Management.BotDetectionChallengePolicyPasswordFlowEnum; + challenge_passwordless_policy?: Management.BotDetectionChallengePolicyPasswordlessFlowEnum; + challenge_password_reset_policy?: Management.BotDetectionChallengePolicyPasswordResetFlowEnum; + allowlist?: Management.BotDetectionAllowlist; + monitoring_mode_enabled?: Management.BotDetectionMonitoringModeEnabled; +} + /** * @example * {} @@ -1829,6 +1842,21 @@ export namespace UpdateBruteForceSettingsRequestContent { export type Mode = (typeof Mode)[keyof typeof Mode]; } +/** + * @example + * {} + */ +export interface UpdateAttackProtectionCaptchaRequestContent { + active_provider_id?: Management.AttackProtectionCaptchaProviderId; + arkose?: Management.AttackProtectionUpdateCaptchaArkose; + auth_challenge?: Management.AttackProtectionCaptchaAuthChallengeRequest; + hcaptcha?: Management.AttackProtectionUpdateCaptchaHcaptcha; + friendly_captcha?: Management.AttackProtectionUpdateCaptchaFriendlyCaptcha; + recaptcha_enterprise?: Management.AttackProtectionUpdateCaptchaRecaptchaEnterprise; + recaptcha_v2?: Management.AttackProtectionUpdateCaptchaRecaptchaV2; + simple_captcha?: Management.AttackProtectionCaptchaSimpleCaptchaResponseContent; +} + /** * @example * {} diff --git a/src/management/api/resources/attackProtection/client/Client.ts b/src/management/api/resources/attackProtection/client/Client.ts index 7f6ff0cc46..faa7f9ab1e 100644 --- a/src/management/api/resources/attackProtection/client/Client.ts +++ b/src/management/api/resources/attackProtection/client/Client.ts @@ -3,8 +3,10 @@ import type { BaseClientOptions } from "../../../../BaseClient.js"; import * as environments from "../../../../environments.js"; import * as core from "../../../../core/index.js"; +import { BotDetection } from "../resources/botDetection/client/Client.js"; import { BreachedPasswordDetection } from "../resources/breachedPasswordDetection/client/Client.js"; import { BruteForceProtection } from "../resources/bruteForceProtection/client/Client.js"; +import { Captcha } from "../resources/captcha/client/Client.js"; import { SuspiciousIpThrottling } from "../resources/suspiciousIpThrottling/client/Client.js"; export declare namespace AttackProtection { @@ -13,14 +15,20 @@ export declare namespace AttackProtection { export class AttackProtection { protected readonly _options: AttackProtection.Options; + protected _botDetection: BotDetection | undefined; protected _breachedPasswordDetection: BreachedPasswordDetection | undefined; protected _bruteForceProtection: BruteForceProtection | undefined; + protected _captcha: Captcha | undefined; protected _suspiciousIpThrottling: SuspiciousIpThrottling | undefined; constructor(_options: AttackProtection.Options) { this._options = _options; } + public get botDetection(): BotDetection { + return (this._botDetection ??= new BotDetection(this._options)); + } + public get breachedPasswordDetection(): BreachedPasswordDetection { return (this._breachedPasswordDetection ??= new BreachedPasswordDetection(this._options)); } @@ -29,6 +37,10 @@ export class AttackProtection { return (this._bruteForceProtection ??= new BruteForceProtection(this._options)); } + public get captcha(): Captcha { + return (this._captcha ??= new Captcha(this._options)); + } + public get suspiciousIpThrottling(): SuspiciousIpThrottling { return (this._suspiciousIpThrottling ??= new SuspiciousIpThrottling(this._options)); } diff --git a/src/management/api/resources/attackProtection/resources/botDetection/client/Client.ts b/src/management/api/resources/attackProtection/resources/botDetection/client/Client.ts new file mode 100644 index 0000000000..89a50eac19 --- /dev/null +++ b/src/management/api/resources/attackProtection/resources/botDetection/client/Client.ts @@ -0,0 +1,207 @@ +// This file was auto-generated by Fern from our API Definition. + +import type { BaseClientOptions, BaseRequestOptions } from "../../../../../../BaseClient.js"; +import * as environments from "../../../../../../environments.js"; +import * as core from "../../../../../../core/index.js"; +import * as Management from "../../../../../index.js"; +import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../../../core/headers.js"; +import * as errors from "../../../../../../errors/index.js"; + +export declare namespace BotDetection { + export interface Options extends BaseClientOptions {} + + export interface RequestOptions extends BaseRequestOptions {} +} + +export class BotDetection { + protected readonly _options: BotDetection.Options; + + constructor(_options: BotDetection.Options) { + this._options = _options; + } + + /** + * Get the Bot Detection configuration of your tenant. + * + * @param {BotDetection.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Management.UnauthorizedError} + * @throws {@link Management.ForbiddenError} + * @throws {@link Management.NotFoundError} + * @throws {@link Management.TooManyRequestsError} + * + * @example + * await client.attackProtection.botDetection.get() + */ + public get( + requestOptions?: BotDetection.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__get(requestOptions)); + } + + private async __get( + requestOptions?: BotDetection.RequestOptions, + ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + requestOptions?.headers, + ); + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: core.url.join( + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.ManagementEnvironment.Default, + "attack-protection/bot-detection", + ), + method: "GET", + headers: _headers, + queryParameters: requestOptions?.queryParams, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return { + data: _response.body as Management.GetBotDetectionSettingsResponseContent, + rawResponse: _response.rawResponse, + }; + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 401: + throw new Management.UnauthorizedError(_response.error.body as unknown, _response.rawResponse); + case 403: + throw new Management.ForbiddenError(_response.error.body as unknown, _response.rawResponse); + case 404: + throw new Management.NotFoundError(_response.error.body as unknown, _response.rawResponse); + case 429: + throw new Management.TooManyRequestsError(_response.error.body as unknown, _response.rawResponse); + default: + throw new errors.ManagementError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + rawResponse: _response.rawResponse, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.ManagementError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + rawResponse: _response.rawResponse, + }); + case "timeout": + throw new errors.ManagementTimeoutError( + "Timeout exceeded when calling GET /attack-protection/bot-detection.", + ); + case "unknown": + throw new errors.ManagementError({ + message: _response.error.errorMessage, + rawResponse: _response.rawResponse, + }); + } + } + + /** + * Update the Bot Detection configuration of your tenant. + * + * @param {Management.UpdateBotDetectionSettingsRequestContent} request + * @param {BotDetection.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Management.BadRequestError} + * @throws {@link Management.UnauthorizedError} + * @throws {@link Management.ForbiddenError} + * @throws {@link Management.NotFoundError} + * @throws {@link Management.TooManyRequestsError} + * + * @example + * await client.attackProtection.botDetection.update() + */ + public update( + request: Management.UpdateBotDetectionSettingsRequestContent = {}, + requestOptions?: BotDetection.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__update(request, requestOptions)); + } + + private async __update( + request: Management.UpdateBotDetectionSettingsRequestContent = {}, + requestOptions?: BotDetection.RequestOptions, + ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + requestOptions?.headers, + ); + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: core.url.join( + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.ManagementEnvironment.Default, + "attack-protection/bot-detection", + ), + method: "PATCH", + headers: _headers, + contentType: "application/json", + queryParameters: requestOptions?.queryParams, + requestType: "json", + body: request, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return { + data: _response.body as Management.UpdateBotDetectionSettingsResponseContent, + rawResponse: _response.rawResponse, + }; + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 400: + throw new Management.BadRequestError(_response.error.body as unknown, _response.rawResponse); + case 401: + throw new Management.UnauthorizedError(_response.error.body as unknown, _response.rawResponse); + case 403: + throw new Management.ForbiddenError(_response.error.body as unknown, _response.rawResponse); + case 404: + throw new Management.NotFoundError(_response.error.body as unknown, _response.rawResponse); + case 429: + throw new Management.TooManyRequestsError(_response.error.body as unknown, _response.rawResponse); + default: + throw new errors.ManagementError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + rawResponse: _response.rawResponse, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.ManagementError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + rawResponse: _response.rawResponse, + }); + case "timeout": + throw new errors.ManagementTimeoutError( + "Timeout exceeded when calling PATCH /attack-protection/bot-detection.", + ); + case "unknown": + throw new errors.ManagementError({ + message: _response.error.errorMessage, + rawResponse: _response.rawResponse, + }); + } + } + + protected async _getAuthorizationHeader(): Promise { + return `Bearer ${await core.Supplier.get(this._options.token)}`; + } +} diff --git a/src/management/api/resources/attackProtection/resources/botDetection/client/index.ts b/src/management/api/resources/attackProtection/resources/botDetection/client/index.ts new file mode 100644 index 0000000000..cb0ff5c3b5 --- /dev/null +++ b/src/management/api/resources/attackProtection/resources/botDetection/client/index.ts @@ -0,0 +1 @@ +export {}; diff --git a/src/management/api/resources/attackProtection/resources/botDetection/index.ts b/src/management/api/resources/attackProtection/resources/botDetection/index.ts new file mode 100644 index 0000000000..914b8c3c72 --- /dev/null +++ b/src/management/api/resources/attackProtection/resources/botDetection/index.ts @@ -0,0 +1 @@ +export * from "./client/index.js"; diff --git a/src/management/api/resources/attackProtection/resources/captcha/client/Client.ts b/src/management/api/resources/attackProtection/resources/captcha/client/Client.ts new file mode 100644 index 0000000000..54a829bc18 --- /dev/null +++ b/src/management/api/resources/attackProtection/resources/captcha/client/Client.ts @@ -0,0 +1,204 @@ +// This file was auto-generated by Fern from our API Definition. + +import type { BaseClientOptions, BaseRequestOptions } from "../../../../../../BaseClient.js"; +import * as environments from "../../../../../../environments.js"; +import * as core from "../../../../../../core/index.js"; +import * as Management from "../../../../../index.js"; +import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../../../core/headers.js"; +import * as errors from "../../../../../../errors/index.js"; + +export declare namespace Captcha { + export interface Options extends BaseClientOptions {} + + export interface RequestOptions extends BaseRequestOptions {} +} + +export class Captcha { + protected readonly _options: Captcha.Options; + + constructor(_options: Captcha.Options) { + this._options = _options; + } + + /** + * Get the CAPTCHA configuration for your client. + * + * @param {Captcha.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Management.UnauthorizedError} + * @throws {@link Management.ForbiddenError} + * @throws {@link Management.NotFoundError} + * @throws {@link Management.TooManyRequestsError} + * + * @example + * await client.attackProtection.captcha.get() + */ + public get( + requestOptions?: Captcha.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__get(requestOptions)); + } + + private async __get( + requestOptions?: Captcha.RequestOptions, + ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + requestOptions?.headers, + ); + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: core.url.join( + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.ManagementEnvironment.Default, + "attack-protection/captcha", + ), + method: "GET", + headers: _headers, + queryParameters: requestOptions?.queryParams, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return { + data: _response.body as Management.GetAttackProtectionCaptchaResponseContent, + rawResponse: _response.rawResponse, + }; + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 401: + throw new Management.UnauthorizedError(_response.error.body as unknown, _response.rawResponse); + case 403: + throw new Management.ForbiddenError(_response.error.body as unknown, _response.rawResponse); + case 404: + throw new Management.NotFoundError(_response.error.body as unknown, _response.rawResponse); + case 429: + throw new Management.TooManyRequestsError(_response.error.body as unknown, _response.rawResponse); + default: + throw new errors.ManagementError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + rawResponse: _response.rawResponse, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.ManagementError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + rawResponse: _response.rawResponse, + }); + case "timeout": + throw new errors.ManagementTimeoutError( + "Timeout exceeded when calling GET /attack-protection/captcha.", + ); + case "unknown": + throw new errors.ManagementError({ + message: _response.error.errorMessage, + rawResponse: _response.rawResponse, + }); + } + } + + /** + * Update existing CAPTCHA configuration for your client. + * + * @param {Management.UpdateAttackProtectionCaptchaRequestContent} request + * @param {Captcha.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Management.UnauthorizedError} + * @throws {@link Management.ForbiddenError} + * @throws {@link Management.NotFoundError} + * @throws {@link Management.TooManyRequestsError} + * + * @example + * await client.attackProtection.captcha.update() + */ + public update( + request: Management.UpdateAttackProtectionCaptchaRequestContent = {}, + requestOptions?: Captcha.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__update(request, requestOptions)); + } + + private async __update( + request: Management.UpdateAttackProtectionCaptchaRequestContent = {}, + requestOptions?: Captcha.RequestOptions, + ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + requestOptions?.headers, + ); + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: core.url.join( + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.ManagementEnvironment.Default, + "attack-protection/captcha", + ), + method: "PATCH", + headers: _headers, + contentType: "application/json", + queryParameters: requestOptions?.queryParams, + requestType: "json", + body: request, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return { + data: _response.body as Management.UpdateAttackProtectionCaptchaResponseContent, + rawResponse: _response.rawResponse, + }; + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 401: + throw new Management.UnauthorizedError(_response.error.body as unknown, _response.rawResponse); + case 403: + throw new Management.ForbiddenError(_response.error.body as unknown, _response.rawResponse); + case 404: + throw new Management.NotFoundError(_response.error.body as unknown, _response.rawResponse); + case 429: + throw new Management.TooManyRequestsError(_response.error.body as unknown, _response.rawResponse); + default: + throw new errors.ManagementError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + rawResponse: _response.rawResponse, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.ManagementError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + rawResponse: _response.rawResponse, + }); + case "timeout": + throw new errors.ManagementTimeoutError( + "Timeout exceeded when calling PATCH /attack-protection/captcha.", + ); + case "unknown": + throw new errors.ManagementError({ + message: _response.error.errorMessage, + rawResponse: _response.rawResponse, + }); + } + } + + protected async _getAuthorizationHeader(): Promise { + return `Bearer ${await core.Supplier.get(this._options.token)}`; + } +} diff --git a/src/management/api/resources/attackProtection/resources/captcha/client/index.ts b/src/management/api/resources/attackProtection/resources/captcha/client/index.ts new file mode 100644 index 0000000000..cb0ff5c3b5 --- /dev/null +++ b/src/management/api/resources/attackProtection/resources/captcha/client/index.ts @@ -0,0 +1 @@ +export {}; diff --git a/src/management/api/resources/attackProtection/resources/captcha/index.ts b/src/management/api/resources/attackProtection/resources/captcha/index.ts new file mode 100644 index 0000000000..914b8c3c72 --- /dev/null +++ b/src/management/api/resources/attackProtection/resources/captcha/index.ts @@ -0,0 +1 @@ +export * from "./client/index.js"; diff --git a/src/management/api/resources/attackProtection/resources/index.ts b/src/management/api/resources/attackProtection/resources/index.ts index 5948aa78d3..22cff326c9 100644 --- a/src/management/api/resources/attackProtection/resources/index.ts +++ b/src/management/api/resources/attackProtection/resources/index.ts @@ -1,3 +1,5 @@ +export * as botDetection from "./botDetection/index.js"; export * as breachedPasswordDetection from "./breachedPasswordDetection/index.js"; export * as bruteForceProtection from "./bruteForceProtection/index.js"; +export * as captcha from "./captcha/index.js"; export * as suspiciousIpThrottling from "./suspiciousIpThrottling/index.js"; diff --git a/src/management/api/types/AttackProtectionCaptchaArkoseResponseContent.ts b/src/management/api/types/AttackProtectionCaptchaArkoseResponseContent.ts new file mode 100644 index 0000000000..0ba66b97b3 --- /dev/null +++ b/src/management/api/types/AttackProtectionCaptchaArkoseResponseContent.ts @@ -0,0 +1,14 @@ +// This file was auto-generated by Fern from our API Definition. + +export interface AttackProtectionCaptchaArkoseResponseContent { + /** The site key for the Arkose captcha provider. */ + site_key?: string; + /** Whether the captcha should fail open. */ + fail_open?: boolean; + /** The subdomain used for client requests to the Arkose captcha provider. */ + client_subdomain?: string; + /** The subdomain used for server-side verification requests to the Arkose captcha provider. */ + verify_subdomain?: string; + /** Accepts any additional properties */ + [key: string]: any; +} diff --git a/src/management/api/types/AttackProtectionCaptchaAuthChallengeRequest.ts b/src/management/api/types/AttackProtectionCaptchaAuthChallengeRequest.ts new file mode 100644 index 0000000000..8204ef7203 --- /dev/null +++ b/src/management/api/types/AttackProtectionCaptchaAuthChallengeRequest.ts @@ -0,0 +1,6 @@ +// This file was auto-generated by Fern from our API Definition. + +export interface AttackProtectionCaptchaAuthChallengeRequest { + /** Whether the auth challenge should fail open. */ + fail_open: boolean; +} diff --git a/src/management/api/types/AttackProtectionCaptchaAuthChallengeResponseContent.ts b/src/management/api/types/AttackProtectionCaptchaAuthChallengeResponseContent.ts new file mode 100644 index 0000000000..54f9ea5be0 --- /dev/null +++ b/src/management/api/types/AttackProtectionCaptchaAuthChallengeResponseContent.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +export interface AttackProtectionCaptchaAuthChallengeResponseContent { + /** Whether the auth challenge should fail open. */ + fail_open?: boolean; + /** Accepts any additional properties */ + [key: string]: any; +} diff --git a/src/management/api/types/AttackProtectionCaptchaFriendlyCaptchaResponseContent.ts b/src/management/api/types/AttackProtectionCaptchaFriendlyCaptchaResponseContent.ts new file mode 100644 index 0000000000..32cf0d6554 --- /dev/null +++ b/src/management/api/types/AttackProtectionCaptchaFriendlyCaptchaResponseContent.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +export interface AttackProtectionCaptchaFriendlyCaptchaResponseContent { + /** The site key for the Friendly Captcha provider. */ + site_key?: string; + /** Accepts any additional properties */ + [key: string]: any; +} diff --git a/src/management/api/types/AttackProtectionCaptchaHcaptchaResponseContent.ts b/src/management/api/types/AttackProtectionCaptchaHcaptchaResponseContent.ts new file mode 100644 index 0000000000..d93dfb2b25 --- /dev/null +++ b/src/management/api/types/AttackProtectionCaptchaHcaptchaResponseContent.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +export interface AttackProtectionCaptchaHcaptchaResponseContent { + /** The site key for the hCaptcha provider. */ + site_key?: string; + /** Accepts any additional properties */ + [key: string]: any; +} diff --git a/src/management/api/types/AttackProtectionCaptchaProviderId.ts b/src/management/api/types/AttackProtectionCaptchaProviderId.ts new file mode 100644 index 0000000000..20b7e1548c --- /dev/null +++ b/src/management/api/types/AttackProtectionCaptchaProviderId.ts @@ -0,0 +1,14 @@ +// This file was auto-generated by Fern from our API Definition. + +/** The id of the active provider for the CAPTCHA. */ +export const AttackProtectionCaptchaProviderId = { + Arkose: "arkose", + AuthChallenge: "auth_challenge", + FriendlyCaptcha: "friendly_captcha", + Hcaptcha: "hcaptcha", + RecaptchaV2: "recaptcha_v2", + RecaptchaEnterprise: "recaptcha_enterprise", + SimpleCaptcha: "simple_captcha", +} as const; +export type AttackProtectionCaptchaProviderId = + (typeof AttackProtectionCaptchaProviderId)[keyof typeof AttackProtectionCaptchaProviderId]; diff --git a/src/management/api/types/AttackProtectionCaptchaRecaptchaEnterpriseResponseContent.ts b/src/management/api/types/AttackProtectionCaptchaRecaptchaEnterpriseResponseContent.ts new file mode 100644 index 0000000000..981d5493d9 --- /dev/null +++ b/src/management/api/types/AttackProtectionCaptchaRecaptchaEnterpriseResponseContent.ts @@ -0,0 +1,10 @@ +// This file was auto-generated by Fern from our API Definition. + +export interface AttackProtectionCaptchaRecaptchaEnterpriseResponseContent { + /** The site key for the reCAPTCHA Enterprise provider. */ + site_key?: string; + /** The project ID for the reCAPTCHA Enterprise provider. */ + project_id?: string; + /** Accepts any additional properties */ + [key: string]: any; +} diff --git a/src/management/api/types/AttackProtectionCaptchaRecaptchaV2ResponseContent.ts b/src/management/api/types/AttackProtectionCaptchaRecaptchaV2ResponseContent.ts new file mode 100644 index 0000000000..69a6ec30cc --- /dev/null +++ b/src/management/api/types/AttackProtectionCaptchaRecaptchaV2ResponseContent.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +export interface AttackProtectionCaptchaRecaptchaV2ResponseContent { + /** The site key for the reCAPTCHA v2 provider. */ + site_key?: string; + /** Accepts any additional properties */ + [key: string]: any; +} diff --git a/src/management/api/types/AttackProtectionCaptchaSimpleCaptchaResponseContent.ts b/src/management/api/types/AttackProtectionCaptchaSimpleCaptchaResponseContent.ts new file mode 100644 index 0000000000..48cf1873c7 --- /dev/null +++ b/src/management/api/types/AttackProtectionCaptchaSimpleCaptchaResponseContent.ts @@ -0,0 +1,3 @@ +// This file was auto-generated by Fern from our API Definition. + +export type AttackProtectionCaptchaSimpleCaptchaResponseContent = Record; diff --git a/src/management/api/types/AttackProtectionUpdateCaptchaArkose.ts b/src/management/api/types/AttackProtectionUpdateCaptchaArkose.ts new file mode 100644 index 0000000000..34299f6b79 --- /dev/null +++ b/src/management/api/types/AttackProtectionUpdateCaptchaArkose.ts @@ -0,0 +1,14 @@ +// This file was auto-generated by Fern from our API Definition. + +export interface AttackProtectionUpdateCaptchaArkose { + /** The site key for the Arkose captcha provider. */ + site_key: string; + /** The secret key for the Arkose captcha provider. */ + secret: string; + /** The subdomain used for client requests to the Arkose captcha provider. */ + client_subdomain?: string; + /** The subdomain used for server-side verification requests to the Arkose captcha provider. */ + verify_subdomain?: string; + /** Whether the captcha should fail open. */ + fail_open?: boolean; +} diff --git a/src/management/api/types/AttackProtectionUpdateCaptchaFriendlyCaptcha.ts b/src/management/api/types/AttackProtectionUpdateCaptchaFriendlyCaptcha.ts new file mode 100644 index 0000000000..55c924f013 --- /dev/null +++ b/src/management/api/types/AttackProtectionUpdateCaptchaFriendlyCaptcha.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +export interface AttackProtectionUpdateCaptchaFriendlyCaptcha { + /** The site key for the Friendly Captcha provider. */ + site_key: string; + /** The secret key for the Friendly Captcha provider. */ + secret: string; +} diff --git a/src/management/api/types/AttackProtectionUpdateCaptchaHcaptcha.ts b/src/management/api/types/AttackProtectionUpdateCaptchaHcaptcha.ts new file mode 100644 index 0000000000..e9a00821e7 --- /dev/null +++ b/src/management/api/types/AttackProtectionUpdateCaptchaHcaptcha.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +export interface AttackProtectionUpdateCaptchaHcaptcha { + /** The site key for the hCaptcha provider. */ + site_key: string; + /** The secret key for the hCaptcha provider. */ + secret: string; +} diff --git a/src/management/api/types/AttackProtectionUpdateCaptchaRecaptchaEnterprise.ts b/src/management/api/types/AttackProtectionUpdateCaptchaRecaptchaEnterprise.ts new file mode 100644 index 0000000000..edf4cc744d --- /dev/null +++ b/src/management/api/types/AttackProtectionUpdateCaptchaRecaptchaEnterprise.ts @@ -0,0 +1,10 @@ +// This file was auto-generated by Fern from our API Definition. + +export interface AttackProtectionUpdateCaptchaRecaptchaEnterprise { + /** The site key for the reCAPTCHA Enterprise provider. */ + site_key: string; + /** The API key for the reCAPTCHA Enterprise provider. */ + api_key: string; + /** The project ID for the reCAPTCHA Enterprise provider. */ + project_id: string; +} diff --git a/src/management/api/types/AttackProtectionUpdateCaptchaRecaptchaV2.ts b/src/management/api/types/AttackProtectionUpdateCaptchaRecaptchaV2.ts new file mode 100644 index 0000000000..1142481e2f --- /dev/null +++ b/src/management/api/types/AttackProtectionUpdateCaptchaRecaptchaV2.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +export interface AttackProtectionUpdateCaptchaRecaptchaV2 { + /** The site key for the reCAPTCHA v2 provider. */ + site_key: string; + /** The secret key for the reCAPTCHA v2 provider. */ + secret: string; +} diff --git a/src/management/api/types/BotDetectionAllowlist.ts b/src/management/api/types/BotDetectionAllowlist.ts new file mode 100644 index 0000000000..e19d5d6d2c --- /dev/null +++ b/src/management/api/types/BotDetectionAllowlist.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +/** + * List of IP addresses or CIDR blocks to allowlist + */ +export type BotDetectionAllowlist = Management.BotDetectionIpAddressOrCidrBlock[]; diff --git a/src/management/api/types/BotDetectionChallengePolicyPasswordFlowEnum.ts b/src/management/api/types/BotDetectionChallengePolicyPasswordFlowEnum.ts new file mode 100644 index 0000000000..0ab35a6626 --- /dev/null +++ b/src/management/api/types/BotDetectionChallengePolicyPasswordFlowEnum.ts @@ -0,0 +1,10 @@ +// This file was auto-generated by Fern from our API Definition. + +/** The policy that defines how often to show CAPTCHA */ +export const BotDetectionChallengePolicyPasswordFlowEnum = { + Never: "never", + WhenRisky: "when_risky", + Always: "always", +} as const; +export type BotDetectionChallengePolicyPasswordFlowEnum = + (typeof BotDetectionChallengePolicyPasswordFlowEnum)[keyof typeof BotDetectionChallengePolicyPasswordFlowEnum]; diff --git a/src/management/api/types/BotDetectionChallengePolicyPasswordResetFlowEnum.ts b/src/management/api/types/BotDetectionChallengePolicyPasswordResetFlowEnum.ts new file mode 100644 index 0000000000..ddaa946e15 --- /dev/null +++ b/src/management/api/types/BotDetectionChallengePolicyPasswordResetFlowEnum.ts @@ -0,0 +1,10 @@ +// This file was auto-generated by Fern from our API Definition. + +/** The policy that defines how often to show CAPTCHA */ +export const BotDetectionChallengePolicyPasswordResetFlowEnum = { + Never: "never", + WhenRisky: "when_risky", + Always: "always", +} as const; +export type BotDetectionChallengePolicyPasswordResetFlowEnum = + (typeof BotDetectionChallengePolicyPasswordResetFlowEnum)[keyof typeof BotDetectionChallengePolicyPasswordResetFlowEnum]; diff --git a/src/management/api/types/BotDetectionChallengePolicyPasswordlessFlowEnum.ts b/src/management/api/types/BotDetectionChallengePolicyPasswordlessFlowEnum.ts new file mode 100644 index 0000000000..e1f002983b --- /dev/null +++ b/src/management/api/types/BotDetectionChallengePolicyPasswordlessFlowEnum.ts @@ -0,0 +1,10 @@ +// This file was auto-generated by Fern from our API Definition. + +/** The policy that defines how often to show CAPTCHA */ +export const BotDetectionChallengePolicyPasswordlessFlowEnum = { + Never: "never", + WhenRisky: "when_risky", + Always: "always", +} as const; +export type BotDetectionChallengePolicyPasswordlessFlowEnum = + (typeof BotDetectionChallengePolicyPasswordlessFlowEnum)[keyof typeof BotDetectionChallengePolicyPasswordlessFlowEnum]; diff --git a/src/management/api/types/BotDetectionIPv4OrCidrBlock.ts b/src/management/api/types/BotDetectionIPv4OrCidrBlock.ts new file mode 100644 index 0000000000..1c8b206d1b --- /dev/null +++ b/src/management/api/types/BotDetectionIPv4OrCidrBlock.ts @@ -0,0 +1,6 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * IPv4 address or CIDR block + */ +export type BotDetectionIPv4OrCidrBlock = string; diff --git a/src/management/api/types/BotDetectionIPv6OrCidrBlock.ts b/src/management/api/types/BotDetectionIPv6OrCidrBlock.ts new file mode 100644 index 0000000000..378e4aeb65 --- /dev/null +++ b/src/management/api/types/BotDetectionIPv6OrCidrBlock.ts @@ -0,0 +1,6 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * IPv6 address or CIDR block + */ +export type BotDetectionIPv6OrCidrBlock = string; diff --git a/src/management/api/types/BotDetectionIpAddressOrCidrBlock.ts b/src/management/api/types/BotDetectionIpAddressOrCidrBlock.ts new file mode 100644 index 0000000000..8afe516350 --- /dev/null +++ b/src/management/api/types/BotDetectionIpAddressOrCidrBlock.ts @@ -0,0 +1,6 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * IP address (IPv4 or IPv6) or CIDR block + */ +export type BotDetectionIpAddressOrCidrBlock = string; diff --git a/src/management/api/types/BotDetectionLevelEnum.ts b/src/management/api/types/BotDetectionLevelEnum.ts new file mode 100644 index 0000000000..004a48bcfd --- /dev/null +++ b/src/management/api/types/BotDetectionLevelEnum.ts @@ -0,0 +1,9 @@ +// This file was auto-generated by Fern from our API Definition. + +/** The level of bot detection sensitivity */ +export const BotDetectionLevelEnum = { + Low: "low", + Medium: "medium", + High: "high", +} as const; +export type BotDetectionLevelEnum = (typeof BotDetectionLevelEnum)[keyof typeof BotDetectionLevelEnum]; diff --git a/src/management/api/types/BotDetectionMonitoringModeEnabled.ts b/src/management/api/types/BotDetectionMonitoringModeEnabled.ts new file mode 100644 index 0000000000..45b089fb75 --- /dev/null +++ b/src/management/api/types/BotDetectionMonitoringModeEnabled.ts @@ -0,0 +1,6 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * Whether monitoring mode is enabled (logs but does not block) + */ +export type BotDetectionMonitoringModeEnabled = boolean; diff --git a/src/management/api/types/GetAttackProtectionCaptchaResponseContent.ts b/src/management/api/types/GetAttackProtectionCaptchaResponseContent.ts new file mode 100644 index 0000000000..994a32ccd1 --- /dev/null +++ b/src/management/api/types/GetAttackProtectionCaptchaResponseContent.ts @@ -0,0 +1,16 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +export interface GetAttackProtectionCaptchaResponseContent { + active_provider_id?: string; + arkose?: Management.AttackProtectionCaptchaArkoseResponseContent; + auth_challenge?: Management.AttackProtectionCaptchaAuthChallengeResponseContent; + hcaptcha?: Management.AttackProtectionCaptchaHcaptchaResponseContent; + friendly_captcha?: Management.AttackProtectionCaptchaFriendlyCaptchaResponseContent; + recaptcha_enterprise?: Management.AttackProtectionCaptchaRecaptchaEnterpriseResponseContent; + recaptcha_v2?: Management.AttackProtectionCaptchaRecaptchaV2ResponseContent; + simple_captcha?: Management.AttackProtectionCaptchaSimpleCaptchaResponseContent; + /** Accepts any additional properties */ + [key: string]: any; +} diff --git a/src/management/api/types/GetBotDetectionSettingsResponseContent.ts b/src/management/api/types/GetBotDetectionSettingsResponseContent.ts new file mode 100644 index 0000000000..77c775dc59 --- /dev/null +++ b/src/management/api/types/GetBotDetectionSettingsResponseContent.ts @@ -0,0 +1,12 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +export interface GetBotDetectionSettingsResponseContent { + bot_detection_level: Management.BotDetectionLevelEnum; + challenge_password_policy: Management.BotDetectionChallengePolicyPasswordFlowEnum; + challenge_passwordless_policy: Management.BotDetectionChallengePolicyPasswordlessFlowEnum; + challenge_password_reset_policy: Management.BotDetectionChallengePolicyPasswordResetFlowEnum; + allowlist: Management.BotDetectionAllowlist; + monitoring_mode_enabled: Management.BotDetectionMonitoringModeEnabled; +} diff --git a/src/management/api/types/UpdateAttackProtectionCaptchaResponseContent.ts b/src/management/api/types/UpdateAttackProtectionCaptchaResponseContent.ts new file mode 100644 index 0000000000..6aed9f7bb5 --- /dev/null +++ b/src/management/api/types/UpdateAttackProtectionCaptchaResponseContent.ts @@ -0,0 +1,16 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +export interface UpdateAttackProtectionCaptchaResponseContent { + active_provider_id?: string; + arkose?: Management.AttackProtectionCaptchaArkoseResponseContent; + auth_challenge?: Management.AttackProtectionCaptchaAuthChallengeResponseContent; + hcaptcha?: Management.AttackProtectionCaptchaHcaptchaResponseContent; + friendly_captcha?: Management.AttackProtectionCaptchaFriendlyCaptchaResponseContent; + recaptcha_enterprise?: Management.AttackProtectionCaptchaRecaptchaEnterpriseResponseContent; + recaptcha_v2?: Management.AttackProtectionCaptchaRecaptchaV2ResponseContent; + simple_captcha?: Management.AttackProtectionCaptchaSimpleCaptchaResponseContent; + /** Accepts any additional properties */ + [key: string]: any; +} diff --git a/src/management/api/types/UpdateBotDetectionSettingsResponseContent.ts b/src/management/api/types/UpdateBotDetectionSettingsResponseContent.ts new file mode 100644 index 0000000000..fae7695da5 --- /dev/null +++ b/src/management/api/types/UpdateBotDetectionSettingsResponseContent.ts @@ -0,0 +1,12 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +export interface UpdateBotDetectionSettingsResponseContent { + bot_detection_level?: Management.BotDetectionLevelEnum; + challenge_password_policy?: Management.BotDetectionChallengePolicyPasswordFlowEnum; + challenge_passwordless_policy?: Management.BotDetectionChallengePolicyPasswordlessFlowEnum; + challenge_password_reset_policy?: Management.BotDetectionChallengePolicyPasswordResetFlowEnum; + allowlist?: Management.BotDetectionAllowlist; + monitoring_mode_enabled?: Management.BotDetectionMonitoringModeEnabled; +} diff --git a/src/management/api/types/index.ts b/src/management/api/types/index.ts index 26630dd14a..0de49677c5 100644 --- a/src/management/api/types/index.ts +++ b/src/management/api/types/index.ts @@ -50,8 +50,31 @@ export * from "./AppMetadata.js"; export * from "./AssessorsTypeEnum.js"; export * from "./AssociateOrganizationClientGrantResponseContent.js"; export * from "./AsyncApprovalNotificationsChannelsEnum.js"; +export * from "./AttackProtectionCaptchaArkoseResponseContent.js"; +export * from "./AttackProtectionCaptchaAuthChallengeRequest.js"; +export * from "./AttackProtectionCaptchaAuthChallengeResponseContent.js"; +export * from "./AttackProtectionCaptchaFriendlyCaptchaResponseContent.js"; +export * from "./AttackProtectionCaptchaHcaptchaResponseContent.js"; +export * from "./AttackProtectionCaptchaProviderId.js"; +export * from "./AttackProtectionCaptchaRecaptchaEnterpriseResponseContent.js"; +export * from "./AttackProtectionCaptchaRecaptchaV2ResponseContent.js"; +export * from "./AttackProtectionCaptchaSimpleCaptchaResponseContent.js"; +export * from "./AttackProtectionUpdateCaptchaArkose.js"; +export * from "./AttackProtectionUpdateCaptchaFriendlyCaptcha.js"; +export * from "./AttackProtectionUpdateCaptchaHcaptcha.js"; +export * from "./AttackProtectionUpdateCaptchaRecaptchaEnterprise.js"; +export * from "./AttackProtectionUpdateCaptchaRecaptchaV2.js"; export * from "./AuthenticationMethodTypeEnum.js"; export * from "./AuthenticationTypeEnum.js"; +export * from "./BotDetectionAllowlist.js"; +export * from "./BotDetectionChallengePolicyPasswordFlowEnum.js"; +export * from "./BotDetectionChallengePolicyPasswordResetFlowEnum.js"; +export * from "./BotDetectionChallengePolicyPasswordlessFlowEnum.js"; +export * from "./BotDetectionIPv4OrCidrBlock.js"; +export * from "./BotDetectionIPv6OrCidrBlock.js"; +export * from "./BotDetectionIpAddressOrCidrBlock.js"; +export * from "./BotDetectionLevelEnum.js"; +export * from "./BotDetectionMonitoringModeEnabled.js"; export * from "./BrandingColors.js"; export * from "./BrandingFont.js"; export * from "./BrandingPageBackground.js"; @@ -1018,6 +1041,8 @@ export * from "./GetActionResponseContent.js"; export * from "./GetActionVersionResponseContent.js"; export * from "./GetActiveUsersCountStatsResponseContent.js"; export * from "./GetAculResponseContent.js"; +export * from "./GetAttackProtectionCaptchaResponseContent.js"; +export * from "./GetBotDetectionSettingsResponseContent.js"; export * from "./GetBrandingDefaultThemeResponseContent.js"; export * from "./GetBrandingPhoneProviderResponseContent.js"; export * from "./GetBrandingResponseContent.js"; @@ -1421,6 +1446,8 @@ export * from "./UniversalLoginExperienceEnum.js"; export * from "./UpdateActionBindingsResponseContent.js"; export * from "./UpdateActionResponseContent.js"; export * from "./UpdateAculResponseContent.js"; +export * from "./UpdateAttackProtectionCaptchaResponseContent.js"; +export * from "./UpdateBotDetectionSettingsResponseContent.js"; export * from "./UpdateBrandingColors.js"; export * from "./UpdateBrandingFont.js"; export * from "./UpdateBrandingPageBackground.js"; diff --git a/src/management/tests/wire/attackProtection/botDetection.test.ts b/src/management/tests/wire/attackProtection/botDetection.test.ts new file mode 100644 index 0000000000..83cb5943f3 --- /dev/null +++ b/src/management/tests/wire/attackProtection/botDetection.test.ts @@ -0,0 +1,237 @@ +// This file was auto-generated by Fern from our API Definition. + +import { mockServerPool } from "../../mock-server/MockServerPool"; +import { ManagementClient } from "../../../Client"; +import * as Management from "../../../api/index"; + +describe("BotDetection", () => { + test("get (1)", async () => { + const server = mockServerPool.createServer(); + const client = new ManagementClient({ token: "test", environment: server.baseUrl }); + + const rawResponseBody = { + bot_detection_level: "low", + challenge_password_policy: "never", + challenge_passwordless_policy: "never", + challenge_password_reset_policy: "never", + allowlist: ["allowlist"], + monitoring_mode_enabled: true, + }; + server + .mockEndpoint() + .get("/attack-protection/bot-detection") + .respondWith() + .statusCode(200) + .jsonBody(rawResponseBody) + .build(); + + const response = await client.attackProtection.botDetection.get(); + expect(response).toEqual({ + bot_detection_level: "low", + challenge_password_policy: "never", + challenge_passwordless_policy: "never", + challenge_password_reset_policy: "never", + allowlist: ["allowlist"], + monitoring_mode_enabled: true, + }); + }); + + test("get (2)", async () => { + const server = mockServerPool.createServer(); + const client = new ManagementClient({ token: "test", environment: server.baseUrl }); + + const rawResponseBody = { key: "value" }; + server + .mockEndpoint() + .get("/attack-protection/bot-detection") + .respondWith() + .statusCode(401) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.attackProtection.botDetection.get(); + }).rejects.toThrow(Management.UnauthorizedError); + }); + + test("get (3)", async () => { + const server = mockServerPool.createServer(); + const client = new ManagementClient({ token: "test", environment: server.baseUrl }); + + const rawResponseBody = { key: "value" }; + server + .mockEndpoint() + .get("/attack-protection/bot-detection") + .respondWith() + .statusCode(403) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.attackProtection.botDetection.get(); + }).rejects.toThrow(Management.ForbiddenError); + }); + + test("get (4)", async () => { + const server = mockServerPool.createServer(); + const client = new ManagementClient({ token: "test", environment: server.baseUrl }); + + const rawResponseBody = { key: "value" }; + server + .mockEndpoint() + .get("/attack-protection/bot-detection") + .respondWith() + .statusCode(404) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.attackProtection.botDetection.get(); + }).rejects.toThrow(Management.NotFoundError); + }); + + test("get (5)", async () => { + const server = mockServerPool.createServer(); + const client = new ManagementClient({ token: "test", environment: server.baseUrl }); + + const rawResponseBody = { key: "value" }; + server + .mockEndpoint() + .get("/attack-protection/bot-detection") + .respondWith() + .statusCode(429) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.attackProtection.botDetection.get(); + }).rejects.toThrow(Management.TooManyRequestsError); + }); + + test("update (1)", async () => { + const server = mockServerPool.createServer(); + const client = new ManagementClient({ token: "test", environment: server.baseUrl }); + const rawRequestBody = {}; + const rawResponseBody = { + bot_detection_level: "low", + challenge_password_policy: "never", + challenge_passwordless_policy: "never", + challenge_password_reset_policy: "never", + allowlist: ["allowlist"], + monitoring_mode_enabled: true, + }; + server + .mockEndpoint() + .patch("/attack-protection/bot-detection") + .jsonBody(rawRequestBody) + .respondWith() + .statusCode(200) + .jsonBody(rawResponseBody) + .build(); + + const response = await client.attackProtection.botDetection.update(); + expect(response).toEqual({ + bot_detection_level: "low", + challenge_password_policy: "never", + challenge_passwordless_policy: "never", + challenge_password_reset_policy: "never", + allowlist: ["allowlist"], + monitoring_mode_enabled: true, + }); + }); + + test("update (2)", async () => { + const server = mockServerPool.createServer(); + const client = new ManagementClient({ token: "test", environment: server.baseUrl }); + const rawRequestBody = {}; + const rawResponseBody = { key: "value" }; + server + .mockEndpoint() + .patch("/attack-protection/bot-detection") + .jsonBody(rawRequestBody) + .respondWith() + .statusCode(400) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.attackProtection.botDetection.update(); + }).rejects.toThrow(Management.BadRequestError); + }); + + test("update (3)", async () => { + const server = mockServerPool.createServer(); + const client = new ManagementClient({ token: "test", environment: server.baseUrl }); + const rawRequestBody = {}; + const rawResponseBody = { key: "value" }; + server + .mockEndpoint() + .patch("/attack-protection/bot-detection") + .jsonBody(rawRequestBody) + .respondWith() + .statusCode(401) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.attackProtection.botDetection.update(); + }).rejects.toThrow(Management.UnauthorizedError); + }); + + test("update (4)", async () => { + const server = mockServerPool.createServer(); + const client = new ManagementClient({ token: "test", environment: server.baseUrl }); + const rawRequestBody = {}; + const rawResponseBody = { key: "value" }; + server + .mockEndpoint() + .patch("/attack-protection/bot-detection") + .jsonBody(rawRequestBody) + .respondWith() + .statusCode(403) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.attackProtection.botDetection.update(); + }).rejects.toThrow(Management.ForbiddenError); + }); + + test("update (5)", async () => { + const server = mockServerPool.createServer(); + const client = new ManagementClient({ token: "test", environment: server.baseUrl }); + const rawRequestBody = {}; + const rawResponseBody = { key: "value" }; + server + .mockEndpoint() + .patch("/attack-protection/bot-detection") + .jsonBody(rawRequestBody) + .respondWith() + .statusCode(404) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.attackProtection.botDetection.update(); + }).rejects.toThrow(Management.NotFoundError); + }); + + test("update (6)", async () => { + const server = mockServerPool.createServer(); + const client = new ManagementClient({ token: "test", environment: server.baseUrl }); + const rawRequestBody = {}; + const rawResponseBody = { key: "value" }; + server + .mockEndpoint() + .patch("/attack-protection/bot-detection") + .jsonBody(rawRequestBody) + .respondWith() + .statusCode(429) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.attackProtection.botDetection.update(); + }).rejects.toThrow(Management.TooManyRequestsError); + }); +}); diff --git a/src/management/tests/wire/attackProtection/captcha.test.ts b/src/management/tests/wire/attackProtection/captcha.test.ts new file mode 100644 index 0000000000..300f059655 --- /dev/null +++ b/src/management/tests/wire/attackProtection/captcha.test.ts @@ -0,0 +1,272 @@ +// This file was auto-generated by Fern from our API Definition. + +import { mockServerPool } from "../../mock-server/MockServerPool"; +import { ManagementClient } from "../../../Client"; +import * as Management from "../../../api/index"; + +describe("Captcha", () => { + test("get (1)", async () => { + const server = mockServerPool.createServer(); + const client = new ManagementClient({ token: "test", environment: server.baseUrl }); + + const rawResponseBody = { + active_provider_id: "active_provider_id", + arkose: { + site_key: "site_key", + fail_open: true, + client_subdomain: "client_subdomain", + verify_subdomain: "verify_subdomain", + }, + auth_challenge: { fail_open: true }, + hcaptcha: { site_key: "site_key" }, + friendly_captcha: { site_key: "site_key" }, + recaptcha_enterprise: { site_key: "site_key", project_id: "project_id" }, + recaptcha_v2: { site_key: "site_key" }, + simple_captcha: { key: "value" }, + }; + server + .mockEndpoint() + .get("/attack-protection/captcha") + .respondWith() + .statusCode(200) + .jsonBody(rawResponseBody) + .build(); + + const response = await client.attackProtection.captcha.get(); + expect(response).toEqual({ + active_provider_id: "active_provider_id", + arkose: { + site_key: "site_key", + fail_open: true, + client_subdomain: "client_subdomain", + verify_subdomain: "verify_subdomain", + }, + auth_challenge: { + fail_open: true, + }, + hcaptcha: { + site_key: "site_key", + }, + friendly_captcha: { + site_key: "site_key", + }, + recaptcha_enterprise: { + site_key: "site_key", + project_id: "project_id", + }, + recaptcha_v2: { + site_key: "site_key", + }, + simple_captcha: { + key: "value", + }, + }); + }); + + test("get (2)", async () => { + const server = mockServerPool.createServer(); + const client = new ManagementClient({ token: "test", environment: server.baseUrl }); + + const rawResponseBody = { key: "value" }; + server + .mockEndpoint() + .get("/attack-protection/captcha") + .respondWith() + .statusCode(401) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.attackProtection.captcha.get(); + }).rejects.toThrow(Management.UnauthorizedError); + }); + + test("get (3)", async () => { + const server = mockServerPool.createServer(); + const client = new ManagementClient({ token: "test", environment: server.baseUrl }); + + const rawResponseBody = { key: "value" }; + server + .mockEndpoint() + .get("/attack-protection/captcha") + .respondWith() + .statusCode(403) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.attackProtection.captcha.get(); + }).rejects.toThrow(Management.ForbiddenError); + }); + + test("get (4)", async () => { + const server = mockServerPool.createServer(); + const client = new ManagementClient({ token: "test", environment: server.baseUrl }); + + const rawResponseBody = { key: "value" }; + server + .mockEndpoint() + .get("/attack-protection/captcha") + .respondWith() + .statusCode(404) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.attackProtection.captcha.get(); + }).rejects.toThrow(Management.NotFoundError); + }); + + test("get (5)", async () => { + const server = mockServerPool.createServer(); + const client = new ManagementClient({ token: "test", environment: server.baseUrl }); + + const rawResponseBody = { key: "value" }; + server + .mockEndpoint() + .get("/attack-protection/captcha") + .respondWith() + .statusCode(429) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.attackProtection.captcha.get(); + }).rejects.toThrow(Management.TooManyRequestsError); + }); + + test("update (1)", async () => { + const server = mockServerPool.createServer(); + const client = new ManagementClient({ token: "test", environment: server.baseUrl }); + const rawRequestBody = {}; + const rawResponseBody = { + active_provider_id: "active_provider_id", + arkose: { + site_key: "site_key", + fail_open: true, + client_subdomain: "client_subdomain", + verify_subdomain: "verify_subdomain", + }, + auth_challenge: { fail_open: true }, + hcaptcha: { site_key: "site_key" }, + friendly_captcha: { site_key: "site_key" }, + recaptcha_enterprise: { site_key: "site_key", project_id: "project_id" }, + recaptcha_v2: { site_key: "site_key" }, + simple_captcha: { key: "value" }, + }; + server + .mockEndpoint() + .patch("/attack-protection/captcha") + .jsonBody(rawRequestBody) + .respondWith() + .statusCode(200) + .jsonBody(rawResponseBody) + .build(); + + const response = await client.attackProtection.captcha.update(); + expect(response).toEqual({ + active_provider_id: "active_provider_id", + arkose: { + site_key: "site_key", + fail_open: true, + client_subdomain: "client_subdomain", + verify_subdomain: "verify_subdomain", + }, + auth_challenge: { + fail_open: true, + }, + hcaptcha: { + site_key: "site_key", + }, + friendly_captcha: { + site_key: "site_key", + }, + recaptcha_enterprise: { + site_key: "site_key", + project_id: "project_id", + }, + recaptcha_v2: { + site_key: "site_key", + }, + simple_captcha: { + key: "value", + }, + }); + }); + + test("update (2)", async () => { + const server = mockServerPool.createServer(); + const client = new ManagementClient({ token: "test", environment: server.baseUrl }); + const rawRequestBody = {}; + const rawResponseBody = { key: "value" }; + server + .mockEndpoint() + .patch("/attack-protection/captcha") + .jsonBody(rawRequestBody) + .respondWith() + .statusCode(401) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.attackProtection.captcha.update(); + }).rejects.toThrow(Management.UnauthorizedError); + }); + + test("update (3)", async () => { + const server = mockServerPool.createServer(); + const client = new ManagementClient({ token: "test", environment: server.baseUrl }); + const rawRequestBody = {}; + const rawResponseBody = { key: "value" }; + server + .mockEndpoint() + .patch("/attack-protection/captcha") + .jsonBody(rawRequestBody) + .respondWith() + .statusCode(403) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.attackProtection.captcha.update(); + }).rejects.toThrow(Management.ForbiddenError); + }); + + test("update (4)", async () => { + const server = mockServerPool.createServer(); + const client = new ManagementClient({ token: "test", environment: server.baseUrl }); + const rawRequestBody = {}; + const rawResponseBody = { key: "value" }; + server + .mockEndpoint() + .patch("/attack-protection/captcha") + .jsonBody(rawRequestBody) + .respondWith() + .statusCode(404) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.attackProtection.captcha.update(); + }).rejects.toThrow(Management.NotFoundError); + }); + + test("update (5)", async () => { + const server = mockServerPool.createServer(); + const client = new ManagementClient({ token: "test", environment: server.baseUrl }); + const rawRequestBody = {}; + const rawResponseBody = { key: "value" }; + server + .mockEndpoint() + .patch("/attack-protection/captcha") + .jsonBody(rawRequestBody) + .respondWith() + .statusCode(429) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.attackProtection.captcha.update(); + }).rejects.toThrow(Management.TooManyRequestsError); + }); +}); diff --git a/yarn.lock b/yarn.lock index cfe6962438..626ea4980b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -305,20 +305,13 @@ debug "^4.3.1" minimatch "^3.1.2" -"@eslint/config-helpers@^0.4.1": +"@eslint/config-helpers@^0.4.2": version "0.4.2" resolved "https://registry.yarnpkg.com/@eslint/config-helpers/-/config-helpers-0.4.2.tgz#1bd006ceeb7e2e55b2b773ab318d300e1a66aeda" integrity sha512-gBrxN88gOIf3R7ja5K9slwNayVcZgK6SOUORm2uBzTeIEfeVaIhOpCtTox3P6R7o2jLFwLFTLnC7kU/RGcYEgw== dependencies: "@eslint/core" "^0.17.0" -"@eslint/core@^0.16.0": - version "0.16.0" - resolved "https://registry.yarnpkg.com/@eslint/core/-/core-0.16.0.tgz#490254f275ba9667ddbab344f4f0a6b7a7bd7209" - integrity sha512-nmC8/totwobIiFcGkDza3GIKfAw1+hLiYVrh3I1nIomQ8PEr5cxg34jnkmGawul/ep52wGRAcyeDCNtWKSOj4Q== - dependencies: - "@types/json-schema" "^7.0.15" - "@eslint/core@^0.17.0": version "0.17.0" resolved "https://registry.yarnpkg.com/@eslint/core/-/core-0.17.0.tgz#77225820413d9617509da9342190a2019e78761c" @@ -341,17 +334,17 @@ minimatch "^3.1.2" strip-json-comments "^3.1.1" -"@eslint/js@9.38.0", "@eslint/js@^9.32.0": - version "9.38.0" - resolved "https://registry.yarnpkg.com/@eslint/js/-/js-9.38.0.tgz#f7aa9c7577577f53302c1d795643589d7709ebd1" - integrity sha512-UZ1VpFvXf9J06YG9xQBdnzU+kthors6KjhMAl6f4gH4usHyh31rUf2DLGInT8RFYIReYXNSydgPY0V2LuWgl7A== +"@eslint/js@9.39.1", "@eslint/js@^9.32.0": + version "9.39.1" + resolved "https://registry.yarnpkg.com/@eslint/js/-/js-9.39.1.tgz#0dd59c3a9f40e3f1882975c321470969243e0164" + integrity sha512-S26Stp4zCy88tH94QbBv3XCuzRQiZ9yXofEILmglYTh/Ug/a9/umqvgFtYBAo3Lp0nsI/5/qH1CCrbdK3AP1Tw== "@eslint/object-schema@^2.1.7": version "2.1.7" resolved "https://registry.yarnpkg.com/@eslint/object-schema/-/object-schema-2.1.7.tgz#6e2126a1347e86a4dedf8706ec67ff8e107ebbad" integrity sha512-VtAOaymWVfZcmZbp6E2mympDIHvyjXs/12LqWYjVw6qjrfF+VK+fyG33kChz3nnK+SU5/NeHOqrTEHS8sXO3OA== -"@eslint/plugin-kit@^0.4.0": +"@eslint/plugin-kit@^0.4.1": version "0.4.1" resolved "https://registry.yarnpkg.com/@eslint/plugin-kit/-/plugin-kit-0.4.1.tgz#9779e3fd9b7ee33571a57435cf4335a1794a6cb2" integrity sha512-43/qtrDUokr7LJqoF2c3+RInu/t4zfrpYdoSDfYyhg52rwLV6TnOvdG4fXm7IkSB3wErkcmJS9iEhjVtOSEjjA== @@ -961,78 +954,78 @@ "@types/yargs-parser" "*" "@typescript-eslint/eslint-plugin@^8.38.0": - version "8.46.2" - resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.46.2.tgz#dc4ab93ee3d7e6c8e38820a0d6c7c93c7183e2dc" - integrity sha512-ZGBMToy857/NIPaaCucIUQgqueOiq7HeAKkhlvqVV4lm089zUFW6ikRySx2v+cAhKeUCPuWVHeimyk6Dw1iY3w== + version "8.46.3" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.46.3.tgz#6f7aeaf9f5c611425db9b8f983e8d3fe5deece3c" + integrity sha512-sbaQ27XBUopBkRiuY/P9sWGOWUW4rl8fDoHIUmLpZd8uldsTyB4/Zg6bWTegPoTLnKj9Hqgn3QD6cjPNB32Odw== dependencies: "@eslint-community/regexpp" "^4.10.0" - "@typescript-eslint/scope-manager" "8.46.2" - "@typescript-eslint/type-utils" "8.46.2" - "@typescript-eslint/utils" "8.46.2" - "@typescript-eslint/visitor-keys" "8.46.2" + "@typescript-eslint/scope-manager" "8.46.3" + "@typescript-eslint/type-utils" "8.46.3" + "@typescript-eslint/utils" "8.46.3" + "@typescript-eslint/visitor-keys" "8.46.3" graphemer "^1.4.0" ignore "^7.0.0" natural-compare "^1.4.0" ts-api-utils "^2.1.0" "@typescript-eslint/parser@^8.38.0": - version "8.46.2" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-8.46.2.tgz#dd938d45d581ac8ffa9d8a418a50282b306f7ebf" - integrity sha512-BnOroVl1SgrPLywqxyqdJ4l3S2MsKVLDVxZvjI1Eoe8ev2r3kGDo+PcMihNmDE+6/KjkTubSJnmqGZZjQSBq/g== - dependencies: - "@typescript-eslint/scope-manager" "8.46.2" - "@typescript-eslint/types" "8.46.2" - "@typescript-eslint/typescript-estree" "8.46.2" - "@typescript-eslint/visitor-keys" "8.46.2" + version "8.46.3" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-8.46.3.tgz#3badfb62d2e2dc733d02a038073e3f65f2cb833d" + integrity sha512-6m1I5RmHBGTnUGS113G04DMu3CpSdxCAU/UvtjNWL4Nuf3MW9tQhiJqRlHzChIkhy6kZSAQmc+I1bcGjE3yNKg== + dependencies: + "@typescript-eslint/scope-manager" "8.46.3" + "@typescript-eslint/types" "8.46.3" + "@typescript-eslint/typescript-estree" "8.46.3" + "@typescript-eslint/visitor-keys" "8.46.3" debug "^4.3.4" -"@typescript-eslint/project-service@8.46.2": - version "8.46.2" - resolved "https://registry.yarnpkg.com/@typescript-eslint/project-service/-/project-service-8.46.2.tgz#ab2f02a0de4da6a7eeb885af5e059be57819d608" - integrity sha512-PULOLZ9iqwI7hXcmL4fVfIsBi6AN9YxRc0frbvmg8f+4hQAjQ5GYNKK0DIArNo+rOKmR/iBYwkpBmnIwin4wBg== +"@typescript-eslint/project-service@8.46.3": + version "8.46.3" + resolved "https://registry.yarnpkg.com/@typescript-eslint/project-service/-/project-service-8.46.3.tgz#4555c685407ea829081218fa033d7b032607aaef" + integrity sha512-Fz8yFXsp2wDFeUElO88S9n4w1I4CWDTXDqDr9gYvZgUpwXQqmZBr9+NTTql5R3J7+hrJZPdpiWaB9VNhAKYLuQ== dependencies: - "@typescript-eslint/tsconfig-utils" "^8.46.2" - "@typescript-eslint/types" "^8.46.2" + "@typescript-eslint/tsconfig-utils" "^8.46.3" + "@typescript-eslint/types" "^8.46.3" debug "^4.3.4" -"@typescript-eslint/scope-manager@8.46.2": - version "8.46.2" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-8.46.2.tgz#7d37df2493c404450589acb3b5d0c69cc0670a88" - integrity sha512-LF4b/NmGvdWEHD2H4MsHD8ny6JpiVNDzrSZr3CsckEgCbAGZbYM4Cqxvi9L+WqDMT+51Ozy7lt2M+d0JLEuBqA== +"@typescript-eslint/scope-manager@8.46.3": + version "8.46.3" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-8.46.3.tgz#2e330f566e135ccac13477b98dd88d8f176e4dff" + integrity sha512-FCi7Y1zgrmxp3DfWfr+3m9ansUUFoy8dkEdeQSgA9gbm8DaHYvZCdkFRQrtKiedFf3Ha6VmoqoAaP68+i+22kg== dependencies: - "@typescript-eslint/types" "8.46.2" - "@typescript-eslint/visitor-keys" "8.46.2" + "@typescript-eslint/types" "8.46.3" + "@typescript-eslint/visitor-keys" "8.46.3" -"@typescript-eslint/tsconfig-utils@8.46.2", "@typescript-eslint/tsconfig-utils@^8.46.2": - version "8.46.2" - resolved "https://registry.yarnpkg.com/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.46.2.tgz#d110451cb93bbd189865206ea37ef677c196828c" - integrity sha512-a7QH6fw4S57+F5y2FIxxSDyi5M4UfGF+Jl1bCGd7+L4KsaUY80GsiF/t0UoRFDHAguKlBaACWJRmdrc6Xfkkag== +"@typescript-eslint/tsconfig-utils@8.46.3", "@typescript-eslint/tsconfig-utils@^8.46.3": + version "8.46.3" + resolved "https://registry.yarnpkg.com/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.46.3.tgz#cad33398c762c97fe56a8defda00c16505abefa3" + integrity sha512-GLupljMniHNIROP0zE7nCcybptolcH8QZfXOpCfhQDAdwJ/ZTlcaBOYebSOZotpti/3HrHSw7D3PZm75gYFsOA== -"@typescript-eslint/type-utils@8.46.2": - version "8.46.2" - resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-8.46.2.tgz#802d027864e6fb752e65425ed09f3e089fb4d384" - integrity sha512-HbPM4LbaAAt/DjxXaG9yiS9brOOz6fabal4uvUmaUYe6l3K1phQDMQKBRUrr06BQkxkvIZVVHttqiybM9nJsLA== +"@typescript-eslint/type-utils@8.46.3": + version "8.46.3" + resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-8.46.3.tgz#71188df833d7697ecff256cd1d3889a20552d78c" + integrity sha512-ZPCADbr+qfz3aiTTYNNkCbUt+cjNwI/5McyANNrFBpVxPt7GqpEYz5ZfdwuFyGUnJ9FdDXbGODUu6iRCI6XRXw== dependencies: - "@typescript-eslint/types" "8.46.2" - "@typescript-eslint/typescript-estree" "8.46.2" - "@typescript-eslint/utils" "8.46.2" + "@typescript-eslint/types" "8.46.3" + "@typescript-eslint/typescript-estree" "8.46.3" + "@typescript-eslint/utils" "8.46.3" debug "^4.3.4" ts-api-utils "^2.1.0" -"@typescript-eslint/types@8.46.2", "@typescript-eslint/types@^8.46.2": - version "8.46.2" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-8.46.2.tgz#2bad7348511b31e6e42579820e62b73145635763" - integrity sha512-lNCWCbq7rpg7qDsQrd3D6NyWYu+gkTENkG5IKYhUIcxSb59SQC/hEQ+MrG4sTgBVghTonNWq42bA/d4yYumldQ== +"@typescript-eslint/types@8.46.3", "@typescript-eslint/types@^8.46.3": + version "8.46.3" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-8.46.3.tgz#da05ea40e91359b4275dbb3a489f2f7907a02245" + integrity sha512-G7Ok9WN/ggW7e/tOf8TQYMaxgID3Iujn231hfi0Pc7ZheztIJVpO44ekY00b7akqc6nZcvregk0Jpah3kep6hA== -"@typescript-eslint/typescript-estree@8.46.2": - version "8.46.2" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-8.46.2.tgz#ab547a27e4222bb6a3281cb7e98705272e2c7d08" - integrity sha512-f7rW7LJ2b7Uh2EiQ+7sza6RDZnajbNbemn54Ob6fRwQbgcIn+GWfyuHDHRYgRoZu1P4AayVScrRW+YfbTvPQoQ== +"@typescript-eslint/typescript-estree@8.46.3": + version "8.46.3" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-8.46.3.tgz#c12406afba707f9779ce0c0151a08c33b3a96d41" + integrity sha512-f/NvtRjOm80BtNM5OQtlaBdM5BRFUv7gf381j9wygDNL+qOYSNOgtQ/DCndiYi80iIOv76QqaTmp4fa9hwI0OA== dependencies: - "@typescript-eslint/project-service" "8.46.2" - "@typescript-eslint/tsconfig-utils" "8.46.2" - "@typescript-eslint/types" "8.46.2" - "@typescript-eslint/visitor-keys" "8.46.2" + "@typescript-eslint/project-service" "8.46.3" + "@typescript-eslint/tsconfig-utils" "8.46.3" + "@typescript-eslint/types" "8.46.3" + "@typescript-eslint/visitor-keys" "8.46.3" debug "^4.3.4" fast-glob "^3.3.2" is-glob "^4.0.3" @@ -1040,22 +1033,22 @@ semver "^7.6.0" ts-api-utils "^2.1.0" -"@typescript-eslint/utils@8.46.2": - version "8.46.2" - resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-8.46.2.tgz#b313d33d67f9918583af205bd7bcebf20f231732" - integrity sha512-sExxzucx0Tud5tE0XqR0lT0psBQvEpnpiul9XbGUB1QwpWJJAps1O/Z7hJxLGiZLBKMCutjTzDgmd1muEhBnVg== +"@typescript-eslint/utils@8.46.3": + version "8.46.3" + resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-8.46.3.tgz#b6c7994b7c1ee2fe338ab32f7b3d4424856a73ce" + integrity sha512-VXw7qmdkucEx9WkmR3ld/u6VhRyKeiF1uxWwCy/iuNfokjJ7VhsgLSOTjsol8BunSw190zABzpwdNsze2Kpo4g== dependencies: "@eslint-community/eslint-utils" "^4.7.0" - "@typescript-eslint/scope-manager" "8.46.2" - "@typescript-eslint/types" "8.46.2" - "@typescript-eslint/typescript-estree" "8.46.2" + "@typescript-eslint/scope-manager" "8.46.3" + "@typescript-eslint/types" "8.46.3" + "@typescript-eslint/typescript-estree" "8.46.3" -"@typescript-eslint/visitor-keys@8.46.2": - version "8.46.2" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-8.46.2.tgz#803fa298948c39acf810af21bdce6f8babfa9738" - integrity sha512-tUFMXI4gxzzMXt4xpGJEsBsTox0XbNQ1y94EwlD/CuZwFcQP79xfQqMhau9HsRc/J0cAPA/HZt1dZPtGn9V/7w== +"@typescript-eslint/visitor-keys@8.46.3": + version "8.46.3" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-8.46.3.tgz#6811b15053501981059c58e1c01b39242bd5c0f6" + integrity sha512-uk574k8IU0rOF/AjniX8qbLSGURJVUCeM5e4MIMKBFFi8weeiLrG1fyQejyLXQpRZbU/1BuQasleV/RfHC3hHg== dependencies: - "@typescript-eslint/types" "8.46.2" + "@typescript-eslint/types" "8.46.3" eslint-visitor-keys "^4.2.1" "@webassemblyjs/ast@1.14.1", "@webassemblyjs/ast@^1.14.1": @@ -1273,9 +1266,9 @@ ansi-escapes@^4.2.1: type-fest "^0.21.3" ansi-escapes@^7.0.0: - version "7.1.1" - resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-7.1.1.tgz#fdd39427a7e5a26233e48a8b4366351629ffea1b" - integrity sha512-Zhl0ErHcSRUaVfGUeUdDuLgpkEo8KIFjB4Y9uAc46ScOpdDiU1Dbyplh7qWJeJ/ZHpbyMSM26+X3BySgnIz40Q== + version "7.2.0" + resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-7.2.0.tgz#31b25afa3edd3efc09d98c2fee831d460ff06b49" + integrity sha512-g6LhBsl+GBPRWGWsBtutpzBYuIIdBkLEvad5C/va/74Db018+5TZiyA26cZJAr3Rft5lprVqOIPxf5Vid6tqAw== dependencies: environment "^1.0.0" @@ -1332,9 +1325,9 @@ asynckit@^0.4.0: integrity sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q== "auth0-legacy@npm:auth0@^4.27.0": - version "4.34.0" - resolved "https://registry.yarnpkg.com/auth0/-/auth0-4.34.0.tgz#7e437eb7a8da77b7fad1af2c25196a153c7fb3b0" - integrity sha512-5x/wRqgvdINPaQVLFH1JdJKeRtISv21uQuKlA0M2wKFWrDKDh7XOuIYA1xuJLRPmBo9xgIIfjbC/vtOszUzGFw== + version "4.35.0" + resolved "https://registry.yarnpkg.com/auth0/-/auth0-4.35.0.tgz#57fffad73edeacbb94dbda0aa4385eef3eea3591" + integrity sha512-sERgoXej8bj42quqyPh1IAGYUzoDEaILJW6ALJ+1ANUsAMotAxKsdeG6XVTj03b9nn6Pest1DgfM7T9pcYTQjQ== dependencies: jose "^4.13.2" undici-types "^6.15.0" @@ -1863,18 +1856,18 @@ eslint-visitor-keys@^4.2.1: integrity sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ== eslint@^9.32.0: - version "9.38.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-9.38.0.tgz#3957d2af804e5cf6cc503c618f60acc71acb2e7e" - integrity sha512-t5aPOpmtJcZcz5UJyY2GbvpDlsK5E8JqRqoKtfiKE3cNh437KIqfJr3A3AKf5k64NPx6d0G3dno6XDY05PqPtw== + version "9.39.1" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-9.39.1.tgz#be8bf7c6de77dcc4252b5a8dcb31c2efff74a6e5" + integrity sha512-BhHmn2yNOFA9H9JmmIVKJmd288g9hrVRDkdoIgRCRuSySRUHH7r/DI6aAXW9T1WwUuY3DFgrcaqB+deURBLR5g== dependencies: "@eslint-community/eslint-utils" "^4.8.0" "@eslint-community/regexpp" "^4.12.1" "@eslint/config-array" "^0.21.1" - "@eslint/config-helpers" "^0.4.1" - "@eslint/core" "^0.16.0" + "@eslint/config-helpers" "^0.4.2" + "@eslint/core" "^0.17.0" "@eslint/eslintrc" "^3.3.1" - "@eslint/js" "9.38.0" - "@eslint/plugin-kit" "^0.4.0" + "@eslint/js" "9.39.1" + "@eslint/plugin-kit" "^0.4.1" "@humanfs/node" "^0.16.6" "@humanwhocodes/module-importer" "^1.0.1" "@humanwhocodes/retry" "^0.4.2"