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; email_verified: z.ZodOptional]>, boolean, "false" | "true" | boolean>>; }, "strip", z.ZodTypeAny, { sub: string; iss: string; aud: string | string[]; iat: number; exp: number; jti: string; nbf?: number | undefined; email?: string | undefined; given_name?: string | undefined; family_name?: string | undefined; role?: string | undefined; email_verified?: boolean | undefined; }, { sub: string; iss: string; aud: string | string[]; iat: number; exp: number; jti: string; nbf?: number | undefined; email?: string | undefined; given_name?: string | undefined; family_name?: string | undefined; role?: string | undefined; email_verified?: "false" | "true" | boolean | 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; requireVerifiedEmail: z.ZodOptional; expectedAudience: z.ZodOptional; allowedRoles: z.ZodOptional>; }, "strip", z.ZodTypeAny, { type: "static"; kid: string; algorithms: ("ES256" | "ES384" | "ES512" | "EdDSA" | "PS256" | "PS384" | "PS512" | "RS256" | "RS384" | "RS512")[]; key: string; issuer: string; requireVerifiedEmail?: boolean | undefined; expectedAudience?: string | undefined; allowedRoles?: string[] | undefined; }, { type: "static"; kid: string; algorithms: ("ES256" | "ES384" | "ES512" | "EdDSA" | "PS256" | "PS384" | "PS512" | "RS256" | "RS384" | "RS512")[]; key: string; issuer: string; requireVerifiedEmail?: boolean | undefined; expectedAudience?: string | undefined; allowedRoles?: string[] | undefined; }>, z.ZodObject<{ type: z.ZodLiteral<"jwks">; url: z.ZodString; issuer: z.ZodString; requireVerifiedEmail: z.ZodOptional; expectedAudience: z.ZodOptional; allowedRoles: z.ZodOptional>; cacheTtlSeconds: z.ZodOptional; }, "strip", z.ZodTypeAny, { type: "jwks"; url: string; issuer: string; requireVerifiedEmail?: boolean | undefined; expectedAudience?: string | undefined; allowedRoles?: string[] | undefined; cacheTtlSeconds?: number | undefined; }, { type: "jwks"; url: string; issuer: string; requireVerifiedEmail?: boolean | undefined; 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; requireVerifiedEmail: z.ZodOptional; }, "strip", z.ZodTypeAny, { algorithms: ("ES256" | "ES384" | "ES512" | "EdDSA" | "PS256" | "PS384" | "PS512" | "RS256" | "RS384" | "RS512")[]; keyMaterial: string; issuer: string; expectedAudience?: string | undefined; allowedRoles?: string[] | undefined; expiresAt?: string | undefined; requireVerifiedEmail?: boolean | undefined; }, { algorithms: ("ES256" | "ES384" | "ES512" | "EdDSA" | "PS256" | "PS384" | "PS512" | "RS256" | "RS384" | "RS512")[]; keyMaterial: string; issuer: string; expectedAudience?: string | undefined; allowedRoles?: string[] | undefined; expiresAt?: string | undefined; requireVerifiedEmail?: boolean | undefined; }>; export type TrustedKeyData = z.infer; export interface ResolvedTrustedKey { kid: string; algorithms: JwtAlgorithm[]; key: Secret; issuer: string; expectedAudience?: string; allowedRoles?: string[]; requireVerifiedEmail: boolean; } 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; 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; resource?: string | undefined; }, { grant_type: "urn:ietf:params:oauth:grant-type:token-exchange"; subject_token: string; 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; resource?: string | undefined; }>; export type TokenExchangeRequest = z.infer;