import * as zod from 'zod';
import { z } from 'zod';
import { ConnectionSchema, ConnectionsResponseSchema, GetConnectionResponse } from '@zapier/zapier-sdk-core/v0/schemas/connections';
import { RequestContext } from '@zapier/policy-context';
import * as zod_v4_core from 'zod/v4/core';

declare const AppItemSchema: z.ZodObject<{
    description: z.ZodOptional<z.ZodString>;
    is_hidden: z.ZodOptional<z.ZodBoolean>;
    auth_type: z.ZodOptional<z.ZodString>;
    actions: z.ZodOptional<z.ZodObject<{
        read: z.ZodOptional<z.ZodNumber>;
        read_bulk: z.ZodOptional<z.ZodNumber>;
        write: z.ZodOptional<z.ZodNumber>;
        search: z.ZodOptional<z.ZodNumber>;
        search_or_write: z.ZodOptional<z.ZodNumber>;
        search_and_write: z.ZodOptional<z.ZodNumber>;
        filter: z.ZodOptional<z.ZodNumber>;
    }, z.core.$strip>>;
    is_deprecated: z.ZodOptional<z.ZodBoolean>;
    is_beta: z.ZodOptional<z.ZodBoolean>;
    is_premium: z.ZodOptional<z.ZodBoolean>;
    slug: z.ZodString;
    age_in_days: z.ZodOptional<z.ZodNumber>;
    banner: z.ZodOptional<z.ZodString>;
    categories: z.ZodOptional<z.ZodArray<z.ZodObject<{
        id: z.ZodNumber;
        name: z.ZodString;
        slug: z.ZodString;
    }, z.core.$strip>>>;
    images: z.ZodOptional<z.ZodObject<{
        url_16x16: z.ZodOptional<z.ZodString>;
        url_32x32: z.ZodOptional<z.ZodString>;
        url_64x64: z.ZodOptional<z.ZodString>;
        url_128x128: z.ZodOptional<z.ZodString>;
    }, z.core.$strip>>;
    popularity: z.ZodOptional<z.ZodNumber>;
    has_filters: z.ZodOptional<z.ZodBoolean>;
    has_reads: z.ZodOptional<z.ZodBoolean>;
    has_searches: z.ZodOptional<z.ZodBoolean>;
    has_searches_or_writes: z.ZodOptional<z.ZodBoolean>;
    has_upfront_fields: z.ZodOptional<z.ZodBoolean>;
    has_writes: z.ZodOptional<z.ZodBoolean>;
    is_built_in: z.ZodOptional<z.ZodBoolean>;
    is_featured: z.ZodOptional<z.ZodBoolean>;
    is_invite: z.ZodOptional<z.ZodBoolean>;
    is_public: z.ZodOptional<z.ZodBoolean>;
    is_upcoming: z.ZodOptional<z.ZodBoolean>;
    visibility: z.ZodOptional<z.ZodString>;
    primary_color: z.ZodOptional<z.ZodString>;
    secondary_color: z.ZodOptional<z.ZodString>;
    classification: z.ZodOptional<z.ZodString>;
    api_docs_url: z.ZodOptional<z.ZodString>;
    image: z.ZodOptional<z.ZodString>;
    title: z.ZodString;
    key: z.ZodString;
    implementation_id: z.ZodString;
    version: z.ZodOptional<z.ZodString>;
}, z.core.$strip>;

declare const ConnectionItemSchema: z.ZodObject<{
    title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
    date: z.ZodString;
    is_invite_only: z.ZodBoolean;
    lastchanged: z.ZodOptional<z.ZodString>;
    destination_selected_api: z.ZodOptional<z.ZodNullable<z.ZodString>>;
    is_private: z.ZodBoolean;
    shared_with_all: z.ZodBoolean;
    is_stale: z.ZodOptional<z.ZodString>;
    is_shared: z.ZodOptional<z.ZodString>;
    marked_stale_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
    label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
    identifier: z.ZodOptional<z.ZodNullable<z.ZodString>>;
    url: z.ZodOptional<z.ZodString>;
    groups: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
    members: z.ZodOptional<z.ZodString>;
    permissions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodBoolean>>;
    public_id: z.ZodOptional<z.ZodString>;
    account_public_id: z.ZodOptional<z.ZodString>;
    customuser_public_id: z.ZodOptional<z.ZodString>;
    id: z.ZodString;
    account_id: z.ZodString;
    implementation_id: z.ZodOptional<z.ZodString>;
    profile_id: z.ZodOptional<z.ZodString>;
    is_expired: z.ZodOptional<z.ZodString>;
    expired_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
    app_key: z.ZodOptional<z.ZodString>;
    app_version: z.ZodOptional<z.ZodString>;
}, z.core.$strip>;

declare const ActionItemSchema: z.ZodObject<{
    description: z.ZodString;
    is_hidden: z.ZodOptional<z.ZodBoolean>;
    key: z.ZodString;
    id: z.ZodOptional<z.ZodString>;
    is_important: z.ZodOptional<z.ZodBoolean>;
    app_key: z.ZodString;
    app_version: z.ZodOptional<z.ZodString>;
    action_type: z.ZodEnum<{
        read: "read";
        read_bulk: "read_bulk";
        write: "write";
        search: "search";
        search_or_write: "search_or_write";
        search_and_write: "search_and_write";
        filter: "filter";
        run: "run";
    }>;
    title: z.ZodString;
    type: z.ZodLiteral<"action">;
}, z.core.$strip>;

declare const InputFieldItemSchema: z.ZodObject<{
    key: z.ZodString;
    type: z.ZodLiteral<"input_field">;
    default_value: z.ZodString;
    depends_on: z.ZodArray<z.ZodString>;
    description: z.ZodString;
    invalidates_input_fields: z.ZodBoolean;
    is_required: z.ZodBoolean;
    placeholder: z.ZodString;
    title: z.ZodString;
    value_type: z.ZodString;
    format: z.ZodOptional<z.ZodString>;
    items: z.ZodOptional<z.ZodObject<{
        type: z.ZodString;
    }, z.core.$strip>>;
}, z.core.$strip>;
declare const InfoFieldItemSchema: z.ZodObject<{
    key: z.ZodString;
    type: z.ZodLiteral<"info_field">;
    description: z.ZodString;
    title: z.ZodOptional<z.ZodString>;
}, z.core.$strip>;
type FieldsetItemType = z.infer<typeof InputFieldItemSchema> | z.infer<typeof InfoFieldItemSchema> | FieldsetItem;
interface FieldsetItem {
    type: "fieldset";
    key: string;
    title: string;
    fields: FieldsetItemType[];
}
declare const RootFieldItemSchema: z.ZodUnion<readonly [z.ZodObject<{
    key: z.ZodString;
    type: z.ZodLiteral<"input_field">;
    default_value: z.ZodString;
    depends_on: z.ZodArray<z.ZodString>;
    description: z.ZodString;
    invalidates_input_fields: z.ZodBoolean;
    is_required: z.ZodBoolean;
    placeholder: z.ZodString;
    title: z.ZodString;
    value_type: z.ZodString;
    format: z.ZodOptional<z.ZodString>;
    items: z.ZodOptional<z.ZodObject<{
        type: z.ZodString;
    }, z.core.$strip>>;
}, z.core.$strip>, z.ZodObject<{
    key: z.ZodString;
    type: z.ZodLiteral<"info_field">;
    description: z.ZodString;
    title: z.ZodOptional<z.ZodString>;
}, z.core.$strip>, z.ZodType<FieldsetItem, unknown, z.core.$ZodTypeInternals<FieldsetItem, unknown>>]>;

declare const UserProfileItemSchema: z.ZodObject<{
    id: z.ZodString;
    first_name: z.ZodString;
    last_name: z.ZodString;
    full_name: z.ZodString;
    email: z.ZodString;
    email_confirmed: z.ZodBoolean;
    timezone: z.ZodString;
}, z.core.$strip>;

/**
 * Represents an app item returned by getApp and listApps functions
 * Inferred from AppItemSchema which extends the base App API schema
 */
type AppItem = z.infer<typeof AppItemSchema>;
/**
 * Represents a connection item returned by listConnections functions
 * Inferred from ConnectionItemSchema which extends the base Connection API schema
 */
type ConnectionItem = z.infer<typeof ConnectionItemSchema>;
/**
 * Represents an action item returned by listActions functions
 * Inferred from ActionItemSchema which extends the base Action API schema
 */
type ActionItem$1 = z.infer<typeof ActionItemSchema>;
/**
 * Represents an input field item returned by listInputFields functions
 * Inferred from InputFieldItemSchema which extends the base Need API schema
 */
type InputFieldItem = z.infer<typeof InputFieldItemSchema>;
/**
 * Represents an info field item (help text/copy) returned by listInputFields functions
 * Inferred from InfoFieldItemSchema
 */
type InfoFieldItem = z.infer<typeof InfoFieldItemSchema>;

/**
 * Represents a root field item (any field/fieldset type) returned by listInputFields
 * Inferred from RootFieldItemSchema - use as RootFieldItem[]
 */
type RootFieldItem = z.infer<typeof RootFieldItemSchema>;
/**
 * Represents a user profile item returned by getProfile function
 * Inferred from UserProfileItemSchema which extends the base UserProfile API schema
 */
type UserProfileItem = z.infer<typeof UserProfileItemSchema>;

declare module "zod" {
    interface GlobalMeta {
        internal?: boolean;
        deprecated?: boolean;
        valueHint?: string;
    }
}

/**
 * Pagination shapes used by the plugin framework.
 */
/**
 * Single page of a paginated SDK list result. Returned from the page-level
 * promise and yielded from the page-level async iterable.
 */
interface SdkPage<T = unknown> {
    data: T[];
    nextCursor?: string;
}
/**
 * Return type of every paginated SDK method. The same value is both:
 *
 *   - a Promise that resolves to the first page (`SdkPage<TItem>`), and
 *   - an AsyncIterable that yields each page in turn,
 *
 * with an `.items()` method that returns an AsyncIterable over individual
 * items across all pages. Named so paginated plugin signatures serialize
 * as `PaginatedSdkResult<AppItem>` in `.d.ts` rather than expanding the
 * full triple-intersection at every callsite.
 *
 * The faces share one underlying cursor, so a result is consumed once:
 *
 *   - `await` / `.then()` read the buffered first page without starting the
 *     stream, so awaiting is a repeatable peek and you can still iterate the
 *     result afterward.
 *   - The page-iterable and `.items()` are two views over one page stream, so
 *     consuming either drains the other: the second view yields nothing (it
 *     does not replay page 1). To read a result more than once, call the
 *     method again for a fresh result.
 */
interface PaginatedSdkResult<TItem> extends Promise<SdkPage<TItem>>, AsyncIterable<SdkPage<TItem>> {
    items(): AsyncIterable<TItem>;
}
type PaginatedSdkFunction<TOptions, TItem> = (options: TOptions) => PaginatedSdkResult<TItem>;

interface FormattedItem {
    title: string;
    /**
     * Secondary identifying context shown dimmed after the title (ids, keys,
     * slugs, ...). A dumb visual string a renderer shows verbatim, never
     * structured data it has to interpret; the same role as a prompt choice's
     * `hint`. An array is joined with ", ". Structured fields live on the
     * response / `outputSchema`, not here, so the renderer stays dumb.
     */
    hint?: string | string[];
    /** @deprecated Use `hint` (the renderer no longer interprets ids). */
    id?: string;
    /** @deprecated Use `hint`. */
    key?: string;
    /** @deprecated Use `hint`. */
    keys?: string[];
    description?: string;
    /** If provided, the renderer shows this raw (verbatim) instead of `details`. */
    raw?: unknown;
    details: Array<{
        label?: string;
        text: string;
        style: "normal" | "dim" | "accent" | "warning" | "success";
    }>;
}
interface OutputFormatter<TSdk, TItem = unknown, TParams = Record<string, unknown>, TContext = unknown> {
    fetch?: (sdk: TSdk, params: TParams, item: TItem, context: TContext | undefined) => Promise<TContext>;
    format: (item: TItem, context?: TContext) => FormattedItem;
}
/** A selectable option in a prompt. `label` is the display text; `value` is
 * what the resolver returns when picked. */
interface PromptConfigChoice {
    label: string;
    value: unknown;
    /**
     * Optional secondary info shown after the label. The CLI wraps it in
     * dimmed parens; an array is joined with ", ". Use for keys, ids, or
     * other context that's useful but shouldn't compete visually with
     * the primary label.
     */
    hint?: string | string[];
}
/**
 * The pre-rename choice shape, kept so existing resolvers keep compiling while
 * they migrate to {@link PromptConfigChoice}.
 * @deprecated Use {@link PromptConfigChoice} with `label` instead of `name`.
 */
interface DeprecatedPromptConfigChoice {
    /** @deprecated Use `label` instead. */
    name: string;
    value: unknown;
    hint?: string | string[];
}
interface PromptConfig {
    type: "list" | "checkbox" | "confirm";
    /**
     * The answer key. The framework supplies it from the resolver's attachment
     * (the param the resolver resolves), so authors should omit it; a provided
     * value is overwritten.
     * @deprecated Omit; the framework supplies the param key.
     */
    name?: string;
    message: string;
    choices?: Array<PromptConfigChoice | DeprecatedPromptConfigChoice>;
    default?: unknown;
    /** Informational, non-selectable lines shown with the prompt (e.g. "enable X
     * to see more"). A host renders them dimmed, after the choices. The framework
     * stays agnostic about their content; the resolver composes the text. */
    notes?: string[];
    filter?: (value: unknown) => unknown;
    /**
     * Return `true` for valid; a string for a custom invalid message; or
     * `false` for invalid with a generic fallback message ("X: invalid
     * value."). Prefer returning a string so users see something specific.
     */
    validate?: (value: unknown) => boolean | string;
}
/** A PromptConfig narrowed to single-select list mode. */
type ListPromptConfig = PromptConfig & {
    type: "list";
};
/**
 * The prompt config the NEW-model resolvers (`defineResolver`) return. It omits
 * three fields the resolution controller does not honor, so authors can't
 * supply a silent no-op:
 *  - `name`   — the framework supplies the answer key (always was overwritten).
 *  - `default`— no resolver uses it; the controller has no preselect concept.
 *  - `filter` — no resolver uses it; transform values in `listItems` instead.
 * (The legacy `SchemaParameterResolver` still honors `default`/`filter`, so the
 * full `PromptConfig` stays for that path.)
 */
type ResolverPromptConfig = Omit<PromptConfig, "name" | "default" | "filter">;
interface Resolver$1 {
    type: string;
    depends?: readonly string[] | string[];
}
interface StaticResolver$1 extends Resolver$1 {
    type: "static";
    inputType?: "text" | "password" | "email";
    placeholder?: string;
}
/**
 * A resolver that always resolves to a fixed value, never prompts. Use to
 * pin an implicit parameter that downstream resolvers or SDK calls require
 * but the user shouldn't have to provide. Triggers, for example, are always
 * `actionType: "read"` from the SDK's perspective; createTriggerInbox
 * declares `actionType: { type: "constant", value: "read" }` so the
 * standard `actionKeyResolver` and `inputsResolver` (which depend on
 * `actionType`) work without any pinned variants.
 *
 * Constants attached to keys that aren't in the schema are seeded into
 * `resolvedParams` upfront, so dependent resolvers find them in context
 * without the key appearing in the user-facing surface (TS option type,
 * CLI flags, generated docs).
 */
interface ConstantResolver$1 extends Resolver$1 {
    type: "constant";
    value: unknown;
}
/**
 * Fields shared by both variants of {@link DynamicResolver}.
 */
interface DynamicResolverBase<TSdk, TItem, TParams> extends Resolver$1 {
    type: "dynamic";
    prompt: (items: TItem[], params: TParams) => PromptConfig;
    /** Capabilities that expand results. The parameter resolver shows a hint for any that aren't enabled. */
    requireCapabilities?: string[];
    /**
     * Optional hook called before fetch/prompt. If it returns a non-null object,
     * resolvedValue is used directly and fetch/prompt are skipped entirely. Return
     * null to fall through to the normal resolution flow. Implementations should
     * catch their own errors and return null on failure rather than throwing, so
     * that a transient API error does not block the CLI entirely.
     */
    tryResolveWithoutPrompt?: (sdk: TSdk, params: TParams) => Promise<{
        resolvedValue: unknown;
    } | null>;
}
/**
 * The classic dynamic-resolver variant: `fetch` returns a list of items
 * that the CLI renders as a search-filterable dropdown. The user picks one.
 */
interface DynamicListResolver<TSdk, TItem, TParams> extends DynamicResolverBase<TSdk, TItem, TParams> {
    /** Explicitly absent on the list variant; set `inputType: "search"` to opt into the search variant. */
    inputType?: never;
    /** Only meaningful for the search variant; set to `never` here so TS catches misuse. */
    placeholder?: never;
    fetch: (sdk: TSdk, resolvedParams: TParams) => PromiseLike<TItem[] | {
        data: TItem[];
        nextCursor?: string;
    } | AsyncIterable<{
        data: TItem[];
        nextCursor?: string;
    }>>;
}
/**
 * The search-input variant: the CLI prompts the user for free-form text
 * first, then calls `fetch` with `{ ...resolvedParams, search }`.
 *
 * `fetch` can short-circuit by returning a primitive (`string | number`),
 * which the CLI treats as an exact match — no dropdown is rendered. Any
 * other return (array, page, async iterable) is rendered as the normal
 * search-filterable dropdown.
 *
 * The `search` key is injected by the CLI at call time; it isn't part of
 * `TParams` because callers that invoke `fetch` directly (outside the CLI)
 * are responsible for passing it themselves. Search-mode resolvers should
 * type `TParams` as `{ search?: string; ...otherDeps }` to make this
 * explicit.
 */
interface DynamicSearchResolver<TSdk, TItem, TParams> extends Omit<DynamicResolverBase<TSdk, TItem, TParams>, "prompt"> {
    inputType: "search";
    /**
     * Hint text appended to the search prompt's message. NOT used as
     * inquirer's `default` value, because inquirer prefills `default` as
     * editable text that the user has to delete before typing.
     */
    placeholder?: string;
    /**
     * Search-mode always renders a single-select @inquirer/search dropdown,
     * so `prompt` must return a list-typed PromptConfig. Checkbox/confirm
     * configs would be silently ignored at runtime; the type narrows so
     * misuse fails at compile time.
     *
     * Note: a primitive return from `fetch` (string | number) is treated
     * as an exact match and short-circuits without running this prompt or
     * the resolver's validate/filter. Canonicalize inside `fetch` if the
     * exact-match path needs normalization.
     */
    prompt: (items: TItem[], params: TParams) => ListPromptConfig;
    fetch: (sdk: TSdk, resolvedParams: TParams) => PromiseLike<string | number | TItem[] | {
        data: TItem[];
        nextCursor?: string;
    } | AsyncIterable<{
        data: TItem[];
        nextCursor?: string;
    }>>;
}
/**
 * A dynamic resolver: either a classic list (`inputType` absent) or a
 * search-input variant (`inputType: "search"`). The discriminator is the
 * `inputType` field; TS narrows to the right variant when you check it.
 */
type DynamicResolver$1<TSdk, TItem = unknown, TParams = Record<string, unknown>> = DynamicListResolver<TSdk, TItem, TParams> | DynamicSearchResolver<TSdk, TItem, TParams>;
interface ResolverFieldItem {
    type: string;
    key: string;
    title?: string;
    is_required?: boolean;
    value_type?: string;
    choices?: Array<{
        label: string;
        value: string;
    }>;
    fields?: ResolverFieldItem[];
    resolver?: ResolverMetadata<any, any, any>;
}
interface FieldsResolver<TSdk, TParams = Record<string, unknown>, TResult = Record<string, unknown>> extends Resolver$1 {
    type: "fields";
    fetch: (sdk: TSdk, resolvedParams: TParams) => Promise<ResolverFieldItem[]>;
    transform?: (value: Record<string, unknown>) => TResult;
}
interface ArrayResolver$1<TSdk, TParams = Record<string, unknown>> extends Resolver$1 {
    type: "array";
    fetch: (sdk: TSdk, resolvedParams: TParams) => Promise<ResolverMetadata<TSdk, unknown, TParams>>;
    minItems?: number;
    maxItems?: number;
}
type ResolverMetadata<TSdk, TItem = unknown, TParams = Record<string, unknown>> = StaticResolver$1 | ConstantResolver$1 | DynamicResolver$1<TSdk, TItem, TParams> | FieldsResolver<TSdk, TParams> | ArrayResolver$1<TSdk, TParams>;
/**
 * Extract the SDK shape a resolver requires by inferring it from the resolver's
 * `fetch` callback. Static and Constant resolvers have no fetch and produce
 * `unknown`, meaning they impose no requirement on the plugin's SDK.
 */
type RequiredSdkOf<R> = R extends {
    fetch: (sdk: infer S, ...args: any[]) => any;
} ? S : unknown;
/**
 * Per-entry resolver-slot validator. For each key, if the plugin's `TSdk`
 * satisfies the resolver's required SDK, the entry passes through unchanged;
 * otherwise the slot widens to `ResolverMetadata<TSdk, any, any>`, so TS
 * surfaces the mismatch at the specific offending key rather than at the
 * whole `resolvers` object.
 *
 * Pair with `NoInfer<TSdk>` at the call site to prevent TS from inferring
 * `TSdk` from a resolver entry (which would silently accommodate the
 * mismatch). With `NoInfer`, the only inference site for `TSdk` is the
 * `sdk` argument, and each resolver is then checked against it.
 */
type ValidResolvers<TSdk, R> = {
    [K in keyof R]: TSdk extends RequiredSdkOf<R[K]> ? R[K] : ResolverMetadata<TSdk, any, any>;
};
interface PositionalMetadata {
    positionalMeta: {
        positional: true;
    };
}
declare function isPositional(schema: z.ZodType): boolean;

/**
 * Method-call lifecycle hooks. Plugins contribute `onMethodStart` and/or
 * `onMethodEnd` on their context; `buildHooks` composes contributions across
 * plugins so multiple observers can coexist. Composition is right-additive
 * (newer plugins fire after earlier ones); only opt-in methods built through
 * `createPluginMethod` / `createPaginatedPluginMethod` trigger the hooks.
 */
interface OnMethodStartContext {
    methodName: string;
    args: unknown[];
    isPaginated: boolean;
    /**
     * Depth of this method invocation in the SDK call tree. 0 = outermost
     * (user-initiated) call; 1+ = called from inside another SDK method.
     * Observers can use this to ignore nested calls if they only want
     * top-level events.
     */
    depth: number;
}
type OnMethodStart = (ctx: OnMethodStartContext) => void;
interface OnMethodEndContext {
    methodName: string;
    args: unknown[];
    isPaginated: boolean;
    depth: number;
    durationMs: number;
    error?: Error;
}
type OnMethodEnd = (ctx: OnMethodEndContext) => void;
interface MethodHooks {
    onMethodStart?: OnMethodStart;
    onMethodEnd?: OnMethodEnd;
}

/**
 * Descriptive metadata a leaf carries for the registry / CLI / MCP / docs:
 * description, categories, type, formatter, resolvers, etc.
 * Reuses the shipped `PluginMeta` minus `inputSchema`, which is a first-class
 * descriptor field (it also drives `input` typing and runtime validation).
 */
type LeafMeta = Omit<PluginMeta, "inputSchema">;
/**
 * The descriptive registry fields a `defineMethod` / `defineProperty` author
 * sets directly on the config (hoisted, not nested under a `meta` wrapper).
 * The impl folds whichever are present back into the stored `LeafMeta`. This is
 * the strict, explicit subset of `PluginMeta` (no `[key: string]: any` escape
 * hatch, no `inputSchema` / `formatter` / `resolvers` — those are first-class
 * config fields of their own).
 */
interface LeafMetaFields {
    description?: string;
    categories?: (string | CategoryDefinition)[];
    type?: "list" | "item" | "create" | "update" | "delete" | "function";
    itemType?: string;
    returnType?: string;
    outputSchema?: z.ZodSchema;
    inputParameters?: Array<{
        name: string;
        schema: z.ZodSchema;
    }>;
    packages?: string[];
    experimental?: boolean;
    confirm?: "create-secret" | "delete";
    deprecation?: FunctionDeprecation;
    aliases?: Record<string, string>;
    supportsJsonOutput?: boolean;
}
/** One segment of a {@link DynamicMember} path: a literal binding/segment name,
 * or a `{ param }` placeholder for an open-ended key (rendered `{param}`). */
type DynamicMemberSegment = string | {
    param: string;
};
/**
 * A templated registry member: a dynamic sub-surface with no static binding
 * (e.g. `apps.{appKey}.{actionType}.{actionKey}`), backed at runtime by a proxy.
 * It is a bodyless declaration — the same descriptive fields an author sets on a
 * leaf, keyed by a `path` instead of a `name`. The framework derives the
 * registry name by joining the path (params rendered `{param}`) and folds these
 * fields into a `PluginMeta` for the registry / CLI / MCP / docs projection.
 * `path[0]` must be a literal that resolves to a real surfaced binding (the
 * owning member).
 */
type DynamicMember = {
    path: readonly DynamicMemberSegment[];
    /** Projection-only input schema (no runtime; the proxy validates its own). */
    inputSchema?: z.ZodType;
} & LeafMetaFields;
/** A {@link DynamicMember} normalized at define time: the derived registry name,
 * the literal root segment (validated against the surface), and the folded meta. */
interface NormalizedDynamicMember {
    name: string;
    rootBinding: string;
    meta: PluginMeta;
}
type AnyMethodPlugin = MethodPlugin<string, any, any, readonly string[]>;
type AnyPropertyPlugin = PropertyPlugin<string, any>;
/** A leaf plugin: a method (callable) or a property (value). */
type AnyLeafPlugin = AnyMethodPlugin | AnyPropertyPlugin;
/**
 * How a module declares its imports: an array. Each element binds under its own
 * name (a leaf under its name, a module under each of its export names); a
 * `selectExports(...)` element contributes its chosen bindings. To rename or
 * subset, wrap an element in `selectExports`; there is no alias-map form.
 */
type ImportsInput = readonly AnyPlugin[];
/** A resolved import edge: the local binding name and the plugin id it reads
 * from `context.plugins` (id, not identity, so a swap stays transparent). */
interface ImportBinding {
    binding: string;
    id: string;
    /** True when the edge came from a `declareOptionalProperty` stand-in: if no real
     * plugin satisfies the id, the binding resolves to `undefined` instead of
     * failing the build as a missing dependency. */
    optional?: boolean;
}
/**
 * Collapse a union to an intersection. Turns the per-dependency
 * `{ name: signature }` union into one `imports` object type.
 */
type UnionToIntersection<U> = (U extends unknown ? (x: U) => void : never) extends (x: infer I) => void ? I : never;
/**
 * A method's callable signature. A method with no declared input infers
 * `TInput = unknown`; make its input optional so it is callable with no
 * argument. An input whose properties are all optional (e.g. a `list` method
 * whose only input is the framework's `cursor` / `pageSize` / `maxItems`) is
 * also callable with no argument. A real required input keeps the arg required.
 */
type MethodCall<TInput, TOutput> = [unknown] extends [TInput] ? (input?: TInput) => TOutput : {} extends TInput ? (input?: TInput) => TOutput : (input: TInput) => TOutput;
/**
 * Project the canonical input through an ordered list of key names into a
 * positional argument tuple, preserving trailing-optionality: a key that is
 * optional in `TInput` becomes an optional argument (so `fetch(url)` is legal
 * when `init` is optional). A name that is not a key of `TInput` is an error.
 */
type PositionalArgs<TInput, TNames extends readonly PropertyKey[]> = TNames extends readonly [
    infer Head extends keyof TInput,
    ...infer Tail extends readonly (keyof TInput)[]
] ? {} extends Pick<TInput, Head> ? [arg?: TInput[Head], ...PositionalArgs<TInput, Tail>] : [arg: TInput[Head], ...PositionalArgs<TInput, Tail>] : [];
/**
 * The public call signature of a method on the surface and in `imports`. With
 * no positional projection it is the canonical single-object `MethodCall`; with
 * one it is the positional signature derived from the input. Middleware does
 * NOT use this (its bag carries one canonical `input`); see `MiddlewareMap`.
 */
type SurfaceCall<TInput, TOutput, TPositional extends readonly string[]> = TPositional extends readonly [] ? MethodCall<TInput, TOutput> : (...args: PositionalArgs<TInput, TPositional>) => TOutput;
/**
 * The bindings one array-form dependency contributes to `imports`: a leaf under
 * its own name (method callable or property value), an aggregate under each of
 * its export names — exactly the dependency's {@link PluginSurface}.
 */
type BindingsOf<TDep extends AnyPlugin> = PluginSurface<TDep>;
/**
 * The `imports` a body receives. Each element contributes its bindings
 * (`BindingsOf`); empty imports yield an empty object.
 */
type ImportsOf<TImports extends ImportsInput> = TImports extends readonly [] ? Record<never, never> : UnionToIntersection<{
    [K in keyof TImports]: BindingsOf<TImports[K]>;
}[number]>;
/**
 * The bag a method body receives. `imports` is the dependency-narrowed reach;
 * `state` is the plugin's private constructor result (undefined when none);
 * `input` is the canonical call argument.
 */
interface MethodRunBag<TImports, TInput, TState = unknown> {
    imports: TImports;
    state: TState;
    input: TInput;
}
/** Shared plumbing for the method attachments: each declares its own
 * dependencies. Resolvers and formatters are otherwise separate concepts. */
interface MethodAttachment {
    imports: readonly AnyPlugin[];
    /** Binding-name to plugin-id edges, normalized from `imports`; what the
     * narrowed bag captured at materialization is built from. */
    importBindings: readonly ImportBinding[];
}
/**
 * A reference from a field (or array `items`) to a reusable resolver in the
 * nearest `definitions` block. `input` are merged into the referenced
 * resolver's `input` (e.g. the field key a shared choices-fetcher needs).
 * Used when a fetch-built field needs an import-bearing resolver, which can't
 * be inlined at fetch time (its imports bind at materialization).
 */
interface ResolverRef {
    ref: string;
    input?: Record<string, unknown>;
}
/**
 * One member of an object resolver's `properties` (literal or fetch-built): the
 * resolver for the value plus its per-occurrence meta. `required` / `valueType`
 * live here, not on the resolver, because the same resolver can be required in
 * one object and optional in another, and a fetch-built field (no schema) has
 * nowhere else to carry them.
 */
interface Field$1 {
    resolver: Resolver | ResolverRef;
    label?: string;
    required?: boolean;
    valueType?: string;
}
/** Shared gates for resolvers that resolve a value: the attachment plumbing
 * plus the param-dataflow prerequisite. (`info` skips these.) */
interface ResolverBase extends MethodAttachment {
    /** Sibling parameters that must resolve before this resolver runs (it reads
     * their values from `input`). The param-dataflow prerequisite, distinct from
     * `imports`' SDK-capability graph. */
    requireParameters?: readonly string[];
}
/** List candidate items and prompt the user to pick one. */
interface DynamicResolver extends ResolverBase {
    type: "dynamic";
    inputType?: "text" | "password" | "email" | "search";
    placeholder?: string;
    /** Compute side-context once, before `listItems`, with the narrowed `imports`
     * bag (no items yet — it runs pre-fetch so it can shape the fetch). The result
     * flows into `listItems` and `prompt` as `context`. Use it to resolve, in one
     * place, anything both the fetch and the render need (e.g. a capability gate:
     * compute `includeShared` here, gate the fetch in `listItems`, surface a
     * `notes` hint in `prompt`). May run more than once across re-asks, so keep it
     * cheap/idempotent. */
    getContext?: (bag: {
        imports: Record<string, unknown>;
        input: Record<string, unknown>;
    }) => PromiseLike<unknown>;
    /** Produce the candidate list. Behaves like an SDK list method: returns a
     * paginated result (await for the first page + `nextCursor`, or iterate pages),
     * never a bare array. `cursor` is the stateless re-entry hook for "load more":
     * an in-process host iterates the result; a distributed host awaits one page,
     * carries `nextCursor`, and calls again with `cursor`. Required: a dynamic
     * resolver IS a candidate-lister; a free-text field (with or without
     * auto-resolution someday) is the `static` kind's job. */
    listItems: (bag: {
        imports: Record<string, unknown>;
        input: Record<string, unknown>;
        /** The value `getContext` returned, if any. */
        context?: unknown;
        /** Free-text term injected by the CLI for search-mode resolvers. A separate
         * key, not part of `input`, so it never collides with a method parameter
         * also named `search`. */
        search?: string;
        cursor?: string;
    }) => ListItemsResult<unknown>;
    prompt?: (bag: {
        items: unknown[];
        input: Record<string, unknown>;
        /** The value `getContext` returned, if any. */
        context?: unknown;
    }) => ResolverPromptConfig;
    /** Resolve with no user input at all (e.g. a configured default), skipping the
     * prompt. Runs before prompting; used always in non-interactive mode and as a
     * "can we skip asking?" check otherwise. Returns null to fall through to a prompt. */
    tryResolveWithoutPrompt?: (bag: {
        imports: Record<string, unknown>;
        input: Record<string, unknown>;
    }) => Promise<{
        resolvedValue: unknown;
    } | null>;
    /** Search-mode exact match: the user typed `search`; if it already names a
     * valid value (e.g. validated via the API), return it to skip the picker.
     * Distinct from `tryResolveWithoutPrompt` (no input) — this is interactive,
     * mid-prompt, with the typed term. Returns null to fall through to `listItems`. */
    tryResolveFromSearch?: (bag: {
        imports: Record<string, unknown>;
        input: Record<string, unknown>;
        search?: string;
    }) => Promise<{
        resolvedValue: unknown;
    } | null>;
}
/** Free-text input, no candidate list. */
interface StaticResolver extends ResolverBase {
    type: "static";
    inputType?: "text" | "password" | "email" | "search";
    placeholder?: string;
}
/** A fixed value, no prompt. */
interface ConstantResolver extends ResolverBase {
    type: "constant";
    value: unknown;
}
/** Display-only text; resolves no value (its key is skipped in the result). */
interface InfoResolver extends MethodAttachment {
    type: "info";
    text: string;
}
/** A keyed object. `properties` are known up front; `getProperties` builds them
 * when the key set is dynamic (re-invoked as `input` grow, for depends-on
 * fields). Returns the property map raw (no envelope: nothing to paginate).
 * `definitions` holds reusable resolvers reached by `{ ref }` from built fields
 * that need an import. */
interface ObjectResolver extends ResolverBase {
    type: "object";
    properties?: Record<string, Field$1>;
    getProperties?: (bag: {
        imports: Record<string, unknown>;
        input: Record<string, unknown>;
    }) => PromiseLike<Record<string, Field$1>>;
    definitions?: Record<string, Resolver>;
}
/** A homogeneous list: each element resolves through `items`. */
interface ArrayResolver extends ResolverBase {
    type: "array";
    items: Resolver | ResolverRef;
    minItems?: number;
    maxItems?: number;
    /** Coarse value type of each element, so a free-text item answer coerces
     * (e.g. `"5"` → `5` for `z.array(z.number())`) the way object fields do via
     * `Field.valueType`. `items` is a bare resolver with no `valueType` slot of
     * its own, so the element type rides here. */
    itemValueType?: string;
    definitions?: Record<string, Resolver>;
}
/**
 * An input resolver descriptor (produced by `defineResolver`, attached to a
 * method parameter). A discriminated union on `type`; composites (`object` /
 * `array`) recurse. Callbacks take a narrowed `imports` bag; the materializer
 * captures it and produces a {@link BoundResolver}. Stored loosely (the precise
 * `imports` / item / param types live on the `defineResolver` config), like
 * `MethodPlugin.run`.
 */
type Resolver = DynamicResolver | StaticResolver | ConstantResolver | InfoResolver | ObjectResolver | ArrayResolver;
/**
 * An output formatter descriptor (produced by `defineFormatter`, attached to a
 * method's output). `getContext` reaches the narrowed `imports` bag; the
 * materializer captures it and produces a {@link BoundFormatter}. Stored
 * loosely, like {@link Resolver}. Both callbacks receive the method's `input`
 * (the formatter runs post-execution, so the input is complete, unlike a
 * resolver's partial `input`).
 */
interface Formatter extends MethodAttachment {
    getContext?: (bag: {
        imports: Record<string, unknown>;
        items: unknown[];
        input: Record<string, unknown>;
        context?: unknown;
    }) => Promise<unknown>;
    format: (bag: {
        item: unknown;
        input: Record<string, unknown>;
        context?: unknown;
    }) => FormattedItem;
}
/** What a dynamic resolver's `listItems` yields: an SDK list-method result
 * (`await` for the first page + `nextCursor`, or iterate pages in-process), or a
 * plain page / promise of one. No bare array and no scalar: it behaves like any
 * other list method, and exact-match short-circuits live on `tryResolveFromSearch`. */
type ListItemsResult<TItem> = PaginatedSdkResult<TItem> | SdkPage<TItem> | Promise<SdkPage<TItem>>;
/** A bound object resolver's literal property: its resolver is already bound
 * (or a `{ ref }` the CLI resolves against `definitions` at runtime). */
interface BoundField {
    resolver: BoundResolver | ResolverRef;
    label?: string;
    required?: boolean;
    valueType?: string;
}
/** Fields shared by every bound resolver kind. */
interface BoundResolverBase {
    /** Sibling parameters that must resolve before this resolver runs (it reads
     * their values from `input`). The param-dataflow prerequisite, distinct from
     * `imports`' SDK-capability graph. */
    requireParameters?: readonly string[];
}
/** Free-text input, no candidate list. */
interface BoundStaticResolver extends BoundResolverBase {
    type: "static";
    inputType?: "text" | "password" | "email" | "search";
    placeholder?: string;
}
/** A fixed value the author pinned; auto-settles, never asks. */
interface BoundConstantResolver extends BoundResolverBase {
    type: "constant";
    value: unknown;
}
/** Display-only text; resolves no value, never asks. */
interface BoundInfoResolver extends BoundResolverBase {
    type: "info";
    text: string;
}
/** List candidate items (`listItems`) and prompt to pick one; carries the
 * auto-resolution hooks (`tryResolveWithoutPrompt`, `tryResolveFromSearch`). */
interface BoundDynamicResolver extends BoundResolverBase {
    type: "dynamic";
    inputType?: "text" | "password" | "email" | "search";
    placeholder?: string;
    getContext?: (bag: {
        input: Record<string, unknown>;
    }) => PromiseLike<unknown>;
    listItems: (bag: {
        input: Record<string, unknown>;
        context?: unknown;
        search?: string;
        cursor?: string;
    }) => ListItemsResult<unknown>;
    prompt?: (bag: {
        items: unknown[];
        input: Record<string, unknown>;
        context?: unknown;
    }) => ResolverPromptConfig;
    tryResolveWithoutPrompt?: (bag: {
        input: Record<string, unknown>;
    }) => Promise<{
        resolvedValue: unknown;
    } | null>;
    tryResolveFromSearch?: (bag: {
        input: Record<string, unknown>;
        search?: string;
    }) => Promise<{
        resolvedValue: unknown;
    } | null>;
}
/** Keyed members: static `properties` (bound) or a `getProperties`-built
 * (unbound) field map; `definitions` holds ref targets. */
interface BoundObjectResolver extends BoundResolverBase {
    type: "object";
    properties?: Record<string, BoundField>;
    definitions?: Record<string, BoundResolver>;
    getProperties?: (bag: {
        input: Record<string, unknown>;
    }) => PromiseLike<Record<string, Field$1>>;
}
/** A homogeneous list resolved through `items` (bound, or a ref into
 * `definitions`). */
interface BoundArrayResolver extends BoundResolverBase {
    type: "array";
    items: BoundResolver | ResolverRef;
    minItems?: number;
    maxItems?: number;
    /** The element's coarse value type, used to coerce a free-text item answer
     * before validation (see {@link ArrayResolver.itemValueType}). */
    itemValueType?: string;
    definitions?: Record<string, BoundResolver>;
}
/**
 * The runtime resolver `defineResolver` binds to: its imports are already
 * captured, so the CLI calls these with input (and `search`) only, no sdk.
 * `prompt` stays pure (no SDK reach). A discriminated union mirroring
 * {@link Resolver}, so kind-specific field access compiles only behind a
 * `type` narrow (the binder's switch is the one exhaustiveness-checked
 * dispatch; the engine's if-chains get the field-access check).
 */
type BoundResolver = BoundStaticResolver | BoundConstantResolver | BoundInfoResolver | BoundDynamicResolver | BoundObjectResolver | BoundArrayResolver;
/**
 * The runtime formatter `defineFormatter` binds to: `getContext` runs once per
 * rendered batch (imports captured, no sdk) to build shared context; `format`
 * is pure and synchronous, turning one item + context into a `FormattedItem`.
 */
interface BoundFormatter<TItem = unknown, TInput = Record<string, unknown>, TContext = unknown> {
    getContext?: (bag: {
        items: TItem[];
        input: TInput;
        context?: TContext;
    }) => Promise<TContext>;
    format: (bag: {
        item: TItem;
        input: TInput;
        context?: TContext;
    }) => FormattedItem;
}
/**
 * A leaf plugin that is a single function: it IS the method. `pluginType` is
 * the node-kind discriminant; `name` is its identity and default
 * binding name. `imports` are the other plugins it depends on. The stored
 * `run` is loosely typed for `imports` (the precise type lives on the
 * `defineMethod` authoring surface, like the shipped definePlugin).
 */
interface MethodPlugin<TName extends string = string, TInput = unknown, TOutput = unknown, TPositional extends readonly string[] = readonly []> {
    pluginType: "method";
    name: TName;
    namespace?: string;
    /** `namespace/name`, or bare `name`. The `context.plugins` key. */
    id: string;
    /** True for a `declareMethod` stand-in: a typed reference with no real
     * implementation. A real plugin under the same id satisfies it. */
    standIn?: boolean;
    /** True for a `declareOptionalProperty` stand-in over a method id: dependents bind
     * `undefined` if no real plugin satisfies it. */
    optional?: boolean;
    imports: readonly AnyPlugin[];
    /** Binding-name to plugin-id edges, normalized from `imports`;
     * what the `imports` bag is built from. */
    importBindings: readonly ImportBinding[];
    /** Optional per-materialization constructor: runs once at createSdk
     * (dependencies first), may side-effect, and returns the method's private
     * state (delivered to `run` as `bag.state`). */
    setup?: (bag: {
        imports: Record<string, unknown>;
    }) => unknown;
    /** `setup`'s dual: releases what setup acquired. Run by `disposeSdk` in
     * reverse dependency order. */
    dispose?: DisposeFn;
    /** Validates `input` before `run` and drives the authoring `input` type. */
    inputSchema?: z.ZodType;
    /** When true, skip the runtime validation/parse of `input`: `run` receives the
     * raw input untouched — no coercion, stripping, or cloning — even if
     * `inputSchema` is set (the schema stays for registry / CLI / MCP projection).
     * For raw methods that own their own validation and must not have their input
     * transformed, e.g. `fetch` passing a `RequestInit` bag through unchanged. */
    skipInputValidation?: boolean;
    /** Descriptive metadata for the registry / CLI / MCP / docs (carry-only at
     * runtime). */
    meta?: LeafMeta;
    /** Per-parameter input resolvers (method attachments). Reached for
     * materialization and bound into the entry at createSdk; a reachability-only
     * edge whose imports never enter this method's `importBindings`. */
    resolvers?: Record<string, Resolver>;
    /** Output formatter (method attachment). Bound into the entry at createSdk. */
    formatter?: Formatter;
    run: (bag: MethodRunBag<any, TInput, any>) => TOutput;
    /** How `run`'s result is shaped into the public surface (see Output in the
     * design doc). Omitted is "raw". Stored loosely; the precise per-mode typing
     * lives on the `defineMethod` overloads. */
    output?: OutputConfig;
    /** Positional projection (see Output): ordered keys of the canonical input
     * that the public surface and imports take as positional arguments. The
     * framework packs them back into `{ input }` before validation, middleware,
     * and `run`, so internals stay canonical. The runtime reads this loose field;
     * the precise names ride the `TPositional` type param for surface typing. */
    positional?: readonly string[];
    /**
     * Phantom: carries the positional names as a tuple type so `BindingsOf` /
     * `ExportSurface` can render the positional signature. Never present at
     * runtime; the loose `positional` field above is the runtime carrier.
     * @internal
     */
    readonly [POSITIONAL_NAMES]?: TPositional;
}
/** Phantom-only key (see `MethodPlugin`); never set at runtime. */
declare const POSITIONAL_NAMES: unique symbol;
/** A method's output mode: raw passthrough, a `{ data }` item envelope, or a
 * paginated list. */
type OutputMode = "raw" | "item" | "list";
/** The authoring value for `output`: a bare mode string, or the object form
 * (which carries list options). */
type OutputConfig = OutputMode | {
    type: "raw";
} | {
    type: "item";
} | {
    type: "list";
    adaptPage?: (response: any) => SdkPage<any>;
    defaultPageSize?: number;
};
/** Normalized output config: always the object form with a resolved `type`. */
interface NormalizedOutput {
    type: OutputMode;
    adaptPage?: (response: any) => SdkPage<any>;
    defaultPageSize?: number;
}
/** Framework-injected page controls a list method's `run` receives. */
type PageFetchInput = {
    cursor?: string;
    pageSize?: number;
};
/** Page controls a list method's public caller may pass. */
type PaginatedCallInput = PageFetchInput & {
    maxItems?: number;
};
/**
 * A response whose only own keys are `data` / `nextCursor`. Gates the
 * list-standard overload: a raw envelope with extra keys is not a `StrictPage`
 * and falls through to the adapted overload, where `adaptPage` is required.
 */
type StrictPage$1<TResponse> = SdkPage<unknown> & {
    [K in Exclude<keyof TResponse, keyof SdkPage<unknown>>]?: never;
};
/** Item type sourced from a page-ish response. */
type ItemOf$1<TResponse> = TResponse extends SdkPage<infer TItem> ? TItem : TResponse extends {
    data: readonly (infer TItem)[];
} ? TItem : never;
/**
 * A response whose only own key is `data`. Gates the item overload of
 * `defineMethod` the way `StrictPage` gates list-standard: `run` returns the
 * `{ data }` envelope itself, and an envelope with extra keys is rejected (a
 * future variant may accept metadata alongside `data`).
 */
type StrictItem<TResponse> = {
    data: unknown;
} & {
    [K in Exclude<keyof TResponse, "data">]?: never;
};
/** Data type sourced from an item envelope. */
type DataOf<TResponse> = TResponse extends {
    data: infer TData;
} ? TData : never;
/**
 * A leaf plugin that is a single value (not a function). `value` is a static
 * constant; `get({ imports })` computes the value from imports. Like a
 * method's `setup`, `get` runs eagerly at createSdk (dependencies first), so a
 * module-level value is built on import. An imported/surfaced property yields
 * the value, not a callable.
 */
interface PropertyPlugin<TName extends string = string, TValue = unknown> {
    pluginType: "property";
    name: TName;
    namespace?: string;
    /** `namespace/name`, or bare `name`. The `context.plugins` key. */
    id: string;
    /** True for a `declareProperty` stand-in: a typed reference with no value. A
     * real property under the same id satisfies it. */
    standIn?: boolean;
    /** True for a `declareOptionalProperty` stand-in: an optional reference. If no real
     * property satisfies it, dependents bind `undefined` rather than the build
     * failing on a missing dependency. */
    optional?: boolean;
    imports: readonly AnyPlugin[];
    /** Binding-name to plugin-id edges, normalized from `imports`;
     * what the `imports` bag is built from. */
    importBindings: readonly ImportBinding[];
    /** Optional once-eager constructor (the property twin of a method's `setup`):
     * runs once at createSdk (dependencies first), may side-effect, and returns the
     * private state delivered to `get` as `bag.state`. */
    setup?: (bag: {
        imports: Record<string, unknown>;
    }) => unknown;
    /** `setup`'s dual: releases what setup acquired. Run by `disposeSdk` in
     * reverse dependency order. */
    dispose?: DisposeFn;
    value?: TValue;
    /** A live getter: computes the value from imports and `setup` state on each
     * read (not once). The stored shape is loose; the precise typing lives on the
     * `defineProperty` overloads. */
    get?: (bag: {
        imports: Record<string, unknown>;
        state: unknown;
    }) => TValue;
    /** Descriptive metadata for the registry / CLI / MCP / docs (carry-only). */
    meta?: LeafMeta;
    /** Templated registry members for this property's dynamic sub-surface (e.g. a
     * proxy). Carry-only: normalized at define time, folded into the registry. */
    dynamicMembers?: readonly NormalizedDynamicMember[];
    /** A built-in whose value is the live `SdkContext`, injected at
     * materialization. Reserved for kitcore's own plugins;
     * authors use `value` / `get`. */
    privileged?: boolean;
}
/**
 * A middleware function wrapping one of the aggregate's imported methods.
 * `next` invokes the next layer (an inner wrap, ultimately the core method);
 * `imports` is the middleware plugin's own dependency reach; `input` is the
 * canonical call argument. It must preserve the target's contract; the
 * `MiddlewareMap` typing on `definePlugin` enforces that statically.
 */
type MiddlewareFn = (bag: {
    imports: any;
    next: (input: any) => any;
    input: any;
    state: unknown;
}) => any;
/** The export record one array element contributes: a leaf under its own name,
 * a module under each of its export bindings. */
type ElementExports<E> = E extends MethodPlugin<infer N, any, any, any> ? {
    [K in N]: E;
} : E extends PropertyPlugin<infer N, any> ? {
    [K in N]: E;
} : E extends AggregatePlugin<string, infer TE> ? TE : never;
/**
 * The canonical export record an aggregate stores: each array element's
 * bindings merged, so every downstream consumer sees a `Record<binding, leaf>`.
 */
type ArrayExports<T extends readonly (AnyLeafPlugin | AnyAggregatePlugin)[]> = T extends readonly [] ? Record<never, never> : UnionToIntersection<{
    [I in keyof T]: ElementExports<T[I]>;
}[number]>;
interface AggregatePlugin<TName extends string = string, TExports extends Record<string, AnyLeafPlugin> = Record<string, AnyLeafPlugin>> {
    pluginType: "aggregate";
    name: TName;
    namespace?: string;
    /** `namespace/name`, or bare `name`. The `context.plugins` key. */
    id: string;
    /** True for a `declarePlugin` stand-in: a typed reference to a whole module
     * with no implementation. A real aggregate under the same id satisfies it. */
    standIn?: boolean;
    imports: readonly AnyPlugin[];
    /** Binding-name to plugin-id edges, normalized from `imports`; what a
     * wrap's `imports` is built from, and how a wrap target
     * binding resolves to a method id. */
    importBindings: readonly ImportBinding[];
    exports: TExports;
}
type AnyAggregatePlugin = AggregatePlugin<string, Record<string, any>>;
/**
 * A legacy bridge plugin: wraps an old function plugin
 * (`(sdk) => provides`) so it materializes inside the new graph. At
 * materialization it runs `run` against a live compat view, merges the
 * returned context contributions into the shared `SdkContext`, and synthesizes
 * a `context.plugins` entry per root key. `TSurface` is the surfaced shape (the
 * provides minus `context`). This is the single shape `createPluginStack()
 * .toPlugin()` emits; there is no separate interim definition format.
 */
interface LegacyPlugin<TSurface = Record<string, unknown>> {
    pluginType: "legacy";
    name: string;
    namespace?: string;
    /** `namespace/name`, or bare `name`. The `context.plugins` key. */
    id: string;
    imports: readonly AnyPlugin[];
    importBindings: readonly ImportBinding[];
    run: (sdk: any) => PluginProvides;
    /** Type-only carrier for the surfaced shape; never set at runtime. */
    readonly __surface?: TSurface;
}
type AnyLegacyPlugin = LegacyPlugin<any>;
/**
 * A patch over an already-defined method's descriptive fields. It carries no
 * `run`: it names an existing method by id (`target`) and, after that method
 * materializes, merges its `meta` (the same public {@link LeafMetaFields} an
 * author sets on `defineMethod`) onto the method's entry, so the surface
 * registry / CLI / MCP / docs project the patched values. For surface-specific
 * tweaks a base method should not carry (e.g. a CLI that deprecates `fetch`
 * while the SDK does not, or a host that hides a method via `packages`).
 *
 * Distinct from a *replacement* (`addPlugin(..., { override: true })`), which
 * swaps the whole implementation and forces re-declaring `run`. An override
 * inherits the target's implementation untouched and only patches meta.
 */
interface MethodOverridePlugin {
    pluginType: "method-override";
    name: string;
    id: string;
    /** The id of the method whose meta is patched (its bare name if the method is
     * namespace-less). */
    target: string;
    imports: readonly AnyPlugin[];
    importBindings: readonly ImportBinding[];
    meta?: LeafMeta;
}
/**
 * A method-lifecycle hook leaf (`defineHook`). `observe` contributes
 * fire-and-forget observers (`onMethodStart` / `onMethodEnd`) that the method
 * boundary fires around every method; they run defensively (an observer error
 * never breaks the observed call). `setup` runs once and owns the hook's state
 * (e.g. a telemetry queue), delivered to the observers.
 * Each observer bag mirrors a method's: `{ imports, input, state }` — `input` is
 * the lifecycle context, and there is no `next` (observers don't participate in
 * the call). The module-model replacement for a legacy plugin that contributed
 * `context.hooks`.
 */
interface HookPlugin<TName extends string = string> {
    pluginType: "hook";
    name: TName;
    namespace?: string;
    id: string;
    imports: readonly AnyPlugin[];
    importBindings: readonly ImportBinding[];
    setup?: (bag: {
        imports: any;
    }) => unknown;
    /** `setup`'s dual: releases what setup acquired. Run by `disposeSdk` in
     * reverse dependency order. */
    dispose?: DisposeFn;
    /** Contract-preserving wraps around imported methods (the middleware onion,
     * folded dependents-outermost in topological order). Keyed by the target's
     * binding among this hook's `imports`. */
    wrap?: Record<string, MiddlewareFn>;
    observe?: {
        onMethodStart?: (bag: {
            imports: any;
            input: OnMethodStartContext;
            state: unknown;
        }) => void;
        onMethodEnd?: (bag: {
            imports: any;
            input: OnMethodEndContext;
            state: unknown;
        }) => void;
    };
}
type AnyPlugin = AnyLeafPlugin | AnyAggregatePlugin | AnyLegacyPlugin | HookPlugin | MethodOverridePlugin;
/**
 * A transitional root that merges a legacy function-plugin stack with the
 * module-model plugins migrated off it (see Migration order). At `createSdk` it
 * lifts and runs the legacy stack (like `fromFunctionPlugin`), materializes the
 * module-model `plugin`, and surfaces the union: the legacy stack's methods plus
 * the module plugin's exports. The migrated plugins live in one `plugin`
 * aggregate, so each migration only edits that aggregate's exports, not the
 * heads. Deleted once every plugin is module-model.
 */
interface LegacyMergePlugin<TProvides extends PluginProvides = PluginProvides, TPlugin extends AnyPlugin = AnyPlugin> {
    pluginType: "legacy-merge";
    name: string;
    namespace?: string;
    id: string;
    /** The lifted legacy stack (one node). */
    legacy: LegacyPlugin<TProvides & {
        getRegistry: (options?: {
            package?: string;
        }) => RegistryResult;
    }>;
    /** The module-model plugins migrated off the legacy stack. */
    plugin: TPlugin;
}
/** One middleware layer on a method's chain: the wrap and its owning hook
 * (whose `imports` the wrap receives, built live at call time). */
interface MiddlewareWrap {
    run: MiddlewareFn;
    owner: HookPlugin;
}
/** A materialized method: a stable callable `value` that folds `chain` around
 * the core at call time. The chain is ordered dependents-outermost; it is
 * mutable so post-seal `addPlugin` middleware can append. */
interface MethodEntry {
    pluginType: "method";
    name: string;
    value: (input: any) => any;
    /** The import-facing twin of `value`: the same boundary, called with the
     * internal-call sentinel so surface-only concerns (the deprecation signal)
     * don't fire when a sibling plugin delegates. `buildImports` and
     * `resolvePlugin` bind this; the surface and registry bind `value`. Absent
     * on legacy graph entries (they bind `value`). */
    internalValue?: (input: any) => any;
    chain: MiddlewareWrap[];
    /** Carried from the descriptor for the registry / CLI / MCP / docs. */
    inputSchema?: z.ZodType;
    meta?: LeafMeta;
    /** Resolved output mode; the registry derives presentation from it. */
    output?: NormalizedOutput;
    /** Positional input projection (see Output): ordered canonical-input keys the
     * public callable / imports take as positional args. */
    positional?: readonly string[];
    /** Bound input resolvers (their imports captured at materialization), keyed by
     * param name. The CLI calls these with input only, no sdk. */
    resolvers?: Record<string, BoundResolver>;
    /** Bound output formatter (imports captured at materialization). */
    formatter?: BoundFormatter;
}
/** A materialized property: a static `value`, or a live `getValue` thunk that
 * re-derives the value per read (consumers install it as a getter on the surface
 * and on `imports`). Exactly one of `value` / `getValue` is set. */
interface PropertyEntry {
    pluginType: "property";
    name: string;
    value?: any;
    getValue?: () => any;
    /** Carried from the descriptor for the registry / CLI / MCP / docs. */
    meta?: LeafMeta;
    /** Carried from the descriptor: templated registry members for this
     * property's dynamic sub-surface (folded into the registry by getRegistry). */
    dynamicMembers?: readonly NormalizedDynamicMember[];
}
/** A materialized aggregate: its resolved export bindings to child values
 * (a method's callable or a property's value). */
interface AggregateEntry {
    pluginType: "aggregate";
    name: string;
    exports: Record<string, any>;
}
/** An entry in `context.plugins`. The `value`
 * of a method entry is its callable; of a property entry, its value. */
type PluginEntry = MethodEntry | PropertyEntry | AggregateEntry;
/**
 * The materialization substrate: every reachable plugin keyed by
 * id, plus the legacy-compat surface used during migration. The
 * compat fields let adapted function plugins read/write `context` exactly as
 * they do on the shipped stack: `meta` is the per-method registry source, `hooks`
 * the composed lifecycle hooks, and the index signature covers arbitrary legacy
 * fields a function plugin contributes (`api`, `options`, `manifest` helpers,
 * ...). A pure module-model SDK leaves `meta`/`hooks` empty and uses entry-level
 * metadata instead.
 */
interface SdkContext {
    plugins: Record<string, PluginEntry>;
    meta: Record<string, PluginMeta>;
    hooks: MethodHooks;
    /** The SDK surface: each callable/value binding name mapped to the leaf plugin
     * id it resolves to. This is what the consumer actually calls (the root's
     * re-exports plus `addPlugin` additions), so the registry reports entries by
     * binding (with meta from the leaf) rather than dumping `plugins` by id. An
     * aliased re-export (`{ hi: greet }`) appears here as `hi -> "greet"`. */
    surface: Record<string, string>;
    /** Teardown callbacks recorded at materialization, in build order
     * (dependencies first); `disposeSdk` walks them in reverse. */
    disposers?: SdkDisposer[];
    /** The first `disposeSdk` call's settled result; later calls return it
     * (idempotent, first input wins). */
    disposed?: Promise<void>;
    [key: string]: any;
}
/** One leaf's recorded teardown: built at materialization (closing over the
 * leaf's imports + setup state), run by `disposeSdk`. */
interface SdkDisposer {
    id: string;
    dispose: (input?: unknown) => void | Promise<void>;
}
/** The teardown callback a leaf declares beside `setup`, releasing what setup
 * acquired. `input` is whatever the caller passed to `disposeSdk` (untyped:
 * the framework does not bless a shape; each dispose narrows what it reads). */
type DisposeFn = (bag: {
    imports: any;
    state: unknown;
    input?: unknown;
}) => void | Promise<void>;
/** The surfaced shape of one re-exported child: a method's callable or a
 * property's value. */
type ExportSurface<TChild extends AnyLeafPlugin> = TChild extends MethodPlugin<any, infer TInput, infer TOutput, infer TPositional> ? SurfaceCall<TInput, TOutput, TPositional> : TChild extends PropertyPlugin<any, infer TValue> ? TValue : never;
/**
 * The SDK surface a plugin contributes, derived from its descriptor: a
 * method's callable or a property's value under its name, or an aggregate's
 * export bindings. No `SdkInternals` — this is the plugin's own slice, not a
 * whole SDK. The inference replacement for a hand-written
 * `<Name>PluginProvides` interface:
 *
 *   export type ListAppsPluginProvides = PluginSurface<typeof listAppsPlugin>;
 *
 * "Surface", not "Provides": `PluginProvides` is the legacy function-plugin
 * bag and `ProvidesOf` is the completeness ledger's phantom ids — both
 * different concepts.
 */
type PluginSurface<P extends AnyPlugin> = P extends MethodPlugin<infer TName, infer TInput, infer TOutput, infer TPositional> ? {
    [K in TName]: SurfaceCall<TInput, TOutput, TPositional>;
} : P extends PropertyPlugin<infer TName, infer TValue> ? {
    [K in TName]: TValue;
} : P extends AggregatePlugin<string, infer TExports> ? {
    [K in keyof TExports]: ExportSurface<TExports[K]>;
} : never;
/**
 * The framework-owned access an SDK carries beyond its string surface: the
 * legacy `context` string key (back-compat, narrows away later). The off-surface
 * `[CONTEXT]` symbol is attached at runtime (reach it via `getContext`) but kept
 * out of this type so it never leaks into a consumer's emitted declarations.
 */
type SdkInternals = {
    context: SdkContext;
};
/**
 * The materialized SDK for a leaf root: the root's callable (method) or value
 * (property) under its name, plus framework access.
 */
type Sdk$1<TName extends string, TInput, TOutput, TPositional extends readonly string[] = readonly []> = {
    [K in TName]: SurfaceCall<TInput, TOutput, TPositional>;
} & SdkInternals;
/** The materialized SDK for a property root: the value under its name. */
type PropertySdk<TName extends string, TValue> = {
    [K in TName]: TValue;
} & SdkInternals;
/**
 * The materialized SDK for an aggregate root: each export binding becomes a
 * surface entry, typed from the re-exported child (callable for a method,
 * value for a property).
 */
type AggregateSdk<TExports extends Record<string, AnyLeafPlugin>> = {
    [K in keyof TExports]: ExportSurface<TExports[K]>;
} & SdkInternals;
/**
 * The surface a plugin adds to an SDK when passed to `addPlugin`: a method
 * under its name, a property's value, an aggregate's export bindings, or a
 * legacy function plugin's root provides (minus `context`).
 */
type AddedSurface<P> = [P] extends [AnyPlugin] ? [
    PluginSurface<P>
] extends [never] ? Record<never, never> : PluginSurface<P> : P extends (sdk: any) => infer TProvides ? TProvides extends PluginProvides ? Omit<TProvides, "context"> : Record<never, never> : Record<never, never>;
/** `T` when it is a specific string literal, else `never`. Used on a stand-in's
 * `name` so the id is always captured as a literal: a widened `string` (or the
 * stale `declareMethod<TInput, TOutput>(...)` call shape, where the contract
 * lands in the name slot) is rejected at the call rather than silently
 * weakening the requirements ledger. */
type LiteralString<T extends string> = string extends T ? never : T;
declare const REQUIRES: unique symbol;
declare const PROVIDES: unique symbol;
/** Phantom carriers for the requirements ledger; never present at runtime. */
interface PluginSummary<TRequires extends string = never, TProvides extends string = never> {
    /** Declaration ids the plugin's subgraph still needs. @internal */
    readonly [REQUIRES]?: TRequires;
    /** Ids the plugin and its subgraph provide. @internal */
    readonly [PROVIDES]?: TProvides;
}
/** The declaration ids a plugin still needs (reads the phantom carrier). */
type RequiresOf<P> = P extends {
    readonly [REQUIRES]?: infer R;
} ? Extract<R, string> : never;
/** The ids a plugin and its subgraph provide (reads the phantom carrier). */
type ProvidesOf$1<P> = P extends {
    readonly [PROVIDES]?: infer R;
} ? Extract<R, string> : never;
/** Union the requires / provides across an inline imports or exports tuple. */
type RequiresIn<T extends readonly unknown[]> = RequiresOf<T[number]>;
type ProvidesIn<T extends readonly unknown[]> = ProvidesOf$1<T[number]>;
/**
 * Reject an `imports` / `exports` value whose type widened to a non-tuple
 * `Plugin[]`: a literal tuple has a literal `length`, a widened array has
 * `length: number`. Identity in the good (tuple) case, so `T & StaticList<T>`
 * infers `T` unchanged; an error brand in the bad case, which the passed array
 * is not assignable to.
 */
type StaticList<T extends readonly unknown[]> = number extends T["length"] ? {
    readonly __kitcoreError: "must be a fixed inline list of plugins, not a widened Plugin[]; declare them inline so the dependency graph stays statically known";
} : T;
/** A leaf provides its own name plus whatever its imports provide. */
type LeafProvides<TName extends string, TImports extends readonly unknown[]> = TName | ProvidesIn<TImports>;
/** A leaf requires its imports' requirements, minus what it provides. */
type LeafRequires<TName extends string, TImports extends readonly unknown[]> = Exclude<RequiresIn<TImports>, LeafProvides<TName, TImports>>;
/** An aggregate provides its own name plus its imports' and exports' provides. */
type AggregateProvides<TName extends string, TImports extends readonly unknown[], TExports extends readonly unknown[]> = TName | ProvidesIn<TImports> | ProvidesIn<TExports>;
/** An aggregate requires its imports' and exports' requirements, minus provides. */
type AggregateRequires<TName extends string, TImports extends readonly unknown[], TExports extends readonly unknown[]> = Exclude<RequiresIn<TImports> | RequiresIn<TExports>, AggregateProvides<TName, TImports, TExports>>;
/** A plugin's id as a type: `namespace/name`, or bare `name` when the namespace
 * is empty. The ledger keys on this (matching runtime id resolution), not the
 * bare name, so same-named plugins in different namespaces stay distinct. */
type IdOf<TNamespace extends string, TName extends string> = TNamespace extends "" ? TName : `${TNamespace}/${TName}`;
/** The binding name of an id: its last `/`-separated segment. The inverse view
 * of `IdOf`, used by `declare*` to derive the bare binding from a full id. */
type LastSegment<TId extends string> = TId extends `${string}/${infer Rest}` ? LastSegment<Rest> : TId;
/** The `PluginSummary` a leaf carries, keyed on its full id. */
type LeafSummary<TNamespace extends string, TName extends string, TImports extends readonly unknown[]> = PluginSummary<LeafRequires<IdOf<TNamespace, TName>, TImports>, LeafProvides<IdOf<TNamespace, TName>, TImports>>;
/** The `PluginSummary` an aggregate carries, keyed on its full id. */
type AggregateSummary<TNamespace extends string, TName extends string, TImports extends readonly unknown[], TExports extends readonly unknown[]> = PluginSummary<AggregateRequires<IdOf<TNamespace, TName>, TImports, TExports>, AggregateProvides<IdOf<TNamespace, TName>, TImports, TExports>>;
/**
 * The runtime-input channel for `createSdk`. `configuration` maps plugin ids to
 * immutable values; each entry materializes as a static value property under
 * that id, satisfying a `declareProperty` / `declareOptionalProperty` stand-in exactly
 * as a registered provider would (DI value injection). Strict at build time:
 * an id must resolve to a property stand-in reachable from the root, so
 * unknown ids, non-property targets, and collisions with a registered real
 * provider all throw. kitcore keeps the map untyped; a head's factory is the
 * typed wrapper (`createMySdk(options)` passes
 * `{ configuration: { "my/config": options } }`).
 */
interface CreateSdkOptions {
    configuration?: Record<string, unknown>;
}
/** Surfaced by `createSdk` when reachable declarations have no provider. */
interface MissingDependencies<TIds extends string> {
    readonly __kitcoreError: "Missing concrete provider(s) for required declaration id(s)";
    readonly missing: TIds;
}
/**
 * `unknown` when every reachable declaration is provided, otherwise a
 * `MissingDependencies` brand. `createSdk` takes `root: P & CompletenessOf<P>`,
 * so a complete root infers `P` unchanged (intersect `unknown`) while an
 * incomplete one fails to assign (the argument lacks `missing`).
 */
type CompletenessOf<P> = [
    Exclude<RequiresOf<P>, ProvidesOf$1<P>>
] extends [never] ? unknown : MissingDependencies<Exclude<RequiresOf<P>, ProvidesOf$1<P>>>;
/** Recover the materialized SDK type for a checked root (the summary that
 * rides on the `define*` return is transparent to these). */
type MethodSdkOf<P> = P extends MethodPlugin<infer TName, infer TInput, infer TOutput, infer TPos> ? Sdk$1<TName, TInput, TOutput, TPos> : never;
type PropertySdkOf<P> = P extends PropertyPlugin<infer TName, infer TValue> ? PropertySdk<TName, TValue> : never;
type AggregateSdkOf<P> = P extends AggregatePlugin<string, infer TExports> ? AggregateSdk<TExports> : never;

/**
 * Declaration for a registry category (a bucket grouping related functions).
 * Plugins reference categories in their `meta.categories` field, as either a
 * bare key (auto-derive title and plural) or this object (override either).
 *
 * Examples (with auto-derive rules):
 * - `{ key: "app" }`               → title "App", plural "Apps"
 * - `{ key: "client-credentials" }` → title "Client Credentials", plural "Client Credentials"
 * - `{ key: "utility" }`           → title "Utility", plural "Utilities"
 * - `{ key: "http", title: "HTTP Request" }` → plural "HTTP Requests"
 */
interface CategoryDefinition {
    key: string;
    /** Display title for the category. Auto-derived from `key` if omitted. */
    title?: string;
    /** Plural form of `title`. Auto-derived from the resolved title if omitted. */
    titlePlural?: string;
}
interface FunctionRegistryEntry<TSdk = any> {
    name: string;
    /**
     * Human-readable description of the function. Surfaced wherever the
     * registry is consumed (command help, tool/RPC descriptions, generated
     * documentation). Prefer providing this directly rather than relying
     * solely on inputSchema.describe().
     */
    description?: string;
    type?: "list" | "item" | "create" | "update" | "delete" | "function";
    itemType?: string;
    returnType?: string;
    inputSchema?: z.ZodSchema;
    inputParameters?: Array<{
        name: string;
        schema: z.ZodSchema;
    }>;
    outputSchema?: z.ZodSchema;
    /**
     * Ordered input keys the public surface projects onto positional arguments
     * (the method's `positional` declaration). Absent when the method takes only
     * the canonical single bag. Lifted off the materialized method entry by the
     * surface builder, like `boundResolvers` — a runtime projection, not
     * descriptive meta.
     */
    positional?: readonly string[];
    categories: string[];
    resolvers?: Record<string, ResolverMetadata<TSdk, any, any>>;
    /**
     * Per-parameter bound resolvers from the new model (imports already captured,
     * called with `input` only, no sdk). Parallel to the legacy `resolvers` field
     * and `formatter`: the surface builder lifts these off the materialized method
     * entry. Additive bridge — populated for migrated `defineMethod` plugins; the
     * legacy `resolvers` field above stays the source for unmigrated ones.
     */
    boundResolvers?: Record<string, BoundResolver>;
    packages?: string[];
    /**
     * True if the plugin is registered only in the experimental SDK
     * factory. See `PluginMeta.experimental`.
     */
    experimental?: boolean;
    /** Confirmation prompt type - prompts user before executing */
    confirm?: "create-secret" | "delete";
    /**
     * Optional deprecation metadata for commands.
     */
    deprecation?: FunctionDeprecation;
    /**
     * Short aliases for parameter names (e.g., { request: "X", header: "H" }).
     * Consumers that render the function as a flag-style command surface use
     * these as short forms.
     */
    aliases?: Record<string, string>;
    /**
     * Output formatter, normalized to the bound runtime shape (its imports/sdk
     * already captured), so consumers call `getContext`/`format` with no sdk.
     * The surface builder produces this from the method entry — `entry.formatter`
     * for a migrated plugin, or the legacy `meta.formatter` adapted — so vintage
     * is invisible here.
     */
    formatter?: BoundFormatter;
    /** Defaults to true. Set to false to suppress --json (e.g. login/logout/init). */
    supportsJsonOutput: boolean;
}
interface FunctionDeprecation {
    /** User-facing deprecation message for why/how to migrate */
    message: string;
}
interface RegistryResult<TSdk = any> {
    functions: FunctionRegistryEntry<TSdk>[];
    categories: {
        key: string;
        title: string;
        titlePlural: string;
        functions: string[];
    }[];
}

/**
 * ------------------------------
 * Plugin Type System
 * ------------------------------
 *
 * Plugins receive the sdk as a positional parameter. sdk.context holds shared
 * internal state (api client, event emission, meta, options, etc.). SDK methods
 * live at the root, context nests under .context.
 *
 * A plugin is (sdk) => partialSdk. `createPluginStack()` accumulates plugins
 * and materializes a built `Sdk` via `.toSdk()`; `addPlugin(sdk, plugin)`
 * extends an already-built SDK in place with one more plugin.
 */

interface PluginProvides extends Record<string, any> {
    context?: {
        meta?: Record<string, PluginMeta<any>>;
        hooks?: MethodHooks;
        [key: string]: any;
    };
}
interface PluginMeta<TSdk = unknown> {
    /**
     * Human-readable description of the plugin function. Used by the CLI (help text),
     * MCP (tool description), and README generators. When omitted, falls back to
     * the inputSchema's `.describe()` value or a generic placeholder.
     */
    description?: string;
    /**
     * Buckets this function belongs to in `getRegistry()` output. Each entry is
     * either a bare key (`"app"`) for auto-derived titles or a {@link CategoryDefinition}
     * object to override the title or plural. Only one plugin needs to supply
     * the object form per category key; object refs win over string refs, so
     * other plugins in the same bucket can stay on bare strings.
     */
    categories?: (string | CategoryDefinition)[];
    type?: "list" | "item" | "create" | "update" | "delete" | "function";
    itemType?: string;
    returnType?: string;
    inputSchema?: z.ZodSchema;
    outputSchema?: z.ZodSchema;
    /**
     * Item formatter that the registry hands to the CLI/MCP renderer. The
     * `sdk` param on `fetch` is typed to the plugin's own declared SDK
     * surface (`TRequires & TProvides`); reaching into another plugin's
     * method requires adding it to `TRequires` explicitly.
     */
    formatter?: OutputFormatter<TSdk, any, any, any>;
    /**
     * Per-parameter resolver metadata. Same `TSdk` surfaces in each
     * resolver's `fetch`/`tryResolveWithoutPrompt` callbacks.
     */
    resolvers?: Record<string, ResolverMetadata<TSdk, any, any>>;
    /** Confirmation prompt type - prompts user before executing */
    confirm?: "create-secret" | "delete";
    /**
     * Marks this plugin as experimental — wrappers can keep it out of
     * their stable build (typically by gating it behind an
     * `experimental` subpath import) and the registry can badge it in
     * generated docs / CLI help. No runtime capability check.
     */
    experimental?: boolean;
    [key: string]: any;
}
/**
 * Plugin interface — 2 type params:
 *
 *   TSdk = what this plugin needs (the SDK shape including context)
 *   TProvides = what this plugin returns (a partial SDK shape)
 *
 * The sdk param always includes context.meta, even if TSdk doesn't declare it.
 */
interface Plugin<TSdk = {}, TProvides extends PluginProvides = PluginProvides> {
    (sdk: TSdk & {
        context: {
            meta: Record<string, PluginMeta<any>>;
            hooks: MethodHooks;
        };
    }): TProvides;
}
/**
 * A built SDK. Carries the plugins' contributions plus the
 * `getRegistry` accessor over `context.meta`. No `addPlugin` method
 * on the shape: extension after build goes through the top-level
 * `addPlugin(sdk, plugin)` function, which mutates the sdk in place
 * and narrows the caller's binding via TypeScript's assertion
 * functions.
 */
type Sdk<T = {
    context: {
        meta: Record<string, PluginMeta<any>>;
        hooks: MethodHooks;
    };
}> = T & {
    getRegistry(options?: {
        package?: string;
    }): RegistryResult<T>;
};

/**
 * ------------------------------
 * Plugin authoring helpers
 * ------------------------------
 *
 * - `createPluginMethod` / `createPaginatedPluginMethod`: per-method
 *   primitives that sit inside a `definePlugin` callback and build the
 *
 *     { [name]: wrappedFn, context: { meta: { [name]: meta } } }
 *
 *   fragment a plugin returns for a single method, wiring up
 *   `createFunction` / `createPaginatedFunction`, the method-call hooks,
 *   and the doubled `name` (function key + meta key) in one place.
 *
 * Two method helpers (rather than one with a `paginated: true` discriminant)
 * because the handler signature changes shape across pagination, and
 * discriminated unions on optional booleans produce noisy TS errors.
 *
 * @deprecated The module model replaces this exit; it logs a runtime
 * deprecation and will be removed in a release after this warning ships.
 */

/**
 * Method-level meta fields. Mirrors `PluginMeta` minus `inputSchema`, which is
 * passed at the top level alongside the handler and merged into the meta by
 * the helpers themselves.
 *
 * @deprecated The module model replaces this exit; it logs a runtime
 * deprecation and will be removed in a release after this warning ships.
 */
type MethodMeta<TSdk> = Omit<PluginMeta<TSdk>, "inputSchema">;
/**
 * The plugin's own method signature, synthesized from the method config.
 * Mixed into the resolver-side SDK so a resolver may freely reference the
 * host plugin's own method (e.g. `appKeyResolver` calling `sdk.getApp`)
 * without forcing the plugin to declare a circular dependency on itself.
 *
 * Uses `any` for options and return: we only need to assert the method
 * exists on `sdk`, not pin its full signature. Using `TInput`/`TResult`
 * here would create a circular inference (TSdk depends on TInput/TResult
 * via the resolvers slot, TInput/TResult are inferred from the handler
 * which depends on TSdk), and TS resolves the cycle by widening to
 * `unknown`. With `any`, the resolver check still verifies the method's
 * presence on the SDK; signature precision for self is the plugin
 * author's responsibility.
 *
 * Not mixed into the handler's `sdk`: handlers run against the SDK that
 * existed when the plugin was added to the stack (closure-captured), so
 * self-method access there would be a lie at runtime.
 *
 * @deprecated The module model replaces this exit; it logs a runtime
 * deprecation and will be removed in a release after this warning ships.
 */
type SelfMethod<TName extends string> = {
    [K in TName]: (options?: any) => any;
};
interface PluginMethodConfig<TSdk, TInput, TResult, TName extends string, TResolvers> extends Omit<MethodMeta<TSdk>, "resolvers"> {
    name: TName;
    /**
     * Schema for runtime input validation; drives the handler's `options`
     * type. For plugins that accept deprecated parameter aliases this is a
     * `z.union([CanonicalSchema, DeprecatedSchema])` — the registry
     * unwraps unions and exposes only the first variant (canonical) to
     * documentation and downstream consumer surfaces.
     *
     * @deprecated The module model replaces this exit; it logs a runtime
     * deprecation and will be removed in a release after this warning ships.
     */
    inputSchema?: z.ZodSchema<TInput>;
    handler: (args: {
        sdk: TSdk;
        options: TInput;
    }) => Promise<TResult>;
    /**
     * Per-parameter resolvers. Each entry's `TSdk` requirement is checked
     * against the plugin's own `TSdk` (plus the plugin's own method via
     * {@link SelfMethod}) using {@link ValidResolvers}; mismatches surface
     * at the offending key. `NoInfer` pins `TSdk` to the `sdk` argument so
     * resolver entries don't widen the inferred `TSdk`.
     *
     * @deprecated The module model replaces this exit; it logs a runtime
     * deprecation and will be removed in a release after this warning ships.
     */
    resolvers?: ValidResolvers<NoInfer<TSdk & SelfMethod<TName>>, TResolvers> & TResolvers;
}
type PluginMethodReturn<TName extends string, TInput, TResult> = {
    [K in TName]: (options?: TInput) => Promise<TResult>;
} & {
    context: {
        meta: {
            [K in TName]: PluginMeta;
        };
    };
};
/**
 * Build the method fragment for a non-paginated SDK method. Used inside a
 * `definePlugin(...)` callback:
 *
 *   export const getProfilePlugin = definePlugin(
 *     (sdk: ApiPluginProvides & EventEmissionProvides) =>
 *       createPluginMethod(sdk, {
 *         name: "getProfile",
 *         categories: ["account"],
 *         inputSchema: GetProfileSchema,
 *         handler: async ({ sdk }) => { ... },
 *       }),
 *   );
 *
 * @deprecated The module model replaces this exit; it logs a runtime
 * deprecation and will be removed in a release after this warning ships.
 */
declare function createPluginMethod<const TName extends string, TSdk extends {
    context: unknown;
}, TInput, TResult, const TResolvers extends Record<string, ResolverMetadata<any, any, any>> = {}>(sdk: TSdk, config: PluginMethodConfig<TSdk, TInput, TResult, TName, TResolvers>): PluginMethodReturn<TName, TInput, TResult>;
interface PaginatedPluginMethodConfigBase<TSdk, TInput, TName extends string, TResolvers> extends Omit<MethodMeta<TSdk>, "resolvers"> {
    name: TName;
    /** Same semantics as `createPluginMethod`'s `inputSchema`. */
    inputSchema?: z.ZodSchema<TInput>;
    /**
     * Optional default page size when the caller doesn't pass one. Mirrors
     * `createPaginatedFunction`'s `defaultPageSize` arg.
     */
    defaultPageSize?: number;
    /** See {@link PluginMethodConfig.resolvers}. */
    resolvers?: ValidResolvers<NoInfer<TSdk & SelfMethod<TName>>, TResolvers> & TResolvers;
}
/**
 * A page whose *only* own keys are `data` / `nextCursor`. Used to constrain
 * the Standard overload: a raw envelope with extra keys (a JSON:API
 * `links`/`meta`, a top-level `next`, etc.) is NOT a `StrictPage`, so it falls
 * through to the Adapted overload and `adaptPage` becomes required. Each excess
 * key is mapped to `?: never`, which a real value (e.g. `links: {...}`) can't
 * satisfy — that's what a plain `SdkPage` assignability check (which allows
 * excess keys structurally) misses.
 */
type StrictPage<TResponse> = SdkPage<unknown> & {
    [K in Exclude<keyof TResponse, keyof SdkPage<unknown>>]?: never;
};
/**
 * Config for a paginated method whose handler already returns a clean page
 * (`{ data, nextCursor? }` and nothing else — see `StrictPage`, enforced on
 * the overload). No `adaptPage` needed; `TItem` is sourced from the handler's
 * `data`. Interface extension keeps this a single flattened object type (not
 * an intersection), preserving clean inference of the `resolvers` /
 * `TResolvers` slot.
 */
interface PaginatedPluginMethodConfigStandard<TSdk, TInput, TResponse, TName extends string, TResolvers> extends PaginatedPluginMethodConfigBase<TSdk, TInput, TName, TResolvers> {
    handler: (args: {
        sdk: TSdk;
        options: TInput & {
            cursor?: string;
            pageSize?: number;
        };
    }) => Promise<TResponse>;
    /** No adapter: the handler already returns a page. */
    adaptPage?: undefined;
}
/**
 * Config for a paginated method whose handler returns a raw upstream shape
 * (`TResponse`, e.g. a JSON:API `links.next` envelope). `adaptPage` is required
 * to translate it into a page. `TItem` is sourced from `TResponse` (`ItemOf`),
 * not the adapter — the adapter is item-agnostic (relocates the cursor; items
 * are finalized in the handler's `data`), hence `NoInfer`, so a generic adapter
 * (e.g. `<T>(r) => SdkPage<T>`) doesn't collapse `TItem` to `unknown`.
 */
interface PaginatedPluginMethodConfigAdapted<TSdk, TInput, TResponse, TItem, TName extends string, TResolvers> extends PaginatedPluginMethodConfigBase<TSdk, TInput, TName, TResolvers> {
    handler: (args: {
        sdk: TSdk;
        options: TInput & {
            cursor?: string;
            pageSize?: number;
        };
    }) => Promise<TResponse>;
    adaptPage: (response: TResponse) => SdkPage<NoInfer<TItem>>;
}
type ItemOf<TResponse> = TResponse extends SdkPage<infer TItem> ? TItem : TResponse extends {
    data: readonly (infer TItem)[];
} ? TItem : never;
type PaginatedPluginMethodReturn<TName extends string, TInput, TItem> = {
    [K in TName]: (options?: TInput & {
        cursor?: string;
        pageSize?: number;
        maxItems?: number;
    }) => PaginatedSdkResult<TItem>;
} & {
    context: {
        meta: {
            [K in TName]: PluginMeta;
        };
    };
};
/**
 * Paginated variant of `createPluginMethod`. Two overloads enforce the
 * response contract at compile time:
 *
 *  - **Standard** — the handler returns a strict `SdkPage<TItem>`
 *    (`{ data, nextCursor? }` and nothing else); no `adaptPage`.
 *  - **Adapted** — the handler returns a raw upstream shape and `adaptPage` is
 *    *required* to translate it.
 *
 * A handler that returns neither a page-like shape nor pairs a raw shape with
 * `adaptPage` matches no overload and is a compile error.
 *
 *   createPaginatedPluginMethod(sdk, {
 *     name: "listThings",
 *     inputSchema: ListThingsSchema,
 *     adaptPage: (res) => ({ data: res.items, nextCursor: res.next }),
 *     handler: ({ sdk, options }) => sdk.context.api.get("/things", { ... }),
 *   });
 *
 * @deprecated The module model replaces this exit; it logs a runtime
 * deprecation and will be removed in a release after this warning ships.
 */
declare function createPaginatedPluginMethod<const TName extends string, TSdk extends {
    context: unknown;
}, TInput, TResponse extends StrictPage<TResponse>, TItem = ItemOf<TResponse>, const TResolvers extends Record<string, ResolverMetadata<any, any, any>> = {}>(sdk: TSdk, config: PaginatedPluginMethodConfigStandard<TSdk, TInput, TResponse, TName, TResolvers>): PaginatedPluginMethodReturn<TName, TInput, TItem>;
declare function createPaginatedPluginMethod<const TName extends string, TSdk extends {
    context: unknown;
}, TInput, TResponse, TItem = ItemOf<TResponse>, const TResolvers extends Record<string, ResolverMetadata<any, any, any>> = {}>(sdk: TSdk, config: PaginatedPluginMethodConfigAdapted<TSdk, TInput, TResponse, TItem, TName, TResolvers>): PaginatedPluginMethodReturn<TName, TInput, TItem>;
/**
 * Maps a tuple of plugins to a tuple of their TSdk requirement types.
 *
 *   SdkRequirementsOf<[Plugin<{ api }, _>, Plugin<{ options }, _>]>
 *     = [{ api }, { options }]
 */
type SdkRequirementsOf<T extends readonly Plugin<any, any>[]> = {
    [K in keyof T]: T[K] extends Plugin<infer Sdk, any> ? Sdk : never;
};
/**
 * Maps a tuple of plugins to a tuple of their TProvides output types.
 *
 *   ProvidesOf<[Plugin<_, { hello }>, Plugin<_, { goodbye }>]>
 *     = [{ hello }, { goodbye }]
 */
type ProvidesOf<T extends readonly Plugin<any, any>[]> = {
    [K in keyof T]: T[K] extends Plugin<any, infer Provides> ? Provides : never;
};
/**
 * Intersects every member of a tuple into a single combined type. The
 * result is an object that has every property of every member at once.
 *
 *   IntersectAll<[{ api }, { options }]> = { api } & { options }
 *   IntersectAll<[]>                     = {}
 *
 * Walks recursively: head & IntersectAll<tail>, base case is the empty
 * tuple. Why intersection (`&`) and not union (`|`): the composed plugin
 * must require ALL of the sub-plugins' needs at once — an SDK that has
 * both `api` AND `options` — not "either api or options."
 */
type IntersectAll<T extends readonly unknown[]> = T extends readonly [
    infer Head,
    ...infer Tail
] ? Head & IntersectAll<Tail> : {};
/**
 * The TSdk a composed plugin requires: every sub-plugin's TSdk requirement,
 * all at once. Composing a plugin that needs `{ api }` with one that needs
 * `{ options }` yields a composed plugin that needs `{ api } & { options }`.
 */
type ComposeSdk<T extends readonly Plugin<any, any>[]> = IntersectAll<SdkRequirementsOf<T>>;
/**
 * What a composed plugin provides: every sub-plugin's TProvides combined.
 * Composing a plugin that provides `{ hello }` with one that provides
 * `{ goodbye }` yields `{ hello } & { goodbye }`.
 */
type ComposeProvides<T extends readonly Plugin<any, any>[]> = IntersectAll<ProvidesOf<T>>;
/**
 * @deprecated Use {@link createPluginStack} instead. It carries the same
 * collision-detection and hook-composition behavior and supports
 * per-step `{ override: true }` for intentional duplicates. Migration
 * (note the stack emits a definition, not a bare function):
 *
 *   composePlugins(a, b, c)
 *   //  →
 *   createPluginStack().use(a).use(b).use(c).toPlugin({ name: "bundle" })
 *
 * Bundles N plugins into a single plugin so a consumer can call
 * `.use(combined)` once on a stack. Bag mode: sub-plugins must not
 * depend on each other; TSdk on sub-plugins is the intersection of
 * every sub-plugin's requirements (so the type system never exposes
 * one sub-plugin's contributions to another).
 */
declare function composePlugins<const Ts extends readonly Plugin<any, any>[]>(...plugins: Ts): Plugin<ComposeSdk<Ts>, ComposeProvides<Ts>>;
/**
 * A typed builder that accumulates plugins into an immutable linked list.
 * Each `.use` returns a new stack instance (cons-style); the original
 * stack stays usable for branching. Call `toPlugin()` to collapse the
 * accumulated chain into a single `Plugin<TRequires, TProvides>`.
 *
 * Type params: `TRequires` is the external surface declared on
 * `createPluginStack<TRequires>()` (what the outer sdk will provide);
 * `TProvides` accumulates every registration's provides.
 */
interface PluginStack<TRequires, TProvides extends PluginProvides> {
    /**
     * Register a bare plugin function. Its required surface is constrained
     * to `TRequires & TProvides` (the external requirements plus everything
     * provided by earlier `.use` calls), so registration order is enforced
     * per step: a plugin that reads a dependency at construction can only be
     * registered after a plugin that provides it. This stack collapses to a
     * single function plugin and runs its entries in registration order, so
     * the type-level order matches the runtime order.
     *
     * `{ override: true }` lets a registration replace an earlier root/meta
     * key it would otherwise collide with.
     */
    use<TNewProvides extends PluginProvides>(plugin: Plugin<TRequires & TProvides, TNewProvides>, options?: {
        override?: boolean;
    }): PluginStack<TRequires, TProvides & TNewProvides>;
    /**
     * Collapse the accumulated registrations into a single bare function
     * plugin. Its TSdk is `TRequires` (the declared external surface);
     * in-stack inter-plugin dependencies are resolved when its setup runs.
     * A head lifts it into the module model with `fromFunctionPlugin`.
     */
    toPlugin(): Plugin<TRequires, TProvides>;
    /**
     * Build the stack into a sealed, ready-to-use SDK. Eagerly applies the
     * resolved order: each plugin runs once during `toSdk`, contributions
     * merge into a single accumulator, and the result is wrapped as an
     * `Sdk<TRequires & TProvides>`. The returned SDK has `context` and
     * `getRegistry`, but no plugin-registration method.
     * To extend a built SDK, use the top-level {@link addPlugin}.
     */
    toSdk(): Sdk<TRequires & TProvides>;
}
/**
 * Create an empty plugin stack. Pass a type parameter to declare external
 * SDK requirements that every plugin in the stack can rely on:
 *
 *   const tablesPlugin = createPluginStack<FetchPluginProvides>()
 *     .use(apiPlugin)
 *     .use(listTablesPlugin)
 *     .use(getTablePlugin)
 *     .toPlugin({ name: "tables" });
 *
 *   const sdk = createPluginStack()
 *     .use(fetchPlugin)   // provides FetchPluginProvides
 *     .use(tablesPlugin)  // PluginDefinition<FetchPluginProvides, ...>
 *     .toSdk();
 *
 * The stack itself is immutable: calling `.use` returns a new stack
 * without mutating the original, so you can branch off a base stack for
 * different consumers. Until the stack materializes, no plugin functions
 * run.
 */
/**
 * @deprecated The module model replaces this exit; it logs a runtime
 * deprecation and will be removed in a release after this warning ships.
 */
declare function createPluginStack<TRequires = object>(): PluginStack<TRequires, {
    context: {
        meta: Record<string, PluginMeta>;
        hooks: MethodHooks;
    };
}>;

/**
 * Define a method leaf. The plugin IS the function; `createSdk` (or a
 * dependent's `imports`) binds it under its bare `name`. `imports` is typed
 * from the declared `imports` array. `namespace` sets the plugin's id
 * (`namespace/name`).
 *
 * The `output` mode shapes `run`'s result into the public surface and drives
 * the overload that types the call: raw (default, passthrough), `item`
 * (`run` returns `{ data: T }`, surfaced as `Promise<{ data: T }>`), or `list`
 * (`run` returns one `SdkPage`, surfaced as `PaginatedSdkResult`). See Output.
 */
declare function defineMethod<const TName extends string, TInput, TOutput, const TPositional extends readonly (keyof TInput & string)[] = readonly [], const TImports extends ImportsInput = readonly [], const TNamespace extends string = "", TState = undefined>(config: {
    name: TName;
    namespace?: TNamespace;
    imports?: TImports & StaticList<TImports>;
    /** Validates `input` and drives its type: when given, `input` is the schema's
     * output and no `run` annotation is needed. */
    inputSchema?: z.ZodType<TInput>;
    /** Skip the runtime parse of `input`; `run` gets it untouched (the schema
     * stays for projection). For raw methods that validate their own input, like
     * `fetch`. See {@link MethodPlugin.skipInputValidation}. */
    skipInputValidation?: boolean;
    resolvers?: Record<string, Resolver>;
    formatter?: Formatter;
    output?: "raw" | {
        type: "raw";
    };
    positional?: TPositional;
    setup?: (bag: {
        imports: ImportsOf<TImports>;
    }) => TState;
    dispose?: (bag: {
        imports: ImportsOf<TImports>;
        state: TState;
        input?: unknown;
    }) => void | Promise<void>;
    run: (bag: MethodRunBag<ImportsOf<TImports>, TInput, TState>) => TOutput;
} & LeafMetaFields): MethodPlugin<TName, TInput, TOutput, TPositional> & LeafSummary<TNamespace, TName, TImports>;
declare function defineMethod<const TName extends string, TInput, TResponse extends StrictItem<TResponse>, TData = DataOf<TResponse>, const TImports extends ImportsInput = readonly [], const TNamespace extends string = "", TState = undefined>(config: {
    name: TName;
    namespace?: TNamespace;
    imports?: TImports & StaticList<TImports>;
    inputSchema?: z.ZodType<TInput>;
    resolvers?: Record<string, Resolver>;
    formatter?: Formatter;
    output: "item" | {
        type: "item";
    };
    setup?: (bag: {
        imports: ImportsOf<TImports>;
    }) => TState;
    dispose?: (bag: {
        imports: ImportsOf<TImports>;
        state: TState;
        input?: unknown;
    }) => void | Promise<void>;
    run: (bag: MethodRunBag<ImportsOf<TImports>, TInput, TState>) => TResponse | Promise<TResponse>;
} & LeafMetaFields): MethodPlugin<TName, TInput, Promise<{
    data: TData;
}>> & LeafSummary<TNamespace, TName, TImports>;
declare function defineMethod<const TName extends string, TInput, TResponse extends StrictPage$1<TResponse>, TItem = ItemOf$1<TResponse>, const TImports extends ImportsInput = readonly [], const TNamespace extends string = "", TState = undefined>(config: {
    name: TName;
    namespace?: TNamespace;
    imports?: TImports & StaticList<TImports>;
    inputSchema?: z.ZodType<TInput>;
    resolvers?: Record<string, Resolver>;
    formatter?: Formatter;
    output: "list" | {
        type: "list";
        adaptPage?: undefined;
        defaultPageSize?: number;
    };
    setup?: (bag: {
        imports: ImportsOf<TImports>;
    }) => TState;
    dispose?: (bag: {
        imports: ImportsOf<TImports>;
        state: TState;
        input?: unknown;
    }) => void | Promise<void>;
    run: (bag: MethodRunBag<ImportsOf<TImports>, TInput & PageFetchInput, TState>) => TResponse | Promise<TResponse>;
} & LeafMetaFields): MethodPlugin<TName, TInput & PaginatedCallInput, PaginatedSdkResult<TItem>> & LeafSummary<TNamespace, TName, TImports>;
declare function defineMethod<const TName extends string, TInput, TResponse, TItem, const TImports extends ImportsInput = readonly [], const TNamespace extends string = "", TState = undefined>(config: {
    name: TName;
    namespace?: TNamespace;
    imports?: TImports & StaticList<TImports>;
    inputSchema?: z.ZodType<TInput>;
    resolvers?: Record<string, Resolver>;
    formatter?: Formatter;
    output: {
        type: "list";
        adaptPage: (response: TResponse) => SdkPage<TItem>;
        defaultPageSize?: number;
    };
    setup?: (bag: {
        imports: ImportsOf<TImports>;
    }) => TState;
    dispose?: (bag: {
        imports: ImportsOf<TImports>;
        state: TState;
        input?: unknown;
    }) => void | Promise<void>;
    run: (bag: MethodRunBag<ImportsOf<TImports>, TInput & PageFetchInput, TState>) => TResponse | Promise<TResponse>;
} & LeafMetaFields): MethodPlugin<TName, TInput & PaginatedCallInput, PaginatedSdkResult<TItem>> & LeafSummary<TNamespace, TName, TImports>;
/**
 * Define a method override: a meta-only patch over an already-defined method.
 * Give it the `target` method's id (its bare name if namespace-less) and any of
 * the public {@link LeafMetaFields} (`deprecation`, `packages`, `description`,
 * `categories`, `confirm`, ...); after the SDK materializes, those fields merge
 * onto the target method's entry so the registry / CLI / MCP / docs project the
 * patched values. The target's `run` and resolvers are untouched.
 *
 * Use it for surface-specific tweaks a base method should not carry (e.g. a CLI
 * that deprecates `fetch` while the SDK does not). It fails loud at build if the
 * target does not resolve to a method. Include the override in an aggregate's
 * `imports` to apply it during `createSdk`, or `addPlugin(sdk, override)` to
 * apply it to a built SDK.
 */
declare function defineMethodOverride<const TTarget extends string>(config: {
    target: TTarget;
    namespace?: string;
} & LeafMetaFields): MethodOverridePlugin;
/**
 * Define an input resolver: a method attachment for one of its parameters. Like
 * `defineMethod` it declares its own `imports`, and its callbacks receive a
 * narrowed `imports` bag, NOT the whole SDK. The graph reaches its imports
 * (materialize + dedup) but they never enter the host method's run-bag, so a
 * resolver may even import its own host method. At createSdk the imports are
 * captured, so the CLI later calls `listItems(input)` / `tryResolveWithoutPrompt
 * (input)` with no sdk argument.
 *
 * The `type` selects the kind (a {@link Resolver} union member); the config
 * narrows to it. `requireParameters` names sibling parameters that must resolve
 * first (it reads their values from `input`), independent of `imports` (the
 * SDK-capability graph). `object` / `array` resolvers compose nested resolvers;
 * an import-bearing resolver reached from a built field lives in `definitions`
 * (reached by `{ ref }`), since it can't be inlined when the field set is built
 * dynamically.
 */
declare function defineResolver<const TImports extends ImportsInput = readonly [], TItem = unknown, TInput = Record<string, unknown>, TContext = unknown>(config: {
    type?: "dynamic";
    imports?: TImports & StaticList<TImports>;
    requireParameters?: readonly string[];
    inputType?: "text" | "password" | "email" | "search";
    placeholder?: string;
    /** Compute side-context once, before `listItems` (pre-fetch, no items yet),
     * with the narrowed `imports`. Its result flows into `listItems` and `prompt`
     * as `context`, so one place resolves what both the fetch and the render need
     * (e.g. a capability gate). May re-run across re-asks; keep it cheap. */
    getContext?: (bag: {
        imports: ImportsOf<TImports>;
        input: TInput;
    }) => PromiseLike<TContext>;
    /** Produce the candidate list. Behaves like an SDK list method (returns a page
     * / paginated result, never a bare array). `cursor` is the stateless "load
     * more" re-entry hook. Required: a dynamic resolver IS a candidate-lister;
     * use `type: "static"` for a free-text field. */
    listItems: (bag: {
        imports: ImportsOf<TImports>;
        input: TInput;
        /** The value `getContext` returned, if any. */
        context?: TContext;
        /** Free-text term the CLI injects for search-mode resolvers; a separate key
         * from `input`, so it never collides with a parameter named `search`. */
        search?: string;
        cursor?: string;
    }) => ListItemsResult<TItem>;
    prompt?: (bag: {
        items: TItem[];
        input: TInput;
        /** The value `getContext` returned, if any. */
        context?: TContext;
    }) => ResolverPromptConfig;
    /** Resolve with no user input (e.g. a configured default), skipping the prompt. */
    tryResolveWithoutPrompt?: (bag: {
        imports: ImportsOf<TImports>;
        input: TInput;
    }) => Promise<{
        resolvedValue: unknown;
    } | null>;
    /** Search-mode exact match: the typed `search` already names a valid value, so
     * return it and skip the picker. Returns null to fall through to `listItems`. */
    tryResolveFromSearch?: (bag: {
        imports: ImportsOf<TImports>;
        input: TInput;
        search?: string;
    }) => Promise<{
        resolvedValue: unknown;
    } | null>;
}): DynamicResolver;
declare function defineResolver(config: {
    type: "static";
    requireParameters?: readonly string[];
    inputType?: "text" | "password" | "email" | "search";
    placeholder?: string;
}): StaticResolver;
declare function defineResolver(config: {
    type: "constant";
    value: unknown;
    requireParameters?: readonly string[];
}): ConstantResolver;
declare function defineResolver(config: {
    type: "info";
    text: string;
}): InfoResolver;
declare function defineResolver<const TImports extends ImportsInput = readonly [], TInput = Record<string, unknown>>(config: {
    type: "object";
    imports?: TImports & StaticList<TImports>;
    requireParameters?: readonly string[];
    properties?: Record<string, Field$1>;
    /** Build the property map when the key set is dynamic (re-invoked as `input`
     * grow). Returns the map raw, no envelope. */
    getProperties?: (bag: {
        imports: ImportsOf<TImports>;
        input: TInput;
    }) => PromiseLike<Record<string, Field$1>>;
    definitions?: Record<string, Resolver>;
}): ObjectResolver;
declare function defineResolver(config: {
    type: "array";
    requireParameters?: readonly string[];
    items: Resolver | ResolverRef;
    minItems?: number;
    maxItems?: number;
    /** Coarse value type of each element, so a free-text item answer coerces
     * (e.g. `"5"` → `5`) like object fields do via `Field.valueType`. */
    itemValueType?: string;
    definitions?: Record<string, Resolver>;
}): ArrayResolver;
/**
 * Define an output formatter: a method attachment for its output. `getContext`
 * runs once per rendered page with the narrowed `imports` bag (no sdk); it
 * receives the items on the page and the context accumulated from prior pages,
 * and returns the (possibly extended) context — so page-independent context
 * (e.g. field labels) is fetched once, while per-item context grows as pages
 * arrive. `format` is pure and synchronous, turning one item + context into a
 * `FormattedItem`. Anything needing SDK data belongs in `getContext`, not
 * `format`. Both callbacks get the method's `input` (complete, since the
 * formatter runs after the method).
 */
declare function defineFormatter<const TImports extends ImportsInput = readonly [], TItem = unknown, TInput = Record<string, unknown>, TContext = unknown>(config: {
    imports?: TImports & StaticList<TImports>;
    getContext?: (bag: {
        imports: ImportsOf<TImports>;
        items: TItem[];
        input: TInput;
        context?: TContext;
    }) => Promise<TContext>;
    format: (bag: {
        item: TItem;
        input: TInput;
        context?: TContext;
    }) => FormattedItem;
}): Formatter;
/**
 * Declare a stand-in for a method registered elsewhere (a configured factory
 * plugin, or just a different module). You reference it by `id` (`namespace/name`,
 * or a bare name); the binding is the id's last segment, and resolution by id
 * binds the real implementation at materialization (constraints 3-4). Its `run`
 * throws, since a stand-in must never be the implementation.
 */
declare function declareMethod<const TId extends string, TInput = unknown, TOutput = unknown>(config: {
    id: LiteralString<TId>;
}): MethodPlugin<LastSegment<TId>, TInput, TOutput> & PluginSummary<TId, never>;
/**
 * Define a property leaf. Either a static `value` or a computed `get` (eager,
 * dependencies first, like `setup`). `createSdk`, a dependent's `imports`, or
 * an aggregate's re-export binds it under its bare `name` and yields the value.
 */
declare function defineProperty<const TName extends string, TValue, const TNamespace extends string = "">(config: {
    name: TName;
    namespace?: TNamespace;
    value: TValue;
} & LeafMetaFields): PropertyPlugin<TName, TValue> & PluginSummary<never, IdOf<TNamespace, TName>>;
declare function defineProperty<const TName extends string, TValue, const TImports extends ImportsInput = readonly [], const TNamespace extends string = "", TState = undefined>(config: {
    name: TName;
    namespace?: TNamespace;
    imports?: TImports & StaticList<TImports>;
    setup?: (bag: {
        imports: ImportsOf<TImports>;
    }) => TState;
    dispose?: (bag: {
        imports: ImportsOf<TImports>;
        state: TState;
        input?: unknown;
    }) => void | Promise<void>;
    get: (bag: {
        imports: ImportsOf<TImports>;
        state: TState;
    }) => TValue;
    /** Templated registry members for this property's dynamic sub-surface (e.g.
     * a proxy): each a bodyless declaration keyed by `path` instead of `name`. */
    dynamicMembers?: readonly DynamicMember[];
} & LeafMetaFields): PropertyPlugin<TName, TValue> & LeafSummary<TNamespace, TName, TImports>;
/**
 * Declare a stand-in for a property registered elsewhere (a configured factory
 * plugin, e.g. the api client built from options). Carries only a name and a
 * provides type; dependents reference it for typing, and resolution by id binds
 * the real property at materialization (constraints 3-4, the property twin of
 * `declareMethod`). A stand-in left with no real implementation is a missing
 * dependency (a runtime error from `createSdk`).
 */
declare function declareProperty<const TId extends string, TValue = unknown>(config: {
    id: LiteralString<TId>;
}): PropertyPlugin<LastSegment<TId>, TValue> & PluginSummary<TId, never>;
/**
 * Declare an OPTIONAL stand-in for a property registered elsewhere. Unlike
 * `declareProperty`, a `declareOptionalProperty` left unsatisfied is NOT a missing
 * dependency: dependents bind `undefined` instead of the build failing. The
 * binding type is therefore `TValue | undefined`, so a consumer must handle the
 * absent case (typically `{ ...DEFAULTS, ...imports.config }`).
 *
 * This lets a plugin own its own defaults and treat a provider as override-only:
 * it builds standalone (no provider registered -> `undefined` -> defaults), and
 * a registered provider layers on top. Used for the SDK's static config
 * (defaults live with each consumer; `createZapierSdk` registers an override)
 * and for framework capabilities a method can run without (e.g. hooks).
 */
declare function declareOptionalProperty<const TId extends string, TValue = unknown>(config: {
    id: LiteralString<TId>;
}): PropertyPlugin<LastSegment<TId>, TValue | undefined> & PluginSummary<never, never>;
/**
 * Declare a stand-in for a whole aggregate (module) registered elsewhere: the
 * aggregate twin of `declareMethod` / `declareProperty`. `exports` is an array
 * of leaf stand-ins describing the module's surface, so dependents that import
 * it get typed bindings; resolution by id binds the real aggregate at
 * materialization, and a stand-in left with no implementation is a missing
 * dependency. Use it to depend on a module abstractly and provide the concrete
 * one at the composition root (the tree-shakeable / swappable shape).
 */
declare function declarePlugin<const TId extends string, const TExports extends readonly AnyLeafPlugin[] = readonly []>(config: {
    id: LiteralString<TId>;
    exports?: TExports & StaticList<TExports>;
}): AggregatePlugin<LastSegment<TId>, ArrayExports<TExports>> & PluginSummary<TId, never>;
/**
 * Function form — the legacy function-plugin identity wrapper: it returns the
 * function unchanged but constrains its return to `PluginProvides` and
 * preserves the narrow inferred shape, so callers derive `*PluginProvides` via
 * `ReturnType<typeof plugin>`. Such a plugin runs through the legacy bridge
 * (`fromFunctionPlugin` / `createPluginStack`), deprecated with it.
 *
 * @deprecated Author plugins with `defineMethod` / `defineProperty` /
 * object-form `definePlugin` instead. This form logs a runtime deprecation and
 * will be removed in a release after the warning ships.
 */
declare function definePlugin<TSdk, TProvides extends PluginProvides>(fn: (sdk: TSdk & {
    context: {
        meta: Record<string, PluginMeta>;
    };
}) => TProvides): (sdk: TSdk & {
    context: {
        meta: Record<string, PluginMeta>;
    };
}) => TProvides;
/**
 * Define a plugin module: an aggregate that re-exports child plugins.
 * `exports` mirrors `imports`: an array where a leaf binds under its own name
 * (`[greet]` binds "greet"), a module spreads its bindings, and
 * `selectExports(dep, { hi: "greet" })` subsets/renames. It is optional, so an
 * imports-only module can omit it. Re-exporting implies a dependency on the
 * child. To wrap imported methods, export a `defineHook` with `wrap`.
 */
declare function definePlugin<const TName extends string, const TImports extends ImportsInput = readonly [], const TNamespace extends string = "", const TExports extends readonly (AnyLeafPlugin | AnyAggregatePlugin)[] = readonly []>(config: {
    name: TName;
    namespace?: TNamespace;
    imports?: TImports & StaticList<TImports>;
    exports?: TExports & StaticList<TExports>;
}): AggregatePlugin<TName, ArrayExports<TExports>> & AggregateSummary<TNamespace, TName, TImports, TExports>;

/**
 * A `selectExports` spec: a bare export name to keep (`"getApp"`), or a rename
 * map whose key is the resulting binding and value the source export name
 * (`{ getUser: "getProfile" }` is `export { getProfile as getUser }`).
 */
type SelectSpec<TExports> = (keyof TExports & string) | {
    [newName: string]: keyof TExports & string;
};
/** The export record one spec contributes: a kept name maps to its own leaf; a
 * rename map keys each new name to the leaf at the source name. */
type ResolveSpec<TExports extends Record<string, AnyLeafPlugin>, S> = S extends string | number ? S extends keyof TExports ? {
    [K in S]: TExports[S];
} : never : {
    [K in keyof S]: S[K] extends keyof TExports ? TExports[S[K]] : never;
};
/** Ensure the computed export record satisfies the `AggregatePlugin` constraint
 * (an empty/degenerate selection collapses to a bare exports record). */
type AsExports<T> = T extends Record<string, AnyLeafPlugin> ? T : Record<string, AnyLeafPlugin>;
/**
 * Select (and optionally rename) a subset of a module's exports, the ES
 * `{ a, b, c as d }` clause. Works the same in `imports` (import) and
 * `exports` (re-export): each spec is a bare name to keep or a `{ new: "old" }`
 * rename map. An unknown source name throws. Returns a re-export descriptor (a
 * synthetic aggregate over the chosen bindings) that drops straight into either
 * array; the selected bindings keep the source module's identity.
 */
declare function selectExports<TExports extends Record<string, AnyLeafPlugin>, const TSpecs extends readonly SelectSpec<TExports>[]>(source: AggregatePlugin<string, TExports>, ...specs: TSpecs): AggregatePlugin<string, AsExports<UnionToIntersection<{
    [I in keyof TSpecs]: ResolveSpec<TExports, TSpecs[I]>;
}[number]>>>;
/**
 * Re-export all of a module's exports EXCEPT the named ones, the denylist
 * complement to {@link selectExports}'s allowlist (think TS `Omit` vs `Pick`).
 * The argument is a list of SOURCE export names to drop (not resulting
 * bindings), so there is no key-semantics ambiguity. An unknown name throws.
 *
 * The omitted leaves stay in the graph (the synthetic aggregate still `imports`
 * the source, so it materializes) and remain addressable by id — they are just
 * not surfaced under a binding. That lets a head replace an export's binding
 * with its own plugin while still depending on the original by id.
 */
declare function omitExports<TExports extends Record<string, AnyLeafPlugin>, const TOmit extends readonly (keyof TExports & string)[]>(source: AggregatePlugin<string, TExports>, omit: TOmit): AggregatePlugin<string, Omit<TExports, TOmit[number]>>;

/**
 * Lift a legacy function plugin into the module model. The
 * returned plugin runs `fn` at materialization and surfaces its root methods;
 * `createPluginStack().toPlugin()` is built on this, and `addPlugin` uses it for
 * external function plugins. `fn`'s `context` contributions merge into the live
 * `SdkContext`; its other root keys become the surface.
 *
 * @deprecated The module model replaces this exit; it logs a runtime
 * deprecation and will be removed in a release after this warning ships.
 */
declare function fromFunctionPlugin<TProvides extends PluginProvides>(fn: (sdk: any) => TProvides, config: {
    name: string;
    namespace?: string;
}): LegacyPlugin<TProvides & {
    getRegistry: (options?: {
        package?: string;
    }) => RegistryResult;
}>;
/**
 * Build a {@link LegacyMergePlugin}: pass the collapsed legacy stack
 * (`stack.toPlugin()`) as `legacy` and the migrated module-model plugins as
 * `plugin`. `createSdk(defineLegacyMerge({...}))` surfaces both.
 *
 * @deprecated Build directly with `createSdk(root, { configuration })`
 * instead; it logs a runtime deprecation and will be removed in a release
 * after this warning ships.
 */
declare function defineLegacyMerge<TProvides extends PluginProvides, const TPlugin extends AnyPlugin>(args: {
    name: string;
    namespace?: string;
    legacy: (sdk: any) => TProvides;
    plugin: TPlugin;
}): LegacyMergePlugin<TProvides, TPlugin>;

/**
 * Core error machinery.
 *
 * kitcore constructs errors at two internal throw sites: input
 * validation (`utils/validation.ts`) and non-Error normalization
 * (`utils/function-utils.ts`'s `normalizeError`). Heads supply a
 * `adaptError` factory via `createCorePlugin` to map kitcore's abstract
 * `CoreErrorCode` values onto their own branded error classes; if
 * no factory is supplied, kitcore falls back to constructing a plain
 * `CoreError`. Either way, every kitcore-thrown error is brand-stamped
 * with `CORE_ERROR_SYMBOL` and `coreCode` (non-enumerable),
 * so consumers can recognize core errors via `isCoreError`
 * without knowing the head's class identity.
 */
/**
 * Cross-package brand for kitcore-constructed errors. `Symbol.for(key)`
 * reads from the engine-global registry, so the same value resolves
 * across realms and across multiple copies of kitcore (e.g. when one
 * package bundles kitcore and another installs it standalone). Use
 * `isCoreError` for cross-package checks.
 */
declare const CORE_ERROR_SYMBOL: unique symbol;
/**
 * Abstract codes for the errors kitcore can produce. Heads receive these
 * via `AdaptErrorOptions.code` and map them onto their own named
 * error classes (e.g. `VALIDATION_ERROR` → the head's branded
 * `<Prefix>ValidationError`).
 */
declare const CoreErrorCode: {
    readonly Validation: "VALIDATION_ERROR";
    readonly Unknown: "UNKNOWN_ERROR";
};
type CoreErrorCode = (typeof CoreErrorCode)[keyof typeof CoreErrorCode];
/**
 * Standard error envelope. kitcore doesn't generate these
 * itself; heads set `errors?: CoreApiError[]` on their error constructor
 * options when surfacing structured upstream failures.
 */
interface CoreApiError {
    status: number;
    code: string;
    title: string;
    detail: string;
    source?: unknown;
    meta?: unknown;
}
/**
 * What `adaptError` factories receive. `code` is the abstract error
 * code; `details` carries type-specific extras (validation issues for
 * `VALIDATION_ERROR`, etc.).
 */
interface AdaptErrorOptions {
    code: CoreErrorCode;
    message: string;
    cause?: unknown;
    details?: unknown;
}
type AdaptError = (options: AdaptErrorOptions) => Error;
/**
 * Cross-package-safe check that `value` was produced by kitcore's
 * error construction path (i.e. through `createCoreError`). Use
 * this in code that needs to distinguish "kitcore threw this" from
 * "a handler threw an unrelated `Error` subclass" — `instanceof` checks
 * on specific head classes also work, but `isCoreError` is the
 * neutral recognizer.
 */
declare function isCoreError(value: unknown): boolean;
/**
 * Abstract `CoreErrorCode` for an error produced via
 * `createCoreError`. Returns `undefined` for non-kitcore values.
 */
declare function getCoreErrorCode(value: unknown): CoreErrorCode | undefined;
/**
 * `cause` field accessor that doesn't trip the type system. Same as
 * `(value as { cause?: unknown }).cause` for kitcore-produced errors;
 * returns `undefined` for non-kitcore values.
 */
declare function getCoreErrorCause(value: unknown): unknown;

/**
 * Framework options (`CoreOptions`) and their well-known configuration id.
 * Heads inject the bag under `CORE_OPTIONS_ID` via `createSdk`'s
 * `configuration`; the method boundary resolves it by id at every invocation
 * (`resolveCoreOptions`), and `coreOptionsPluginRef` (model/builtins) is the
 * importable stand-in for plugins that need the same options.
 */

/**
 * What the boundary reports when a deprecated method is called: the method
 * plus its declared `deprecation` meta, whole, so future declaration fields
 * ride along without a signature change. `type` makes the record
 * self-describing (the shape a future unified event channel would carry;
 * see docs/design/2026-06-04-unified-event-bus.md).
 */
interface DeprecationWarning {
    type: "deprecation";
    methodName: string;
    deprecation: FunctionDeprecation;
}
/**
 * The well-known id for framework options: heads inject a `CoreOptions` bag
 * under it via `createSdk`'s `configuration` (or register a property plugin),
 * and the method boundary resolves it by id at every invocation, falling back
 * to the legacy `context.core` write while the deprecated `createCorePlugin`
 * path still exists.
 */
declare const CORE_OPTIONS_ID = "kitcore/coreOptions";
/**
 * Head-supplied configuration for kitcore-managed behavior. All fields are
 * optional; absent fields fall back to kitcore's built-in behavior.
 */
interface CoreOptions {
    /**
     * Construct the head's branded error class for kitcore-thrown errors
     * (validation failures, non-Error normalization). Receives the
     * abstract `CoreErrorCode`, message, optional cause, and
     * type-specific details; returns the head's `Error` subclass. The
     * returned instance is automatically brand-stamped via
     * `createCoreError` so `isCoreError(err)` still recognizes
     * it across package boundaries. If absent, kitcore throws a plain
     * `CoreError`.
     */
    adaptError?: AdaptError;
    /**
     * The deprecation HANDLER (adaptError's sibling, not an observer): the
     * framework signals every call of a method declaring `deprecation` meta,
     * and this gate decides what happens — policy (how often to tell; the
     * deduping deprecation loggers make once-per-process one line) and
     * presentation. Exactly one: absent falls back to
     * {@link defaultLogDeprecation}, supplied replaces it. Runs isolated, so a
     * throwing handler never breaks the observed call. Additive observation
     * (many subscribers, e.g. telemetry counting hits) is a different concept
     * reserved for an `on*`-named observer when the unified event bus lands.
     */
    logDeprecation?: (warning: DeprecationWarning) => void;
}
/**
 * A built-in that reports the live SDK surface as the canonical
 * {@link RegistryResult}. It is just a method depending on `dangerousContextPlugin` (no
 * new privilege): re-export it to put `getRegistry()` on the SDK surface. Reads
 * `context.surface` at call time, so it reflects any post-seal `addPlugin`
 * additions, and produces the same registry shape the heads (CLI / MCP / docs)
 * consume.
 */
declare const getRegistryPlugin: MethodPlugin<"getRegistry", {
    package?: string | undefined;
} | undefined, RegistryResult<any>, readonly []> & LeafSummary<"kitcore", "getRegistry", readonly [PropertyPlugin<"context", SdkContext>]>;

/**
 * The external escape-hatch key for an SDK's context. A Symbol,
 * not a string, so it stays off the string surface (which is exactly the root's
 * exports) and is collision-free and clearly internal. It is attached at
 * runtime but kept OUT of the public SDK type (a `unique symbol` in an exported
 * type can't be named in a consumer's emitted `.d.ts`); reach it through the
 * typed `getContext(sdk)` accessor.
 *
 * `Symbol.for`, not `Symbol()`: heads bundle kitcore (tsup `noExternal`), so
 * an sdk built by one bundle's copy must still be readable by another copy's
 * `getContext` / `resolvePlugin` (e.g. a CLI sdk inspected with helpers
 * imported from `@zapier/zapier-sdk`). The global symbol registry makes every
 * copy agree on the key.
 */
declare const CONTEXT: unique symbol;
/** The off-surface escape hatch to an SDK's `SdkContext`. */
declare function getContext(sdk: unknown): SdkContext;
/**
 * Resolve a plugin's materialized value against a built SDK: a method's
 * callable or a property's value (the same thing an importer receives), NOT
 * the plugin descriptor. For head infrastructure that builds the SDK and
 * needs one of its own internals; consumers use the SDK surface, and in-graph
 * code keeps using `imports`. Read-only against the built graph; nothing
 * materializes. A missing required ref throws; an unsatisfied optional ref
 * resolves `undefined` (matching import behavior); a live `get` property
 * re-reads per call (a read-time snapshot — hold the function, not the value,
 * for liveness). Aggregate refs are not one-ref-one-binding and are
 * unsupported.
 */
declare function resolvePlugin<TRef extends AnyLeafPlugin>(sdk: unknown, ref: TRef): ExportSurface<TRef>;
/**
 * Thrown by {@link disposeSdk} when one or more dispose callbacks failed.
 * Every dispose was still attempted; `errors` holds the failures in teardown
 * order.
 */
declare class CoreDisposeError extends Error {
    readonly name: string;
    readonly errors: unknown[];
    constructor(errors: unknown[]);
}
/**
 * Tear down a built SDK: run every recorded `dispose` (a leaf's `setup` dual)
 * in reverse build order, so dependents release before their dependencies.
 * Each dispose is awaited and run defensively; all are attempted even after a
 * failure, then the failures reject together as {@link CoreDisposeError}.
 * Idempotent: the first call's `input` wins and later calls return the same
 * settled result. A top-level function like `addPlugin`, reaching internals
 * through the `CONTEXT` symbol, so anyone holding the sdk can call it.
 */
declare function disposeSdk(sdk: unknown, input?: unknown): Promise<void>;
/**
 * Materialize one plugin into an SDK whose surface is that plugin's exports.
 * A method root surfaces its callable under its bare name; a property root its
 * value; an aggregate root its export bindings. `options.configuration`
 * injects runtime values by plugin id (see {@link CreateSdkOptions}).
 */
declare function createSdk<P extends AnyMethodPlugin>(root: P & CompletenessOf<P>, options?: CreateSdkOptions): MethodSdkOf<P>;
declare function createSdk<P extends AnyPropertyPlugin>(root: P & CompletenessOf<P>, options?: CreateSdkOptions): PropertySdkOf<P>;
declare function createSdk<P extends AnyAggregatePlugin>(root: P & CompletenessOf<P>, options?: CreateSdkOptions): AggregateSdkOf<P>;
declare function createSdk<TSurface>(root: LegacyPlugin<TSurface>, options?: CreateSdkOptions): TSurface & SdkInternals;
declare function createSdk<TProvides extends PluginProvides, TPlugin extends AnyPlugin>(root: LegacyMergePlugin<TProvides, TPlugin>, options?: CreateSdkOptions): TProvides & {
    getRegistry: (options?: {
        package?: string;
    }) => RegistryResult;
} & AddedSurface<TPlugin> & SdkInternals;
/**
 * Extend an already-built SDK in place with one more plugin (the post-seal
 * extension path). Dispatches on shape: a module-model plugin (`defineMethod` /
 * `defineProperty` / `definePlugin`) is materialized incrementally into the live
 * graph; a legacy function plugin runs through the legacy merge. Either way the
 * caller's `sdk` binding is narrowed to include the addition.
 */
declare function addPlugin<TSdk extends object, P>(sdk: TSdk, plugin: P, options?: {
    override?: boolean;
}): asserts sdk is TSdk & AddedSurface<P>;

/**
 * Public types for the resolution engine: the serializable protocol a host
 * drives (`start` / `step`), the in-process `resolve` sugar's answerer, and the
 * reflection shapes (`listMethods` / `getMethod` / `listChoices`). The engine
 * turns a method's partial input into a complete, validated input by resolving
 * each parameter, interacting with the host only when it must. See the kitcore
 * README's "Resolving inputs: controllers" section for worked host examples.
 */
/** A candidate value the host renders; the host composes its own display label
 * from `label`/`hint`. `value` is what flows back in a `choose` action. */
interface ControllerChoice {
    label: string;
    value: string;
    hint?: string;
}
/**
 * A move the host can make in response to a question, self-described so an agent
 * can follow it without the type definitions (HATEOAS-lite). `description` says
 * what it does; `supply` names the single payload field to include when sending
 * the action (absent = no payload). Enriching an affordance with a full field
 * schema later is additive and never changes the {@link ControllerAction} it
 * produces.
 */
interface ControllerAffordance {
    action: ControllerAction["type"];
    description: string;
    supply?: "value" | "term";
}
/** A question the host renders. Discriminated on `type`; the available moves are
 * the self-describing `actions` list (single source of truth, no flags).
 * `actions` is emitted in recommended presentation order — answer directly
 * (`choose`/`custom`/`add`), refine (`search`), paginate (`more`), decline
 * (`skip`/`done`), and failure questions offer `retry` then `cancel` — so a
 * minimal host can render the list verbatim, top to bottom. Hosts with richer
 * widgets (windowed lists, filter state) may reorder. */
type ControllerQuestion = {
    type: "select";
    message: string;
    /** What this field is, for an agent that lacks the schema. */
    description?: string;
    choices: ControllerChoice[];
    actions: ControllerAffordance[];
    /** The active search term these `choices` were fetched for, when the
     * resolver is search-mode and a `search` action has run. Absent means no
     * search yet (the initial state of a search-mode resolver): a host leads
     * with a term prompt rather than an unfiltered list. Local
     * type-to-filter is for bounded loaded lists; search-mode does discrete
     * server queries. */
    search?: string;
    /** A multi-select (the resolver's `prompt` returned `type: "checkbox"`);
     * the `choose` action then carries an array. */
    multiple?: boolean;
    /** Informational, non-selectable lines (`PromptConfig.notes`), e.g. a
     * capability hint. A host renders them dimmed, after the choices. */
    notes?: string[];
    /** The resolver's `placeholder`, carried so a search-mode host can show it
     * in its lead-with-term prompt (e.g. "Enter or search app (e.g. 'slack')").
     * Only meaningful before a search has run. */
    placeholder?: string;
} | {
    type: "input";
    message: string;
    description?: string;
    inputType: "text" | "password" | "email";
    placeholder?: string;
    actions: ControllerAffordance[];
} | {
    type: "collection";
    message: string;
    description?: string;
    /** Which container kind this decision gates. `array` is the add-another
     * loop; `object` is the entry gate on an optional object, fired BEFORE
     * its fields are fetched (`add` descends into the fields, `done` skips
     * the container). A host that renders `message` + `actions` generically
     * needs nothing else; this is additive metadata for hosts that render
     * containers specially. */
    container: "array" | "object";
    /** Object optionals gate only: the fields the `add` action would walk
     * (key + display label + coarse value type), so a smart host can render
     * them (or a form section) instead of a blind yes/no. Dumb hosts keep
     * rendering `message`. Absent on the entry gate: its fields aren't
     * fetched until the gate is accepted. */
    fields?: {
        key: string;
        label?: string;
        valueType?: string;
    }[];
    /** Array only: items so far. */
    count?: number;
    /** Array only: `minItems`. */
    min?: number;
    /** Absent when the array is unbounded (no `maxItems`); a finite cap
     * otherwise. Omitted rather than `Infinity` so the question stays JSON. */
    max?: number;
    actions: ControllerAffordance[];
};
/** The host's response to a question. The wire shape is frozen: a fuller
 * HATEOAS affordance schema would still produce exactly these. */
type ControllerAction = {
    type: "choose";
    value: string | string[];
} | {
    type: "search";
    term: string;
} | {
    type: "more";
} | {
    type: "custom";
    value: string;
} | {
    type: "skip";
} | {
    type: "add";
} | {
    type: "done";
} | {
    type: "cancel";
} | {
    type: "retry";
};
/** What `start` / `step` return alongside the next state. `ask` carries a
 * question to answer; `done` the fully resolved input; `invalid` the validation
 * issues; `failed` a thrown lookup error plus a question offering retry/cancel. */
type ControllerResult = {
    status: "ask";
    question: ControllerQuestion;
    /** The prior answer's validation failure (`PromptConfig.validate`), when
     * this is a re-ask. About the last transition, not the question itself. */
    error?: string;
} | {
    status: "done";
    value: Record<string, unknown>;
} | {
    status: "invalid";
    issues: ControllerIssue[];
} | {
    status: "failed";
    error: ControllerError;
    question: ControllerQuestion;
} | {
    status: "cancelled";
};
/** A thrown lookup failure, normalized to plain data at the wall. The engine
 * catches an arbitrary throwable; a raw `Error` loses its message under
 * `JSON.stringify` (and a circular/custom value can break transport), so a
 * `failed` result carries this DTO instead, which a remote host can render. */
interface ControllerError {
    name: string;
    message: string;
    code?: string;
}
/** A single validation problem, keyed to the offending parameter when known. */
interface ControllerIssue {
    parameter?: string;
    message: string;
}
/**
 * The serializable, caller-held progress of a resolution. The host carries it
 * forward and passes it back into the next `step`; it round-trips across a
 * client/server boundary unchanged (no closures, no live iterators). It carries
 * the method id, so `step` needs nothing else.
 */
interface ControllerState {
    method: string;
    /** The growing input, as a nested tree of *real values only* — objects build
     * in place (`resolved.inputs.channel`), so a leaf value lives at its {@link ControllerPath}. */
    resolved: Record<string, unknown>;
    /** Dotted path-keys the engine is done with: a resolved leaf (value in
     * `resolved`), a skipped leaf (no value), or a finished array. Objects derive
     * doneness from their children. The "touched" analog from form libraries. */
    settled: string[];
    /** The path of the parameter (or nested field) currently being asked. */
    current?: ControllerPath;
    /** Which container decision the outstanding `collection` question is, when
     * `current` points at one: the array add/done loop, an optional object's
     * entry gate, or an object's optionals gate. Recorded explicitly so `step`'s
     * add/done handling never infers the decision from value presence or
     * resolver shape. Absent when `current` is a plain leaf question. */
    gate?: "array" | "entry" | "optionals";
    /** Listing progress for the current dynamic leaf (serializable: items +
     * cursor, never a live iterator). */
    listing?: ControllerListing;
    /** Whether the host will prompt. Interactive (the default) always asks;
     * non-interactive runs `tryResolveWithoutPrompt` to auto-fill what it can
     * (e.g. configured defaults) before asking for the rest. */
    interactive: boolean;
}
/** A location in the input tree: top-level `["app"]`, a nested object field
 * `["inputs", "channel"]`, or (later) an array item `["records", 0, "id"]`. */
type ControllerPath = (string | number)[];
/** Accumulated candidate items for the current dynamic parameter, plus the
 * serializable cursor for "load more" and the active search term. */
interface ControllerListing {
    items: unknown[];
    cursor?: string;
    search?: string;
    /** True when the source reported no further pages. */
    exhausted: boolean;
}
/**
 * The one pluggable seam for the in-process `resolve` sugar. It receives the
 * same `{ state, result }` pair `start`/`step` return (so an answer callback
 * sees exactly what a host driving the protocol directly would) and produces
 * the next action. `result` is a question-bearing result — `ask` (the question
 * plus any prior-answer `error`) or `failed` (a lookup threw; the question
 * offers `retry`/`cancel`, `error` is the thrown value). `state` is read-only
 * context (e.g. an agent can inspect `state.resolved`); mutating it is
 * unsupported. Modality-agnostic — inquirer/DOM, an LLM agent, an auto-select
 * policy, or a test script all satisfy it. The `start`/`step` protocol needs no
 * answer callback.
 */
type ControllerAnswerFn = (turn: {
    state: ControllerState;
    result: Extract<ControllerResult, {
        status: "ask" | "failed";
    }>;
}) => Promise<ControllerAction>;
/** Per-parameter metadata for reflection (agents / MCP / docs / previews). The
 * static, no-I/O view, complementing the in-the-moment `question`. */
interface ControllerParameterDescription {
    required: boolean;
    /** True when values come from a fetch (`listItems`) rather than a static set. */
    dynamic: boolean;
    /** True when the resolver accepts a free-text search term. */
    searchable?: boolean;
    /** The field's serialized type (`z.toJSONSchema` of its input schema). Absent
     * for a dynamically-shaped field (`getProperties`) with no static schema, or
     * when the schema can't be represented as JSON Schema. zod never crosses the
     * wall; this is its plain-data projection. */
    schema?: Record<string, unknown>;
    /** Statically known labeled values, when the parameter is a fixed enum. Richer
     * than `schema.enum` (carries label/hint), so kept alongside `schema`. */
    choices?: ControllerChoice[];
    /** Sibling parameters this one depends on (`requireParameters`). A form host
     * reads this to know which fields are independent (render together) and which
     * to re-fetch when a dependency changes. */
    requireParameters?: readonly string[];
}
/** A method's lightweight index entry: enough to render a menu or tool list
 * without the full per-parameter detail. The list face of {@link Controller}. */
interface ControllerMethodSummary {
    name: string;
    description?: string;
    categories?: string[];
}
/** A method's full static contract, serialized: its parameters as a named bag
 * (mirroring the canonical single-object input), the positional projection if
 * the surface declares one, and the output type. All plain JSON — the
 * serializable projection of the registry entry, never its live zod. */
interface ControllerMethodDescription {
    name: string;
    description?: string;
    categories?: string[];
    /** Keyed by parameter name (the input bag's shape), not an ordered array:
     * named-first, since MCP/web/agent hosts fill named slots. Order, when it
     * matters, lives in `positional`. */
    parameters: Record<string, ControllerParameterDescription>;
    /** Ordered input keys the public surface takes as positional args, when the
     * method declares a positional projection. Absent for a pure single-bag call. */
    positional?: readonly string[];
    /** The output type (`z.toJSONSchema` of the output schema), when known. */
    output?: Record<string, unknown>;
}
/**
 * Drives parameter resolution over a built SDK, reading its registry for the
 * method's input schema and bound resolvers. Created from an SDK with
 * `createController(sdk)`; transport-agnostic, so a remote implementation
 * (browser → server) satisfies the same interface.
 */
interface Controller {
    /** In-process sugar: loop `start`/`step` against an answer callback, return
     * the resolved input (ready to pass to the SDK method). Throws on cancel. */
    resolve(opts: {
        method: string;
        input?: Record<string, unknown>;
        answer: ControllerAnswerFn;
        /** Defaults to true. Pass false for an agent/headless answer callback that
         * wants configured defaults auto-filled (`tryResolveWithoutPrompt`) rather
         * than prompted. */
        interactive?: boolean;
    }): Promise<Record<string, unknown>>;
    /** Start resolving: seed from `input`, auto-resolve what needs no interaction,
     * return the first result (an `ask`, or `done`). */
    start(opts: {
        method: string;
        input?: Record<string, unknown>;
        /** Defaults to true (always prompt). Pass false for headless/agent hosts to
         * auto-fill via `tryResolveWithoutPrompt` before asking. */
        interactive?: boolean;
    }): Promise<{
        state: ControllerState;
        result: ControllerResult;
    }>;
    /** Advance with the user's action; return the next state and result. */
    step(opts: {
        state: ControllerState;
        action: ControllerAction;
    }): Promise<{
        state: ControllerState;
        result: ControllerResult;
    }>;
    /** Reflection (list): the lightweight index of every method (no I/O). The
     * `nextCursor` slot mirrors `listChoices` and leaves room for paging a future
     * dynamic/large method set; unpaged today. */
    listMethods(): {
        data: ControllerMethodSummary[];
        nextCursor?: string;
    };
    /** Reflection (item): one method's full static contract, serialized (no I/O).
     * Named `getMethod` to mirror the SDK's `getApp`/`listApps` resource pair;
     * returns the method's *description*, not the callable. */
    getMethod(opts: {
        method: string;
    }): {
        data: ControllerMethodDescription;
    };
    /** Reflection: enumerate legal values for one dynamic parameter. */
    listChoices(opts: {
        method: string;
        parameter: string;
        input?: Record<string, unknown>;
        search?: string;
        cursor?: string;
    }): Promise<{
        data: ControllerChoice[];
        nextCursor?: string;
    }>;
}

/** The slice of a built SDK the driver needs: its registry accessor. */
interface ControllerSdk {
    getRegistry: (options?: {
        package?: string;
    }) => RegistryResult;
}
/**
 * Build a {@link Controller} over a built SDK. Reads `sdk.getRegistry()`
 * at call time (so post-build `addPlugin` additions are visible) to find each
 * method's canonical input schema and bound resolvers, then drives the engine.
 * The SDK surface itself is untouched; this is a sibling layer.
 */
declare function createController(sdk: ControllerSdk): Controller;

/**
 * Generic utility functions for creating SDK-method wrappers.
 *
 * Both `createFunction` and `createPaginatedFunction` accept the SDK
 * as a parameter and read framework state (`hooks`, `core.adaptError`)
 * live from `sdk.context.*` at method-invocation time. Plugins registered
 * after a method is built still observe and configure it; ordering of
 * plugin registration doesn't change runtime semantics. (Pagination's
 * `adaptPage` is passed in per method, not read from context.)
 */

/**
 * Minimal SDK shape the function wrappers accept. The wrappers only
 * touch `context.hooks` and the resolved core options, but we keep
 * `context` typed as `unknown` so any kitcore-built SDK (whose context type
 * widens unpredictably as plugins layer on) flows through without
 * upstream type narrowing. Each read inside is asserted at the use
 * site against the small slice we actually need.
 */
type FunctionSdk = {
    context: unknown;
};
/**
 * Wrap a core async function with input validation, error normalization,
 * and method-call lifecycle hooks. Hooks and `adaptError` are read live
 * from `sdk.context.*` at every invocation, so a plugin registered
 * after this method is built still observes and configures it.
 *
 * @param coreFn - the underlying async function to wrap
 * @param options.sdk - the SDK (or sub-SDK view) providing `context.hooks`
 *                      and `context.core`
 * @param options.schema - optional Zod schema for input validation
 */
declare function createFunction<TOptions, TResult, TSchemaOptions extends TOptions = TOptions>(coreFn: (options: TOptions) => Promise<TResult>, options: {
    sdk: FunctionSdk;
    schema?: z.ZodSchema<TSchemaOptions>;
    name?: string;
    /** Live read of the method's deprecation meta (see signalDeprecation). */
    getDeprecation?: () => FunctionDeprecation | undefined;
}): (callOptions?: TOptions) => Promise<TResult>;
/**
 * Higher-order function that creates a paginated function that wraps
 * results in `SdkPage<TItem>`.
 *
 * @param coreFn - Function that returns T directly or throws errors
 * @returns A function that normalizes errors and wraps results in `SdkPage`
 */
/**
 * Extract the item type from a page handler's return shape. The handler
 * may return a flat `{ data: TItem[] }` (or single `data: TItem`), a bare
 * array, or anything else; in all cases the wrapper normalizes to
 * `SdkPage<TItem>` and this resolves the right `TItem`.
 */
type ItemType<TResult> = TResult extends {
    data: infer TData;
} ? TData extends readonly (infer TItem)[] ? TItem : TData : TResult extends readonly (infer TItem)[] ? TItem : TResult;
declare function createPaginatedFunction<TUserOptions, TResponse, TItem = ItemType<TResponse>>(coreFn: (options: TUserOptions & {
    cursor?: string;
    pageSize?: number;
}) => Promise<TResponse>, options: {
    sdk: FunctionSdk;
    schema?: z.ZodSchema<TUserOptions>;
    name?: string;
    defaultPageSize?: number;
    /**
     * Translate the handler's raw `TResponse` into `SdkPage<TItem>`. `TItem`
     * is wrapped in `NoInfer`: it is sourced from `TResponse` (via the
     * `ItemType` default), not from this adapter, which is item-agnostic (it
     * relocates the cursor; items are finalized in the handler's `data`).
     * Without `NoInfer`, a generic adapter (e.g. `<T>(r) => SdkPage<T>`)
     * would collapse `TItem` to `unknown`.
     */
    adaptPage?: (response: TResponse) => SdkPage<NoInfer<TItem>>;
    /** Live read of the method's deprecation meta (see signalDeprecation). */
    getDeprecation?: () => FunctionDeprecation | undefined;
}): (options?: TUserOptions & {
    cursor?: string;
    pageSize?: number;
    maxItems?: number;
}) => PaginatedSdkResult<TItem>;

/**
 * Register kitcore-level configuration by writing the options to
 * `context.core`; the method boundary falls back to that path when no
 * `kitcore/coreOptions` configuration value exists.
 *
 * @deprecated Inject the `CoreOptions` bag under `CORE_OPTIONS_ID` via
 * `createSdk(root, { configuration })` instead. This factory logs a runtime
 * deprecation and will be removed in a release after the warning ships.
 */
declare function createCorePlugin(options: CoreOptions): Plugin<object, {
    context: {
        core: CoreOptions;
    };
}>;
/**
 * Run `fn` inside a new method scope. Nested invocations see an incremented
 * `depth`. When no scope store is available (e.g. browsers without
 * async_hooks), `fn` is called directly with no scope tracking.
 */
declare function runInMethodScope<T>(fn: () => T): T;
declare const runWithTelemetryContext: typeof runInMethodScope;

/**
 * Generic string utilities used by the plugin framework.
 */
/**
 * Converts a string to title case, handling various input formats:
 * - camelCase: "firstName" → "First Name"
 * - snake_case: "first_name" → "First Name"
 * - kebab-case: "first-name" → "First Name"
 * - mixed formats: "first_name-value" → "First Name Value"
 */
declare function toTitleCase(input: string): string;
/**
 * Converts a string to snake_case, handling various input formats:
 * - camelCase: "firstName" → "first_name"
 * - kebab-case: "first-name" → "first_name"
 * - title case: "First Name" → "first_name"
 * - mixed formats: "first-Name Value" → "first_name_value"
 * - starts with number: "123abc" → "_123abc"
 */
declare function toSnakeCase(input: string): string;

/**
 * Core signal machinery.
 *
 * Signals are intentional control-flow throws — not failures. They're the
 * sibling of {@link CoreError}: where an error means "something went wrong," a
 * signal means "stop and do this on purpose." The first (and currently only)
 * one is {@link CoreCancelledSignal}, thrown by `Controller.resolve` when the
 * host cancels resolution (its answer callback returned `{ type: "cancel" }`).
 *
 * Like errors, every signal is brand-stamped with {@link CORE_SIGNAL_SYMBOL} so
 * a consumer can recognize one via {@link isCoreSignal} without sharing class
 * identity — important across the bundled-vs-standalone kitcore boundary.
 */
/**
 * Cross-package brand for kitcore signals. `Symbol.for(key)` reads the
 * engine-global registry, so the same value resolves across realms and across
 * multiple copies of kitcore. Use {@link isCoreSignal} for cross-package checks.
 */
declare const CORE_SIGNAL_SYMBOL: unique symbol;
/**
 * Base class for kitcore signals. A signal is intentional control flow, not an
 * error, so it does NOT extend any error hierarchy that failure-handling code
 * sweeps up via `instanceof CoreError`. Subclasses declare a stable `name` and
 * `code`. (Mirrors the head convention, e.g. zapier-sdk's `ZapierSignal`.)
 */
declare abstract class CoreSignal extends Error {
    abstract readonly name: string;
    abstract readonly code: string;
    constructor(message?: string);
}
/**
 * Cross-package-safe check that `value` is a kitcore signal (an intentional
 * control-flow throw), as opposed to a real error. Survives the
 * bundled/standalone kitcore split, where `instanceof CoreSignal` may not.
 */
declare function isCoreSignal(value: unknown): boolean;
/**
 * Thrown by `Controller.resolve` when the host cancels resolution (the answer
 * callback returned `{ type: "cancel" }`). The lower-level `start`/`step`
 * protocol instead returns a `{ status: "cancelled" }` result, so a host
 * driving it directly never sees this throw; `resolve` raises it because its
 * contract is "the resolved input, or nothing."
 */
declare class CoreCancelledSignal extends CoreSignal {
    readonly name = "CoreCancelledSignal";
    readonly code: "CANCELLED";
    constructor(message?: string);
}

declare const AppKeyPropertySchema: z.ZodString & {
    _def: z.core.$ZodStringDef & PositionalMetadata;
};
declare const AppPropertySchema: z.ZodString & {
    _def: z.core.$ZodStringDef & PositionalMetadata;
};
declare const ActionTypePropertySchema: z.ZodEnum<{
    read: "read";
    read_bulk: "read_bulk";
    write: "write";
    search: "search";
    search_or_write: "search_or_write";
    search_and_write: "search_and_write";
    filter: "filter";
    run: "run";
}>;
declare const ActionKeyPropertySchema: z.ZodString;
declare const ActionPropertySchema: z.ZodString & {
    _def: z.core.$ZodStringDef & PositionalMetadata;
};
declare const InputFieldPropertySchema: z.ZodString & {
    _def: z.core.$ZodStringDef & PositionalMetadata;
};
declare const ConnectionIdPropertySchema: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
/** @deprecated Use ConnectionIdPropertySchema instead */
declare const AuthenticationIdPropertySchema: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
declare const ConnectionPropertySchema: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
declare const InputsPropertySchema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
declare const LimitPropertySchema: z.ZodDefault<z.ZodNumber>;
declare const OffsetPropertySchema: z.ZodDefault<z.ZodNumber>;
declare const OutputPropertySchema: z.ZodString;
declare const DebugPropertySchema: z.ZodDefault<z.ZodBoolean>;
declare const ParamsPropertySchema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
declare const ActionTimeoutMsPropertySchema: z.ZodOptional<z.ZodNumber>;
declare const TablePropertySchema: z.ZodString & {
    _def: z.core.$ZodStringDef & PositionalMetadata;
};
declare const RecordPropertySchema: z.ZodString & {
    _def: z.core.$ZodStringDef & PositionalMetadata;
};
declare const RecordsPropertySchema: z.ZodArray<z.ZodString>;
declare const FieldsPropertySchema: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
declare const AppsPropertySchema: z.ZodArray<z.ZodString>;
declare const TablesPropertySchema: z.ZodArray<z.ZodString>;
declare const ConnectionsPropertySchema: z.ZodArray<z.ZodString>;
declare const TriggerInboxPropertySchema: z.ZodString & {
    _def: z.core.$ZodStringDef & PositionalMetadata;
};
declare const TriggerInboxKeyPropertySchema: z.ZodString;
/** @deprecated Use TriggerInboxKeyPropertySchema instead */
declare const TriggerInboxNamePropertySchema: z.ZodString;
declare const LeasePropertySchema: z.ZodString;
declare const LeaseSecondsPropertySchema: z.ZodNumber;
declare const LeaseLimitPropertySchema: z.ZodNumber;
type AppKeyProperty = z.infer<typeof AppKeyPropertySchema>;
type AppProperty = z.infer<typeof AppPropertySchema>;
type ActionTypeProperty = z.infer<typeof ActionTypePropertySchema>;
type ActionKeyProperty = z.infer<typeof ActionKeyPropertySchema>;
type ActionProperty = z.infer<typeof ActionPropertySchema>;
type InputFieldProperty = z.infer<typeof InputFieldPropertySchema>;
type ConnectionIdProperty = z.infer<typeof ConnectionIdPropertySchema>;
type ConnectionProperty = z.infer<typeof ConnectionPropertySchema>;
/** @deprecated Use ConnectionIdProperty instead */
type AuthenticationIdProperty = ConnectionIdProperty;
type InputsProperty = z.infer<typeof InputsPropertySchema>;
type LimitProperty = z.infer<typeof LimitPropertySchema>;
type OffsetProperty = z.infer<typeof OffsetPropertySchema>;
type OutputProperty = z.infer<typeof OutputPropertySchema>;
type DebugProperty = z.infer<typeof DebugPropertySchema>;
type ParamsProperty = z.infer<typeof ParamsPropertySchema>;
type ActionTimeoutMsProperty = z.infer<typeof ActionTimeoutMsPropertySchema>;
type TableProperty = z.infer<typeof TablePropertySchema>;
type RecordProperty = z.infer<typeof RecordPropertySchema>;
type RecordsProperty = z.infer<typeof RecordsPropertySchema>;
type FieldsProperty = z.infer<typeof FieldsPropertySchema>;
type AppsProperty = z.infer<typeof AppsPropertySchema>;
type TablesProperty = z.infer<typeof TablesPropertySchema>;
type ConnectionsProperty = z.infer<typeof ConnectionsPropertySchema>;
type TriggerInboxProperty = z.infer<typeof TriggerInboxPropertySchema>;
type TriggerInboxKeyProperty = z.infer<typeof TriggerInboxKeyPropertySchema>;
/** @deprecated Use TriggerInboxKeyProperty instead */
type TriggerInboxNameProperty = z.infer<typeof TriggerInboxNamePropertySchema>;
type LeaseProperty = z.infer<typeof LeasePropertySchema>;
type LeaseSecondsProperty = z.infer<typeof LeaseSecondsPropertySchema>;
type LeaseLimitProperty = z.infer<typeof LeaseLimitPropertySchema>;

interface ErrorOptions {
    statusCode?: number;
    errors?: CoreApiError[];
    cause?: unknown;
    response?: unknown;
}
/**
 * Base class for every Zapier-thrown error. Carries the core brand
 * (`CORE_ERROR_SYMBOL`) so `isCoreError(err)` recognizes any
 * `Zapier*` error as kitcore-originated, even when the SDK and kitcore
 * are bundled separately. Subclasses override `name` and `code` per
 * the existing `Zapier*` / `ZAPIER_*` convention.
 */
declare class ZapierError extends Error {
    readonly [CORE_ERROR_SYMBOL] = true;
    readonly name: string;
    readonly code: string;
    statusCode?: number;
    errors?: CoreApiError[];
    cause?: unknown;
    response?: unknown;
    constructor(message: string, options?: ErrorOptions);
}
/**
 * Error thrown when input validation fails (e.g., bad parameters).
 * Constructed by kitcore's input-validation path via
 * `zapierAdaptError`, and also by direct throws elsewhere in the SDK.
 */
declare class ZapierValidationError extends ZapierError {
    readonly name = "ZapierValidationError";
    readonly code: "ZAPIER_VALIDATION_ERROR";
    details?: unknown;
    constructor(message: string, options?: ErrorOptions & {
        details?: unknown;
    });
}
/**
 * Fallback for non-Error throws normalized by kitcore (`throw "oops"`,
 * `throw { message: "X" }`, etc.). Real `Error` subclasses thrown by
 * handlers bubble through unchanged and never become this.
 */
declare class ZapierUnknownError extends ZapierError {
    readonly name = "ZapierUnknownError";
    readonly code: "ZAPIER_UNKNOWN_ERROR";
}
/**
 * Error thrown for authentication and authorization failures (401/403).
 */
declare class ZapierAuthenticationError extends ZapierError {
    readonly name = "ZapierAuthenticationError";
    readonly code: "ZAPIER_AUTHENTICATION_ERROR";
}
/**
 * Maps kitcore's abstract `CoreErrorCode` values onto Zapier's
 * branded error classes. Wired into `createZapierSdk` via
 * `createCorePlugin({ adaptError: zapierAdaptError })`, so
 * every error kitcore constructs internally surfaces as the
 * appropriate `Zapier*` subclass instead of a neutral `CoreError`.
 */
declare const zapierAdaptError: AdaptError;
/**
 * Error thrown when API requests fail
 */
declare class ZapierApiError extends ZapierError {
    readonly name = "ZapierApiError";
    readonly code: "ZAPIER_API_ERROR";
    constructor(message: string, options?: ErrorOptions);
}
/**
 * Error thrown when an app is not found
 */
declare class ZapierAppNotFoundError extends ZapierError {
    readonly name = "ZapierAppNotFoundError";
    readonly code: "ZAPIER_APP_NOT_FOUND_ERROR";
    appKey?: string;
    constructor(message: string, options?: ErrorOptions & {
        appKey?: string;
    });
}
/**
 * Error thrown when a resource is not found (404)
 */
declare class ZapierNotFoundError extends ZapierError {
    readonly name: string;
    readonly code: string;
    constructor(message: string, options?: ErrorOptions);
}
/**
 * Error thrown when a requested resource is not found and the caller
 * provided a `resource` hint on the request, populating `resourceType`
 * and (optionally) `resourceId`. Subclass of `ZapierNotFoundError` so
 * `instanceof ZapierNotFoundError` checks continue to work.
 */
declare class ZapierResourceNotFoundError extends ZapierNotFoundError {
    readonly name = "ZapierResourceNotFoundError";
    readonly code: "ZAPIER_RESOURCE_NOT_FOUND_ERROR";
    resourceType?: string;
    resourceId?: string;
    constructor(message: string, options?: ErrorOptions & {
        resourceType?: string;
        resourceId?: string;
    });
}
/**
 * Error thrown when required app or implementation configuration is missing
 */
declare class ZapierConfigurationError extends ZapierError {
    readonly name = "ZapierConfigurationError";
    readonly code: "ZAPIER_CONFIGURATION_ERROR";
    configType?: string;
    constructor(message: string, options?: ErrorOptions & {
        configType?: string;
    });
}
/**
 * Error thrown when code bundling or compilation fails
 */
declare class ZapierBundleError extends ZapierError {
    readonly name = "ZapierBundleError";
    readonly code: "ZAPIER_BUNDLE_ERROR";
    buildErrors?: string[];
    constructor(message: string, options?: ErrorOptions & {
        buildErrors?: string[];
    });
}
/**
 * Error thrown when operations timeout or exceed retry limits
 */
declare class ZapierTimeoutError extends ZapierError {
    readonly name = "ZapierTimeoutError";
    readonly code: "ZAPIER_TIMEOUT_ERROR";
    attempts?: number;
    maxAttempts?: number;
    constructor(message: string, options?: ErrorOptions & {
        attempts?: number;
        maxAttempts?: number;
    });
}
/**
 * Error thrown when action execution fails due to errors returned from the third-party service
 * This happens when the Actions API returns a 200 status but includes errors in the response
 */
declare class ZapierActionError extends ZapierError {
    readonly name = "ZapierActionError";
    readonly code: "ZAPIER_ACTION_ERROR";
    appKey?: string;
    actionKey?: string;
    constructor(message: string, options?: ErrorOptions & {
        appKey?: string;
        actionKey?: string;
    });
    get actionErrors(): CoreApiError[] | undefined;
}
/**
 * Error thrown when an operation conflicts with existing state (409). Common
 * cases: creating a named resource where a different one already exists with
 * the same name, or operating on a resource in an incompatible state.
 */
declare class ZapierConflictError extends ZapierError {
    readonly name = "ZapierConflictError";
    readonly code: "ZAPIER_CONFLICT_ERROR";
    resourceType?: string;
    constructor(message: string, options?: ErrorOptions & {
        resourceType?: string;
    });
}
/**
 * Rate limit information extracted from response headers
 */
interface RateLimitInfo {
    /** How long to wait before retrying (from Retry-After or X-RateLimit-Reset) */
    retryAfterMs?: number;
    /** Maximum requests allowed in the window (from X-RateLimit-Limit) */
    limit?: number;
    /** Requests remaining in the current window (from X-RateLimit-Remaining) */
    remaining?: number;
    /** When the rate limit window resets in ms since epoch (from X-RateLimit-Reset) */
    resetMs?: number;
}
/**
 * Error thrown when rate limited (429) after all retries are exhausted
 */
declare class ZapierRateLimitError extends ZapierError {
    readonly name = "ZapierRateLimitError";
    readonly code: "ZAPIER_RATE_LIMIT_ERROR";
    rateLimit: RateLimitInfo;
    retries: number;
    constructor(message: string, options?: ErrorOptions & {
        rateLimit?: RateLimitInfo;
        retries?: number;
    });
}
/**
 * Terminal status of an approval attempt, exposed on `ZapierApprovalError.approvalStatus`.
 *
 * - `pending`: A manual approval was created but not yet resolved. Only thrown
 *   in `approvalMode: "throw"` — the caller is expected to surface the approval
 *   URL to an end user (e.g. an LLM instructing its user to click the link).
 *   Auto-mode approvals are polled to terminal resolution instead of throwing
 *   `pending`.
 * - `denied`: A human explicitly rejected the approval in the UI.
 * - `policy_denied`: A policy rule blocked the request before (or instead of)
 *   creating an approval. Cannot be approved by a human.
 * - `approval_required`: The backend requested approval, but `approvalMode` is
 *   `"disabled"` (the default) so the SDK did not create an approval. Set
 *   `approvalMode` to `"poll"` or `"throw"` (or the `ZAPIER_APPROVAL_MODE` env
 *   var) to enable the approval flow.
 * - `failed`: The approval reached a terminal processing failure after it was
 *   created, such as the approved policy being rejected by the permissions
 *   service.
 * - `timeout`: Poll mode exceeded `approvalTimeoutMs` without the approval
 *   being resolved.
 * - `max_retries_exceeded`: A single request triggered more sequential approval
 *   rounds than `maxApprovalRetries` allows (runaway-loop safeguard).
 */
type ApprovalStatus = "denied" | "failed" | "timeout" | "pending" | "policy_denied" | "approval_required" | "max_retries_exceeded";
/**
 * Error thrown when a request requires approval and the approval is denied, times out,
 * or the auth type doesn't support the approval flow.
 */
declare class ZapierApprovalError extends ZapierError {
    readonly name = "ZapierApprovalError";
    readonly code: "ZAPIER_APPROVAL_ERROR";
    approvalId?: string;
    approvalStatus?: ApprovalStatus;
    approvalUrl?: string;
    pollUrl?: string;
    streamUrl?: string;
    reason?: string;
    constructor(message: string, options?: ErrorOptions & {
        approvalId?: string;
        status?: ApprovalStatus;
        approvalUrl?: string;
        pollUrl?: string;
        streamUrl?: string;
        reason?: string;
    });
}
/**
 * Error thrown when Relay itself encounters an error (as opposed to the upstream partner API returning an error).
 * Indicated by the presence of the X-Relay-Error response header.
 */
declare class ZapierRelayError extends ZapierError {
    readonly name = "ZapierRelayError";
    readonly code: "ZAPIER_RELAY_ERROR";
    constructor(message: string, options?: ErrorOptions);
}
/**
 * Utility function to format error messages for display
 */
declare function formatErrorMessage(error: ZapierError): string;

/**
 * Base class for all Zapier SDK signals.
 *
 * Signals are intentional control-flow throws — the user is signaling
 * intent to the SDK runtime, not reporting a failure. For example, a
 * callback throwing `ZapierReleaseTriggerMessageSignal` tells
 * `drainTriggerInbox` to release the message immediately rather than
 * leave it leased.
 *
 * Distinct from `ZapierError` (failures): signals are not errors and
 * shouldn't be caught by error-handling code via `instanceof
 * ZapierError`. Use `instanceof ZapierSignal` to discriminate intent
 * throws from real failures.
 */
declare abstract class ZapierSignal extends Error {
    abstract readonly name: string;
    abstract readonly code: string;
    constructor(message?: string);
}

declare const TriggerMessageStatusSchema: z.ZodUnion<readonly [z.ZodEnum<{
    available: "available";
    leased: "leased";
    acked: "acked";
    quarantined: "quarantined";
}>, z.ZodString]>;
type TriggerMessageStatus = z.infer<typeof TriggerMessageStatusSchema>;
declare const LeasedTriggerMessageItemSchema: z.ZodObject<{
    id: z.ZodString;
    created_at: z.ZodString;
    status: z.ZodUnion<readonly [z.ZodEnum<{
        available: "available";
        leased: "leased";
        acked: "acked";
        quarantined: "quarantined";
    }>, z.ZodString]>;
    message_attributes: z.ZodObject<{
        lease_count: z.ZodNumber;
        error_message: z.ZodNullable<z.ZodString>;
        possible_duplicate_data: z.ZodBoolean;
    }, z.core.$strip>;
    payload: z.ZodRecord<z.ZodString, z.ZodUnknown>;
}, z.core.$strip>;
type LeasedTriggerMessageItem = z.infer<typeof LeasedTriggerMessageItemSchema>;

/**
 * Signal an `onMessage` callback can throw to release the current
 * message back to the inbox immediately (status returns to
 * `available`) rather than leaving it leased until the lease
 * timeout. The actual release call is deferred to the end of the
 * drain so the same drain doesn't immediately re-lease it.
 *
 * Always triggers release regardless of `releaseOnError`.
 */
declare class ZapierReleaseTriggerMessageSignal extends ZapierSignal {
    readonly name = "ZapierReleaseTriggerMessageSignal";
    readonly code: "ZAPIER_RELEASE_TRIGGER_MESSAGE_SIGNAL";
}
/**
 * Signal an `onMessage` callback can throw to stop the drain after
 * the current batch — no further leases, no further callbacks. The
 * triggering message gets the same release-or-leave treatment as any
 * thrown error (per `releaseOnError`). Other in-flight messages in
 * the same batch finish normally before the command returns.
 * Already-leased-but-not-yet-started messages are released so
 * they're available for re-lease.
 */
declare class ZapierAbortDrainSignal extends ZapierSignal {
    readonly name = "ZapierAbortDrainSignal";
    readonly code: "ZAPIER_ABORT_DRAIN_SIGNAL";
}
/**
 * Per-message handler. Resolves to ack the message; rejects to
 * release-or-leave per `releaseOnError`. Throw a
 * `ZapierReleaseTriggerMessageSignal` for explicit release; throw a
 * `ZapierAbortDrainSignal` to stop the drain after the current
 * batch.
 */
type DrainTriggerInboxCallback = (message: LeasedTriggerMessageItem) => void | Promise<void>;
/**
 * Per-message error observer for `continueOnError: true` mode.
 * Called with the failure reason and the message; signals
 * (`ZapierSignal` subclasses) are filtered out — they're
 * control-flow throws, not failures to observe. Synchronous from
 * the loop's perspective; throwing from `onError` is swallowed,
 * since it's an observer not a flow controller.
 */
type DrainTriggerInboxErrorObserver = (error: unknown, message: LeasedTriggerMessageItem) => void | Promise<void>;
declare const DrainTriggerInboxSchema: z.ZodObject<{
    inbox: z.ZodString & {
        _def: z.core.$ZodStringDef & PositionalMetadata;
    };
    onMessage: z.ZodOptional<z.ZodFunction<z.core.$ZodFunctionArgs, z.core.$ZodFunctionOut>>;
    concurrency: z.ZodOptional<z.ZodNumber>;
    leaseLimit: z.ZodOptional<z.ZodNumber>;
    leaseSeconds: z.ZodOptional<z.ZodNumber>;
    releaseOnError: z.ZodOptional<z.ZodBoolean>;
    continueOnError: z.ZodOptional<z.ZodBoolean>;
    onError: z.ZodOptional<z.ZodFunction<z.core.$ZodFunctionArgs, z.core.$ZodFunctionOut>>;
    signal: z.ZodOptional<z.ZodCustom<AbortSignal, AbortSignal>>;
    maxMessages: z.ZodOptional<z.ZodNumber>;
}, z.core.$strip>;
declare const WatchTriggerInboxSchema: z.ZodObject<{
    inbox: z.ZodString & {
        _def: z.core.$ZodStringDef & PositionalMetadata;
    };
    onMessage: z.ZodOptional<z.ZodFunction<z.core.$ZodFunctionArgs, z.core.$ZodFunctionOut>>;
    concurrency: z.ZodOptional<z.ZodNumber>;
    leaseLimit: z.ZodOptional<z.ZodNumber>;
    leaseSeconds: z.ZodOptional<z.ZodNumber>;
    releaseOnError: z.ZodOptional<z.ZodBoolean>;
    continueOnError: z.ZodOptional<z.ZodBoolean>;
    onError: z.ZodOptional<z.ZodFunction<z.core.$ZodFunctionArgs, z.core.$ZodFunctionOut>>;
    signal: z.ZodOptional<z.ZodCustom<AbortSignal, AbortSignal>>;
    maxDrainIntervalSeconds: z.ZodOptional<z.ZodNumber>;
}, z.core.$strip>;
/**
 * Fields shared by both `drainTriggerInbox` and `watchTriggerInbox`.
 * `onMessage` is required at the type level; runtime validation in
 * the handler covers JS callers who bypass TS.
 */
interface TriggerInboxCommandSharedFields {
    inbox: string;
    onMessage: DrainTriggerInboxCallback;
    concurrency?: number;
    leaseLimit?: number;
    leaseSeconds?: number;
    releaseOnError?: boolean;
    continueOnError?: boolean;
    onError?: DrainTriggerInboxErrorObserver;
    signal?: AbortSignal;
}
/**
 * Hand-typed options for `drainTriggerInbox`. The Zod schema above is
 * for docs and registry; this type is what the SDK function accepts,
 * with `onMessage` / `onError` typed as proper callbacks instead of
 * opaque `z.function()`.
 */
type DrainTriggerInboxOptions = TriggerInboxCommandSharedFields & {
    maxMessages?: number;
};
type WatchTriggerInboxOptions = TriggerInboxCommandSharedFields & {
    maxDrainIntervalSeconds?: number;
};

/**
 * Event emission types matching Avro schemas for SDK telemetry
 *
 * These interfaces correspond to the Avro schemas:
 * - application_lifecycle_event.avsc
 * - error_occurred_event.avsc
 * - method_called_event.avsc
 * - cli_command_executed_event.avsc
 */
interface BaseEvent {
    event_id: string;
    timestamp_ms: number;
    release_id: string;
    customuser_id?: number | null;
    account_id?: number | null;
    client_id?: string | null;
    auth_mechanism?: string | null;
    identity_id?: number | null;
    visitor_id?: string | null;
    correlation_id?: string | null;
}
interface ErrorOccurredEvent extends BaseEvent {
    zap_id?: number | null;
    node_id?: number | null;
    selected_api?: string | null;
    app_id?: number | null;
    app_version_id?: number | null;
    error_message: string;
    error_type?: string | null;
    error_status_code?: number | null;
    error_stack_trace?: string | null;
    error_source_method?: string | null;
    error_source_file?: string | null;
    error_line_number?: number | null;
    operation_type?: string | null;
    operation_key?: string | null;
    error_severity?: string | null;
    is_user_facing: boolean;
    is_recoverable?: boolean | null;
    sdk_version?: string | null;
    error_metadata?: Record<string, string | null> | null;
    parent_error_id?: string | null;
    error_occurred_timestamp_ms?: number | null;
    error_code?: string | null;
    recovery_attempted?: boolean | null;
    recovery_action?: string | null;
    recovery_successful?: boolean | null;
    environment?: string | null;
    execution_time_before_error_ms?: number | null;
    agent?: string | null;
    caller_package?: string | null;
    caller_package_version?: string | null;
}
interface ApplicationLifecycleEvent extends BaseEvent {
    lifecycle_event_type: "startup" | "exit" | "signal_termination" | "signup_success" | "login_success";
    selected_api?: string | null;
    app_id?: number | null;
    app_version_id?: number | null;
    sdk_version?: string | null;
    cli_version?: string | null;
    exit_code?: number | null;
    signal_name?: string | null;
    uptime_ms?: number | null;
    memory_usage_bytes?: number | null;
    peak_memory_usage_bytes?: number | null;
    cpu_time_ms?: number | null;
    os_platform?: string | null;
    os_release?: string | null;
    os_architecture?: string | null;
    platform_versions?: Record<string, string | null> | null;
    environment?: string | null;
    is_ci_environment?: boolean | null;
    ci_platform?: string | null;
    session_id?: string | null;
    metadata?: Record<string, string | null> | null;
    process_argv?: (string | null)[] | null;
    is_graceful_shutdown?: boolean | null;
    shutdown_duration_ms?: number | null;
    active_requests_count?: number | null;
    used_non_interactive_mode?: boolean | null;
    is_headless?: boolean | null;
    stdin_is_tty?: boolean | null;
    stdout_is_tty?: boolean | null;
    agent?: string | null;
    caller_package?: string | null;
    caller_package_version?: string | null;
}
interface MethodCalledEvent extends BaseEvent {
    method_name: string;
    method_module: string | null;
    execution_duration_ms: number;
    success_flag: boolean;
    error_message: string | null;
    error_type: string | null;
    argument_count: number;
    is_paginated: boolean;
    sdk_version: string;
    environment: string | null;
    selected_api: string | null;
    app_id: number | null;
    app_version_id: number | null;
    zap_id: number | null;
    node_id: number | null;
    operation_type: string | null;
    operation_key: string | null;
    call_context: string | null;
    is_retry: boolean;
    retry_attempt: number | null;
    argument_types: string[] | null;
    return_type: string | null;
    caller_method: string | null;
    call_stack_depth: number | null;
    is_synchronous: boolean | null;
    cpu_time_ms: number | null;
    memory_usage_bytes: number | null;
    agent: string | null;
    caller_package: string | null;
    caller_package_version: string | null;
}

/**
 * Transport abstraction layer for event emission
 *
 * Provides configurable transport mechanisms for emitting telemetry events.
 * All transports implement silent failure to prevent SDK disruption.
 */
interface EventTransport {
    emit<T extends any>(subject: string, event: T): Promise<void>;
    close?(): Promise<void>;
}
interface TransportConfig {
    type: "http" | "console" | "noop";
    endpoint?: string;
    headers?: Record<string, string>;
    retryAttempts?: number;
    retryDelayMs?: number;
}

interface EventContext {
    customuser_id?: number | null;
    account_id?: number | null;
    client_id?: string | null;
    auth_mechanism?: string | null;
    identity_id?: number | null;
    visitor_id?: string | null;
    correlation_id?: string | null;
    selected_api?: string | null;
    app_id?: number | null;
    app_version_id?: number | null;
    zap_id?: number | null;
    node_id?: number | null;
    environment?: string | null;
    operation_type?: string | null;
    caller_package?: string | null;
    caller_package_version?: string | null;
}
interface ErrorEventData {
    error_message: string;
    is_user_facing: boolean;
    error_type?: string | null;
    error_status_code?: number | null;
    error_stack_trace?: string | null;
    error_source_method?: string | null;
    error_source_file?: string | null;
    error_line_number?: number | null;
    operation_type?: string | null;
    operation_key?: string | null;
    error_severity?: string | null;
    is_recoverable?: boolean | null;
    error_metadata?: Record<string, string | null> | null;
    parent_error_id?: string | null;
    error_occurred_timestamp_ms?: number | null;
    error_code?: string | null;
    recovery_attempted?: boolean | null;
    recovery_action?: string | null;
    recovery_successful?: boolean | null;
    execution_time_before_error_ms?: number | null;
}
interface EnhancedErrorEventData extends ErrorEventData {
    execution_start_time?: number | null;
}
interface ApplicationLifecycleEventData {
    lifecycle_event_type: "startup" | "exit" | "signal_termination" | "signup_success" | "login_success";
    exit_code?: number | null;
    signal_name?: string | null;
    uptime_ms?: number | null;
    is_graceful_shutdown?: boolean | null;
    shutdown_duration_ms?: number | null;
    memory_usage_bytes?: number | null;
    peak_memory_usage_bytes?: number | null;
    cpu_time_ms?: number | null;
    active_requests_count?: number | null;
    used_non_interactive_mode?: boolean | null;
    is_headless?: boolean | null;
    process_argv?: (string | null)[] | null;
}
interface MethodCalledEventData {
    method_name: string;
    method_module?: string | null;
    execution_duration_ms: number;
    success_flag: boolean;
    error_message?: string | null;
    error_type?: string | null;
    argument_count: number;
    is_paginated?: boolean;
    selected_api?: string | null;
    operation_type?: string | null;
    operation_key?: string | null;
}

/**
 * Event builder utilities for creating telemetry events
 *
 * Provides builder functions that auto-populate common fields and ensure
 * schema compliance for all event types.
 */

declare function createBaseEvent(context?: EventContext): BaseEvent;
declare function buildErrorEvent(data: ErrorEventData, context?: EventContext): ErrorOccurredEvent;
declare function buildApplicationLifecycleEvent(data: ApplicationLifecycleEventData, context?: EventContext): ApplicationLifecycleEvent;
declare function buildErrorEventWithContext(data: EnhancedErrorEventData, context?: EventContext): ErrorOccurredEvent;
declare function buildMethodCalledEvent(data: MethodCalledEventData, context?: EventContext): MethodCalledEvent;

/**
 * Simple utility functions for event emission
 * These are pure functions that can be used to populate common event fields
 */
/**
 * Generate a unique event ID
 */
declare function generateEventId(): string;
/**
 * Get current timestamp in milliseconds since epoch
 */
declare function getCurrentTimestamp(): number;
/**
 * Get release ID (git SHA) - in production this would come from build process
 */
declare function getReleaseId(): string;
/**
 * Get operating system information
 */
declare function getOsInfo(): {
    platform: string | null;
    release: string | null;
    architecture: string | null;
};
/**
 * Get platform versions (Node.js, npm, etc.)
 */
declare function getPlatformVersions(): Record<string, string | null>;
/**
 * Check if running in CI environment
 */
declare function isCi(): boolean;
/**
 * Get CI platform name if running in CI
 */
declare function getCiPlatform(): string | null;
/**
 * Get memory usage in bytes
 */
declare function getMemoryUsage(): number | null;
/**
 * Get CPU time in milliseconds
 */
declare function getCpuTime(): number | null;
/**
 * Whether stdin and stdout are each attached to an interactive terminal (TTY).
 * Both fields resolve to null together when process is unavailable.
 *
 * Never throws — try/catch guards event emission from monkeypatched streams or
 * other exotic environments.
 */
declare function getTtyContext(): {
    stdin_is_tty: boolean | null;
    stdout_is_tty: boolean | null;
};

/**
 * Removes all registered process event listeners.
 * Useful for test cleanup to prevent listener accumulation.
 */
declare function cleanupEventListeners(): void;
interface EventEmissionConfig {
    enabled?: boolean;
    transport?: TransportConfig;
    callContext?: "sdk" | "cli" | "mcp";
}
interface EventEmissionContext {
    eventEmission: {
        transport: EventTransport;
        config: EventEmissionConfig;
        emit<T extends any>(subject: string, event: T): void;
        createBaseEvent(): Promise<BaseEvent>;
        flush(): Promise<void>;
        close(exitCode?: number): Promise<void>;
    };
}
/** The emitter surface: what `imports.eventEmission` and `resolvePlugin`
 * callers see. Internal; deliberately NOT public SDK API. */
type EventEmitter = EventEmissionContext["eventEmission"];
declare const EVENT_EMISSION_ID = "zapier/eventEmission";
/**
 * The typed stand-in for the emitter, imported by plugins that emit custom
 * events (`imports: [eventEmissionPluginRef]` then `imports.eventEmission`).
 */
declare const eventEmissionPluginRef: PropertyPlugin<"eventEmission", {
    transport: EventTransport;
    config: EventEmissionConfig;
    emit<T extends unknown>(subject: string, event: T): void;
    createBaseEvent(): Promise<BaseEvent>;
    flush(): Promise<void>;
    close(exitCode?: number): Promise<void>;
}> & PluginSummary<"zapier/eventEmission", never>;
/**
 * The module-model emitter provider: builds the emitter once at
 * materialization from the injected SDK options (startup event, process
 * listeners, transport). Its `dispose` is the SDK teardown path: `disposeSdk
 * (sdk, { exitCode })` flushes pending emissions, emits the exit lifecycle
 * event, and removes the process listeners (idempotent, like `close` always
 * was). Internal: registered as an import of `zapierSdkPlugin`, never
 * surfaced as public API.
 */
declare const eventEmissionPlugin: PropertyPlugin<"eventEmission", {
    transport: EventTransport;
    config: EventEmissionConfig;
    emit<T extends unknown>(subject: string, event: T): void;
    createBaseEvent(): Promise<BaseEvent>;
    flush(): Promise<void>;
    close(exitCode?: number): Promise<void>;
}> & LeafSummary<"zapier", "eventEmission", readonly [PropertyPlugin<"sdkOptions", {
    credentials?: string | {
        clientId: string;
        clientSecret: string;
        type?: "client_credentials" | undefined;
        baseUrl?: string | undefined;
        scope?: string | undefined;
    } | {
        clientId: string;
        type?: "pkce" | undefined;
        baseUrl?: string | undefined;
        scope?: string | undefined;
    } | zod_v4_core.$InferOuterFunctionType<zod_v4_core.$ZodTuple<readonly [], zod_v4_core.$ZodFunctionOut>, zod.ZodUnion<readonly [zod.ZodUnion<readonly [zod.ZodString, zod.ZodUnion<readonly [zod.ZodObject<{
        type: zod.ZodOptional<zod.ZodEnum<{
            client_credentials: "client_credentials";
        }>>;
        clientId: zod.ZodString;
        clientSecret: zod.ZodString;
        baseUrl: zod.ZodOptional<zod.ZodString>;
        scope: zod.ZodOptional<zod.ZodString>;
    }, zod_v4_core.$strip>, zod.ZodObject<{
        type: zod.ZodOptional<zod.ZodEnum<{
            pkce: "pkce";
        }>>;
        clientId: zod.ZodString;
        baseUrl: zod.ZodOptional<zod.ZodString>;
        scope: zod.ZodOptional<zod.ZodString>;
    }, zod_v4_core.$strip>]>]>, zod.ZodPromise<zod.ZodUnion<readonly [zod.ZodString, zod.ZodUnion<readonly [zod.ZodObject<{
        type: zod.ZodOptional<zod.ZodEnum<{
            client_credentials: "client_credentials";
        }>>;
        clientId: zod.ZodString;
        clientSecret: zod.ZodString;
        baseUrl: zod.ZodOptional<zod.ZodString>;
        scope: zod.ZodOptional<zod.ZodString>;
    }, zod_v4_core.$strip>, zod.ZodObject<{
        type: zod.ZodOptional<zod.ZodEnum<{
            pkce: "pkce";
        }>>;
        clientId: zod.ZodString;
        baseUrl: zod.ZodOptional<zod.ZodString>;
        scope: zod.ZodOptional<zod.ZodString>;
    }, zod_v4_core.$strip>]>]>>]>> | undefined;
    debug?: boolean | undefined;
    baseUrl?: string | undefined;
    trackingBaseUrl?: string | undefined;
    maxNetworkRetries?: number | undefined;
    maxNetworkRetryDelayMs?: number | undefined;
    maxConcurrentRequests?: number | undefined;
    approvalTimeoutMs?: number | undefined;
    maxApprovalRetries?: number | undefined;
    approvalMode?: "disabled" | "poll" | "throw" | undefined;
    openAutoModeApprovalsInBrowser?: boolean | undefined;
    manifestPath?: string | undefined;
    manifest?: Manifest | undefined;
    onEvent?: EventCallback | undefined;
    fetch?: typeof fetch | undefined;
    eventEmission?: EventEmissionConfig | undefined;
    callerPackage?: {
        name: string;
        version: string;
    } | undefined;
    cache?: ZapierCache | undefined;
    canIncludeSharedConnections?: boolean | undefined;
    canIncludeSharedTables?: boolean | undefined;
    canDeleteTables?: boolean | undefined;
    token?: string | undefined;
} | undefined> & PluginSummary<never, never>]>;
/**
 * The method-lifecycle observer: emits a `MethodCalledEvent` for each
 * top-level SDK method call, through the emitter provider. The module-model
 * successor to the legacy plugin's `context.hooks.onMethodEnd` contribution.
 */
declare const eventEmissionHookPlugin: HookPlugin<string>;

/**
 * SDK Event System
 *
 * This module provides common event type definitions for the SDK's
 * event system, including authentication, API, and loading events.
 */
interface SdkEvent {
    type: string;
    payload?: Record<string, unknown>;
    timestamp?: number;
}
interface AuthEvent extends SdkEvent {
    type: "auth_refreshing" | "auth_success" | "auth_error" | "auth_logout";
    payload?: {
        message?: string;
        error?: string;
        operation?: string;
    };
}
interface ApiEvent extends SdkEvent {
    type: "api_request" | "api_response" | "api_error";
    payload?: {
        url?: string;
        method?: string;
        status?: number;
        duration?: number;
        error?: string;
    };
}
interface LoadingEvent extends SdkEvent {
    type: "loading_start" | "loading_end";
    payload?: {
        operation?: string;
        resource?: string;
    };
}
type EventCallback = (event: SdkEvent) => void;

/**
 * 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
 */

/**
 * Client credentials for OAuth client_credentials flow.
 * The SDK will exchange these for an access token.
 */
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>;
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).
 */
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>;
type PkceCredentialsObject = z.infer<typeof PkceCredentialsObjectSchema>;
/**
 * Union of all credential object types.
 */
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>]>;
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.
 */
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>]>]>;
type ResolvedCredentials = z.infer<typeof ResolvedCredentialsSchema>;
/**
 * Lazy/dynamic credential resolution — a function returning resolved credentials.
 */
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>]>]>>]>>;
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)
 */
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>]>]>>]>>]>;
type Credentials = z.infer<typeof CredentialsSchema>;
/**
 * Type guard for client credentials objects.
 */
declare function isClientCredentials(credentials: ResolvedCredentials): credentials is ClientCredentialsObject;
/**
 * Type guard for PKCE credentials objects.
 */
declare function isPkceCredentials(credentials: ResolvedCredentials): credentials is PkceCredentialsObject;
/**
 * Type guard for credentials objects (either type).
 */
declare function isCredentialsObject(credentials: ResolvedCredentials): credentials is CredentialsObject;
/**
 * Type guard for credentials functions.
 */
declare function isCredentialsFunction(credentials: Credentials): credentials is CredentialsFunction;

/**
 * Best-effort cache for the SDK.
 *
 * The SDK uses this to avoid re-fetching values it can recreate, primarily
 * client_credentials access tokens. Cache entries may disappear at any time:
 * a miss is normal and callers must be able to rebuild the value.
 *
 * The default cache is in-memory. When the CLI package is installed, the SDK
 * can opportunistically use its filesystem + keychain cache. Browser and
 * minimal server deployments fall back to memory unless a caller injects a
 * Redis, database, or environment-specific cache.
 *
 * Secrets: adapters receive a `secret: true` flag on `set` and decide
 * what to do with it (keychain for the filesystem adapter; ignored for
 * the in-memory adapter; user adapters can throw, plaintext, encrypt —
 * their call). The value returned by `get` is always the plain secret.
 */
interface ZapierCacheEntry {
    value: string;
    /** Millisecond epoch. Undefined means "no expiration recorded." */
    expiresAt?: number;
}
interface ZapierCacheSetOptions {
    /**
     * Hint that this value is sensitive. Adapters may use a more secure
     * backend (e.g. the OS keychain for the filesystem adapter); adapters
     * without a secure backend may throw, warn, or accept — their call.
     */
    secret?: boolean;
    /** Time-to-live in seconds from now. */
    ttl?: number;
}
interface ZapierCache {
    get(key: string): Promise<ZapierCacheEntry | undefined>;
    set(key: string, value: string, options?: ZapierCacheSetOptions): Promise<void>;
    delete(key: string): Promise<void>;
    /**
     * Optional mutex for caches that can coordinate beyond one JavaScript
     * process. The SDK re-checks the cache inside the lock before rebuilding.
     */
    withLock?<T>(key: string, fn: () => Promise<T>): Promise<T>;
}
/**
 * Simplest possible adapter: a Map. No persistence, no locking (single
 * process only), no differentiation between secrets and non-secrets.
 * This is the default when cli-login isn't installed and no custom
 * cache is provided.
 */
declare function createMemoryCache(): ZapierCache;

interface SseMessage {
    data: string;
}
/**
 * A streamed SSE frame after JSON parsing, as yielded by
 * `ApiClient.fetchJsonStream`. Unlike `fetchJson` — which throws on invalid
 * JSON — a long-lived stream must not die on one malformed frame, so a parse
 * failure is reported as `{ parsed: false, data: null, raw }` rather than
 * thrown. Callers skip `parsed: false` frames (and may inspect `raw`) and keep
 * consuming.
 */
type JsonSseMessage<T = unknown> = {
    parsed: true;
    data: T;
    raw: string;
} | {
    parsed: false;
    data: null;
    raw: string;
};

declare const NeedSchema: z.ZodObject<{
    key: z.ZodString;
    alters_custom_fields: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
    capabilities: z.ZodOptional<z.ZodArray<z.ZodString>>;
    choices: z.ZodOptional<z.ZodArray<z.ZodObject<{
        key: z.ZodOptional<z.ZodString>;
        label: z.ZodOptional<z.ZodString>;
        sample: z.ZodOptional<z.ZodString>;
        value: z.ZodOptional<z.ZodString>;
    }, z.core.$strip>>>;
    computed: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
    custom_field: z.ZodOptional<z.ZodBoolean>;
    default: z.ZodOptional<z.ZodString>;
    depends_on: z.ZodOptional<z.ZodArray<z.ZodString>>;
    format: z.ZodOptional<z.ZodLiteral<"SELECT">>;
    from_search: z.ZodOptional<z.ZodBoolean>;
    from_write: z.ZodOptional<z.ZodBoolean>;
    help_text: z.ZodOptional<z.ZodString>;
    help_text_html: z.ZodOptional<z.ZodString>;
    input_format: z.ZodOptional<z.ZodArray<z.ZodString>>;
    label: z.ZodOptional<z.ZodString>;
    language: z.ZodOptional<z.ZodString>;
    parent_key: z.ZodOptional<z.ZodString>;
    placeholder: z.ZodOptional<z.ZodString>;
    prefill: z.ZodOptional<z.ZodString>;
    required: z.ZodOptional<z.ZodBoolean>;
    searchfill: z.ZodOptional<z.ZodString>;
    send_in_json: z.ZodOptional<z.ZodBoolean>;
    regex: z.ZodOptional<z.ZodString>;
    type: z.ZodOptional<z.ZodEnum<{
        string: "string";
        boolean: "boolean";
        filter: "filter";
        file: "file";
        integer: "integer";
        text: "text";
        datetime: "datetime";
        decimal: "decimal";
        copy: "copy";
        password: "password";
        dict: "dict";
        code: "code";
        json: "json";
    }>>;
    list: z.ZodOptional<z.ZodBoolean>;
}, z.core.$strip>;
declare const ActionSchema: z.ZodObject<{
    id: z.ZodOptional<z.ZodString>;
    type: z.ZodEnum<{
        read: "read";
        read_bulk: "read_bulk";
        write: "write";
        search: "search";
        search_or_write: "search_or_write";
        search_and_write: "search_and_write";
        filter: "filter";
        run: "run";
    }>;
    key: z.ZodString;
    name: z.ZodString;
    description: z.ZodString;
    is_important: z.ZodOptional<z.ZodBoolean>;
    is_hidden: z.ZodOptional<z.ZodBoolean>;
    selected_api: z.ZodOptional<z.ZodString>;
}, z.core.$strip>;
declare const ChoiceSchema: z.ZodObject<{
    value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
    label: z.ZodString;
}, z.core.$strip>;
declare const FieldSchema: z.ZodObject<{
    key: z.ZodString;
    label: z.ZodString;
    type: z.ZodEnum<{
        string: "string";
        number: "number";
        boolean: "boolean";
        object: "object";
        file: "file";
        array: "array";
        datetime: "datetime";
    }>;
    required: z.ZodBoolean;
    description: z.ZodOptional<z.ZodString>;
    choices: z.ZodOptional<z.ZodArray<z.ZodObject<{
        value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
        label: z.ZodString;
    }, z.core.$strip>>>;
}, z.core.$strip>;
declare const ActionExecutionResultSchema: z.ZodObject<{
    data: z.ZodArray<z.ZodUnknown>;
}, z.core.$strip>;
declare const ActionFieldChoiceSchema: z.ZodObject<{
    value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
    label: z.ZodString;
}, z.core.$strip>;
declare const ActionFieldSchema: z.ZodObject<{
    key: z.ZodString;
    label: z.ZodOptional<z.ZodString>;
    required: z.ZodBoolean;
    type: z.ZodOptional<z.ZodString>;
    helpText: z.ZodOptional<z.ZodString>;
    helpTextHtml: z.ZodOptional<z.ZodString>;
    choices: z.ZodOptional<z.ZodArray<z.ZodObject<{
        value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
        label: z.ZodString;
    }, z.core.$strip>>>;
    default: z.ZodOptional<z.ZodString>;
    placeholder: z.ZodOptional<z.ZodString>;
    computed: z.ZodOptional<z.ZodBoolean>;
    customField: z.ZodOptional<z.ZodBoolean>;
    dependsOn: z.ZodOptional<z.ZodArray<z.ZodString>>;
    format: z.ZodOptional<z.ZodString>;
    inputFormat: z.ZodOptional<z.ZodArray<z.ZodString>>;
}, z.core.$strip>;
declare const UserProfileSchema: z.ZodObject<{
    id: z.ZodNumber;
    public_id: z.ZodOptional<z.ZodString>;
    code: z.ZodString;
    user_id: z.ZodNumber;
    auto_provisioned: z.ZodBoolean;
    first_name: z.ZodString;
    last_name: z.ZodString;
    username: z.ZodString;
    personas: z.ZodString;
    user_generated_personas: z.ZodString;
    last_login: z.ZodString;
    email: z.ZodString;
    email_hash: z.ZodString;
    email_confirmed: z.ZodBoolean;
    timezone: z.ZodString;
    photo_url: z.ZodString;
    has_seen_notifications: z.ZodRecord<z.ZodString, z.ZodNullable<z.ZodBoolean>>;
    signup: z.ZodString;
    since_signup: z.ZodString;
    has_activated: z.ZodBoolean;
    enable_gz_creator: z.ZodBoolean;
    should_see_nps_survey: z.ZodBoolean;
    is_developer: z.ZodBoolean;
    is_expert: z.ZodBoolean;
    tos_agreement: z.ZodBoolean;
    should_renew_tos: z.ZodBoolean;
    is_gdpr_consented: z.ZodBoolean;
    disable_ssl_check: z.ZodBoolean;
    identity: z.ZodNumber;
    summary_schedule: z.ZodString;
    alert_triggers: z.ZodString;
    alert_actions: z.ZodString;
    is_staff: z.ZodBoolean;
    is_zt_reviewer: z.ZodBoolean;
    is_high_value: z.ZodBoolean;
    is_temporary: z.ZodBoolean;
    banner_message: z.ZodString;
    enable_totp_2fa: z.ZodBoolean;
    viewed_help: z.ZodRecord<z.ZodString, z.ZodBoolean>;
    show_editor_migration_mesaging: z.ZodBoolean;
    switches: z.ZodRecord<z.ZodString, z.ZodUnknown>;
    organizations: z.ZodArray<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
    primary_organization: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
    has_active_zaps: z.ZodBoolean;
    has_google_sso: z.ZodBoolean;
    auth_realm: z.ZodString;
    roles: z.ZodArray<z.ZodObject<{
        account_id: z.ZodNumber;
        role: z.ZodString;
    }, z.core.$strip>>;
}, z.core.$strip>;
declare const AppSchema: z.ZodObject<{
    age_in_days: z.ZodOptional<z.ZodString>;
    api_docs_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
    app_profile_url: z.ZodString;
    banner: z.ZodOptional<z.ZodString>;
    categories: z.ZodOptional<z.ZodArray<z.ZodString>>;
    canonical_id: z.ZodOptional<z.ZodString>;
    current_implementation_id: z.ZodString;
    days_since_last_update: z.ZodOptional<z.ZodString>;
    description: z.ZodString;
    external_url: z.ZodString;
    hashtag: z.ZodOptional<z.ZodString>;
    id: z.ZodOptional<z.ZodNumber>;
    image: z.ZodOptional<z.ZodString>;
    images: z.ZodOptional<z.ZodString>;
    integration_overview_html: z.ZodOptional<z.ZodNullable<z.ZodString>>;
    internal_id: z.ZodString;
    invite_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
    is_beta: z.ZodOptional<z.ZodString>;
    is_built_in: z.ZodOptional<z.ZodString>;
    is_featured: z.ZodOptional<z.ZodString>;
    is_premium: z.ZodOptional<z.ZodBoolean>;
    is_public: z.ZodOptional<z.ZodString>;
    is_upcoming: z.ZodOptional<z.ZodString>;
    learn_more_url: z.ZodString;
    name: z.ZodString;
    popularity: z.ZodNumber;
    primary_color: z.ZodString;
    request_count: z.ZodOptional<z.ZodString>;
    slug: z.ZodString;
    zap_usage_count: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
}, z.core.$strip>;
declare const NeedsRequestSchema: z.ZodObject<{
    selected_api: z.ZodString;
    action: z.ZodString;
    type_of: z.ZodString;
    authentication_id: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
    params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
}, z.core.$strip>;
declare const NeedsResponseSchema: z.ZodObject<{
    success: z.ZodBoolean;
    needs: z.ZodOptional<z.ZodArray<z.ZodObject<{
        key: z.ZodString;
        alters_custom_fields: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
        capabilities: z.ZodOptional<z.ZodArray<z.ZodString>>;
        choices: z.ZodOptional<z.ZodArray<z.ZodObject<{
            key: z.ZodOptional<z.ZodString>;
            label: z.ZodOptional<z.ZodString>;
            sample: z.ZodOptional<z.ZodString>;
            value: z.ZodOptional<z.ZodString>;
        }, z.core.$strip>>>;
        computed: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
        custom_field: z.ZodOptional<z.ZodBoolean>;
        default: z.ZodOptional<z.ZodString>;
        depends_on: z.ZodOptional<z.ZodArray<z.ZodString>>;
        format: z.ZodOptional<z.ZodLiteral<"SELECT">>;
        from_search: z.ZodOptional<z.ZodBoolean>;
        from_write: z.ZodOptional<z.ZodBoolean>;
        help_text: z.ZodOptional<z.ZodString>;
        help_text_html: z.ZodOptional<z.ZodString>;
        input_format: z.ZodOptional<z.ZodArray<z.ZodString>>;
        label: z.ZodOptional<z.ZodString>;
        language: z.ZodOptional<z.ZodString>;
        parent_key: z.ZodOptional<z.ZodString>;
        placeholder: z.ZodOptional<z.ZodString>;
        prefill: z.ZodOptional<z.ZodString>;
        required: z.ZodOptional<z.ZodBoolean>;
        searchfill: z.ZodOptional<z.ZodString>;
        send_in_json: z.ZodOptional<z.ZodBoolean>;
        regex: z.ZodOptional<z.ZodString>;
        type: z.ZodOptional<z.ZodEnum<{
            string: "string";
            boolean: "boolean";
            filter: "filter";
            file: "file";
            integer: "integer";
            text: "text";
            datetime: "datetime";
            decimal: "decimal";
            copy: "copy";
            password: "password";
            dict: "dict";
            code: "code";
            json: "json";
        }>>;
        list: z.ZodOptional<z.ZodBoolean>;
    }, z.core.$strip>>>;
    errors: z.ZodOptional<z.ZodArray<z.ZodString>>;
    last_fetched_at: z.ZodOptional<z.ZodString>;
    schema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
}, z.core.$strip>;

/**
 * API Client Type Definitions
 *
 * This module contains all type definitions related to the Zapier API client,
 * including configuration options, client interfaces, request/response types,
 * and API response models.
 *
 * API response model types are inferred from Zod schemas defined in api/schemas.ts
 * to ensure a single source of truth and eliminate duplication.
 */

interface ApiClientOptions {
    baseUrl: string;
    /**
     * Authentication credentials.
     */
    credentials?: Credentials;
    /**
     * @deprecated Use `credentials` instead.
     */
    token?: string;
    debug?: boolean;
    fetch?: typeof globalThis.fetch;
    onEvent?: (event: SdkEvent) => void;
    /**
     * Maximum number of retries for rate-limited requests (429 responses).
     * Set to 0 to disable retries. Default is 3.
     */
    maxNetworkRetries?: number;
    /**
     * Maximum delay in milliseconds to wait for a rate limit retry.
     * If the server requests a longer delay, the request fails immediately.
     * Default is 60000 (60 seconds).
     */
    maxNetworkRetryDelayMs?: number;
    /**
     * Maximum number of concurrent in-flight HTTP requests per client.
     * Requests beyond this limit queue in FIFO order until a slot frees.
     * Pass `Infinity` to disable. Default: 200.
     */
    maxConcurrentRequests?: number;
    /**
     * Controls how manual approvals are handled.
     * - "poll": Create the approval, open the URL in a browser, poll until
     *   resolved, and retry the original request on success.
     * - "throw": Create the manual approval and throw a ZapierApprovalError
     *   immediately with the approval URL so the caller can surface it.
     * - "disabled": Throw a ZapierApprovalError on approval-required responses
     *   without creating an approval.
     * Server-created auto-mode approvals always poll until terminal resolution
     * and retry the original request on success, even when this option is
     * "throw".
     * Resolution order is: explicit option, then ZAPIER_APPROVAL_MODE, then a
     * TTY-based default ("poll" if interactive, "throw" otherwise).
     */
    approvalMode?: "disabled" | "poll" | "throw";
    /**
     * By default, auto-mode approvals do not open in a browser. Enable this
     * option to open the approval URL and watch the approval process.
     * Resolution order is: explicit option, then
     * ZAPIER_OPEN_AUTO_MODE_APPROVALS_IN_BROWSER, then false.
     */
    openAutoModeApprovalsInBrowser?: boolean;
    /**
     * Timeout in ms for approval polling. Default: 600000 (10 minutes).
     */
    approvalTimeoutMs?: number;
    /**
     * Maximum number of sequential approval rounds for a single request before
     * giving up. A single request can legitimately require multiple approvals
     * (one per gating policy); this cap prevents a runaway loop if the server
     * keeps returning approval_required. Default: 2.
     */
    maxApprovalRetries?: number;
    /**
     * Identifies the wrapping package that built this client (e.g., the CLI or
     * MCP server). When set, emitted as `zapier-sdk-package` /
     * `zapier-sdk-package-version` telemetry headers (plus the legacy
     * `x-zapier-sdk-package` / `x-zapier-sdk-package-version` for backward
     * compatibility). Omitted by direct `createZapierSdk` callers — their
     * identity is captured by `zapier-sdk-version` alone.
     */
    callerPackage?: {
        name: string;
        version: string;
    };
    /**
     * Pluggable key-value cache used to cache access tokens across
     * invocations. See ZapierCache in ../cache.ts.
     */
    cache?: ZapierCache;
}
interface FetchStreamInit extends RequestInit {
    searchParams?: Record<string, string>;
    authRequired?: boolean;
    requiredScopes?: string[];
    approvalContext?: () => RequestContext;
    onOpen?: () => void;
}
interface ApiClient {
    get: <T = unknown>(path: string, options?: RequestOptions) => Promise<T>;
    post: <T = unknown>(path: string, data?: unknown, options?: RequestOptions) => Promise<T>;
    put: <T = unknown>(path: string, data?: unknown, options?: RequestOptions) => Promise<T>;
    patch: <T = unknown>(path: string, data?: unknown, options?: RequestOptions) => Promise<T>;
    delete: <T = unknown>(path: string, data?: unknown, options?: RequestOptions) => Promise<T>;
    poll: <T = unknown>(path: string, options?: PollOptions) => Promise<T>;
    fetch: (path: string, init?: RequestInit & {
        searchParams?: Record<string, string>;
        authRequired?: boolean;
        approvalContext?: () => RequestContext;
    }) => Promise<Response>;
    /**
     * Opens a streaming (Server-Sent Events) request and yields parsed
     * `{ data }` frames. Runs the same pipeline as `fetch` (auth, base URL,
     * 429 retry, approval, concurrency) and throws the same `ZapierError`
     * subclasses on a non-ok response. `onOpen` fires once the connection is
     * live (response ok, body present) and before the first frame.
     */
    fetchStream: (path: string, init?: FetchStreamInit) => AsyncGenerator<SseMessage>;
    /**
     * Like `fetchStream`, but parses each frame's `data` as JSON, yielding
     * `{ parsed, data, raw }`. Unlike `fetchJson`, a malformed frame is never
     * thrown — it surfaces as `{ parsed: false, data: null, raw }` so one bad
     * frame can't kill a long-lived stream. A non-ok response still throws the
     * shared `ZapierError` subclasses before the first frame.
     */
    fetchJsonStream: <T = unknown>(path: string, init?: FetchStreamInit) => AsyncGenerator<JsonSseMessage<T>>;
}
interface RequestOptions {
    headers?: Record<string, string>;
    searchParams?: Record<string, string>;
    authRequired?: boolean;
    /**
     * OAuth scopes required for this request. When using client credentials,
     * these scopes will be requested during token exchange (merged with any
     * scopes specified in the credentials object).
     */
    requiredScopes?: string[];
    customErrorHandler?: (errorInfo: {
        status: number;
        statusText: string;
        data: unknown;
    }) => Error | undefined;
    /**
     * Optional metadata about what this request is fetching/affecting. When
     * set, 404 responses throw `ZapierResourceNotFoundError` with
     * `resourceType` / `resourceId` populated. The `type` is free-form;
     * conventionally it matches how the resource appears in API URL segments
     * (`"table"`, `"record"`, `"connection"`, etc.).
     */
    resource?: {
        type: string;
        id?: string | number;
    };
    /**
     * Builds the policy context for this request if it triggers the approval
     * flow. Callers that may receive a 403 `approval_required` response MUST
     * provide this so the SDK can create an approval with the correct context.
     */
    approvalContext?: () => RequestContext;
    /**
     * Abort signal forwarded to the underlying `fetch`. Aborting cancels
     * the in-flight request and any rate-limit retry sleep before the
     * next attempt; the resulting `AbortError` is the caller's
     * responsibility to handle.
     */
    signal?: AbortSignal;
}
interface PollOptions extends RequestOptions {
    initialDelay?: number;
    timeoutMs?: number;
    successStatus?: number;
    pendingStatus?: number;
    /** Function to check if the response body indicates pending state (return true to continue polling) */
    isPending?: (response: unknown) => boolean;
    resultExtractor?: (response: unknown) => unknown;
}
type Need = z.infer<typeof NeedSchema>;
type Action = z.infer<typeof ActionSchema>;
type Choice = z.infer<typeof ChoiceSchema>;
type Field = z.infer<typeof FieldSchema>;
type ActionExecutionResult = z.infer<typeof ActionExecutionResultSchema>;
type ActionFieldChoice = z.infer<typeof ActionFieldChoiceSchema>;
type ActionField = z.infer<typeof ActionFieldSchema>;
type Connection = z.infer<typeof ConnectionSchema>;
type ConnectionsResponse = z.infer<typeof ConnectionsResponseSchema>;
type UserProfile = z.infer<typeof UserProfileSchema>;
type App = z.infer<typeof AppSchema>;
type NeedsRequest = z.infer<typeof NeedsRequestSchema>;
type NeedsResponse = z.infer<typeof NeedsResponseSchema>;

/**
 * A single connection entry in the connections map.
 * Provides a connectionId that maps a named connection alias to a Zapier connection.
 */
declare const ConnectionEntrySchema: z.ZodObject<{
    connectionId: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
}, z.core.$strip>;
type ConnectionEntry = z.infer<typeof ConnectionEntrySchema>;
/**
 * A map of named connections. Keys are user-defined connection aliases
 * (e.g. "slack_work", "slack_private") that can be referenced via the
 * `connection` parameter on action calls.
 */
declare const ConnectionsMapSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
    connectionId: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
}, z.core.$strip>>;
type ConnectionsMap = z.infer<typeof ConnectionsMapSchema>;

/**
 * Domain utility functions for working with app identifiers and data normalization
 */

interface AppLocator {
    lookupAppKey: string;
    slug?: string;
    implementationName?: string;
    version?: string;
}
interface ResolvedAppLocator extends AppLocator {
    implementationName: string;
}

declare const DEFAULT_CONFIG_PATH: ".zapierrc";
declare const ManifestEntrySchema: z.ZodObject<{
    implementationName: z.ZodString;
    version: z.ZodOptional<z.ZodString>;
}, z.core.$strip>;
type ManifestEntry = z.infer<typeof ManifestEntrySchema>;
type GetVersionedImplementationId = (appKey: string) => Promise<string | null>;
/**
 * Action entry for storing saved action configurations
 * The key in the actions record IS the user-provided name
 */
declare const ActionEntrySchema: z.ZodObject<{
    appKey: z.ZodString;
    actionKey: z.ZodString;
    actionType: z.ZodString;
    connectionId: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
    authenticationId: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
    inputs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
    schema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
    createdAt: z.ZodString;
}, z.core.$strip>;
type ActionEntry = z.infer<typeof ActionEntrySchema>;
type Manifest = {
    apps?: Record<string, ManifestEntry>;
    actions?: Record<string, ActionEntry>;
    canIncludeSharedConnections?: boolean;
    canIncludeSharedTables?: boolean;
    canDeleteTables?: boolean;
    connections?: ConnectionsMap;
};
type ResolveAppKeys = ({ appKeys, }: {
    appKeys: string[];
}) => Promise<ResolvedAppLocator[]>;
interface UpdateManifestEntryOptions {
    appKey: string;
    entry: ManifestEntry;
    configPath?: string;
    skipWrite?: boolean;
    manifest?: Manifest;
}
interface UpdateManifestEntryResult {
    key: string;
    entry: ManifestEntry;
    manifest: Manifest;
}
/**
 * The manifest's version-locking API, consumed via the `manifest` provider
 * (`imports.manifest`). Built once per SDK from the injected options
 * (`manifest` object or `manifestPath` file) plus the API client for slug
 * resolution. `updateManifestEntry` writes through to the manifest file and
 * invalidates the provider's cached manifest.
 */
interface ManifestProvider {
    getVersionedImplementationId: GetVersionedImplementationId;
    resolveAppKeys: ResolveAppKeys;
    getResolvedManifest: () => Promise<Manifest | null>;
    getManifestConnections: () => Promise<ConnectionsMap | null>;
    updateManifestEntry: (options: UpdateManifestEntryOptions) => Promise<UpdateManifestEntryResult>;
}
declare const ManifestPluginOptionsSchema: z.ZodObject<{
    manifestPath: z.ZodOptional<z.ZodString>;
    manifest: z.ZodOptional<z.ZodObject<{
        apps: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
            implementationName: z.ZodString;
            version: z.ZodOptional<z.ZodString>;
        }, z.core.$strip>>>;
        actions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
            appKey: z.ZodString;
            actionKey: z.ZodString;
            actionType: z.ZodString;
            connectionId: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
            authenticationId: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
            inputs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
            schema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
            createdAt: z.ZodString;
        }, z.core.$strip>>>;
        canIncludeSharedConnections: z.ZodOptional<z.ZodBoolean>;
        canIncludeSharedTables: z.ZodOptional<z.ZodBoolean>;
        canDeleteTables: z.ZodOptional<z.ZodBoolean>;
        connections: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
            connectionId: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
        }, z.core.$strip>>>;
    }, z.core.$strip>>;
}, z.core.$strip>;

/**
 * API Client Implementation
 *
 * This module contains the core API client implementation, including
 * HTTP method handlers, response processing, and client factory functions.
 */

declare const createZapierApi: (options: ApiClientOptions) => ApiClient;

/**
 * Classifies an HTTP error by status code. A 4xx is permanent for now
 * (auth/permission/bad request); 5xx and network errors are transient. We read
 * `statusCode` off any `ZapierError`, not just `ZapierApiError`: a policy denial
 * escapes `api.fetch` as a `ZapierApprovalError` (a sibling subclass) carrying a
 * 403, and it must be treated as permanent too. 429 stays transient —
 * `api.fetch` already backed off and retried it upstream, so a
 * `ZapierRateLimitError` (also a `ZapierError`) that escapes should be retried
 * on the normal cadence rather than treated as permanent.
 *
 * A `ZapierAuthenticationError` with no `statusCode` is the one carve-out: the
 * token-exchange / credential-resolution layer throws these for setup problems
 * (token endpoint rejected the credentials, missing keychain secret, no
 * credentials at all) that never self-heal, so they are permanent even without
 * a status. Auth errors that DO carry a status fall through to the rule above,
 * so a 5xx/429 from the token endpoint still retries.
 */
declare function isPermanentHttpError(err: unknown): boolean;

/**
 * SDK deprecation notices from API responses.
 *
 * Trusted Zapier services tell SDK consumers about upcoming breakages via
 * response headers: `zapier-sdk-deprecation-message` carries the exact text
 * to display, `zapier-sdk-deprecation-id` is a stable identifier for deduping
 * (the message text is the fallback key), and the standard RFC 9745
 * `Deprecation` header carries machine-readable timing that is forwarded on
 * the emitted event but never displayed on its own.
 *
 * Trust model: Zapier-owned services may write these headers, and Relay
 * responses are never sniffed at all, so a third-party API can never print
 * text in a user's terminal through this path — even if a relay deployment
 * fails to strip the headers. Eligibility is decided by explicit client route
 * config before sniffing: matched routes are eligible by default, Relay routes
 * opt out with `omitDeprecationMessaging`, and the resolved gateway pathname
 * is matched against the configured gateway prefixes so custom baseUrls that
 * already point at Relay stay excluded.
 *
 * The configured baseUrl origin itself is deliberately NOT origin-checked
 * here. The base URL is the client's trust anchor by definition — it
 * receives the caller's credentials and controls every byte the SDK
 * displays (error messages, item titles, ...), so a notice adds nothing an
 * arbitrary origin couldn't already do, while an origin allowlist would
 * break localhost, staging, and self-hosted gateway deployments that
 * legitimately run the version gate or proxy trusted Zapier services. Relay
 * is different precisely because relay upstreams are NOT user-designated
 * origins: they're third parties reached through normal, trusted Zapier usage.
 */

declare const DEPRECATION_NOTICE_EVENT = "api:deprecation_notice";
interface DeprecationNoticePayload {
    /** Stable notice identifier; the message text when the id header is absent. */
    id: string;
    /** Exact server-composed text to display. */
    message: string;
    /**
     * RFC 9745 deprecation date as Unix epoch milliseconds, parsed from a
     * `Deprecation: @<seconds>` header. Omitted when the header is absent or
     * not a structured-field date.
     */
    deprecation?: number;
}

/**
 * Zapier API Client Module
 *
 * This module provides a centralized API layer for all HTTP interactions
 * with Zapier's various APIs. It handles authentication, error handling,
 * polling, and provides consistent patterns across all services.
 */

/**
 * Utility function to get or create an API client for standalone functions
 *
 * @param config - Configuration that may include an existing API client
 * @returns ApiClient instance
 */
declare function getOrCreateApiClient(config: {
    baseUrl?: string;
    credentials?: Credentials;
    /** @deprecated Use `credentials` instead */
    token?: string;
    api?: ApiClient;
    debug?: boolean;
    fetch?: typeof globalThis.fetch;
    callerPackage?: {
        name: string;
        version: string;
    };
}): ApiClient;

type ManifestPluginOptions = z.infer<typeof ManifestPluginOptionsSchema>;

/**
 * Read manifest from a file path asynchronously
 * Supports local files (Node.js) and browser environments (fallback to global filesystem)
 */
declare function readManifestFromFile(filePath: string): Promise<Manifest | null>;
/**
 * Get the preferred key for storing an app in the manifest
 * Extracted from plugin to make it easier to test
 */
declare function getPreferredManifestEntryKey({ appKey, api, }: {
    appKey: string;
    api: ApiClient;
}): Promise<string>;
/**
 * Find a manifest entry by any app key (implementation name, slug, etc.).
 */
declare function findManifestEntry({ appKey, manifest, }: {
    appKey: string;
    manifest: Manifest;
}): [string, ManifestEntry] | null;

declare const MANIFEST_ID = "zapier/manifest";
/**
 * The typed stand-in plugins import to read the manifest's
 * version-locking API (`imports: [manifestPluginRef]` then `imports.manifest`).
 */
declare const manifestPluginRef: PropertyPlugin<"manifest", ManifestProvider> & PluginSummary<"zapier/manifest", never>;
/**
 * The module-model manifest provider: builds the version-locking API once at
 * materialization from the injected SDK options (`manifest` object or
 * `manifestPath` file) plus the API client for slug resolution. The resolved
 * manifest is cached; `updateManifestEntry` invalidates the cache after a
 * write so the next read reflects the new file.
 */
declare const manifestPlugin: PropertyPlugin<"manifest", ManifestProvider> & LeafSummary<"zapier", "manifest", readonly [PropertyPlugin<"sdkOptions", {
    credentials?: string | {
        clientId: string;
        clientSecret: string;
        type?: "client_credentials" | undefined;
        baseUrl?: string | undefined;
        scope?: string | undefined;
    } | {
        clientId: string;
        type?: "pkce" | undefined;
        baseUrl?: string | undefined;
        scope?: string | undefined;
    } | z.core.$InferOuterFunctionType<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>]>]>>]>> | undefined;
    debug?: boolean | undefined;
    baseUrl?: string | undefined;
    trackingBaseUrl?: string | undefined;
    maxNetworkRetries?: number | undefined;
    maxNetworkRetryDelayMs?: number | undefined;
    maxConcurrentRequests?: number | undefined;
    approvalTimeoutMs?: number | undefined;
    maxApprovalRetries?: number | undefined;
    approvalMode?: "disabled" | "poll" | "throw" | undefined;
    openAutoModeApprovalsInBrowser?: boolean | undefined;
    manifestPath?: string | undefined;
    manifest?: Manifest | undefined;
    onEvent?: EventCallback | undefined;
    fetch?: typeof fetch | undefined;
    eventEmission?: EventEmissionConfig | undefined;
    callerPackage?: {
        name: string;
        version: string;
    } | undefined;
    cache?: ZapierCache | undefined;
    canIncludeSharedConnections?: boolean | undefined;
    canIncludeSharedTables?: boolean | undefined;
    canDeleteTables?: boolean | undefined;
    token?: string | undefined;
} | undefined> & PluginSummary<never, never>, PropertyPlugin<"api", ApiClient> & PluginSummary<"zapier/api", never>]>;

type ResolveConnection = (name: string) => Promise<ConnectionsMap[string] | undefined>;
/**
 * The subset of the connections API module plugins consume via the
 * `connections` provider (`imports.connections`).
 */
interface ConnectionsProvider {
    resolveConnection: ResolveConnection;
}
declare const CONNECTIONS_ID = "zapier/connections";
/**
 * The typed stand-in plugins import to resolve a named connection
 * (`imports: [connectionsPluginRef]` then `imports.connections`).
 */
declare const connectionsPluginRef: PropertyPlugin<"connections", ConnectionsProvider> & PluginSummary<"zapier/connections", never>;
/**
 * The module-model connections provider: resolves named connections from the
 * manifest's connections map, loaded once and cached.
 */
declare const connectionsPlugin: PropertyPlugin<"connections", ConnectionsProvider> & LeafSummary<"zapier", "connections", readonly [PropertyPlugin<"manifest", ManifestProvider> & PluginSummary<"zapier/manifest", never>]>;

declare const ActionExecutionInputSchema: z.ZodObject<{
    inputs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
    connectionId: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
    connection: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
    authenticationId: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
    timeoutMs: z.ZodOptional<z.ZodNumber>;
}, z.core.$strip>;
type ActionExecutionOptions = z.infer<typeof ActionExecutionInputSchema>;
declare const AppFactoryInputSchema: z.ZodObject<{
    connectionId: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
    connection: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
    authenticationId: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
}, z.core.$strip>;
type AppFactoryInput = z.infer<typeof AppFactoryInputSchema>;
interface BaseActionTypeProxy {
    [action: string]: (options?: ActionExecutionOptions) => Promise<{
        data: any[];
        nextCursor?: string;
    }> & AsyncIterable<{
        data: any[];
        nextCursor?: string;
    }> & {
        items(): AsyncIterable<any>;
    };
}
type ActionTypeProxy = BaseActionTypeProxy;
type AppFetchFn = (url: string | URL, init?: RequestInit & {
    /** @deprecated Use `connection` instead. */
    connectionId?: ConnectionIdProperty;
    connection?: ConnectionProperty;
    /** @deprecated Use `connection` instead. */
    authenticationId?: AuthenticationIdProperty;
    callbackUrl?: string;
}) => Promise<Response>;
type AppProxy = {
    [type: string]: ActionTypeProxy;
} & {
    fetch: AppFetchFn;
};
interface AppFactory {
    (options: AppFactoryInput): AppProxy;
}
type AppProxyWithFactory = AppFactory & AppProxy;
interface ActionProxy {
    [app: string]: AppProxyWithFactory;
}

/**
 * The `apps` proxy: `sdk.apps.{appKey}.{actionType}.{actionKey}(...)` (and the
 * `sdk.apps.{appKey}({ connection })` factory). A module property that imports
 * `fetch` + `runAction` and builds the proxy once. Its two dynamic sub-surfaces
 * have no static binding, so they are declared as `dynamicMembers` (bodyless
 * registry declarations, `packages: ["sdk"]` so they document the SDK surface
 * only); the framework folds them into the registry under their braced names.
 */
declare const appsPlugin: PropertyPlugin<"apps", ActionProxy & ZapierSdkApps> & LeafSummary<"", "apps", readonly [MethodPlugin<"fetch", {
    url: string | URL;
    init?: ZapierFetchInitOptions;
}, Promise<Response>, readonly ["url", "init"]> & LeafSummary<"", "fetch", readonly [PropertyPlugin<"coreOptions", CoreOptions | undefined> & PluginSummary<never, never>, PropertyPlugin<"connections", ConnectionsProvider> & PluginSummary<"zapier/connections", never>, PropertyPlugin<"api", ApiClient> & PluginSummary<"zapier/api", never>]>, MethodPlugin<"runAction", ({
    app: string;
    actionType: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run";
    action: string;
    connection?: string | number | undefined;
    connectionId?: string | number | null | undefined;
    authenticationId?: string | number | null | undefined;
    inputs?: Record<string, unknown> | undefined;
    timeoutMs?: number | undefined;
    pageSize?: number | undefined;
    maxItems?: number | undefined;
    cursor?: string | undefined;
} | {
    appKey: string;
    actionType: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run";
    actionKey: string;
    connection?: string | number | undefined;
    connectionId?: string | number | null | undefined;
    authenticationId?: string | number | null | undefined;
    inputs?: Record<string, unknown> | undefined;
    timeoutMs?: number | undefined;
    pageSize?: number | undefined;
    maxItems?: number | undefined;
    cursor?: string | undefined;
}) & {
    cursor?: string;
    pageSize?: number;
} & {
    maxItems?: number;
}, PaginatedSdkResult<unknown>, readonly []> & LeafSummary<"", "runAction", readonly [PropertyPlugin<"connections", ConnectionsProvider> & PluginSummary<"zapier/connections", never>, PropertyPlugin<"manifest", ManifestProvider> & PluginSummary<"zapier/manifest", never>, PropertyPlugin<"api", ApiClient> & PluginSummary<"zapier/api", never>, MethodPlugin<"getAction", {
    app: string;
    actionType: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run";
    action: string;
} | {
    appKey: string;
    actionType: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run";
    actionKey: string;
}, Promise<{
    data: {
        description: string;
        key: string;
        app_key: string;
        action_type: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run";
        title: string;
        type: "action";
        is_hidden?: boolean | undefined;
        id?: string | undefined;
        is_important?: boolean | undefined;
        app_version?: string | undefined;
    };
}>, readonly []> & LeafSummary<"", "getAction", readonly [MethodPlugin<"listActions", ({
    app: string;
    actionType?: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run" | undefined;
    pageSize?: number | undefined;
    maxItems?: number | undefined;
    cursor?: string | undefined;
} | {
    appKey: string;
    actionType?: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run" | undefined;
    pageSize?: number | undefined;
    maxItems?: number | undefined;
    cursor?: string | undefined;
}) & {
    cursor?: string;
    pageSize?: number;
} & {
    maxItems?: number;
}, PaginatedSdkResult<{
    description: string;
    key: string;
    app_key: string;
    action_type: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run";
    title: string;
    type: "action";
    is_hidden?: boolean | undefined;
    id?: string | undefined;
    is_important?: boolean | undefined;
    app_version?: string | undefined;
}>, readonly []> & LeafSummary<"", "listActions", readonly [PropertyPlugin<"manifest", ManifestProvider> & PluginSummary<"zapier/manifest", never>, PropertyPlugin<"api", ApiClient> & PluginSummary<"zapier/api", never>]>]>]>]>;

interface ZapierSdkApps {
}

interface ZapierFetchInitOptions extends RequestInit {
    /** @deprecated Use `connection` instead. */
    connectionId?: string | number;
    connection?: string | number;
    /** @deprecated Use `connection` instead. */
    authenticationId?: string | number;
    callbackUrl?: string;
    /** Maximum seconds to wait for a response, subject to a server-side limit. */
    maxTime?: number;
}
type FetchPluginProvides = PluginSurface<typeof fetchPlugin>;
/**
 * Fetch plugin, the primary way to make authenticated HTTP requests through
 * Zapier's Relay service. Mirrors the native `fetch(url, init?)` signature with
 * additional Zapier-specific options.
 *
 * A raw method: it owns its own input validation (a loose check over only the
 * Zapier fields, so the consumed `RequestInit` members pass through untouched);
 * the boundary supplies its lifecycle hooks. `skipInputValidation`
 * keeps the caller's `init` object identity intact (no parse, no coercion, no
 * clone); the enumerated `inputSchema` exists only for the controller / CLI /
 * MCP / docs projection.
 */
declare const fetchPlugin: MethodPlugin<"fetch", {
    url: string | URL;
    init?: ZapierFetchInitOptions;
}, Promise<Response>, readonly ["url", "init"]> & LeafSummary<"", "fetch", readonly [PropertyPlugin<"coreOptions", CoreOptions | undefined> & PluginSummary<never, never>, PropertyPlugin<"connections", ConnectionsProvider> & PluginSummary<"zapier/connections", never>, PropertyPlugin<"api", ApiClient> & PluginSummary<"zapier/api", never>]>;

declare const listAppsPlugin: MethodPlugin<"listApps", {
    search?: string | undefined;
    apps?: string[] | undefined;
    appKeys?: string[] | undefined;
    pageSize?: number | undefined;
    maxItems?: number | undefined;
    cursor?: string | undefined;
} & {
    cursor?: string;
    pageSize?: number;
} & {
    maxItems?: number;
}, PaginatedSdkResult<{
    slug: string;
    title: string;
    key: string;
    implementation_id: string;
    description?: string | undefined;
    is_hidden?: boolean | undefined;
    auth_type?: string | undefined;
    actions?: {
        read?: number | undefined;
        read_bulk?: number | undefined;
        write?: number | undefined;
        search?: number | undefined;
        search_or_write?: number | undefined;
        search_and_write?: number | undefined;
        filter?: number | undefined;
    } | undefined;
    is_deprecated?: boolean | undefined;
    is_beta?: boolean | undefined;
    is_premium?: boolean | undefined;
    age_in_days?: number | undefined;
    banner?: string | undefined;
    categories?: {
        id: number;
        name: string;
        slug: string;
    }[] | undefined;
    images?: {
        url_16x16?: string | undefined;
        url_32x32?: string | undefined;
        url_64x64?: string | undefined;
        url_128x128?: string | undefined;
    } | undefined;
    popularity?: number | undefined;
    has_filters?: boolean | undefined;
    has_reads?: boolean | undefined;
    has_searches?: boolean | undefined;
    has_searches_or_writes?: boolean | undefined;
    has_upfront_fields?: boolean | undefined;
    has_writes?: boolean | undefined;
    is_built_in?: boolean | undefined;
    is_featured?: boolean | undefined;
    is_invite?: boolean | undefined;
    is_public?: boolean | undefined;
    is_upcoming?: boolean | undefined;
    visibility?: string | undefined;
    primary_color?: string | undefined;
    secondary_color?: string | undefined;
    classification?: string | undefined;
    api_docs_url?: string | undefined;
    image?: string | undefined;
    version?: string | undefined;
}>, readonly []> & LeafSummary<"", "listApps", readonly [PropertyPlugin<"manifest", ManifestProvider> & PluginSummary<"zapier/manifest", never>, PropertyPlugin<"api", ApiClient> & PluginSummary<"zapier/api", never>]>;
type ListAppsPluginProvides = PluginSurface<typeof listAppsPlugin>;

declare const listActionsPlugin: MethodPlugin<"listActions", ({
    app: string;
    actionType?: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run" | undefined;
    pageSize?: number | undefined;
    maxItems?: number | undefined;
    cursor?: string | undefined;
} | {
    appKey: string;
    actionType?: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run" | undefined;
    pageSize?: number | undefined;
    maxItems?: number | undefined;
    cursor?: string | undefined;
}) & {
    cursor?: string;
    pageSize?: number;
} & {
    maxItems?: number;
}, PaginatedSdkResult<{
    description: string;
    key: string;
    app_key: string;
    action_type: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run";
    title: string;
    type: "action";
    is_hidden?: boolean | undefined;
    id?: string | undefined;
    is_important?: boolean | undefined;
    app_version?: string | undefined;
}>, readonly []> & LeafSummary<"", "listActions", readonly [PropertyPlugin<"manifest", ManifestProvider> & PluginSummary<"zapier/manifest", never>, PropertyPlugin<"api", ApiClient> & PluginSummary<"zapier/api", never>]>;
type ListActionsPluginProvides = PluginSurface<typeof listActionsPlugin>;

declare const listActionInputFieldsPlugin: MethodPlugin<"listActionInputFields", ({
    app: string;
    actionType: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run";
    action: string;
    connection?: string | number | undefined;
    connectionId?: string | number | null | undefined;
    authenticationId?: string | number | null | undefined;
    inputs?: Record<string, unknown> | undefined;
    pageSize?: number | undefined;
    maxItems?: number | undefined;
    cursor?: string | undefined;
} | {
    appKey: string;
    actionType: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run";
    actionKey: string;
    connection?: string | number | undefined;
    connectionId?: string | number | null | undefined;
    authenticationId?: string | number | null | undefined;
    inputs?: Record<string, unknown> | undefined;
    pageSize?: number | undefined;
    maxItems?: number | undefined;
    cursor?: string | undefined;
}) & {
    cursor?: string;
    pageSize?: number;
} & {
    maxItems?: number;
}, PaginatedSdkResult<{
    key: string;
    type: "input_field";
    default_value: string;
    depends_on: string[];
    description: string;
    invalidates_input_fields: boolean;
    is_required: boolean;
    placeholder: string;
    title: string;
    value_type: string;
    format?: string | undefined;
    items?: {
        type: string;
    } | undefined;
} | {
    key: string;
    type: "info_field";
    description: string;
    title?: string | undefined;
} | FieldsetItem>, readonly []> & LeafSummary<"", "listActionInputFields", readonly [PropertyPlugin<"connections", ConnectionsProvider> & PluginSummary<"zapier/connections", never>, PropertyPlugin<"manifest", ManifestProvider> & PluginSummary<"zapier/manifest", never>, PropertyPlugin<"api", ApiClient> & PluginSummary<"zapier/api", never>, MethodPlugin<"getAction", {
    app: string;
    actionType: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run";
    action: string;
} | {
    appKey: string;
    actionType: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run";
    actionKey: string;
}, Promise<{
    data: {
        description: string;
        key: string;
        app_key: string;
        action_type: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run";
        title: string;
        type: "action";
        is_hidden?: boolean | undefined;
        id?: string | undefined;
        is_important?: boolean | undefined;
        app_version?: string | undefined;
    };
}>, readonly []> & LeafSummary<"", "getAction", readonly [MethodPlugin<"listActions", ({
    app: string;
    actionType?: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run" | undefined;
    pageSize?: number | undefined;
    maxItems?: number | undefined;
    cursor?: string | undefined;
} | {
    appKey: string;
    actionType?: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run" | undefined;
    pageSize?: number | undefined;
    maxItems?: number | undefined;
    cursor?: string | undefined;
}) & {
    cursor?: string;
    pageSize?: number;
} & {
    maxItems?: number;
}, PaginatedSdkResult<{
    description: string;
    key: string;
    app_key: string;
    action_type: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run";
    title: string;
    type: "action";
    is_hidden?: boolean | undefined;
    id?: string | undefined;
    is_important?: boolean | undefined;
    app_version?: string | undefined;
}>, readonly []> & LeafSummary<"", "listActions", readonly [PropertyPlugin<"manifest", ManifestProvider> & PluginSummary<"zapier/manifest", never>, PropertyPlugin<"api", ApiClient> & PluginSummary<"zapier/api", never>]>]>]>;
type ListActionInputFieldsPluginProvides = PluginSurface<typeof listActionInputFieldsPlugin>;

declare const listActionInputFieldChoicesPlugin: MethodPlugin<"listActionInputFieldChoices", ({
    app: string;
    actionType: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run";
    action: string;
    inputField: string;
    connection?: string | number | undefined;
    connectionId?: string | number | null | undefined;
    authenticationId?: string | number | null | undefined;
    inputs?: Record<string, unknown> | undefined;
    page?: number | undefined;
    pageSize?: number | undefined;
    maxItems?: number | undefined;
    cursor?: string | undefined;
} | {
    appKey: string;
    actionType: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run";
    actionKey: string;
    inputFieldKey: string;
    connection?: string | number | undefined;
    connectionId?: string | number | null | undefined;
    authenticationId?: string | number | null | undefined;
    inputs?: Record<string, unknown> | undefined;
    page?: number | undefined;
    pageSize?: number | undefined;
    maxItems?: number | undefined;
    cursor?: string | undefined;
}) & {
    cursor?: string;
    pageSize?: number;
} & {
    maxItems?: number;
}, PaginatedSdkResult<{
    key?: string | undefined;
    label?: string | undefined;
    sample?: string | undefined;
    value?: string | undefined;
}>, readonly []> & LeafSummary<"", "listActionInputFieldChoices", readonly [PropertyPlugin<"connections", ConnectionsProvider> & PluginSummary<"zapier/connections", never>, PropertyPlugin<"manifest", ManifestProvider> & PluginSummary<"zapier/manifest", never>, PropertyPlugin<"api", ApiClient> & PluginSummary<"zapier/api", never>, MethodPlugin<"getAction", {
    app: string;
    actionType: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run";
    action: string;
} | {
    appKey: string;
    actionType: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run";
    actionKey: string;
}, Promise<{
    data: {
        description: string;
        key: string;
        app_key: string;
        action_type: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run";
        title: string;
        type: "action";
        is_hidden?: boolean | undefined;
        id?: string | undefined;
        is_important?: boolean | undefined;
        app_version?: string | undefined;
    };
}>, readonly []> & LeafSummary<"", "getAction", readonly [MethodPlugin<"listActions", ({
    app: string;
    actionType?: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run" | undefined;
    pageSize?: number | undefined;
    maxItems?: number | undefined;
    cursor?: string | undefined;
} | {
    appKey: string;
    actionType?: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run" | undefined;
    pageSize?: number | undefined;
    maxItems?: number | undefined;
    cursor?: string | undefined;
}) & {
    cursor?: string;
    pageSize?: number;
} & {
    maxItems?: number;
}, PaginatedSdkResult<{
    description: string;
    key: string;
    app_key: string;
    action_type: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run";
    title: string;
    type: "action";
    is_hidden?: boolean | undefined;
    id?: string | undefined;
    is_important?: boolean | undefined;
    app_version?: string | undefined;
}>, readonly []> & LeafSummary<"", "listActions", readonly [PropertyPlugin<"manifest", ManifestProvider> & PluginSummary<"zapier/manifest", never>, PropertyPlugin<"api", ApiClient> & PluginSummary<"zapier/api", never>]>]>]>;

declare const getActionInputFieldsSchemaPlugin: MethodPlugin<"getActionInputFieldsSchema", {
    app: string;
    actionType: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run";
    action: string;
    connection?: string | number | undefined;
    connectionId?: string | number | null | undefined;
    authenticationId?: string | number | null | undefined;
    inputs?: Record<string, unknown> | undefined;
} | {
    appKey: string;
    actionType: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run";
    actionKey: string;
    connection?: string | number | undefined;
    connectionId?: string | number | null | undefined;
    authenticationId?: string | number | null | undefined;
    inputs?: Record<string, unknown> | undefined;
}, Promise<{
    data: Record<string, unknown>;
}>, readonly []> & LeafSummary<"", "getActionInputFieldsSchema", readonly [PropertyPlugin<"connections", ConnectionsProvider> & PluginSummary<"zapier/connections", never>, PropertyPlugin<"manifest", ManifestProvider> & PluginSummary<"zapier/manifest", never>, PropertyPlugin<"api", ApiClient> & PluginSummary<"zapier/api", never>, MethodPlugin<"getAction", {
    app: string;
    actionType: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run";
    action: string;
} | {
    appKey: string;
    actionType: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run";
    actionKey: string;
}, Promise<{
    data: {
        description: string;
        key: string;
        app_key: string;
        action_type: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run";
        title: string;
        type: "action";
        is_hidden?: boolean | undefined;
        id?: string | undefined;
        is_important?: boolean | undefined;
        app_version?: string | undefined;
    };
}>, readonly []> & LeafSummary<"", "getAction", readonly [MethodPlugin<"listActions", ({
    app: string;
    actionType?: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run" | undefined;
    pageSize?: number | undefined;
    maxItems?: number | undefined;
    cursor?: string | undefined;
} | {
    appKey: string;
    actionType?: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run" | undefined;
    pageSize?: number | undefined;
    maxItems?: number | undefined;
    cursor?: string | undefined;
}) & {
    cursor?: string;
    pageSize?: number;
} & {
    maxItems?: number;
}, PaginatedSdkResult<{
    description: string;
    key: string;
    app_key: string;
    action_type: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run";
    title: string;
    type: "action";
    is_hidden?: boolean | undefined;
    id?: string | undefined;
    is_important?: boolean | undefined;
    app_version?: string | undefined;
}>, readonly []> & LeafSummary<"", "listActions", readonly [PropertyPlugin<"manifest", ManifestProvider> & PluginSummary<"zapier/manifest", never>, PropertyPlugin<"api", ApiClient> & PluginSummary<"zapier/api", never>]>]>]>;

declare function buildCapabilityMessage(key: string): string;
declare const GATED_FLAGS: readonly ["canIncludeSharedConnections", "canIncludeSharedTables", "canDeleteTables"];
type GatedFlag = (typeof GATED_FLAGS)[number];
interface CapabilitiesContext {
    checkCapability: (key: GatedFlag) => Promise<void>;
    hasCapability: (key: GatedFlag) => Promise<boolean>;
}

declare const listConnectionsPlugin: MethodPlugin<"listConnections", {
    title?: string | undefined;
    search?: string | undefined;
    owner?: string | undefined;
    app?: string | undefined;
    appKey?: string | undefined;
    connections?: string[] | undefined;
    connectionIds?: string[] | undefined;
    authenticationIds?: string[] | undefined;
    account?: string | undefined;
    accountId?: string | undefined;
    includeShared?: boolean | undefined;
    isExpired?: boolean | undefined;
    expired?: boolean | undefined;
    pageSize?: number | undefined;
    maxItems?: number | undefined;
    cursor?: string | undefined;
} & {
    cursor?: string;
    pageSize?: number;
} & {
    maxItems?: number;
}, PaginatedSdkResult<{
    date: string;
    is_invite_only: boolean;
    is_private: boolean;
    shared_with_all: boolean;
    id: string;
    account_id: string;
    title?: string | null | undefined;
    lastchanged?: string | undefined;
    destination_selected_api?: string | null | undefined;
    is_stale?: string | undefined;
    is_shared?: string | undefined;
    marked_stale_at?: string | null | undefined;
    label?: string | null | undefined;
    identifier?: string | null | undefined;
    url?: string | undefined;
    groups?: Record<string, unknown>[] | undefined;
    members?: string | undefined;
    permissions?: Record<string, boolean> | undefined;
    public_id?: string | undefined;
    account_public_id?: string | undefined;
    customuser_public_id?: string | undefined;
    implementation_id?: string | undefined;
    profile_id?: string | undefined;
    is_expired?: string | undefined;
    expired_at?: string | null | undefined;
    app_key?: string | undefined;
    app_version?: string | undefined;
}>, readonly []> & LeafSummary<"", "listConnections", readonly [PropertyPlugin<"connections", ConnectionsProvider> & PluginSummary<"zapier/connections", never>, PropertyPlugin<"api", ApiClient> & PluginSummary<"zapier/api", never>, PropertyPlugin<"manifest", ManifestProvider> & PluginSummary<"zapier/manifest", never>, PropertyPlugin<"capabilities", CapabilitiesContext> & PluginSummary<"zapier/capabilities", never>]>;
type ListConnectionsPluginProvides = PluginSurface<typeof listConnectionsPlugin>;

declare const listClientCredentialsPlugin: MethodPlugin<"listClientCredentials", {
    pageSize?: number | undefined;
    maxItems?: number | undefined;
    cursor?: string | undefined;
} & {
    cursor?: string;
    pageSize?: number;
} & {
    maxItems?: number;
}, PaginatedSdkResult<{
    client_id: string;
    name: string;
    allowed_scopes: ("external" | "credentials")[];
    created_at?: string | null | undefined;
    updated_at?: string | undefined;
}>, readonly []> & LeafSummary<"", "listClientCredentials", readonly [PropertyPlugin<"api", ApiClient> & PluginSummary<"zapier/api", never>]>;

declare const createClientCredentialsPlugin: MethodPlugin<"createClientCredentials", {
    name: string;
    allowedScopes: ("external" | "credentials")[];
    policy?: Record<string, unknown> | undefined;
}, Promise<{
    data: {
        client_id: string;
        name: string;
        client_secret: string;
    };
}>, readonly []> & LeafSummary<"", "createClientCredentials", readonly [PropertyPlugin<"api", ApiClient> & PluginSummary<"zapier/api", never>]>;

declare const deleteClientCredentialsPlugin: MethodPlugin<"deleteClientCredentials", {
    clientId: string;
}, Promise<{
    success: boolean;
}>, readonly []> & LeafSummary<"", "deleteClientCredentials", readonly [PropertyPlugin<"api", ApiClient> & PluginSummary<"zapier/api", never>]>;

declare const getAppPlugin: MethodPlugin<"getApp", {
    app: string;
} | {
    appKey: string;
}, Promise<{
    data: {
        slug: string;
        title: string;
        key: string;
        implementation_id: string;
        description?: string | undefined;
        is_hidden?: boolean | undefined;
        auth_type?: string | undefined;
        actions?: {
            read?: number | undefined;
            read_bulk?: number | undefined;
            write?: number | undefined;
            search?: number | undefined;
            search_or_write?: number | undefined;
            search_and_write?: number | undefined;
            filter?: number | undefined;
        } | undefined;
        is_deprecated?: boolean | undefined;
        is_beta?: boolean | undefined;
        is_premium?: boolean | undefined;
        age_in_days?: number | undefined;
        banner?: string | undefined;
        categories?: {
            id: number;
            name: string;
            slug: string;
        }[] | undefined;
        images?: {
            url_16x16?: string | undefined;
            url_32x32?: string | undefined;
            url_64x64?: string | undefined;
            url_128x128?: string | undefined;
        } | undefined;
        popularity?: number | undefined;
        has_filters?: boolean | undefined;
        has_reads?: boolean | undefined;
        has_searches?: boolean | undefined;
        has_searches_or_writes?: boolean | undefined;
        has_upfront_fields?: boolean | undefined;
        has_writes?: boolean | undefined;
        is_built_in?: boolean | undefined;
        is_featured?: boolean | undefined;
        is_invite?: boolean | undefined;
        is_public?: boolean | undefined;
        is_upcoming?: boolean | undefined;
        visibility?: string | undefined;
        primary_color?: string | undefined;
        secondary_color?: string | undefined;
        classification?: string | undefined;
        api_docs_url?: string | undefined;
        image?: string | undefined;
        version?: string | undefined;
    };
}>, readonly []> & LeafSummary<"", "getApp", readonly [MethodPlugin<"listApps", {
    search?: string | undefined;
    apps?: string[] | undefined;
    appKeys?: string[] | undefined;
    pageSize?: number | undefined;
    maxItems?: number | undefined;
    cursor?: string | undefined;
} & {
    cursor?: string;
    pageSize?: number;
} & {
    maxItems?: number;
}, PaginatedSdkResult<{
    slug: string;
    title: string;
    key: string;
    implementation_id: string;
    description?: string | undefined;
    is_hidden?: boolean | undefined;
    auth_type?: string | undefined;
    actions?: {
        read?: number | undefined;
        read_bulk?: number | undefined;
        write?: number | undefined;
        search?: number | undefined;
        search_or_write?: number | undefined;
        search_and_write?: number | undefined;
        filter?: number | undefined;
    } | undefined;
    is_deprecated?: boolean | undefined;
    is_beta?: boolean | undefined;
    is_premium?: boolean | undefined;
    age_in_days?: number | undefined;
    banner?: string | undefined;
    categories?: {
        id: number;
        name: string;
        slug: string;
    }[] | undefined;
    images?: {
        url_16x16?: string | undefined;
        url_32x32?: string | undefined;
        url_64x64?: string | undefined;
        url_128x128?: string | undefined;
    } | undefined;
    popularity?: number | undefined;
    has_filters?: boolean | undefined;
    has_reads?: boolean | undefined;
    has_searches?: boolean | undefined;
    has_searches_or_writes?: boolean | undefined;
    has_upfront_fields?: boolean | undefined;
    has_writes?: boolean | undefined;
    is_built_in?: boolean | undefined;
    is_featured?: boolean | undefined;
    is_invite?: boolean | undefined;
    is_public?: boolean | undefined;
    is_upcoming?: boolean | undefined;
    visibility?: string | undefined;
    primary_color?: string | undefined;
    secondary_color?: string | undefined;
    classification?: string | undefined;
    api_docs_url?: string | undefined;
    image?: string | undefined;
    version?: string | undefined;
}>, readonly []> & LeafSummary<"", "listApps", readonly [PropertyPlugin<"manifest", ManifestProvider> & PluginSummary<"zapier/manifest", never>, PropertyPlugin<"api", ApiClient> & PluginSummary<"zapier/api", never>]>]>;

declare const getActionPlugin: MethodPlugin<"getAction", {
    app: string;
    actionType: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run";
    action: string;
} | {
    appKey: string;
    actionType: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run";
    actionKey: string;
}, Promise<{
    data: {
        description: string;
        key: string;
        app_key: string;
        action_type: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run";
        title: string;
        type: "action";
        is_hidden?: boolean | undefined;
        id?: string | undefined;
        is_important?: boolean | undefined;
        app_version?: string | undefined;
    };
}>, readonly []> & LeafSummary<"", "getAction", readonly [MethodPlugin<"listActions", ({
    app: string;
    actionType?: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run" | undefined;
    pageSize?: number | undefined;
    maxItems?: number | undefined;
    cursor?: string | undefined;
} | {
    appKey: string;
    actionType?: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run" | undefined;
    pageSize?: number | undefined;
    maxItems?: number | undefined;
    cursor?: string | undefined;
}) & {
    cursor?: string;
    pageSize?: number;
} & {
    maxItems?: number;
}, PaginatedSdkResult<{
    description: string;
    key: string;
    app_key: string;
    action_type: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run";
    title: string;
    type: "action";
    is_hidden?: boolean | undefined;
    id?: string | undefined;
    is_important?: boolean | undefined;
    app_version?: string | undefined;
}>, readonly []> & LeafSummary<"", "listActions", readonly [PropertyPlugin<"manifest", ManifestProvider> & PluginSummary<"zapier/manifest", never>, PropertyPlugin<"api", ApiClient> & PluginSummary<"zapier/api", never>]>]>;

declare const getConnectionPlugin: MethodPlugin<"getConnection", {
    connection: string | number;
} | {
    connectionId: string | number;
} | {
    authenticationId: string | number;
}, Promise<{
    data: {
        date: string;
        is_invite_only: boolean;
        is_private: boolean;
        shared_with_all: boolean;
        id: string;
        account_id: string;
        title?: string | null | undefined;
        lastchanged?: string | undefined;
        destination_selected_api?: string | null | undefined;
        is_stale?: string | undefined;
        is_shared?: string | undefined;
        marked_stale_at?: string | null | undefined;
        label?: string | null | undefined;
        identifier?: string | null | undefined;
        url?: string | undefined;
        groups?: Record<string, unknown>[] | undefined;
        members?: string | undefined;
        permissions?: Record<string, boolean> | undefined;
        public_id?: string | undefined;
        account_public_id?: string | undefined;
        customuser_public_id?: string | undefined;
        implementation_id?: string | undefined;
        profile_id?: string | undefined;
        is_expired?: string | undefined;
        expired_at?: string | null | undefined;
        app_key?: string | undefined;
        app_version?: string | undefined;
    };
}>, readonly []> & LeafSummary<"", "getConnection", readonly [PropertyPlugin<"api", ApiClient> & PluginSummary<"zapier/api", never>]>;

declare const findFirstConnectionPlugin: MethodPlugin<"findFirstConnection", {
    title?: string | undefined;
    search?: string | undefined;
    appKey?: string | undefined;
    app?: string | undefined;
    owner?: string | undefined;
    account?: string | undefined;
    accountId?: string | undefined;
    includeShared?: boolean | undefined;
    isExpired?: boolean | undefined;
    expired?: boolean | undefined;
}, Promise<{
    data: {
        date: string;
        is_invite_only: boolean;
        is_private: boolean;
        shared_with_all: boolean;
        id: string;
        account_id: string;
        title?: string | null | undefined;
        lastchanged?: string | undefined;
        destination_selected_api?: string | null | undefined;
        is_stale?: string | undefined;
        is_shared?: string | undefined;
        marked_stale_at?: string | null | undefined;
        label?: string | null | undefined;
        identifier?: string | null | undefined;
        url?: string | undefined;
        groups?: Record<string, unknown>[] | undefined;
        members?: string | undefined;
        permissions?: Record<string, boolean> | undefined;
        public_id?: string | undefined;
        account_public_id?: string | undefined;
        customuser_public_id?: string | undefined;
        implementation_id?: string | undefined;
        profile_id?: string | undefined;
        is_expired?: string | undefined;
        expired_at?: string | null | undefined;
        app_key?: string | undefined;
        app_version?: string | undefined;
    };
}>, readonly []> & LeafSummary<"", "findFirstConnection", readonly [MethodPlugin<"listConnections", {
    title?: string | undefined;
    search?: string | undefined;
    owner?: string | undefined;
    app?: string | undefined;
    appKey?: string | undefined;
    connections?: string[] | undefined;
    connectionIds?: string[] | undefined;
    authenticationIds?: string[] | undefined;
    account?: string | undefined;
    accountId?: string | undefined;
    includeShared?: boolean | undefined;
    isExpired?: boolean | undefined;
    expired?: boolean | undefined;
    pageSize?: number | undefined;
    maxItems?: number | undefined;
    cursor?: string | undefined;
} & {
    cursor?: string;
    pageSize?: number;
} & {
    maxItems?: number;
}, PaginatedSdkResult<{
    date: string;
    is_invite_only: boolean;
    is_private: boolean;
    shared_with_all: boolean;
    id: string;
    account_id: string;
    title?: string | null | undefined;
    lastchanged?: string | undefined;
    destination_selected_api?: string | null | undefined;
    is_stale?: string | undefined;
    is_shared?: string | undefined;
    marked_stale_at?: string | null | undefined;
    label?: string | null | undefined;
    identifier?: string | null | undefined;
    url?: string | undefined;
    groups?: Record<string, unknown>[] | undefined;
    members?: string | undefined;
    permissions?: Record<string, boolean> | undefined;
    public_id?: string | undefined;
    account_public_id?: string | undefined;
    customuser_public_id?: string | undefined;
    implementation_id?: string | undefined;
    profile_id?: string | undefined;
    is_expired?: string | undefined;
    expired_at?: string | null | undefined;
    app_key?: string | undefined;
    app_version?: string | undefined;
}>, readonly []> & LeafSummary<"", "listConnections", readonly [PropertyPlugin<"connections", ConnectionsProvider> & PluginSummary<"zapier/connections", never>, PropertyPlugin<"api", ApiClient> & PluginSummary<"zapier/api", never>, PropertyPlugin<"manifest", ManifestProvider> & PluginSummary<"zapier/manifest", never>, PropertyPlugin<"capabilities", CapabilitiesContext> & PluginSummary<"zapier/capabilities", never>]>]>;

declare const findUniqueConnectionPlugin: MethodPlugin<"findUniqueConnection", {
    title?: string | undefined;
    search?: string | undefined;
    appKey?: string | undefined;
    app?: string | undefined;
    owner?: string | undefined;
    account?: string | undefined;
    accountId?: string | undefined;
    includeShared?: boolean | undefined;
    isExpired?: boolean | undefined;
    expired?: boolean | undefined;
}, Promise<{
    data: {
        date: string;
        is_invite_only: boolean;
        is_private: boolean;
        shared_with_all: boolean;
        id: string;
        account_id: string;
        title?: string | null | undefined;
        lastchanged?: string | undefined;
        destination_selected_api?: string | null | undefined;
        is_stale?: string | undefined;
        is_shared?: string | undefined;
        marked_stale_at?: string | null | undefined;
        label?: string | null | undefined;
        identifier?: string | null | undefined;
        url?: string | undefined;
        groups?: Record<string, unknown>[] | undefined;
        members?: string | undefined;
        permissions?: Record<string, boolean> | undefined;
        public_id?: string | undefined;
        account_public_id?: string | undefined;
        customuser_public_id?: string | undefined;
        implementation_id?: string | undefined;
        profile_id?: string | undefined;
        is_expired?: string | undefined;
        expired_at?: string | null | undefined;
        app_key?: string | undefined;
        app_version?: string | undefined;
    };
}>, readonly []> & LeafSummary<"", "findUniqueConnection", readonly [MethodPlugin<"listConnections", {
    title?: string | undefined;
    search?: string | undefined;
    owner?: string | undefined;
    app?: string | undefined;
    appKey?: string | undefined;
    connections?: string[] | undefined;
    connectionIds?: string[] | undefined;
    authenticationIds?: string[] | undefined;
    account?: string | undefined;
    accountId?: string | undefined;
    includeShared?: boolean | undefined;
    isExpired?: boolean | undefined;
    expired?: boolean | undefined;
    pageSize?: number | undefined;
    maxItems?: number | undefined;
    cursor?: string | undefined;
} & {
    cursor?: string;
    pageSize?: number;
} & {
    maxItems?: number;
}, PaginatedSdkResult<{
    date: string;
    is_invite_only: boolean;
    is_private: boolean;
    shared_with_all: boolean;
    id: string;
    account_id: string;
    title?: string | null | undefined;
    lastchanged?: string | undefined;
    destination_selected_api?: string | null | undefined;
    is_stale?: string | undefined;
    is_shared?: string | undefined;
    marked_stale_at?: string | null | undefined;
    label?: string | null | undefined;
    identifier?: string | null | undefined;
    url?: string | undefined;
    groups?: Record<string, unknown>[] | undefined;
    members?: string | undefined;
    permissions?: Record<string, boolean> | undefined;
    public_id?: string | undefined;
    account_public_id?: string | undefined;
    customuser_public_id?: string | undefined;
    implementation_id?: string | undefined;
    profile_id?: string | undefined;
    is_expired?: string | undefined;
    expired_at?: string | null | undefined;
    app_key?: string | undefined;
    app_version?: string | undefined;
}>, readonly []> & LeafSummary<"", "listConnections", readonly [PropertyPlugin<"connections", ConnectionsProvider> & PluginSummary<"zapier/connections", never>, PropertyPlugin<"api", ApiClient> & PluginSummary<"zapier/api", never>, PropertyPlugin<"manifest", ManifestProvider> & PluginSummary<"zapier/manifest", never>, PropertyPlugin<"capabilities", CapabilitiesContext> & PluginSummary<"zapier/capabilities", never>]>]>;

declare const ListConnectionsQuerySchema: z.ZodObject<{
    title: z.ZodOptional<z.ZodString>;
    search: z.ZodOptional<z.ZodString>;
    owner: z.ZodOptional<z.ZodString>;
    app: z.ZodOptional<z.ZodString & {
        _def: z.core.$ZodStringDef & PositionalMetadata;
    }>;
    appKey: z.ZodOptional<z.ZodString & {
        _def: z.core.$ZodStringDef & PositionalMetadata;
    }>;
    connections: z.ZodOptional<z.ZodArray<z.ZodString>>;
    connectionIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
    authenticationIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
    account: z.ZodOptional<z.ZodString>;
    accountId: z.ZodOptional<z.ZodString>;
    includeShared: z.ZodOptional<z.ZodBoolean>;
    isExpired: z.ZodOptional<z.ZodBoolean>;
    expired: z.ZodOptional<z.ZodBoolean>;
    pageSize: z.ZodOptional<z.ZodNumber>;
    maxItems: z.ZodOptional<z.ZodNumber>;
    cursor: z.ZodOptional<z.ZodString>;
}, z.core.$strip>;
type ListConnectionsOptions = z.infer<typeof ListConnectionsQuerySchema>;

declare const GetConnectionSchema: z.ZodObject<{
    connection: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
}, z.core.$strip>;
declare const GetConnectionByConnectionIdSchema: z.ZodObject<{
    connectionId: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
}, z.core.$strip>;
declare const GetConnectionByAuthenticationIdSchema: z.ZodObject<{
    authenticationId: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
}, z.core.$strip>;
type GetConnectionParam = z.infer<typeof GetConnectionSchema> | (Omit<z.infer<typeof GetConnectionByConnectionIdSchema>, "connectionId"> & {
    /** @deprecated Use `connection` instead. */
    connectionId: z.infer<typeof GetConnectionByConnectionIdSchema>["connectionId"];
}) | (Omit<z.infer<typeof GetConnectionByAuthenticationIdSchema>, "authenticationId"> & {
    /** @deprecated Use `connection` instead. */
    authenticationId: z.infer<typeof GetConnectionByAuthenticationIdSchema>["authenticationId"];
});
interface GetConnectionSdkFunction {
    getConnection: (options: GetConnectionParam) => Promise<GetConnectionResponse>;
}

declare const FindFirstConnectionSchema: z.ZodObject<{
    title: z.ZodOptional<z.ZodString>;
    search: z.ZodOptional<z.ZodString>;
    appKey: z.ZodOptional<z.ZodString & {
        _def: z.core.$ZodStringDef & PositionalMetadata;
    }>;
    app: z.ZodOptional<z.ZodString & {
        _def: z.core.$ZodStringDef & PositionalMetadata;
    }>;
    owner: z.ZodOptional<z.ZodString>;
    account: z.ZodOptional<z.ZodString>;
    accountId: z.ZodOptional<z.ZodString>;
    includeShared: z.ZodOptional<z.ZodBoolean>;
    isExpired: z.ZodOptional<z.ZodBoolean>;
    expired: z.ZodOptional<z.ZodBoolean>;
}, z.core.$strip>;
type FindFirstConnectionOptions = z.infer<typeof FindFirstConnectionSchema>;
interface FindFirstConnectionSdkFunction {
    findFirstConnection: (options?: FindFirstConnectionOptions) => Promise<{
        data: ConnectionItem | null;
    }>;
}

declare const FindUniqueConnectionSchema: z.ZodObject<{
    title: z.ZodOptional<z.ZodString>;
    search: z.ZodOptional<z.ZodString>;
    appKey: z.ZodOptional<z.ZodString & {
        _def: z.core.$ZodStringDef & PositionalMetadata;
    }>;
    app: z.ZodOptional<z.ZodString & {
        _def: z.core.$ZodStringDef & PositionalMetadata;
    }>;
    owner: z.ZodOptional<z.ZodString>;
    account: z.ZodOptional<z.ZodString>;
    accountId: z.ZodOptional<z.ZodString>;
    includeShared: z.ZodOptional<z.ZodBoolean>;
    isExpired: z.ZodOptional<z.ZodBoolean>;
    expired: z.ZodOptional<z.ZodBoolean>;
}, z.core.$strip>;
type FindUniqueConnectionOptions = z.infer<typeof FindUniqueConnectionSchema>;
interface FindUniqueConnectionSdkFunction {
    findUniqueConnection: (options?: FindUniqueConnectionOptions) => Promise<{
        data: ConnectionItem;
    }>;
}

interface ListAuthenticationsPluginProvides {
    /** @deprecated Use listConnections instead. */
    listAuthentications: PaginatedSdkFunction<ListConnectionsOptions, ConnectionItem>;
}
interface GetAuthenticationPluginProvides {
    /** @deprecated Use getConnection instead. */
    getAuthentication: GetConnectionSdkFunction["getConnection"];
}
interface FindFirstAuthenticationPluginProvides {
    /** @deprecated Use findFirstConnection instead. */
    findFirstAuthentication: FindFirstConnectionSdkFunction["findFirstConnection"];
}
interface FindUniqueAuthenticationPluginProvides {
    /** @deprecated Use findUniqueConnection instead. */
    findUniqueAuthentication: FindUniqueConnectionSdkFunction["findUniqueConnection"];
}

declare const CONTEXT_CACHE_TTL_MS = 60000;
declare const CONTEXT_CACHE_MAX_SIZE = 500;
declare const runActionPlugin: MethodPlugin<"runAction", ({
    app: string;
    actionType: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run";
    action: string;
    connection?: string | number | undefined;
    connectionId?: string | number | null | undefined;
    authenticationId?: string | number | null | undefined;
    inputs?: Record<string, unknown> | undefined;
    timeoutMs?: number | undefined;
    pageSize?: number | undefined;
    maxItems?: number | undefined;
    cursor?: string | undefined;
} | {
    appKey: string;
    actionType: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run";
    actionKey: string;
    connection?: string | number | undefined;
    connectionId?: string | number | null | undefined;
    authenticationId?: string | number | null | undefined;
    inputs?: Record<string, unknown> | undefined;
    timeoutMs?: number | undefined;
    pageSize?: number | undefined;
    maxItems?: number | undefined;
    cursor?: string | undefined;
}) & {
    cursor?: string;
    pageSize?: number;
} & {
    maxItems?: number;
}, PaginatedSdkResult<unknown>, readonly []> & LeafSummary<"", "runAction", readonly [PropertyPlugin<"connections", ConnectionsProvider> & PluginSummary<"zapier/connections", never>, PropertyPlugin<"manifest", ManifestProvider> & PluginSummary<"zapier/manifest", never>, PropertyPlugin<"api", ApiClient> & PluginSummary<"zapier/api", never>, MethodPlugin<"getAction", {
    app: string;
    actionType: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run";
    action: string;
} | {
    appKey: string;
    actionType: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run";
    actionKey: string;
}, Promise<{
    data: {
        description: string;
        key: string;
        app_key: string;
        action_type: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run";
        title: string;
        type: "action";
        is_hidden?: boolean | undefined;
        id?: string | undefined;
        is_important?: boolean | undefined;
        app_version?: string | undefined;
    };
}>, readonly []> & LeafSummary<"", "getAction", readonly [MethodPlugin<"listActions", ({
    app: string;
    actionType?: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run" | undefined;
    pageSize?: number | undefined;
    maxItems?: number | undefined;
    cursor?: string | undefined;
} | {
    appKey: string;
    actionType?: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run" | undefined;
    pageSize?: number | undefined;
    maxItems?: number | undefined;
    cursor?: string | undefined;
}) & {
    cursor?: string;
    pageSize?: number;
} & {
    maxItems?: number;
}, PaginatedSdkResult<{
    description: string;
    key: string;
    app_key: string;
    action_type: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run";
    title: string;
    type: "action";
    is_hidden?: boolean | undefined;
    id?: string | undefined;
    is_important?: boolean | undefined;
    app_version?: string | undefined;
}>, readonly []> & LeafSummary<"", "listActions", readonly [PropertyPlugin<"manifest", ManifestProvider> & PluginSummary<"zapier/manifest", never>, PropertyPlugin<"api", ApiClient> & PluginSummary<"zapier/api", never>]>]>]>;
type RunActionPluginProvides = PluginSurface<typeof runActionPlugin>;

/**
 * @deprecated Use `sdk.fetch(url, init?)` instead. This plugin now delegates
 * to the fetch method and is kept only for backward compatibility. It is
 * hidden from the CLI/MCP registries.
 *
 * A raw method: it returns the delegated `Response` unwrapped. The boundary
 * supplies its method lifecycle; the nested `fetch` call runs one level deeper
 * and its telemetry is suppressed, leaving a single `request` method event
 * rather than a duplicate pair. `skipInputValidation` + a manual validator
 * keeps validation failures surfacing as `ZapierValidationError` (raw's
 * built-in parse would run the projection schema); the enumerated
 * `inputSchema` stays for projection.
 */
declare const requestPlugin: MethodPlugin<"request", {
    url: string;
    method?: "GET" | "POST" | "DELETE" | "PUT" | "PATCH" | "HEAD" | "OPTIONS" | undefined;
    body?: any;
    connection?: string | number | undefined;
    connectionId?: string | number | undefined;
    authenticationId?: string | number | undefined;
    callbackUrl?: string | undefined;
    headers?: Record<string, string> | [string, string][] | Headers | undefined;
}, Promise<Response>, readonly []> & LeafSummary<"", "request", readonly [MethodPlugin<"fetch", {
    url: string | URL;
    init?: ZapierFetchInitOptions;
}, Promise<Response>, readonly ["url", "init"]> & LeafSummary<"", "fetch", readonly [PropertyPlugin<"coreOptions", CoreOptions | undefined> & PluginSummary<never, never>, PropertyPlugin<"connections", ConnectionsProvider> & PluginSummary<"zapier/connections", never>, PropertyPlugin<"api", ApiClient> & PluginSummary<"zapier/api", never>]>, PropertyPlugin<"coreOptions", CoreOptions | undefined> & PluginSummary<never, never>]>;

declare const getProfilePlugin: MethodPlugin<"getProfile", Record<string, never> | undefined, Promise<{
    data: {
        id: string;
        first_name: string;
        last_name: string;
        full_name: string;
        email: string;
        email_confirmed: boolean;
        timezone: string;
    };
}>, readonly []> & LeafSummary<"", "getProfile", readonly [PropertyPlugin<"api", ApiClient> & PluginSummary<"zapier/api", never>]>;

declare const ListActionInputFieldsSchema: z.ZodObject<{
    app: z.ZodString & {
        _def: z.core.$ZodStringDef & PositionalMetadata;
    };
    actionType: z.ZodEnum<{
        read: "read";
        read_bulk: "read_bulk";
        write: "write";
        search: "search";
        search_or_write: "search_or_write";
        search_and_write: "search_and_write";
        filter: "filter";
        run: "run";
    }>;
    action: z.ZodString & {
        _def: z.core.$ZodStringDef & PositionalMetadata;
    };
    connection: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
    connectionId: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
    authenticationId: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
    inputs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
    pageSize: z.ZodOptional<z.ZodNumber>;
    maxItems: z.ZodOptional<z.ZodNumber>;
    cursor: z.ZodOptional<z.ZodString>;
}, z.core.$strip>;
declare const ListActionInputFieldsSchemaDeprecated: z.ZodObject<{
    appKey: z.ZodString & {
        _def: z.core.$ZodStringDef & PositionalMetadata;
    };
    actionType: z.ZodEnum<{
        read: "read";
        read_bulk: "read_bulk";
        write: "write";
        search: "search";
        search_or_write: "search_or_write";
        search_and_write: "search_and_write";
        filter: "filter";
        run: "run";
    }>;
    actionKey: z.ZodString;
    connection: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
    connectionId: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
    authenticationId: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
    inputs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
    pageSize: z.ZodOptional<z.ZodNumber>;
    maxItems: z.ZodOptional<z.ZodNumber>;
    cursor: z.ZodOptional<z.ZodString>;
}, z.core.$strip>;
type ListActionInputFieldsOptions = z.infer<typeof ListActionInputFieldsSchema> | (Omit<z.infer<typeof ListActionInputFieldsSchemaDeprecated>, "appKey" | "actionKey"> & {
    /** @deprecated Use `app` instead. */
    appKey: z.infer<typeof ListActionInputFieldsSchemaDeprecated>["appKey"];
    /** @deprecated Use `action` instead. */
    actionKey: z.infer<typeof ListActionInputFieldsSchemaDeprecated>["actionKey"];
});

declare const RelayRequestSchema: z.ZodObject<{
    url: z.ZodString;
    method: z.ZodOptional<z.ZodEnum<{
        GET: "GET";
        POST: "POST";
        DELETE: "DELETE";
        PUT: "PUT";
        PATCH: "PATCH";
        HEAD: "HEAD";
        OPTIONS: "OPTIONS";
    }>>;
    body: z.ZodOptional<z.ZodAny>;
    connection: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
    connectionId: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
    authenticationId: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
    callbackUrl: z.ZodOptional<z.ZodString>;
    headers: z.ZodOptional<z.ZodUnion<readonly [z.ZodRecord<z.ZodString, z.ZodString>, z.ZodCustom<Headers, Headers>, z.ZodArray<z.ZodTuple<[z.ZodString, z.ZodString], null>>]>>;
}, z.core.$strip>;
declare const RelayFetchSchema: z.ZodObject<{
    url: z.ZodString;
    method: z.ZodOptional<z.ZodEnum<{
        GET: "GET";
        POST: "POST";
        DELETE: "DELETE";
        PUT: "PUT";
        PATCH: "PATCH";
        HEAD: "HEAD";
        OPTIONS: "OPTIONS";
    }>>;
    body: z.ZodOptional<z.ZodAny>;
    connection: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
    connectionId: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
    authenticationId: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
    callbackUrl: z.ZodOptional<z.ZodString>;
    headers: z.ZodOptional<z.ZodUnion<readonly [z.ZodRecord<z.ZodString, z.ZodString>, z.ZodCustom<Headers, Headers>, z.ZodArray<z.ZodTuple<[z.ZodString, z.ZodString], null>>]>>;
}, z.core.$strip>;

/**
 * SDK-related types and interfaces
 */

declare const BaseSdkOptionsSchema: z.ZodObject<{
    credentials: z.ZodOptional<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>]>]>>]>>]>>;
    debug: z.ZodOptional<z.ZodBoolean>;
    baseUrl: z.ZodOptional<z.ZodString>;
    trackingBaseUrl: z.ZodOptional<z.ZodString>;
    maxNetworkRetries: z.ZodOptional<z.ZodNumber>;
    maxNetworkRetryDelayMs: z.ZodOptional<z.ZodNumber>;
    maxConcurrentRequests: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<number>]>>;
    approvalTimeoutMs: z.ZodOptional<z.ZodNumber>;
    maxApprovalRetries: z.ZodOptional<z.ZodNumber>;
    approvalMode: z.ZodOptional<z.ZodEnum<{
        disabled: "disabled";
        poll: "poll";
        throw: "throw";
    }>>;
    openAutoModeApprovalsInBrowser: z.ZodOptional<z.ZodBoolean>;
    manifestPath: z.ZodOptional<z.ZodString>;
    manifest: z.ZodOptional<z.ZodCustom<Manifest, Manifest>>;
    onEvent: z.ZodOptional<z.ZodCustom<EventCallback, EventCallback>>;
    fetch: z.ZodOptional<z.ZodCustom<typeof fetch, typeof fetch>>;
    eventEmission: z.ZodOptional<z.ZodCustom<EventEmissionConfig, EventEmissionConfig>>;
    callerPackage: z.ZodOptional<z.ZodCustom<{
        name: string;
        version: string;
    }, {
        name: string;
        version: string;
    }>>;
    cache: z.ZodOptional<z.ZodCustom<ZapierCache, ZapierCache>>;
    canIncludeSharedConnections: z.ZodOptional<z.ZodBoolean>;
    canIncludeSharedTables: z.ZodOptional<z.ZodBoolean>;
    canDeleteTables: z.ZodOptional<z.ZodBoolean>;
    token: z.ZodOptional<z.ZodString>;
}, z.core.$strip>;
type BaseSdkOptions = z.infer<typeof BaseSdkOptionsSchema>;

/**
 * Credentials Resolution
 *
 * This module provides the core logic for resolving credentials from various sources:
 * - Explicit credentials option
 * - Deprecated token option
 * - Environment variables (new and deprecated)
 * - CLI login stored tokens
 */

/**
 * Options for resolving credentials.
 */
interface ResolveCredentialsOptions {
    credentials?: Credentials;
    /** @deprecated Use `credentials` instead */
    token?: string;
    /** SDK base URL - used to derive auth base URL if not specified in credentials */
    baseUrl?: string;
}
/**
 * Resolve credentials from environment variables.
 *
 * Precedence:
 * 1. ZAPIER_CREDENTIALS (string token)
 * 2. ZAPIER_CREDENTIALS_CLIENT_ID + ZAPIER_CREDENTIALS_CLIENT_SECRET (client credentials)
 * 3. ZAPIER_CREDENTIALS_CLIENT_ID alone (PKCE)
 * 4. Deprecated ZAPIER_TOKEN, ZAPIER_AUTH_* vars (with warnings)
 *
 * @param sdkBaseUrl - SDK base URL used to derive auth base URL if not specified
 */
declare function resolveCredentialsFromEnv(sdkBaseUrl?: string): ResolvedCredentials | undefined;
/**
 * Resolve credentials from all possible sources.
 *
 * Precedence:
 * 1. Explicit credentials option
 * 2. Deprecated token option (with warning)
 * 3. Environment variables
 * 4. CLI login stored token (handled separately in auth.ts)
 *
 * If credentials is a function, it is called and must return
 * a string or credentials object (not another function).
 *
 * The baseUrl option is used to derive the auth base URL if not
 * specified in credentials.
 */
declare function resolveCredentials(options?: ResolveCredentialsOptions): Promise<ResolvedCredentials | undefined>;
/**
 * Extract the base URL from credentials for use in auth flows.
 */
declare function getBaseUrlFromCredentials(credentials: ResolvedCredentials | undefined): string | undefined;
/**
 * Extract the client ID from credentials for use in auth flows.
 */
declare function getClientIdFromCredentials(credentials: ResolvedCredentials | undefined): string | undefined;

interface ApiPluginOptions extends BaseSdkOptions {
}
type ResolveCredentialsFn = () => ReturnType<typeof resolveCredentials>;
declare const API_ID = "zapier/api";
/**
 * The typed stand-in plugins import to read the API client
 * (`imports: [apiPluginRef]` then `imports.api`).
 */
declare const apiPluginRef: PropertyPlugin<"api", ApiClient> & PluginSummary<"zapier/api", never>;
/**
 * The module-model API provider: builds the client once at materialization
 * (`setup`, dependencies-first) from the injected SDK options. The client
 * handles credential resolution internally.
 */
declare const apiPlugin: PropertyPlugin<"api", ApiClient> & LeafSummary<"zapier", "api", readonly [PropertyPlugin<"sdkOptions", {
    credentials?: string | {
        clientId: string;
        clientSecret: string;
        type?: "client_credentials" | undefined;
        baseUrl?: string | undefined;
        scope?: string | undefined;
    } | {
        clientId: string;
        type?: "pkce" | undefined;
        baseUrl?: string | undefined;
        scope?: string | undefined;
    } | zod_v4_core.$InferOuterFunctionType<zod_v4_core.$ZodTuple<readonly [], zod_v4_core.$ZodFunctionOut>, zod.ZodUnion<readonly [zod.ZodUnion<readonly [zod.ZodString, zod.ZodUnion<readonly [zod.ZodObject<{
        type: zod.ZodOptional<zod.ZodEnum<{
            client_credentials: "client_credentials";
        }>>;
        clientId: zod.ZodString;
        clientSecret: zod.ZodString;
        baseUrl: zod.ZodOptional<zod.ZodString>;
        scope: zod.ZodOptional<zod.ZodString>;
    }, zod_v4_core.$strip>, zod.ZodObject<{
        type: zod.ZodOptional<zod.ZodEnum<{
            pkce: "pkce";
        }>>;
        clientId: zod.ZodString;
        baseUrl: zod.ZodOptional<zod.ZodString>;
        scope: zod.ZodOptional<zod.ZodString>;
    }, zod_v4_core.$strip>]>]>, zod.ZodPromise<zod.ZodUnion<readonly [zod.ZodString, zod.ZodUnion<readonly [zod.ZodObject<{
        type: zod.ZodOptional<zod.ZodEnum<{
            client_credentials: "client_credentials";
        }>>;
        clientId: zod.ZodString;
        clientSecret: zod.ZodString;
        baseUrl: zod.ZodOptional<zod.ZodString>;
        scope: zod.ZodOptional<zod.ZodString>;
    }, zod_v4_core.$strip>, zod.ZodObject<{
        type: zod.ZodOptional<zod.ZodEnum<{
            pkce: "pkce";
        }>>;
        clientId: zod.ZodString;
        baseUrl: zod.ZodOptional<zod.ZodString>;
        scope: zod.ZodOptional<zod.ZodString>;
    }, zod_v4_core.$strip>]>]>>]>> | undefined;
    debug?: boolean | undefined;
    baseUrl?: string | undefined;
    trackingBaseUrl?: string | undefined;
    maxNetworkRetries?: number | undefined;
    maxNetworkRetryDelayMs?: number | undefined;
    maxConcurrentRequests?: number | undefined;
    approvalTimeoutMs?: number | undefined;
    maxApprovalRetries?: number | undefined;
    approvalMode?: "disabled" | "poll" | "throw" | undefined;
    openAutoModeApprovalsInBrowser?: boolean | undefined;
    manifestPath?: string | undefined;
    manifest?: Manifest | undefined;
    onEvent?: EventCallback | undefined;
    fetch?: typeof fetch | undefined;
    eventEmission?: EventEmissionConfig | undefined;
    callerPackage?: {
        name: string;
        version: string;
    } | undefined;
    cache?: ZapierCache | undefined;
    canIncludeSharedConnections?: boolean | undefined;
    canIncludeSharedTables?: boolean | undefined;
    canDeleteTables?: boolean | undefined;
    token?: string | undefined;
} | undefined> & PluginSummary<never, never>]>;
declare const RESOLVE_CREDENTIALS_ID = "zapier/resolveCredentials";
/**
 * The typed stand-in for the credentials resolver
 * (`imports: [resolveCredentialsPluginRef]` then `imports.resolveCredentials`).
 */
declare const resolveCredentialsPluginRef: PropertyPlugin<"resolveCredentials", ResolveCredentialsFn> & PluginSummary<"zapier/resolveCredentials", never>;
/**
 * Resolves the caller's credentials from the injected SDK options. Internal:
 * consumed by the CLI's auth plugins (login/logout/signup) via
 * `resolveCredentialsPluginRef`; deliberately not public SDK API.
 */
declare const resolveCredentialsPlugin: PropertyPlugin<"resolveCredentials", ResolveCredentialsFn> & LeafSummary<"zapier", "resolveCredentials", readonly [PropertyPlugin<"sdkOptions", {
    credentials?: string | {
        clientId: string;
        clientSecret: string;
        type?: "client_credentials" | undefined;
        baseUrl?: string | undefined;
        scope?: string | undefined;
    } | {
        clientId: string;
        type?: "pkce" | undefined;
        baseUrl?: string | undefined;
        scope?: string | undefined;
    } | zod_v4_core.$InferOuterFunctionType<zod_v4_core.$ZodTuple<readonly [], zod_v4_core.$ZodFunctionOut>, zod.ZodUnion<readonly [zod.ZodUnion<readonly [zod.ZodString, zod.ZodUnion<readonly [zod.ZodObject<{
        type: zod.ZodOptional<zod.ZodEnum<{
            client_credentials: "client_credentials";
        }>>;
        clientId: zod.ZodString;
        clientSecret: zod.ZodString;
        baseUrl: zod.ZodOptional<zod.ZodString>;
        scope: zod.ZodOptional<zod.ZodString>;
    }, zod_v4_core.$strip>, zod.ZodObject<{
        type: zod.ZodOptional<zod.ZodEnum<{
            pkce: "pkce";
        }>>;
        clientId: zod.ZodString;
        baseUrl: zod.ZodOptional<zod.ZodString>;
        scope: zod.ZodOptional<zod.ZodString>;
    }, zod_v4_core.$strip>]>]>, zod.ZodPromise<zod.ZodUnion<readonly [zod.ZodString, zod.ZodUnion<readonly [zod.ZodObject<{
        type: zod.ZodOptional<zod.ZodEnum<{
            client_credentials: "client_credentials";
        }>>;
        clientId: zod.ZodString;
        clientSecret: zod.ZodString;
        baseUrl: zod.ZodOptional<zod.ZodString>;
        scope: zod.ZodOptional<zod.ZodString>;
    }, zod_v4_core.$strip>, zod.ZodObject<{
        type: zod.ZodOptional<zod.ZodEnum<{
            pkce: "pkce";
        }>>;
        clientId: zod.ZodString;
        baseUrl: zod.ZodOptional<zod.ZodString>;
        scope: zod.ZodOptional<zod.ZodString>;
    }, zod_v4_core.$strip>]>]>>]>> | undefined;
    debug?: boolean | undefined;
    baseUrl?: string | undefined;
    trackingBaseUrl?: string | undefined;
    maxNetworkRetries?: number | undefined;
    maxNetworkRetryDelayMs?: number | undefined;
    maxConcurrentRequests?: number | undefined;
    approvalTimeoutMs?: number | undefined;
    maxApprovalRetries?: number | undefined;
    approvalMode?: "disabled" | "poll" | "throw" | undefined;
    openAutoModeApprovalsInBrowser?: boolean | undefined;
    manifestPath?: string | undefined;
    manifest?: Manifest | undefined;
    onEvent?: EventCallback | undefined;
    fetch?: typeof fetch | undefined;
    eventEmission?: EventEmissionConfig | undefined;
    callerPackage?: {
        name: string;
        version: string;
    } | undefined;
    cache?: ZapierCache | undefined;
    canIncludeSharedConnections?: boolean | undefined;
    canIncludeSharedTables?: boolean | undefined;
    canDeleteTables?: boolean | undefined;
    token?: string | undefined;
} | undefined> & PluginSummary<never, never>]>;

declare const GetActionInputFieldsSchemaSchema: z.ZodObject<{
    app: z.ZodString & {
        _def: z.core.$ZodStringDef & PositionalMetadata;
    };
    actionType: z.ZodEnum<{
        read: "read";
        read_bulk: "read_bulk";
        write: "write";
        search: "search";
        search_or_write: "search_or_write";
        search_and_write: "search_and_write";
        filter: "filter";
        run: "run";
    }>;
    action: z.ZodString & {
        _def: z.core.$ZodStringDef & PositionalMetadata;
    };
    connection: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
    connectionId: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
    authenticationId: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
    inputs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
}, z.core.$strip>;
declare const GetActionInputFieldsSchemaSchemaDeprecated: z.ZodObject<{
    appKey: z.ZodString & {
        _def: z.core.$ZodStringDef & PositionalMetadata;
    };
    actionType: z.ZodEnum<{
        read: "read";
        read_bulk: "read_bulk";
        write: "write";
        search: "search";
        search_or_write: "search_or_write";
        search_and_write: "search_and_write";
        filter: "filter";
        run: "run";
    }>;
    actionKey: z.ZodString;
    connection: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
    connectionId: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
    authenticationId: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
    inputs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
}, z.core.$strip>;
type GetActionInputFieldsSchemaOptions = z.infer<typeof GetActionInputFieldsSchemaSchema> | (Omit<z.infer<typeof GetActionInputFieldsSchemaSchemaDeprecated>, "appKey" | "actionKey"> & {
    /** @deprecated Use `app` instead. */
    appKey: z.infer<typeof GetActionInputFieldsSchemaSchemaDeprecated>["appKey"];
    /** @deprecated Use `action` instead. */
    actionKey: z.infer<typeof GetActionInputFieldsSchemaSchemaDeprecated>["actionKey"];
});

declare const ListActionInputFieldChoicesSchema: z.ZodObject<{
    app: z.ZodString & {
        _def: z.core.$ZodStringDef & PositionalMetadata;
    };
    actionType: z.ZodEnum<{
        read: "read";
        read_bulk: "read_bulk";
        write: "write";
        search: "search";
        search_or_write: "search_or_write";
        search_and_write: "search_and_write";
        filter: "filter";
        run: "run";
    }>;
    action: z.ZodString & {
        _def: z.core.$ZodStringDef & PositionalMetadata;
    };
    inputField: z.ZodString & {
        _def: z.core.$ZodStringDef & PositionalMetadata;
    };
    connection: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
    connectionId: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
    authenticationId: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
    inputs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
    page: z.ZodOptional<z.ZodNumber>;
    pageSize: z.ZodOptional<z.ZodNumber>;
    maxItems: z.ZodOptional<z.ZodNumber>;
    cursor: z.ZodOptional<z.ZodString>;
}, z.core.$strip>;
declare const ListActionInputFieldChoicesSchemaDeprecated: z.ZodObject<{
    appKey: z.ZodString & {
        _def: z.core.$ZodStringDef & PositionalMetadata;
    };
    actionType: z.ZodEnum<{
        read: "read";
        read_bulk: "read_bulk";
        write: "write";
        search: "search";
        search_or_write: "search_or_write";
        search_and_write: "search_and_write";
        filter: "filter";
        run: "run";
    }>;
    actionKey: z.ZodString;
    inputFieldKey: z.ZodString;
    connection: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
    connectionId: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
    authenticationId: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
    inputs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
    page: z.ZodOptional<z.ZodNumber>;
    pageSize: z.ZodOptional<z.ZodNumber>;
    maxItems: z.ZodOptional<z.ZodNumber>;
    cursor: z.ZodOptional<z.ZodString>;
}, z.core.$strip>;
type ListActionInputFieldChoicesOptions = z.infer<typeof ListActionInputFieldChoicesSchema> | (Omit<z.infer<typeof ListActionInputFieldChoicesSchemaDeprecated>, "appKey" | "actionKey" | "inputFieldKey"> & {
    /** @deprecated Use `app` instead. */
    appKey: z.infer<typeof ListActionInputFieldChoicesSchemaDeprecated>["appKey"];
    /** @deprecated Use `action` instead. */
    actionKey: z.infer<typeof ListActionInputFieldChoicesSchemaDeprecated>["actionKey"];
    /** @deprecated Use `inputField` instead. */
    inputFieldKey: z.infer<typeof ListActionInputFieldChoicesSchemaDeprecated>["inputFieldKey"];
});

declare const ListActionsSchema: z.ZodObject<{
    app: z.ZodString & {
        _def: z.core.$ZodStringDef & PositionalMetadata;
    };
    actionType: z.ZodOptional<z.ZodEnum<{
        read: "read";
        read_bulk: "read_bulk";
        write: "write";
        search: "search";
        search_or_write: "search_or_write";
        search_and_write: "search_and_write";
        filter: "filter";
        run: "run";
    }>>;
    pageSize: z.ZodOptional<z.ZodNumber>;
    maxItems: z.ZodOptional<z.ZodNumber>;
    cursor: z.ZodOptional<z.ZodString>;
}, z.core.$strip>;
declare const ListActionsSchemaDeprecated: z.ZodObject<{
    appKey: z.ZodString & {
        _def: z.core.$ZodStringDef & PositionalMetadata;
    };
    actionType: z.ZodOptional<z.ZodEnum<{
        read: "read";
        read_bulk: "read_bulk";
        write: "write";
        search: "search";
        search_or_write: "search_or_write";
        search_and_write: "search_and_write";
        filter: "filter";
        run: "run";
    }>>;
    pageSize: z.ZodOptional<z.ZodNumber>;
    maxItems: z.ZodOptional<z.ZodNumber>;
    cursor: z.ZodOptional<z.ZodString>;
}, z.core.$strip>;
type ListActionsOptions = z.infer<typeof ListActionsSchema> | (Omit<z.infer<typeof ListActionsSchemaDeprecated>, "appKey"> & {
    /** @deprecated Use `app` instead. */
    appKey: z.infer<typeof ListActionsSchemaDeprecated>["appKey"];
});

/**
 * SDK Authentication Utilities
 *
 * This module provides SDK-level authentication utilities focused
 * on token acquisition. It uses the credentials system for resolution
 * and handles different credential types appropriately.
 *
 * CLI-specific functionality like login/logout is handled by the
 * @zapier/zapier-sdk-cli package (imported via its `./login` subpath).
 */

/**
 * Options for resolving auth tokens.
 */
interface ResolveAuthTokenOptions {
    credentials?: Credentials;
    /** @deprecated Use `credentials` instead */
    token?: string;
    onEvent?: EventCallback;
    fetch?: typeof globalThis.fetch;
    baseUrl?: string;
    /**
     * Additional OAuth scopes required for this request. When using client
     * credentials, these scopes will be merged with any scopes specified in
     * the credentials object during token exchange.
     */
    requiredScopes?: string[];
    /** Enable debug logging for auth operations. */
    debug?: boolean;
    /**
     * Pluggable key-value cache used to cache access tokens across
     * process boundaries. When omitted, the SDK tries to load a default
     * adapter from the cli-login package (file system + keychain) and
     * falls back to in-memory cache if none is available.
     */
    cache?: ZapierCache;
}
declare enum AuthMechanism {
    ClientCredentials = "client_credentials",
    Jwt = "jwt",
    Token = "token",
    Pkce = "pkce",
    None = "none"
}
interface ResolvedAuth {
    token?: string;
    mechanism: AuthMechanism;
    clientId: string | null;
}
/**
 * Clear in-process caches. Useful for testing or to force the next
 * resolve to re-import the default cache adapter. Does not touch
 * persistent cache — use `invalidateCachedToken` for that.
 */
declare function clearTokenCache(): void;
/**
 * Invalidate the cached token for a given client_credentials identity.
 * Called on 401 so the next request re-exchanges. Clears both the
 * in-process pending-exchange map and the persistent layer via the
 * resolved cache adapter.
 */
declare function invalidateCachedToken(options: {
    clientId: string;
    scopes: string[];
    baseUrl: string;
    cache?: ZapierCache;
}): Promise<void>;
/**
 * Options for getTokenFromCliLogin.
 */
interface CliLoginOptions {
    onEvent?: EventCallback;
    fetch?: typeof globalThis.fetch;
    credentials?: {
        type?: "pkce";
        clientId: string;
        baseUrl?: string;
        scope?: string;
    };
    debug?: boolean;
}
/**
 * Structural shape of the optional `@zapier/zapier-sdk-cli/login` module.
 *
 * Declared as a local interface rather than a `typeof` of the dynamically
 * imported CLI module, so the published declarations carry no hard reference to
 * the CLI package. The CLI is an optional, dynamically-imported peer absent from
 * `dependencies`; a leaked reference makes consumers' type-checks fail to
 * resolve it. The ambient runtime counterpart lives in
 * src/types/optional-zapier-sdk-cli.d.ts.
 */
interface CliLoginModule {
    getToken(options?: Omit<CliLoginOptions, "credentials">): Promise<string | undefined>;
    createCache?: () => ZapierCache;
    getActiveCredentials?: (options?: {
        baseUrl?: string;
    }) => {
        clientId: string;
        scopes: string[];
        baseUrl?: string;
    } | undefined;
    getStoredClientCredentials?: (options?: {
        baseUrl?: string;
    }) => Promise<ClientCredentialsObject | undefined>;
}
/**
 * Inject an already-loaded CLI login module so the SDK skips its dynamic import.
 * This guarantees CLI and SDK share the same module instance in the same process.
 */
declare function injectCliLogin(module: CliLoginModule): void;
/**
 * Returns whether a CLI login package is available.
 * `undefined` if no import has been attempted yet, `true` if found, `false` if not.
 */
declare function isCliLoginAvailable(): boolean | undefined;
/**
 * Attempts to get a token from the CLI login package.
 *
 * Returns undefined if no valid token is found or no login package is available.
 * Throws if there's an actual error (like token refresh failure).
 */
declare function getTokenFromCliLogin(options: CliLoginOptions): Promise<string | undefined>;
/**
 * Resolves auth from wherever it can be found, returning the token plus
 * metadata about how it was resolved.
 *
 * Resolution order:
 * 1. Explicit credentials option (or deprecated token option)
 * 2. Environment variables
 * 3. CLI login package (if available)
 *
 * For different credential types:
 * - String: Used directly as the token
 * - Client credentials: Exchanged for an access token (with caching)
 * - PKCE: Delegates to CLI login (throws if not available)
 *
 * When no auth can be resolved, returns a ResolvedAuth with
 * mechanism: None and no token.
 */
declare function resolveAuth(options?: ResolveAuthTokenOptions): Promise<ResolvedAuth>;
declare function resolveAuthToken(options?: ResolveAuthTokenOptions): Promise<string | undefined>;
/**
 * Invalidate the cached token for the given credentials, if applicable.
 * This is called when we receive a 401 response, indicating the token
 * is no longer valid. Only affects client_credentials flow tokens.
 */
declare function invalidateCredentialsToken(options: {
    credentials?: Credentials;
    token?: string;
    baseUrl?: string;
    requiredScopes?: string[];
    cache?: ZapierCache;
}): Promise<void>;

declare const TriggerInboxItemSchema: z.ZodObject<{
    id: z.ZodString;
    created_at: z.ZodString;
    key: z.ZodNullable<z.ZodString>;
    name: z.ZodNullable<z.ZodString>;
    status: z.ZodUnion<readonly [z.ZodEnum<{
        initializing: "initializing";
        active: "active";
        paused: "paused";
        deleting: "deleting";
        initialization_failure: "initialization_failure";
    }>, z.ZodString]>;
    paused_reason: z.ZodNullable<z.ZodUnion<readonly [z.ZodEnum<{
        unknown: "unknown";
        user: "user";
        authentication: "authentication";
        authentication_access_revoked: "authentication_access_revoked";
        partner_revoked: "partner_revoked";
        subscribe_failed: "subscribe_failed";
        migrate_failed: "migrate_failed";
        abandoned: "abandoned";
        upstream_failures: "upstream_failures";
    }>, z.ZodString]>>;
    notification_url: z.ZodNullable<z.ZodString>;
    subscription: z.ZodObject<{
        connection_id: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodNull]>;
        app_key: z.ZodString;
        action_key: z.ZodString;
        inputs: z.ZodRecord<z.ZodString, z.ZodUnknown>;
    }, z.core.$strip>;
}, z.core.$strip>;
type TriggerInboxItem = z.infer<typeof TriggerInboxItemSchema>;

interface DeleteTriggerInboxResult {
    data: TriggerInboxItem;
}

interface ZapierSdkOptions extends BaseSdkOptions {
}
/**
 * @deprecated `getRegistry` is now built into every sdk, so the "without
 * registry" form has no behavioral difference from {@link createZapierSdk}.
 * Use {@link createZapierSdk} instead.
 */
declare function createZapierSdkWithoutRegistry(options?: ZapierSdkOptions): {
    getRegistry: (input?: {
        package?: string | undefined;
    } | undefined) => RegistryResult<any>;
    getProfile: (input?: Record<string, never> | undefined) => Promise<{
        data: {
            id: string;
            first_name: string;
            last_name: string;
            full_name: string;
            email: string;
            email_confirmed: boolean;
            timezone: string;
        };
    }>;
    listApps: (input?: ({
        search?: string | undefined;
        apps?: string[] | undefined;
        appKeys?: string[] | undefined;
        pageSize?: number | undefined;
        maxItems?: number | undefined;
        cursor?: string | undefined;
    } & {
        cursor?: string;
        pageSize?: number;
    } & {
        maxItems?: number;
    }) | undefined) => PaginatedSdkResult<{
        slug: string;
        title: string;
        key: string;
        implementation_id: string;
        description?: string | undefined;
        is_hidden?: boolean | undefined;
        auth_type?: string | undefined;
        actions?: {
            read?: number | undefined;
            read_bulk?: number | undefined;
            write?: number | undefined;
            search?: number | undefined;
            search_or_write?: number | undefined;
            search_and_write?: number | undefined;
            filter?: number | undefined;
        } | undefined;
        is_deprecated?: boolean | undefined;
        is_beta?: boolean | undefined;
        is_premium?: boolean | undefined;
        age_in_days?: number | undefined;
        banner?: string | undefined;
        categories?: {
            id: number;
            name: string;
            slug: string;
        }[] | undefined;
        images?: {
            url_16x16?: string | undefined;
            url_32x32?: string | undefined;
            url_64x64?: string | undefined;
            url_128x128?: string | undefined;
        } | undefined;
        popularity?: number | undefined;
        has_filters?: boolean | undefined;
        has_reads?: boolean | undefined;
        has_searches?: boolean | undefined;
        has_searches_or_writes?: boolean | undefined;
        has_upfront_fields?: boolean | undefined;
        has_writes?: boolean | undefined;
        is_built_in?: boolean | undefined;
        is_featured?: boolean | undefined;
        is_invite?: boolean | undefined;
        is_public?: boolean | undefined;
        is_upcoming?: boolean | undefined;
        visibility?: string | undefined;
        primary_color?: string | undefined;
        secondary_color?: string | undefined;
        classification?: string | undefined;
        api_docs_url?: string | undefined;
        image?: string | undefined;
        version?: string | undefined;
    }>;
    getApp: (input: {
        app: string;
    } | {
        appKey: string;
    }) => Promise<{
        data: {
            slug: string;
            title: string;
            key: string;
            implementation_id: string;
            description?: string | undefined;
            is_hidden?: boolean | undefined;
            auth_type?: string | undefined;
            actions?: {
                read?: number | undefined;
                read_bulk?: number | undefined;
                write?: number | undefined;
                search?: number | undefined;
                search_or_write?: number | undefined;
                search_and_write?: number | undefined;
                filter?: number | undefined;
            } | undefined;
            is_deprecated?: boolean | undefined;
            is_beta?: boolean | undefined;
            is_premium?: boolean | undefined;
            age_in_days?: number | undefined;
            banner?: string | undefined;
            categories?: {
                id: number;
                name: string;
                slug: string;
            }[] | undefined;
            images?: {
                url_16x16?: string | undefined;
                url_32x32?: string | undefined;
                url_64x64?: string | undefined;
                url_128x128?: string | undefined;
            } | undefined;
            popularity?: number | undefined;
            has_filters?: boolean | undefined;
            has_reads?: boolean | undefined;
            has_searches?: boolean | undefined;
            has_searches_or_writes?: boolean | undefined;
            has_upfront_fields?: boolean | undefined;
            has_writes?: boolean | undefined;
            is_built_in?: boolean | undefined;
            is_featured?: boolean | undefined;
            is_invite?: boolean | undefined;
            is_public?: boolean | undefined;
            is_upcoming?: boolean | undefined;
            visibility?: string | undefined;
            primary_color?: string | undefined;
            secondary_color?: string | undefined;
            classification?: string | undefined;
            api_docs_url?: string | undefined;
            image?: string | undefined;
            version?: string | undefined;
        };
    }>;
    listActions: (input: ({
        app: string;
        actionType?: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run" | undefined;
        pageSize?: number | undefined;
        maxItems?: number | undefined;
        cursor?: string | undefined;
    } | {
        appKey: string;
        actionType?: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run" | undefined;
        pageSize?: number | undefined;
        maxItems?: number | undefined;
        cursor?: string | undefined;
    }) & {
        cursor?: string;
        pageSize?: number;
    } & {
        maxItems?: number;
    }) => PaginatedSdkResult<{
        description: string;
        key: string;
        app_key: string;
        action_type: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run";
        title: string;
        type: "action";
        is_hidden?: boolean | undefined;
        id?: string | undefined;
        is_important?: boolean | undefined;
        app_version?: string | undefined;
    }>;
    getAction: (input: {
        app: string;
        actionType: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run";
        action: string;
    } | {
        appKey: string;
        actionType: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run";
        actionKey: string;
    }) => Promise<{
        data: {
            description: string;
            key: string;
            app_key: string;
            action_type: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run";
            title: string;
            type: "action";
            is_hidden?: boolean | undefined;
            id?: string | undefined;
            is_important?: boolean | undefined;
            app_version?: string | undefined;
        };
    }>;
    listConnections: (input?: ({
        title?: string | undefined;
        search?: string | undefined;
        owner?: string | undefined;
        app?: string | undefined;
        appKey?: string | undefined;
        connections?: string[] | undefined;
        connectionIds?: string[] | undefined;
        authenticationIds?: string[] | undefined;
        account?: string | undefined;
        accountId?: string | undefined;
        includeShared?: boolean | undefined;
        isExpired?: boolean | undefined;
        expired?: boolean | undefined;
        pageSize?: number | undefined;
        maxItems?: number | undefined;
        cursor?: string | undefined;
    } & {
        cursor?: string;
        pageSize?: number;
    } & {
        maxItems?: number;
    }) | undefined) => PaginatedSdkResult<{
        date: string;
        is_invite_only: boolean;
        is_private: boolean;
        shared_with_all: boolean;
        id: string;
        account_id: string;
        title?: string | null | undefined;
        lastchanged?: string | undefined;
        destination_selected_api?: string | null | undefined;
        is_stale?: string | undefined;
        is_shared?: string | undefined;
        marked_stale_at?: string | null | undefined;
        label?: string | null | undefined;
        identifier?: string | null | undefined;
        url?: string | undefined;
        groups?: Record<string, unknown>[] | undefined;
        members?: string | undefined;
        permissions?: Record<string, boolean> | undefined;
        public_id?: string | undefined;
        account_public_id?: string | undefined;
        customuser_public_id?: string | undefined;
        implementation_id?: string | undefined;
        profile_id?: string | undefined;
        is_expired?: string | undefined;
        expired_at?: string | null | undefined;
        app_key?: string | undefined;
        app_version?: string | undefined;
    }>;
    getConnection: (input: {
        connection: string | number;
    } | {
        connectionId: string | number;
    } | {
        authenticationId: string | number;
    }) => Promise<{
        data: {
            date: string;
            is_invite_only: boolean;
            is_private: boolean;
            shared_with_all: boolean;
            id: string;
            account_id: string;
            title?: string | null | undefined;
            lastchanged?: string | undefined;
            destination_selected_api?: string | null | undefined;
            is_stale?: string | undefined;
            is_shared?: string | undefined;
            marked_stale_at?: string | null | undefined;
            label?: string | null | undefined;
            identifier?: string | null | undefined;
            url?: string | undefined;
            groups?: Record<string, unknown>[] | undefined;
            members?: string | undefined;
            permissions?: Record<string, boolean> | undefined;
            public_id?: string | undefined;
            account_public_id?: string | undefined;
            customuser_public_id?: string | undefined;
            implementation_id?: string | undefined;
            profile_id?: string | undefined;
            is_expired?: string | undefined;
            expired_at?: string | null | undefined;
            app_key?: string | undefined;
            app_version?: string | undefined;
        };
    }>;
    findFirstConnection: (input?: {
        title?: string | undefined;
        search?: string | undefined;
        appKey?: string | undefined;
        app?: string | undefined;
        owner?: string | undefined;
        account?: string | undefined;
        accountId?: string | undefined;
        includeShared?: boolean | undefined;
        isExpired?: boolean | undefined;
        expired?: boolean | undefined;
    } | undefined) => Promise<{
        data: {
            date: string;
            is_invite_only: boolean;
            is_private: boolean;
            shared_with_all: boolean;
            id: string;
            account_id: string;
            title?: string | null | undefined;
            lastchanged?: string | undefined;
            destination_selected_api?: string | null | undefined;
            is_stale?: string | undefined;
            is_shared?: string | undefined;
            marked_stale_at?: string | null | undefined;
            label?: string | null | undefined;
            identifier?: string | null | undefined;
            url?: string | undefined;
            groups?: Record<string, unknown>[] | undefined;
            members?: string | undefined;
            permissions?: Record<string, boolean> | undefined;
            public_id?: string | undefined;
            account_public_id?: string | undefined;
            customuser_public_id?: string | undefined;
            implementation_id?: string | undefined;
            profile_id?: string | undefined;
            is_expired?: string | undefined;
            expired_at?: string | null | undefined;
            app_key?: string | undefined;
            app_version?: string | undefined;
        };
    }>;
    findUniqueConnection: (input?: {
        title?: string | undefined;
        search?: string | undefined;
        appKey?: string | undefined;
        app?: string | undefined;
        owner?: string | undefined;
        account?: string | undefined;
        accountId?: string | undefined;
        includeShared?: boolean | undefined;
        isExpired?: boolean | undefined;
        expired?: boolean | undefined;
    } | undefined) => Promise<{
        data: {
            date: string;
            is_invite_only: boolean;
            is_private: boolean;
            shared_with_all: boolean;
            id: string;
            account_id: string;
            title?: string | null | undefined;
            lastchanged?: string | undefined;
            destination_selected_api?: string | null | undefined;
            is_stale?: string | undefined;
            is_shared?: string | undefined;
            marked_stale_at?: string | null | undefined;
            label?: string | null | undefined;
            identifier?: string | null | undefined;
            url?: string | undefined;
            groups?: Record<string, unknown>[] | undefined;
            members?: string | undefined;
            permissions?: Record<string, boolean> | undefined;
            public_id?: string | undefined;
            account_public_id?: string | undefined;
            customuser_public_id?: string | undefined;
            implementation_id?: string | undefined;
            profile_id?: string | undefined;
            is_expired?: string | undefined;
            expired_at?: string | null | undefined;
            app_key?: string | undefined;
            app_version?: string | undefined;
        };
    }>;
    listAuthentications: (input?: ({
        title?: string | undefined;
        search?: string | undefined;
        owner?: string | undefined;
        app?: string | undefined;
        appKey?: string | undefined;
        connections?: string[] | undefined;
        connectionIds?: string[] | undefined;
        authenticationIds?: string[] | undefined;
        account?: string | undefined;
        accountId?: string | undefined;
        includeShared?: boolean | undefined;
        isExpired?: boolean | undefined;
        expired?: boolean | undefined;
        pageSize?: number | undefined;
        maxItems?: number | undefined;
        cursor?: string | undefined;
    } & {
        cursor?: string;
        pageSize?: number;
    } & {
        maxItems?: number;
    }) | undefined) => PaginatedSdkResult<{
        date: string;
        is_invite_only: boolean;
        is_private: boolean;
        shared_with_all: boolean;
        id: string;
        account_id: string;
        title?: string | null | undefined;
        lastchanged?: string | undefined;
        destination_selected_api?: string | null | undefined;
        is_stale?: string | undefined;
        is_shared?: string | undefined;
        marked_stale_at?: string | null | undefined;
        label?: string | null | undefined;
        identifier?: string | null | undefined;
        url?: string | undefined;
        groups?: Record<string, unknown>[] | undefined;
        members?: string | undefined;
        permissions?: Record<string, boolean> | undefined;
        public_id?: string | undefined;
        account_public_id?: string | undefined;
        customuser_public_id?: string | undefined;
        implementation_id?: string | undefined;
        profile_id?: string | undefined;
        is_expired?: string | undefined;
        expired_at?: string | null | undefined;
        app_key?: string | undefined;
        app_version?: string | undefined;
    }>;
    getAuthentication: (input: {
        connection: string | number;
    } | {
        connectionId: string | number;
    } | {
        authenticationId: string | number;
    }) => Promise<{
        data: {
            date: string;
            is_invite_only: boolean;
            is_private: boolean;
            shared_with_all: boolean;
            id: string;
            account_id: string;
            title?: string | null | undefined;
            lastchanged?: string | undefined;
            destination_selected_api?: string | null | undefined;
            is_stale?: string | undefined;
            is_shared?: string | undefined;
            marked_stale_at?: string | null | undefined;
            label?: string | null | undefined;
            identifier?: string | null | undefined;
            url?: string | undefined;
            groups?: Record<string, unknown>[] | undefined;
            members?: string | undefined;
            permissions?: Record<string, boolean> | undefined;
            public_id?: string | undefined;
            account_public_id?: string | undefined;
            customuser_public_id?: string | undefined;
            implementation_id?: string | undefined;
            profile_id?: string | undefined;
            is_expired?: string | undefined;
            expired_at?: string | null | undefined;
            app_key?: string | undefined;
            app_version?: string | undefined;
        };
    }>;
    findFirstAuthentication: (input?: {
        title?: string | undefined;
        search?: string | undefined;
        appKey?: string | undefined;
        app?: string | undefined;
        owner?: string | undefined;
        account?: string | undefined;
        accountId?: string | undefined;
        includeShared?: boolean | undefined;
        isExpired?: boolean | undefined;
        expired?: boolean | undefined;
    } | undefined) => Promise<{
        data: {
            date: string;
            is_invite_only: boolean;
            is_private: boolean;
            shared_with_all: boolean;
            id: string;
            account_id: string;
            title?: string | null | undefined;
            lastchanged?: string | undefined;
            destination_selected_api?: string | null | undefined;
            is_stale?: string | undefined;
            is_shared?: string | undefined;
            marked_stale_at?: string | null | undefined;
            label?: string | null | undefined;
            identifier?: string | null | undefined;
            url?: string | undefined;
            groups?: Record<string, unknown>[] | undefined;
            members?: string | undefined;
            permissions?: Record<string, boolean> | undefined;
            public_id?: string | undefined;
            account_public_id?: string | undefined;
            customuser_public_id?: string | undefined;
            implementation_id?: string | undefined;
            profile_id?: string | undefined;
            is_expired?: string | undefined;
            expired_at?: string | null | undefined;
            app_key?: string | undefined;
            app_version?: string | undefined;
        };
    }>;
    findUniqueAuthentication: (input?: {
        title?: string | undefined;
        search?: string | undefined;
        appKey?: string | undefined;
        app?: string | undefined;
        owner?: string | undefined;
        account?: string | undefined;
        accountId?: string | undefined;
        includeShared?: boolean | undefined;
        isExpired?: boolean | undefined;
        expired?: boolean | undefined;
    } | undefined) => Promise<{
        data: {
            date: string;
            is_invite_only: boolean;
            is_private: boolean;
            shared_with_all: boolean;
            id: string;
            account_id: string;
            title?: string | null | undefined;
            lastchanged?: string | undefined;
            destination_selected_api?: string | null | undefined;
            is_stale?: string | undefined;
            is_shared?: string | undefined;
            marked_stale_at?: string | null | undefined;
            label?: string | null | undefined;
            identifier?: string | null | undefined;
            url?: string | undefined;
            groups?: Record<string, unknown>[] | undefined;
            members?: string | undefined;
            permissions?: Record<string, boolean> | undefined;
            public_id?: string | undefined;
            account_public_id?: string | undefined;
            customuser_public_id?: string | undefined;
            implementation_id?: string | undefined;
            profile_id?: string | undefined;
            is_expired?: string | undefined;
            expired_at?: string | null | undefined;
            app_key?: string | undefined;
            app_version?: string | undefined;
        };
    }>;
    listClientCredentials: (input?: ({
        pageSize?: number | undefined;
        maxItems?: number | undefined;
        cursor?: string | undefined;
    } & {
        cursor?: string;
        pageSize?: number;
    } & {
        maxItems?: number;
    }) | undefined) => PaginatedSdkResult<{
        client_id: string;
        name: string;
        allowed_scopes: ("external" | "credentials")[];
        created_at?: string | null | undefined;
        updated_at?: string | undefined;
    }>;
    createClientCredentials: (input: {
        name: string;
        allowedScopes: ("external" | "credentials")[];
        policy?: Record<string, unknown> | undefined;
    }) => Promise<{
        data: {
            client_id: string;
            name: string;
            client_secret: string;
        };
    }>;
    deleteClientCredentials: (input: {
        clientId: string;
    }) => Promise<{
        success: boolean;
    }>;
    getConnectionStartUrl: (input: {
        app: string;
    }) => Promise<{
        data: {
            url: string;
            expiresAt: number;
            startedAt: number;
            app: string;
        };
    }>;
    waitForNewConnection: (input: {
        app: string;
        startedAt: number;
        timeoutMs?: number | undefined;
        pollIntervalMs?: number | undefined;
    }) => Promise<{
        data: {
            id: string;
            app: string;
            title?: string | null | undefined;
        };
    }>;
    createConnection: (input: {
        app: string;
        browser: "never" | "auto" | "always";
        timeoutMs?: number | undefined;
        pollIntervalMs?: number | undefined;
    }) => Promise<{
        data: {
            id: string;
            app: string;
            title?: string | null | undefined;
        };
    }>;
    listActionInputFields: (input: ({
        app: string;
        actionType: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run";
        action: string;
        connection?: string | number | undefined;
        connectionId?: string | number | null | undefined;
        authenticationId?: string | number | null | undefined;
        inputs?: Record<string, unknown> | undefined;
        pageSize?: number | undefined;
        maxItems?: number | undefined;
        cursor?: string | undefined;
    } | {
        appKey: string;
        actionType: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run";
        actionKey: string;
        connection?: string | number | undefined;
        connectionId?: string | number | null | undefined;
        authenticationId?: string | number | null | undefined;
        inputs?: Record<string, unknown> | undefined;
        pageSize?: number | undefined;
        maxItems?: number | undefined;
        cursor?: string | undefined;
    }) & {
        cursor?: string;
        pageSize?: number;
    } & {
        maxItems?: number;
    }) => PaginatedSdkResult<{
        key: string;
        type: "input_field";
        default_value: string;
        depends_on: string[];
        description: string;
        invalidates_input_fields: boolean;
        is_required: boolean;
        placeholder: string;
        title: string;
        value_type: string;
        format?: string | undefined;
        items?: {
            type: string;
        } | undefined;
    } | {
        key: string;
        type: "info_field";
        description: string;
        title?: string | undefined;
    } | FieldsetItem>;
    getActionInputFieldsSchema: (input: {
        app: string;
        actionType: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run";
        action: string;
        connection?: string | number | undefined;
        connectionId?: string | number | null | undefined;
        authenticationId?: string | number | null | undefined;
        inputs?: Record<string, unknown> | undefined;
    } | {
        appKey: string;
        actionType: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run";
        actionKey: string;
        connection?: string | number | undefined;
        connectionId?: string | number | null | undefined;
        authenticationId?: string | number | null | undefined;
        inputs?: Record<string, unknown> | undefined;
    }) => Promise<{
        data: Record<string, unknown>;
    }>;
    listActionInputFieldChoices: (input: ({
        app: string;
        actionType: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run";
        action: string;
        inputField: string;
        connection?: string | number | undefined;
        connectionId?: string | number | null | undefined;
        authenticationId?: string | number | null | undefined;
        inputs?: Record<string, unknown> | undefined;
        page?: number | undefined;
        pageSize?: number | undefined;
        maxItems?: number | undefined;
        cursor?: string | undefined;
    } | {
        appKey: string;
        actionType: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run";
        actionKey: string;
        inputFieldKey: string;
        connection?: string | number | undefined;
        connectionId?: string | number | null | undefined;
        authenticationId?: string | number | null | undefined;
        inputs?: Record<string, unknown> | undefined;
        page?: number | undefined;
        pageSize?: number | undefined;
        maxItems?: number | undefined;
        cursor?: string | undefined;
    }) & {
        cursor?: string;
        pageSize?: number;
    } & {
        maxItems?: number;
    }) => PaginatedSdkResult<{
        key?: string | undefined;
        label?: string | undefined;
        sample?: string | undefined;
        value?: string | undefined;
    }>;
    listInputFields: (input: ({
        app: string;
        actionType: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run";
        action: string;
        connection?: string | number | undefined;
        connectionId?: string | number | null | undefined;
        authenticationId?: string | number | null | undefined;
        inputs?: Record<string, unknown> | undefined;
        pageSize?: number | undefined;
        maxItems?: number | undefined;
        cursor?: string | undefined;
    } | {
        appKey: string;
        actionType: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run";
        actionKey: string;
        connection?: string | number | undefined;
        connectionId?: string | number | null | undefined;
        authenticationId?: string | number | null | undefined;
        inputs?: Record<string, unknown> | undefined;
        pageSize?: number | undefined;
        maxItems?: number | undefined;
        cursor?: string | undefined;
    }) & {
        cursor?: string;
        pageSize?: number;
    } & {
        maxItems?: number;
    }) => PaginatedSdkResult<{
        key: string;
        type: "input_field";
        default_value: string;
        depends_on: string[];
        description: string;
        invalidates_input_fields: boolean;
        is_required: boolean;
        placeholder: string;
        title: string;
        value_type: string;
        format?: string | undefined;
        items?: {
            type: string;
        } | undefined;
    } | {
        key: string;
        type: "info_field";
        description: string;
        title?: string | undefined;
    } | FieldsetItem>;
    getInputFieldsSchema: (input: {
        app: string;
        actionType: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run";
        action: string;
        connection?: string | number | undefined;
        connectionId?: string | number | null | undefined;
        authenticationId?: string | number | null | undefined;
        inputs?: Record<string, unknown> | undefined;
    } | {
        appKey: string;
        actionType: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run";
        actionKey: string;
        connection?: string | number | undefined;
        connectionId?: string | number | null | undefined;
        authenticationId?: string | number | null | undefined;
        inputs?: Record<string, unknown> | undefined;
    }) => Promise<{
        data: Record<string, unknown>;
    }>;
    listInputFieldChoices: (input: ({
        app: string;
        actionType: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run";
        action: string;
        inputField: string;
        connection?: string | number | undefined;
        connectionId?: string | number | null | undefined;
        authenticationId?: string | number | null | undefined;
        inputs?: Record<string, unknown> | undefined;
        page?: number | undefined;
        pageSize?: number | undefined;
        maxItems?: number | undefined;
        cursor?: string | undefined;
    } | {
        appKey: string;
        actionType: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run";
        actionKey: string;
        inputFieldKey: string;
        connection?: string | number | undefined;
        connectionId?: string | number | null | undefined;
        authenticationId?: string | number | null | undefined;
        inputs?: Record<string, unknown> | undefined;
        page?: number | undefined;
        pageSize?: number | undefined;
        maxItems?: number | undefined;
        cursor?: string | undefined;
    }) & {
        cursor?: string;
        pageSize?: number;
    } & {
        maxItems?: number;
    }) => PaginatedSdkResult<{
        key?: string | undefined;
        label?: string | undefined;
        sample?: string | undefined;
        value?: string | undefined;
    }>;
    runAction: (input: ({
        app: string;
        actionType: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run";
        action: string;
        connection?: string | number | undefined;
        connectionId?: string | number | null | undefined;
        authenticationId?: string | number | null | undefined;
        inputs?: Record<string, unknown> | undefined;
        timeoutMs?: number | undefined;
        pageSize?: number | undefined;
        maxItems?: number | undefined;
        cursor?: string | undefined;
    } | {
        appKey: string;
        actionType: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run";
        actionKey: string;
        connection?: string | number | undefined;
        connectionId?: string | number | null | undefined;
        authenticationId?: string | number | null | undefined;
        inputs?: Record<string, unknown> | undefined;
        timeoutMs?: number | undefined;
        pageSize?: number | undefined;
        maxItems?: number | undefined;
        cursor?: string | undefined;
    }) & {
        cursor?: string;
        pageSize?: number;
    } & {
        maxItems?: number;
    }) => PaginatedSdkResult<unknown>;
    fetch: (arg: string | URL, arg_1?: ZapierFetchInitOptions | undefined) => Promise<Response>;
    request: (input: {
        url: string;
        method?: "GET" | "POST" | "DELETE" | "PUT" | "PATCH" | "HEAD" | "OPTIONS" | undefined;
        body?: any;
        connection?: string | number | undefined;
        connectionId?: string | number | undefined;
        authenticationId?: string | number | undefined;
        callbackUrl?: string | undefined;
        headers?: Record<string, string> | [string, string][] | Headers | undefined;
    }) => Promise<Response>;
    apps: ActionProxy & ZapierSdkApps;
    listTriggerInboxes: (input?: ({
        key?: string | undefined;
        name?: string | undefined;
        status?: string | undefined;
        pageSize?: number | undefined;
        maxItems?: number | undefined;
        cursor?: string | undefined;
    } & {
        cursor?: string;
        pageSize?: number;
    } & {
        maxItems?: number;
    }) | undefined) => PaginatedSdkResult<{
        id: string;
        created_at: string;
        key: string | null;
        name: string | null;
        status: string;
        paused_reason: string | null;
        notification_url: string | null;
        subscription: {
            connection_id: string | number | null;
            app_key: string;
            action_key: string;
            inputs: Record<string, unknown>;
        };
    }>;
    createTriggerInbox: (input: {
        app: string;
        action: string;
        key?: string | undefined;
        name?: string | undefined;
        connection?: string | number | null | undefined;
        inputs?: Record<string, unknown> | undefined;
        notificationUrl?: string | undefined;
    }) => Promise<{
        data: {
            id: string;
            created_at: string;
            key: string | null;
            name: string | null;
            status: string;
            paused_reason: string | null;
            notification_url: string | null;
            subscription: {
                connection_id: string | number | null;
                app_key: string;
                action_key: string;
                inputs: Record<string, unknown>;
            };
        };
    }>;
    ensureTriggerInbox: (input: {
        key: string;
        app: string;
        action: string;
        connection?: string | number | null | undefined;
        inputs?: Record<string, unknown> | undefined;
        notificationUrl?: string | undefined;
    } | {
        name: string;
        app: string;
        action: string;
        connection?: string | number | null | undefined;
        inputs?: Record<string, unknown> | undefined;
        notificationUrl?: string | undefined;
    }) => Promise<{
        data: {
            id: string;
            created_at: string;
            key: string | null;
            name: string | null;
            status: string;
            paused_reason: string | null;
            notification_url: string | null;
            subscription: {
                connection_id: string | number | null;
                app_key: string;
                action_key: string;
                inputs: Record<string, unknown>;
            };
        };
    }>;
    getTriggerInbox: (input: {
        inbox: string;
    }) => Promise<{
        data: {
            id: string;
            created_at: string;
            key: string | null;
            name: string | null;
            status: string;
            paused_reason: string | null;
            notification_url: string | null;
            subscription: {
                connection_id: string | number | null;
                app_key: string;
                action_key: string;
                inputs: Record<string, unknown>;
            };
        };
    }>;
    updateTriggerInbox: (input: {
        inbox: string;
        notificationUrl?: string | null | undefined;
    }) => Promise<{
        data: {
            id: string;
            created_at: string;
            key: string | null;
            name: string | null;
            status: string;
            paused_reason: string | null;
            notification_url: string | null;
            subscription: {
                connection_id: string | number | null;
                app_key: string;
                action_key: string;
                inputs: Record<string, unknown>;
            };
        };
    }>;
    deleteTriggerInbox: (input: {
        inbox: string;
    }) => Promise<DeleteTriggerInboxResult>;
    pauseTriggerInbox: (input: {
        inbox: string;
    }) => Promise<{
        data: {
            id: string;
            created_at: string;
            key: string | null;
            name: string | null;
            status: string;
            paused_reason: string | null;
            notification_url: string | null;
            subscription: {
                connection_id: string | number | null;
                app_key: string;
                action_key: string;
                inputs: Record<string, unknown>;
            };
        };
    }>;
    resumeTriggerInbox: (input: {
        inbox: string;
    }) => Promise<{
        data: {
            id: string;
            created_at: string;
            key: string | null;
            name: string | null;
            status: string;
            paused_reason: string | null;
            notification_url: string | null;
            subscription: {
                connection_id: string | number | null;
                app_key: string;
                action_key: string;
                inputs: Record<string, unknown>;
            };
        };
    }>;
    listTriggerInboxMessages: (input: {
        inbox: string;
        pageSize?: number | undefined;
        maxItems?: number | undefined;
        cursor?: string | undefined;
    } & {
        cursor?: string;
        pageSize?: number;
    } & {
        maxItems?: number;
    }) => PaginatedSdkResult<{
        id: string;
        created_at: string;
        status: string;
        message_attributes: {
            lease_count: number;
            error_message: string | null;
            possible_duplicate_data: boolean;
        };
    }>;
    leaseTriggerInboxMessages: (input: {
        inbox: string;
        leaseLimit?: number | undefined;
        leaseSeconds?: number | undefined;
        signal?: AbortSignal | undefined;
    }) => Promise<{
        data: {
            lease_id: string | null;
            leased_until: string | null;
            results: {
                id: string;
                created_at: string;
                status: string;
                message_attributes: {
                    lease_count: number;
                    error_message: string | null;
                    possible_duplicate_data: boolean;
                };
                payload: Record<string, unknown>;
            }[];
            inbox_attributes: {
                status: string;
                paused_reason: string | null;
            };
        };
    }>;
    ackTriggerInboxMessages: (input: {
        inbox: string;
        lease: string;
        messages?: string[] | undefined;
    }) => Promise<{
        data: {
            acked_id: string | null;
            results: {
                id: string;
                created_at: string;
                status: string;
                message_attributes: {
                    lease_count: number;
                    error_message: string | null;
                    possible_duplicate_data: boolean;
                };
            }[];
        };
    }>;
    releaseTriggerInboxMessages: (input: {
        inbox: string;
        lease: string;
        messages?: string[] | undefined;
    }) => Promise<{
        data: {
            released_id: string | null;
            results: {
                id: string;
                created_at: string;
                status: string;
                message_attributes: {
                    lease_count: number;
                    error_message: string | null;
                    possible_duplicate_data: boolean;
                };
            }[];
        };
    }>;
    drainTriggerInbox: (input: TriggerInboxCommandSharedFields & {
        maxMessages?: number;
    }) => Promise<void>;
    watchTriggerInbox: (input: TriggerInboxCommandSharedFields & {
        maxDrainIntervalSeconds?: number;
    }) => Promise<void>;
    listTriggers: (input: {
        app: string;
        pageSize?: number | undefined;
        maxItems?: number | undefined;
        cursor?: string | undefined;
    } & {
        cursor?: string;
        pageSize?: number;
    } & {
        maxItems?: number;
    }) => PaginatedSdkResult<{
        description: string;
        key: string;
        app_key: string;
        action_type: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run";
        title: string;
        type: "action";
        is_hidden?: boolean | undefined;
        id?: string | undefined;
        is_important?: boolean | undefined;
        app_version?: string | undefined;
    }>;
    listTriggerInputFields: (input: {
        app: string;
        action: string;
        connection?: string | number | undefined;
        inputs?: Record<string, unknown> | undefined;
        pageSize?: number | undefined;
        maxItems?: number | undefined;
        cursor?: string | undefined;
    } & {
        cursor?: string;
        pageSize?: number;
    } & {
        maxItems?: number;
    }) => PaginatedSdkResult<{
        key: string;
        type: "input_field";
        default_value: string;
        depends_on: string[];
        description: string;
        invalidates_input_fields: boolean;
        is_required: boolean;
        placeholder: string;
        title: string;
        value_type: string;
        format?: string | undefined;
        items?: {
            type: string;
        } | undefined;
    } | {
        key: string;
        type: "info_field";
        description: string;
        title?: string | undefined;
    } | FieldsetItem>;
    listTriggerInputFieldChoices: (input: {
        app: string;
        action: string;
        inputField: string;
        connection?: string | number | undefined;
        inputs?: Record<string, unknown> | undefined;
        page?: number | undefined;
        pageSize?: number | undefined;
        maxItems?: number | undefined;
        cursor?: string | undefined;
    } & {
        cursor?: string;
        pageSize?: number;
    } & {
        maxItems?: number;
    }) => PaginatedSdkResult<{
        key?: string | undefined;
        label?: string | undefined;
        sample?: string | undefined;
        value?: string | undefined;
    }>;
    getTriggerInputFieldsSchema: (input: {
        app: string;
        action: string;
        connection?: string | number | undefined;
        inputs?: Record<string, unknown> | undefined;
    }) => Promise<{
        data: Record<string, unknown>;
    }>;
    listTables: (input?: ({
        tables?: string[] | undefined;
        tableIds?: string[] | undefined;
        kind?: "table" | "virtual_table" | "both" | undefined;
        search?: string | undefined;
        owner?: string | undefined;
        includeShared?: boolean | undefined;
        pageSize?: number | undefined;
        maxItems?: number | undefined;
        cursor?: string | undefined;
    } & {
        cursor?: string;
        pageSize?: number;
    } & {
        maxItems?: number;
    }) | undefined) => PaginatedSdkResult<{
        id: string;
        name: string;
        created_at: string;
        edited_at: string;
        kind: "table" | "virtual_table";
        account_id: string;
        profile_id: string;
        description?: string | undefined;
        parent_table_id?: string | undefined;
    }>;
    getTable: (input: {
        table: string;
    } | {
        tableId: string;
    }) => Promise<{
        data: {
            id: string;
            name: string;
            created_at: string;
            edited_at: string;
            kind: "table" | "virtual_table";
            account_id: string;
            profile_id: string;
            description?: string | undefined;
            parent_table_id?: string | undefined;
        };
    }>;
    deleteTable: (input: {
        table: string;
    } | {
        tableId: string;
    }) => Promise<{
        success: boolean;
    }>;
    createTable: (input: {
        name: string;
        description?: string | undefined;
    }) => Promise<{
        data: {
            id: string;
            name: string;
            created_at: string;
            edited_at: string;
            kind: "table" | "virtual_table";
            account_id: string;
            profile_id: string;
            description?: string | undefined;
            parent_table_id?: string | undefined;
        };
    }>;
    listTableFields: (input: {
        table: string;
        fields?: (string | number)[] | undefined;
        fieldKeys?: (string | number)[] | undefined;
        trash?: "include" | "exclude" | "only" | undefined;
    } | {
        tableId: string;
        fields?: (string | number)[] | undefined;
        fieldKeys?: (string | number)[] | undefined;
        trash?: "include" | "exclude" | "only" | undefined;
    }) => Promise<{
        data: {
            id: string;
            type: "string" | "number" | "boolean" | "text" | "datetime" | "decimal" | "json" | "email" | "link" | "uuid" | "multiple_string" | "labeled_string" | "multiple_labeled_string" | "multiple_text" | "multiple_boolean" | "multiple_number" | "multiple_decimal" | "multiple_datetime" | "multiple_uuid" | "multiple_json" | "formula" | "button_trigger_zap" | "button_continue_zap" | "multiple_email" | "multiple_link" | "currency" | "phone_number" | "ai_formula" | "linked_record" | "multiple_linked_record";
            name: string;
            created_at?: string | undefined;
            edited_at?: string | undefined;
            options?: Record<string, unknown> | undefined;
            config?: Record<string, unknown> | undefined;
            deleted_at?: string | null | undefined;
        }[];
    }>;
    createTableFields: (input: {
        table: string;
        fields: {
            type: "string" | "number" | "boolean" | "text" | "datetime" | "decimal" | "json" | "email" | "link" | "uuid" | "multiple_string" | "labeled_string" | "multiple_labeled_string" | "multiple_text" | "multiple_boolean" | "multiple_number" | "multiple_decimal" | "multiple_datetime" | "multiple_uuid" | "multiple_json" | "formula" | "button_trigger_zap" | "button_continue_zap" | "multiple_email" | "multiple_link" | "currency" | "phone_number" | "ai_formula" | "linked_record" | "multiple_linked_record";
            name: string;
            options?: Record<string, unknown> | undefined;
            config?: Record<string, unknown> | undefined;
        }[];
    } | {
        tableId: string;
        fields: {
            type: "string" | "number" | "boolean" | "text" | "datetime" | "decimal" | "json" | "email" | "link" | "uuid" | "multiple_string" | "labeled_string" | "multiple_labeled_string" | "multiple_text" | "multiple_boolean" | "multiple_number" | "multiple_decimal" | "multiple_datetime" | "multiple_uuid" | "multiple_json" | "formula" | "button_trigger_zap" | "button_continue_zap" | "multiple_email" | "multiple_link" | "currency" | "phone_number" | "ai_formula" | "linked_record" | "multiple_linked_record";
            name: string;
            options?: Record<string, unknown> | undefined;
            config?: Record<string, unknown> | undefined;
        }[];
    }) => Promise<{
        data: {
            id: string;
            type: "string" | "number" | "boolean" | "text" | "datetime" | "decimal" | "json" | "email" | "link" | "uuid" | "multiple_string" | "labeled_string" | "multiple_labeled_string" | "multiple_text" | "multiple_boolean" | "multiple_number" | "multiple_decimal" | "multiple_datetime" | "multiple_uuid" | "multiple_json" | "formula" | "button_trigger_zap" | "button_continue_zap" | "multiple_email" | "multiple_link" | "currency" | "phone_number" | "ai_formula" | "linked_record" | "multiple_linked_record";
            name: string;
            created_at?: string | undefined;
            edited_at?: string | undefined;
            options?: Record<string, unknown> | undefined;
            config?: Record<string, unknown> | undefined;
            deleted_at?: string | null | undefined;
        }[];
    }>;
    deleteTableFields: (input: {
        table: string;
        fields: (string | number)[];
    } | {
        tableId: string;
        fieldKeys: (string | number)[];
    }) => Promise<{
        success: boolean;
    }>;
    listTableRecords: (input: ({
        table: string;
        keyMode: "names" | "ids";
        filters?: {
            fieldKey: string;
            operator: "search" | "in" | "exact" | "different" | "contains" | "icontains" | "gte" | "gt" | "lt" | "lte" | "range" | "isnull" | "startswith" | "is_within";
            value?: unknown;
        }[] | undefined;
        sort?: {
            fieldKey: string;
            direction: "asc" | "desc";
        } | undefined;
        pageSize?: number | undefined;
        maxItems?: number | undefined;
        cursor?: string | undefined;
        trash?: "include" | "exclude" | "only" | undefined;
    } | {
        tableId: string;
        keyMode: "names" | "ids";
        filters?: {
            fieldKey: string;
            operator: "search" | "in" | "exact" | "different" | "contains" | "icontains" | "gte" | "gt" | "lt" | "lte" | "range" | "isnull" | "startswith" | "is_within";
            value?: unknown;
        }[] | undefined;
        sort?: {
            fieldKey: string;
            direction: "asc" | "desc";
        } | undefined;
        pageSize?: number | undefined;
        maxItems?: number | undefined;
        cursor?: string | undefined;
        trash?: "include" | "exclude" | "only" | undefined;
    }) & {
        cursor?: string;
        pageSize?: number;
    } & {
        maxItems?: number;
    }) => PaginatedSdkResult<{
        data: Record<string, unknown>;
        id: string;
        created_at: string;
        edited_at: string;
        deleted_at?: string | null | undefined;
    }>;
    getTableRecord: (input: {
        table: string;
        record: string;
        keyMode: "names" | "ids";
    } | {
        tableId: string;
        recordId: string;
        keyMode: "names" | "ids";
    }) => Promise<{
        data: {
            data: Record<string, unknown>;
            id: string;
            created_at: string;
            edited_at: string;
            deleted_at?: string | null | undefined;
        };
    }>;
    createTableRecords: (input: {
        table: string;
        records: {
            data: Record<string, unknown>;
        }[];
        keyMode: "names" | "ids";
    } | {
        tableId: string;
        records: {
            data: Record<string, unknown>;
        }[];
        keyMode: "names" | "ids";
    }) => Promise<{
        data: {
            data: Record<string, unknown>;
            id: string;
            created_at: string;
            edited_at: string;
            deleted_at?: string | null | undefined;
        }[];
    }>;
    deleteTableRecords: (input: {
        table: string;
        records: string[];
    } | {
        tableId: string;
        recordIds: string[];
    }) => Promise<{
        success: boolean;
    }>;
    updateTableRecords: (input: {
        table: string;
        records: {
            id: string;
            data: Record<string, unknown>;
        }[];
        keyMode: "names" | "ids";
    } | {
        tableId: string;
        records: {
            id: string;
            data: Record<string, unknown>;
        }[];
        keyMode: "names" | "ids";
    }) => Promise<{
        data: {
            data: Record<string, unknown>;
            id: string;
            created_at: string;
            edited_at: string;
            deleted_at?: string | null | undefined;
        }[];
    }>;
} & {
    context: SdkContext;
};
/**
 * The root plugin of the Zapier SDK: every plugin authored with
 * `defineMethod` / `defineProperty` / `definePlugin`. Heads build on it with
 * `createSdk(zapierSdkPlugin, { configuration })` (or wrap it in their own
 * aggregate, as the CLI does), so adding a plugin only edits this aggregate's
 * `exports`, not the heads.
 */
declare const zapierSdkPlugin: AggregatePlugin<"sdk", {
    getRegistry: MethodPlugin<"getRegistry", {
        package?: string | undefined;
    } | undefined, RegistryResult<any>, readonly []> & LeafSummary<"kitcore", "getRegistry", readonly [PropertyPlugin<"context", SdkContext>]>;
} & {
    getProfile: MethodPlugin<"getProfile", Record<string, never> | undefined, Promise<{
        data: {
            id: string;
            first_name: string;
            last_name: string;
            full_name: string;
            email: string;
            email_confirmed: boolean;
            timezone: string;
        };
    }>, readonly []> & LeafSummary<"", "getProfile", readonly [PropertyPlugin<"api", ApiClient> & PluginSummary<"zapier/api", never>]>;
} & {
    listApps: MethodPlugin<"listApps", {
        search?: string | undefined;
        apps?: string[] | undefined;
        appKeys?: string[] | undefined;
        pageSize?: number | undefined;
        maxItems?: number | undefined;
        cursor?: string | undefined;
    } & {
        cursor?: string;
        pageSize?: number;
    } & {
        maxItems?: number;
    }, PaginatedSdkResult<{
        slug: string;
        title: string;
        key: string;
        implementation_id: string;
        description?: string | undefined;
        is_hidden?: boolean | undefined;
        auth_type?: string | undefined;
        actions?: {
            read?: number | undefined;
            read_bulk?: number | undefined;
            write?: number | undefined;
            search?: number | undefined;
            search_or_write?: number | undefined;
            search_and_write?: number | undefined;
            filter?: number | undefined;
        } | undefined;
        is_deprecated?: boolean | undefined;
        is_beta?: boolean | undefined;
        is_premium?: boolean | undefined;
        age_in_days?: number | undefined;
        banner?: string | undefined;
        categories?: {
            id: number;
            name: string;
            slug: string;
        }[] | undefined;
        images?: {
            url_16x16?: string | undefined;
            url_32x32?: string | undefined;
            url_64x64?: string | undefined;
            url_128x128?: string | undefined;
        } | undefined;
        popularity?: number | undefined;
        has_filters?: boolean | undefined;
        has_reads?: boolean | undefined;
        has_searches?: boolean | undefined;
        has_searches_or_writes?: boolean | undefined;
        has_upfront_fields?: boolean | undefined;
        has_writes?: boolean | undefined;
        is_built_in?: boolean | undefined;
        is_featured?: boolean | undefined;
        is_invite?: boolean | undefined;
        is_public?: boolean | undefined;
        is_upcoming?: boolean | undefined;
        visibility?: string | undefined;
        primary_color?: string | undefined;
        secondary_color?: string | undefined;
        classification?: string | undefined;
        api_docs_url?: string | undefined;
        image?: string | undefined;
        version?: string | undefined;
    }>, readonly []> & LeafSummary<"", "listApps", readonly [PropertyPlugin<"manifest", ManifestProvider> & PluginSummary<"zapier/manifest", never>, PropertyPlugin<"api", ApiClient> & PluginSummary<"zapier/api", never>]>;
} & {
    getApp: MethodPlugin<"getApp", {
        app: string;
    } | {
        appKey: string;
    }, Promise<{
        data: {
            slug: string;
            title: string;
            key: string;
            implementation_id: string;
            description?: string | undefined;
            is_hidden?: boolean | undefined;
            auth_type?: string | undefined;
            actions?: {
                read?: number | undefined;
                read_bulk?: number | undefined;
                write?: number | undefined;
                search?: number | undefined;
                search_or_write?: number | undefined;
                search_and_write?: number | undefined;
                filter?: number | undefined;
            } | undefined;
            is_deprecated?: boolean | undefined;
            is_beta?: boolean | undefined;
            is_premium?: boolean | undefined;
            age_in_days?: number | undefined;
            banner?: string | undefined;
            categories?: {
                id: number;
                name: string;
                slug: string;
            }[] | undefined;
            images?: {
                url_16x16?: string | undefined;
                url_32x32?: string | undefined;
                url_64x64?: string | undefined;
                url_128x128?: string | undefined;
            } | undefined;
            popularity?: number | undefined;
            has_filters?: boolean | undefined;
            has_reads?: boolean | undefined;
            has_searches?: boolean | undefined;
            has_searches_or_writes?: boolean | undefined;
            has_upfront_fields?: boolean | undefined;
            has_writes?: boolean | undefined;
            is_built_in?: boolean | undefined;
            is_featured?: boolean | undefined;
            is_invite?: boolean | undefined;
            is_public?: boolean | undefined;
            is_upcoming?: boolean | undefined;
            visibility?: string | undefined;
            primary_color?: string | undefined;
            secondary_color?: string | undefined;
            classification?: string | undefined;
            api_docs_url?: string | undefined;
            image?: string | undefined;
            version?: string | undefined;
        };
    }>, readonly []> & LeafSummary<"", "getApp", readonly [MethodPlugin<"listApps", {
        search?: string | undefined;
        apps?: string[] | undefined;
        appKeys?: string[] | undefined;
        pageSize?: number | undefined;
        maxItems?: number | undefined;
        cursor?: string | undefined;
    } & {
        cursor?: string;
        pageSize?: number;
    } & {
        maxItems?: number;
    }, PaginatedSdkResult<{
        slug: string;
        title: string;
        key: string;
        implementation_id: string;
        description?: string | undefined;
        is_hidden?: boolean | undefined;
        auth_type?: string | undefined;
        actions?: {
            read?: number | undefined;
            read_bulk?: number | undefined;
            write?: number | undefined;
            search?: number | undefined;
            search_or_write?: number | undefined;
            search_and_write?: number | undefined;
            filter?: number | undefined;
        } | undefined;
        is_deprecated?: boolean | undefined;
        is_beta?: boolean | undefined;
        is_premium?: boolean | undefined;
        age_in_days?: number | undefined;
        banner?: string | undefined;
        categories?: {
            id: number;
            name: string;
            slug: string;
        }[] | undefined;
        images?: {
            url_16x16?: string | undefined;
            url_32x32?: string | undefined;
            url_64x64?: string | undefined;
            url_128x128?: string | undefined;
        } | undefined;
        popularity?: number | undefined;
        has_filters?: boolean | undefined;
        has_reads?: boolean | undefined;
        has_searches?: boolean | undefined;
        has_searches_or_writes?: boolean | undefined;
        has_upfront_fields?: boolean | undefined;
        has_writes?: boolean | undefined;
        is_built_in?: boolean | undefined;
        is_featured?: boolean | undefined;
        is_invite?: boolean | undefined;
        is_public?: boolean | undefined;
        is_upcoming?: boolean | undefined;
        visibility?: string | undefined;
        primary_color?: string | undefined;
        secondary_color?: string | undefined;
        classification?: string | undefined;
        api_docs_url?: string | undefined;
        image?: string | undefined;
        version?: string | undefined;
    }>, readonly []> & LeafSummary<"", "listApps", readonly [PropertyPlugin<"manifest", ManifestProvider> & PluginSummary<"zapier/manifest", never>, PropertyPlugin<"api", ApiClient> & PluginSummary<"zapier/api", never>]>]>;
} & {
    listActions: MethodPlugin<"listActions", ({
        app: string;
        actionType?: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run" | undefined;
        pageSize?: number | undefined;
        maxItems?: number | undefined;
        cursor?: string | undefined;
    } | {
        appKey: string;
        actionType?: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run" | undefined;
        pageSize?: number | undefined;
        maxItems?: number | undefined;
        cursor?: string | undefined;
    }) & {
        cursor?: string;
        pageSize?: number;
    } & {
        maxItems?: number;
    }, PaginatedSdkResult<{
        description: string;
        key: string;
        app_key: string;
        action_type: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run";
        title: string;
        type: "action";
        is_hidden?: boolean | undefined;
        id?: string | undefined;
        is_important?: boolean | undefined;
        app_version?: string | undefined;
    }>, readonly []> & LeafSummary<"", "listActions", readonly [PropertyPlugin<"manifest", ManifestProvider> & PluginSummary<"zapier/manifest", never>, PropertyPlugin<"api", ApiClient> & PluginSummary<"zapier/api", never>]>;
} & {
    getAction: MethodPlugin<"getAction", {
        app: string;
        actionType: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run";
        action: string;
    } | {
        appKey: string;
        actionType: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run";
        actionKey: string;
    }, Promise<{
        data: {
            description: string;
            key: string;
            app_key: string;
            action_type: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run";
            title: string;
            type: "action";
            is_hidden?: boolean | undefined;
            id?: string | undefined;
            is_important?: boolean | undefined;
            app_version?: string | undefined;
        };
    }>, readonly []> & LeafSummary<"", "getAction", readonly [MethodPlugin<"listActions", ({
        app: string;
        actionType?: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run" | undefined;
        pageSize?: number | undefined;
        maxItems?: number | undefined;
        cursor?: string | undefined;
    } | {
        appKey: string;
        actionType?: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run" | undefined;
        pageSize?: number | undefined;
        maxItems?: number | undefined;
        cursor?: string | undefined;
    }) & {
        cursor?: string;
        pageSize?: number;
    } & {
        maxItems?: number;
    }, PaginatedSdkResult<{
        description: string;
        key: string;
        app_key: string;
        action_type: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run";
        title: string;
        type: "action";
        is_hidden?: boolean | undefined;
        id?: string | undefined;
        is_important?: boolean | undefined;
        app_version?: string | undefined;
    }>, readonly []> & LeafSummary<"", "listActions", readonly [PropertyPlugin<"manifest", ManifestProvider> & PluginSummary<"zapier/manifest", never>, PropertyPlugin<"api", ApiClient> & PluginSummary<"zapier/api", never>]>]>;
} & {
    listConnections: MethodPlugin<"listConnections", {
        title?: string | undefined;
        search?: string | undefined;
        owner?: string | undefined;
        app?: string | undefined;
        appKey?: string | undefined;
        connections?: string[] | undefined;
        connectionIds?: string[] | undefined;
        authenticationIds?: string[] | undefined;
        account?: string | undefined;
        accountId?: string | undefined;
        includeShared?: boolean | undefined;
        isExpired?: boolean | undefined;
        expired?: boolean | undefined;
        pageSize?: number | undefined;
        maxItems?: number | undefined;
        cursor?: string | undefined;
    } & {
        cursor?: string;
        pageSize?: number;
    } & {
        maxItems?: number;
    }, PaginatedSdkResult<{
        date: string;
        is_invite_only: boolean;
        is_private: boolean;
        shared_with_all: boolean;
        id: string;
        account_id: string;
        title?: string | null | undefined;
        lastchanged?: string | undefined;
        destination_selected_api?: string | null | undefined;
        is_stale?: string | undefined;
        is_shared?: string | undefined;
        marked_stale_at?: string | null | undefined;
        label?: string | null | undefined;
        identifier?: string | null | undefined;
        url?: string | undefined;
        groups?: Record<string, unknown>[] | undefined;
        members?: string | undefined;
        permissions?: Record<string, boolean> | undefined;
        public_id?: string | undefined;
        account_public_id?: string | undefined;
        customuser_public_id?: string | undefined;
        implementation_id?: string | undefined;
        profile_id?: string | undefined;
        is_expired?: string | undefined;
        expired_at?: string | null | undefined;
        app_key?: string | undefined;
        app_version?: string | undefined;
    }>, readonly []> & LeafSummary<"", "listConnections", readonly [PropertyPlugin<"connections", ConnectionsProvider> & PluginSummary<"zapier/connections", never>, PropertyPlugin<"api", ApiClient> & PluginSummary<"zapier/api", never>, PropertyPlugin<"manifest", ManifestProvider> & PluginSummary<"zapier/manifest", never>, PropertyPlugin<"capabilities", CapabilitiesContext> & PluginSummary<"zapier/capabilities", never>]>;
} & {
    getConnection: MethodPlugin<"getConnection", {
        connection: string | number;
    } | {
        connectionId: string | number;
    } | {
        authenticationId: string | number;
    }, Promise<{
        data: {
            date: string;
            is_invite_only: boolean;
            is_private: boolean;
            shared_with_all: boolean;
            id: string;
            account_id: string;
            title?: string | null | undefined;
            lastchanged?: string | undefined;
            destination_selected_api?: string | null | undefined;
            is_stale?: string | undefined;
            is_shared?: string | undefined;
            marked_stale_at?: string | null | undefined;
            label?: string | null | undefined;
            identifier?: string | null | undefined;
            url?: string | undefined;
            groups?: Record<string, unknown>[] | undefined;
            members?: string | undefined;
            permissions?: Record<string, boolean> | undefined;
            public_id?: string | undefined;
            account_public_id?: string | undefined;
            customuser_public_id?: string | undefined;
            implementation_id?: string | undefined;
            profile_id?: string | undefined;
            is_expired?: string | undefined;
            expired_at?: string | null | undefined;
            app_key?: string | undefined;
            app_version?: string | undefined;
        };
    }>, readonly []> & LeafSummary<"", "getConnection", readonly [PropertyPlugin<"api", ApiClient> & PluginSummary<"zapier/api", never>]>;
} & {
    findFirstConnection: MethodPlugin<"findFirstConnection", {
        title?: string | undefined;
        search?: string | undefined;
        appKey?: string | undefined;
        app?: string | undefined;
        owner?: string | undefined;
        account?: string | undefined;
        accountId?: string | undefined;
        includeShared?: boolean | undefined;
        isExpired?: boolean | undefined;
        expired?: boolean | undefined;
    }, Promise<{
        data: {
            date: string;
            is_invite_only: boolean;
            is_private: boolean;
            shared_with_all: boolean;
            id: string;
            account_id: string;
            title?: string | null | undefined;
            lastchanged?: string | undefined;
            destination_selected_api?: string | null | undefined;
            is_stale?: string | undefined;
            is_shared?: string | undefined;
            marked_stale_at?: string | null | undefined;
            label?: string | null | undefined;
            identifier?: string | null | undefined;
            url?: string | undefined;
            groups?: Record<string, unknown>[] | undefined;
            members?: string | undefined;
            permissions?: Record<string, boolean> | undefined;
            public_id?: string | undefined;
            account_public_id?: string | undefined;
            customuser_public_id?: string | undefined;
            implementation_id?: string | undefined;
            profile_id?: string | undefined;
            is_expired?: string | undefined;
            expired_at?: string | null | undefined;
            app_key?: string | undefined;
            app_version?: string | undefined;
        };
    }>, readonly []> & LeafSummary<"", "findFirstConnection", readonly [MethodPlugin<"listConnections", {
        title?: string | undefined;
        search?: string | undefined;
        owner?: string | undefined;
        app?: string | undefined;
        appKey?: string | undefined;
        connections?: string[] | undefined;
        connectionIds?: string[] | undefined;
        authenticationIds?: string[] | undefined;
        account?: string | undefined;
        accountId?: string | undefined;
        includeShared?: boolean | undefined;
        isExpired?: boolean | undefined;
        expired?: boolean | undefined;
        pageSize?: number | undefined;
        maxItems?: number | undefined;
        cursor?: string | undefined;
    } & {
        cursor?: string;
        pageSize?: number;
    } & {
        maxItems?: number;
    }, PaginatedSdkResult<{
        date: string;
        is_invite_only: boolean;
        is_private: boolean;
        shared_with_all: boolean;
        id: string;
        account_id: string;
        title?: string | null | undefined;
        lastchanged?: string | undefined;
        destination_selected_api?: string | null | undefined;
        is_stale?: string | undefined;
        is_shared?: string | undefined;
        marked_stale_at?: string | null | undefined;
        label?: string | null | undefined;
        identifier?: string | null | undefined;
        url?: string | undefined;
        groups?: Record<string, unknown>[] | undefined;
        members?: string | undefined;
        permissions?: Record<string, boolean> | undefined;
        public_id?: string | undefined;
        account_public_id?: string | undefined;
        customuser_public_id?: string | undefined;
        implementation_id?: string | undefined;
        profile_id?: string | undefined;
        is_expired?: string | undefined;
        expired_at?: string | null | undefined;
        app_key?: string | undefined;
        app_version?: string | undefined;
    }>, readonly []> & LeafSummary<"", "listConnections", readonly [PropertyPlugin<"connections", ConnectionsProvider> & PluginSummary<"zapier/connections", never>, PropertyPlugin<"api", ApiClient> & PluginSummary<"zapier/api", never>, PropertyPlugin<"manifest", ManifestProvider> & PluginSummary<"zapier/manifest", never>, PropertyPlugin<"capabilities", CapabilitiesContext> & PluginSummary<"zapier/capabilities", never>]>]>;
} & {
    findUniqueConnection: MethodPlugin<"findUniqueConnection", {
        title?: string | undefined;
        search?: string | undefined;
        appKey?: string | undefined;
        app?: string | undefined;
        owner?: string | undefined;
        account?: string | undefined;
        accountId?: string | undefined;
        includeShared?: boolean | undefined;
        isExpired?: boolean | undefined;
        expired?: boolean | undefined;
    }, Promise<{
        data: {
            date: string;
            is_invite_only: boolean;
            is_private: boolean;
            shared_with_all: boolean;
            id: string;
            account_id: string;
            title?: string | null | undefined;
            lastchanged?: string | undefined;
            destination_selected_api?: string | null | undefined;
            is_stale?: string | undefined;
            is_shared?: string | undefined;
            marked_stale_at?: string | null | undefined;
            label?: string | null | undefined;
            identifier?: string | null | undefined;
            url?: string | undefined;
            groups?: Record<string, unknown>[] | undefined;
            members?: string | undefined;
            permissions?: Record<string, boolean> | undefined;
            public_id?: string | undefined;
            account_public_id?: string | undefined;
            customuser_public_id?: string | undefined;
            implementation_id?: string | undefined;
            profile_id?: string | undefined;
            is_expired?: string | undefined;
            expired_at?: string | null | undefined;
            app_key?: string | undefined;
            app_version?: string | undefined;
        };
    }>, readonly []> & LeafSummary<"", "findUniqueConnection", readonly [MethodPlugin<"listConnections", {
        title?: string | undefined;
        search?: string | undefined;
        owner?: string | undefined;
        app?: string | undefined;
        appKey?: string | undefined;
        connections?: string[] | undefined;
        connectionIds?: string[] | undefined;
        authenticationIds?: string[] | undefined;
        account?: string | undefined;
        accountId?: string | undefined;
        includeShared?: boolean | undefined;
        isExpired?: boolean | undefined;
        expired?: boolean | undefined;
        pageSize?: number | undefined;
        maxItems?: number | undefined;
        cursor?: string | undefined;
    } & {
        cursor?: string;
        pageSize?: number;
    } & {
        maxItems?: number;
    }, PaginatedSdkResult<{
        date: string;
        is_invite_only: boolean;
        is_private: boolean;
        shared_with_all: boolean;
        id: string;
        account_id: string;
        title?: string | null | undefined;
        lastchanged?: string | undefined;
        destination_selected_api?: string | null | undefined;
        is_stale?: string | undefined;
        is_shared?: string | undefined;
        marked_stale_at?: string | null | undefined;
        label?: string | null | undefined;
        identifier?: string | null | undefined;
        url?: string | undefined;
        groups?: Record<string, unknown>[] | undefined;
        members?: string | undefined;
        permissions?: Record<string, boolean> | undefined;
        public_id?: string | undefined;
        account_public_id?: string | undefined;
        customuser_public_id?: string | undefined;
        implementation_id?: string | undefined;
        profile_id?: string | undefined;
        is_expired?: string | undefined;
        expired_at?: string | null | undefined;
        app_key?: string | undefined;
        app_version?: string | undefined;
    }>, readonly []> & LeafSummary<"", "listConnections", readonly [PropertyPlugin<"connections", ConnectionsProvider> & PluginSummary<"zapier/connections", never>, PropertyPlugin<"api", ApiClient> & PluginSummary<"zapier/api", never>, PropertyPlugin<"manifest", ManifestProvider> & PluginSummary<"zapier/manifest", never>, PropertyPlugin<"capabilities", CapabilitiesContext> & PluginSummary<"zapier/capabilities", never>]>]>;
} & {
    listAuthentications: MethodPlugin<"listAuthentications", {
        title?: string | undefined;
        search?: string | undefined;
        owner?: string | undefined;
        app?: string | undefined;
        appKey?: string | undefined;
        connections?: string[] | undefined;
        connectionIds?: string[] | undefined;
        authenticationIds?: string[] | undefined;
        account?: string | undefined;
        accountId?: string | undefined;
        includeShared?: boolean | undefined;
        isExpired?: boolean | undefined;
        expired?: boolean | undefined;
        pageSize?: number | undefined;
        maxItems?: number | undefined;
        cursor?: string | undefined;
    } & {
        cursor?: string;
        pageSize?: number;
    } & {
        maxItems?: number;
    }, PaginatedSdkResult<{
        date: string;
        is_invite_only: boolean;
        is_private: boolean;
        shared_with_all: boolean;
        id: string;
        account_id: string;
        title?: string | null | undefined;
        lastchanged?: string | undefined;
        destination_selected_api?: string | null | undefined;
        is_stale?: string | undefined;
        is_shared?: string | undefined;
        marked_stale_at?: string | null | undefined;
        label?: string | null | undefined;
        identifier?: string | null | undefined;
        url?: string | undefined;
        groups?: Record<string, unknown>[] | undefined;
        members?: string | undefined;
        permissions?: Record<string, boolean> | undefined;
        public_id?: string | undefined;
        account_public_id?: string | undefined;
        customuser_public_id?: string | undefined;
        implementation_id?: string | undefined;
        profile_id?: string | undefined;
        is_expired?: string | undefined;
        expired_at?: string | null | undefined;
        app_key?: string | undefined;
        app_version?: string | undefined;
    }>, readonly []> & LeafSummary<"", "listAuthentications", readonly [MethodPlugin<"listConnections", {
        title?: string | undefined;
        search?: string | undefined;
        owner?: string | undefined;
        app?: string | undefined;
        appKey?: string | undefined;
        connections?: string[] | undefined;
        connectionIds?: string[] | undefined;
        authenticationIds?: string[] | undefined;
        account?: string | undefined;
        accountId?: string | undefined;
        includeShared?: boolean | undefined;
        isExpired?: boolean | undefined;
        expired?: boolean | undefined;
        pageSize?: number | undefined;
        maxItems?: number | undefined;
        cursor?: string | undefined;
    } & {
        cursor?: string;
        pageSize?: number;
    } & {
        maxItems?: number;
    }, PaginatedSdkResult<{
        date: string;
        is_invite_only: boolean;
        is_private: boolean;
        shared_with_all: boolean;
        id: string;
        account_id: string;
        title?: string | null | undefined;
        lastchanged?: string | undefined;
        destination_selected_api?: string | null | undefined;
        is_stale?: string | undefined;
        is_shared?: string | undefined;
        marked_stale_at?: string | null | undefined;
        label?: string | null | undefined;
        identifier?: string | null | undefined;
        url?: string | undefined;
        groups?: Record<string, unknown>[] | undefined;
        members?: string | undefined;
        permissions?: Record<string, boolean> | undefined;
        public_id?: string | undefined;
        account_public_id?: string | undefined;
        customuser_public_id?: string | undefined;
        implementation_id?: string | undefined;
        profile_id?: string | undefined;
        is_expired?: string | undefined;
        expired_at?: string | null | undefined;
        app_key?: string | undefined;
        app_version?: string | undefined;
    }>, readonly []> & LeafSummary<"", "listConnections", readonly [PropertyPlugin<"connections", ConnectionsProvider> & PluginSummary<"zapier/connections", never>, PropertyPlugin<"api", ApiClient> & PluginSummary<"zapier/api", never>, PropertyPlugin<"manifest", ManifestProvider> & PluginSummary<"zapier/manifest", never>, PropertyPlugin<"capabilities", CapabilitiesContext> & PluginSummary<"zapier/capabilities", never>]>]>;
} & {
    getAuthentication: MethodPlugin<"getAuthentication", {
        connection: string | number;
    } | {
        connectionId: string | number;
    } | {
        authenticationId: string | number;
    }, Promise<{
        data: {
            date: string;
            is_invite_only: boolean;
            is_private: boolean;
            shared_with_all: boolean;
            id: string;
            account_id: string;
            title?: string | null | undefined;
            lastchanged?: string | undefined;
            destination_selected_api?: string | null | undefined;
            is_stale?: string | undefined;
            is_shared?: string | undefined;
            marked_stale_at?: string | null | undefined;
            label?: string | null | undefined;
            identifier?: string | null | undefined;
            url?: string | undefined;
            groups?: Record<string, unknown>[] | undefined;
            members?: string | undefined;
            permissions?: Record<string, boolean> | undefined;
            public_id?: string | undefined;
            account_public_id?: string | undefined;
            customuser_public_id?: string | undefined;
            implementation_id?: string | undefined;
            profile_id?: string | undefined;
            is_expired?: string | undefined;
            expired_at?: string | null | undefined;
            app_key?: string | undefined;
            app_version?: string | undefined;
        };
    }>, readonly []> & LeafSummary<"", "getAuthentication", readonly [MethodPlugin<"getConnection", {
        connection: string | number;
    } | {
        connectionId: string | number;
    } | {
        authenticationId: string | number;
    }, Promise<{
        data: {
            date: string;
            is_invite_only: boolean;
            is_private: boolean;
            shared_with_all: boolean;
            id: string;
            account_id: string;
            title?: string | null | undefined;
            lastchanged?: string | undefined;
            destination_selected_api?: string | null | undefined;
            is_stale?: string | undefined;
            is_shared?: string | undefined;
            marked_stale_at?: string | null | undefined;
            label?: string | null | undefined;
            identifier?: string | null | undefined;
            url?: string | undefined;
            groups?: Record<string, unknown>[] | undefined;
            members?: string | undefined;
            permissions?: Record<string, boolean> | undefined;
            public_id?: string | undefined;
            account_public_id?: string | undefined;
            customuser_public_id?: string | undefined;
            implementation_id?: string | undefined;
            profile_id?: string | undefined;
            is_expired?: string | undefined;
            expired_at?: string | null | undefined;
            app_key?: string | undefined;
            app_version?: string | undefined;
        };
    }>, readonly []> & LeafSummary<"", "getConnection", readonly [PropertyPlugin<"api", ApiClient> & PluginSummary<"zapier/api", never>]>]>;
} & {
    findFirstAuthentication: MethodPlugin<"findFirstAuthentication", {
        title?: string | undefined;
        search?: string | undefined;
        appKey?: string | undefined;
        app?: string | undefined;
        owner?: string | undefined;
        account?: string | undefined;
        accountId?: string | undefined;
        includeShared?: boolean | undefined;
        isExpired?: boolean | undefined;
        expired?: boolean | undefined;
    }, Promise<{
        data: {
            date: string;
            is_invite_only: boolean;
            is_private: boolean;
            shared_with_all: boolean;
            id: string;
            account_id: string;
            title?: string | null | undefined;
            lastchanged?: string | undefined;
            destination_selected_api?: string | null | undefined;
            is_stale?: string | undefined;
            is_shared?: string | undefined;
            marked_stale_at?: string | null | undefined;
            label?: string | null | undefined;
            identifier?: string | null | undefined;
            url?: string | undefined;
            groups?: Record<string, unknown>[] | undefined;
            members?: string | undefined;
            permissions?: Record<string, boolean> | undefined;
            public_id?: string | undefined;
            account_public_id?: string | undefined;
            customuser_public_id?: string | undefined;
            implementation_id?: string | undefined;
            profile_id?: string | undefined;
            is_expired?: string | undefined;
            expired_at?: string | null | undefined;
            app_key?: string | undefined;
            app_version?: string | undefined;
        };
    }>, readonly []> & LeafSummary<"", "findFirstAuthentication", readonly [MethodPlugin<"findFirstConnection", {
        title?: string | undefined;
        search?: string | undefined;
        appKey?: string | undefined;
        app?: string | undefined;
        owner?: string | undefined;
        account?: string | undefined;
        accountId?: string | undefined;
        includeShared?: boolean | undefined;
        isExpired?: boolean | undefined;
        expired?: boolean | undefined;
    }, Promise<{
        data: {
            date: string;
            is_invite_only: boolean;
            is_private: boolean;
            shared_with_all: boolean;
            id: string;
            account_id: string;
            title?: string | null | undefined;
            lastchanged?: string | undefined;
            destination_selected_api?: string | null | undefined;
            is_stale?: string | undefined;
            is_shared?: string | undefined;
            marked_stale_at?: string | null | undefined;
            label?: string | null | undefined;
            identifier?: string | null | undefined;
            url?: string | undefined;
            groups?: Record<string, unknown>[] | undefined;
            members?: string | undefined;
            permissions?: Record<string, boolean> | undefined;
            public_id?: string | undefined;
            account_public_id?: string | undefined;
            customuser_public_id?: string | undefined;
            implementation_id?: string | undefined;
            profile_id?: string | undefined;
            is_expired?: string | undefined;
            expired_at?: string | null | undefined;
            app_key?: string | undefined;
            app_version?: string | undefined;
        };
    }>, readonly []> & LeafSummary<"", "findFirstConnection", readonly [MethodPlugin<"listConnections", {
        title?: string | undefined;
        search?: string | undefined;
        owner?: string | undefined;
        app?: string | undefined;
        appKey?: string | undefined;
        connections?: string[] | undefined;
        connectionIds?: string[] | undefined;
        authenticationIds?: string[] | undefined;
        account?: string | undefined;
        accountId?: string | undefined;
        includeShared?: boolean | undefined;
        isExpired?: boolean | undefined;
        expired?: boolean | undefined;
        pageSize?: number | undefined;
        maxItems?: number | undefined;
        cursor?: string | undefined;
    } & {
        cursor?: string;
        pageSize?: number;
    } & {
        maxItems?: number;
    }, PaginatedSdkResult<{
        date: string;
        is_invite_only: boolean;
        is_private: boolean;
        shared_with_all: boolean;
        id: string;
        account_id: string;
        title?: string | null | undefined;
        lastchanged?: string | undefined;
        destination_selected_api?: string | null | undefined;
        is_stale?: string | undefined;
        is_shared?: string | undefined;
        marked_stale_at?: string | null | undefined;
        label?: string | null | undefined;
        identifier?: string | null | undefined;
        url?: string | undefined;
        groups?: Record<string, unknown>[] | undefined;
        members?: string | undefined;
        permissions?: Record<string, boolean> | undefined;
        public_id?: string | undefined;
        account_public_id?: string | undefined;
        customuser_public_id?: string | undefined;
        implementation_id?: string | undefined;
        profile_id?: string | undefined;
        is_expired?: string | undefined;
        expired_at?: string | null | undefined;
        app_key?: string | undefined;
        app_version?: string | undefined;
    }>, readonly []> & LeafSummary<"", "listConnections", readonly [PropertyPlugin<"connections", ConnectionsProvider> & PluginSummary<"zapier/connections", never>, PropertyPlugin<"api", ApiClient> & PluginSummary<"zapier/api", never>, PropertyPlugin<"manifest", ManifestProvider> & PluginSummary<"zapier/manifest", never>, PropertyPlugin<"capabilities", CapabilitiesContext> & PluginSummary<"zapier/capabilities", never>]>]>]>;
} & {
    findUniqueAuthentication: MethodPlugin<"findUniqueAuthentication", {
        title?: string | undefined;
        search?: string | undefined;
        appKey?: string | undefined;
        app?: string | undefined;
        owner?: string | undefined;
        account?: string | undefined;
        accountId?: string | undefined;
        includeShared?: boolean | undefined;
        isExpired?: boolean | undefined;
        expired?: boolean | undefined;
    }, Promise<{
        data: {
            date: string;
            is_invite_only: boolean;
            is_private: boolean;
            shared_with_all: boolean;
            id: string;
            account_id: string;
            title?: string | null | undefined;
            lastchanged?: string | undefined;
            destination_selected_api?: string | null | undefined;
            is_stale?: string | undefined;
            is_shared?: string | undefined;
            marked_stale_at?: string | null | undefined;
            label?: string | null | undefined;
            identifier?: string | null | undefined;
            url?: string | undefined;
            groups?: Record<string, unknown>[] | undefined;
            members?: string | undefined;
            permissions?: Record<string, boolean> | undefined;
            public_id?: string | undefined;
            account_public_id?: string | undefined;
            customuser_public_id?: string | undefined;
            implementation_id?: string | undefined;
            profile_id?: string | undefined;
            is_expired?: string | undefined;
            expired_at?: string | null | undefined;
            app_key?: string | undefined;
            app_version?: string | undefined;
        };
    }>, readonly []> & LeafSummary<"", "findUniqueAuthentication", readonly [MethodPlugin<"findUniqueConnection", {
        title?: string | undefined;
        search?: string | undefined;
        appKey?: string | undefined;
        app?: string | undefined;
        owner?: string | undefined;
        account?: string | undefined;
        accountId?: string | undefined;
        includeShared?: boolean | undefined;
        isExpired?: boolean | undefined;
        expired?: boolean | undefined;
    }, Promise<{
        data: {
            date: string;
            is_invite_only: boolean;
            is_private: boolean;
            shared_with_all: boolean;
            id: string;
            account_id: string;
            title?: string | null | undefined;
            lastchanged?: string | undefined;
            destination_selected_api?: string | null | undefined;
            is_stale?: string | undefined;
            is_shared?: string | undefined;
            marked_stale_at?: string | null | undefined;
            label?: string | null | undefined;
            identifier?: string | null | undefined;
            url?: string | undefined;
            groups?: Record<string, unknown>[] | undefined;
            members?: string | undefined;
            permissions?: Record<string, boolean> | undefined;
            public_id?: string | undefined;
            account_public_id?: string | undefined;
            customuser_public_id?: string | undefined;
            implementation_id?: string | undefined;
            profile_id?: string | undefined;
            is_expired?: string | undefined;
            expired_at?: string | null | undefined;
            app_key?: string | undefined;
            app_version?: string | undefined;
        };
    }>, readonly []> & LeafSummary<"", "findUniqueConnection", readonly [MethodPlugin<"listConnections", {
        title?: string | undefined;
        search?: string | undefined;
        owner?: string | undefined;
        app?: string | undefined;
        appKey?: string | undefined;
        connections?: string[] | undefined;
        connectionIds?: string[] | undefined;
        authenticationIds?: string[] | undefined;
        account?: string | undefined;
        accountId?: string | undefined;
        includeShared?: boolean | undefined;
        isExpired?: boolean | undefined;
        expired?: boolean | undefined;
        pageSize?: number | undefined;
        maxItems?: number | undefined;
        cursor?: string | undefined;
    } & {
        cursor?: string;
        pageSize?: number;
    } & {
        maxItems?: number;
    }, PaginatedSdkResult<{
        date: string;
        is_invite_only: boolean;
        is_private: boolean;
        shared_with_all: boolean;
        id: string;
        account_id: string;
        title?: string | null | undefined;
        lastchanged?: string | undefined;
        destination_selected_api?: string | null | undefined;
        is_stale?: string | undefined;
        is_shared?: string | undefined;
        marked_stale_at?: string | null | undefined;
        label?: string | null | undefined;
        identifier?: string | null | undefined;
        url?: string | undefined;
        groups?: Record<string, unknown>[] | undefined;
        members?: string | undefined;
        permissions?: Record<string, boolean> | undefined;
        public_id?: string | undefined;
        account_public_id?: string | undefined;
        customuser_public_id?: string | undefined;
        implementation_id?: string | undefined;
        profile_id?: string | undefined;
        is_expired?: string | undefined;
        expired_at?: string | null | undefined;
        app_key?: string | undefined;
        app_version?: string | undefined;
    }>, readonly []> & LeafSummary<"", "listConnections", readonly [PropertyPlugin<"connections", ConnectionsProvider> & PluginSummary<"zapier/connections", never>, PropertyPlugin<"api", ApiClient> & PluginSummary<"zapier/api", never>, PropertyPlugin<"manifest", ManifestProvider> & PluginSummary<"zapier/manifest", never>, PropertyPlugin<"capabilities", CapabilitiesContext> & PluginSummary<"zapier/capabilities", never>]>]>]>;
} & {
    listClientCredentials: MethodPlugin<"listClientCredentials", {
        pageSize?: number | undefined;
        maxItems?: number | undefined;
        cursor?: string | undefined;
    } & {
        cursor?: string;
        pageSize?: number;
    } & {
        maxItems?: number;
    }, PaginatedSdkResult<{
        client_id: string;
        name: string;
        allowed_scopes: ("external" | "credentials")[];
        created_at?: string | null | undefined;
        updated_at?: string | undefined;
    }>, readonly []> & LeafSummary<"", "listClientCredentials", readonly [PropertyPlugin<"api", ApiClient> & PluginSummary<"zapier/api", never>]>;
} & {
    createClientCredentials: MethodPlugin<"createClientCredentials", {
        name: string;
        allowedScopes: ("external" | "credentials")[];
        policy?: Record<string, unknown> | undefined;
    }, Promise<{
        data: {
            client_id: string;
            name: string;
            client_secret: string;
        };
    }>, readonly []> & LeafSummary<"", "createClientCredentials", readonly [PropertyPlugin<"api", ApiClient> & PluginSummary<"zapier/api", never>]>;
} & {
    deleteClientCredentials: MethodPlugin<"deleteClientCredentials", {
        clientId: string;
    }, Promise<{
        success: boolean;
    }>, readonly []> & LeafSummary<"", "deleteClientCredentials", readonly [PropertyPlugin<"api", ApiClient> & PluginSummary<"zapier/api", never>]>;
} & {
    getConnectionStartUrl: MethodPlugin<"getConnectionStartUrl", {
        app: string;
    }, Promise<{
        data: {
            url: string;
            expiresAt: number;
            startedAt: number;
            app: string;
        };
    }>, readonly []> & LeafSummary<"", "getConnectionStartUrl", readonly [PropertyPlugin<"manifest", ManifestProvider> & PluginSummary<"zapier/manifest", never>, PropertyPlugin<"api", ApiClient> & PluginSummary<"zapier/api", never>]>;
} & {
    waitForNewConnection: MethodPlugin<"waitForNewConnection", {
        app: string;
        startedAt: number;
        timeoutMs?: number | undefined;
        pollIntervalMs?: number | undefined;
    }, Promise<{
        data: {
            id: string;
            app: string;
            title?: string | null | undefined;
        };
    }>, readonly []> & LeafSummary<"", "waitForNewConnection", readonly [PropertyPlugin<"manifest", ManifestProvider> & PluginSummary<"zapier/manifest", never>, PropertyPlugin<"api", ApiClient> & PluginSummary<"zapier/api", never>]>;
} & {
    createConnection: MethodPlugin<"createConnection", {
        app: string;
        browser: "never" | "auto" | "always";
        timeoutMs?: number | undefined;
        pollIntervalMs?: number | undefined;
    }, Promise<{
        data: {
            id: string;
            app: string;
            title?: string | null | undefined;
        };
    }>, readonly []> & LeafSummary<"", "createConnection", readonly [MethodPlugin<"getConnectionStartUrl", {
        app: string;
    }, Promise<{
        data: {
            url: string;
            expiresAt: number;
            startedAt: number;
            app: string;
        };
    }>, readonly []> & LeafSummary<"", "getConnectionStartUrl", readonly [PropertyPlugin<"manifest", ManifestProvider> & PluginSummary<"zapier/manifest", never>, PropertyPlugin<"api", ApiClient> & PluginSummary<"zapier/api", never>]>, MethodPlugin<"waitForNewConnection", {
        app: string;
        startedAt: number;
        timeoutMs?: number | undefined;
        pollIntervalMs?: number | undefined;
    }, Promise<{
        data: {
            id: string;
            app: string;
            title?: string | null | undefined;
        };
    }>, readonly []> & LeafSummary<"", "waitForNewConnection", readonly [PropertyPlugin<"manifest", ManifestProvider> & PluginSummary<"zapier/manifest", never>, PropertyPlugin<"api", ApiClient> & PluginSummary<"zapier/api", never>]>]>;
} & {
    listActionInputFields: MethodPlugin<"listActionInputFields", ({
        app: string;
        actionType: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run";
        action: string;
        connection?: string | number | undefined;
        connectionId?: string | number | null | undefined;
        authenticationId?: string | number | null | undefined;
        inputs?: Record<string, unknown> | undefined;
        pageSize?: number | undefined;
        maxItems?: number | undefined;
        cursor?: string | undefined;
    } | {
        appKey: string;
        actionType: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run";
        actionKey: string;
        connection?: string | number | undefined;
        connectionId?: string | number | null | undefined;
        authenticationId?: string | number | null | undefined;
        inputs?: Record<string, unknown> | undefined;
        pageSize?: number | undefined;
        maxItems?: number | undefined;
        cursor?: string | undefined;
    }) & {
        cursor?: string;
        pageSize?: number;
    } & {
        maxItems?: number;
    }, PaginatedSdkResult<{
        key: string;
        type: "input_field";
        default_value: string;
        depends_on: string[];
        description: string;
        invalidates_input_fields: boolean;
        is_required: boolean;
        placeholder: string;
        title: string;
        value_type: string;
        format?: string | undefined;
        items?: {
            type: string;
        } | undefined;
    } | {
        key: string;
        type: "info_field";
        description: string;
        title?: string | undefined;
    } | FieldsetItem>, readonly []> & LeafSummary<"", "listActionInputFields", readonly [PropertyPlugin<"connections", ConnectionsProvider> & PluginSummary<"zapier/connections", never>, PropertyPlugin<"manifest", ManifestProvider> & PluginSummary<"zapier/manifest", never>, PropertyPlugin<"api", ApiClient> & PluginSummary<"zapier/api", never>, MethodPlugin<"getAction", {
        app: string;
        actionType: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run";
        action: string;
    } | {
        appKey: string;
        actionType: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run";
        actionKey: string;
    }, Promise<{
        data: {
            description: string;
            key: string;
            app_key: string;
            action_type: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run";
            title: string;
            type: "action";
            is_hidden?: boolean | undefined;
            id?: string | undefined;
            is_important?: boolean | undefined;
            app_version?: string | undefined;
        };
    }>, readonly []> & LeafSummary<"", "getAction", readonly [MethodPlugin<"listActions", ({
        app: string;
        actionType?: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run" | undefined;
        pageSize?: number | undefined;
        maxItems?: number | undefined;
        cursor?: string | undefined;
    } | {
        appKey: string;
        actionType?: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run" | undefined;
        pageSize?: number | undefined;
        maxItems?: number | undefined;
        cursor?: string | undefined;
    }) & {
        cursor?: string;
        pageSize?: number;
    } & {
        maxItems?: number;
    }, PaginatedSdkResult<{
        description: string;
        key: string;
        app_key: string;
        action_type: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run";
        title: string;
        type: "action";
        is_hidden?: boolean | undefined;
        id?: string | undefined;
        is_important?: boolean | undefined;
        app_version?: string | undefined;
    }>, readonly []> & LeafSummary<"", "listActions", readonly [PropertyPlugin<"manifest", ManifestProvider> & PluginSummary<"zapier/manifest", never>, PropertyPlugin<"api", ApiClient> & PluginSummary<"zapier/api", never>]>]>]>;
} & {
    getActionInputFieldsSchema: MethodPlugin<"getActionInputFieldsSchema", {
        app: string;
        actionType: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run";
        action: string;
        connection?: string | number | undefined;
        connectionId?: string | number | null | undefined;
        authenticationId?: string | number | null | undefined;
        inputs?: Record<string, unknown> | undefined;
    } | {
        appKey: string;
        actionType: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run";
        actionKey: string;
        connection?: string | number | undefined;
        connectionId?: string | number | null | undefined;
        authenticationId?: string | number | null | undefined;
        inputs?: Record<string, unknown> | undefined;
    }, Promise<{
        data: Record<string, unknown>;
    }>, readonly []> & LeafSummary<"", "getActionInputFieldsSchema", readonly [PropertyPlugin<"connections", ConnectionsProvider> & PluginSummary<"zapier/connections", never>, PropertyPlugin<"manifest", ManifestProvider> & PluginSummary<"zapier/manifest", never>, PropertyPlugin<"api", ApiClient> & PluginSummary<"zapier/api", never>, MethodPlugin<"getAction", {
        app: string;
        actionType: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run";
        action: string;
    } | {
        appKey: string;
        actionType: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run";
        actionKey: string;
    }, Promise<{
        data: {
            description: string;
            key: string;
            app_key: string;
            action_type: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run";
            title: string;
            type: "action";
            is_hidden?: boolean | undefined;
            id?: string | undefined;
            is_important?: boolean | undefined;
            app_version?: string | undefined;
        };
    }>, readonly []> & LeafSummary<"", "getAction", readonly [MethodPlugin<"listActions", ({
        app: string;
        actionType?: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run" | undefined;
        pageSize?: number | undefined;
        maxItems?: number | undefined;
        cursor?: string | undefined;
    } | {
        appKey: string;
        actionType?: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run" | undefined;
        pageSize?: number | undefined;
        maxItems?: number | undefined;
        cursor?: string | undefined;
    }) & {
        cursor?: string;
        pageSize?: number;
    } & {
        maxItems?: number;
    }, PaginatedSdkResult<{
        description: string;
        key: string;
        app_key: string;
        action_type: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run";
        title: string;
        type: "action";
        is_hidden?: boolean | undefined;
        id?: string | undefined;
        is_important?: boolean | undefined;
        app_version?: string | undefined;
    }>, readonly []> & LeafSummary<"", "listActions", readonly [PropertyPlugin<"manifest", ManifestProvider> & PluginSummary<"zapier/manifest", never>, PropertyPlugin<"api", ApiClient> & PluginSummary<"zapier/api", never>]>]>]>;
} & {
    listActionInputFieldChoices: MethodPlugin<"listActionInputFieldChoices", ({
        app: string;
        actionType: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run";
        action: string;
        inputField: string;
        connection?: string | number | undefined;
        connectionId?: string | number | null | undefined;
        authenticationId?: string | number | null | undefined;
        inputs?: Record<string, unknown> | undefined;
        page?: number | undefined;
        pageSize?: number | undefined;
        maxItems?: number | undefined;
        cursor?: string | undefined;
    } | {
        appKey: string;
        actionType: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run";
        actionKey: string;
        inputFieldKey: string;
        connection?: string | number | undefined;
        connectionId?: string | number | null | undefined;
        authenticationId?: string | number | null | undefined;
        inputs?: Record<string, unknown> | undefined;
        page?: number | undefined;
        pageSize?: number | undefined;
        maxItems?: number | undefined;
        cursor?: string | undefined;
    }) & {
        cursor?: string;
        pageSize?: number;
    } & {
        maxItems?: number;
    }, PaginatedSdkResult<{
        key?: string | undefined;
        label?: string | undefined;
        sample?: string | undefined;
        value?: string | undefined;
    }>, readonly []> & LeafSummary<"", "listActionInputFieldChoices", readonly [PropertyPlugin<"connections", ConnectionsProvider> & PluginSummary<"zapier/connections", never>, PropertyPlugin<"manifest", ManifestProvider> & PluginSummary<"zapier/manifest", never>, PropertyPlugin<"api", ApiClient> & PluginSummary<"zapier/api", never>, MethodPlugin<"getAction", {
        app: string;
        actionType: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run";
        action: string;
    } | {
        appKey: string;
        actionType: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run";
        actionKey: string;
    }, Promise<{
        data: {
            description: string;
            key: string;
            app_key: string;
            action_type: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run";
            title: string;
            type: "action";
            is_hidden?: boolean | undefined;
            id?: string | undefined;
            is_important?: boolean | undefined;
            app_version?: string | undefined;
        };
    }>, readonly []> & LeafSummary<"", "getAction", readonly [MethodPlugin<"listActions", ({
        app: string;
        actionType?: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run" | undefined;
        pageSize?: number | undefined;
        maxItems?: number | undefined;
        cursor?: string | undefined;
    } | {
        appKey: string;
        actionType?: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run" | undefined;
        pageSize?: number | undefined;
        maxItems?: number | undefined;
        cursor?: string | undefined;
    }) & {
        cursor?: string;
        pageSize?: number;
    } & {
        maxItems?: number;
    }, PaginatedSdkResult<{
        description: string;
        key: string;
        app_key: string;
        action_type: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run";
        title: string;
        type: "action";
        is_hidden?: boolean | undefined;
        id?: string | undefined;
        is_important?: boolean | undefined;
        app_version?: string | undefined;
    }>, readonly []> & LeafSummary<"", "listActions", readonly [PropertyPlugin<"manifest", ManifestProvider> & PluginSummary<"zapier/manifest", never>, PropertyPlugin<"api", ApiClient> & PluginSummary<"zapier/api", never>]>]>]>;
} & {
    listInputFields: MethodPlugin<"listInputFields", ({
        app: string;
        actionType: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run";
        action: string;
        connection?: string | number | undefined;
        connectionId?: string | number | null | undefined;
        authenticationId?: string | number | null | undefined;
        inputs?: Record<string, unknown> | undefined;
        pageSize?: number | undefined;
        maxItems?: number | undefined;
        cursor?: string | undefined;
    } | {
        appKey: string;
        actionType: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run";
        actionKey: string;
        connection?: string | number | undefined;
        connectionId?: string | number | null | undefined;
        authenticationId?: string | number | null | undefined;
        inputs?: Record<string, unknown> | undefined;
        pageSize?: number | undefined;
        maxItems?: number | undefined;
        cursor?: string | undefined;
    }) & {
        cursor?: string;
        pageSize?: number;
    } & {
        maxItems?: number;
    }, PaginatedSdkResult<{
        key: string;
        type: "input_field";
        default_value: string;
        depends_on: string[];
        description: string;
        invalidates_input_fields: boolean;
        is_required: boolean;
        placeholder: string;
        title: string;
        value_type: string;
        format?: string | undefined;
        items?: {
            type: string;
        } | undefined;
    } | {
        key: string;
        type: "info_field";
        description: string;
        title?: string | undefined;
    } | FieldsetItem>, readonly []> & LeafSummary<"", "listInputFields", readonly [MethodPlugin<"listActionInputFields", ({
        app: string;
        actionType: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run";
        action: string;
        connection?: string | number | undefined;
        connectionId?: string | number | null | undefined;
        authenticationId?: string | number | null | undefined;
        inputs?: Record<string, unknown> | undefined;
        pageSize?: number | undefined;
        maxItems?: number | undefined;
        cursor?: string | undefined;
    } | {
        appKey: string;
        actionType: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run";
        actionKey: string;
        connection?: string | number | undefined;
        connectionId?: string | number | null | undefined;
        authenticationId?: string | number | null | undefined;
        inputs?: Record<string, unknown> | undefined;
        pageSize?: number | undefined;
        maxItems?: number | undefined;
        cursor?: string | undefined;
    }) & {
        cursor?: string;
        pageSize?: number;
    } & {
        maxItems?: number;
    }, PaginatedSdkResult<{
        key: string;
        type: "input_field";
        default_value: string;
        depends_on: string[];
        description: string;
        invalidates_input_fields: boolean;
        is_required: boolean;
        placeholder: string;
        title: string;
        value_type: string;
        format?: string | undefined;
        items?: {
            type: string;
        } | undefined;
    } | {
        key: string;
        type: "info_field";
        description: string;
        title?: string | undefined;
    } | FieldsetItem>, readonly []> & LeafSummary<"", "listActionInputFields", readonly [PropertyPlugin<"connections", ConnectionsProvider> & PluginSummary<"zapier/connections", never>, PropertyPlugin<"manifest", ManifestProvider> & PluginSummary<"zapier/manifest", never>, PropertyPlugin<"api", ApiClient> & PluginSummary<"zapier/api", never>, MethodPlugin<"getAction", {
        app: string;
        actionType: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run";
        action: string;
    } | {
        appKey: string;
        actionType: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run";
        actionKey: string;
    }, Promise<{
        data: {
            description: string;
            key: string;
            app_key: string;
            action_type: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run";
            title: string;
            type: "action";
            is_hidden?: boolean | undefined;
            id?: string | undefined;
            is_important?: boolean | undefined;
            app_version?: string | undefined;
        };
    }>, readonly []> & LeafSummary<"", "getAction", readonly [MethodPlugin<"listActions", ({
        app: string;
        actionType?: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run" | undefined;
        pageSize?: number | undefined;
        maxItems?: number | undefined;
        cursor?: string | undefined;
    } | {
        appKey: string;
        actionType?: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run" | undefined;
        pageSize?: number | undefined;
        maxItems?: number | undefined;
        cursor?: string | undefined;
    }) & {
        cursor?: string;
        pageSize?: number;
    } & {
        maxItems?: number;
    }, PaginatedSdkResult<{
        description: string;
        key: string;
        app_key: string;
        action_type: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run";
        title: string;
        type: "action";
        is_hidden?: boolean | undefined;
        id?: string | undefined;
        is_important?: boolean | undefined;
        app_version?: string | undefined;
    }>, readonly []> & LeafSummary<"", "listActions", readonly [PropertyPlugin<"manifest", ManifestProvider> & PluginSummary<"zapier/manifest", never>, PropertyPlugin<"api", ApiClient> & PluginSummary<"zapier/api", never>]>]>]>]>;
} & {
    getInputFieldsSchema: MethodPlugin<"getInputFieldsSchema", {
        app: string;
        actionType: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run";
        action: string;
        connection?: string | number | undefined;
        connectionId?: string | number | null | undefined;
        authenticationId?: string | number | null | undefined;
        inputs?: Record<string, unknown> | undefined;
    } | {
        appKey: string;
        actionType: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run";
        actionKey: string;
        connection?: string | number | undefined;
        connectionId?: string | number | null | undefined;
        authenticationId?: string | number | null | undefined;
        inputs?: Record<string, unknown> | undefined;
    }, Promise<{
        data: Record<string, unknown>;
    }>, readonly []> & LeafSummary<"", "getInputFieldsSchema", readonly [MethodPlugin<"getActionInputFieldsSchema", {
        app: string;
        actionType: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run";
        action: string;
        connection?: string | number | undefined;
        connectionId?: string | number | null | undefined;
        authenticationId?: string | number | null | undefined;
        inputs?: Record<string, unknown> | undefined;
    } | {
        appKey: string;
        actionType: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run";
        actionKey: string;
        connection?: string | number | undefined;
        connectionId?: string | number | null | undefined;
        authenticationId?: string | number | null | undefined;
        inputs?: Record<string, unknown> | undefined;
    }, Promise<{
        data: Record<string, unknown>;
    }>, readonly []> & LeafSummary<"", "getActionInputFieldsSchema", readonly [PropertyPlugin<"connections", ConnectionsProvider> & PluginSummary<"zapier/connections", never>, PropertyPlugin<"manifest", ManifestProvider> & PluginSummary<"zapier/manifest", never>, PropertyPlugin<"api", ApiClient> & PluginSummary<"zapier/api", never>, MethodPlugin<"getAction", {
        app: string;
        actionType: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run";
        action: string;
    } | {
        appKey: string;
        actionType: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run";
        actionKey: string;
    }, Promise<{
        data: {
            description: string;
            key: string;
            app_key: string;
            action_type: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run";
            title: string;
            type: "action";
            is_hidden?: boolean | undefined;
            id?: string | undefined;
            is_important?: boolean | undefined;
            app_version?: string | undefined;
        };
    }>, readonly []> & LeafSummary<"", "getAction", readonly [MethodPlugin<"listActions", ({
        app: string;
        actionType?: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run" | undefined;
        pageSize?: number | undefined;
        maxItems?: number | undefined;
        cursor?: string | undefined;
    } | {
        appKey: string;
        actionType?: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run" | undefined;
        pageSize?: number | undefined;
        maxItems?: number | undefined;
        cursor?: string | undefined;
    }) & {
        cursor?: string;
        pageSize?: number;
    } & {
        maxItems?: number;
    }, PaginatedSdkResult<{
        description: string;
        key: string;
        app_key: string;
        action_type: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run";
        title: string;
        type: "action";
        is_hidden?: boolean | undefined;
        id?: string | undefined;
        is_important?: boolean | undefined;
        app_version?: string | undefined;
    }>, readonly []> & LeafSummary<"", "listActions", readonly [PropertyPlugin<"manifest", ManifestProvider> & PluginSummary<"zapier/manifest", never>, PropertyPlugin<"api", ApiClient> & PluginSummary<"zapier/api", never>]>]>]>]>;
} & {
    listInputFieldChoices: MethodPlugin<"listInputFieldChoices", ({
        app: string;
        actionType: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run";
        action: string;
        inputField: string;
        connection?: string | number | undefined;
        connectionId?: string | number | null | undefined;
        authenticationId?: string | number | null | undefined;
        inputs?: Record<string, unknown> | undefined;
        page?: number | undefined;
        pageSize?: number | undefined;
        maxItems?: number | undefined;
        cursor?: string | undefined;
    } | {
        appKey: string;
        actionType: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run";
        actionKey: string;
        inputFieldKey: string;
        connection?: string | number | undefined;
        connectionId?: string | number | null | undefined;
        authenticationId?: string | number | null | undefined;
        inputs?: Record<string, unknown> | undefined;
        page?: number | undefined;
        pageSize?: number | undefined;
        maxItems?: number | undefined;
        cursor?: string | undefined;
    }) & {
        cursor?: string;
        pageSize?: number;
    } & {
        maxItems?: number;
    }, PaginatedSdkResult<{
        key?: string | undefined;
        label?: string | undefined;
        sample?: string | undefined;
        value?: string | undefined;
    }>, readonly []> & LeafSummary<"", "listInputFieldChoices", readonly [MethodPlugin<"listActionInputFieldChoices", ({
        app: string;
        actionType: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run";
        action: string;
        inputField: string;
        connection?: string | number | undefined;
        connectionId?: string | number | null | undefined;
        authenticationId?: string | number | null | undefined;
        inputs?: Record<string, unknown> | undefined;
        page?: number | undefined;
        pageSize?: number | undefined;
        maxItems?: number | undefined;
        cursor?: string | undefined;
    } | {
        appKey: string;
        actionType: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run";
        actionKey: string;
        inputFieldKey: string;
        connection?: string | number | undefined;
        connectionId?: string | number | null | undefined;
        authenticationId?: string | number | null | undefined;
        inputs?: Record<string, unknown> | undefined;
        page?: number | undefined;
        pageSize?: number | undefined;
        maxItems?: number | undefined;
        cursor?: string | undefined;
    }) & {
        cursor?: string;
        pageSize?: number;
    } & {
        maxItems?: number;
    }, PaginatedSdkResult<{
        key?: string | undefined;
        label?: string | undefined;
        sample?: string | undefined;
        value?: string | undefined;
    }>, readonly []> & LeafSummary<"", "listActionInputFieldChoices", readonly [PropertyPlugin<"connections", ConnectionsProvider> & PluginSummary<"zapier/connections", never>, PropertyPlugin<"manifest", ManifestProvider> & PluginSummary<"zapier/manifest", never>, PropertyPlugin<"api", ApiClient> & PluginSummary<"zapier/api", never>, MethodPlugin<"getAction", {
        app: string;
        actionType: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run";
        action: string;
    } | {
        appKey: string;
        actionType: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run";
        actionKey: string;
    }, Promise<{
        data: {
            description: string;
            key: string;
            app_key: string;
            action_type: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run";
            title: string;
            type: "action";
            is_hidden?: boolean | undefined;
            id?: string | undefined;
            is_important?: boolean | undefined;
            app_version?: string | undefined;
        };
    }>, readonly []> & LeafSummary<"", "getAction", readonly [MethodPlugin<"listActions", ({
        app: string;
        actionType?: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run" | undefined;
        pageSize?: number | undefined;
        maxItems?: number | undefined;
        cursor?: string | undefined;
    } | {
        appKey: string;
        actionType?: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run" | undefined;
        pageSize?: number | undefined;
        maxItems?: number | undefined;
        cursor?: string | undefined;
    }) & {
        cursor?: string;
        pageSize?: number;
    } & {
        maxItems?: number;
    }, PaginatedSdkResult<{
        description: string;
        key: string;
        app_key: string;
        action_type: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run";
        title: string;
        type: "action";
        is_hidden?: boolean | undefined;
        id?: string | undefined;
        is_important?: boolean | undefined;
        app_version?: string | undefined;
    }>, readonly []> & LeafSummary<"", "listActions", readonly [PropertyPlugin<"manifest", ManifestProvider> & PluginSummary<"zapier/manifest", never>, PropertyPlugin<"api", ApiClient> & PluginSummary<"zapier/api", never>]>]>]>]>;
} & {
    runAction: MethodPlugin<"runAction", ({
        app: string;
        actionType: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run";
        action: string;
        connection?: string | number | undefined;
        connectionId?: string | number | null | undefined;
        authenticationId?: string | number | null | undefined;
        inputs?: Record<string, unknown> | undefined;
        timeoutMs?: number | undefined;
        pageSize?: number | undefined;
        maxItems?: number | undefined;
        cursor?: string | undefined;
    } | {
        appKey: string;
        actionType: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run";
        actionKey: string;
        connection?: string | number | undefined;
        connectionId?: string | number | null | undefined;
        authenticationId?: string | number | null | undefined;
        inputs?: Record<string, unknown> | undefined;
        timeoutMs?: number | undefined;
        pageSize?: number | undefined;
        maxItems?: number | undefined;
        cursor?: string | undefined;
    }) & {
        cursor?: string;
        pageSize?: number;
    } & {
        maxItems?: number;
    }, PaginatedSdkResult<unknown>, readonly []> & LeafSummary<"", "runAction", readonly [PropertyPlugin<"connections", ConnectionsProvider> & PluginSummary<"zapier/connections", never>, PropertyPlugin<"manifest", ManifestProvider> & PluginSummary<"zapier/manifest", never>, PropertyPlugin<"api", ApiClient> & PluginSummary<"zapier/api", never>, MethodPlugin<"getAction", {
        app: string;
        actionType: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run";
        action: string;
    } | {
        appKey: string;
        actionType: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run";
        actionKey: string;
    }, Promise<{
        data: {
            description: string;
            key: string;
            app_key: string;
            action_type: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run";
            title: string;
            type: "action";
            is_hidden?: boolean | undefined;
            id?: string | undefined;
            is_important?: boolean | undefined;
            app_version?: string | undefined;
        };
    }>, readonly []> & LeafSummary<"", "getAction", readonly [MethodPlugin<"listActions", ({
        app: string;
        actionType?: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run" | undefined;
        pageSize?: number | undefined;
        maxItems?: number | undefined;
        cursor?: string | undefined;
    } | {
        appKey: string;
        actionType?: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run" | undefined;
        pageSize?: number | undefined;
        maxItems?: number | undefined;
        cursor?: string | undefined;
    }) & {
        cursor?: string;
        pageSize?: number;
    } & {
        maxItems?: number;
    }, PaginatedSdkResult<{
        description: string;
        key: string;
        app_key: string;
        action_type: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run";
        title: string;
        type: "action";
        is_hidden?: boolean | undefined;
        id?: string | undefined;
        is_important?: boolean | undefined;
        app_version?: string | undefined;
    }>, readonly []> & LeafSummary<"", "listActions", readonly [PropertyPlugin<"manifest", ManifestProvider> & PluginSummary<"zapier/manifest", never>, PropertyPlugin<"api", ApiClient> & PluginSummary<"zapier/api", never>]>]>]>;
} & {
    fetch: MethodPlugin<"fetch", {
        url: string | URL;
        init?: ZapierFetchInitOptions;
    }, Promise<Response>, readonly ["url", "init"]> & LeafSummary<"", "fetch", readonly [PropertyPlugin<"coreOptions", CoreOptions | undefined> & PluginSummary<never, never>, PropertyPlugin<"connections", ConnectionsProvider> & PluginSummary<"zapier/connections", never>, PropertyPlugin<"api", ApiClient> & PluginSummary<"zapier/api", never>]>;
} & {
    request: MethodPlugin<"request", {
        url: string;
        method?: "GET" | "POST" | "DELETE" | "PUT" | "PATCH" | "HEAD" | "OPTIONS" | undefined;
        body?: any;
        connection?: string | number | undefined;
        connectionId?: string | number | undefined;
        authenticationId?: string | number | undefined;
        callbackUrl?: string | undefined;
        headers?: Record<string, string> | [string, string][] | Headers | undefined;
    }, Promise<Response>, readonly []> & LeafSummary<"", "request", readonly [MethodPlugin<"fetch", {
        url: string | URL;
        init?: ZapierFetchInitOptions;
    }, Promise<Response>, readonly ["url", "init"]> & LeafSummary<"", "fetch", readonly [PropertyPlugin<"coreOptions", CoreOptions | undefined> & PluginSummary<never, never>, PropertyPlugin<"connections", ConnectionsProvider> & PluginSummary<"zapier/connections", never>, PropertyPlugin<"api", ApiClient> & PluginSummary<"zapier/api", never>]>, PropertyPlugin<"coreOptions", CoreOptions | undefined> & PluginSummary<never, never>]>;
} & {
    apps: PropertyPlugin<"apps", ActionProxy & ZapierSdkApps> & LeafSummary<"", "apps", readonly [MethodPlugin<"fetch", {
        url: string | URL;
        init?: ZapierFetchInitOptions;
    }, Promise<Response>, readonly ["url", "init"]> & LeafSummary<"", "fetch", readonly [PropertyPlugin<"coreOptions", CoreOptions | undefined> & PluginSummary<never, never>, PropertyPlugin<"connections", ConnectionsProvider> & PluginSummary<"zapier/connections", never>, PropertyPlugin<"api", ApiClient> & PluginSummary<"zapier/api", never>]>, MethodPlugin<"runAction", ({
        app: string;
        actionType: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run";
        action: string;
        connection?: string | number | undefined;
        connectionId?: string | number | null | undefined;
        authenticationId?: string | number | null | undefined;
        inputs?: Record<string, unknown> | undefined;
        timeoutMs?: number | undefined;
        pageSize?: number | undefined;
        maxItems?: number | undefined;
        cursor?: string | undefined;
    } | {
        appKey: string;
        actionType: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run";
        actionKey: string;
        connection?: string | number | undefined;
        connectionId?: string | number | null | undefined;
        authenticationId?: string | number | null | undefined;
        inputs?: Record<string, unknown> | undefined;
        timeoutMs?: number | undefined;
        pageSize?: number | undefined;
        maxItems?: number | undefined;
        cursor?: string | undefined;
    }) & {
        cursor?: string;
        pageSize?: number;
    } & {
        maxItems?: number;
    }, PaginatedSdkResult<unknown>, readonly []> & LeafSummary<"", "runAction", readonly [PropertyPlugin<"connections", ConnectionsProvider> & PluginSummary<"zapier/connections", never>, PropertyPlugin<"manifest", ManifestProvider> & PluginSummary<"zapier/manifest", never>, PropertyPlugin<"api", ApiClient> & PluginSummary<"zapier/api", never>, MethodPlugin<"getAction", {
        app: string;
        actionType: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run";
        action: string;
    } | {
        appKey: string;
        actionType: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run";
        actionKey: string;
    }, Promise<{
        data: {
            description: string;
            key: string;
            app_key: string;
            action_type: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run";
            title: string;
            type: "action";
            is_hidden?: boolean | undefined;
            id?: string | undefined;
            is_important?: boolean | undefined;
            app_version?: string | undefined;
        };
    }>, readonly []> & LeafSummary<"", "getAction", readonly [MethodPlugin<"listActions", ({
        app: string;
        actionType?: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run" | undefined;
        pageSize?: number | undefined;
        maxItems?: number | undefined;
        cursor?: string | undefined;
    } | {
        appKey: string;
        actionType?: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run" | undefined;
        pageSize?: number | undefined;
        maxItems?: number | undefined;
        cursor?: string | undefined;
    }) & {
        cursor?: string;
        pageSize?: number;
    } & {
        maxItems?: number;
    }, PaginatedSdkResult<{
        description: string;
        key: string;
        app_key: string;
        action_type: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run";
        title: string;
        type: "action";
        is_hidden?: boolean | undefined;
        id?: string | undefined;
        is_important?: boolean | undefined;
        app_version?: string | undefined;
    }>, readonly []> & LeafSummary<"", "listActions", readonly [PropertyPlugin<"manifest", ManifestProvider> & PluginSummary<"zapier/manifest", never>, PropertyPlugin<"api", ApiClient> & PluginSummary<"zapier/api", never>]>]>]>]>;
} & {
    listTriggerInboxes: MethodPlugin<"listTriggerInboxes", {
        key?: string | undefined;
        name?: string | undefined;
        status?: string | undefined;
        pageSize?: number | undefined;
        maxItems?: number | undefined;
        cursor?: string | undefined;
    } & {
        cursor?: string;
        pageSize?: number;
    } & {
        maxItems?: number;
    }, PaginatedSdkResult<{
        id: string;
        created_at: string;
        key: string | null;
        name: string | null;
        status: string;
        paused_reason: string | null;
        notification_url: string | null;
        subscription: {
            connection_id: string | number | null;
            app_key: string;
            action_key: string;
            inputs: Record<string, unknown>;
        };
    }>, readonly []> & LeafSummary<"", "listTriggerInboxes", readonly [PropertyPlugin<"api", ApiClient> & PluginSummary<"zapier/api", never>]>;
} & {
    createTriggerInbox: MethodPlugin<"createTriggerInbox", {
        app: string;
        action: string;
        key?: string | undefined;
        name?: string | undefined;
        connection?: string | number | null | undefined;
        inputs?: Record<string, unknown> | undefined;
        notificationUrl?: string | undefined;
    }, Promise<{
        data: {
            id: string;
            created_at: string;
            key: string | null;
            name: string | null;
            status: string;
            paused_reason: string | null;
            notification_url: string | null;
            subscription: {
                connection_id: string | number | null;
                app_key: string;
                action_key: string;
                inputs: Record<string, unknown>;
            };
        };
    }>, readonly []> & LeafSummary<"", "createTriggerInbox", readonly [PropertyPlugin<"connections", ConnectionsProvider> & PluginSummary<"zapier/connections", never>, PropertyPlugin<"manifest", ManifestProvider> & PluginSummary<"zapier/manifest", never>, PropertyPlugin<"api", ApiClient> & PluginSummary<"zapier/api", never>]>;
} & {
    ensureTriggerInbox: MethodPlugin<"ensureTriggerInbox", {
        key: string;
        app: string;
        action: string;
        connection?: string | number | null | undefined;
        inputs?: Record<string, unknown> | undefined;
        notificationUrl?: string | undefined;
    } | {
        name: string;
        app: string;
        action: string;
        connection?: string | number | null | undefined;
        inputs?: Record<string, unknown> | undefined;
        notificationUrl?: string | undefined;
    }, Promise<{
        data: {
            id: string;
            created_at: string;
            key: string | null;
            name: string | null;
            status: string;
            paused_reason: string | null;
            notification_url: string | null;
            subscription: {
                connection_id: string | number | null;
                app_key: string;
                action_key: string;
                inputs: Record<string, unknown>;
            };
        };
    }>, readonly []> & LeafSummary<"", "ensureTriggerInbox", readonly [PropertyPlugin<"connections", ConnectionsProvider> & PluginSummary<"zapier/connections", never>, PropertyPlugin<"manifest", ManifestProvider> & PluginSummary<"zapier/manifest", never>, PropertyPlugin<"api", ApiClient> & PluginSummary<"zapier/api", never>]>;
} & {
    getTriggerInbox: MethodPlugin<"getTriggerInbox", {
        inbox: string;
    }, Promise<{
        data: {
            id: string;
            created_at: string;
            key: string | null;
            name: string | null;
            status: string;
            paused_reason: string | null;
            notification_url: string | null;
            subscription: {
                connection_id: string | number | null;
                app_key: string;
                action_key: string;
                inputs: Record<string, unknown>;
            };
        };
    }>, readonly []> & LeafSummary<"", "getTriggerInbox", readonly [PropertyPlugin<"api", ApiClient> & PluginSummary<"zapier/api", never>]>;
} & {
    updateTriggerInbox: MethodPlugin<"updateTriggerInbox", {
        inbox: string;
        notificationUrl?: string | null | undefined;
    }, Promise<{
        data: {
            id: string;
            created_at: string;
            key: string | null;
            name: string | null;
            status: string;
            paused_reason: string | null;
            notification_url: string | null;
            subscription: {
                connection_id: string | number | null;
                app_key: string;
                action_key: string;
                inputs: Record<string, unknown>;
            };
        };
    }>, readonly []> & LeafSummary<"", "updateTriggerInbox", readonly [PropertyPlugin<"api", ApiClient> & PluginSummary<"zapier/api", never>]>;
} & {
    deleteTriggerInbox: MethodPlugin<"deleteTriggerInbox", {
        inbox: string;
    }, Promise<DeleteTriggerInboxResult>, readonly []> & LeafSummary<"", "deleteTriggerInbox", readonly [PropertyPlugin<"api", ApiClient> & PluginSummary<"zapier/api", never>]>;
} & {
    pauseTriggerInbox: MethodPlugin<"pauseTriggerInbox", {
        inbox: string;
    }, Promise<{
        data: {
            id: string;
            created_at: string;
            key: string | null;
            name: string | null;
            status: string;
            paused_reason: string | null;
            notification_url: string | null;
            subscription: {
                connection_id: string | number | null;
                app_key: string;
                action_key: string;
                inputs: Record<string, unknown>;
            };
        };
    }>, readonly []> & LeafSummary<"", "pauseTriggerInbox", readonly [PropertyPlugin<"api", ApiClient> & PluginSummary<"zapier/api", never>]>;
} & {
    resumeTriggerInbox: MethodPlugin<"resumeTriggerInbox", {
        inbox: string;
    }, Promise<{
        data: {
            id: string;
            created_at: string;
            key: string | null;
            name: string | null;
            status: string;
            paused_reason: string | null;
            notification_url: string | null;
            subscription: {
                connection_id: string | number | null;
                app_key: string;
                action_key: string;
                inputs: Record<string, unknown>;
            };
        };
    }>, readonly []> & LeafSummary<"", "resumeTriggerInbox", readonly [PropertyPlugin<"api", ApiClient> & PluginSummary<"zapier/api", never>]>;
} & {
    listTriggerInboxMessages: MethodPlugin<"listTriggerInboxMessages", {
        inbox: string;
        pageSize?: number | undefined;
        maxItems?: number | undefined;
        cursor?: string | undefined;
    } & {
        cursor?: string;
        pageSize?: number;
    } & {
        maxItems?: number;
    }, PaginatedSdkResult<{
        id: string;
        created_at: string;
        status: string;
        message_attributes: {
            lease_count: number;
            error_message: string | null;
            possible_duplicate_data: boolean;
        };
    }>, readonly []> & LeafSummary<"", "listTriggerInboxMessages", readonly [PropertyPlugin<"api", ApiClient> & PluginSummary<"zapier/api", never>]>;
} & {
    leaseTriggerInboxMessages: MethodPlugin<"leaseTriggerInboxMessages", {
        inbox: string;
        leaseLimit?: number | undefined;
        leaseSeconds?: number | undefined;
        signal?: AbortSignal | undefined;
    }, Promise<{
        data: {
            lease_id: string | null;
            leased_until: string | null;
            results: {
                id: string;
                created_at: string;
                status: string;
                message_attributes: {
                    lease_count: number;
                    error_message: string | null;
                    possible_duplicate_data: boolean;
                };
                payload: Record<string, unknown>;
            }[];
            inbox_attributes: {
                status: string;
                paused_reason: string | null;
            };
        };
    }>, readonly []> & LeafSummary<"", "leaseTriggerInboxMessages", readonly [PropertyPlugin<"api", ApiClient> & PluginSummary<"zapier/api", never>]>;
} & {
    ackTriggerInboxMessages: MethodPlugin<"ackTriggerInboxMessages", {
        inbox: string;
        lease: string;
        messages?: string[] | undefined;
    }, Promise<{
        data: {
            acked_id: string | null;
            results: {
                id: string;
                created_at: string;
                status: string;
                message_attributes: {
                    lease_count: number;
                    error_message: string | null;
                    possible_duplicate_data: boolean;
                };
            }[];
        };
    }>, readonly []> & LeafSummary<"", "ackTriggerInboxMessages", readonly [PropertyPlugin<"api", ApiClient> & PluginSummary<"zapier/api", never>]>;
} & {
    releaseTriggerInboxMessages: MethodPlugin<"releaseTriggerInboxMessages", {
        inbox: string;
        lease: string;
        messages?: string[] | undefined;
    }, Promise<{
        data: {
            released_id: string | null;
            results: {
                id: string;
                created_at: string;
                status: string;
                message_attributes: {
                    lease_count: number;
                    error_message: string | null;
                    possible_duplicate_data: boolean;
                };
            }[];
        };
    }>, readonly []> & LeafSummary<"", "releaseTriggerInboxMessages", readonly [PropertyPlugin<"api", ApiClient> & PluginSummary<"zapier/api", never>]>;
} & {
    drainTriggerInbox: MethodPlugin<"drainTriggerInbox", DrainTriggerInboxOptions, Promise<void>, readonly []> & LeafSummary<"", "drainTriggerInbox", readonly [PropertyPlugin<"api", ApiClient> & PluginSummary<"zapier/api", never>, MethodPlugin<"leaseTriggerInboxMessages", {
        inbox: string;
        leaseLimit?: number | undefined;
        leaseSeconds?: number | undefined;
        signal?: AbortSignal | undefined;
    }, Promise<{
        data: {
            lease_id: string | null;
            leased_until: string | null;
            results: {
                id: string;
                created_at: string;
                status: string;
                message_attributes: {
                    lease_count: number;
                    error_message: string | null;
                    possible_duplicate_data: boolean;
                };
                payload: Record<string, unknown>;
            }[];
            inbox_attributes: {
                status: string;
                paused_reason: string | null;
            };
        };
    }>, readonly []> & PluginSummary<"leaseTriggerInboxMessages", never>, MethodPlugin<"ackTriggerInboxMessages", {
        inbox: string;
        lease: string;
        messages?: string[] | undefined;
    }, Promise<{
        data: {
            acked_id: string | null;
            results: {
                id: string;
                created_at: string;
                status: string;
                message_attributes: {
                    lease_count: number;
                    error_message: string | null;
                    possible_duplicate_data: boolean;
                };
            }[];
        };
    }>, readonly []> & PluginSummary<"ackTriggerInboxMessages", never>, MethodPlugin<"releaseTriggerInboxMessages", {
        inbox: string;
        lease: string;
        messages?: string[] | undefined;
    }, Promise<{
        data: {
            released_id: string | null;
            results: {
                id: string;
                created_at: string;
                status: string;
                message_attributes: {
                    lease_count: number;
                    error_message: string | null;
                    possible_duplicate_data: boolean;
                };
            }[];
        };
    }>, readonly []> & PluginSummary<"releaseTriggerInboxMessages", never>]>;
} & {
    watchTriggerInbox: MethodPlugin<"watchTriggerInbox", WatchTriggerInboxOptions, Promise<void>, readonly []> & LeafSummary<"", "watchTriggerInbox", readonly [PropertyPlugin<"api", ApiClient> & PluginSummary<"zapier/api", never>, PropertyPlugin<"sdkOptions", {
        credentials?: string | {
            clientId: string;
            clientSecret: string;
            type?: "client_credentials" | undefined;
            baseUrl?: string | undefined;
            scope?: string | undefined;
        } | {
            clientId: string;
            type?: "pkce" | undefined;
            baseUrl?: string | undefined;
            scope?: string | undefined;
        } | zod_v4_core.$InferOuterFunctionType<zod_v4_core.$ZodTuple<readonly [], zod_v4_core.$ZodFunctionOut>, zod.ZodUnion<readonly [zod.ZodUnion<readonly [zod.ZodString, zod.ZodUnion<readonly [zod.ZodObject<{
            type: zod.ZodOptional<zod.ZodEnum<{
                client_credentials: "client_credentials";
            }>>;
            clientId: zod.ZodString;
            clientSecret: zod.ZodString;
            baseUrl: zod.ZodOptional<zod.ZodString>;
            scope: zod.ZodOptional<zod.ZodString>;
        }, zod_v4_core.$strip>, zod.ZodObject<{
            type: zod.ZodOptional<zod.ZodEnum<{
                pkce: "pkce";
            }>>;
            clientId: zod.ZodString;
            baseUrl: zod.ZodOptional<zod.ZodString>;
            scope: zod.ZodOptional<zod.ZodString>;
        }, zod_v4_core.$strip>]>]>, zod.ZodPromise<zod.ZodUnion<readonly [zod.ZodString, zod.ZodUnion<readonly [zod.ZodObject<{
            type: zod.ZodOptional<zod.ZodEnum<{
                client_credentials: "client_credentials";
            }>>;
            clientId: zod.ZodString;
            clientSecret: zod.ZodString;
            baseUrl: zod.ZodOptional<zod.ZodString>;
            scope: zod.ZodOptional<zod.ZodString>;
        }, zod_v4_core.$strip>, zod.ZodObject<{
            type: zod.ZodOptional<zod.ZodEnum<{
                pkce: "pkce";
            }>>;
            clientId: zod.ZodString;
            baseUrl: zod.ZodOptional<zod.ZodString>;
            scope: zod.ZodOptional<zod.ZodString>;
        }, zod_v4_core.$strip>]>]>>]>> | undefined;
        debug?: boolean | undefined;
        baseUrl?: string | undefined;
        trackingBaseUrl?: string | undefined;
        maxNetworkRetries?: number | undefined;
        maxNetworkRetryDelayMs?: number | undefined;
        maxConcurrentRequests?: number | undefined;
        approvalTimeoutMs?: number | undefined;
        maxApprovalRetries?: number | undefined;
        approvalMode?: "disabled" | "poll" | "throw" | undefined;
        openAutoModeApprovalsInBrowser?: boolean | undefined;
        manifestPath?: string | undefined;
        manifest?: Manifest | undefined;
        onEvent?: EventCallback | undefined;
        fetch?: typeof fetch | undefined;
        eventEmission?: EventEmissionConfig | undefined;
        callerPackage?: {
            name: string;
            version: string;
        } | undefined;
        cache?: ZapierCache | undefined;
        canIncludeSharedConnections?: boolean | undefined;
        canIncludeSharedTables?: boolean | undefined;
        canDeleteTables?: boolean | undefined;
        token?: string | undefined;
    } | undefined> & PluginSummary<never, never>, MethodPlugin<"leaseTriggerInboxMessages", {
        inbox: string;
        leaseLimit?: number | undefined;
        leaseSeconds?: number | undefined;
        signal?: AbortSignal | undefined;
    }, Promise<{
        data: {
            lease_id: string | null;
            leased_until: string | null;
            results: {
                id: string;
                created_at: string;
                status: string;
                message_attributes: {
                    lease_count: number;
                    error_message: string | null;
                    possible_duplicate_data: boolean;
                };
                payload: Record<string, unknown>;
            }[];
            inbox_attributes: {
                status: string;
                paused_reason: string | null;
            };
        };
    }>, readonly []> & PluginSummary<"leaseTriggerInboxMessages", never>, MethodPlugin<"ackTriggerInboxMessages", {
        inbox: string;
        lease: string;
        messages?: string[] | undefined;
    }, Promise<{
        data: {
            acked_id: string | null;
            results: {
                id: string;
                created_at: string;
                status: string;
                message_attributes: {
                    lease_count: number;
                    error_message: string | null;
                    possible_duplicate_data: boolean;
                };
            }[];
        };
    }>, readonly []> & PluginSummary<"ackTriggerInboxMessages", never>, MethodPlugin<"releaseTriggerInboxMessages", {
        inbox: string;
        lease: string;
        messages?: string[] | undefined;
    }, Promise<{
        data: {
            released_id: string | null;
            results: {
                id: string;
                created_at: string;
                status: string;
                message_attributes: {
                    lease_count: number;
                    error_message: string | null;
                    possible_duplicate_data: boolean;
                };
            }[];
        };
    }>, readonly []> & PluginSummary<"releaseTriggerInboxMessages", never>]>;
} & {
    listTriggers: MethodPlugin<"listTriggers", {
        app: string;
        pageSize?: number | undefined;
        maxItems?: number | undefined;
        cursor?: string | undefined;
    } & {
        cursor?: string;
        pageSize?: number;
    } & {
        maxItems?: number;
    }, PaginatedSdkResult<{
        description: string;
        key: string;
        app_key: string;
        action_type: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run";
        title: string;
        type: "action";
        is_hidden?: boolean | undefined;
        id?: string | undefined;
        is_important?: boolean | undefined;
        app_version?: string | undefined;
    }>, readonly []> & LeafSummary<"", "listTriggers", readonly [MethodPlugin<"listActions", ListActionsOptions, PaginatedSdkResult<{
        description: string;
        key: string;
        app_key: string;
        action_type: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run";
        title: string;
        type: "action";
        is_hidden?: boolean | undefined;
        id?: string | undefined;
        is_important?: boolean | undefined;
        app_version?: string | undefined;
    }>, readonly []> & PluginSummary<"listActions", never>]>;
} & {
    listTriggerInputFields: MethodPlugin<"listTriggerInputFields", {
        app: string;
        action: string;
        connection?: string | number | undefined;
        inputs?: Record<string, unknown> | undefined;
        pageSize?: number | undefined;
        maxItems?: number | undefined;
        cursor?: string | undefined;
    } & {
        cursor?: string;
        pageSize?: number;
    } & {
        maxItems?: number;
    }, PaginatedSdkResult<{
        key: string;
        type: "input_field";
        default_value: string;
        depends_on: string[];
        description: string;
        invalidates_input_fields: boolean;
        is_required: boolean;
        placeholder: string;
        title: string;
        value_type: string;
        format?: string | undefined;
        items?: {
            type: string;
        } | undefined;
    } | {
        key: string;
        type: "info_field";
        description: string;
        title?: string | undefined;
    } | FieldsetItem>, readonly []> & LeafSummary<"", "listTriggerInputFields", readonly [MethodPlugin<"listActionInputFields", ListActionInputFieldsOptions, PaginatedSdkResult<{
        key: string;
        type: "input_field";
        default_value: string;
        depends_on: string[];
        description: string;
        invalidates_input_fields: boolean;
        is_required: boolean;
        placeholder: string;
        title: string;
        value_type: string;
        format?: string | undefined;
        items?: {
            type: string;
        } | undefined;
    } | {
        key: string;
        type: "info_field";
        description: string;
        title?: string | undefined;
    } | FieldsetItem>, readonly []> & PluginSummary<"listActionInputFields", never>]>;
} & {
    listTriggerInputFieldChoices: MethodPlugin<"listTriggerInputFieldChoices", {
        app: string;
        action: string;
        inputField: string;
        connection?: string | number | undefined;
        inputs?: Record<string, unknown> | undefined;
        page?: number | undefined;
        pageSize?: number | undefined;
        maxItems?: number | undefined;
        cursor?: string | undefined;
    } & {
        cursor?: string;
        pageSize?: number;
    } & {
        maxItems?: number;
    }, PaginatedSdkResult<{
        key?: string | undefined;
        label?: string | undefined;
        sample?: string | undefined;
        value?: string | undefined;
    }>, readonly []> & LeafSummary<"", "listTriggerInputFieldChoices", readonly [MethodPlugin<"listActionInputFieldChoices", ListActionInputFieldChoicesOptions, PaginatedSdkResult<{
        key?: string | undefined;
        label?: string | undefined;
        sample?: string | undefined;
        value?: string | undefined;
    }>, readonly []> & PluginSummary<"listActionInputFieldChoices", never>]>;
} & {
    getTriggerInputFieldsSchema: MethodPlugin<"getTriggerInputFieldsSchema", {
        app: string;
        action: string;
        connection?: string | number | undefined;
        inputs?: Record<string, unknown> | undefined;
    }, Promise<{
        data: Record<string, unknown>;
    }>, readonly []> & LeafSummary<"", "getTriggerInputFieldsSchema", readonly [MethodPlugin<"getActionInputFieldsSchema", GetActionInputFieldsSchemaOptions, Promise<{
        data: Record<string, unknown>;
    }>, readonly []> & PluginSummary<"getActionInputFieldsSchema", never>]>;
} & {
    listTables: MethodPlugin<"listTables", {
        tables?: string[] | undefined;
        tableIds?: string[] | undefined;
        kind?: "table" | "virtual_table" | "both" | undefined;
        search?: string | undefined;
        owner?: string | undefined;
        includeShared?: boolean | undefined;
        pageSize?: number | undefined;
        maxItems?: number | undefined;
        cursor?: string | undefined;
    } & {
        cursor?: string;
        pageSize?: number;
    } & {
        maxItems?: number;
    }, PaginatedSdkResult<{
        id: string;
        name: string;
        created_at: string;
        edited_at: string;
        kind: "table" | "virtual_table";
        account_id: string;
        profile_id: string;
        description?: string | undefined;
        parent_table_id?: string | undefined;
    }>, readonly []> & LeafSummary<"", "listTables", readonly [PropertyPlugin<"api", ApiClient> & PluginSummary<"zapier/api", never>, PropertyPlugin<"capabilities", CapabilitiesContext> & PluginSummary<"zapier/capabilities", never>]>;
} & {
    getTable: MethodPlugin<"getTable", {
        table: string;
    } | {
        tableId: string;
    }, Promise<{
        data: {
            id: string;
            name: string;
            created_at: string;
            edited_at: string;
            kind: "table" | "virtual_table";
            account_id: string;
            profile_id: string;
            description?: string | undefined;
            parent_table_id?: string | undefined;
        };
    }>, readonly []> & LeafSummary<"", "getTable", readonly [PropertyPlugin<"api", ApiClient> & PluginSummary<"zapier/api", never>]>;
} & {
    deleteTable: MethodPlugin<"deleteTable", {
        table: string;
    } | {
        tableId: string;
    }, Promise<{
        success: boolean;
    }>, readonly []> & LeafSummary<"", "deleteTable", readonly [PropertyPlugin<"api", ApiClient> & PluginSummary<"zapier/api", never>, PropertyPlugin<"capabilities", CapabilitiesContext> & PluginSummary<"zapier/capabilities", never>]>;
} & {
    createTable: MethodPlugin<"createTable", {
        name: string;
        description?: string | undefined;
    }, Promise<{
        data: {
            id: string;
            name: string;
            created_at: string;
            edited_at: string;
            kind: "table" | "virtual_table";
            account_id: string;
            profile_id: string;
            description?: string | undefined;
            parent_table_id?: string | undefined;
        };
    }>, readonly []> & LeafSummary<"", "createTable", readonly [PropertyPlugin<"api", ApiClient> & PluginSummary<"zapier/api", never>]>;
} & {
    listTableFields: MethodPlugin<"listTableFields", {
        table: string;
        fields?: (string | number)[] | undefined;
        fieldKeys?: (string | number)[] | undefined;
        trash?: "include" | "exclude" | "only" | undefined;
    } | {
        tableId: string;
        fields?: (string | number)[] | undefined;
        fieldKeys?: (string | number)[] | undefined;
        trash?: "include" | "exclude" | "only" | undefined;
    }, Promise<{
        data: {
            id: string;
            type: "string" | "number" | "boolean" | "text" | "datetime" | "decimal" | "json" | "email" | "link" | "uuid" | "multiple_string" | "labeled_string" | "multiple_labeled_string" | "multiple_text" | "multiple_boolean" | "multiple_number" | "multiple_decimal" | "multiple_datetime" | "multiple_uuid" | "multiple_json" | "formula" | "button_trigger_zap" | "button_continue_zap" | "multiple_email" | "multiple_link" | "currency" | "phone_number" | "ai_formula" | "linked_record" | "multiple_linked_record";
            name: string;
            created_at?: string | undefined;
            edited_at?: string | undefined;
            options?: Record<string, unknown> | undefined;
            config?: Record<string, unknown> | undefined;
            deleted_at?: string | null | undefined;
        }[];
    }>, readonly []> & LeafSummary<"", "listTableFields", readonly [PropertyPlugin<"api", ApiClient> & PluginSummary<"zapier/api", never>]>;
} & {
    createTableFields: MethodPlugin<"createTableFields", {
        table: string;
        fields: {
            type: "string" | "number" | "boolean" | "text" | "datetime" | "decimal" | "json" | "email" | "link" | "uuid" | "multiple_string" | "labeled_string" | "multiple_labeled_string" | "multiple_text" | "multiple_boolean" | "multiple_number" | "multiple_decimal" | "multiple_datetime" | "multiple_uuid" | "multiple_json" | "formula" | "button_trigger_zap" | "button_continue_zap" | "multiple_email" | "multiple_link" | "currency" | "phone_number" | "ai_formula" | "linked_record" | "multiple_linked_record";
            name: string;
            options?: Record<string, unknown> | undefined;
            config?: Record<string, unknown> | undefined;
        }[];
    } | {
        tableId: string;
        fields: {
            type: "string" | "number" | "boolean" | "text" | "datetime" | "decimal" | "json" | "email" | "link" | "uuid" | "multiple_string" | "labeled_string" | "multiple_labeled_string" | "multiple_text" | "multiple_boolean" | "multiple_number" | "multiple_decimal" | "multiple_datetime" | "multiple_uuid" | "multiple_json" | "formula" | "button_trigger_zap" | "button_continue_zap" | "multiple_email" | "multiple_link" | "currency" | "phone_number" | "ai_formula" | "linked_record" | "multiple_linked_record";
            name: string;
            options?: Record<string, unknown> | undefined;
            config?: Record<string, unknown> | undefined;
        }[];
    }, Promise<{
        data: {
            id: string;
            type: "string" | "number" | "boolean" | "text" | "datetime" | "decimal" | "json" | "email" | "link" | "uuid" | "multiple_string" | "labeled_string" | "multiple_labeled_string" | "multiple_text" | "multiple_boolean" | "multiple_number" | "multiple_decimal" | "multiple_datetime" | "multiple_uuid" | "multiple_json" | "formula" | "button_trigger_zap" | "button_continue_zap" | "multiple_email" | "multiple_link" | "currency" | "phone_number" | "ai_formula" | "linked_record" | "multiple_linked_record";
            name: string;
            created_at?: string | undefined;
            edited_at?: string | undefined;
            options?: Record<string, unknown> | undefined;
            config?: Record<string, unknown> | undefined;
            deleted_at?: string | null | undefined;
        }[];
    }>, readonly []> & LeafSummary<"", "createTableFields", readonly [PropertyPlugin<"api", ApiClient> & PluginSummary<"zapier/api", never>]>;
} & {
    deleteTableFields: MethodPlugin<"deleteTableFields", {
        table: string;
        fields: (string | number)[];
    } | {
        tableId: string;
        fieldKeys: (string | number)[];
    }, Promise<{
        success: boolean;
    }>, readonly []> & LeafSummary<"", "deleteTableFields", readonly [PropertyPlugin<"api", ApiClient> & PluginSummary<"zapier/api", never>]>;
} & {
    listTableRecords: MethodPlugin<"listTableRecords", ({
        table: string;
        keyMode: "names" | "ids";
        filters?: {
            fieldKey: string;
            operator: "search" | "in" | "exact" | "different" | "contains" | "icontains" | "gte" | "gt" | "lt" | "lte" | "range" | "isnull" | "startswith" | "is_within";
            value?: unknown;
        }[] | undefined;
        sort?: {
            fieldKey: string;
            direction: "asc" | "desc";
        } | undefined;
        pageSize?: number | undefined;
        maxItems?: number | undefined;
        cursor?: string | undefined;
        trash?: "include" | "exclude" | "only" | undefined;
    } | {
        tableId: string;
        keyMode: "names" | "ids";
        filters?: {
            fieldKey: string;
            operator: "search" | "in" | "exact" | "different" | "contains" | "icontains" | "gte" | "gt" | "lt" | "lte" | "range" | "isnull" | "startswith" | "is_within";
            value?: unknown;
        }[] | undefined;
        sort?: {
            fieldKey: string;
            direction: "asc" | "desc";
        } | undefined;
        pageSize?: number | undefined;
        maxItems?: number | undefined;
        cursor?: string | undefined;
        trash?: "include" | "exclude" | "only" | undefined;
    }) & {
        cursor?: string;
        pageSize?: number;
    } & {
        maxItems?: number;
    }, PaginatedSdkResult<{
        data: Record<string, unknown>;
        id: string;
        created_at: string;
        edited_at: string;
        deleted_at?: string | null | undefined;
    }>, readonly []> & LeafSummary<"", "listTableRecords", readonly [PropertyPlugin<"api", ApiClient> & PluginSummary<"zapier/api", never>]>;
} & {
    getTableRecord: MethodPlugin<"getTableRecord", {
        table: string;
        record: string;
        keyMode: "names" | "ids";
    } | {
        tableId: string;
        recordId: string;
        keyMode: "names" | "ids";
    }, Promise<{
        data: {
            data: Record<string, unknown>;
            id: string;
            created_at: string;
            edited_at: string;
            deleted_at?: string | null | undefined;
        };
    }>, readonly []> & LeafSummary<"", "getTableRecord", readonly [PropertyPlugin<"api", ApiClient> & PluginSummary<"zapier/api", never>]>;
} & {
    createTableRecords: MethodPlugin<"createTableRecords", {
        table: string;
        records: {
            data: Record<string, unknown>;
        }[];
        keyMode: "names" | "ids";
    } | {
        tableId: string;
        records: {
            data: Record<string, unknown>;
        }[];
        keyMode: "names" | "ids";
    }, Promise<{
        data: {
            data: Record<string, unknown>;
            id: string;
            created_at: string;
            edited_at: string;
            deleted_at?: string | null | undefined;
        }[];
    }>, readonly []> & LeafSummary<"", "createTableRecords", readonly [PropertyPlugin<"api", ApiClient> & PluginSummary<"zapier/api", never>]>;
} & {
    deleteTableRecords: MethodPlugin<"deleteTableRecords", {
        table: string;
        records: string[];
    } | {
        tableId: string;
        recordIds: string[];
    }, Promise<{
        success: boolean;
    }>, readonly []> & LeafSummary<"", "deleteTableRecords", readonly [PropertyPlugin<"api", ApiClient> & PluginSummary<"zapier/api", never>]>;
} & {
    updateTableRecords: MethodPlugin<"updateTableRecords", {
        table: string;
        records: {
            id: string;
            data: Record<string, unknown>;
        }[];
        keyMode: "names" | "ids";
    } | {
        tableId: string;
        records: {
            id: string;
            data: Record<string, unknown>;
        }[];
        keyMode: "names" | "ids";
    }, Promise<{
        data: {
            data: Record<string, unknown>;
            id: string;
            created_at: string;
            edited_at: string;
            deleted_at?: string | null | undefined;
        }[];
    }>, readonly []> & LeafSummary<"", "updateTableRecords", readonly [PropertyPlugin<"api", ApiClient> & PluginSummary<"zapier/api", never>]>;
}> & PluginSummary<never, "fetch" | "zapier/eventEmission" | "apps" | "zapier/manifest" | "zapier/api" | "zapier/resolveCredentials" | "zapier/connections" | "getApp" | "listApps" | "listActions" | "zapier/capabilities" | "listConnections" | "listActionInputFields" | "listActionInputFieldChoices" | "listClientCredentials" | "listTables" | "listTriggerInboxes" | "listTriggerInboxMessages" | "listTableRecords" | "listTableFields" | "getAction" | "runAction" | "getActionInputFieldsSchema" | "createClientCredentials" | "deleteClientCredentials" | "getConnection" | "findFirstConnection" | "findUniqueConnection" | "listAuthentications" | "getAuthentication" | "findFirstAuthentication" | "findUniqueAuthentication" | "request" | "getProfile" | "getConnectionStartUrl" | "waitForNewConnection" | "createConnection" | "listInputFields" | "listInputFieldChoices" | "getInputFieldsSchema" | "createTriggerInbox" | "ensureTriggerInbox" | "getTriggerInbox" | "updateTriggerInbox" | "deleteTriggerInbox" | "pauseTriggerInbox" | "resumeTriggerInbox" | "leaseTriggerInboxMessages" | "ackTriggerInboxMessages" | "releaseTriggerInboxMessages" | "drainTriggerInbox" | "watchTriggerInbox" | "listTriggers" | "listTriggerInputFields" | "listTriggerInputFieldChoices" | "getTriggerInputFieldsSchema" | "getTable" | "deleteTable" | "createTable" | "createTableFields" | "deleteTableFields" | "getTableRecord" | "createTableRecords" | "deleteTableRecords" | "updateTableRecords" | "kitcore/getRegistry" | "zapier/sdk">;
declare function createZapierSdk(options?: ZapierSdkOptions): {
    getRegistry: (input?: {
        package?: string | undefined;
    } | undefined) => RegistryResult<any>;
    getProfile: (input?: Record<string, never> | undefined) => Promise<{
        data: {
            id: string;
            first_name: string;
            last_name: string;
            full_name: string;
            email: string;
            email_confirmed: boolean;
            timezone: string;
        };
    }>;
    listApps: (input?: ({
        search?: string | undefined;
        apps?: string[] | undefined;
        appKeys?: string[] | undefined;
        pageSize?: number | undefined;
        maxItems?: number | undefined;
        cursor?: string | undefined;
    } & {
        cursor?: string;
        pageSize?: number;
    } & {
        maxItems?: number;
    }) | undefined) => PaginatedSdkResult<{
        slug: string;
        title: string;
        key: string;
        implementation_id: string;
        description?: string | undefined;
        is_hidden?: boolean | undefined;
        auth_type?: string | undefined;
        actions?: {
            read?: number | undefined;
            read_bulk?: number | undefined;
            write?: number | undefined;
            search?: number | undefined;
            search_or_write?: number | undefined;
            search_and_write?: number | undefined;
            filter?: number | undefined;
        } | undefined;
        is_deprecated?: boolean | undefined;
        is_beta?: boolean | undefined;
        is_premium?: boolean | undefined;
        age_in_days?: number | undefined;
        banner?: string | undefined;
        categories?: {
            id: number;
            name: string;
            slug: string;
        }[] | undefined;
        images?: {
            url_16x16?: string | undefined;
            url_32x32?: string | undefined;
            url_64x64?: string | undefined;
            url_128x128?: string | undefined;
        } | undefined;
        popularity?: number | undefined;
        has_filters?: boolean | undefined;
        has_reads?: boolean | undefined;
        has_searches?: boolean | undefined;
        has_searches_or_writes?: boolean | undefined;
        has_upfront_fields?: boolean | undefined;
        has_writes?: boolean | undefined;
        is_built_in?: boolean | undefined;
        is_featured?: boolean | undefined;
        is_invite?: boolean | undefined;
        is_public?: boolean | undefined;
        is_upcoming?: boolean | undefined;
        visibility?: string | undefined;
        primary_color?: string | undefined;
        secondary_color?: string | undefined;
        classification?: string | undefined;
        api_docs_url?: string | undefined;
        image?: string | undefined;
        version?: string | undefined;
    }>;
    getApp: (input: {
        app: string;
    } | {
        appKey: string;
    }) => Promise<{
        data: {
            slug: string;
            title: string;
            key: string;
            implementation_id: string;
            description?: string | undefined;
            is_hidden?: boolean | undefined;
            auth_type?: string | undefined;
            actions?: {
                read?: number | undefined;
                read_bulk?: number | undefined;
                write?: number | undefined;
                search?: number | undefined;
                search_or_write?: number | undefined;
                search_and_write?: number | undefined;
                filter?: number | undefined;
            } | undefined;
            is_deprecated?: boolean | undefined;
            is_beta?: boolean | undefined;
            is_premium?: boolean | undefined;
            age_in_days?: number | undefined;
            banner?: string | undefined;
            categories?: {
                id: number;
                name: string;
                slug: string;
            }[] | undefined;
            images?: {
                url_16x16?: string | undefined;
                url_32x32?: string | undefined;
                url_64x64?: string | undefined;
                url_128x128?: string | undefined;
            } | undefined;
            popularity?: number | undefined;
            has_filters?: boolean | undefined;
            has_reads?: boolean | undefined;
            has_searches?: boolean | undefined;
            has_searches_or_writes?: boolean | undefined;
            has_upfront_fields?: boolean | undefined;
            has_writes?: boolean | undefined;
            is_built_in?: boolean | undefined;
            is_featured?: boolean | undefined;
            is_invite?: boolean | undefined;
            is_public?: boolean | undefined;
            is_upcoming?: boolean | undefined;
            visibility?: string | undefined;
            primary_color?: string | undefined;
            secondary_color?: string | undefined;
            classification?: string | undefined;
            api_docs_url?: string | undefined;
            image?: string | undefined;
            version?: string | undefined;
        };
    }>;
    listActions: (input: ({
        app: string;
        actionType?: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run" | undefined;
        pageSize?: number | undefined;
        maxItems?: number | undefined;
        cursor?: string | undefined;
    } | {
        appKey: string;
        actionType?: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run" | undefined;
        pageSize?: number | undefined;
        maxItems?: number | undefined;
        cursor?: string | undefined;
    }) & {
        cursor?: string;
        pageSize?: number;
    } & {
        maxItems?: number;
    }) => PaginatedSdkResult<{
        description: string;
        key: string;
        app_key: string;
        action_type: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run";
        title: string;
        type: "action";
        is_hidden?: boolean | undefined;
        id?: string | undefined;
        is_important?: boolean | undefined;
        app_version?: string | undefined;
    }>;
    getAction: (input: {
        app: string;
        actionType: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run";
        action: string;
    } | {
        appKey: string;
        actionType: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run";
        actionKey: string;
    }) => Promise<{
        data: {
            description: string;
            key: string;
            app_key: string;
            action_type: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run";
            title: string;
            type: "action";
            is_hidden?: boolean | undefined;
            id?: string | undefined;
            is_important?: boolean | undefined;
            app_version?: string | undefined;
        };
    }>;
    listConnections: (input?: ({
        title?: string | undefined;
        search?: string | undefined;
        owner?: string | undefined;
        app?: string | undefined;
        appKey?: string | undefined;
        connections?: string[] | undefined;
        connectionIds?: string[] | undefined;
        authenticationIds?: string[] | undefined;
        account?: string | undefined;
        accountId?: string | undefined;
        includeShared?: boolean | undefined;
        isExpired?: boolean | undefined;
        expired?: boolean | undefined;
        pageSize?: number | undefined;
        maxItems?: number | undefined;
        cursor?: string | undefined;
    } & {
        cursor?: string;
        pageSize?: number;
    } & {
        maxItems?: number;
    }) | undefined) => PaginatedSdkResult<{
        date: string;
        is_invite_only: boolean;
        is_private: boolean;
        shared_with_all: boolean;
        id: string;
        account_id: string;
        title?: string | null | undefined;
        lastchanged?: string | undefined;
        destination_selected_api?: string | null | undefined;
        is_stale?: string | undefined;
        is_shared?: string | undefined;
        marked_stale_at?: string | null | undefined;
        label?: string | null | undefined;
        identifier?: string | null | undefined;
        url?: string | undefined;
        groups?: Record<string, unknown>[] | undefined;
        members?: string | undefined;
        permissions?: Record<string, boolean> | undefined;
        public_id?: string | undefined;
        account_public_id?: string | undefined;
        customuser_public_id?: string | undefined;
        implementation_id?: string | undefined;
        profile_id?: string | undefined;
        is_expired?: string | undefined;
        expired_at?: string | null | undefined;
        app_key?: string | undefined;
        app_version?: string | undefined;
    }>;
    getConnection: (input: {
        connection: string | number;
    } | {
        connectionId: string | number;
    } | {
        authenticationId: string | number;
    }) => Promise<{
        data: {
            date: string;
            is_invite_only: boolean;
            is_private: boolean;
            shared_with_all: boolean;
            id: string;
            account_id: string;
            title?: string | null | undefined;
            lastchanged?: string | undefined;
            destination_selected_api?: string | null | undefined;
            is_stale?: string | undefined;
            is_shared?: string | undefined;
            marked_stale_at?: string | null | undefined;
            label?: string | null | undefined;
            identifier?: string | null | undefined;
            url?: string | undefined;
            groups?: Record<string, unknown>[] | undefined;
            members?: string | undefined;
            permissions?: Record<string, boolean> | undefined;
            public_id?: string | undefined;
            account_public_id?: string | undefined;
            customuser_public_id?: string | undefined;
            implementation_id?: string | undefined;
            profile_id?: string | undefined;
            is_expired?: string | undefined;
            expired_at?: string | null | undefined;
            app_key?: string | undefined;
            app_version?: string | undefined;
        };
    }>;
    findFirstConnection: (input?: {
        title?: string | undefined;
        search?: string | undefined;
        appKey?: string | undefined;
        app?: string | undefined;
        owner?: string | undefined;
        account?: string | undefined;
        accountId?: string | undefined;
        includeShared?: boolean | undefined;
        isExpired?: boolean | undefined;
        expired?: boolean | undefined;
    } | undefined) => Promise<{
        data: {
            date: string;
            is_invite_only: boolean;
            is_private: boolean;
            shared_with_all: boolean;
            id: string;
            account_id: string;
            title?: string | null | undefined;
            lastchanged?: string | undefined;
            destination_selected_api?: string | null | undefined;
            is_stale?: string | undefined;
            is_shared?: string | undefined;
            marked_stale_at?: string | null | undefined;
            label?: string | null | undefined;
            identifier?: string | null | undefined;
            url?: string | undefined;
            groups?: Record<string, unknown>[] | undefined;
            members?: string | undefined;
            permissions?: Record<string, boolean> | undefined;
            public_id?: string | undefined;
            account_public_id?: string | undefined;
            customuser_public_id?: string | undefined;
            implementation_id?: string | undefined;
            profile_id?: string | undefined;
            is_expired?: string | undefined;
            expired_at?: string | null | undefined;
            app_key?: string | undefined;
            app_version?: string | undefined;
        };
    }>;
    findUniqueConnection: (input?: {
        title?: string | undefined;
        search?: string | undefined;
        appKey?: string | undefined;
        app?: string | undefined;
        owner?: string | undefined;
        account?: string | undefined;
        accountId?: string | undefined;
        includeShared?: boolean | undefined;
        isExpired?: boolean | undefined;
        expired?: boolean | undefined;
    } | undefined) => Promise<{
        data: {
            date: string;
            is_invite_only: boolean;
            is_private: boolean;
            shared_with_all: boolean;
            id: string;
            account_id: string;
            title?: string | null | undefined;
            lastchanged?: string | undefined;
            destination_selected_api?: string | null | undefined;
            is_stale?: string | undefined;
            is_shared?: string | undefined;
            marked_stale_at?: string | null | undefined;
            label?: string | null | undefined;
            identifier?: string | null | undefined;
            url?: string | undefined;
            groups?: Record<string, unknown>[] | undefined;
            members?: string | undefined;
            permissions?: Record<string, boolean> | undefined;
            public_id?: string | undefined;
            account_public_id?: string | undefined;
            customuser_public_id?: string | undefined;
            implementation_id?: string | undefined;
            profile_id?: string | undefined;
            is_expired?: string | undefined;
            expired_at?: string | null | undefined;
            app_key?: string | undefined;
            app_version?: string | undefined;
        };
    }>;
    listAuthentications: (input?: ({
        title?: string | undefined;
        search?: string | undefined;
        owner?: string | undefined;
        app?: string | undefined;
        appKey?: string | undefined;
        connections?: string[] | undefined;
        connectionIds?: string[] | undefined;
        authenticationIds?: string[] | undefined;
        account?: string | undefined;
        accountId?: string | undefined;
        includeShared?: boolean | undefined;
        isExpired?: boolean | undefined;
        expired?: boolean | undefined;
        pageSize?: number | undefined;
        maxItems?: number | undefined;
        cursor?: string | undefined;
    } & {
        cursor?: string;
        pageSize?: number;
    } & {
        maxItems?: number;
    }) | undefined) => PaginatedSdkResult<{
        date: string;
        is_invite_only: boolean;
        is_private: boolean;
        shared_with_all: boolean;
        id: string;
        account_id: string;
        title?: string | null | undefined;
        lastchanged?: string | undefined;
        destination_selected_api?: string | null | undefined;
        is_stale?: string | undefined;
        is_shared?: string | undefined;
        marked_stale_at?: string | null | undefined;
        label?: string | null | undefined;
        identifier?: string | null | undefined;
        url?: string | undefined;
        groups?: Record<string, unknown>[] | undefined;
        members?: string | undefined;
        permissions?: Record<string, boolean> | undefined;
        public_id?: string | undefined;
        account_public_id?: string | undefined;
        customuser_public_id?: string | undefined;
        implementation_id?: string | undefined;
        profile_id?: string | undefined;
        is_expired?: string | undefined;
        expired_at?: string | null | undefined;
        app_key?: string | undefined;
        app_version?: string | undefined;
    }>;
    getAuthentication: (input: {
        connection: string | number;
    } | {
        connectionId: string | number;
    } | {
        authenticationId: string | number;
    }) => Promise<{
        data: {
            date: string;
            is_invite_only: boolean;
            is_private: boolean;
            shared_with_all: boolean;
            id: string;
            account_id: string;
            title?: string | null | undefined;
            lastchanged?: string | undefined;
            destination_selected_api?: string | null | undefined;
            is_stale?: string | undefined;
            is_shared?: string | undefined;
            marked_stale_at?: string | null | undefined;
            label?: string | null | undefined;
            identifier?: string | null | undefined;
            url?: string | undefined;
            groups?: Record<string, unknown>[] | undefined;
            members?: string | undefined;
            permissions?: Record<string, boolean> | undefined;
            public_id?: string | undefined;
            account_public_id?: string | undefined;
            customuser_public_id?: string | undefined;
            implementation_id?: string | undefined;
            profile_id?: string | undefined;
            is_expired?: string | undefined;
            expired_at?: string | null | undefined;
            app_key?: string | undefined;
            app_version?: string | undefined;
        };
    }>;
    findFirstAuthentication: (input?: {
        title?: string | undefined;
        search?: string | undefined;
        appKey?: string | undefined;
        app?: string | undefined;
        owner?: string | undefined;
        account?: string | undefined;
        accountId?: string | undefined;
        includeShared?: boolean | undefined;
        isExpired?: boolean | undefined;
        expired?: boolean | undefined;
    } | undefined) => Promise<{
        data: {
            date: string;
            is_invite_only: boolean;
            is_private: boolean;
            shared_with_all: boolean;
            id: string;
            account_id: string;
            title?: string | null | undefined;
            lastchanged?: string | undefined;
            destination_selected_api?: string | null | undefined;
            is_stale?: string | undefined;
            is_shared?: string | undefined;
            marked_stale_at?: string | null | undefined;
            label?: string | null | undefined;
            identifier?: string | null | undefined;
            url?: string | undefined;
            groups?: Record<string, unknown>[] | undefined;
            members?: string | undefined;
            permissions?: Record<string, boolean> | undefined;
            public_id?: string | undefined;
            account_public_id?: string | undefined;
            customuser_public_id?: string | undefined;
            implementation_id?: string | undefined;
            profile_id?: string | undefined;
            is_expired?: string | undefined;
            expired_at?: string | null | undefined;
            app_key?: string | undefined;
            app_version?: string | undefined;
        };
    }>;
    findUniqueAuthentication: (input?: {
        title?: string | undefined;
        search?: string | undefined;
        appKey?: string | undefined;
        app?: string | undefined;
        owner?: string | undefined;
        account?: string | undefined;
        accountId?: string | undefined;
        includeShared?: boolean | undefined;
        isExpired?: boolean | undefined;
        expired?: boolean | undefined;
    } | undefined) => Promise<{
        data: {
            date: string;
            is_invite_only: boolean;
            is_private: boolean;
            shared_with_all: boolean;
            id: string;
            account_id: string;
            title?: string | null | undefined;
            lastchanged?: string | undefined;
            destination_selected_api?: string | null | undefined;
            is_stale?: string | undefined;
            is_shared?: string | undefined;
            marked_stale_at?: string | null | undefined;
            label?: string | null | undefined;
            identifier?: string | null | undefined;
            url?: string | undefined;
            groups?: Record<string, unknown>[] | undefined;
            members?: string | undefined;
            permissions?: Record<string, boolean> | undefined;
            public_id?: string | undefined;
            account_public_id?: string | undefined;
            customuser_public_id?: string | undefined;
            implementation_id?: string | undefined;
            profile_id?: string | undefined;
            is_expired?: string | undefined;
            expired_at?: string | null | undefined;
            app_key?: string | undefined;
            app_version?: string | undefined;
        };
    }>;
    listClientCredentials: (input?: ({
        pageSize?: number | undefined;
        maxItems?: number | undefined;
        cursor?: string | undefined;
    } & {
        cursor?: string;
        pageSize?: number;
    } & {
        maxItems?: number;
    }) | undefined) => PaginatedSdkResult<{
        client_id: string;
        name: string;
        allowed_scopes: ("external" | "credentials")[];
        created_at?: string | null | undefined;
        updated_at?: string | undefined;
    }>;
    createClientCredentials: (input: {
        name: string;
        allowedScopes: ("external" | "credentials")[];
        policy?: Record<string, unknown> | undefined;
    }) => Promise<{
        data: {
            client_id: string;
            name: string;
            client_secret: string;
        };
    }>;
    deleteClientCredentials: (input: {
        clientId: string;
    }) => Promise<{
        success: boolean;
    }>;
    getConnectionStartUrl: (input: {
        app: string;
    }) => Promise<{
        data: {
            url: string;
            expiresAt: number;
            startedAt: number;
            app: string;
        };
    }>;
    waitForNewConnection: (input: {
        app: string;
        startedAt: number;
        timeoutMs?: number | undefined;
        pollIntervalMs?: number | undefined;
    }) => Promise<{
        data: {
            id: string;
            app: string;
            title?: string | null | undefined;
        };
    }>;
    createConnection: (input: {
        app: string;
        browser: "never" | "auto" | "always";
        timeoutMs?: number | undefined;
        pollIntervalMs?: number | undefined;
    }) => Promise<{
        data: {
            id: string;
            app: string;
            title?: string | null | undefined;
        };
    }>;
    listActionInputFields: (input: ({
        app: string;
        actionType: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run";
        action: string;
        connection?: string | number | undefined;
        connectionId?: string | number | null | undefined;
        authenticationId?: string | number | null | undefined;
        inputs?: Record<string, unknown> | undefined;
        pageSize?: number | undefined;
        maxItems?: number | undefined;
        cursor?: string | undefined;
    } | {
        appKey: string;
        actionType: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run";
        actionKey: string;
        connection?: string | number | undefined;
        connectionId?: string | number | null | undefined;
        authenticationId?: string | number | null | undefined;
        inputs?: Record<string, unknown> | undefined;
        pageSize?: number | undefined;
        maxItems?: number | undefined;
        cursor?: string | undefined;
    }) & {
        cursor?: string;
        pageSize?: number;
    } & {
        maxItems?: number;
    }) => PaginatedSdkResult<{
        key: string;
        type: "input_field";
        default_value: string;
        depends_on: string[];
        description: string;
        invalidates_input_fields: boolean;
        is_required: boolean;
        placeholder: string;
        title: string;
        value_type: string;
        format?: string | undefined;
        items?: {
            type: string;
        } | undefined;
    } | {
        key: string;
        type: "info_field";
        description: string;
        title?: string | undefined;
    } | FieldsetItem>;
    getActionInputFieldsSchema: (input: {
        app: string;
        actionType: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run";
        action: string;
        connection?: string | number | undefined;
        connectionId?: string | number | null | undefined;
        authenticationId?: string | number | null | undefined;
        inputs?: Record<string, unknown> | undefined;
    } | {
        appKey: string;
        actionType: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run";
        actionKey: string;
        connection?: string | number | undefined;
        connectionId?: string | number | null | undefined;
        authenticationId?: string | number | null | undefined;
        inputs?: Record<string, unknown> | undefined;
    }) => Promise<{
        data: Record<string, unknown>;
    }>;
    listActionInputFieldChoices: (input: ({
        app: string;
        actionType: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run";
        action: string;
        inputField: string;
        connection?: string | number | undefined;
        connectionId?: string | number | null | undefined;
        authenticationId?: string | number | null | undefined;
        inputs?: Record<string, unknown> | undefined;
        page?: number | undefined;
        pageSize?: number | undefined;
        maxItems?: number | undefined;
        cursor?: string | undefined;
    } | {
        appKey: string;
        actionType: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run";
        actionKey: string;
        inputFieldKey: string;
        connection?: string | number | undefined;
        connectionId?: string | number | null | undefined;
        authenticationId?: string | number | null | undefined;
        inputs?: Record<string, unknown> | undefined;
        page?: number | undefined;
        pageSize?: number | undefined;
        maxItems?: number | undefined;
        cursor?: string | undefined;
    }) & {
        cursor?: string;
        pageSize?: number;
    } & {
        maxItems?: number;
    }) => PaginatedSdkResult<{
        key?: string | undefined;
        label?: string | undefined;
        sample?: string | undefined;
        value?: string | undefined;
    }>;
    listInputFields: (input: ({
        app: string;
        actionType: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run";
        action: string;
        connection?: string | number | undefined;
        connectionId?: string | number | null | undefined;
        authenticationId?: string | number | null | undefined;
        inputs?: Record<string, unknown> | undefined;
        pageSize?: number | undefined;
        maxItems?: number | undefined;
        cursor?: string | undefined;
    } | {
        appKey: string;
        actionType: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run";
        actionKey: string;
        connection?: string | number | undefined;
        connectionId?: string | number | null | undefined;
        authenticationId?: string | number | null | undefined;
        inputs?: Record<string, unknown> | undefined;
        pageSize?: number | undefined;
        maxItems?: number | undefined;
        cursor?: string | undefined;
    }) & {
        cursor?: string;
        pageSize?: number;
    } & {
        maxItems?: number;
    }) => PaginatedSdkResult<{
        key: string;
        type: "input_field";
        default_value: string;
        depends_on: string[];
        description: string;
        invalidates_input_fields: boolean;
        is_required: boolean;
        placeholder: string;
        title: string;
        value_type: string;
        format?: string | undefined;
        items?: {
            type: string;
        } | undefined;
    } | {
        key: string;
        type: "info_field";
        description: string;
        title?: string | undefined;
    } | FieldsetItem>;
    getInputFieldsSchema: (input: {
        app: string;
        actionType: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run";
        action: string;
        connection?: string | number | undefined;
        connectionId?: string | number | null | undefined;
        authenticationId?: string | number | null | undefined;
        inputs?: Record<string, unknown> | undefined;
    } | {
        appKey: string;
        actionType: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run";
        actionKey: string;
        connection?: string | number | undefined;
        connectionId?: string | number | null | undefined;
        authenticationId?: string | number | null | undefined;
        inputs?: Record<string, unknown> | undefined;
    }) => Promise<{
        data: Record<string, unknown>;
    }>;
    listInputFieldChoices: (input: ({
        app: string;
        actionType: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run";
        action: string;
        inputField: string;
        connection?: string | number | undefined;
        connectionId?: string | number | null | undefined;
        authenticationId?: string | number | null | undefined;
        inputs?: Record<string, unknown> | undefined;
        page?: number | undefined;
        pageSize?: number | undefined;
        maxItems?: number | undefined;
        cursor?: string | undefined;
    } | {
        appKey: string;
        actionType: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run";
        actionKey: string;
        inputFieldKey: string;
        connection?: string | number | undefined;
        connectionId?: string | number | null | undefined;
        authenticationId?: string | number | null | undefined;
        inputs?: Record<string, unknown> | undefined;
        page?: number | undefined;
        pageSize?: number | undefined;
        maxItems?: number | undefined;
        cursor?: string | undefined;
    }) & {
        cursor?: string;
        pageSize?: number;
    } & {
        maxItems?: number;
    }) => PaginatedSdkResult<{
        key?: string | undefined;
        label?: string | undefined;
        sample?: string | undefined;
        value?: string | undefined;
    }>;
    runAction: (input: ({
        app: string;
        actionType: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run";
        action: string;
        connection?: string | number | undefined;
        connectionId?: string | number | null | undefined;
        authenticationId?: string | number | null | undefined;
        inputs?: Record<string, unknown> | undefined;
        timeoutMs?: number | undefined;
        pageSize?: number | undefined;
        maxItems?: number | undefined;
        cursor?: string | undefined;
    } | {
        appKey: string;
        actionType: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run";
        actionKey: string;
        connection?: string | number | undefined;
        connectionId?: string | number | null | undefined;
        authenticationId?: string | number | null | undefined;
        inputs?: Record<string, unknown> | undefined;
        timeoutMs?: number | undefined;
        pageSize?: number | undefined;
        maxItems?: number | undefined;
        cursor?: string | undefined;
    }) & {
        cursor?: string;
        pageSize?: number;
    } & {
        maxItems?: number;
    }) => PaginatedSdkResult<unknown>;
    fetch: (arg: string | URL, arg_1?: ZapierFetchInitOptions | undefined) => Promise<Response>;
    request: (input: {
        url: string;
        method?: "GET" | "POST" | "DELETE" | "PUT" | "PATCH" | "HEAD" | "OPTIONS" | undefined;
        body?: any;
        connection?: string | number | undefined;
        connectionId?: string | number | undefined;
        authenticationId?: string | number | undefined;
        callbackUrl?: string | undefined;
        headers?: Record<string, string> | [string, string][] | Headers | undefined;
    }) => Promise<Response>;
    apps: ActionProxy & ZapierSdkApps;
    listTriggerInboxes: (input?: ({
        key?: string | undefined;
        name?: string | undefined;
        status?: string | undefined;
        pageSize?: number | undefined;
        maxItems?: number | undefined;
        cursor?: string | undefined;
    } & {
        cursor?: string;
        pageSize?: number;
    } & {
        maxItems?: number;
    }) | undefined) => PaginatedSdkResult<{
        id: string;
        created_at: string;
        key: string | null;
        name: string | null;
        status: string;
        paused_reason: string | null;
        notification_url: string | null;
        subscription: {
            connection_id: string | number | null;
            app_key: string;
            action_key: string;
            inputs: Record<string, unknown>;
        };
    }>;
    createTriggerInbox: (input: {
        app: string;
        action: string;
        key?: string | undefined;
        name?: string | undefined;
        connection?: string | number | null | undefined;
        inputs?: Record<string, unknown> | undefined;
        notificationUrl?: string | undefined;
    }) => Promise<{
        data: {
            id: string;
            created_at: string;
            key: string | null;
            name: string | null;
            status: string;
            paused_reason: string | null;
            notification_url: string | null;
            subscription: {
                connection_id: string | number | null;
                app_key: string;
                action_key: string;
                inputs: Record<string, unknown>;
            };
        };
    }>;
    ensureTriggerInbox: (input: {
        key: string;
        app: string;
        action: string;
        connection?: string | number | null | undefined;
        inputs?: Record<string, unknown> | undefined;
        notificationUrl?: string | undefined;
    } | {
        name: string;
        app: string;
        action: string;
        connection?: string | number | null | undefined;
        inputs?: Record<string, unknown> | undefined;
        notificationUrl?: string | undefined;
    }) => Promise<{
        data: {
            id: string;
            created_at: string;
            key: string | null;
            name: string | null;
            status: string;
            paused_reason: string | null;
            notification_url: string | null;
            subscription: {
                connection_id: string | number | null;
                app_key: string;
                action_key: string;
                inputs: Record<string, unknown>;
            };
        };
    }>;
    getTriggerInbox: (input: {
        inbox: string;
    }) => Promise<{
        data: {
            id: string;
            created_at: string;
            key: string | null;
            name: string | null;
            status: string;
            paused_reason: string | null;
            notification_url: string | null;
            subscription: {
                connection_id: string | number | null;
                app_key: string;
                action_key: string;
                inputs: Record<string, unknown>;
            };
        };
    }>;
    updateTriggerInbox: (input: {
        inbox: string;
        notificationUrl?: string | null | undefined;
    }) => Promise<{
        data: {
            id: string;
            created_at: string;
            key: string | null;
            name: string | null;
            status: string;
            paused_reason: string | null;
            notification_url: string | null;
            subscription: {
                connection_id: string | number | null;
                app_key: string;
                action_key: string;
                inputs: Record<string, unknown>;
            };
        };
    }>;
    deleteTriggerInbox: (input: {
        inbox: string;
    }) => Promise<DeleteTriggerInboxResult>;
    pauseTriggerInbox: (input: {
        inbox: string;
    }) => Promise<{
        data: {
            id: string;
            created_at: string;
            key: string | null;
            name: string | null;
            status: string;
            paused_reason: string | null;
            notification_url: string | null;
            subscription: {
                connection_id: string | number | null;
                app_key: string;
                action_key: string;
                inputs: Record<string, unknown>;
            };
        };
    }>;
    resumeTriggerInbox: (input: {
        inbox: string;
    }) => Promise<{
        data: {
            id: string;
            created_at: string;
            key: string | null;
            name: string | null;
            status: string;
            paused_reason: string | null;
            notification_url: string | null;
            subscription: {
                connection_id: string | number | null;
                app_key: string;
                action_key: string;
                inputs: Record<string, unknown>;
            };
        };
    }>;
    listTriggerInboxMessages: (input: {
        inbox: string;
        pageSize?: number | undefined;
        maxItems?: number | undefined;
        cursor?: string | undefined;
    } & {
        cursor?: string;
        pageSize?: number;
    } & {
        maxItems?: number;
    }) => PaginatedSdkResult<{
        id: string;
        created_at: string;
        status: string;
        message_attributes: {
            lease_count: number;
            error_message: string | null;
            possible_duplicate_data: boolean;
        };
    }>;
    leaseTriggerInboxMessages: (input: {
        inbox: string;
        leaseLimit?: number | undefined;
        leaseSeconds?: number | undefined;
        signal?: AbortSignal | undefined;
    }) => Promise<{
        data: {
            lease_id: string | null;
            leased_until: string | null;
            results: {
                id: string;
                created_at: string;
                status: string;
                message_attributes: {
                    lease_count: number;
                    error_message: string | null;
                    possible_duplicate_data: boolean;
                };
                payload: Record<string, unknown>;
            }[];
            inbox_attributes: {
                status: string;
                paused_reason: string | null;
            };
        };
    }>;
    ackTriggerInboxMessages: (input: {
        inbox: string;
        lease: string;
        messages?: string[] | undefined;
    }) => Promise<{
        data: {
            acked_id: string | null;
            results: {
                id: string;
                created_at: string;
                status: string;
                message_attributes: {
                    lease_count: number;
                    error_message: string | null;
                    possible_duplicate_data: boolean;
                };
            }[];
        };
    }>;
    releaseTriggerInboxMessages: (input: {
        inbox: string;
        lease: string;
        messages?: string[] | undefined;
    }) => Promise<{
        data: {
            released_id: string | null;
            results: {
                id: string;
                created_at: string;
                status: string;
                message_attributes: {
                    lease_count: number;
                    error_message: string | null;
                    possible_duplicate_data: boolean;
                };
            }[];
        };
    }>;
    drainTriggerInbox: (input: TriggerInboxCommandSharedFields & {
        maxMessages?: number;
    }) => Promise<void>;
    watchTriggerInbox: (input: TriggerInboxCommandSharedFields & {
        maxDrainIntervalSeconds?: number;
    }) => Promise<void>;
    listTriggers: (input: {
        app: string;
        pageSize?: number | undefined;
        maxItems?: number | undefined;
        cursor?: string | undefined;
    } & {
        cursor?: string;
        pageSize?: number;
    } & {
        maxItems?: number;
    }) => PaginatedSdkResult<{
        description: string;
        key: string;
        app_key: string;
        action_type: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run";
        title: string;
        type: "action";
        is_hidden?: boolean | undefined;
        id?: string | undefined;
        is_important?: boolean | undefined;
        app_version?: string | undefined;
    }>;
    listTriggerInputFields: (input: {
        app: string;
        action: string;
        connection?: string | number | undefined;
        inputs?: Record<string, unknown> | undefined;
        pageSize?: number | undefined;
        maxItems?: number | undefined;
        cursor?: string | undefined;
    } & {
        cursor?: string;
        pageSize?: number;
    } & {
        maxItems?: number;
    }) => PaginatedSdkResult<{
        key: string;
        type: "input_field";
        default_value: string;
        depends_on: string[];
        description: string;
        invalidates_input_fields: boolean;
        is_required: boolean;
        placeholder: string;
        title: string;
        value_type: string;
        format?: string | undefined;
        items?: {
            type: string;
        } | undefined;
    } | {
        key: string;
        type: "info_field";
        description: string;
        title?: string | undefined;
    } | FieldsetItem>;
    listTriggerInputFieldChoices: (input: {
        app: string;
        action: string;
        inputField: string;
        connection?: string | number | undefined;
        inputs?: Record<string, unknown> | undefined;
        page?: number | undefined;
        pageSize?: number | undefined;
        maxItems?: number | undefined;
        cursor?: string | undefined;
    } & {
        cursor?: string;
        pageSize?: number;
    } & {
        maxItems?: number;
    }) => PaginatedSdkResult<{
        key?: string | undefined;
        label?: string | undefined;
        sample?: string | undefined;
        value?: string | undefined;
    }>;
    getTriggerInputFieldsSchema: (input: {
        app: string;
        action: string;
        connection?: string | number | undefined;
        inputs?: Record<string, unknown> | undefined;
    }) => Promise<{
        data: Record<string, unknown>;
    }>;
    listTables: (input?: ({
        tables?: string[] | undefined;
        tableIds?: string[] | undefined;
        kind?: "table" | "virtual_table" | "both" | undefined;
        search?: string | undefined;
        owner?: string | undefined;
        includeShared?: boolean | undefined;
        pageSize?: number | undefined;
        maxItems?: number | undefined;
        cursor?: string | undefined;
    } & {
        cursor?: string;
        pageSize?: number;
    } & {
        maxItems?: number;
    }) | undefined) => PaginatedSdkResult<{
        id: string;
        name: string;
        created_at: string;
        edited_at: string;
        kind: "table" | "virtual_table";
        account_id: string;
        profile_id: string;
        description?: string | undefined;
        parent_table_id?: string | undefined;
    }>;
    getTable: (input: {
        table: string;
    } | {
        tableId: string;
    }) => Promise<{
        data: {
            id: string;
            name: string;
            created_at: string;
            edited_at: string;
            kind: "table" | "virtual_table";
            account_id: string;
            profile_id: string;
            description?: string | undefined;
            parent_table_id?: string | undefined;
        };
    }>;
    deleteTable: (input: {
        table: string;
    } | {
        tableId: string;
    }) => Promise<{
        success: boolean;
    }>;
    createTable: (input: {
        name: string;
        description?: string | undefined;
    }) => Promise<{
        data: {
            id: string;
            name: string;
            created_at: string;
            edited_at: string;
            kind: "table" | "virtual_table";
            account_id: string;
            profile_id: string;
            description?: string | undefined;
            parent_table_id?: string | undefined;
        };
    }>;
    listTableFields: (input: {
        table: string;
        fields?: (string | number)[] | undefined;
        fieldKeys?: (string | number)[] | undefined;
        trash?: "include" | "exclude" | "only" | undefined;
    } | {
        tableId: string;
        fields?: (string | number)[] | undefined;
        fieldKeys?: (string | number)[] | undefined;
        trash?: "include" | "exclude" | "only" | undefined;
    }) => Promise<{
        data: {
            id: string;
            type: "string" | "number" | "boolean" | "text" | "datetime" | "decimal" | "json" | "email" | "link" | "uuid" | "multiple_string" | "labeled_string" | "multiple_labeled_string" | "multiple_text" | "multiple_boolean" | "multiple_number" | "multiple_decimal" | "multiple_datetime" | "multiple_uuid" | "multiple_json" | "formula" | "button_trigger_zap" | "button_continue_zap" | "multiple_email" | "multiple_link" | "currency" | "phone_number" | "ai_formula" | "linked_record" | "multiple_linked_record";
            name: string;
            created_at?: string | undefined;
            edited_at?: string | undefined;
            options?: Record<string, unknown> | undefined;
            config?: Record<string, unknown> | undefined;
            deleted_at?: string | null | undefined;
        }[];
    }>;
    createTableFields: (input: {
        table: string;
        fields: {
            type: "string" | "number" | "boolean" | "text" | "datetime" | "decimal" | "json" | "email" | "link" | "uuid" | "multiple_string" | "labeled_string" | "multiple_labeled_string" | "multiple_text" | "multiple_boolean" | "multiple_number" | "multiple_decimal" | "multiple_datetime" | "multiple_uuid" | "multiple_json" | "formula" | "button_trigger_zap" | "button_continue_zap" | "multiple_email" | "multiple_link" | "currency" | "phone_number" | "ai_formula" | "linked_record" | "multiple_linked_record";
            name: string;
            options?: Record<string, unknown> | undefined;
            config?: Record<string, unknown> | undefined;
        }[];
    } | {
        tableId: string;
        fields: {
            type: "string" | "number" | "boolean" | "text" | "datetime" | "decimal" | "json" | "email" | "link" | "uuid" | "multiple_string" | "labeled_string" | "multiple_labeled_string" | "multiple_text" | "multiple_boolean" | "multiple_number" | "multiple_decimal" | "multiple_datetime" | "multiple_uuid" | "multiple_json" | "formula" | "button_trigger_zap" | "button_continue_zap" | "multiple_email" | "multiple_link" | "currency" | "phone_number" | "ai_formula" | "linked_record" | "multiple_linked_record";
            name: string;
            options?: Record<string, unknown> | undefined;
            config?: Record<string, unknown> | undefined;
        }[];
    }) => Promise<{
        data: {
            id: string;
            type: "string" | "number" | "boolean" | "text" | "datetime" | "decimal" | "json" | "email" | "link" | "uuid" | "multiple_string" | "labeled_string" | "multiple_labeled_string" | "multiple_text" | "multiple_boolean" | "multiple_number" | "multiple_decimal" | "multiple_datetime" | "multiple_uuid" | "multiple_json" | "formula" | "button_trigger_zap" | "button_continue_zap" | "multiple_email" | "multiple_link" | "currency" | "phone_number" | "ai_formula" | "linked_record" | "multiple_linked_record";
            name: string;
            created_at?: string | undefined;
            edited_at?: string | undefined;
            options?: Record<string, unknown> | undefined;
            config?: Record<string, unknown> | undefined;
            deleted_at?: string | null | undefined;
        }[];
    }>;
    deleteTableFields: (input: {
        table: string;
        fields: (string | number)[];
    } | {
        tableId: string;
        fieldKeys: (string | number)[];
    }) => Promise<{
        success: boolean;
    }>;
    listTableRecords: (input: ({
        table: string;
        keyMode: "names" | "ids";
        filters?: {
            fieldKey: string;
            operator: "search" | "in" | "exact" | "different" | "contains" | "icontains" | "gte" | "gt" | "lt" | "lte" | "range" | "isnull" | "startswith" | "is_within";
            value?: unknown;
        }[] | undefined;
        sort?: {
            fieldKey: string;
            direction: "asc" | "desc";
        } | undefined;
        pageSize?: number | undefined;
        maxItems?: number | undefined;
        cursor?: string | undefined;
        trash?: "include" | "exclude" | "only" | undefined;
    } | {
        tableId: string;
        keyMode: "names" | "ids";
        filters?: {
            fieldKey: string;
            operator: "search" | "in" | "exact" | "different" | "contains" | "icontains" | "gte" | "gt" | "lt" | "lte" | "range" | "isnull" | "startswith" | "is_within";
            value?: unknown;
        }[] | undefined;
        sort?: {
            fieldKey: string;
            direction: "asc" | "desc";
        } | undefined;
        pageSize?: number | undefined;
        maxItems?: number | undefined;
        cursor?: string | undefined;
        trash?: "include" | "exclude" | "only" | undefined;
    }) & {
        cursor?: string;
        pageSize?: number;
    } & {
        maxItems?: number;
    }) => PaginatedSdkResult<{
        data: Record<string, unknown>;
        id: string;
        created_at: string;
        edited_at: string;
        deleted_at?: string | null | undefined;
    }>;
    getTableRecord: (input: {
        table: string;
        record: string;
        keyMode: "names" | "ids";
    } | {
        tableId: string;
        recordId: string;
        keyMode: "names" | "ids";
    }) => Promise<{
        data: {
            data: Record<string, unknown>;
            id: string;
            created_at: string;
            edited_at: string;
            deleted_at?: string | null | undefined;
        };
    }>;
    createTableRecords: (input: {
        table: string;
        records: {
            data: Record<string, unknown>;
        }[];
        keyMode: "names" | "ids";
    } | {
        tableId: string;
        records: {
            data: Record<string, unknown>;
        }[];
        keyMode: "names" | "ids";
    }) => Promise<{
        data: {
            data: Record<string, unknown>;
            id: string;
            created_at: string;
            edited_at: string;
            deleted_at?: string | null | undefined;
        }[];
    }>;
    deleteTableRecords: (input: {
        table: string;
        records: string[];
    } | {
        tableId: string;
        recordIds: string[];
    }) => Promise<{
        success: boolean;
    }>;
    updateTableRecords: (input: {
        table: string;
        records: {
            id: string;
            data: Record<string, unknown>;
        }[];
        keyMode: "names" | "ids";
    } | {
        tableId: string;
        records: {
            id: string;
            data: Record<string, unknown>;
        }[];
        keyMode: "names" | "ids";
    }) => Promise<{
        data: {
            data: Record<string, unknown>;
            id: string;
            created_at: string;
            edited_at: string;
            deleted_at?: string | null | undefined;
        }[];
    }>;
} & {
    context: SdkContext;
};
interface ZapierSdk extends ReturnType<typeof createZapierSdk> {
}

/**
 * The SDK's static configuration id. A single, top-level snapshot with no
 * merging, valued as `BaseSdkOptions` (the same shape `createZapierSdk`
 * accepts), so a consumer reads exactly the fields it needs.
 *
 * There is no provider plugin under this id: each factory injects the caller's
 * options at build time via `createSdk(root, { configuration: { [SDK_OPTIONS_ID]:
 * options } })`, which satisfies `sdkOptionsPluginRef` the same way a registered
 * provider would.
 */
declare const SDK_OPTIONS_ID = "zapier/sdkOptions";
/**
 * The optional stand-in an options-consuming plugin imports. It is `declareOptionalProperty`
 * (not `declareProperty`) so a plugin builds standalone in its own unit tests
 * without wiring the options value: the binding is `BaseSdkOptions | undefined`
 * and the consumer falls back to its own defaults (`{ ...DEFAULTS, ...imports.sdkOptions }`).
 */
declare const sdkOptionsPluginRef: PropertyPlugin<"sdkOptions", {
    credentials?: string | {
        clientId: string;
        clientSecret: string;
        type?: "client_credentials" | undefined;
        baseUrl?: string | undefined;
        scope?: string | undefined;
    } | {
        clientId: string;
        type?: "pkce" | undefined;
        baseUrl?: string | undefined;
        scope?: string | undefined;
    } | zod_v4_core.$InferOuterFunctionType<zod_v4_core.$ZodTuple<readonly [], zod_v4_core.$ZodFunctionOut>, zod.ZodUnion<readonly [zod.ZodUnion<readonly [zod.ZodString, zod.ZodUnion<readonly [zod.ZodObject<{
        type: zod.ZodOptional<zod.ZodEnum<{
            client_credentials: "client_credentials";
        }>>;
        clientId: zod.ZodString;
        clientSecret: zod.ZodString;
        baseUrl: zod.ZodOptional<zod.ZodString>;
        scope: zod.ZodOptional<zod.ZodString>;
    }, zod_v4_core.$strip>, zod.ZodObject<{
        type: zod.ZodOptional<zod.ZodEnum<{
            pkce: "pkce";
        }>>;
        clientId: zod.ZodString;
        baseUrl: zod.ZodOptional<zod.ZodString>;
        scope: zod.ZodOptional<zod.ZodString>;
    }, zod_v4_core.$strip>]>]>, zod.ZodPromise<zod.ZodUnion<readonly [zod.ZodString, zod.ZodUnion<readonly [zod.ZodObject<{
        type: zod.ZodOptional<zod.ZodEnum<{
            client_credentials: "client_credentials";
        }>>;
        clientId: zod.ZodString;
        clientSecret: zod.ZodString;
        baseUrl: zod.ZodOptional<zod.ZodString>;
        scope: zod.ZodOptional<zod.ZodString>;
    }, zod_v4_core.$strip>, zod.ZodObject<{
        type: zod.ZodOptional<zod.ZodEnum<{
            pkce: "pkce";
        }>>;
        clientId: zod.ZodString;
        baseUrl: zod.ZodOptional<zod.ZodString>;
        scope: zod.ZodOptional<zod.ZodString>;
    }, zod_v4_core.$strip>]>]>>]>> | undefined;
    debug?: boolean | undefined;
    baseUrl?: string | undefined;
    trackingBaseUrl?: string | undefined;
    maxNetworkRetries?: number | undefined;
    maxNetworkRetryDelayMs?: number | undefined;
    maxConcurrentRequests?: number | undefined;
    approvalTimeoutMs?: number | undefined;
    maxApprovalRetries?: number | undefined;
    approvalMode?: "disabled" | "poll" | "throw" | undefined;
    openAutoModeApprovalsInBrowser?: boolean | undefined;
    manifestPath?: string | undefined;
    manifest?: Manifest | undefined;
    onEvent?: EventCallback | undefined;
    fetch?: typeof fetch | undefined;
    eventEmission?: EventEmissionConfig | undefined;
    callerPackage?: {
        name: string;
        version: string;
    } | undefined;
    cache?: ZapierCache | undefined;
    canIncludeSharedConnections?: boolean | undefined;
    canIncludeSharedTables?: boolean | undefined;
    canDeleteTables?: boolean | undefined;
    token?: string | undefined;
} | undefined> & PluginSummary<never, never>;

interface CallerContext {
    packageOperation?: string;
}
/**
 * Run `fn` with the given caller context merged onto any parent context, so
 * the operation that initiated the call (e.g. a CLI command or MCP tool) stays
 * observable through every SDK call it makes.
 *
 * Caller context is telemetry-only: reading the parent scope is wrapped so a
 * broken ALS store can never crash the wrapped command. Errors thrown by `fn`
 * itself are intentionally NOT caught — they propagate.
 */
declare function runWithCallerContext<T>(context: CallerContext, fn: () => T): T;
/**
 * Read the active caller context, or an empty object outside any caller scope.
 *
 * Read on the outbound HTTP path to set a telemetry header, so a failure here
 * must never break the request — it falls back to an empty context.
 */
declare function getCallerContext(): CallerContext;

/**
 * Batch Operation Utilities
 *
 * This module provides utilities for executing multiple async operations
 * with concurrency control and retry logic.
 */
/**
 * Options for batch execution
 */
interface BatchOptions {
    /**
     * Maximum number of concurrent operations (default: 10)
     * Lower values are more "polite" but slower
     * Higher values are faster but risk rate limits
     */
    concurrency?: number;
    /**
     * Whether to retry failed operations (default: true)
     * When enabled, each operation gets up to MAX_CONSECUTIVE_ERRORS retries
     */
    retry?: boolean;
    /**
     * Delay in milliseconds between starting batches (default: 100ms)
     * Adds a small delay between concurrent batches to avoid burst patterns
     */
    batchDelay?: number;
    /**
     * Overall timeout for the entire batch operation in milliseconds (default: 180000ms / 3 minutes)
     * When exceeded, throws ZapierTimeoutError and stops processing remaining tasks
     */
    timeoutMs?: number;
    /**
     * Timeout for individual tasks in milliseconds (default: none)
     * When set, each task will be cancelled if it exceeds this duration
     * Tasks that timeout will be marked as rejected in the results
     */
    taskTimeoutMs?: number;
}
/**
 * Execute multiple async operations with concurrency limiting and retry logic
 *
 * This prevents overwhelming APIs by:
 * 1. Limiting concurrent operations (worker pool pattern)
 * 2. Adding small delays between batches to avoid burst detection
 * 3. Retrying failed operations with exponential backoff
 *
 * Problem Solved:
 * - Rate limit prevention: Steady stream instead of burst requests
 * - Connection pool management: Stays within browser/Node limits (~6-8 per domain)
 * - Resilience: Transient failures are retried automatically
 * - Observability: Returns detailed success/failure info for each operation
 *
 * Example Usage:
 * ```typescript
 * // Instead of Promise.allSettled (fires all at once):
 * const results = await Promise.allSettled(
 *   actions.map(a => sdk.listInputFields(a))
 * );
 *
 * // Use batch (controlled concurrency):
 * const results = await batch(
 *   actions.map(a => () => sdk.listInputFields(a)),
 *   { concurrency: 10, retry: true }
 * );
 * ```
 *
 * @param tasks - Array of functions that return promises (NOT promises themselves!)
 * @param options - Configuration for concurrency and retry behavior
 * @returns Promise resolving to array of settled results (same as Promise.allSettled)
 */
declare function batch<T>(tasks: (() => Promise<T>)[], options?: BatchOptions): Promise<PromiseSettledResult<T>[]>;

declare const appKeyResolver: Resolver;

interface ActionTypeItem {
    key: string;
    name: string;
}
declare const actionTypeResolver: Resolver;

interface ActionItem {
    key: string;
    title?: string;
    name?: string;
    description?: string;
    action_type: string;
    is_hidden?: boolean;
}
declare const actionKeyResolver: Resolver;

declare const connectionIdResolver: Resolver;
declare const connectionIdGenericResolver: Resolver;

declare const inputsResolver: Resolver;
declare const inputsAllOptionalResolver: Resolver;

declare const inputFieldKeyResolver: Resolver;

declare const clientCredentialsNameResolver: Resolver;

declare const clientIdResolver: Resolver;

declare const tableIdResolver: Resolver;

declare const triggerInboxResolver: Resolver;

declare const workflowIdResolver: Resolver;

declare const durableRunIdResolver: Resolver;

declare const workflowVersionIdResolver: Resolver;

declare const workflowRunIdResolver: Resolver;

declare const triggerMessagesResolver: Resolver;

declare const tableRecordIdResolver: Resolver;
declare const tableRecordIdsResolver: Resolver;

declare const tableFieldIdsResolver: Resolver;

declare const tableNameResolver: Resolver;

declare const tableFieldsResolver: Resolver;

declare const tableRecordsResolver: Resolver;
declare const tableUpdateRecordsResolver: Resolver;

declare const tableFiltersResolver: Resolver;

declare const tableSortResolver: Resolver;

declare const logDeprecation: (message: string) => void;
declare const resetDeprecationWarnings: () => void;

/**
 * SDK Constants
 *
 * This module contains shared constants used throughout the SDK.
 */
/**
 * Base URL for Zapier API endpoints
 */
declare const ZAPIER_BASE_URL: string;
/**
 * Calling service name for telemetry headers.
 *
 * Read lazily so tests can stub the env var after module import.
 */
declare function getZapierSdkService(): string | undefined;
/**
 * Maximum number of items that can be requested per page across all paginated functions
 */
declare const MAX_PAGE_LIMIT = 10000;
/**
 * Default number of items per page for paginated functions
 */
declare const DEFAULT_PAGE_SIZE = 100;
/**
 * Default timeout for action execution (in milliseconds)
 */
declare const DEFAULT_ACTION_TIMEOUT_MS = 180000;
/**
 * Network retry configuration from environment variables
 */
declare const ZAPIER_MAX_NETWORK_RETRIES: number;
declare const ZAPIER_MAX_NETWORK_RETRY_DELAY_MS: number;
/**
 * Upper bound on the concurrency cap. Anything beyond this is almost
 * certainly a configuration mistake and would also bypass IEEE 754 safe
 * integer range for inputs like "9".repeat(309), which would silently
 * become Infinity and disable throttling.
 */
declare const MAX_CONCURRENCY_LIMIT = 10000;
declare function parseConcurrencyEnvVar(name: string): number | undefined;
/**
 * Default cap on concurrent in-flight HTTP requests per SDK instance.
 * Beyond this, requests queue (FIFO) until a slot frees up. Sized for
 * production workloads that fan out hundreds of action runs in parallel;
 * lower it when running against a smaller backend or to be more
 * conservative. Pass `Infinity` to disable.
 */
declare const ZAPIER_MAX_CONCURRENT_REQUESTS: number;
/**
 * Approval flow behavior from environment variable.
 * - "poll": Create the approval, open the URL in a browser, poll until
 *   resolved, and retry the original request on success.
 * - "throw": Create the approval and throw a ZapierApprovalError immediately
 *   with the approval URL so the caller can surface it.
 * - "disabled": Throw a ZapierApprovalError on approval-required responses
 *   without creating an approval.
 *
 * This parser only reflects the env var value. If unset, callers should fall
 * back to getZapierDefaultApprovalMode().
 *
 * Read lazily so tests can set env vars after module import.
 */
declare function getZapierApprovalMode(): "disabled" | "poll" | "throw" | undefined;
declare function getZapierOpenAutoModeApprovalsInBrowser(): boolean | undefined;
/**
 * Returns the default approval mode based on whether the process is running in
 * an interactive terminal. If both stdin and stdout are TTYs the user can act
 * on an approval URL immediately, so "poll" is the right default. In a
 * non-interactive context (CI, piped output) the process cannot open a browser
 * or wait for input, so "throw" hands the URL to the caller.
 */
declare function getZapierDefaultApprovalMode(): "poll" | "throw";
/**
 * Default timeout for approval polling (10 minutes)
 */
declare const DEFAULT_APPROVAL_TIMEOUT_MS: number;
/**
 * Default cap on chained approval retries for a single request. Multiple
 * sequential approvals can occur when more than one policy gates the same
 * action; this cap prevents a runaway loop if the server keeps returning
 * approval_required after a successful approval.
 */
declare const DEFAULT_MAX_APPROVAL_RETRIES = 2;

declare const listTablesPlugin: MethodPlugin<"listTables", {
    tables?: string[] | undefined;
    tableIds?: string[] | undefined;
    kind?: "table" | "virtual_table" | "both" | undefined;
    search?: string | undefined;
    owner?: string | undefined;
    includeShared?: boolean | undefined;
    pageSize?: number | undefined;
    maxItems?: number | undefined;
    cursor?: string | undefined;
} & {
    cursor?: string;
    pageSize?: number;
} & {
    maxItems?: number;
}, PaginatedSdkResult<{
    id: string;
    name: string;
    created_at: string;
    edited_at: string;
    kind: "table" | "virtual_table";
    account_id: string;
    profile_id: string;
    description?: string | undefined;
    parent_table_id?: string | undefined;
}>, readonly []> & LeafSummary<"", "listTables", readonly [PropertyPlugin<"api", ApiClient> & PluginSummary<"zapier/api", never>, PropertyPlugin<"capabilities", CapabilitiesContext> & PluginSummary<"zapier/capabilities", never>]>;

declare const getTablePlugin: MethodPlugin<"getTable", {
    table: string;
} | {
    tableId: string;
}, Promise<{
    data: {
        id: string;
        name: string;
        created_at: string;
        edited_at: string;
        kind: "table" | "virtual_table";
        account_id: string;
        profile_id: string;
        description?: string | undefined;
        parent_table_id?: string | undefined;
    };
}>, readonly []> & LeafSummary<"", "getTable", readonly [PropertyPlugin<"api", ApiClient> & PluginSummary<"zapier/api", never>]>;

declare const createTablePlugin: MethodPlugin<"createTable", {
    name: string;
    description?: string | undefined;
}, Promise<{
    data: {
        id: string;
        name: string;
        created_at: string;
        edited_at: string;
        kind: "table" | "virtual_table";
        account_id: string;
        profile_id: string;
        description?: string | undefined;
        parent_table_id?: string | undefined;
    };
}>, readonly []> & LeafSummary<"", "createTable", readonly [PropertyPlugin<"api", ApiClient> & PluginSummary<"zapier/api", never>]>;

declare const deleteTablePlugin: MethodPlugin<"deleteTable", {
    table: string;
} | {
    tableId: string;
}, Promise<{
    success: boolean;
}>, readonly []> & LeafSummary<"", "deleteTable", readonly [PropertyPlugin<"api", ApiClient> & PluginSummary<"zapier/api", never>, PropertyPlugin<"capabilities", CapabilitiesContext> & PluginSummary<"zapier/capabilities", never>]>;

declare const listTableFieldsPlugin: MethodPlugin<"listTableFields", {
    table: string;
    fields?: (string | number)[] | undefined;
    fieldKeys?: (string | number)[] | undefined;
    trash?: "include" | "exclude" | "only" | undefined;
} | {
    tableId: string;
    fields?: (string | number)[] | undefined;
    fieldKeys?: (string | number)[] | undefined;
    trash?: "include" | "exclude" | "only" | undefined;
}, Promise<{
    data: {
        id: string;
        type: "string" | "number" | "boolean" | "text" | "datetime" | "decimal" | "json" | "email" | "link" | "uuid" | "multiple_string" | "labeled_string" | "multiple_labeled_string" | "multiple_text" | "multiple_boolean" | "multiple_number" | "multiple_decimal" | "multiple_datetime" | "multiple_uuid" | "multiple_json" | "formula" | "button_trigger_zap" | "button_continue_zap" | "multiple_email" | "multiple_link" | "currency" | "phone_number" | "ai_formula" | "linked_record" | "multiple_linked_record";
        name: string;
        created_at?: string | undefined;
        edited_at?: string | undefined;
        options?: Record<string, unknown> | undefined;
        config?: Record<string, unknown> | undefined;
        deleted_at?: string | null | undefined;
    }[];
}>, readonly []> & LeafSummary<"", "listTableFields", readonly [PropertyPlugin<"api", ApiClient> & PluginSummary<"zapier/api", never>]>;

declare const createTableFieldsPlugin: MethodPlugin<"createTableFields", {
    table: string;
    fields: {
        type: "string" | "number" | "boolean" | "text" | "datetime" | "decimal" | "json" | "email" | "link" | "uuid" | "multiple_string" | "labeled_string" | "multiple_labeled_string" | "multiple_text" | "multiple_boolean" | "multiple_number" | "multiple_decimal" | "multiple_datetime" | "multiple_uuid" | "multiple_json" | "formula" | "button_trigger_zap" | "button_continue_zap" | "multiple_email" | "multiple_link" | "currency" | "phone_number" | "ai_formula" | "linked_record" | "multiple_linked_record";
        name: string;
        options?: Record<string, unknown> | undefined;
        config?: Record<string, unknown> | undefined;
    }[];
} | {
    tableId: string;
    fields: {
        type: "string" | "number" | "boolean" | "text" | "datetime" | "decimal" | "json" | "email" | "link" | "uuid" | "multiple_string" | "labeled_string" | "multiple_labeled_string" | "multiple_text" | "multiple_boolean" | "multiple_number" | "multiple_decimal" | "multiple_datetime" | "multiple_uuid" | "multiple_json" | "formula" | "button_trigger_zap" | "button_continue_zap" | "multiple_email" | "multiple_link" | "currency" | "phone_number" | "ai_formula" | "linked_record" | "multiple_linked_record";
        name: string;
        options?: Record<string, unknown> | undefined;
        config?: Record<string, unknown> | undefined;
    }[];
}, Promise<{
    data: {
        id: string;
        type: "string" | "number" | "boolean" | "text" | "datetime" | "decimal" | "json" | "email" | "link" | "uuid" | "multiple_string" | "labeled_string" | "multiple_labeled_string" | "multiple_text" | "multiple_boolean" | "multiple_number" | "multiple_decimal" | "multiple_datetime" | "multiple_uuid" | "multiple_json" | "formula" | "button_trigger_zap" | "button_continue_zap" | "multiple_email" | "multiple_link" | "currency" | "phone_number" | "ai_formula" | "linked_record" | "multiple_linked_record";
        name: string;
        created_at?: string | undefined;
        edited_at?: string | undefined;
        options?: Record<string, unknown> | undefined;
        config?: Record<string, unknown> | undefined;
        deleted_at?: string | null | undefined;
    }[];
}>, readonly []> & LeafSummary<"", "createTableFields", readonly [PropertyPlugin<"api", ApiClient> & PluginSummary<"zapier/api", never>]>;

declare const deleteTableFieldsPlugin: MethodPlugin<"deleteTableFields", {
    table: string;
    fields: (string | number)[];
} | {
    tableId: string;
    fieldKeys: (string | number)[];
}, Promise<{
    success: boolean;
}>, readonly []> & LeafSummary<"", "deleteTableFields", readonly [PropertyPlugin<"api", ApiClient> & PluginSummary<"zapier/api", never>]>;

declare const getTableRecordPlugin: MethodPlugin<"getTableRecord", {
    table: string;
    record: string;
    keyMode: "names" | "ids";
} | {
    tableId: string;
    recordId: string;
    keyMode: "names" | "ids";
}, Promise<{
    data: {
        data: Record<string, unknown>;
        id: string;
        created_at: string;
        edited_at: string;
        deleted_at?: string | null | undefined;
    };
}>, readonly []> & LeafSummary<"", "getTableRecord", readonly [PropertyPlugin<"api", ApiClient> & PluginSummary<"zapier/api", never>]>;

declare const listTableRecordsPlugin: MethodPlugin<"listTableRecords", ({
    table: string;
    keyMode: "names" | "ids";
    filters?: {
        fieldKey: string;
        operator: "search" | "in" | "exact" | "different" | "contains" | "icontains" | "gte" | "gt" | "lt" | "lte" | "range" | "isnull" | "startswith" | "is_within";
        value?: unknown;
    }[] | undefined;
    sort?: {
        fieldKey: string;
        direction: "asc" | "desc";
    } | undefined;
    pageSize?: number | undefined;
    maxItems?: number | undefined;
    cursor?: string | undefined;
    trash?: "include" | "exclude" | "only" | undefined;
} | {
    tableId: string;
    keyMode: "names" | "ids";
    filters?: {
        fieldKey: string;
        operator: "search" | "in" | "exact" | "different" | "contains" | "icontains" | "gte" | "gt" | "lt" | "lte" | "range" | "isnull" | "startswith" | "is_within";
        value?: unknown;
    }[] | undefined;
    sort?: {
        fieldKey: string;
        direction: "asc" | "desc";
    } | undefined;
    pageSize?: number | undefined;
    maxItems?: number | undefined;
    cursor?: string | undefined;
    trash?: "include" | "exclude" | "only" | undefined;
}) & {
    cursor?: string;
    pageSize?: number;
} & {
    maxItems?: number;
}, PaginatedSdkResult<{
    data: Record<string, unknown>;
    id: string;
    created_at: string;
    edited_at: string;
    deleted_at?: string | null | undefined;
}>, readonly []> & LeafSummary<"", "listTableRecords", readonly [PropertyPlugin<"api", ApiClient> & PluginSummary<"zapier/api", never>]>;

declare const createTableRecordsPlugin: MethodPlugin<"createTableRecords", {
    table: string;
    records: {
        data: Record<string, unknown>;
    }[];
    keyMode: "names" | "ids";
} | {
    tableId: string;
    records: {
        data: Record<string, unknown>;
    }[];
    keyMode: "names" | "ids";
}, Promise<{
    data: {
        data: Record<string, unknown>;
        id: string;
        created_at: string;
        edited_at: string;
        deleted_at?: string | null | undefined;
    }[];
}>, readonly []> & LeafSummary<"", "createTableRecords", readonly [PropertyPlugin<"api", ApiClient> & PluginSummary<"zapier/api", never>]>;

declare const deleteTableRecordsPlugin: MethodPlugin<"deleteTableRecords", {
    table: string;
    records: string[];
} | {
    tableId: string;
    recordIds: string[];
}, Promise<{
    success: boolean;
}>, readonly []> & LeafSummary<"", "deleteTableRecords", readonly [PropertyPlugin<"api", ApiClient> & PluginSummary<"zapier/api", never>]>;

declare const updateTableRecordsPlugin: MethodPlugin<"updateTableRecords", {
    table: string;
    records: {
        id: string;
        data: Record<string, unknown>;
    }[];
    keyMode: "names" | "ids";
} | {
    tableId: string;
    records: {
        id: string;
        data: Record<string, unknown>;
    }[];
    keyMode: "names" | "ids";
}, Promise<{
    data: {
        data: Record<string, unknown>;
        id: string;
        created_at: string;
        edited_at: string;
        deleted_at?: string | null | undefined;
    }[];
}>, readonly []> & LeafSummary<"", "updateTableRecords", readonly [PropertyPlugin<"api", ApiClient> & PluginSummary<"zapier/api", never>]>;

/**
 * Zapier's framework options: `adaptError` produces `Zapier*` branded errors
 * from kitcore's internal throw sites (validation, non-Error normalization)
 * so consumers never see a neutral `CoreError`. Every factory injects this
 * bag under `CORE_OPTIONS_ID` via `createSdk`'s `configuration`, which is
 * where the method boundary and `coreOptionsPluginRef` importers resolve it.
 *
 * Pagination shaping is intentionally NOT wired here: each paginated method
 * declares its own `adaptPage` (e.g. `adaptPage: adaptZapierPage`), so the adapter
 * travels with the plugin and stays type-checked, rather than relying on an
 * ambient SDK-wide default that a lifted-out plugin would silently lose.
 */
declare const zapierCoreOptions: CoreOptions;

/**
 * Detects which AI coding agent is executing the current process by inspecting
 * well-known environment variables set by each agent's runtime.
 *
 * Claude Code
 *   CLAUDECODE — set to "1" in all subprocesses spawned by Claude Code
 *     https://code.claude.com/docs/en/env-vars
 *
 * GitHub Copilot
 *   COPILOT_AGENT — set to "1" in VS Code agent terminal sessions
 *     https://github.com/microsoft/vscode/pull/316267
 *
 * Cursor
 *   CURSOR_AGENT — set to "1" by Cursor when executing terminal commands
 *     https://cursor.com/docs/agent/tools/terminal
 *
 * Codex CLI
 *   CODEX_SANDBOX — set to "seatbelt" (macOS) or a non-empty string (Linux/Windows)
 *     https://github.com/openai/codex/blob/main/codex-rs/core/src/spawn.rs
 *
 * Gemini CLI
 *   GEMINI_CLI — set to "1" in subprocesses spawned by Gemini CLI's shell tool
 *     https://github.com/google-gemini/gemini-cli/blob/main/packages/core/src/services/shellExecutionService.ts
 *
 * Augment
 *   AUGMENT_AGENT — set to "1" when Auggie executes shell commands via its launch-process tool
 *     https://docs.augmentcode.com/cli/reference
 *
 * Cline
 *   CLINE_ACTIVE — set to "true" when Cline is executing terminal commands
 *     https://github.com/cline/cline/pull/5367
 *
 * OpenCode
 *   OPENCODE_CLIENT — client identifier set by OpenCode (defaults to "cli")
 *     https://anomalyco-opencode.mintlify.app/cli/overview#environment-variables
 *
 * Returns null if no known agent is detected or process is unavailable.
 *
 * Never throws: try/catch guards against exotic environments (e.g. a Proxy on
 * globalThis.process) where property access could unexpectedly fail. Event
 * emission must never cascade into a thrown exception.
 */
declare function getAgent(): string | null;

/**
 * @deprecated `getRegistry` is now built into every sdk. Adding this plugin is
 * a no-op. Remove the `.addPlugin(registryPlugin)` call.
 *
 * A bare function plugin, not `definePlugin(fn)`: that overload is itself
 * deprecated and warns when CALLED, which for a module-scope call means at
 * import time, for every consumer, whether or not they use this plugin.
 */
declare const registryPlugin: (_sdk: {}) => {};

export { type Connection as $, type AggregatePlugin as A, type BaseSdkOptions as B, type ConnectionsProvider as C, type DeleteTriggerInboxResult as D, type EventCallback as E, type FieldsetItem as F, type GetActionInputFieldsSchemaOptions as G, type FindFirstAuthenticationPluginProvides as H, type FindUniqueAuthenticationPluginProvides as I, type Action as J, type App as K, type LeafSummary as L, type MethodPlugin as M, type Need as N, type Field as O, type PropertyPlugin as P, type Choice as Q, type RegistryResult as R, type SdkContext as S, type TriggerInboxCommandSharedFields as T, type ActionExecutionResult as U, type ActionField as V, type WatchTriggerInboxOptions as W, type ActionFieldChoice as X, type NeedsRequest as Y, type ZapierFetchInitOptions as Z, type NeedsResponse as _, type ApiClient as a, buildCapabilityMessage as a$, type ConnectionsResponse as a0, type UserProfile as a1, isPositional as a2, type PositionalMetadata as a3, createFunction as a4, createPaginatedFunction as a5, createPluginStack as a6, createCorePlugin as a7, addPlugin as a8, disposeSdk as a9, type Resolver$1 as aA, type ArrayResolver$1 as aB, type ResolverMetadata as aC, type StaticResolver$1 as aD, type DynamicResolver$1 as aE, type DynamicListResolver as aF, type DynamicSearchResolver as aG, type FieldsResolver as aH, type Resolver as aI, type DynamicMember as aJ, type PluginSurface as aK, createController as aL, type ControllerQuestion as aM, type ControllerAction as aN, type ControllerAnswerFn as aO, type ControllerMethodSummary as aP, type ControllerMethodDescription as aQ, type ControllerParameterDescription as aR, runInMethodScope as aS, runWithTelemetryContext as aT, getCallerContext as aU, runWithCallerContext as aV, type CallerContext as aW, toSnakeCase as aX, toTitleCase as aY, batch as aZ, type BatchOptions as a_, CoreDisposeError as aa, createSdk as ab, CONTEXT as ac, resolvePlugin as ad, fromFunctionPlugin as ae, defineLegacyMerge as af, getContext as ag, declarePlugin as ah, defineMethod as ai, defineMethodOverride as aj, defineProperty as ak, defineResolver as al, defineFormatter as am, declareMethod as an, declareProperty as ao, declareOptionalProperty as ap, selectExports as aq, omitExports as ar, getRegistryPlugin as as, zapierSdkPlugin as at, SDK_OPTIONS_ID as au, sdkOptionsPluginRef as av, type FormattedItem as aw, type BoundFormatter as ax, type Formatter as ay, type OutputFormatter as az, type PluginSummary as b, ParamsPropertySchema as b$, logDeprecation as b0, resetDeprecationWarnings as b1, RelayRequestSchema as b2, RelayFetchSchema as b3, createZapierSdkWithoutRegistry as b4, zapierCoreOptions as b5, CORE_OPTIONS_ID as b6, type FunctionRegistryEntry as b7, type FunctionDeprecation as b8, BaseSdkOptionsSchema as b9, type SseMessage as bA, type JsonSseMessage as bB, DEPRECATION_NOTICE_EVENT as bC, type DeprecationNoticePayload as bD, type AppItem as bE, type ConnectionItem as bF, type ActionItem$1 as bG, type InputFieldItem as bH, type InfoFieldItem as bI, type RootFieldItem as bJ, type UserProfileItem as bK, type SdkPage as bL, type PaginatedSdkFunction as bM, AppKeyPropertySchema as bN, AppPropertySchema as bO, ActionTypePropertySchema as bP, ActionKeyPropertySchema as bQ, ActionPropertySchema as bR, InputFieldPropertySchema as bS, ConnectionIdPropertySchema as bT, AuthenticationIdPropertySchema as bU, ConnectionPropertySchema as bV, InputsPropertySchema as bW, LimitPropertySchema as bX, OffsetPropertySchema as bY, OutputPropertySchema as bZ, DebugPropertySchema as b_, isCoreError as ba, getCoreErrorCode as bb, getCoreErrorCause as bc, CORE_ERROR_SYMBOL as bd, CoreErrorCode as be, CoreSignal as bf, CoreCancelledSignal as bg, isCoreSignal as bh, CORE_SIGNAL_SYMBOL as bi, type Plugin as bj, type PluginProvides as bk, type MethodOverridePlugin as bl, definePlugin as bm, createPluginMethod as bn, createPaginatedPluginMethod as bo, composePlugins as bp, type ActionItem as bq, type ActionTypeItem as br, type ResolvedAppLocator as bs, getAgent as bt, registryPlugin as bu, type RequestOptions as bv, type PollOptions as bw, createZapierApi as bx, getOrCreateApiClient as by, isPermanentHttpError as bz, type PaginatedSdkResult as c, formatErrorMessage as c$, ActionTimeoutMsPropertySchema as c0, TablePropertySchema as c1, RecordPropertySchema as c2, RecordsPropertySchema as c3, FieldsPropertySchema as c4, AppsPropertySchema as c5, TablesPropertySchema as c6, ConnectionsPropertySchema as c7, TriggerInboxPropertySchema as c8, TriggerInboxKeyPropertySchema as c9, type ConnectionsProperty as cA, type TriggerInboxProperty as cB, type TriggerInboxKeyProperty as cC, type TriggerInboxNameProperty as cD, type LeaseProperty as cE, type LeaseSecondsProperty as cF, type LeaseLimitProperty as cG, type ErrorOptions as cH, ZapierError as cI, ZapierValidationError as cJ, ZapierUnknownError as cK, ZapierAuthenticationError as cL, zapierAdaptError as cM, ZapierApiError as cN, ZapierAppNotFoundError as cO, ZapierNotFoundError as cP, ZapierResourceNotFoundError as cQ, ZapierConfigurationError as cR, ZapierBundleError as cS, ZapierTimeoutError as cT, ZapierActionError as cU, ZapierConflictError as cV, type RateLimitInfo as cW, ZapierRateLimitError as cX, type ApprovalStatus as cY, ZapierApprovalError as cZ, ZapierRelayError as c_, TriggerInboxNamePropertySchema as ca, LeasePropertySchema as cb, LeaseSecondsPropertySchema as cc, LeaseLimitPropertySchema as cd, type AppKeyProperty as ce, type AppProperty as cf, type ActionTypeProperty as cg, type ActionKeyProperty as ch, type ActionProperty as ci, type InputFieldProperty as cj, type ConnectionIdProperty as ck, type ConnectionProperty as cl, type AuthenticationIdProperty as cm, type InputsProperty as cn, type LimitProperty as co, type OffsetProperty as cp, type OutputProperty as cq, type DebugProperty as cr, type ParamsProperty as cs, type ActionTimeoutMsProperty as ct, type TableProperty as cu, type RecordProperty as cv, type RecordsProperty as cw, type FieldsProperty as cx, type AppsProperty as cy, type TablesProperty as cz, type ManifestProvider as d, triggerInboxResolver as d$, type CoreApiError as d0, ZapierSignal as d1, appsPlugin as d2, type ActionExecutionOptions as d3, type AppFactoryInput as d4, type FetchPluginProvides as d5, fetchPlugin as d6, listAppsPlugin as d7, type ListAppsPluginProvides as d8, listActionsPlugin as d9, manifestPluginRef as dA, manifestPlugin as dB, type UpdateManifestEntryOptions as dC, type UpdateManifestEntryResult as dD, DEFAULT_CONFIG_PATH as dE, type ManifestEntry as dF, type ActionEntry as dG, getProfilePlugin as dH, type ApiPluginOptions as dI, type ResolveCredentialsFn as dJ, API_ID as dK, apiPluginRef as dL, apiPlugin as dM, RESOLVE_CREDENTIALS_ID as dN, resolveCredentialsPluginRef as dO, resolveCredentialsPlugin as dP, appKeyResolver as dQ, actionTypeResolver as dR, actionKeyResolver as dS, connectionIdResolver as dT, connectionIdGenericResolver as dU, inputsResolver as dV, inputsAllOptionalResolver as dW, inputFieldKeyResolver as dX, clientCredentialsNameResolver as dY, clientIdResolver as dZ, tableIdResolver as d_, type ListActionsPluginProvides as da, listActionInputFieldsPlugin as db, type ListActionInputFieldsPluginProvides as dc, listActionInputFieldChoicesPlugin as dd, getActionInputFieldsSchemaPlugin as de, listConnectionsPlugin as df, type ListConnectionsPluginProvides as dg, listClientCredentialsPlugin as dh, createClientCredentialsPlugin as di, deleteClientCredentialsPlugin as dj, getAppPlugin as dk, getActionPlugin as dl, getConnectionPlugin as dm, findFirstConnectionPlugin as dn, findUniqueConnectionPlugin as dp, CONTEXT_CACHE_TTL_MS as dq, CONTEXT_CACHE_MAX_SIZE as dr, runActionPlugin as ds, type RunActionPluginProvides as dt, requestPlugin as du, type ManifestPluginOptions as dv, readManifestFromFile as dw, getPreferredManifestEntryKey as dx, findManifestEntry as dy, MANIFEST_ID as dz, type CapabilitiesContext as e, MAX_PAGE_LIMIT as e$, workflowIdResolver as e0, durableRunIdResolver as e1, workflowVersionIdResolver as e2, workflowRunIdResolver as e3, triggerMessagesResolver as e4, tableRecordIdResolver as e5, tableRecordIdsResolver as e6, tableFieldIdsResolver as e7, tableNameResolver as e8, tableFieldsResolver as e9, type PkceCredentialsObject as eA, isClientCredentials as eB, isPkceCredentials as eC, isCredentialsObject as eD, isCredentialsFunction as eE, type ResolveCredentialsOptions as eF, resolveCredentialsFromEnv as eG, resolveCredentials as eH, getBaseUrlFromCredentials as eI, getClientIdFromCredentials as eJ, ClientCredentialsObjectSchema as eK, PkceCredentialsObjectSchema as eL, CredentialsObjectSchema as eM, ResolvedCredentialsSchema as eN, CredentialsFunctionSchema as eO, type CredentialsFunction as eP, CredentialsSchema as eQ, ConnectionEntrySchema as eR, type ConnectionEntry as eS, ConnectionsMapSchema as eT, type ConnectionsMap as eU, type ResolveConnection as eV, CONNECTIONS_ID as eW, connectionsPluginRef as eX, connectionsPlugin as eY, ZAPIER_BASE_URL as eZ, getZapierSdkService as e_, tableRecordsResolver as ea, tableUpdateRecordsResolver as eb, tableFiltersResolver as ec, tableSortResolver as ed, type ResolveAuthTokenOptions as ee, AuthMechanism as ef, type ResolvedAuth as eg, clearTokenCache as eh, invalidateCachedToken as ei, injectCliLogin as ej, isCliLoginAvailable as ek, getTokenFromCliLogin as el, resolveAuth as em, resolveAuthToken as en, invalidateCredentialsToken as eo, type ZapierCacheEntry as ep, type ZapierCacheSetOptions as eq, createMemoryCache as er, type SdkEvent as es, type AuthEvent as et, type ApiEvent as eu, type LoadingEvent as ev, type Credentials as ew, type ResolvedCredentials as ex, type CredentialsObject as ey, type ClientCredentialsObject as ez, type CoreOptions as f, DEFAULT_PAGE_SIZE as f0, DEFAULT_ACTION_TIMEOUT_MS as f1, ZAPIER_MAX_NETWORK_RETRIES as f2, ZAPIER_MAX_NETWORK_RETRY_DELAY_MS as f3, MAX_CONCURRENCY_LIMIT as f4, parseConcurrencyEnvVar as f5, ZAPIER_MAX_CONCURRENT_REQUESTS as f6, getZapierApprovalMode as f7, getZapierOpenAutoModeApprovalsInBrowser as f8, getZapierDefaultApprovalMode as f9, buildApplicationLifecycleEvent as fA, buildErrorEventWithContext as fB, buildErrorEvent as fC, createBaseEvent as fD, buildMethodCalledEvent as fE, type BaseEvent as fF, type MethodCalledEvent as fG, generateEventId as fH, getCurrentTimestamp as fI, getReleaseId as fJ, getOsInfo as fK, getPlatformVersions as fL, isCi as fM, getCiPlatform as fN, getMemoryUsage as fO, getCpuTime as fP, getTtyContext as fQ, createZapierSdk as fR, type ZapierSdkOptions as fS, type ZapierSdk as fT, DEFAULT_APPROVAL_TIMEOUT_MS as fa, DEFAULT_MAX_APPROVAL_RETRIES as fb, listTablesPlugin as fc, getTablePlugin as fd, createTablePlugin as fe, deleteTablePlugin as ff, listTableFieldsPlugin as fg, createTableFieldsPlugin as fh, deleteTableFieldsPlugin as fi, getTableRecordPlugin as fj, listTableRecordsPlugin as fk, createTableRecordsPlugin as fl, deleteTableRecordsPlugin as fm, updateTableRecordsPlugin as fn, cleanupEventListeners as fo, type EventEmissionContext as fp, type EventEmitter as fq, EVENT_EMISSION_ID as fr, eventEmissionPluginRef as fs, eventEmissionPlugin as ft, eventEmissionHookPlugin as fu, type EventTransport as fv, type EventContext as fw, type ApplicationLifecycleEventData as fx, type EnhancedErrorEventData as fy, type MethodCalledEventData as fz, type ActionProxy as g, type ZapierSdkApps as h, type DrainTriggerInboxOptions as i, type Manifest as j, type EventEmissionConfig as k, type ZapierCache as l, type ListActionsOptions as m, type ListActionInputFieldsOptions as n, type ListActionInputFieldChoicesOptions as o, type PluginMeta as p, DrainTriggerInboxSchema as q, WatchTriggerInboxSchema as r, ZapierAbortDrainSignal as s, ZapierReleaseTriggerMessageSignal as t, type DrainTriggerInboxCallback as u, type DrainTriggerInboxErrorObserver as v, type LeasedTriggerMessageItem as w, type TriggerMessageStatus as x, type ListAuthenticationsPluginProvides as y, type GetAuthenticationPluginProvides as z };
