UNPKG

@unkey/api

Version:

Developer-friendly & type-safe Typescript SDK specifically catered to leverage *@unkey/api* API.

66 lines (60 loc) 2.13 kB
/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v3"; /** * Deletes an existing rate limit override. This permanently removes a custom rate limit rule, reverting affected identifiers back to the default rate limits for the namespace. * * @remarks * * Use this endpoint when you need to: * - Remove special rate limit rules that are no longer needed * - Reset entities back to standard rate limits * - Clean up temporary overrides * - Remove outdated tiering or custom limit rules * - Fix misconfigured overrides * * Once deleted, the override cannot be recovered, and the operation takes effect immediately. */ export type V2RatelimitDeleteOverrideRequestBody = { /** * The id or name of the namespace containing the override. */ namespace: string; /** * The exact identifier pattern of the override to delete. This must match exactly as it was specified when creating the override. * * @remarks * * Important notes: * - This is case-sensitive and must match exactly * - Include any wildcards (*) that were part of the original pattern * - For example, if the override was created for 'premium_*', you must use 'premium_*' here, not a specific ID * * After deletion, any identifiers previously affected by this override will immediately revert to using the default rate limit for the namespace. */ identifier: string; }; /** @internal */ export type V2RatelimitDeleteOverrideRequestBody$Outbound = { namespace: string; identifier: string; }; /** @internal */ export const V2RatelimitDeleteOverrideRequestBody$outboundSchema: z.ZodType< V2RatelimitDeleteOverrideRequestBody$Outbound, z.ZodTypeDef, V2RatelimitDeleteOverrideRequestBody > = z.object({ namespace: z.string(), identifier: z.string(), }); export function v2RatelimitDeleteOverrideRequestBodyToJSON( v2RatelimitDeleteOverrideRequestBody: V2RatelimitDeleteOverrideRequestBody, ): string { return JSON.stringify( V2RatelimitDeleteOverrideRequestBody$outboundSchema.parse( v2RatelimitDeleteOverrideRequestBody, ), ); }