import * as z from "zod/v3";
import { Result as SafeParseResult } from "../types/fp.js";
import { SDKValidationError } from "./sdkvalidationerror.js";
export type ExchangeSsoTokenRequestBody2 = {
    /**
     * The refresh token received from previous token exchange
     */
    refreshToken: string;
    /**
     * The integration client id
     */
    clientId: string;
    /**
     * The integration client secret
     */
    clientSecret: string;
    /**
     * The grant type, when using x-www-form-urlencoded content type
     */
    grantType: "refresh_token";
};
export type ExchangeSsoTokenRequestBody1 = {
    /**
     * The sensitive code received from Vercel
     */
    code: string;
    /**
     * The state received from the initialization request
     */
    state?: string | undefined;
    /**
     * The integration client id
     */
    clientId: string;
    /**
     * The integration client secret
     */
    clientSecret: string;
    /**
     * The integration redirect URI
     */
    redirectUri?: string | undefined;
    /**
     * The grant type, when using x-www-form-urlencoded content type
     */
    grantType: "authorization_code";
};
export type ExchangeSsoTokenRequestBody = ExchangeSsoTokenRequestBody1 | ExchangeSsoTokenRequestBody2;
export type ExchangeSsoTokenResponseBody2 = {
    idToken: string;
    tokenType: string;
    accessToken: string;
    refreshToken: string;
    expiresIn: number;
};
export type ExchangeSsoTokenResponseBody1 = {
    idToken: string;
    tokenType: string | null;
    expiresIn?: number | undefined;
    accessToken: string | null;
    refreshToken?: string | undefined;
};
export type ExchangeSsoTokenResponseBody = ExchangeSsoTokenResponseBody2 | ExchangeSsoTokenResponseBody1;
/** @internal */
export type ExchangeSsoTokenRequestBody2$Outbound = {
    refresh_token: string;
    client_id: string;
    client_secret: string;
    grant_type: "refresh_token";
};
/** @internal */
export declare const ExchangeSsoTokenRequestBody2$outboundSchema: z.ZodType<ExchangeSsoTokenRequestBody2$Outbound, z.ZodTypeDef, ExchangeSsoTokenRequestBody2>;
export declare function exchangeSsoTokenRequestBody2ToJSON(exchangeSsoTokenRequestBody2: ExchangeSsoTokenRequestBody2): string;
/** @internal */
export type ExchangeSsoTokenRequestBody1$Outbound = {
    code: string;
    state?: string | undefined;
    client_id: string;
    client_secret: string;
    redirect_uri?: string | undefined;
    grant_type: "authorization_code";
};
/** @internal */
export declare const ExchangeSsoTokenRequestBody1$outboundSchema: z.ZodType<ExchangeSsoTokenRequestBody1$Outbound, z.ZodTypeDef, ExchangeSsoTokenRequestBody1>;
export declare function exchangeSsoTokenRequestBody1ToJSON(exchangeSsoTokenRequestBody1: ExchangeSsoTokenRequestBody1): string;
/** @internal */
export type ExchangeSsoTokenRequestBody$Outbound = ExchangeSsoTokenRequestBody1$Outbound | ExchangeSsoTokenRequestBody2$Outbound;
/** @internal */
export declare const ExchangeSsoTokenRequestBody$outboundSchema: z.ZodType<ExchangeSsoTokenRequestBody$Outbound, z.ZodTypeDef, ExchangeSsoTokenRequestBody>;
export declare function exchangeSsoTokenRequestBodyToJSON(exchangeSsoTokenRequestBody: ExchangeSsoTokenRequestBody): string;
/** @internal */
export declare const ExchangeSsoTokenResponseBody2$inboundSchema: z.ZodType<ExchangeSsoTokenResponseBody2, z.ZodTypeDef, unknown>;
export declare function exchangeSsoTokenResponseBody2FromJSON(jsonString: string): SafeParseResult<ExchangeSsoTokenResponseBody2, SDKValidationError>;
/** @internal */
export declare const ExchangeSsoTokenResponseBody1$inboundSchema: z.ZodType<ExchangeSsoTokenResponseBody1, z.ZodTypeDef, unknown>;
export declare function exchangeSsoTokenResponseBody1FromJSON(jsonString: string): SafeParseResult<ExchangeSsoTokenResponseBody1, SDKValidationError>;
/** @internal */
export declare const ExchangeSsoTokenResponseBody$inboundSchema: z.ZodType<ExchangeSsoTokenResponseBody, z.ZodTypeDef, unknown>;
export declare function exchangeSsoTokenResponseBodyFromJSON(jsonString: string): SafeParseResult<ExchangeSsoTokenResponseBody, SDKValidationError>;
//# sourceMappingURL=exchangessotokenop.d.ts.map