import * as openapi_client_axios from 'openapi-client-axios';
import { Document } from 'openapi-client-axios';
import { AxiosInstance, InternalAxiosRequestConfig, AxiosResponse } from 'axios';
import { T as TokenArg, H as HeadersConfig, A as ApiHandle } from './types-ChU9Acbv.js';
export { I as Interceptor, O as OverridesConfig, a as authorize } from './types-ChU9Acbv.js';
import { C as Client } from './access-token.d-CnmUTOlq.js';
import { C as Client$1 } from './address.d-CwAPOVxa.js';
import { C as Client$2 } from './address-suggestions.d-_YwTOR-9.js';
import { C as Client$3 } from './ai-agents.d-OkXfr2bz.js';
import { C as Client$4 } from './app.d-u7Dq42kU.js';
import { C as Client$5 } from './audit-logs.d-BRToFqeX.js';
import { C as Client$6 } from './automation.d-CzhG2m4L.js';
import { C as Client$7 } from './billing.d-Bs8Ku9qE.js';
import { C as Client$8 } from './blueprint-manifest.d-BGrGU787.js';
import { C as Client$9 } from './consent.d-C2PROHhX.js';
import { C as Client$a } from './customer-portal.d-BJNWYMt9.js';
import { C as Client$b } from './dashboard.d-CsGcA74I.js';
import { C as Client$c } from './data-governance.d-BbZ466j5.js';
import { C as Client$d } from './deduplication.d-D5GYddVu.js';
import { C as Client$e } from './design.d-DTo29S0F.js';
import { C as Client$f } from './document.d-DN37pjdx.js';
import { C as Client$g } from './email-settings.d-B7Q_xT25.js';
import { C as Client$h } from './email-template.d-gtQkdaXM.js';
import { C as Client$i } from './entity.d-ByufVI16.js';
import { C as Client$j } from './entity-mapping.d-DKSW3sfy.js';
import { C as Client$k } from './environments.d-H3LK_KuH.js';
import { C as Client$l } from './event-catalog.d-ENw6HO-w.js';
import { C as Client$m } from './file.d-DcTJxjp7.js';
import { C as Client$n } from './iban.d-BwdiGbxi.js';
import { C as Client$o } from './integration-toolkit.d-Ry-KC9ow.js';
import { C as Client$p } from './journey.d-ClXO0xK8.js';
import { C as Client$q } from './kanban.d-B99GucT_.js';
import { C as Client$r } from './message.d-D3QUkBjg.js';
import { C as Client$s } from './metering.d-DvtPv7wk.js';
import { C as Client$t } from './notes.d-BC-scR42.js';
import { C as Client$u } from './notification.d-BfBL3lga.js';
import { C as Client$v } from './organization.d-DqwnNxMg.js';
import { C as Client$w } from './partner-directory.d-BCIjHoGs.js';
import { C as Client$x } from './permissions.d-l6AT8SYP.js';
import { C as Client$y } from './pricing.d-Cv39plGm.js';
import { C as Client$z } from './pricing-tier.d-Cg0jl6n_.js';
import { C as Client$A } from './purpose.d-CbIYfTua.js';
import { C as Client$B } from './sandbox.d-BdbOFzDu.js';
import { C as Client$C } from './sharing.d-sOXq-gtz.js';
import { C as Client$D } from './submission.d-BamwfhXw.js';
import { C as Client$E } from './targeting.d-BNmcVsNS.js';
import { C as Client$F } from './template-variables.d-Ble9TSBa.js';
import { C as Client$G } from './user.d-CXqM751M.js';
import { C as Client$H } from './validation-rules.d-Db5c5zTf.js';
import { C as Client$I } from './webhooks.d-pLHIL_io.js';
import { C as Client$J } from './workflow.d-pD8ISOg-.js';
import { C as Client$K } from './workflow-definition.d-ByCJK9_x.js';

type SDKClientMap = {
    accessToken: Client;
    address: Client$1;
    addressSuggestions: Client$2;
    aiAgents: Client$3;
    app: Client$4;
    auditLogs: Client$5;
    automation: Client$6;
    billing: Client$7;
    blueprintManifest: Client$8;
    consent: Client$9;
    customerPortal: Client$a;
    dashboard: Client$b;
    dataGovernance: Client$c;
    deduplication: Client$d;
    design: Client$e;
    document: Client$f;
    emailSettings: Client$g;
    emailTemplate: Client$h;
    entity: Client$i;
    entityMapping: Client$j;
    environments: Client$k;
    eventCatalog: Client$l;
    file: Client$m;
    iban: Client$n;
    integrationToolkit: Client$o;
    journey: Client$p;
    kanban: Client$q;
    message: Client$r;
    metering: Client$s;
    notes: Client$t;
    notification: Client$u;
    organization: Client$v;
    partnerDirectory: Client$w;
    permissions: Client$x;
    pricing: Client$y;
    pricingTier: Client$z;
    purpose: Client$A;
    sandbox: Client$B;
    sharing: Client$C;
    submission: Client$D;
    targeting: Client$E;
    templateVariables: Client$F;
    user: Client$G;
    validationRules: Client$H;
    webhooks: Client$I;
    workflow: Client$J;
    workflowDefinition: Client$K;
};

type LargeResponseConfig = {
    /** Enable large response handling. Default: true */
    enabled?: boolean;
};
declare const applyLargeResponseInterceptor: (params: {
    client: AxiosInstance;
    config: LargeResponseConfig;
}) => void;

type RetryConfig = {
    /** Maximum number of retries for 429 responses. Set to 0 to disable. Default: 3 */
    maxRetries?: number;
    /** Default delay in ms when Retry-After header is missing. Default: 1000 */
    defaultDelayMs?: number;
};
declare const applyRetryInterceptor: (params: {
    client: AxiosInstance;
    config: RetryConfig;
}) => void;

type InterceptorUse = {
    request: (fulfilled: (config: InternalAxiosRequestConfig) => InternalAxiosRequestConfig | Promise<InternalAxiosRequestConfig>, rejected?: (error: unknown) => unknown) => void;
    response: (fulfilled: (response: AxiosResponse) => AxiosResponse | Promise<AxiosResponse>, rejected?: (error: unknown) => unknown) => void;
};
type EpilotSDK = {
    /** Set a Bearer token (static string or async function) for all clients */
    authorize: (token: TokenArg) => void;
    /** Set global default headers applied to all clients (e.g. x-epilot-org-id) */
    headers: (headers: HeadersConfig) => void;
    /** Register global axios interceptors applied to all clients */
    interceptors: InterceptorUse;
    /** Configure retry behavior for 429 Too Many Requests responses */
    retry: (config: RetryConfig) => void;
    /** Configure large response handling for S3-backed payloads */
    largeResponse: (config: LargeResponseConfig) => void;
    /** Get markdown docs. No args = general SDK help, with API name = API-specific docs */
    help: (apiName?: string) => Promise<string>;
    /** Get the full OpenAPI specification for an API (lazy-loaded) */
    openapi: (apiName: string) => Promise<openapi_client_axios.Document>;
} & {
    [K in keyof SDKClientMap]: ApiHandle<SDKClientMap[K]>;
} & Record<string, ApiHandle<AxiosInstance>>;
declare const createSDK: () => EpilotSDK;

/**
 * Lazy-loaded help system — returns markdown docs for SDK APIs.
 * Each doc is loaded via dynamic import() so only the requested doc affects bundle size.
 */
/**
 * Get help for a specific API or general SDK help.
 *
 * @example
 * await help()           // general SDK docs
 * await help('entity')   // entity API docs
 */
declare const help: (apiName?: string) => Promise<string>;

/**
 * Lazy-loaded OpenAPI spec — returns the full OpenAPI JSON document for an API.
 * Each spec is loaded via dynamic import() so only the requested spec affects bundle size.
 */

/**
 * Get the full OpenAPI specification for an API.
 *
 * @example
 * await openapi('entity')   // full entity OpenAPI spec
 */
declare const openapi: (apiName: string) => Promise<Document>;

declare const epilot: EpilotSDK;

export { ApiHandle, type EpilotSDK, HeadersConfig, type InterceptorUse, type LargeResponseConfig, type RetryConfig, TokenArg, applyLargeResponseInterceptor, applyRetryInterceptor, createSDK, epilot, help, openapi };
