import * as z from "zod/v3"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type ExchangeApiKeyTokenRequestBody = { /** * JWT audience (aud) claim for the exchanged token. Set this to the target API/service URL that should accept the token. */ audience: string; /** * Your external user identifier to place in the JWT subject (sub) claim. Must be 1–150 printable-ASCII characters and not the wildcard `*`. */ externalUserId: string; /** * Token lifetime in seconds. Must be between 300 (5 minutes) and 2592000 (30 days). Defaults to 3600 (1 hour). */ expiresIn?: number | undefined; /** * Optional subset of the API key's scopes to embed in the token (e.g. read:responses). The exchanged token is attenuated to this set at the gateway perimeter. If omitted, all of the key's scopes are embedded (no attenuation). */ permissions?: Array | undefined; }; export type ExchangeApiKeyTokenRequest = { /** * Optional external end-user identifier forwarded by the API gateway. */ xOnBehalfOf?: string | undefined; requestBody: ExchangeApiKeyTokenRequestBody; }; /** * Signed JWT */ export type ExchangeApiKeyTokenResponseBody = { /** * Signed JWT exchange token to use when calling downstream services. */ token: string; }; /** @internal */ export declare const ExchangeApiKeyTokenRequestBody$inboundSchema: z.ZodType; /** @internal */ export type ExchangeApiKeyTokenRequestBody$Outbound = { audience: string; externalUserId: string; expiresIn: number; permissions?: Array | undefined; }; /** @internal */ export declare const ExchangeApiKeyTokenRequestBody$outboundSchema: z.ZodType; export declare function exchangeApiKeyTokenRequestBodyToJSON(exchangeApiKeyTokenRequestBody: ExchangeApiKeyTokenRequestBody): string; export declare function exchangeApiKeyTokenRequestBodyFromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const ExchangeApiKeyTokenRequest$inboundSchema: z.ZodType; /** @internal */ export type ExchangeApiKeyTokenRequest$Outbound = { "X-On-Behalf-Of"?: string | undefined; RequestBody: ExchangeApiKeyTokenRequestBody$Outbound; }; /** @internal */ export declare const ExchangeApiKeyTokenRequest$outboundSchema: z.ZodType; export declare function exchangeApiKeyTokenRequestToJSON(exchangeApiKeyTokenRequest: ExchangeApiKeyTokenRequest): string; export declare function exchangeApiKeyTokenRequestFromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const ExchangeApiKeyTokenResponseBody$inboundSchema: z.ZodType; /** @internal */ export type ExchangeApiKeyTokenResponseBody$Outbound = { token: string; }; /** @internal */ export declare const ExchangeApiKeyTokenResponseBody$outboundSchema: z.ZodType; export declare function exchangeApiKeyTokenResponseBodyToJSON(exchangeApiKeyTokenResponseBody: ExchangeApiKeyTokenResponseBody): string; export declare function exchangeApiKeyTokenResponseBodyFromJSON(jsonString: string): SafeParseResult; //# sourceMappingURL=exchangeapikeytoken.d.ts.map