/**
 * Credentials type definitions
 *
 * The credentials system provides a unified way to authenticate with Zapier APIs.
 * It supports multiple credential types:
 * - String: A token (JWT or API key) used directly
 * - Client credentials: OAuth client ID + secret exchanged for a token
 * - PKCE: OAuth client ID for interactive login (CLI only)
 * - Function: Lazy/dynamic credential resolution
 */
import { z } from "zod";
/**
 * Client credentials for OAuth client_credentials flow.
 * The SDK will exchange these for an access token.
 */
export declare const ClientCredentialsObjectSchema: z.ZodObject<{
    type: z.ZodOptional<z.ZodEnum<{
        client_credentials: "client_credentials";
    }>>;
    clientId: z.ZodString;
    clientSecret: z.ZodString;
    baseUrl: z.ZodOptional<z.ZodString>;
    scope: z.ZodOptional<z.ZodString>;
}, z.core.$strip>;
export type ClientCredentialsObject = z.infer<typeof ClientCredentialsObjectSchema>;
/**
 * PKCE credentials for interactive OAuth flow.
 * Only works when @zapier/zapier-sdk-cli is installed (the SDK dynamically
 * imports its `./login` entry point).
 */
export declare const PkceCredentialsObjectSchema: z.ZodObject<{
    type: z.ZodOptional<z.ZodEnum<{
        pkce: "pkce";
    }>>;
    clientId: z.ZodString;
    baseUrl: z.ZodOptional<z.ZodString>;
    scope: z.ZodOptional<z.ZodString>;
}, z.core.$strip>;
export type PkceCredentialsObject = z.infer<typeof PkceCredentialsObjectSchema>;
/**
 * Union of all credential object types.
 */
export declare const CredentialsObjectSchema: z.ZodUnion<readonly [z.ZodObject<{
    type: z.ZodOptional<z.ZodEnum<{
        client_credentials: "client_credentials";
    }>>;
    clientId: z.ZodString;
    clientSecret: z.ZodString;
    baseUrl: z.ZodOptional<z.ZodString>;
    scope: z.ZodOptional<z.ZodString>;
}, z.core.$strip>, z.ZodObject<{
    type: z.ZodOptional<z.ZodEnum<{
        pkce: "pkce";
    }>>;
    clientId: z.ZodString;
    baseUrl: z.ZodOptional<z.ZodString>;
    scope: z.ZodOptional<z.ZodString>;
}, z.core.$strip>]>;
export type CredentialsObject = z.infer<typeof CredentialsObjectSchema>;
/**
 * Resolved credentials - what a credentials function must return.
 * Either a string (token) or a credentials object.
 * Functions are not allowed to return other functions.
 */
export declare const ResolvedCredentialsSchema: z.ZodUnion<readonly [z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
    type: z.ZodOptional<z.ZodEnum<{
        client_credentials: "client_credentials";
    }>>;
    clientId: z.ZodString;
    clientSecret: z.ZodString;
    baseUrl: z.ZodOptional<z.ZodString>;
    scope: z.ZodOptional<z.ZodString>;
}, z.core.$strip>, z.ZodObject<{
    type: z.ZodOptional<z.ZodEnum<{
        pkce: "pkce";
    }>>;
    clientId: z.ZodString;
    baseUrl: z.ZodOptional<z.ZodString>;
    scope: z.ZodOptional<z.ZodString>;
}, z.core.$strip>]>]>;
export type ResolvedCredentials = z.infer<typeof ResolvedCredentialsSchema>;
/**
 * Lazy/dynamic credential resolution — a function returning resolved credentials.
 */
export declare const CredentialsFunctionSchema: z.ZodFunction<z.core.$ZodTuple<readonly [], z.core.$ZodFunctionOut>, z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
    type: z.ZodOptional<z.ZodEnum<{
        client_credentials: "client_credentials";
    }>>;
    clientId: z.ZodString;
    clientSecret: z.ZodString;
    baseUrl: z.ZodOptional<z.ZodString>;
    scope: z.ZodOptional<z.ZodString>;
}, z.core.$strip>, z.ZodObject<{
    type: z.ZodOptional<z.ZodEnum<{
        pkce: "pkce";
    }>>;
    clientId: z.ZodString;
    baseUrl: z.ZodOptional<z.ZodString>;
    scope: z.ZodOptional<z.ZodString>;
}, z.core.$strip>]>]>, z.ZodPromise<z.ZodUnion<readonly [z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
    type: z.ZodOptional<z.ZodEnum<{
        client_credentials: "client_credentials";
    }>>;
    clientId: z.ZodString;
    clientSecret: z.ZodString;
    baseUrl: z.ZodOptional<z.ZodString>;
    scope: z.ZodOptional<z.ZodString>;
}, z.core.$strip>, z.ZodObject<{
    type: z.ZodOptional<z.ZodEnum<{
        pkce: "pkce";
    }>>;
    clientId: z.ZodString;
    baseUrl: z.ZodOptional<z.ZodString>;
    scope: z.ZodOptional<z.ZodString>;
}, z.core.$strip>]>]>>]>>;
export type CredentialsFunction = z.infer<typeof CredentialsFunctionSchema>;
/**
 * Credentials can be:
 * - A string (token or API key)
 * - A credentials object (client_credentials or pkce)
 * - A function that returns credentials (sync or async)
 */
export declare const CredentialsSchema: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
    type: z.ZodOptional<z.ZodEnum<{
        client_credentials: "client_credentials";
    }>>;
    clientId: z.ZodString;
    clientSecret: z.ZodString;
    baseUrl: z.ZodOptional<z.ZodString>;
    scope: z.ZodOptional<z.ZodString>;
}, z.core.$strip>, z.ZodObject<{
    type: z.ZodOptional<z.ZodEnum<{
        pkce: "pkce";
    }>>;
    clientId: z.ZodString;
    baseUrl: z.ZodOptional<z.ZodString>;
    scope: z.ZodOptional<z.ZodString>;
}, z.core.$strip>]>]>, z.ZodFunction<z.core.$ZodTuple<readonly [], z.core.$ZodFunctionOut>, z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
    type: z.ZodOptional<z.ZodEnum<{
        client_credentials: "client_credentials";
    }>>;
    clientId: z.ZodString;
    clientSecret: z.ZodString;
    baseUrl: z.ZodOptional<z.ZodString>;
    scope: z.ZodOptional<z.ZodString>;
}, z.core.$strip>, z.ZodObject<{
    type: z.ZodOptional<z.ZodEnum<{
        pkce: "pkce";
    }>>;
    clientId: z.ZodString;
    baseUrl: z.ZodOptional<z.ZodString>;
    scope: z.ZodOptional<z.ZodString>;
}, z.core.$strip>]>]>, z.ZodPromise<z.ZodUnion<readonly [z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
    type: z.ZodOptional<z.ZodEnum<{
        client_credentials: "client_credentials";
    }>>;
    clientId: z.ZodString;
    clientSecret: z.ZodString;
    baseUrl: z.ZodOptional<z.ZodString>;
    scope: z.ZodOptional<z.ZodString>;
}, z.core.$strip>, z.ZodObject<{
    type: z.ZodOptional<z.ZodEnum<{
        pkce: "pkce";
    }>>;
    clientId: z.ZodString;
    baseUrl: z.ZodOptional<z.ZodString>;
    scope: z.ZodOptional<z.ZodString>;
}, z.core.$strip>]>]>>]>>]>;
export type Credentials = z.infer<typeof CredentialsSchema>;
/**
 * Type guard for client credentials objects.
 */
export declare function isClientCredentials(credentials: ResolvedCredentials): credentials is ClientCredentialsObject;
/**
 * Type guard for PKCE credentials objects.
 */
export declare function isPkceCredentials(credentials: ResolvedCredentials): credentials is PkceCredentialsObject;
/**
 * Type guard for credentials objects (either type).
 */
export declare function isCredentialsObject(credentials: ResolvedCredentials): credentials is CredentialsObject;
/**
 * Type guard for credentials functions.
 */
export declare function isCredentialsFunction(credentials: Credentials): credentials is CredentialsFunction;
//# sourceMappingURL=credentials.d.ts.map