import * as z from "zod/v3";
import { ClosedEnum } from "../types/enums.js";
import { Result as SafeParseResult } from "../types/fp.js";
import { SDKValidationError } from "./sdkvalidationerror.js";
export type TypeOther = {
    type: string;
    additionalProperties?: {
        [k: string]: any;
    } | undefined;
};
export declare const GetConnectorTokenSubjectConnectRequestType: {
    readonly JwtBearer: "jwt-bearer";
};
export type GetConnectorTokenSubjectConnectRequestType = ClosedEnum<typeof GetConnectorTokenSubjectConnectRequestType>;
export type TypeJwtBearer = {
    type: GetConnectorTokenSubjectConnectRequestType;
    sub?: string | undefined;
    iss?: string | undefined;
    aud?: string | undefined;
    additionalClaims?: {
        [k: string]: any;
    } | undefined;
    additionalProperties?: {
        [k: string]: any;
    } | undefined;
};
export declare const GetConnectorTokenSubjectConnectType: {
    readonly User: "user";
};
export type GetConnectorTokenSubjectConnectType = ClosedEnum<typeof GetConnectorTokenSubjectConnectType>;
export type TypeUser = {
    type: GetConnectorTokenSubjectConnectType;
    id?: string | undefined;
    issuer?: string | undefined;
    additionalProperties?: {
        [k: string]: any;
    } | undefined;
};
export declare const GetConnectorTokenSubjectType: {
    readonly App: "app";
};
export type GetConnectorTokenSubjectType = ClosedEnum<typeof GetConnectorTokenSubjectType>;
export type TypeApp = {
    type: GetConnectorTokenSubjectType;
    additionalProperties?: {
        [k: string]: any;
    } | undefined;
};
export type Subject = TypeApp | TypeUser | TypeJwtBearer | TypeOther;
export type AuthorizationDetails = {
    type?: string | undefined;
    additionalProperties?: {
        [k: string]: any;
    } | undefined;
};
export type GetConnectorTokenRequestBody = {
    subject?: TypeApp | TypeUser | TypeJwtBearer | TypeOther | undefined;
    installationId?: string | undefined;
    audience?: Array<string> | undefined;
    scopes?: Array<string> | undefined;
    resources?: Array<string> | undefined;
    authorizationDetails?: Array<AuthorizationDetails> | undefined;
    validityBufferMs?: number | undefined;
};
export type GetConnectorTokenRequest = {
    connector: string;
    requestBody?: GetConnectorTokenRequestBody | undefined;
};
export type Connector = {
    id: string;
    uid: string;
    type: string;
};
export type GetConnectorTokenResponseBody = {
    token: string;
    expiresAt: number;
    connector: Connector;
    name?: string | undefined;
    installationId?: string | undefined;
    tenantId?: string | undefined;
    externalSubject?: string | undefined;
    /**
     * Driver-specific metadata (e.g., botUserId for Slack).
     */
    metadata?: {
        [k: string]: any;
    } | undefined;
};
/** @internal */
export type TypeOther$Outbound = {
    type: string;
    [additionalProperties: string]: unknown;
};
/** @internal */
export declare const TypeOther$outboundSchema: z.ZodType<TypeOther$Outbound, z.ZodTypeDef, TypeOther>;
export declare function typeOtherToJSON(typeOther: TypeOther): string;
/** @internal */
export declare const GetConnectorTokenSubjectConnectRequestType$outboundSchema: z.ZodNativeEnum<typeof GetConnectorTokenSubjectConnectRequestType>;
/** @internal */
export type TypeJwtBearer$Outbound = {
    type: string;
    sub?: string | undefined;
    iss?: string | undefined;
    aud?: string | undefined;
    additionalClaims?: {
        [k: string]: any;
    } | undefined;
    [additionalProperties: string]: unknown;
};
/** @internal */
export declare const TypeJwtBearer$outboundSchema: z.ZodType<TypeJwtBearer$Outbound, z.ZodTypeDef, TypeJwtBearer>;
export declare function typeJwtBearerToJSON(typeJwtBearer: TypeJwtBearer): string;
/** @internal */
export declare const GetConnectorTokenSubjectConnectType$outboundSchema: z.ZodNativeEnum<typeof GetConnectorTokenSubjectConnectType>;
/** @internal */
export type TypeUser$Outbound = {
    type: string;
    id?: string | undefined;
    issuer?: string | undefined;
    [additionalProperties: string]: unknown;
};
/** @internal */
export declare const TypeUser$outboundSchema: z.ZodType<TypeUser$Outbound, z.ZodTypeDef, TypeUser>;
export declare function typeUserToJSON(typeUser: TypeUser): string;
/** @internal */
export declare const GetConnectorTokenSubjectType$outboundSchema: z.ZodNativeEnum<typeof GetConnectorTokenSubjectType>;
/** @internal */
export type TypeApp$Outbound = {
    type: string;
    [additionalProperties: string]: unknown;
};
/** @internal */
export declare const TypeApp$outboundSchema: z.ZodType<TypeApp$Outbound, z.ZodTypeDef, TypeApp>;
export declare function typeAppToJSON(typeApp: TypeApp): string;
/** @internal */
export type Subject$Outbound = TypeApp$Outbound | TypeUser$Outbound | TypeJwtBearer$Outbound | TypeOther$Outbound;
/** @internal */
export declare const Subject$outboundSchema: z.ZodType<Subject$Outbound, z.ZodTypeDef, Subject>;
export declare function subjectToJSON(subject: Subject): string;
/** @internal */
export type AuthorizationDetails$Outbound = {
    type?: string | undefined;
    [additionalProperties: string]: unknown;
};
/** @internal */
export declare const AuthorizationDetails$outboundSchema: z.ZodType<AuthorizationDetails$Outbound, z.ZodTypeDef, AuthorizationDetails>;
export declare function authorizationDetailsToJSON(authorizationDetails: AuthorizationDetails): string;
/** @internal */
export type GetConnectorTokenRequestBody$Outbound = {
    subject?: TypeApp$Outbound | TypeUser$Outbound | TypeJwtBearer$Outbound | TypeOther$Outbound | undefined;
    installationId?: string | undefined;
    audience?: Array<string> | undefined;
    scopes?: Array<string> | undefined;
    resources?: Array<string> | undefined;
    authorizationDetails?: Array<AuthorizationDetails$Outbound> | undefined;
    validityBufferMs?: number | undefined;
};
/** @internal */
export declare const GetConnectorTokenRequestBody$outboundSchema: z.ZodType<GetConnectorTokenRequestBody$Outbound, z.ZodTypeDef, GetConnectorTokenRequestBody>;
export declare function getConnectorTokenRequestBodyToJSON(getConnectorTokenRequestBody: GetConnectorTokenRequestBody): string;
/** @internal */
export type GetConnectorTokenRequest$Outbound = {
    connector: string;
    RequestBody?: GetConnectorTokenRequestBody$Outbound | undefined;
};
/** @internal */
export declare const GetConnectorTokenRequest$outboundSchema: z.ZodType<GetConnectorTokenRequest$Outbound, z.ZodTypeDef, GetConnectorTokenRequest>;
export declare function getConnectorTokenRequestToJSON(getConnectorTokenRequest: GetConnectorTokenRequest): string;
/** @internal */
export declare const Connector$inboundSchema: z.ZodType<Connector, z.ZodTypeDef, unknown>;
export declare function connectorFromJSON(jsonString: string): SafeParseResult<Connector, SDKValidationError>;
/** @internal */
export declare const GetConnectorTokenResponseBody$inboundSchema: z.ZodType<GetConnectorTokenResponseBody, z.ZodTypeDef, unknown>;
export declare function getConnectorTokenResponseBodyFromJSON(jsonString: string): SafeParseResult<GetConnectorTokenResponseBody, SDKValidationError>;
//# sourceMappingURL=getconnectortokenop.d.ts.map