import * as z from "zod/v4"; import { ClosedEnum, OpenEnum } from "../types/enums.js"; /** * Must be `urn:ietf:params:oauth:grant-type:token-exchange`. */ export declare const GrantType: { readonly UrnIetfParamsOauthGrantTypeTokenExchange: "urn:ietf:params:oauth:grant-type:token-exchange"; }; /** * Must be `urn:ietf:params:oauth:grant-type:token-exchange`. */ export type GrantType = ClosedEnum; /** * Optional; when present must be `urn:ietf:params:oauth:token-type:access_token`. */ export declare const RequestedTokenType: { readonly UrnIetfParamsOauthTokenTypeAccessToken: "urn:ietf:params:oauth:token-type:access_token"; }; /** * Optional; when present must be `urn:ietf:params:oauth:token-type:access_token`. */ export type RequestedTokenType = ClosedEnum; /** * Optional; when present must match the policy's key: `management` for a management key, `inference` otherwise. */ export declare const TokenExchangeRequestScope: { readonly Inference: "inference"; readonly Management: "management"; }; /** * Optional; when present must match the policy's key: `management` for a management key, `inference` otherwise. */ export type TokenExchangeRequestScope = OpenEnum; /** * Must be `urn:ietf:params:oauth:token-type:jwt`. */ export declare const SubjectTokenType: { readonly UrnIetfParamsOauthTokenTypeJwt: "urn:ietf:params:oauth:token-type:jwt"; }; /** * Must be `urn:ietf:params:oauth:token-type:jwt`. */ export type SubjectTokenType = ClosedEnum; /** * RFC 8693 token exchange request body (application/x-www-form-urlencoded). */ export type TokenExchangeRequest = { /** * The federation policy to evaluate, from Settings → Workload identity. Binds the exchange to one organization. */ federationPolicyId: string; /** * Must be `urn:ietf:params:oauth:grant-type:token-exchange`. */ grantType: GrantType; /** * Optional; when present must be `urn:ietf:params:oauth:token-type:access_token`. */ requestedTokenType?: RequestedTokenType | undefined; /** * Optional; when present must match the policy's key: `management` for a management key, `inference` otherwise. */ scope?: TokenExchangeRequestScope | undefined; /** * The JWT issued by your identity provider. */ subjectToken: string; /** * Must be `urn:ietf:params:oauth:token-type:jwt`. */ subjectTokenType: SubjectTokenType; }; /** @internal */ export declare const GrantType$outboundSchema: z.ZodEnum; /** @internal */ export declare const RequestedTokenType$outboundSchema: z.ZodEnum; /** @internal */ export declare const TokenExchangeRequestScope$outboundSchema: z.ZodType; /** @internal */ export declare const SubjectTokenType$outboundSchema: z.ZodEnum; /** @internal */ export type TokenExchangeRequest$Outbound = { federation_policy_id: string; grant_type: string; requested_token_type?: string | undefined; scope?: string | undefined; subject_token: string; subject_token_type: string; }; /** @internal */ export declare const TokenExchangeRequest$outboundSchema: z.ZodType; export declare function tokenExchangeRequestToJSON(tokenExchangeRequest: TokenExchangeRequest): string; //# sourceMappingURL=tokenexchangerequest.d.ts.map