import type { Secret } from 'jsonwebtoken'; import { z } from 'zod'; export declare const TOKEN_EXCHANGE_GRANT_TYPE: "urn:ietf:params:oauth:grant-type:token-exchange"; export declare const JwtAlgorithmSchema: z.ZodEnum<["RS256", "RS384", "RS512", "ES256", "ES384", "ES512", "PS256", "PS384", "PS512", "EdDSA"]>; export declare const ExternalTokenClaimsSchema: z.ZodObject<{ sub: z.ZodString; iss: z.ZodString; aud: z.ZodUnion<[z.ZodString, z.ZodArray]>; iat: z.ZodNumber; exp: z.ZodNumber; jti: z.ZodString; nbf: z.ZodOptional; email: z.ZodOptional; given_name: z.ZodOptional; family_name: z.ZodOptional; role: z.ZodOptional; }, "strip", z.ZodTypeAny, { sub: string; exp: number; iss: string; aud: string | string[]; iat: number; jti: string; email?: string | undefined; role?: string | undefined; nbf?: number | undefined; given_name?: string | undefined; family_name?: string | undefined; }, { sub: string; exp: number; iss: string; aud: string | string[]; iat: number; jti: string; email?: string | undefined; role?: string | undefined; nbf?: number | undefined; given_name?: string | undefined; family_name?: string | undefined; }>; export type ExternalTokenClaims = z.infer; export declare const TrustedKeySourceSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{ type: z.ZodLiteral<"static">; kid: z.ZodString; algorithms: z.ZodArray, "many">; key: z.ZodString; issuer: z.ZodString; expectedAudience: z.ZodOptional; allowedRoles: z.ZodOptional>; }, "strip", z.ZodTypeAny, { key: string; type: "static"; issuer: string; kid: string; algorithms: ("RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES512" | "PS256" | "PS384" | "PS512" | "EdDSA")[]; expectedAudience?: string | undefined; allowedRoles?: string[] | undefined; }, { key: string; type: "static"; issuer: string; kid: string; algorithms: ("RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES512" | "PS256" | "PS384" | "PS512" | "EdDSA")[]; expectedAudience?: string | undefined; allowedRoles?: string[] | undefined; }>, z.ZodObject<{ type: z.ZodLiteral<"jwks">; url: z.ZodString; issuer: z.ZodString; expectedAudience: z.ZodOptional; allowedRoles: z.ZodOptional>; cacheTtlSeconds: z.ZodOptional; }, "strip", z.ZodTypeAny, { url: string; type: "jwks"; issuer: string; expectedAudience?: string | undefined; allowedRoles?: string[] | undefined; cacheTtlSeconds?: number | undefined; }, { url: string; type: "jwks"; issuer: string; expectedAudience?: string | undefined; allowedRoles?: string[] | undefined; cacheTtlSeconds?: number | undefined; }>]>; export type TrustedKeySource = z.infer; export type StaticKeySource = Extract; export type JwksKeySource = Extract; export type JwtAlgorithm = z.infer; export type TrustedKeySourceType = 'static' | 'jwks'; export type TrustedKeySourceStatus = 'pending' | 'healthy' | 'error'; export declare const TrustedKeyDataSchema: z.ZodObject<{ algorithms: z.ZodArray, "many">; keyMaterial: z.ZodString; issuer: z.ZodString; expectedAudience: z.ZodOptional; allowedRoles: z.ZodOptional>; expiresAt: z.ZodOptional; }, "strip", z.ZodTypeAny, { issuer: string; algorithms: ("RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES512" | "PS256" | "PS384" | "PS512" | "EdDSA")[]; keyMaterial: string; expiresAt?: string | undefined; expectedAudience?: string | undefined; allowedRoles?: string[] | undefined; }, { issuer: string; algorithms: ("RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES512" | "PS256" | "PS384" | "PS512" | "EdDSA")[]; keyMaterial: string; expiresAt?: string | undefined; expectedAudience?: string | undefined; allowedRoles?: string[] | undefined; }>; export type TrustedKeyData = z.infer; export interface ResolvedTrustedKey { kid: string; algorithms: JwtAlgorithm[]; key: Secret; issuer: string; expectedAudience?: string; allowedRoles?: string[]; } export declare const TokenExchangeRequestSchema: z.ZodObject<{ grant_type: z.ZodLiteral<"urn:ietf:params:oauth:grant-type:token-exchange">; subject_token: z.ZodString; subject_token_type: z.ZodOptional; actor_token: z.ZodOptional; actor_token_type: z.ZodOptional; requested_token_type: z.ZodOptional; scope: z.ZodOptional; audience: z.ZodOptional; resource: z.ZodOptional; }, "strip", z.ZodTypeAny, { grant_type: "urn:ietf:params:oauth:grant-type:token-exchange"; subject_token: string; resource?: string | undefined; subject_token_type?: string | undefined; actor_token?: string | undefined; actor_token_type?: string | undefined; requested_token_type?: string | undefined; scope?: string | undefined; audience?: string | undefined; }, { grant_type: "urn:ietf:params:oauth:grant-type:token-exchange"; subject_token: string; resource?: string | undefined; subject_token_type?: string | undefined; actor_token?: string | undefined; actor_token_type?: string | undefined; requested_token_type?: string | undefined; scope?: string | undefined; audience?: string | undefined; }>; export type TokenExchangeRequest = z.infer;