UNPKG

@vercel/sdk

Version:

<p align="center"> <a href="https://vercel.com"> <img src="https://assets.vercel.com/image/upload/v1588805858/repositories/vercel/logo.png" height="96"> <h3 align="center">Vercel</h3> </a> <p align="center">Develop. Preview. Ship.</p> </p>

45 lines 1.77 kB
import * as z from "zod/v3"; import { ClosedEnum } from "../types/enums.js"; import { Result as SafeParseResult } from "../types/fp.js"; import { SDKValidationError } from "./sdkvalidationerror.js"; export declare const Type: { readonly Deny: "deny"; readonly Rewrite: "rewrite"; }; export type Type = ClosedEnum<typeof Type>; export type Match = { model?: string | undefined; }; export type Action = { rewriteModel?: string | undefined; reason?: string | undefined; }; /** * Public response shape for AI Gateway routing rules. Used so OpenAPI generation can avoid ElectroDB's recursive EntityItem types. */ export type AiGatewayRule = { ownerId: string; ruleId: string; type: Type; match?: Match | undefined; action?: Action | undefined; enabled: boolean; deleted?: boolean | undefined; description?: string | undefined; createdBy?: string | undefined; updatedBy?: string | undefined; createdAt: number; updatedAt: number; }; /** @internal */ export declare const Type$inboundSchema: z.ZodNativeEnum<typeof Type>; /** @internal */ export declare const Match$inboundSchema: z.ZodType<Match, z.ZodTypeDef, unknown>; export declare function matchFromJSON(jsonString: string): SafeParseResult<Match, SDKValidationError>; /** @internal */ export declare const Action$inboundSchema: z.ZodType<Action, z.ZodTypeDef, unknown>; export declare function actionFromJSON(jsonString: string): SafeParseResult<Action, SDKValidationError>; /** @internal */ export declare const AiGatewayRule$inboundSchema: z.ZodType<AiGatewayRule, z.ZodTypeDef, unknown>; export declare function aiGatewayRuleFromJSON(jsonString: string): SafeParseResult<AiGatewayRule, SDKValidationError>; //# sourceMappingURL=aigatewayrule.d.ts.map