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

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>;
type ConnectionItem$1 = z.infer<typeof ConnectionItemSchema>;

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>>]>;
type InputFieldItem$1 = z.infer<typeof InputFieldItemSchema>;

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;
}
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;
}
/**
 * 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.
 */
type BindingsOf<TDep> = TDep extends MethodPlugin<infer TName, infer TInput, infer TOutput, infer TPositional> ? {
    [P in TName]: SurfaceCall<TInput, TOutput, TPositional>;
} : TDep extends PropertyPlugin<infer TName, infer TValue> ? {
    [P in TName]: TValue;
} : TDep extends AggregatePlugin<string, infer TExports> ? {
    [K in keyof TExports]: ExportSurface<TExports[K]>;
} : never;
/**
 * 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 resolver's kind, the discriminant of the {@link Resolver} union. Scalars
 * (`dynamic` / `static` / `constant`) resolve one value; `info` resolves none
 * (display-only); `object` / `array` compose nested resolvers. Names borrow
 * JSON Schema's structural vocabulary (`object`/`array`/`properties`/`items`),
 * but a resolver carries behavior (fetch/prompt), not validation.
 */
type ResolverType = "dynamic" | "static" | "constant" | "info" | "object" | "array";
/**
 * 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`. */
    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;
}
/**
 * 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).
 *
 * Carries every kind's fields on one loose interface, discriminated by `type`.
 * The CLI rewrite (the consumer) narrows this into per-kind shapes; until then
 * a single shape keeps the binder simple. `listItems` produces the candidate
 * list for `dynamic`; `getProperties` builds the (unbound) property map for
 * `object`. `properties` / `definitions` are bound; `items` is bound (or a ref).
 */
interface BoundResolver {
    type: ResolverType;
    /** 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[];
    inputType?: "text" | "password" | "email" | "search";
    placeholder?: string;
    value?: unknown;
    text?: string;
    properties?: Record<string, BoundField>;
    definitions?: Record<string, BoundResolver>;
    items?: BoundResolver | ResolverRef;
    minItems?: number;
    maxItems?: number;
    /** For an array: the element's coarse value type, used to coerce a free-text
     * item answer before validation (see {@link ArrayResolver.itemValueType}). */
    itemValueType?: string;
    getContext?: (bag: {
        input: Record<string, unknown>;
    }) => PromiseLike<unknown>;
    listItems?: (bag: {
        input: Record<string, unknown>;
        context?: unknown;
        search?: string;
        cursor?: string;
    }) => ListItemsResult<unknown>;
    getProperties?: (bag: {
        input: Record<string, unknown>;
    }) => PromiseLike<Record<string, Field$1>>;
    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>;
}
/**
 * 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;
    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;
    /** Validates `input` before `run` and drives the authoring `input` type. */
    inputSchema?: z.ZodType;
    /** 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 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;
    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;
    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;
    /** 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;
}) => any;
/**
 * The authoring type for an aggregate's `middleware`: a map
 * whose keys are the method bindings among `imports` (you can only wrap a
 * method you import) and whose values are contract-preserving wraps. `next` and
 * `input` take the target's input and the wrap must return the target's output,
 * so a wrap that changes the public signature, or that targets a non-imported /
 * non-method binding, does not compile.
 */
type MiddlewareMap<TImports> = {
    [K in keyof TImports as TImports[K] extends (input: any) => any ? K : never]?: TImports[K] extends (input: infer TInput) => infer TOutput ? (bag: {
        imports: TImports;
        next: (input: TInput) => TOutput;
        input: TInput;
    }) => TOutput : never;
};
/** 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
     * middleware wrap's `imports` is built from, and how a middleware target
     * binding resolves to a method id. */
    importBindings: readonly ImportBinding[];
    exports: TExports;
    middleware?: Record<string, MiddlewareFn>;
}
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>;
type AnyPlugin = AnyLeafPlugin | AnyAggregatePlugin | AnyLegacyPlugin;
/**
 * 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 aggregate
 * (whose `imports` the wrap receives, built live at call time). */
interface MiddlewareWrap {
    run: MiddlewareFn;
    owner: AnyAggregatePlugin;
}
/** 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;
    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;
}
/** 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>;
    [key: string]: any;
}
/** 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 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 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]>;
} : 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>>;
/** 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.
 */

/**
 * 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.
 */
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.
 */
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.
     */
    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`.
     */
    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 }) => { ... },
 *       }),
 *   );
 */
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", { ... }),
 *   });
 */
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.
 */
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 `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>;
    resolvers?: Record<string, Resolver>;
    formatter?: Formatter;
    output?: "raw" | {
        type: "raw";
    };
    positional?: TPositional;
    setup?: (bag: {
        imports: ImportsOf<TImports>;
    }) => TState;
    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, TData, 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;
    run: (bag: MethodRunBag<ImportsOf<TImports>, TInput, TState>) => TData;
} & LeafMetaFields): MethodPlugin<TName, TInput, Promise<{
    data: Awaited<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;
    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;
    run: (bag: MethodRunBag<ImportsOf<TImports>, TInput & PageFetchInput, TState>) => TResponse | Promise<TResponse>;
} & LeafMetaFields): MethodPlugin<TName, TInput & PaginatedCallInput, PaginatedSdkResult<TItem>> & LeafSummary<TNamespace, TName, TImports>;
/**
 * 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. */
    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;
/**
 * 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;
    get: (bag: {
        imports: ImportsOf<TImports>;
        state: TState;
    }) => TValue;
} & 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>;
/**
 * Define a plugin. Two forms, one function:
 *
 * - **Object form** — a module that re-exports child plugins and may wrap
 *   imported methods with `middleware`. `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 a pure-middleware module can omit it.
 *   Re-exporting implies a dependency on the child. A middleware key names the
 *   target's binding, a direct dependency.
 * - **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>`. This is how the existing ~90 plugins are
 *   written; they run on the module model through the legacy bridge.
 */
declare function definePlugin<TSdk, TProvides extends PluginProvides>(fn: (sdk: TSdk & {
    context: {
        meta: Record<string, PluginMeta>;
    };
}) => TProvides): (sdk: TSdk & {
    context: {
        meta: Record<string, PluginMeta>;
    };
}) => TProvides;
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>;
    middleware?: MiddlewareMap<ImportsOf<TImports>>;
}): AggregatePlugin<TName, ArrayExports<TExports>> & AggregateSummary<TNamespace, TName, TImports, TExports>;

/**
 * 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.
 */
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.
 */
declare function defineLegacyMerge<TProvides extends PluginProvides, const TPlugin extends AnyPlugin>(args: {
    name: string;
    namespace?: string;
    legacy: (sdk: any) => TProvides;
    plugin: TPlugin;
}): LegacyMergePlugin<TProvides, TPlugin>;

/**
 * Escape hatch. A built-in privileged plugin whose value is the live
 * `SdkContext`: the raw plugin graph plus the legacy compat fields. Importing it
 * (`imports.context`) lets a body reach internals the model otherwise keeps
 * private.
 *
 * Prefer not to depend on this. The `SdkContext` shape is an implementation
 * detail and may change without notice; import the specific plugins you need,
 * and use `getRegistryPlugin` for surface introspection. It exists mainly so a
 * not-yet-migrated plugin can read legacy `context.*` fields during migration.
 * Its value is injected at materialization, not authored.
 */
declare const dangerousContextPlugin: PropertyPlugin<"context", SdkContext>;
/** The off-surface escape hatch to an SDK's `SdkContext`. */
declare function getContext(sdk: unknown): SdkContext;
/**
 * 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.
 */
declare function createSdk<P extends AnyMethodPlugin>(root: P & CompletenessOf<P>): MethodSdkOf<P>;
declare function createSdk<P extends AnyPropertyPlugin>(root: P & CompletenessOf<P>): PropertySdkOf<P>;
declare function createSdk<P extends AnyAggregatePlugin>(root: P & CompletenessOf<P>): AggregateSdkOf<P>;
declare function createSdk<TSurface>(root: LegacyPlugin<TSurface>): TSurface & SdkInternals;
declare function createSdk<TProvides extends PluginProvides, TPlugin extends AnyPlugin>(root: LegacyMergePlugin<TProvides, TPlugin>): 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). */
type ControllerQuestion = {
    type: "select";
    message: string;
    /** What this field is, for an agent that lacks the schema. */
    description?: string;
    choices: ControllerChoice[];
    actions: ControllerAffordance[];
    /** 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[];
} | {
    type: "input";
    message: string;
    description?: string;
    inputType: "text" | "password" | "email";
    placeholder?: string;
    actions: ControllerAffordance[];
} | {
    type: "collection";
    message: string;
    description?: string;
    count: number;
    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;
    /** 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 `context.core.*`, 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;
}): (callOptions?: TOptions) => Promise<TResult>;

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

/**
 * ------------------------------
 * Core configuration plugin
 * ------------------------------
 *
 * `createCorePlugin` is how a head supplies kitcore-level behavior knobs
 * (`adaptError` for branded errors, future entries similarly). The plugin
 * writes to `context.core`; kitcore reads from that path at every method
 * invocation. Consumers configure through this factory's typed `CoreOptions`,
 * never by touching the context path.
 *
 *   createPluginStack()
 *     .use(createCorePlugin({ adaptError: myAdaptError }))
 *     .use(listAppsPlugin);
 *
 * Installing this plugin is optional. Kitcore reads `context.core.*`
 * with optional chaining, so an SDK without `createCorePlugin`
 * installed just falls back to kitcore's built-in behavior.
 *
 * Note: pagination shaping is NOT configured here. Each paginated method
 * declares its own `adaptPage` on `createPaginatedPluginMethod`, so the
 * adapter travels with the plugin (and stays type-checked) rather than
 * relying on an ambient SDK-wide default.
 */

/**
 * 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;
}
/**
 * Register kitcore-level configuration. Writes the options to
 * `context.core` internally; consumers never reference the path.
 *
 * Reads of `context.core.adaptError` are
 * live: kitcore's method wrappers consult them at every invocation,
 * not at registration time. A `createCorePlugin` registered after a
 * method plugin still applies to that method's subsequent calls.
 */
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 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 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 TriggerMessageItemSchema: 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>;
}, z.core.$strip>;
type TriggerMessageItem = z.infer<typeof TriggerMessageItemSchema>;
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>;
/**
 * 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;
};

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;
}

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

declare const appsPlugin: (sdk: {
    fetch: (url: string | URL, init?: ZapierFetchInitOptions) => Promise<Response>;
    context: {
        meta: {
            fetch: {
                description: string;
                packages: string[];
                categories: {
                    key: string;
                    title: string;
                }[];
                returnType: string;
                inputParameters: ({
                    name: string;
                    schema: zod.ZodUnion<readonly [zod.ZodString, zod.ZodCustom<URL, URL>]>;
                } | {
                    name: string;
                    schema: zod.ZodOptional<zod.ZodObject<{
                        method: zod.ZodOptional<zod.ZodEnum<{
                            GET: "GET";
                            POST: "POST";
                            DELETE: "DELETE";
                            PUT: "PUT";
                            PATCH: "PATCH";
                            HEAD: "HEAD";
                            OPTIONS: "OPTIONS";
                        }>>;
                        headers: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodString>>;
                        body: zod.ZodOptional<zod.ZodUnion<readonly [zod.ZodString, zod.ZodCustom<FormData, FormData>, zod.ZodCustom<URLSearchParams, URLSearchParams>, zod.ZodRecord<zod.ZodString, zod.ZodUnknown>]>>;
                        connectionId: zod.ZodOptional<zod.ZodUnion<readonly [zod.ZodString, zod.ZodNumber]>>;
                        connection: zod.ZodOptional<zod.ZodUnion<readonly [zod.ZodString, zod.ZodNumber]>>;
                        authenticationId: zod.ZodOptional<zod.ZodUnion<readonly [zod.ZodString, zod.ZodNumber]>>;
                        callbackUrl: zod.ZodOptional<zod.ZodString>;
                        maxTime: zod.ZodOptional<zod.ZodNumber>;
                    }, zod_v4_core.$strip>>;
                })[];
            };
        };
    };
} & {
    runAction: (options?: (({
        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;
    }) | undefined) => PaginatedSdkResult<unknown>;
} & {
    context: {
        meta: {
            runAction: PluginMeta<unknown>;
        };
    };
} & {
    context: {
        meta: Record<string, PluginMeta>;
    };
}) => {
    apps: ActionProxy & ZapierSdkApps;
    context: {
        meta: {
            "apps.{appKey}": {
                categories: string[];
                packages: string[];
                type: "function";
                inputSchema: zod.ZodObject<{
                    connectionId: zod.ZodOptional<zod.ZodUnion<readonly [zod.ZodString, zod.ZodNumber]>>;
                    connection: zod.ZodOptional<zod.ZodUnion<readonly [zod.ZodString, zod.ZodNumber]>>;
                    authenticationId: zod.ZodOptional<zod.ZodUnion<readonly [zod.ZodString, zod.ZodNumber]>>;
                }, zod_v4_core.$strip>;
                returnType: string;
            };
            "apps.{appKey}.{actionType}.{actionKey}": {
                categories: string[];
                packages: string[];
                type: "list";
                inputSchema: zod.ZodObject<{
                    inputs: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodUnknown>>;
                    connectionId: zod.ZodOptional<zod.ZodUnion<readonly [zod.ZodString, zod.ZodNumber]>>;
                    connection: zod.ZodOptional<zod.ZodUnion<readonly [zod.ZodString, zod.ZodNumber]>>;
                    authenticationId: zod.ZodOptional<zod.ZodUnion<readonly [zod.ZodString, zod.ZodNumber]>>;
                    timeoutMs: zod.ZodOptional<zod.ZodNumber>;
                }, zod_v4_core.$strip>;
                itemType: string;
                outputSchema: zod.ZodUnknown;
            };
        };
    };
};
type AppsPluginProvides = ReturnType<typeof appsPlugin>;

interface ZapierSdkApps {
}

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

/**
 * 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";
type ManifestEntry = {
    implementationName: string;
    version?: string;
};
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;
};
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.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>;

type ManifestPluginOptions = z.infer<typeof ManifestPluginOptionsSchema>;
interface UpdateManifestEntryOptions {
    appKey: string;
    entry: ManifestEntry;
    configPath?: string;
    skipWrite?: boolean;
    manifest?: Manifest;
}
interface UpdateManifestEntryResult {
    key: string;
    entry: ManifestEntry;
    manifest: Manifest;
}
interface AddActionEntryOptions {
    name: string;
    entry: ActionEntry;
    configPath?: string;
    skipWrite?: boolean;
    manifest?: Manifest;
}
interface AddActionEntryResult {
    name: string;
    entry: ActionEntry;
    manifest: Manifest;
}
/**
 * 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 manifestPlugin: (sdk: {
    context: {
        api: ApiClient;
        options?: {
            manifestPath?: string;
            manifest?: Manifest;
        };
    };
} & {
    context: {
        meta: Record<string, PluginMeta>;
    };
}) => {
    context: {
        getResolvedManifest: () => Promise<Manifest | null>;
        getVersionedImplementationId: (appKey: string) => Promise<string | null>;
        resolveAppKeys: ({ appKeys }: {
            appKeys: string[];
        }) => Promise<ResolvedAppLocator[]>;
        updateManifestEntry: (options: UpdateManifestEntryOptions) => Promise<UpdateManifestEntryResult>;
        addActionEntry: (options: AddActionEntryOptions) => Promise<AddActionEntryResult>;
        findActionEntry: ({ name, manifest, }: {
            name: string;
            manifest: Manifest;
        }) => ActionEntry | null;
        listActionEntries: ({ configPath, }?: {
            configPath?: string;
        }) => Promise<Array<[string, ActionEntry]>>;
        deleteActionEntry: ({ name, configPath, skipWrite, }: {
            name: string;
            configPath?: string;
            skipWrite?: boolean;
        }) => Promise<Manifest>;
        hasActionEntry: ({ name, manifest, }: {
            name: string;
            manifest: Manifest;
        }) => boolean;
        findManifestEntry: typeof findManifestEntry;
        readManifestFromFile: typeof readManifestFromFile;
        getManifestConnections: () => Promise<Record<string, {
            connectionId: string | number;
        }> | null>;
    };
};
type ManifestPluginProvides = ReturnType<typeof manifestPlugin>;

declare const connectionsPlugin: (sdk: {
    context: Pick<ManifestPluginProvides["context"], "getManifestConnections">;
} & {
    context: {
        meta: Record<string, PluginMeta>;
    };
}) => {
    context: {
        resolveConnection: (name: string) => Promise<{
            connectionId: string | number;
        } | undefined>;
        getConnectionsMap: () => Promise<Record<string, {
            connectionId: string | number;
        }> | null>;
    };
};
type ConnectionsPluginProvides = ReturnType<typeof connectionsPlugin>;

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;
}
/**
 * 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.
 */
declare const fetchPlugin: (sdk: {
    context: {
        api: ApiClient;
        hooks: MethodHooks;
        core?: {
            adaptError?: AdaptError;
        };
    } & ConnectionsPluginProvides["context"];
} & {
    context: {
        meta: Record<string, PluginMeta>;
    };
}) => {
    fetch: (url: string | URL, init?: ZapierFetchInitOptions) => Promise<Response>;
    context: {
        meta: {
            fetch: {
                description: string;
                packages: string[];
                categories: {
                    key: string;
                    title: string;
                }[];
                returnType: string;
                inputParameters: ({
                    name: string;
                    schema: z.ZodUnion<readonly [z.ZodString, z.ZodCustom<URL, URL>]>;
                } | {
                    name: string;
                    schema: z.ZodOptional<z.ZodObject<{
                        method: z.ZodOptional<z.ZodEnum<{
                            GET: "GET";
                            POST: "POST";
                            DELETE: "DELETE";
                            PUT: "PUT";
                            PATCH: "PATCH";
                            HEAD: "HEAD";
                            OPTIONS: "OPTIONS";
                        }>>;
                        headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
                        body: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodCustom<FormData, FormData>, z.ZodCustom<URLSearchParams, URLSearchParams>, 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]>>;
                        callbackUrl: z.ZodOptional<z.ZodString>;
                        maxTime: z.ZodOptional<z.ZodNumber>;
                    }, z.core.$strip>>;
                })[];
            };
        };
    };
};
type FetchPluginProvides = ReturnType<typeof fetchPlugin>;

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>;

/**
 * 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;
}
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;
    stdin_is_tty?: boolean | null;
    stdout_is_tty?: boolean | null;
    agent?: 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;
}

/**
 * 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;
}
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;
}
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>;
    };
    hooks: {
        onMethodEnd: OnMethodEnd;
    };
}
declare const eventEmissionPlugin: (sdk: {
    context: {
        options?: BaseSdkOptions;
    };
} & {
    context: {
        meta: Record<string, PluginMeta>;
    };
}) => {
    context: EventEmissionContext;
};
type EventEmissionProvides = ReturnType<typeof eventEmissionPlugin>;

declare const listAppsPlugin: (sdk: {
    context: {
        api: ApiClient;
        resolveCredentials: () => Promise<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;
        } | undefined>;
    };
} & {
    context: {
        getResolvedManifest: () => Promise<Manifest | null>;
        getVersionedImplementationId: (appKey: string) => Promise<string | null>;
        resolveAppKeys: ({ appKeys }: {
            appKeys: string[];
        }) => Promise<ResolvedAppLocator[]>;
        updateManifestEntry: (options: UpdateManifestEntryOptions) => Promise<UpdateManifestEntryResult>;
        addActionEntry: (options: AddActionEntryOptions) => Promise<AddActionEntryResult>;
        findActionEntry: ({ name, manifest, }: {
            name: string;
            manifest: Manifest;
        }) => ActionEntry | null;
        listActionEntries: ({ configPath, }?: {
            configPath?: string;
        }) => Promise<Array<[string, ActionEntry]>>;
        deleteActionEntry: ({ name, configPath, skipWrite, }: {
            name: string;
            configPath?: string;
            skipWrite?: boolean;
        }) => Promise<Manifest>;
        hasActionEntry: ({ name, manifest, }: {
            name: string;
            manifest: Manifest;
        }) => boolean;
        findManifestEntry: typeof findManifestEntry;
        readManifestFromFile: typeof readManifestFromFile;
        getManifestConnections: () => Promise<Record<string, {
            connectionId: string | number;
        }> | null>;
    };
} & {
    context: EventEmissionContext;
} & {
    context: {
        meta: Record<string, PluginMeta>;
    };
}) => {
    listApps: (options?: ({
        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;
    }>;
} & {
    context: {
        meta: {
            listApps: PluginMeta<unknown>;
        };
    };
};
type ListAppsPluginProvides = ReturnType<typeof listAppsPlugin>;

declare const listActionsPlugin: (sdk: {
    context: {
        getResolvedManifest: () => Promise<Manifest | null>;
        getVersionedImplementationId: (appKey: string) => Promise<string | null>;
        resolveAppKeys: ({ appKeys }: {
            appKeys: string[];
        }) => Promise<ResolvedAppLocator[]>;
        updateManifestEntry: (options: UpdateManifestEntryOptions) => Promise<UpdateManifestEntryResult>;
        addActionEntry: (options: AddActionEntryOptions) => Promise<AddActionEntryResult>;
        findActionEntry: ({ name, manifest, }: {
            name: string;
            manifest: Manifest;
        }) => ActionEntry | null;
        listActionEntries: ({ configPath, }?: {
            configPath?: string;
        }) => Promise<Array<[string, ActionEntry]>>;
        deleteActionEntry: ({ name, configPath, skipWrite, }: {
            name: string;
            configPath?: string;
            skipWrite?: boolean;
        }) => Promise<Manifest>;
        hasActionEntry: ({ name, manifest, }: {
            name: string;
            manifest: Manifest;
        }) => boolean;
        findManifestEntry: typeof findManifestEntry;
        readManifestFromFile: typeof readManifestFromFile;
        getManifestConnections: () => Promise<Record<string, {
            connectionId: string | number;
        }> | null>;
    };
} & {
    context: {
        api: ApiClient;
        getVersionedImplementationId: GetVersionedImplementationId;
    };
} & {
    context: EventEmissionContext;
} & {
    getApp: (options?: {
        app: string;
    } | {
        appKey: string;
    } | undefined) => 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;
        };
    }>;
} & {
    context: {
        meta: {
            getApp: PluginMeta<unknown>;
        };
    };
} & {
    listApps: (options?: ({
        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;
    }>;
} & {
    context: {
        meta: {
            listApps: PluginMeta<unknown>;
        };
    };
} & {
    context: {
        meta: Record<string, PluginMeta>;
    };
}) => {
    listActions: (options?: (({
        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;
    }) | undefined) => 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;
    }>;
} & {
    context: {
        meta: {
            listActions: PluginMeta<unknown>;
        };
    };
};
type ListActionsPluginProvides = ReturnType<typeof listActionsPlugin>;

declare const listActionInputFieldsPlugin: (sdk: {
    getApp: (options?: {
        app: string;
    } | {
        appKey: string;
    } | undefined) => 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;
        };
    }>;
} & {
    context: {
        meta: {
            getApp: PluginMeta<unknown>;
        };
    };
} & {
    getAction: (options?: {
        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;
    } | undefined) => 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;
        };
    }>;
} & {
    context: {
        meta: {
            getAction: PluginMeta<unknown>;
        };
    };
} & {
    listApps: (options?: ({
        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;
    }>;
} & {
    context: {
        meta: {
            listApps: PluginMeta<unknown>;
        };
    };
} & {
    listActions: (options?: (({
        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;
    }) | undefined) => 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;
    }>;
} & {
    context: {
        meta: {
            listActions: PluginMeta<unknown>;
        };
    };
} & {
    listConnections: (options?: ({
        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;
    }>;
} & {
    context: {
        meta: {
            listConnections: PluginMeta<unknown>;
        };
    };
} & {
    context: {
        api: ApiClient;
        getVersionedImplementationId: GetVersionedImplementationId;
    } & ConnectionsPluginProvides["context"];
} & {
    context: EventEmissionContext;
} & {
    context: {
        meta: Record<string, PluginMeta>;
    };
}) => {
    listActionInputFields: (options?: (({
        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;
    }) | undefined) => 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>;
} & {
    context: {
        meta: {
            listActionInputFields: PluginMeta<unknown>;
        };
    };
};
type ListActionInputFieldsPluginProvides = ReturnType<typeof listActionInputFieldsPlugin>;

declare const listActionInputFieldChoicesPlugin: (sdk: {
    getAction: (options?: {
        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;
    } | undefined) => 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;
        };
    }>;
} & {
    context: {
        meta: {
            getAction: PluginMeta<unknown>;
        };
    };
} & {
    getApp: (options?: {
        app: string;
    } | {
        appKey: string;
    } | undefined) => 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;
        };
    }>;
} & {
    context: {
        meta: {
            getApp: PluginMeta<unknown>;
        };
    };
} & {
    listApps: (options?: ({
        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;
    }>;
} & {
    context: {
        meta: {
            listApps: PluginMeta<unknown>;
        };
    };
} & {
    listActions: (options?: (({
        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;
    }) | undefined) => 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;
    }>;
} & {
    context: {
        meta: {
            listActions: PluginMeta<unknown>;
        };
    };
} & {
    listConnections: (options?: ({
        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;
    }>;
} & {
    context: {
        meta: {
            listConnections: PluginMeta<unknown>;
        };
    };
} & {
    listActionInputFields: (options?: (({
        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;
    }) | undefined) => 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>;
} & {
    context: {
        meta: {
            listActionInputFields: PluginMeta<unknown>;
        };
    };
} & {
    context: {
        api: ApiClient;
        getVersionedImplementationId: GetVersionedImplementationId;
    } & ConnectionsPluginProvides["context"];
} & {
    context: EventEmissionContext;
} & {
    context: {
        meta: Record<string, PluginMeta>;
    };
}) => {
    listActionInputFieldChoices: (options?: (({
        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;
    }) | undefined) => PaginatedSdkResult<{
        key?: string | undefined;
        label?: string | undefined;
        sample?: string | undefined;
        value?: string | undefined;
    }>;
} & {
    context: {
        meta: {
            listActionInputFieldChoices: PluginMeta<unknown>;
        };
    };
};
type ListActionInputFieldChoicesPluginProvides = ReturnType<typeof listActionInputFieldChoicesPlugin>;

declare const getActionInputFieldsSchemaPlugin: (sdk: {
    getAction: (options?: {
        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;
    } | undefined) => 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;
        };
    }>;
} & {
    context: {
        meta: {
            getAction: PluginMeta<unknown>;
        };
    };
} & {
    getApp: (options?: {
        app: string;
    } | {
        appKey: string;
    } | undefined) => 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;
        };
    }>;
} & {
    context: {
        meta: {
            getApp: PluginMeta<unknown>;
        };
    };
} & {
    listApps: (options?: ({
        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;
    }>;
} & {
    context: {
        meta: {
            listApps: PluginMeta<unknown>;
        };
    };
} & {
    listActions: (options?: (({
        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;
    }) | undefined) => 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;
    }>;
} & {
    context: {
        meta: {
            listActions: PluginMeta<unknown>;
        };
    };
} & {
    listConnections: (options?: ({
        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;
    }>;
} & {
    context: {
        meta: {
            listConnections: PluginMeta<unknown>;
        };
    };
} & {
    context: {
        api: ApiClient;
        getVersionedImplementationId: GetVersionedImplementationId;
    } & ConnectionsPluginProvides["context"];
} & {
    context: EventEmissionContext;
} & {
    context: {
        meta: Record<string, PluginMeta>;
    };
}) => {
    getActionInputFieldsSchema: (options?: {
        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;
    } | undefined) => Promise<{
        data: Record<string, unknown>;
    }>;
} & {
    context: {
        meta: {
            getActionInputFieldsSchema: PluginMeta<unknown>;
        };
    };
};
type GetActionInputFieldsSchemaPluginProvides = ReturnType<typeof getActionInputFieldsSchemaPlugin>;

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: (sdk: {
    context: {
        getResolvedManifest: () => Promise<Manifest | null>;
        getVersionedImplementationId: (appKey: string) => Promise<string | null>;
        resolveAppKeys: ({ appKeys }: {
            appKeys: string[];
        }) => Promise<ResolvedAppLocator[]>;
        updateManifestEntry: (options: UpdateManifestEntryOptions) => Promise<UpdateManifestEntryResult>;
        addActionEntry: (options: AddActionEntryOptions) => Promise<AddActionEntryResult>;
        findActionEntry: ({ name, manifest, }: {
            name: string;
            manifest: Manifest;
        }) => ActionEntry | null;
        listActionEntries: ({ configPath, }?: {
            configPath?: string;
        }) => Promise<Array<[string, ActionEntry]>>;
        deleteActionEntry: ({ name, configPath, skipWrite, }: {
            name: string;
            configPath?: string;
            skipWrite?: boolean;
        }) => Promise<Manifest>;
        hasActionEntry: ({ name, manifest, }: {
            name: string;
            manifest: Manifest;
        }) => boolean;
        findManifestEntry: typeof findManifestEntry;
        readManifestFromFile: typeof readManifestFromFile;
        getManifestConnections: () => Promise<Record<string, {
            connectionId: string | number;
        }> | null>;
    };
} & {
    getApp: (options?: {
        app: string;
    } | {
        appKey: string;
    } | undefined) => 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;
        };
    }>;
} & {
    context: {
        meta: {
            getApp: PluginMeta<unknown>;
        };
    };
} & {
    listApps: (options?: ({
        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;
    }>;
} & {
    context: {
        meta: {
            listApps: PluginMeta<unknown>;
        };
    };
} & {
    context: {
        api: ApiClient;
        getVersionedImplementationId: GetVersionedImplementationId;
    } & CapabilitiesContext & ConnectionsPluginProvides["context"];
} & {
    context: EventEmissionContext;
} & {
    context: {
        meta: Record<string, PluginMeta>;
    };
}) => {
    listConnections: (options?: ({
        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;
    }>;
} & {
    context: {
        meta: {
            listConnections: PluginMeta<unknown>;
        };
    };
};
type ListConnectionsPluginProvides = ReturnType<typeof listConnectionsPlugin>;

declare const listClientCredentialsPlugin: (sdk: {
    context: {
        api: ApiClient;
    };
} & {
    context: EventEmissionContext;
} & {
    context: {
        meta: Record<string, PluginMeta>;
    };
}) => {
    listClientCredentials: (options?: ({
        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;
    }>;
} & {
    context: {
        meta: {
            listClientCredentials: PluginMeta<unknown>;
        };
    };
};
type ListClientCredentialsPluginProvides = ReturnType<typeof listClientCredentialsPlugin>;

declare const createClientCredentialsPlugin: (sdk: {
    context: {
        api: ApiClient;
    };
} & {
    context: EventEmissionContext;
} & {
    context: {
        meta: Record<string, PluginMeta>;
    };
}) => {
    createClientCredentials: (options?: {
        name: string;
        allowedScopes: ("external" | "credentials")[];
        policy?: Record<string, unknown> | undefined;
    } | undefined) => Promise<{
        data: {
            client_id: string;
            name: string;
            client_secret: string;
        };
    }>;
} & {
    context: {
        meta: {
            createClientCredentials: PluginMeta<unknown>;
        };
    };
};
type CreateClientCredentialsPluginProvides = ReturnType<typeof createClientCredentialsPlugin>;

declare const deleteClientCredentialsPlugin: (sdk: {
    context: {
        api: ApiClient;
    };
} & {
    context: EventEmissionContext;
} & {
    listClientCredentials: (options?: ({
        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;
    }>;
} & {
    context: {
        meta: {
            listClientCredentials: PluginMeta<unknown>;
        };
    };
} & {
    context: {
        meta: Record<string, PluginMeta>;
    };
}) => {
    deleteClientCredentials: (options?: {
        clientId: string;
    } | undefined) => Promise<{
        success: boolean;
    }>;
} & {
    context: {
        meta: {
            deleteClientCredentials: PluginMeta<unknown>;
        };
    };
};
type DeleteClientCredentialsPluginProvides = ReturnType<typeof deleteClientCredentialsPlugin>;

declare const getAppPlugin: (sdk: {
    listApps: (options?: ({
        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;
    }>;
} & {
    context: {
        meta: {
            listApps: PluginMeta<unknown>;
        };
    };
} & {
    context: EventEmissionContext;
} & {
    context: {
        meta: Record<string, PluginMeta>;
    };
}) => {
    getApp: (options?: {
        app: string;
    } | {
        appKey: string;
    } | undefined) => 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;
        };
    }>;
} & {
    context: {
        meta: {
            getApp: PluginMeta<unknown>;
        };
    };
};
type GetAppPluginProvides = ReturnType<typeof getAppPlugin>;

declare const getActionPlugin: (sdk: {
    listActions: (options?: (({
        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;
    }) | undefined) => 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;
    }>;
} & {
    context: {
        meta: {
            listActions: PluginMeta<unknown>;
        };
    };
} & {
    getApp: (options?: {
        app: string;
    } | {
        appKey: string;
    } | undefined) => 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;
        };
    }>;
} & {
    context: {
        meta: {
            getApp: PluginMeta<unknown>;
        };
    };
} & {
    listApps: (options?: ({
        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;
    }>;
} & {
    context: {
        meta: {
            listApps: PluginMeta<unknown>;
        };
    };
} & {
    context: {
        api: ApiClient;
    };
} & {
    context: EventEmissionContext;
} & {
    context: {
        meta: Record<string, PluginMeta>;
    };
}) => {
    getAction: (options?: {
        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;
    } | undefined) => 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;
        };
    }>;
} & {
    context: {
        meta: {
            getAction: PluginMeta<unknown>;
        };
    };
};
type GetActionPluginProvides = ReturnType<typeof getActionPlugin>;

declare const getConnectionPlugin: (sdk: {
    context: {
        api: ApiClient;
    };
} & {
    context: EventEmissionContext;
} & {
    getApp: (options?: {
        app: string;
    } | {
        appKey: string;
    } | undefined) => 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;
        };
    }>;
} & {
    context: {
        meta: {
            getApp: PluginMeta<unknown>;
        };
    };
} & {
    listConnections: (options?: ({
        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;
    }>;
} & {
    context: {
        meta: {
            listConnections: PluginMeta<unknown>;
        };
    };
} & {
    context: {
        meta: Record<string, PluginMeta>;
    };
}) => {
    getConnection: (options?: {
        connection?: string | number | undefined;
        connectionId?: string | number | undefined;
        authenticationId?: string | number | 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;
        };
    }>;
} & {
    context: {
        meta: {
            getConnection: PluginMeta<unknown>;
        };
    };
};
type GetConnectionPluginProvides = ReturnType<typeof getConnectionPlugin>;

declare const findFirstConnectionPlugin: (sdk: {
    listConnections: (options?: ({
        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;
    }>;
} & {
    context: {
        meta: {
            listConnections: PluginMeta<unknown>;
        };
    };
} & {
    context: EventEmissionContext;
} & {
    context: {
        meta: Record<string, PluginMeta>;
    };
}) => {
    findFirstConnection: (options?: {
        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;
        };
    }>;
} & {
    context: {
        meta: {
            findFirstConnection: PluginMeta<unknown>;
        };
    };
};
type FindFirstConnectionPluginProvides = ReturnType<typeof findFirstConnectionPlugin>;

declare const findUniqueConnectionPlugin: (sdk: {
    listConnections: (options?: ({
        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;
    }>;
} & {
    context: {
        meta: {
            listConnections: PluginMeta<unknown>;
        };
    };
} & {
    context: EventEmissionContext;
} & {
    context: {
        meta: Record<string, PluginMeta>;
    };
}) => {
    findUniqueConnection: (options?: {
        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;
        };
    }>;
} & {
    context: {
        meta: {
            findUniqueConnection: PluginMeta<unknown>;
        };
    };
};
type FindUniqueConnectionPluginProvides = ReturnType<typeof findUniqueConnectionPlugin>;

/**
 * Deprecated Authentication Plugins
 *
 * These plugins provide backward compatibility for the old authentication naming.
 * They are simple aliases that delegate to the connection plugins.
 * The connection plugins already accept both connectionId and authenticationId parameters.
 *
 * @deprecated Use the connection equivalents instead:
 * - listAuthentications -> listConnections
 * - getAuthentication -> getConnection
 * - findFirstAuthentication -> findFirstConnection
 * - findUniqueAuthentication -> findUniqueConnection
 */
/**
 * @deprecated Use listConnections instead
 */
declare const listAuthenticationsPlugin: (sdk: {
    listConnections: (options?: ({
        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;
    }>;
} & {
    context: {
        meta: {
            listConnections: PluginMeta<unknown>;
        };
    };
} & {
    context: {
        meta: Record<string, PluginMeta>;
    };
}) => {
    listAuthentications: (options?: ({
        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;
    }>;
    context: {
        meta: {
            listAuthentications: {
                packages: string[];
                categories: string[];
                deprecation: {
                    message: string;
                };
                type: "list";
                itemType: string;
                inputSchema: zod.ZodObject<{
                    title: zod.ZodOptional<zod.ZodString>;
                    search: zod.ZodOptional<zod.ZodString>;
                    owner: zod.ZodOptional<zod.ZodString>;
                    app: zod.ZodOptional<zod.ZodString & {
                        _def: zod_v4_core.$ZodStringDef & PositionalMetadata;
                    }>;
                    appKey: zod.ZodOptional<zod.ZodString & {
                        _def: zod_v4_core.$ZodStringDef & PositionalMetadata;
                    }>;
                    connections: zod.ZodOptional<zod.ZodArray<zod.ZodString>>;
                    connectionIds: zod.ZodOptional<zod.ZodArray<zod.ZodString>>;
                    authenticationIds: zod.ZodOptional<zod.ZodArray<zod.ZodString>>;
                    account: zod.ZodOptional<zod.ZodString>;
                    accountId: zod.ZodOptional<zod.ZodString>;
                    includeShared: zod.ZodOptional<zod.ZodBoolean>;
                    isExpired: zod.ZodOptional<zod.ZodBoolean>;
                    expired: zod.ZodOptional<zod.ZodBoolean>;
                    pageSize: zod.ZodOptional<zod.ZodNumber>;
                    maxItems: zod.ZodOptional<zod.ZodNumber>;
                    cursor: zod.ZodOptional<zod.ZodString>;
                }, zod_v4_core.$strip>;
                outputSchema: zod.ZodObject<{
                    title: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
                    date: zod.ZodString;
                    is_invite_only: zod.ZodBoolean;
                    lastchanged: zod.ZodOptional<zod.ZodString>;
                    destination_selected_api: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
                    is_private: zod.ZodBoolean;
                    shared_with_all: zod.ZodBoolean;
                    is_stale: zod.ZodOptional<zod.ZodString>;
                    is_shared: zod.ZodOptional<zod.ZodString>;
                    marked_stale_at: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
                    label: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
                    identifier: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
                    url: zod.ZodOptional<zod.ZodString>;
                    groups: zod.ZodOptional<zod.ZodArray<zod.ZodRecord<zod.ZodString, zod.ZodUnknown>>>;
                    members: zod.ZodOptional<zod.ZodString>;
                    permissions: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodBoolean>>;
                    public_id: zod.ZodOptional<zod.ZodString>;
                    account_public_id: zod.ZodOptional<zod.ZodString>;
                    customuser_public_id: zod.ZodOptional<zod.ZodString>;
                    id: zod.ZodString;
                    account_id: zod.ZodString;
                    implementation_id: zod.ZodOptional<zod.ZodString>;
                    profile_id: zod.ZodOptional<zod.ZodString>;
                    is_expired: zod.ZodOptional<zod.ZodString>;
                    expired_at: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
                    app_key: zod.ZodOptional<zod.ZodString>;
                    app_version: zod.ZodOptional<zod.ZodString>;
                }, zod_v4_core.$strip>;
                formatter: OutputFormatter<unknown, {
                    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;
                }, Record<string, unknown>, unknown>;
            };
        };
    };
};
type ListAuthenticationsPluginProvides = ReturnType<typeof listAuthenticationsPlugin>;
/**
 * @deprecated Use getConnection instead
 */
declare const getAuthenticationPlugin: (sdk: {
    getConnection: (options?: {
        connection?: string | number | undefined;
        connectionId?: string | number | undefined;
        authenticationId?: string | number | 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;
        };
    }>;
} & {
    context: {
        meta: {
            getConnection: PluginMeta<unknown>;
        };
    };
} & {
    context: {
        meta: Record<string, PluginMeta>;
    };
}) => {
    getAuthentication: (options?: {
        connection?: string | number | undefined;
        connectionId?: string | number | undefined;
        authenticationId?: string | number | 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;
        };
    }>;
    context: {
        meta: {
            getAuthentication: {
                packages: string[];
                categories: string[];
                deprecation: {
                    message: string;
                };
                type: "item";
                itemType: string;
                inputSchema: zod.ZodObject<{
                    connection: zod.ZodOptional<zod.ZodUnion<readonly [zod.ZodString, zod.ZodNumber]>>;
                    connectionId: zod.ZodOptional<zod.ZodUnion<readonly [zod.ZodString, zod.ZodNumber]>>;
                    authenticationId: zod.ZodOptional<zod.ZodUnion<readonly [zod.ZodString, zod.ZodNumber]>>;
                }, zod_v4_core.$strip>;
                outputSchema: zod.ZodObject<{
                    title: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
                    date: zod.ZodString;
                    is_invite_only: zod.ZodBoolean;
                    lastchanged: zod.ZodOptional<zod.ZodString>;
                    destination_selected_api: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
                    is_private: zod.ZodBoolean;
                    shared_with_all: zod.ZodBoolean;
                    is_stale: zod.ZodOptional<zod.ZodString>;
                    is_shared: zod.ZodOptional<zod.ZodString>;
                    marked_stale_at: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
                    label: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
                    identifier: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
                    url: zod.ZodOptional<zod.ZodString>;
                    groups: zod.ZodOptional<zod.ZodArray<zod.ZodRecord<zod.ZodString, zod.ZodUnknown>>>;
                    members: zod.ZodOptional<zod.ZodString>;
                    permissions: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodBoolean>>;
                    public_id: zod.ZodOptional<zod.ZodString>;
                    account_public_id: zod.ZodOptional<zod.ZodString>;
                    customuser_public_id: zod.ZodOptional<zod.ZodString>;
                    id: zod.ZodString;
                    account_id: zod.ZodString;
                    implementation_id: zod.ZodOptional<zod.ZodString>;
                    profile_id: zod.ZodOptional<zod.ZodString>;
                    is_expired: zod.ZodOptional<zod.ZodString>;
                    expired_at: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
                    app_key: zod.ZodOptional<zod.ZodString>;
                    app_version: zod.ZodOptional<zod.ZodString>;
                }, zod_v4_core.$strip>;
                formatter: OutputFormatter<unknown, {
                    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;
                }, Record<string, unknown>, unknown>;
            };
        };
    };
};
type GetAuthenticationPluginProvides = ReturnType<typeof getAuthenticationPlugin>;
/**
 * @deprecated Use findFirstConnection instead
 */
declare const findFirstAuthenticationPlugin: (sdk: {
    findFirstConnection: (options?: {
        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;
        };
    }>;
} & {
    context: {
        meta: {
            findFirstConnection: PluginMeta<unknown>;
        };
    };
} & {
    context: {
        meta: Record<string, PluginMeta>;
    };
}) => {
    findFirstAuthentication: (options?: {
        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;
        };
    }>;
    context: {
        meta: {
            findFirstAuthentication: {
                packages: string[];
                categories: string[];
                deprecation: {
                    message: string;
                };
                type: "item";
                itemType: string;
                inputSchema: zod.ZodObject<{
                    title: zod.ZodOptional<zod.ZodString>;
                    search: zod.ZodOptional<zod.ZodString>;
                    appKey: zod.ZodOptional<zod.ZodString & {
                        _def: zod_v4_core.$ZodStringDef & PositionalMetadata;
                    }>;
                    app: zod.ZodOptional<zod.ZodString & {
                        _def: zod_v4_core.$ZodStringDef & PositionalMetadata;
                    }>;
                    owner: zod.ZodOptional<zod.ZodString>;
                    account: zod.ZodOptional<zod.ZodString>;
                    accountId: zod.ZodOptional<zod.ZodString>;
                    includeShared: zod.ZodOptional<zod.ZodBoolean>;
                    isExpired: zod.ZodOptional<zod.ZodBoolean>;
                    expired: zod.ZodOptional<zod.ZodBoolean>;
                }, zod_v4_core.$strip>;
                outputSchema: zod.ZodObject<{
                    title: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
                    date: zod.ZodString;
                    is_invite_only: zod.ZodBoolean;
                    lastchanged: zod.ZodOptional<zod.ZodString>;
                    destination_selected_api: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
                    is_private: zod.ZodBoolean;
                    shared_with_all: zod.ZodBoolean;
                    is_stale: zod.ZodOptional<zod.ZodString>;
                    is_shared: zod.ZodOptional<zod.ZodString>;
                    marked_stale_at: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
                    label: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
                    identifier: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
                    url: zod.ZodOptional<zod.ZodString>;
                    groups: zod.ZodOptional<zod.ZodArray<zod.ZodRecord<zod.ZodString, zod.ZodUnknown>>>;
                    members: zod.ZodOptional<zod.ZodString>;
                    permissions: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodBoolean>>;
                    public_id: zod.ZodOptional<zod.ZodString>;
                    account_public_id: zod.ZodOptional<zod.ZodString>;
                    customuser_public_id: zod.ZodOptional<zod.ZodString>;
                    id: zod.ZodString;
                    account_id: zod.ZodString;
                    implementation_id: zod.ZodOptional<zod.ZodString>;
                    profile_id: zod.ZodOptional<zod.ZodString>;
                    is_expired: zod.ZodOptional<zod.ZodString>;
                    expired_at: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
                    app_key: zod.ZodOptional<zod.ZodString>;
                    app_version: zod.ZodOptional<zod.ZodString>;
                }, zod_v4_core.$strip>;
                formatter: OutputFormatter<unknown, {
                    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;
                }, Record<string, unknown>, unknown>;
            };
        };
    };
};
type FindFirstAuthenticationPluginProvides = ReturnType<typeof findFirstAuthenticationPlugin>;
/**
 * @deprecated Use findUniqueConnection instead
 */
declare const findUniqueAuthenticationPlugin: (sdk: {
    findUniqueConnection: (options?: {
        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;
        };
    }>;
} & {
    context: {
        meta: {
            findUniqueConnection: PluginMeta<unknown>;
        };
    };
} & {
    context: {
        meta: Record<string, PluginMeta>;
    };
}) => {
    findUniqueAuthentication: (options?: {
        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;
        };
    }>;
    context: {
        meta: {
            findUniqueAuthentication: {
                packages: string[];
                categories: string[];
                deprecation: {
                    message: string;
                };
                type: "item";
                itemType: string;
                inputSchema: zod.ZodObject<{
                    title: zod.ZodOptional<zod.ZodString>;
                    search: zod.ZodOptional<zod.ZodString>;
                    appKey: zod.ZodOptional<zod.ZodString & {
                        _def: zod_v4_core.$ZodStringDef & PositionalMetadata;
                    }>;
                    app: zod.ZodOptional<zod.ZodString & {
                        _def: zod_v4_core.$ZodStringDef & PositionalMetadata;
                    }>;
                    owner: zod.ZodOptional<zod.ZodString>;
                    account: zod.ZodOptional<zod.ZodString>;
                    accountId: zod.ZodOptional<zod.ZodString>;
                    includeShared: zod.ZodOptional<zod.ZodBoolean>;
                    isExpired: zod.ZodOptional<zod.ZodBoolean>;
                    expired: zod.ZodOptional<zod.ZodBoolean>;
                }, zod_v4_core.$strip>;
                outputSchema: zod.ZodObject<{
                    title: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
                    date: zod.ZodString;
                    is_invite_only: zod.ZodBoolean;
                    lastchanged: zod.ZodOptional<zod.ZodString>;
                    destination_selected_api: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
                    is_private: zod.ZodBoolean;
                    shared_with_all: zod.ZodBoolean;
                    is_stale: zod.ZodOptional<zod.ZodString>;
                    is_shared: zod.ZodOptional<zod.ZodString>;
                    marked_stale_at: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
                    label: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
                    identifier: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
                    url: zod.ZodOptional<zod.ZodString>;
                    groups: zod.ZodOptional<zod.ZodArray<zod.ZodRecord<zod.ZodString, zod.ZodUnknown>>>;
                    members: zod.ZodOptional<zod.ZodString>;
                    permissions: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodBoolean>>;
                    public_id: zod.ZodOptional<zod.ZodString>;
                    account_public_id: zod.ZodOptional<zod.ZodString>;
                    customuser_public_id: zod.ZodOptional<zod.ZodString>;
                    id: zod.ZodString;
                    account_id: zod.ZodString;
                    implementation_id: zod.ZodOptional<zod.ZodString>;
                    profile_id: zod.ZodOptional<zod.ZodString>;
                    is_expired: zod.ZodOptional<zod.ZodString>;
                    expired_at: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
                    app_key: zod.ZodOptional<zod.ZodString>;
                    app_version: zod.ZodOptional<zod.ZodString>;
                }, zod_v4_core.$strip>;
                formatter: OutputFormatter<unknown, {
                    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;
                }, Record<string, unknown>, unknown>;
            };
        };
    };
};
type FindUniqueAuthenticationPluginProvides = ReturnType<typeof findUniqueAuthenticationPlugin>;

declare const CONTEXT_CACHE_TTL_MS = 60000;
declare const CONTEXT_CACHE_MAX_SIZE = 500;
declare const runActionPlugin: (sdk: {
    getAction: (options?: {
        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;
    } | undefined) => 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;
        };
    }>;
} & {
    context: {
        meta: {
            getAction: PluginMeta<unknown>;
        };
    };
} & {
    getApp: (options?: {
        app: string;
    } | {
        appKey: string;
    } | undefined) => 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;
        };
    }>;
} & {
    context: {
        meta: {
            getApp: PluginMeta<unknown>;
        };
    };
} & {
    listApps: (options?: ({
        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;
    }>;
} & {
    context: {
        meta: {
            listApps: PluginMeta<unknown>;
        };
    };
} & {
    listActions: (options?: (({
        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;
    }) | undefined) => 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;
    }>;
} & {
    context: {
        meta: {
            listActions: PluginMeta<unknown>;
        };
    };
} & {
    listConnections: (options?: ({
        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;
    }>;
} & {
    context: {
        meta: {
            listConnections: PluginMeta<unknown>;
        };
    };
} & {
    context: {
        api: ApiClient;
        getVersionedImplementationId: GetVersionedImplementationId;
    } & ConnectionsPluginProvides["context"];
} & {
    context: EventEmissionContext;
} & {
    context: {
        meta: Record<string, PluginMeta>;
    };
}) => {
    runAction: (options?: (({
        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;
    }) | undefined) => PaginatedSdkResult<unknown>;
} & {
    context: {
        meta: {
            runAction: PluginMeta<unknown>;
        };
    };
};
type RunActionPluginProvides = ReturnType<typeof runActionPlugin>;

/**
 * @deprecated Use `sdk.fetch(url, init?)` instead. This plugin now delegates
 * to the fetch plugin and is kept only for backward compatibility. It is
 * hidden from the CLI/MCP registries.
 */
declare const requestPlugin: (sdk: {
    fetch: (url: string | URL, init?: ZapierFetchInitOptions) => Promise<Response>;
    context: {
        meta: {
            fetch: {
                description: string;
                packages: string[];
                categories: {
                    key: string;
                    title: string;
                }[];
                returnType: string;
                inputParameters: ({
                    name: string;
                    schema: zod.ZodUnion<readonly [zod.ZodString, zod.ZodCustom<URL, URL>]>;
                } | {
                    name: string;
                    schema: zod.ZodOptional<zod.ZodObject<{
                        method: zod.ZodOptional<zod.ZodEnum<{
                            GET: "GET";
                            POST: "POST";
                            DELETE: "DELETE";
                            PUT: "PUT";
                            PATCH: "PATCH";
                            HEAD: "HEAD";
                            OPTIONS: "OPTIONS";
                        }>>;
                        headers: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodString>>;
                        body: zod.ZodOptional<zod.ZodUnion<readonly [zod.ZodString, zod.ZodCustom<FormData, FormData>, zod.ZodCustom<URLSearchParams, URLSearchParams>, zod.ZodRecord<zod.ZodString, zod.ZodUnknown>]>>;
                        connectionId: zod.ZodOptional<zod.ZodUnion<readonly [zod.ZodString, zod.ZodNumber]>>;
                        connection: zod.ZodOptional<zod.ZodUnion<readonly [zod.ZodString, zod.ZodNumber]>>;
                        authenticationId: zod.ZodOptional<zod.ZodUnion<readonly [zod.ZodString, zod.ZodNumber]>>;
                        callbackUrl: zod.ZodOptional<zod.ZodString>;
                        maxTime: zod.ZodOptional<zod.ZodNumber>;
                    }, zod_v4_core.$strip>>;
                })[];
            };
        };
    };
} & {
    context: EventEmissionContext;
} & {
    context: {
        meta: Record<string, PluginMeta>;
    };
}) => {
    request: (options?: {
        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;
    } | undefined) => Promise<Response>;
} & {
    context: {
        meta: {
            request: PluginMeta<unknown>;
        };
    };
};
type RequestPluginProvides = ReturnType<typeof requestPlugin>;

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 []> & PluginSummary<never, "getProfile">;

interface ApiPluginOptions extends BaseSdkOptions {
}
declare const apiPlugin: (sdk: {
    context: {
        options: BaseSdkOptions;
    };
} & {
    context: {
        meta: Record<string, PluginMeta>;
    };
}) => {
    context: {
        api: ApiClient;
        resolveCredentials: () => Promise<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;
        } | undefined>;
    };
};
type ApiPluginProvides = ReturnType<typeof apiPlugin>;

declare const CreateConnectionItemSchema: z.ZodObject<{
    id: z.ZodString;
    app: z.ZodString;
    title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
}, z.core.$strip>;
type CreateConnectionItem = z.infer<typeof CreateConnectionItemSchema>;

declare const WaitForNewConnectionItemSchema: z.ZodObject<{
    id: z.ZodString;
    app: z.ZodString;
    title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
}, z.core.$strip>;
type WaitForNewConnectionItem = z.infer<typeof WaitForNewConnectionItemSchema>;

declare const GetConnectionStartUrlItemSchema: z.ZodObject<{
    url: z.ZodString;
    expiresAt: z.ZodNumber;
    startedAt: z.ZodNumber;
    app: z.ZodString;
}, z.core.$strip>;
type GetConnectionStartUrlItem = z.infer<typeof GetConnectionStartUrlItemSchema>;

interface ZapierSdkOptions extends BaseSdkOptions {
}
declare function createOptionsPlugin(options: ZapierSdkOptions): () => {
    context: {
        options: ZapierSdkOptions;
    };
};
/**
 * @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): {
    context: {
        meta: Record<string, PluginMeta>;
        hooks: MethodHooks;
    };
} & {
    context: {
        core: CoreOptions;
    };
} & {
    context: {
        options: ZapierSdkOptions;
    };
} & {
    context: EventEmissionContext;
} & {
    context: {
        api: ApiClient;
        resolveCredentials: () => Promise<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;
        } | undefined>;
    };
} & {
    context: {
        getResolvedManifest: () => Promise<Manifest | null>;
        getVersionedImplementationId: (appKey: string) => Promise<string | null>;
        resolveAppKeys: ({ appKeys }: {
            appKeys: string[];
        }) => Promise<ResolvedAppLocator[]>;
        updateManifestEntry: (options: UpdateManifestEntryOptions) => Promise<UpdateManifestEntryResult>;
        addActionEntry: (options: AddActionEntryOptions) => Promise<AddActionEntryResult>;
        findActionEntry: ({ name, manifest, }: {
            name: string;
            manifest: Manifest;
        }) => ActionEntry | null;
        listActionEntries: ({ configPath, }?: {
            configPath?: string;
        }) => Promise<Array<[string, ActionEntry]>>;
        deleteActionEntry: ({ name, configPath, skipWrite, }: {
            name: string;
            configPath?: string;
            skipWrite?: boolean;
        }) => Promise<Manifest>;
        hasActionEntry: ({ name, manifest, }: {
            name: string;
            manifest: Manifest;
        }) => boolean;
        findManifestEntry: typeof findManifestEntry;
        readManifestFromFile: typeof readManifestFromFile;
        getManifestConnections: () => Promise<Record<string, {
            connectionId: string | number;
        }> | null>;
    };
} & {
    context: CapabilitiesContext;
} & {
    context: {
        resolveConnection: (name: string) => Promise<{
            connectionId: string | number;
        } | undefined>;
        getConnectionsMap: () => Promise<Record<string, {
            connectionId: string | number;
        }> | null>;
    };
} & {
    listApps: (options?: ({
        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;
    }>;
} & {
    context: {
        meta: {
            listApps: PluginMeta<unknown>;
        };
    };
} & {
    getApp: (options?: {
        app: string;
    } | {
        appKey: string;
    } | undefined) => 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;
        };
    }>;
} & {
    context: {
        meta: {
            getApp: PluginMeta<unknown>;
        };
    };
} & {
    listConnections: (options?: ({
        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;
    }>;
} & {
    context: {
        meta: {
            listConnections: PluginMeta<unknown>;
        };
    };
} & {
    getConnection: (options?: {
        connection?: string | number | undefined;
        connectionId?: string | number | undefined;
        authenticationId?: string | number | 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;
        };
    }>;
} & {
    context: {
        meta: {
            getConnection: PluginMeta<unknown>;
        };
    };
} & {
    findFirstConnection: (options?: {
        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;
        };
    }>;
} & {
    context: {
        meta: {
            findFirstConnection: PluginMeta<unknown>;
        };
    };
} & {
    findUniqueConnection: (options?: {
        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;
        };
    }>;
} & {
    context: {
        meta: {
            findUniqueConnection: PluginMeta<unknown>;
        };
    };
} & {
    getConnectionStartUrl: (options?: {
        app: string;
    } | undefined) => Promise<{
        data: GetConnectionStartUrlItem;
    }>;
} & {
    context: {
        meta: {
            getConnectionStartUrl: PluginMeta<unknown>;
        };
    };
} & {
    waitForNewConnection: (options?: {
        app: string;
        startedAt: number;
        timeoutMs?: number | undefined;
        pollIntervalMs?: number | undefined;
    } | undefined) => Promise<{
        data: WaitForNewConnectionItem;
    }>;
} & {
    context: {
        meta: {
            waitForNewConnection: PluginMeta<unknown>;
        };
    };
} & {
    createConnection: (options?: {
        app: string;
        browser: "never" | "auto" | "always";
        timeoutMs?: number | undefined;
        pollIntervalMs?: number | undefined;
    } | undefined) => Promise<{
        data: CreateConnectionItem;
    }>;
} & {
    context: {
        meta: {
            createConnection: PluginMeta<unknown>;
        };
    };
} & {
    listActions: (options?: (({
        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;
    }) | undefined) => 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;
    }>;
} & {
    context: {
        meta: {
            listActions: PluginMeta<unknown>;
        };
    };
} & {
    getAction: (options?: {
        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;
    } | undefined) => 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;
        };
    }>;
} & {
    context: {
        meta: {
            getAction: PluginMeta<unknown>;
        };
    };
} & {
    listActionInputFields: (options?: (({
        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;
    }) | undefined) => 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>;
} & {
    context: {
        meta: {
            listActionInputFields: PluginMeta<unknown>;
        };
    };
} & {
    getActionInputFieldsSchema: (options?: {
        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;
    } | undefined) => Promise<{
        data: Record<string, unknown>;
    }>;
} & {
    context: {
        meta: {
            getActionInputFieldsSchema: PluginMeta<unknown>;
        };
    };
} & {
    listActionInputFieldChoices: (options?: (({
        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;
    }) | undefined) => PaginatedSdkResult<{
        key?: string | undefined;
        label?: string | undefined;
        sample?: string | undefined;
        value?: string | undefined;
    }>;
} & {
    context: {
        meta: {
            listActionInputFieldChoices: PluginMeta<unknown>;
        };
    };
} & {
    listInputFields: (options?: (({
        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;
    }) | undefined) => 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>;
    context: {
        meta: {
            listInputFields: {
                categories: string[];
                deprecation: {
                    message: string;
                };
                type: "list";
                itemType: string;
                inputSchema: zod.ZodUnion<readonly [zod.ZodObject<{
                    app: zod.ZodString & {
                        _def: zod_v4_core.$ZodStringDef & PositionalMetadata;
                    };
                    actionType: zod.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: zod.ZodString & {
                        _def: zod_v4_core.$ZodStringDef & PositionalMetadata;
                    };
                    connection: zod.ZodOptional<zod.ZodUnion<readonly [zod.ZodString, zod.ZodNumber]>>;
                    connectionId: zod.ZodOptional<zod.ZodNullable<zod.ZodUnion<readonly [zod.ZodString, zod.ZodNumber]>>>;
                    authenticationId: zod.ZodOptional<zod.ZodNullable<zod.ZodUnion<readonly [zod.ZodString, zod.ZodNumber]>>>;
                    inputs: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodUnknown>>;
                    pageSize: zod.ZodOptional<zod.ZodNumber>;
                    maxItems: zod.ZodOptional<zod.ZodNumber>;
                    cursor: zod.ZodOptional<zod.ZodString>;
                }, zod_v4_core.$strip>, zod.ZodObject<{
                    appKey: zod.ZodString & {
                        _def: zod_v4_core.$ZodStringDef & PositionalMetadata;
                    };
                    actionType: zod.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: zod.ZodString;
                    connection: zod.ZodOptional<zod.ZodUnion<readonly [zod.ZodString, zod.ZodNumber]>>;
                    connectionId: zod.ZodOptional<zod.ZodNullable<zod.ZodUnion<readonly [zod.ZodString, zod.ZodNumber]>>>;
                    authenticationId: zod.ZodOptional<zod.ZodNullable<zod.ZodUnion<readonly [zod.ZodString, zod.ZodNumber]>>>;
                    inputs: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodUnknown>>;
                    pageSize: zod.ZodOptional<zod.ZodNumber>;
                    maxItems: zod.ZodOptional<zod.ZodNumber>;
                    cursor: zod.ZodOptional<zod.ZodString>;
                }, zod_v4_core.$strip>]>;
                outputSchema: zod.ZodUnion<readonly [zod.ZodObject<{
                    key: zod.ZodString;
                    type: zod.ZodLiteral<"input_field">;
                    default_value: zod.ZodString;
                    depends_on: zod.ZodArray<zod.ZodString>;
                    description: zod.ZodString;
                    invalidates_input_fields: zod.ZodBoolean;
                    is_required: zod.ZodBoolean;
                    placeholder: zod.ZodString;
                    title: zod.ZodString;
                    value_type: zod.ZodString;
                    format: zod.ZodOptional<zod.ZodString>;
                    items: zod.ZodOptional<zod.ZodObject<{
                        type: zod.ZodString;
                    }, zod_v4_core.$strip>>;
                }, zod_v4_core.$strip>, zod.ZodObject<{
                    key: zod.ZodString;
                    type: zod.ZodLiteral<"info_field">;
                    description: zod.ZodString;
                    title: zod.ZodOptional<zod.ZodString>;
                }, zod_v4_core.$strip>, zod.ZodType<FieldsetItem, unknown, zod_v4_core.$ZodTypeInternals<FieldsetItem, unknown>>]>;
                formatter: OutputFormatter<unknown, {
                    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, Record<string, unknown>, unknown>;
                defaultPageSize: number;
            };
        };
    };
} & {
    getInputFieldsSchema: (options?: {
        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;
    } | undefined) => Promise<{
        data: Record<string, unknown>;
    }>;
    context: {
        meta: {
            getInputFieldsSchema: {
                categories: string[];
                deprecation: {
                    message: string;
                };
                type: "function";
                inputSchema: zod.ZodUnion<readonly [zod.ZodObject<{
                    app: zod.ZodString & {
                        _def: zod_v4_core.$ZodStringDef & PositionalMetadata;
                    };
                    actionType: zod.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: zod.ZodString & {
                        _def: zod_v4_core.$ZodStringDef & PositionalMetadata;
                    };
                    connection: zod.ZodOptional<zod.ZodUnion<readonly [zod.ZodString, zod.ZodNumber]>>;
                    connectionId: zod.ZodOptional<zod.ZodNullable<zod.ZodUnion<readonly [zod.ZodString, zod.ZodNumber]>>>;
                    authenticationId: zod.ZodOptional<zod.ZodNullable<zod.ZodUnion<readonly [zod.ZodString, zod.ZodNumber]>>>;
                    inputs: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodUnknown>>;
                }, zod_v4_core.$strip>, zod.ZodObject<{
                    appKey: zod.ZodString & {
                        _def: zod_v4_core.$ZodStringDef & PositionalMetadata;
                    };
                    actionType: zod.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: zod.ZodString;
                    connection: zod.ZodOptional<zod.ZodUnion<readonly [zod.ZodString, zod.ZodNumber]>>;
                    connectionId: zod.ZodOptional<zod.ZodNullable<zod.ZodUnion<readonly [zod.ZodString, zod.ZodNumber]>>>;
                    authenticationId: zod.ZodOptional<zod.ZodNullable<zod.ZodUnion<readonly [zod.ZodString, zod.ZodNumber]>>>;
                    inputs: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodUnknown>>;
                }, zod_v4_core.$strip>]>;
            };
        };
    };
} & {
    listInputFieldChoices: (options?: (({
        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;
    }) | undefined) => PaginatedSdkResult<{
        key?: string | undefined;
        label?: string | undefined;
        sample?: string | undefined;
        value?: string | undefined;
    }>;
    context: {
        meta: {
            listInputFieldChoices: {
                categories: string[];
                deprecation: {
                    message: string;
                };
                type: "list";
                itemType: string;
                inputSchema: zod.ZodUnion<readonly [zod.ZodObject<{
                    app: zod.ZodString & {
                        _def: zod_v4_core.$ZodStringDef & PositionalMetadata;
                    };
                    actionType: zod.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: zod.ZodString & {
                        _def: zod_v4_core.$ZodStringDef & PositionalMetadata;
                    };
                    inputField: zod.ZodString & {
                        _def: zod_v4_core.$ZodStringDef & PositionalMetadata;
                    };
                    connection: zod.ZodOptional<zod.ZodUnion<readonly [zod.ZodString, zod.ZodNumber]>>;
                    connectionId: zod.ZodOptional<zod.ZodNullable<zod.ZodUnion<readonly [zod.ZodString, zod.ZodNumber]>>>;
                    authenticationId: zod.ZodOptional<zod.ZodNullable<zod.ZodUnion<readonly [zod.ZodString, zod.ZodNumber]>>>;
                    inputs: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodUnknown>>;
                    page: zod.ZodOptional<zod.ZodNumber>;
                    pageSize: zod.ZodOptional<zod.ZodNumber>;
                    maxItems: zod.ZodOptional<zod.ZodNumber>;
                    cursor: zod.ZodOptional<zod.ZodString>;
                }, zod_v4_core.$strip>, zod.ZodObject<{
                    appKey: zod.ZodString & {
                        _def: zod_v4_core.$ZodStringDef & PositionalMetadata;
                    };
                    actionType: zod.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: zod.ZodString;
                    inputFieldKey: zod.ZodString;
                    connection: zod.ZodOptional<zod.ZodUnion<readonly [zod.ZodString, zod.ZodNumber]>>;
                    connectionId: zod.ZodOptional<zod.ZodNullable<zod.ZodUnion<readonly [zod.ZodString, zod.ZodNumber]>>>;
                    authenticationId: zod.ZodOptional<zod.ZodNullable<zod.ZodUnion<readonly [zod.ZodString, zod.ZodNumber]>>>;
                    inputs: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodUnknown>>;
                    page: zod.ZodOptional<zod.ZodNumber>;
                    pageSize: zod.ZodOptional<zod.ZodNumber>;
                    maxItems: zod.ZodOptional<zod.ZodNumber>;
                    cursor: zod.ZodOptional<zod.ZodString>;
                }, zod_v4_core.$strip>]>;
                outputSchema: zod.ZodObject<{
                    key: zod.ZodOptional<zod.ZodString>;
                    label: zod.ZodOptional<zod.ZodString>;
                    sample: zod.ZodOptional<zod.ZodString>;
                    value: zod.ZodOptional<zod.ZodString>;
                }, zod_v4_core.$strip>;
                formatter: OutputFormatter<unknown, {
                    key?: string | undefined;
                    label?: string | undefined;
                    sample?: string | undefined;
                    value?: string | undefined;
                }, Record<string, unknown>, unknown>;
                defaultPageSize: number;
            };
        };
    };
} & {
    runAction: (options?: (({
        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;
    }) | undefined) => PaginatedSdkResult<unknown>;
} & {
    context: {
        meta: {
            runAction: PluginMeta<unknown>;
        };
    };
} & {
    listAuthentications: (options?: ({
        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;
    }>;
    context: {
        meta: {
            listAuthentications: {
                packages: string[];
                categories: string[];
                deprecation: {
                    message: string;
                };
                type: "list";
                itemType: string;
                inputSchema: zod.ZodObject<{
                    title: zod.ZodOptional<zod.ZodString>;
                    search: zod.ZodOptional<zod.ZodString>;
                    owner: zod.ZodOptional<zod.ZodString>;
                    app: zod.ZodOptional<zod.ZodString & {
                        _def: zod_v4_core.$ZodStringDef & PositionalMetadata;
                    }>;
                    appKey: zod.ZodOptional<zod.ZodString & {
                        _def: zod_v4_core.$ZodStringDef & PositionalMetadata;
                    }>;
                    connections: zod.ZodOptional<zod.ZodArray<zod.ZodString>>;
                    connectionIds: zod.ZodOptional<zod.ZodArray<zod.ZodString>>;
                    authenticationIds: zod.ZodOptional<zod.ZodArray<zod.ZodString>>;
                    account: zod.ZodOptional<zod.ZodString>;
                    accountId: zod.ZodOptional<zod.ZodString>;
                    includeShared: zod.ZodOptional<zod.ZodBoolean>;
                    isExpired: zod.ZodOptional<zod.ZodBoolean>;
                    expired: zod.ZodOptional<zod.ZodBoolean>;
                    pageSize: zod.ZodOptional<zod.ZodNumber>;
                    maxItems: zod.ZodOptional<zod.ZodNumber>;
                    cursor: zod.ZodOptional<zod.ZodString>;
                }, zod_v4_core.$strip>;
                outputSchema: zod.ZodObject<{
                    title: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
                    date: zod.ZodString;
                    is_invite_only: zod.ZodBoolean;
                    lastchanged: zod.ZodOptional<zod.ZodString>;
                    destination_selected_api: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
                    is_private: zod.ZodBoolean;
                    shared_with_all: zod.ZodBoolean;
                    is_stale: zod.ZodOptional<zod.ZodString>;
                    is_shared: zod.ZodOptional<zod.ZodString>;
                    marked_stale_at: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
                    label: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
                    identifier: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
                    url: zod.ZodOptional<zod.ZodString>;
                    groups: zod.ZodOptional<zod.ZodArray<zod.ZodRecord<zod.ZodString, zod.ZodUnknown>>>;
                    members: zod.ZodOptional<zod.ZodString>;
                    permissions: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodBoolean>>;
                    public_id: zod.ZodOptional<zod.ZodString>;
                    account_public_id: zod.ZodOptional<zod.ZodString>;
                    customuser_public_id: zod.ZodOptional<zod.ZodString>;
                    id: zod.ZodString;
                    account_id: zod.ZodString;
                    implementation_id: zod.ZodOptional<zod.ZodString>;
                    profile_id: zod.ZodOptional<zod.ZodString>;
                    is_expired: zod.ZodOptional<zod.ZodString>;
                    expired_at: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
                    app_key: zod.ZodOptional<zod.ZodString>;
                    app_version: zod.ZodOptional<zod.ZodString>;
                }, zod_v4_core.$strip>;
                formatter: OutputFormatter<unknown, {
                    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;
                }, Record<string, unknown>, unknown>;
            };
        };
    };
} & {
    getAuthentication: (options?: {
        connection?: string | number | undefined;
        connectionId?: string | number | undefined;
        authenticationId?: string | number | 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;
        };
    }>;
    context: {
        meta: {
            getAuthentication: {
                packages: string[];
                categories: string[];
                deprecation: {
                    message: string;
                };
                type: "item";
                itemType: string;
                inputSchema: zod.ZodObject<{
                    connection: zod.ZodOptional<zod.ZodUnion<readonly [zod.ZodString, zod.ZodNumber]>>;
                    connectionId: zod.ZodOptional<zod.ZodUnion<readonly [zod.ZodString, zod.ZodNumber]>>;
                    authenticationId: zod.ZodOptional<zod.ZodUnion<readonly [zod.ZodString, zod.ZodNumber]>>;
                }, zod_v4_core.$strip>;
                outputSchema: zod.ZodObject<{
                    title: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
                    date: zod.ZodString;
                    is_invite_only: zod.ZodBoolean;
                    lastchanged: zod.ZodOptional<zod.ZodString>;
                    destination_selected_api: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
                    is_private: zod.ZodBoolean;
                    shared_with_all: zod.ZodBoolean;
                    is_stale: zod.ZodOptional<zod.ZodString>;
                    is_shared: zod.ZodOptional<zod.ZodString>;
                    marked_stale_at: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
                    label: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
                    identifier: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
                    url: zod.ZodOptional<zod.ZodString>;
                    groups: zod.ZodOptional<zod.ZodArray<zod.ZodRecord<zod.ZodString, zod.ZodUnknown>>>;
                    members: zod.ZodOptional<zod.ZodString>;
                    permissions: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodBoolean>>;
                    public_id: zod.ZodOptional<zod.ZodString>;
                    account_public_id: zod.ZodOptional<zod.ZodString>;
                    customuser_public_id: zod.ZodOptional<zod.ZodString>;
                    id: zod.ZodString;
                    account_id: zod.ZodString;
                    implementation_id: zod.ZodOptional<zod.ZodString>;
                    profile_id: zod.ZodOptional<zod.ZodString>;
                    is_expired: zod.ZodOptional<zod.ZodString>;
                    expired_at: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
                    app_key: zod.ZodOptional<zod.ZodString>;
                    app_version: zod.ZodOptional<zod.ZodString>;
                }, zod_v4_core.$strip>;
                formatter: OutputFormatter<unknown, {
                    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;
                }, Record<string, unknown>, unknown>;
            };
        };
    };
} & {
    findFirstAuthentication: (options?: {
        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;
        };
    }>;
    context: {
        meta: {
            findFirstAuthentication: {
                packages: string[];
                categories: string[];
                deprecation: {
                    message: string;
                };
                type: "item";
                itemType: string;
                inputSchema: zod.ZodObject<{
                    title: zod.ZodOptional<zod.ZodString>;
                    search: zod.ZodOptional<zod.ZodString>;
                    appKey: zod.ZodOptional<zod.ZodString & {
                        _def: zod_v4_core.$ZodStringDef & PositionalMetadata;
                    }>;
                    app: zod.ZodOptional<zod.ZodString & {
                        _def: zod_v4_core.$ZodStringDef & PositionalMetadata;
                    }>;
                    owner: zod.ZodOptional<zod.ZodString>;
                    account: zod.ZodOptional<zod.ZodString>;
                    accountId: zod.ZodOptional<zod.ZodString>;
                    includeShared: zod.ZodOptional<zod.ZodBoolean>;
                    isExpired: zod.ZodOptional<zod.ZodBoolean>;
                    expired: zod.ZodOptional<zod.ZodBoolean>;
                }, zod_v4_core.$strip>;
                outputSchema: zod.ZodObject<{
                    title: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
                    date: zod.ZodString;
                    is_invite_only: zod.ZodBoolean;
                    lastchanged: zod.ZodOptional<zod.ZodString>;
                    destination_selected_api: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
                    is_private: zod.ZodBoolean;
                    shared_with_all: zod.ZodBoolean;
                    is_stale: zod.ZodOptional<zod.ZodString>;
                    is_shared: zod.ZodOptional<zod.ZodString>;
                    marked_stale_at: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
                    label: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
                    identifier: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
                    url: zod.ZodOptional<zod.ZodString>;
                    groups: zod.ZodOptional<zod.ZodArray<zod.ZodRecord<zod.ZodString, zod.ZodUnknown>>>;
                    members: zod.ZodOptional<zod.ZodString>;
                    permissions: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodBoolean>>;
                    public_id: zod.ZodOptional<zod.ZodString>;
                    account_public_id: zod.ZodOptional<zod.ZodString>;
                    customuser_public_id: zod.ZodOptional<zod.ZodString>;
                    id: zod.ZodString;
                    account_id: zod.ZodString;
                    implementation_id: zod.ZodOptional<zod.ZodString>;
                    profile_id: zod.ZodOptional<zod.ZodString>;
                    is_expired: zod.ZodOptional<zod.ZodString>;
                    expired_at: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
                    app_key: zod.ZodOptional<zod.ZodString>;
                    app_version: zod.ZodOptional<zod.ZodString>;
                }, zod_v4_core.$strip>;
                formatter: OutputFormatter<unknown, {
                    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;
                }, Record<string, unknown>, unknown>;
            };
        };
    };
} & {
    findUniqueAuthentication: (options?: {
        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;
        };
    }>;
    context: {
        meta: {
            findUniqueAuthentication: {
                packages: string[];
                categories: string[];
                deprecation: {
                    message: string;
                };
                type: "item";
                itemType: string;
                inputSchema: zod.ZodObject<{
                    title: zod.ZodOptional<zod.ZodString>;
                    search: zod.ZodOptional<zod.ZodString>;
                    appKey: zod.ZodOptional<zod.ZodString & {
                        _def: zod_v4_core.$ZodStringDef & PositionalMetadata;
                    }>;
                    app: zod.ZodOptional<zod.ZodString & {
                        _def: zod_v4_core.$ZodStringDef & PositionalMetadata;
                    }>;
                    owner: zod.ZodOptional<zod.ZodString>;
                    account: zod.ZodOptional<zod.ZodString>;
                    accountId: zod.ZodOptional<zod.ZodString>;
                    includeShared: zod.ZodOptional<zod.ZodBoolean>;
                    isExpired: zod.ZodOptional<zod.ZodBoolean>;
                    expired: zod.ZodOptional<zod.ZodBoolean>;
                }, zod_v4_core.$strip>;
                outputSchema: zod.ZodObject<{
                    title: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
                    date: zod.ZodString;
                    is_invite_only: zod.ZodBoolean;
                    lastchanged: zod.ZodOptional<zod.ZodString>;
                    destination_selected_api: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
                    is_private: zod.ZodBoolean;
                    shared_with_all: zod.ZodBoolean;
                    is_stale: zod.ZodOptional<zod.ZodString>;
                    is_shared: zod.ZodOptional<zod.ZodString>;
                    marked_stale_at: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
                    label: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
                    identifier: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
                    url: zod.ZodOptional<zod.ZodString>;
                    groups: zod.ZodOptional<zod.ZodArray<zod.ZodRecord<zod.ZodString, zod.ZodUnknown>>>;
                    members: zod.ZodOptional<zod.ZodString>;
                    permissions: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodBoolean>>;
                    public_id: zod.ZodOptional<zod.ZodString>;
                    account_public_id: zod.ZodOptional<zod.ZodString>;
                    customuser_public_id: zod.ZodOptional<zod.ZodString>;
                    id: zod.ZodString;
                    account_id: zod.ZodString;
                    implementation_id: zod.ZodOptional<zod.ZodString>;
                    profile_id: zod.ZodOptional<zod.ZodString>;
                    is_expired: zod.ZodOptional<zod.ZodString>;
                    expired_at: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
                    app_key: zod.ZodOptional<zod.ZodString>;
                    app_version: zod.ZodOptional<zod.ZodString>;
                }, zod_v4_core.$strip>;
                formatter: OutputFormatter<unknown, {
                    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;
                }, Record<string, unknown>, unknown>;
            };
        };
    };
} & {
    listClientCredentials: (options?: ({
        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;
    }>;
} & {
    context: {
        meta: {
            listClientCredentials: PluginMeta<unknown>;
        };
    };
} & {
    createClientCredentials: (options?: {
        name: string;
        allowedScopes: ("external" | "credentials")[];
        policy?: Record<string, unknown> | undefined;
    } | undefined) => Promise<{
        data: {
            client_id: string;
            name: string;
            client_secret: string;
        };
    }>;
} & {
    context: {
        meta: {
            createClientCredentials: PluginMeta<unknown>;
        };
    };
} & {
    deleteClientCredentials: (options?: {
        clientId: string;
    } | undefined) => Promise<{
        success: boolean;
    }>;
} & {
    context: {
        meta: {
            deleteClientCredentials: PluginMeta<unknown>;
        };
    };
} & {
    fetch: (url: string | URL, init?: ZapierFetchInitOptions) => Promise<Response>;
    context: {
        meta: {
            fetch: {
                description: string;
                packages: string[];
                categories: {
                    key: string;
                    title: string;
                }[];
                returnType: string;
                inputParameters: ({
                    name: string;
                    schema: zod.ZodUnion<readonly [zod.ZodString, zod.ZodCustom<URL, URL>]>;
                } | {
                    name: string;
                    schema: zod.ZodOptional<zod.ZodObject<{
                        method: zod.ZodOptional<zod.ZodEnum<{
                            GET: "GET";
                            POST: "POST";
                            DELETE: "DELETE";
                            PUT: "PUT";
                            PATCH: "PATCH";
                            HEAD: "HEAD";
                            OPTIONS: "OPTIONS";
                        }>>;
                        headers: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodString>>;
                        body: zod.ZodOptional<zod.ZodUnion<readonly [zod.ZodString, zod.ZodCustom<FormData, FormData>, zod.ZodCustom<URLSearchParams, URLSearchParams>, zod.ZodRecord<zod.ZodString, zod.ZodUnknown>]>>;
                        connectionId: zod.ZodOptional<zod.ZodUnion<readonly [zod.ZodString, zod.ZodNumber]>>;
                        connection: zod.ZodOptional<zod.ZodUnion<readonly [zod.ZodString, zod.ZodNumber]>>;
                        authenticationId: zod.ZodOptional<zod.ZodUnion<readonly [zod.ZodString, zod.ZodNumber]>>;
                        callbackUrl: zod.ZodOptional<zod.ZodString>;
                        maxTime: zod.ZodOptional<zod.ZodNumber>;
                    }, zod_v4_core.$strip>>;
                })[];
            };
        };
    };
} & {
    request: (options?: {
        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;
    } | undefined) => Promise<Response>;
} & {
    context: {
        meta: {
            request: PluginMeta<unknown>;
        };
    };
} & {
    listTables: (options?: ({
        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;
    }>;
} & {
    context: {
        meta: {
            listTables: PluginMeta<unknown>;
        };
    };
} & {
    getTable: (options?: {
        table: string;
    } | {
        tableId: 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;
        };
    }>;
} & {
    context: {
        meta: {
            getTable: PluginMeta<unknown>;
        };
    };
} & {
    deleteTable: (options?: {
        table: string;
    } | {
        tableId: string;
    } | undefined) => Promise<{
        success: boolean;
    }>;
} & {
    context: {
        meta: {
            deleteTable: PluginMeta<unknown>;
        };
    };
} & {
    createTable: (options?: {
        name: string;
        description?: string | undefined;
    } | 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;
        };
    }>;
} & {
    context: {
        meta: {
            createTable: PluginMeta<unknown>;
        };
    };
} & {
    listTableFields: (options?: {
        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;
    } | undefined) => Promise<{
        data: {
            id: string;
            type: "string" | "number" | "boolean" | "text" | "datetime" | "decimal" | "json" | "email" | "link" | "multiple_string" | "labeled_string" | "multiple_labeled_string" | "multiple_text" | "multiple_boolean" | "multiple_number" | "multiple_decimal" | "multiple_datetime" | "uuid" | "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;
        }[];
    }>;
} & {
    context: {
        meta: {
            listTableFields: PluginMeta<unknown>;
        };
    };
} & {
    createTableFields: (options?: {
        table: string;
        fields: {
            type: "string" | "number" | "boolean" | "text" | "datetime" | "decimal" | "json" | "email" | "link" | "multiple_string" | "labeled_string" | "multiple_labeled_string" | "multiple_text" | "multiple_boolean" | "multiple_number" | "multiple_decimal" | "multiple_datetime" | "uuid" | "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" | "multiple_string" | "labeled_string" | "multiple_labeled_string" | "multiple_text" | "multiple_boolean" | "multiple_number" | "multiple_decimal" | "multiple_datetime" | "uuid" | "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;
        }[];
    } | undefined) => Promise<{
        data: {
            id: string;
            type: "string" | "number" | "boolean" | "text" | "datetime" | "decimal" | "json" | "email" | "link" | "multiple_string" | "labeled_string" | "multiple_labeled_string" | "multiple_text" | "multiple_boolean" | "multiple_number" | "multiple_decimal" | "multiple_datetime" | "uuid" | "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;
        }[];
    }>;
} & {
    context: {
        meta: {
            createTableFields: PluginMeta<unknown>;
        };
    };
} & {
    deleteTableFields: (options?: {
        table: string;
        fields: (string | number)[];
    } | {
        tableId: string;
        fieldKeys: (string | number)[];
    } | undefined) => Promise<{
        success: boolean;
    }>;
} & {
    context: {
        meta: {
            deleteTableFields: PluginMeta<unknown>;
        };
    };
} & {
    listTableRecords: (options?: (({
        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;
    }) | undefined) => PaginatedSdkResult<{
        data: Record<string, unknown>;
        id: string;
        created_at: string;
        edited_at: string;
        deleted_at?: string | null | undefined;
    }>;
} & {
    context: {
        meta: {
            listTableRecords: PluginMeta<unknown>;
        };
    };
} & {
    getTableRecord: (options?: {
        table: string;
        record: string;
        keyMode: "names" | "ids";
    } | {
        tableId: string;
        recordId: string;
        keyMode: "names" | "ids";
    } | undefined) => Promise<{
        data: {
            data: Record<string, unknown>;
            id: string;
            created_at: string;
            edited_at: string;
            deleted_at?: string | null | undefined;
        };
    }>;
} & {
    context: {
        meta: {
            getTableRecord: PluginMeta<unknown>;
        };
    };
} & {
    createTableRecords: (options?: {
        table: string;
        records: {
            data: Record<string, unknown>;
        }[];
        keyMode: "names" | "ids";
    } | {
        tableId: string;
        records: {
            data: Record<string, unknown>;
        }[];
        keyMode: "names" | "ids";
    } | undefined) => Promise<{
        data: {
            data: Record<string, unknown>;
            id: string;
            created_at: string;
            edited_at: string;
            deleted_at?: string | null | undefined;
        }[];
    }>;
} & {
    context: {
        meta: {
            createTableRecords: PluginMeta<unknown>;
        };
    };
} & {
    deleteTableRecords: (options?: {
        table: string;
        records: string[];
    } | {
        tableId: string;
        recordIds: string[];
    } | undefined) => Promise<{
        success: boolean;
    }>;
} & {
    context: {
        meta: {
            deleteTableRecords: PluginMeta<unknown>;
        };
    };
} & {
    updateTableRecords: (options?: {
        table: string;
        records: {
            id: string;
            data: Record<string, unknown>;
        }[];
        keyMode: "names" | "ids";
    } | {
        tableId: string;
        records: {
            id: string;
            data: Record<string, unknown>;
        }[];
        keyMode: "names" | "ids";
    } | undefined) => Promise<{
        data: {
            data: Record<string, unknown>;
            id: string;
            created_at: string;
            edited_at: string;
            deleted_at?: string | null | undefined;
        }[];
    }>;
} & {
    context: {
        meta: {
            updateTableRecords: PluginMeta<unknown>;
        };
    };
} & {
    apps: ActionProxy & ZapierSdkApps;
    context: {
        meta: {
            "apps.{appKey}": {
                categories: string[];
                packages: string[];
                type: "function";
                inputSchema: zod.ZodObject<{
                    connectionId: zod.ZodOptional<zod.ZodUnion<readonly [zod.ZodString, zod.ZodNumber]>>;
                    connection: zod.ZodOptional<zod.ZodUnion<readonly [zod.ZodString, zod.ZodNumber]>>;
                    authenticationId: zod.ZodOptional<zod.ZodUnion<readonly [zod.ZodString, zod.ZodNumber]>>;
                }, zod_v4_core.$strip>;
                returnType: string;
            };
            "apps.{appKey}.{actionType}.{actionKey}": {
                categories: string[];
                packages: string[];
                type: "list";
                inputSchema: zod.ZodObject<{
                    inputs: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodUnknown>>;
                    connectionId: zod.ZodOptional<zod.ZodUnion<readonly [zod.ZodString, zod.ZodNumber]>>;
                    connection: zod.ZodOptional<zod.ZodUnion<readonly [zod.ZodString, zod.ZodNumber]>>;
                    authenticationId: zod.ZodOptional<zod.ZodUnion<readonly [zod.ZodString, zod.ZodNumber]>>;
                    timeoutMs: zod.ZodOptional<zod.ZodNumber>;
                }, zod_v4_core.$strip>;
                itemType: string;
                outputSchema: zod.ZodUnknown;
            };
        };
    };
} & {
    getRegistry: (options?: {
        package?: string;
    }) => RegistryResult;
} & {
    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;
        };
    }>;
} & {
    context: SdkContext;
};
/**
 * Build the unsealed legacy `PluginStack` that `createZapierSdk` collapses
 * (`toPlugin()`) and merges with the migrated module-model plugins. Exposed so
 * downstream head packages (`@zapier/zapier-sdk-cli`, `@zapier/zapier-sdk-mcp`,
 * any future head) can layer their own base plugins via `.use(...)` before
 * merging, the way `createZapierSdk` does:
 *
 *   const stack = createZapierSdkStack(options)
 *     .use(myExtensionPlugin)
 *     .use(cliOverridesPlugin, { override: true });
 *   const sdk = createSdk(
 *     defineLegacyMerge({ name: "my-head", legacy: stack.toPlugin(), plugin: zapierSdkPlugin }),
 *   );
 *
 * Do NOT call `.toSdk()` on this stack to build a full Zapier SDK: that
 * materializes the legacy surface only and silently omits module-model
 * migrated methods (e.g. `getProfile`). For a full SDK plus your own plugins,
 * the supported path is `createZapierSdk(options)` then top-level
 * `addPlugin(sdk, plugin)`.
 */
declare function createZapierSdkStack(options?: ZapierSdkOptions): PluginStack<object, {
    context: {
        meta: Record<string, PluginMeta>;
        hooks: MethodHooks;
    };
} & {
    context: {
        core: CoreOptions;
    };
} & {
    context: {
        options: ZapierSdkOptions;
    };
} & {
    context: EventEmissionContext;
} & {
    context: {
        api: ApiClient;
        resolveCredentials: () => Promise<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;
        } | undefined>;
    };
} & {
    context: {
        getResolvedManifest: () => Promise<Manifest | null>;
        getVersionedImplementationId: (appKey: string) => Promise<string | null>;
        resolveAppKeys: ({ appKeys }: {
            appKeys: string[];
        }) => Promise<ResolvedAppLocator[]>;
        updateManifestEntry: (options: UpdateManifestEntryOptions) => Promise<UpdateManifestEntryResult>;
        addActionEntry: (options: AddActionEntryOptions) => Promise<AddActionEntryResult>;
        findActionEntry: ({ name, manifest, }: {
            name: string;
            manifest: Manifest;
        }) => ActionEntry | null;
        listActionEntries: ({ configPath, }?: {
            configPath?: string;
        }) => Promise<Array<[string, ActionEntry]>>;
        deleteActionEntry: ({ name, configPath, skipWrite, }: {
            name: string;
            configPath?: string;
            skipWrite?: boolean;
        }) => Promise<Manifest>;
        hasActionEntry: ({ name, manifest, }: {
            name: string;
            manifest: Manifest;
        }) => boolean;
        findManifestEntry: typeof findManifestEntry;
        readManifestFromFile: typeof readManifestFromFile;
        getManifestConnections: () => Promise<Record<string, {
            connectionId: string | number;
        }> | null>;
    };
} & {
    context: CapabilitiesContext;
} & {
    context: {
        resolveConnection: (name: string) => Promise<{
            connectionId: string | number;
        } | undefined>;
        getConnectionsMap: () => Promise<Record<string, {
            connectionId: string | number;
        }> | null>;
    };
} & {
    listApps: (options?: ({
        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;
    }>;
} & {
    context: {
        meta: {
            listApps: PluginMeta<unknown>;
        };
    };
} & {
    getApp: (options?: {
        app: string;
    } | {
        appKey: string;
    } | undefined) => 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;
        };
    }>;
} & {
    context: {
        meta: {
            getApp: PluginMeta<unknown>;
        };
    };
} & {
    listConnections: (options?: ({
        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;
    }>;
} & {
    context: {
        meta: {
            listConnections: PluginMeta<unknown>;
        };
    };
} & {
    getConnection: (options?: {
        connection?: string | number | undefined;
        connectionId?: string | number | undefined;
        authenticationId?: string | number | 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;
        };
    }>;
} & {
    context: {
        meta: {
            getConnection: PluginMeta<unknown>;
        };
    };
} & {
    findFirstConnection: (options?: {
        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;
        };
    }>;
} & {
    context: {
        meta: {
            findFirstConnection: PluginMeta<unknown>;
        };
    };
} & {
    findUniqueConnection: (options?: {
        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;
        };
    }>;
} & {
    context: {
        meta: {
            findUniqueConnection: PluginMeta<unknown>;
        };
    };
} & {
    getConnectionStartUrl: (options?: {
        app: string;
    } | undefined) => Promise<{
        data: GetConnectionStartUrlItem;
    }>;
} & {
    context: {
        meta: {
            getConnectionStartUrl: PluginMeta<unknown>;
        };
    };
} & {
    waitForNewConnection: (options?: {
        app: string;
        startedAt: number;
        timeoutMs?: number | undefined;
        pollIntervalMs?: number | undefined;
    } | undefined) => Promise<{
        data: WaitForNewConnectionItem;
    }>;
} & {
    context: {
        meta: {
            waitForNewConnection: PluginMeta<unknown>;
        };
    };
} & {
    createConnection: (options?: {
        app: string;
        browser: "never" | "auto" | "always";
        timeoutMs?: number | undefined;
        pollIntervalMs?: number | undefined;
    } | undefined) => Promise<{
        data: CreateConnectionItem;
    }>;
} & {
    context: {
        meta: {
            createConnection: PluginMeta<unknown>;
        };
    };
} & {
    listActions: (options?: (({
        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;
    }) | undefined) => 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;
    }>;
} & {
    context: {
        meta: {
            listActions: PluginMeta<unknown>;
        };
    };
} & {
    getAction: (options?: {
        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;
    } | undefined) => 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;
        };
    }>;
} & {
    context: {
        meta: {
            getAction: PluginMeta<unknown>;
        };
    };
} & {
    listActionInputFields: (options?: (({
        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;
    }) | undefined) => 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>;
} & {
    context: {
        meta: {
            listActionInputFields: PluginMeta<unknown>;
        };
    };
} & {
    getActionInputFieldsSchema: (options?: {
        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;
    } | undefined) => Promise<{
        data: Record<string, unknown>;
    }>;
} & {
    context: {
        meta: {
            getActionInputFieldsSchema: PluginMeta<unknown>;
        };
    };
} & {
    listActionInputFieldChoices: (options?: (({
        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;
    }) | undefined) => PaginatedSdkResult<{
        key?: string | undefined;
        label?: string | undefined;
        sample?: string | undefined;
        value?: string | undefined;
    }>;
} & {
    context: {
        meta: {
            listActionInputFieldChoices: PluginMeta<unknown>;
        };
    };
} & {
    listInputFields: (options?: (({
        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;
    }) | undefined) => 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>;
    context: {
        meta: {
            listInputFields: {
                categories: string[];
                deprecation: {
                    message: string;
                };
                type: "list";
                itemType: string;
                inputSchema: zod.ZodUnion<readonly [zod.ZodObject<{
                    app: zod.ZodString & {
                        _def: zod_v4_core.$ZodStringDef & PositionalMetadata;
                    };
                    actionType: zod.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: zod.ZodString & {
                        _def: zod_v4_core.$ZodStringDef & PositionalMetadata;
                    };
                    connection: zod.ZodOptional<zod.ZodUnion<readonly [zod.ZodString, zod.ZodNumber]>>;
                    connectionId: zod.ZodOptional<zod.ZodNullable<zod.ZodUnion<readonly [zod.ZodString, zod.ZodNumber]>>>;
                    authenticationId: zod.ZodOptional<zod.ZodNullable<zod.ZodUnion<readonly [zod.ZodString, zod.ZodNumber]>>>;
                    inputs: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodUnknown>>;
                    pageSize: zod.ZodOptional<zod.ZodNumber>;
                    maxItems: zod.ZodOptional<zod.ZodNumber>;
                    cursor: zod.ZodOptional<zod.ZodString>;
                }, zod_v4_core.$strip>, zod.ZodObject<{
                    appKey: zod.ZodString & {
                        _def: zod_v4_core.$ZodStringDef & PositionalMetadata;
                    };
                    actionType: zod.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: zod.ZodString;
                    connection: zod.ZodOptional<zod.ZodUnion<readonly [zod.ZodString, zod.ZodNumber]>>;
                    connectionId: zod.ZodOptional<zod.ZodNullable<zod.ZodUnion<readonly [zod.ZodString, zod.ZodNumber]>>>;
                    authenticationId: zod.ZodOptional<zod.ZodNullable<zod.ZodUnion<readonly [zod.ZodString, zod.ZodNumber]>>>;
                    inputs: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodUnknown>>;
                    pageSize: zod.ZodOptional<zod.ZodNumber>;
                    maxItems: zod.ZodOptional<zod.ZodNumber>;
                    cursor: zod.ZodOptional<zod.ZodString>;
                }, zod_v4_core.$strip>]>;
                outputSchema: zod.ZodUnion<readonly [zod.ZodObject<{
                    key: zod.ZodString;
                    type: zod.ZodLiteral<"input_field">;
                    default_value: zod.ZodString;
                    depends_on: zod.ZodArray<zod.ZodString>;
                    description: zod.ZodString;
                    invalidates_input_fields: zod.ZodBoolean;
                    is_required: zod.ZodBoolean;
                    placeholder: zod.ZodString;
                    title: zod.ZodString;
                    value_type: zod.ZodString;
                    format: zod.ZodOptional<zod.ZodString>;
                    items: zod.ZodOptional<zod.ZodObject<{
                        type: zod.ZodString;
                    }, zod_v4_core.$strip>>;
                }, zod_v4_core.$strip>, zod.ZodObject<{
                    key: zod.ZodString;
                    type: zod.ZodLiteral<"info_field">;
                    description: zod.ZodString;
                    title: zod.ZodOptional<zod.ZodString>;
                }, zod_v4_core.$strip>, zod.ZodType<FieldsetItem, unknown, zod_v4_core.$ZodTypeInternals<FieldsetItem, unknown>>]>;
                formatter: OutputFormatter<unknown, {
                    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, Record<string, unknown>, unknown>;
                defaultPageSize: number;
            };
        };
    };
} & {
    getInputFieldsSchema: (options?: {
        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;
    } | undefined) => Promise<{
        data: Record<string, unknown>;
    }>;
    context: {
        meta: {
            getInputFieldsSchema: {
                categories: string[];
                deprecation: {
                    message: string;
                };
                type: "function";
                inputSchema: zod.ZodUnion<readonly [zod.ZodObject<{
                    app: zod.ZodString & {
                        _def: zod_v4_core.$ZodStringDef & PositionalMetadata;
                    };
                    actionType: zod.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: zod.ZodString & {
                        _def: zod_v4_core.$ZodStringDef & PositionalMetadata;
                    };
                    connection: zod.ZodOptional<zod.ZodUnion<readonly [zod.ZodString, zod.ZodNumber]>>;
                    connectionId: zod.ZodOptional<zod.ZodNullable<zod.ZodUnion<readonly [zod.ZodString, zod.ZodNumber]>>>;
                    authenticationId: zod.ZodOptional<zod.ZodNullable<zod.ZodUnion<readonly [zod.ZodString, zod.ZodNumber]>>>;
                    inputs: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodUnknown>>;
                }, zod_v4_core.$strip>, zod.ZodObject<{
                    appKey: zod.ZodString & {
                        _def: zod_v4_core.$ZodStringDef & PositionalMetadata;
                    };
                    actionType: zod.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: zod.ZodString;
                    connection: zod.ZodOptional<zod.ZodUnion<readonly [zod.ZodString, zod.ZodNumber]>>;
                    connectionId: zod.ZodOptional<zod.ZodNullable<zod.ZodUnion<readonly [zod.ZodString, zod.ZodNumber]>>>;
                    authenticationId: zod.ZodOptional<zod.ZodNullable<zod.ZodUnion<readonly [zod.ZodString, zod.ZodNumber]>>>;
                    inputs: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodUnknown>>;
                }, zod_v4_core.$strip>]>;
            };
        };
    };
} & {
    listInputFieldChoices: (options?: (({
        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;
    }) | undefined) => PaginatedSdkResult<{
        key?: string | undefined;
        label?: string | undefined;
        sample?: string | undefined;
        value?: string | undefined;
    }>;
    context: {
        meta: {
            listInputFieldChoices: {
                categories: string[];
                deprecation: {
                    message: string;
                };
                type: "list";
                itemType: string;
                inputSchema: zod.ZodUnion<readonly [zod.ZodObject<{
                    app: zod.ZodString & {
                        _def: zod_v4_core.$ZodStringDef & PositionalMetadata;
                    };
                    actionType: zod.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: zod.ZodString & {
                        _def: zod_v4_core.$ZodStringDef & PositionalMetadata;
                    };
                    inputField: zod.ZodString & {
                        _def: zod_v4_core.$ZodStringDef & PositionalMetadata;
                    };
                    connection: zod.ZodOptional<zod.ZodUnion<readonly [zod.ZodString, zod.ZodNumber]>>;
                    connectionId: zod.ZodOptional<zod.ZodNullable<zod.ZodUnion<readonly [zod.ZodString, zod.ZodNumber]>>>;
                    authenticationId: zod.ZodOptional<zod.ZodNullable<zod.ZodUnion<readonly [zod.ZodString, zod.ZodNumber]>>>;
                    inputs: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodUnknown>>;
                    page: zod.ZodOptional<zod.ZodNumber>;
                    pageSize: zod.ZodOptional<zod.ZodNumber>;
                    maxItems: zod.ZodOptional<zod.ZodNumber>;
                    cursor: zod.ZodOptional<zod.ZodString>;
                }, zod_v4_core.$strip>, zod.ZodObject<{
                    appKey: zod.ZodString & {
                        _def: zod_v4_core.$ZodStringDef & PositionalMetadata;
                    };
                    actionType: zod.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: zod.ZodString;
                    inputFieldKey: zod.ZodString;
                    connection: zod.ZodOptional<zod.ZodUnion<readonly [zod.ZodString, zod.ZodNumber]>>;
                    connectionId: zod.ZodOptional<zod.ZodNullable<zod.ZodUnion<readonly [zod.ZodString, zod.ZodNumber]>>>;
                    authenticationId: zod.ZodOptional<zod.ZodNullable<zod.ZodUnion<readonly [zod.ZodString, zod.ZodNumber]>>>;
                    inputs: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodUnknown>>;
                    page: zod.ZodOptional<zod.ZodNumber>;
                    pageSize: zod.ZodOptional<zod.ZodNumber>;
                    maxItems: zod.ZodOptional<zod.ZodNumber>;
                    cursor: zod.ZodOptional<zod.ZodString>;
                }, zod_v4_core.$strip>]>;
                outputSchema: zod.ZodObject<{
                    key: zod.ZodOptional<zod.ZodString>;
                    label: zod.ZodOptional<zod.ZodString>;
                    sample: zod.ZodOptional<zod.ZodString>;
                    value: zod.ZodOptional<zod.ZodString>;
                }, zod_v4_core.$strip>;
                formatter: OutputFormatter<unknown, {
                    key?: string | undefined;
                    label?: string | undefined;
                    sample?: string | undefined;
                    value?: string | undefined;
                }, Record<string, unknown>, unknown>;
                defaultPageSize: number;
            };
        };
    };
} & {
    runAction: (options?: (({
        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;
    }) | undefined) => PaginatedSdkResult<unknown>;
} & {
    context: {
        meta: {
            runAction: PluginMeta<unknown>;
        };
    };
} & {
    listAuthentications: (options?: ({
        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;
    }>;
    context: {
        meta: {
            listAuthentications: {
                packages: string[];
                categories: string[];
                deprecation: {
                    message: string;
                };
                type: "list";
                itemType: string;
                inputSchema: zod.ZodObject<{
                    title: zod.ZodOptional<zod.ZodString>;
                    search: zod.ZodOptional<zod.ZodString>;
                    owner: zod.ZodOptional<zod.ZodString>;
                    app: zod.ZodOptional<zod.ZodString & {
                        _def: zod_v4_core.$ZodStringDef & PositionalMetadata;
                    }>;
                    appKey: zod.ZodOptional<zod.ZodString & {
                        _def: zod_v4_core.$ZodStringDef & PositionalMetadata;
                    }>;
                    connections: zod.ZodOptional<zod.ZodArray<zod.ZodString>>;
                    connectionIds: zod.ZodOptional<zod.ZodArray<zod.ZodString>>;
                    authenticationIds: zod.ZodOptional<zod.ZodArray<zod.ZodString>>;
                    account: zod.ZodOptional<zod.ZodString>;
                    accountId: zod.ZodOptional<zod.ZodString>;
                    includeShared: zod.ZodOptional<zod.ZodBoolean>;
                    isExpired: zod.ZodOptional<zod.ZodBoolean>;
                    expired: zod.ZodOptional<zod.ZodBoolean>;
                    pageSize: zod.ZodOptional<zod.ZodNumber>;
                    maxItems: zod.ZodOptional<zod.ZodNumber>;
                    cursor: zod.ZodOptional<zod.ZodString>;
                }, zod_v4_core.$strip>;
                outputSchema: zod.ZodObject<{
                    title: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
                    date: zod.ZodString;
                    is_invite_only: zod.ZodBoolean;
                    lastchanged: zod.ZodOptional<zod.ZodString>;
                    destination_selected_api: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
                    is_private: zod.ZodBoolean;
                    shared_with_all: zod.ZodBoolean;
                    is_stale: zod.ZodOptional<zod.ZodString>;
                    is_shared: zod.ZodOptional<zod.ZodString>;
                    marked_stale_at: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
                    label: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
                    identifier: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
                    url: zod.ZodOptional<zod.ZodString>;
                    groups: zod.ZodOptional<zod.ZodArray<zod.ZodRecord<zod.ZodString, zod.ZodUnknown>>>;
                    members: zod.ZodOptional<zod.ZodString>;
                    permissions: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodBoolean>>;
                    public_id: zod.ZodOptional<zod.ZodString>;
                    account_public_id: zod.ZodOptional<zod.ZodString>;
                    customuser_public_id: zod.ZodOptional<zod.ZodString>;
                    id: zod.ZodString;
                    account_id: zod.ZodString;
                    implementation_id: zod.ZodOptional<zod.ZodString>;
                    profile_id: zod.ZodOptional<zod.ZodString>;
                    is_expired: zod.ZodOptional<zod.ZodString>;
                    expired_at: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
                    app_key: zod.ZodOptional<zod.ZodString>;
                    app_version: zod.ZodOptional<zod.ZodString>;
                }, zod_v4_core.$strip>;
                formatter: OutputFormatter<unknown, {
                    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;
                }, Record<string, unknown>, unknown>;
            };
        };
    };
} & {
    getAuthentication: (options?: {
        connection?: string | number | undefined;
        connectionId?: string | number | undefined;
        authenticationId?: string | number | 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;
        };
    }>;
    context: {
        meta: {
            getAuthentication: {
                packages: string[];
                categories: string[];
                deprecation: {
                    message: string;
                };
                type: "item";
                itemType: string;
                inputSchema: zod.ZodObject<{
                    connection: zod.ZodOptional<zod.ZodUnion<readonly [zod.ZodString, zod.ZodNumber]>>;
                    connectionId: zod.ZodOptional<zod.ZodUnion<readonly [zod.ZodString, zod.ZodNumber]>>;
                    authenticationId: zod.ZodOptional<zod.ZodUnion<readonly [zod.ZodString, zod.ZodNumber]>>;
                }, zod_v4_core.$strip>;
                outputSchema: zod.ZodObject<{
                    title: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
                    date: zod.ZodString;
                    is_invite_only: zod.ZodBoolean;
                    lastchanged: zod.ZodOptional<zod.ZodString>;
                    destination_selected_api: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
                    is_private: zod.ZodBoolean;
                    shared_with_all: zod.ZodBoolean;
                    is_stale: zod.ZodOptional<zod.ZodString>;
                    is_shared: zod.ZodOptional<zod.ZodString>;
                    marked_stale_at: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
                    label: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
                    identifier: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
                    url: zod.ZodOptional<zod.ZodString>;
                    groups: zod.ZodOptional<zod.ZodArray<zod.ZodRecord<zod.ZodString, zod.ZodUnknown>>>;
                    members: zod.ZodOptional<zod.ZodString>;
                    permissions: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodBoolean>>;
                    public_id: zod.ZodOptional<zod.ZodString>;
                    account_public_id: zod.ZodOptional<zod.ZodString>;
                    customuser_public_id: zod.ZodOptional<zod.ZodString>;
                    id: zod.ZodString;
                    account_id: zod.ZodString;
                    implementation_id: zod.ZodOptional<zod.ZodString>;
                    profile_id: zod.ZodOptional<zod.ZodString>;
                    is_expired: zod.ZodOptional<zod.ZodString>;
                    expired_at: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
                    app_key: zod.ZodOptional<zod.ZodString>;
                    app_version: zod.ZodOptional<zod.ZodString>;
                }, zod_v4_core.$strip>;
                formatter: OutputFormatter<unknown, {
                    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;
                }, Record<string, unknown>, unknown>;
            };
        };
    };
} & {
    findFirstAuthentication: (options?: {
        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;
        };
    }>;
    context: {
        meta: {
            findFirstAuthentication: {
                packages: string[];
                categories: string[];
                deprecation: {
                    message: string;
                };
                type: "item";
                itemType: string;
                inputSchema: zod.ZodObject<{
                    title: zod.ZodOptional<zod.ZodString>;
                    search: zod.ZodOptional<zod.ZodString>;
                    appKey: zod.ZodOptional<zod.ZodString & {
                        _def: zod_v4_core.$ZodStringDef & PositionalMetadata;
                    }>;
                    app: zod.ZodOptional<zod.ZodString & {
                        _def: zod_v4_core.$ZodStringDef & PositionalMetadata;
                    }>;
                    owner: zod.ZodOptional<zod.ZodString>;
                    account: zod.ZodOptional<zod.ZodString>;
                    accountId: zod.ZodOptional<zod.ZodString>;
                    includeShared: zod.ZodOptional<zod.ZodBoolean>;
                    isExpired: zod.ZodOptional<zod.ZodBoolean>;
                    expired: zod.ZodOptional<zod.ZodBoolean>;
                }, zod_v4_core.$strip>;
                outputSchema: zod.ZodObject<{
                    title: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
                    date: zod.ZodString;
                    is_invite_only: zod.ZodBoolean;
                    lastchanged: zod.ZodOptional<zod.ZodString>;
                    destination_selected_api: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
                    is_private: zod.ZodBoolean;
                    shared_with_all: zod.ZodBoolean;
                    is_stale: zod.ZodOptional<zod.ZodString>;
                    is_shared: zod.ZodOptional<zod.ZodString>;
                    marked_stale_at: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
                    label: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
                    identifier: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
                    url: zod.ZodOptional<zod.ZodString>;
                    groups: zod.ZodOptional<zod.ZodArray<zod.ZodRecord<zod.ZodString, zod.ZodUnknown>>>;
                    members: zod.ZodOptional<zod.ZodString>;
                    permissions: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodBoolean>>;
                    public_id: zod.ZodOptional<zod.ZodString>;
                    account_public_id: zod.ZodOptional<zod.ZodString>;
                    customuser_public_id: zod.ZodOptional<zod.ZodString>;
                    id: zod.ZodString;
                    account_id: zod.ZodString;
                    implementation_id: zod.ZodOptional<zod.ZodString>;
                    profile_id: zod.ZodOptional<zod.ZodString>;
                    is_expired: zod.ZodOptional<zod.ZodString>;
                    expired_at: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
                    app_key: zod.ZodOptional<zod.ZodString>;
                    app_version: zod.ZodOptional<zod.ZodString>;
                }, zod_v4_core.$strip>;
                formatter: OutputFormatter<unknown, {
                    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;
                }, Record<string, unknown>, unknown>;
            };
        };
    };
} & {
    findUniqueAuthentication: (options?: {
        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;
        };
    }>;
    context: {
        meta: {
            findUniqueAuthentication: {
                packages: string[];
                categories: string[];
                deprecation: {
                    message: string;
                };
                type: "item";
                itemType: string;
                inputSchema: zod.ZodObject<{
                    title: zod.ZodOptional<zod.ZodString>;
                    search: zod.ZodOptional<zod.ZodString>;
                    appKey: zod.ZodOptional<zod.ZodString & {
                        _def: zod_v4_core.$ZodStringDef & PositionalMetadata;
                    }>;
                    app: zod.ZodOptional<zod.ZodString & {
                        _def: zod_v4_core.$ZodStringDef & PositionalMetadata;
                    }>;
                    owner: zod.ZodOptional<zod.ZodString>;
                    account: zod.ZodOptional<zod.ZodString>;
                    accountId: zod.ZodOptional<zod.ZodString>;
                    includeShared: zod.ZodOptional<zod.ZodBoolean>;
                    isExpired: zod.ZodOptional<zod.ZodBoolean>;
                    expired: zod.ZodOptional<zod.ZodBoolean>;
                }, zod_v4_core.$strip>;
                outputSchema: zod.ZodObject<{
                    title: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
                    date: zod.ZodString;
                    is_invite_only: zod.ZodBoolean;
                    lastchanged: zod.ZodOptional<zod.ZodString>;
                    destination_selected_api: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
                    is_private: zod.ZodBoolean;
                    shared_with_all: zod.ZodBoolean;
                    is_stale: zod.ZodOptional<zod.ZodString>;
                    is_shared: zod.ZodOptional<zod.ZodString>;
                    marked_stale_at: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
                    label: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
                    identifier: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
                    url: zod.ZodOptional<zod.ZodString>;
                    groups: zod.ZodOptional<zod.ZodArray<zod.ZodRecord<zod.ZodString, zod.ZodUnknown>>>;
                    members: zod.ZodOptional<zod.ZodString>;
                    permissions: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodBoolean>>;
                    public_id: zod.ZodOptional<zod.ZodString>;
                    account_public_id: zod.ZodOptional<zod.ZodString>;
                    customuser_public_id: zod.ZodOptional<zod.ZodString>;
                    id: zod.ZodString;
                    account_id: zod.ZodString;
                    implementation_id: zod.ZodOptional<zod.ZodString>;
                    profile_id: zod.ZodOptional<zod.ZodString>;
                    is_expired: zod.ZodOptional<zod.ZodString>;
                    expired_at: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
                    app_key: zod.ZodOptional<zod.ZodString>;
                    app_version: zod.ZodOptional<zod.ZodString>;
                }, zod_v4_core.$strip>;
                formatter: OutputFormatter<unknown, {
                    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;
                }, Record<string, unknown>, unknown>;
            };
        };
    };
} & {
    listClientCredentials: (options?: ({
        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;
    }>;
} & {
    context: {
        meta: {
            listClientCredentials: PluginMeta<unknown>;
        };
    };
} & {
    createClientCredentials: (options?: {
        name: string;
        allowedScopes: ("external" | "credentials")[];
        policy?: Record<string, unknown> | undefined;
    } | undefined) => Promise<{
        data: {
            client_id: string;
            name: string;
            client_secret: string;
        };
    }>;
} & {
    context: {
        meta: {
            createClientCredentials: PluginMeta<unknown>;
        };
    };
} & {
    deleteClientCredentials: (options?: {
        clientId: string;
    } | undefined) => Promise<{
        success: boolean;
    }>;
} & {
    context: {
        meta: {
            deleteClientCredentials: PluginMeta<unknown>;
        };
    };
} & {
    fetch: (url: string | URL, init?: ZapierFetchInitOptions) => Promise<Response>;
    context: {
        meta: {
            fetch: {
                description: string;
                packages: string[];
                categories: {
                    key: string;
                    title: string;
                }[];
                returnType: string;
                inputParameters: ({
                    name: string;
                    schema: zod.ZodUnion<readonly [zod.ZodString, zod.ZodCustom<URL, URL>]>;
                } | {
                    name: string;
                    schema: zod.ZodOptional<zod.ZodObject<{
                        method: zod.ZodOptional<zod.ZodEnum<{
                            GET: "GET";
                            POST: "POST";
                            DELETE: "DELETE";
                            PUT: "PUT";
                            PATCH: "PATCH";
                            HEAD: "HEAD";
                            OPTIONS: "OPTIONS";
                        }>>;
                        headers: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodString>>;
                        body: zod.ZodOptional<zod.ZodUnion<readonly [zod.ZodString, zod.ZodCustom<FormData, FormData>, zod.ZodCustom<URLSearchParams, URLSearchParams>, zod.ZodRecord<zod.ZodString, zod.ZodUnknown>]>>;
                        connectionId: zod.ZodOptional<zod.ZodUnion<readonly [zod.ZodString, zod.ZodNumber]>>;
                        connection: zod.ZodOptional<zod.ZodUnion<readonly [zod.ZodString, zod.ZodNumber]>>;
                        authenticationId: zod.ZodOptional<zod.ZodUnion<readonly [zod.ZodString, zod.ZodNumber]>>;
                        callbackUrl: zod.ZodOptional<zod.ZodString>;
                        maxTime: zod.ZodOptional<zod.ZodNumber>;
                    }, zod_v4_core.$strip>>;
                })[];
            };
        };
    };
} & {
    request: (options?: {
        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;
    } | undefined) => Promise<Response>;
} & {
    context: {
        meta: {
            request: PluginMeta<unknown>;
        };
    };
} & {
    listTables: (options?: ({
        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;
    }>;
} & {
    context: {
        meta: {
            listTables: PluginMeta<unknown>;
        };
    };
} & {
    getTable: (options?: {
        table: string;
    } | {
        tableId: 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;
        };
    }>;
} & {
    context: {
        meta: {
            getTable: PluginMeta<unknown>;
        };
    };
} & {
    deleteTable: (options?: {
        table: string;
    } | {
        tableId: string;
    } | undefined) => Promise<{
        success: boolean;
    }>;
} & {
    context: {
        meta: {
            deleteTable: PluginMeta<unknown>;
        };
    };
} & {
    createTable: (options?: {
        name: string;
        description?: string | undefined;
    } | 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;
        };
    }>;
} & {
    context: {
        meta: {
            createTable: PluginMeta<unknown>;
        };
    };
} & {
    listTableFields: (options?: {
        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;
    } | undefined) => Promise<{
        data: {
            id: string;
            type: "string" | "number" | "boolean" | "text" | "datetime" | "decimal" | "json" | "email" | "link" | "multiple_string" | "labeled_string" | "multiple_labeled_string" | "multiple_text" | "multiple_boolean" | "multiple_number" | "multiple_decimal" | "multiple_datetime" | "uuid" | "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;
        }[];
    }>;
} & {
    context: {
        meta: {
            listTableFields: PluginMeta<unknown>;
        };
    };
} & {
    createTableFields: (options?: {
        table: string;
        fields: {
            type: "string" | "number" | "boolean" | "text" | "datetime" | "decimal" | "json" | "email" | "link" | "multiple_string" | "labeled_string" | "multiple_labeled_string" | "multiple_text" | "multiple_boolean" | "multiple_number" | "multiple_decimal" | "multiple_datetime" | "uuid" | "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" | "multiple_string" | "labeled_string" | "multiple_labeled_string" | "multiple_text" | "multiple_boolean" | "multiple_number" | "multiple_decimal" | "multiple_datetime" | "uuid" | "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;
        }[];
    } | undefined) => Promise<{
        data: {
            id: string;
            type: "string" | "number" | "boolean" | "text" | "datetime" | "decimal" | "json" | "email" | "link" | "multiple_string" | "labeled_string" | "multiple_labeled_string" | "multiple_text" | "multiple_boolean" | "multiple_number" | "multiple_decimal" | "multiple_datetime" | "uuid" | "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;
        }[];
    }>;
} & {
    context: {
        meta: {
            createTableFields: PluginMeta<unknown>;
        };
    };
} & {
    deleteTableFields: (options?: {
        table: string;
        fields: (string | number)[];
    } | {
        tableId: string;
        fieldKeys: (string | number)[];
    } | undefined) => Promise<{
        success: boolean;
    }>;
} & {
    context: {
        meta: {
            deleteTableFields: PluginMeta<unknown>;
        };
    };
} & {
    listTableRecords: (options?: (({
        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;
    }) | undefined) => PaginatedSdkResult<{
        data: Record<string, unknown>;
        id: string;
        created_at: string;
        edited_at: string;
        deleted_at?: string | null | undefined;
    }>;
} & {
    context: {
        meta: {
            listTableRecords: PluginMeta<unknown>;
        };
    };
} & {
    getTableRecord: (options?: {
        table: string;
        record: string;
        keyMode: "names" | "ids";
    } | {
        tableId: string;
        recordId: string;
        keyMode: "names" | "ids";
    } | undefined) => Promise<{
        data: {
            data: Record<string, unknown>;
            id: string;
            created_at: string;
            edited_at: string;
            deleted_at?: string | null | undefined;
        };
    }>;
} & {
    context: {
        meta: {
            getTableRecord: PluginMeta<unknown>;
        };
    };
} & {
    createTableRecords: (options?: {
        table: string;
        records: {
            data: Record<string, unknown>;
        }[];
        keyMode: "names" | "ids";
    } | {
        tableId: string;
        records: {
            data: Record<string, unknown>;
        }[];
        keyMode: "names" | "ids";
    } | undefined) => Promise<{
        data: {
            data: Record<string, unknown>;
            id: string;
            created_at: string;
            edited_at: string;
            deleted_at?: string | null | undefined;
        }[];
    }>;
} & {
    context: {
        meta: {
            createTableRecords: PluginMeta<unknown>;
        };
    };
} & {
    deleteTableRecords: (options?: {
        table: string;
        records: string[];
    } | {
        tableId: string;
        recordIds: string[];
    } | undefined) => Promise<{
        success: boolean;
    }>;
} & {
    context: {
        meta: {
            deleteTableRecords: PluginMeta<unknown>;
        };
    };
} & {
    updateTableRecords: (options?: {
        table: string;
        records: {
            id: string;
            data: Record<string, unknown>;
        }[];
        keyMode: "names" | "ids";
    } | {
        tableId: string;
        records: {
            id: string;
            data: Record<string, unknown>;
        }[];
        keyMode: "names" | "ids";
    } | undefined) => Promise<{
        data: {
            data: Record<string, unknown>;
            id: string;
            created_at: string;
            edited_at: string;
            deleted_at?: string | null | undefined;
        }[];
    }>;
} & {
    context: {
        meta: {
            updateTableRecords: PluginMeta<unknown>;
        };
    };
} & {
    apps: ActionProxy & ZapierSdkApps;
    context: {
        meta: {
            "apps.{appKey}": {
                categories: string[];
                packages: string[];
                type: "function";
                inputSchema: zod.ZodObject<{
                    connectionId: zod.ZodOptional<zod.ZodUnion<readonly [zod.ZodString, zod.ZodNumber]>>;
                    connection: zod.ZodOptional<zod.ZodUnion<readonly [zod.ZodString, zod.ZodNumber]>>;
                    authenticationId: zod.ZodOptional<zod.ZodUnion<readonly [zod.ZodString, zod.ZodNumber]>>;
                }, zod_v4_core.$strip>;
                returnType: string;
            };
            "apps.{appKey}.{actionType}.{actionKey}": {
                categories: string[];
                packages: string[];
                type: "list";
                inputSchema: zod.ZodObject<{
                    inputs: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodUnknown>>;
                    connectionId: zod.ZodOptional<zod.ZodUnion<readonly [zod.ZodString, zod.ZodNumber]>>;
                    connection: zod.ZodOptional<zod.ZodUnion<readonly [zod.ZodString, zod.ZodNumber]>>;
                    authenticationId: zod.ZodOptional<zod.ZodUnion<readonly [zod.ZodString, zod.ZodNumber]>>;
                    timeoutMs: zod.ZodOptional<zod.ZodNumber>;
                }, zod_v4_core.$strip>;
                itemType: string;
                outputSchema: zod.ZodUnknown;
            };
        };
    };
}>;
/**
 * The module-model side of the Zapier SDK: every plugin authored with
 * `defineMethod` / `defineProperty` / `definePlugin`. Every head merges this
 * with its own legacy `.use(...)` stack via `defineLegacyMerge`, so adding a
 * plugin only edits this aggregate's `exports`, not the heads. It is the
 * counterpart to `createZapierSdkStack` (the legacy side); as plugins migrate
 * they move from that stack into here. When the legacy stack is empty the
 * bridge is removed and this becomes the SDK root.
 */
declare const zapierSdkPlugin: AggregatePlugin<"sdk", {
    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 []> & PluginSummary<never, "getProfile">;
}> & PluginSummary<never, "getProfile" | "zapier/sdk">;
declare function createZapierSdk(options?: ZapierSdkOptions): {
    context: {
        meta: Record<string, PluginMeta>;
        hooks: MethodHooks;
    };
} & {
    context: {
        core: CoreOptions;
    };
} & {
    context: {
        options: ZapierSdkOptions;
    };
} & {
    context: EventEmissionContext;
} & {
    context: {
        api: ApiClient;
        resolveCredentials: () => Promise<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;
        } | undefined>;
    };
} & {
    context: {
        getResolvedManifest: () => Promise<Manifest | null>;
        getVersionedImplementationId: (appKey: string) => Promise<string | null>;
        resolveAppKeys: ({ appKeys }: {
            appKeys: string[];
        }) => Promise<ResolvedAppLocator[]>;
        updateManifestEntry: (options: UpdateManifestEntryOptions) => Promise<UpdateManifestEntryResult>;
        addActionEntry: (options: AddActionEntryOptions) => Promise<AddActionEntryResult>;
        findActionEntry: ({ name, manifest, }: {
            name: string;
            manifest: Manifest;
        }) => ActionEntry | null;
        listActionEntries: ({ configPath, }?: {
            configPath?: string;
        }) => Promise<Array<[string, ActionEntry]>>;
        deleteActionEntry: ({ name, configPath, skipWrite, }: {
            name: string;
            configPath?: string;
            skipWrite?: boolean;
        }) => Promise<Manifest>;
        hasActionEntry: ({ name, manifest, }: {
            name: string;
            manifest: Manifest;
        }) => boolean;
        findManifestEntry: typeof findManifestEntry;
        readManifestFromFile: typeof readManifestFromFile;
        getManifestConnections: () => Promise<Record<string, {
            connectionId: string | number;
        }> | null>;
    };
} & {
    context: CapabilitiesContext;
} & {
    context: {
        resolveConnection: (name: string) => Promise<{
            connectionId: string | number;
        } | undefined>;
        getConnectionsMap: () => Promise<Record<string, {
            connectionId: string | number;
        }> | null>;
    };
} & {
    listApps: (options?: ({
        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;
    }>;
} & {
    context: {
        meta: {
            listApps: PluginMeta<unknown>;
        };
    };
} & {
    getApp: (options?: {
        app: string;
    } | {
        appKey: string;
    } | undefined) => 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;
        };
    }>;
} & {
    context: {
        meta: {
            getApp: PluginMeta<unknown>;
        };
    };
} & {
    listConnections: (options?: ({
        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;
    }>;
} & {
    context: {
        meta: {
            listConnections: PluginMeta<unknown>;
        };
    };
} & {
    getConnection: (options?: {
        connection?: string | number | undefined;
        connectionId?: string | number | undefined;
        authenticationId?: string | number | 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;
        };
    }>;
} & {
    context: {
        meta: {
            getConnection: PluginMeta<unknown>;
        };
    };
} & {
    findFirstConnection: (options?: {
        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;
        };
    }>;
} & {
    context: {
        meta: {
            findFirstConnection: PluginMeta<unknown>;
        };
    };
} & {
    findUniqueConnection: (options?: {
        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;
        };
    }>;
} & {
    context: {
        meta: {
            findUniqueConnection: PluginMeta<unknown>;
        };
    };
} & {
    getConnectionStartUrl: (options?: {
        app: string;
    } | undefined) => Promise<{
        data: GetConnectionStartUrlItem;
    }>;
} & {
    context: {
        meta: {
            getConnectionStartUrl: PluginMeta<unknown>;
        };
    };
} & {
    waitForNewConnection: (options?: {
        app: string;
        startedAt: number;
        timeoutMs?: number | undefined;
        pollIntervalMs?: number | undefined;
    } | undefined) => Promise<{
        data: WaitForNewConnectionItem;
    }>;
} & {
    context: {
        meta: {
            waitForNewConnection: PluginMeta<unknown>;
        };
    };
} & {
    createConnection: (options?: {
        app: string;
        browser: "never" | "auto" | "always";
        timeoutMs?: number | undefined;
        pollIntervalMs?: number | undefined;
    } | undefined) => Promise<{
        data: CreateConnectionItem;
    }>;
} & {
    context: {
        meta: {
            createConnection: PluginMeta<unknown>;
        };
    };
} & {
    listActions: (options?: (({
        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;
    }) | undefined) => 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;
    }>;
} & {
    context: {
        meta: {
            listActions: PluginMeta<unknown>;
        };
    };
} & {
    getAction: (options?: {
        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;
    } | undefined) => 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;
        };
    }>;
} & {
    context: {
        meta: {
            getAction: PluginMeta<unknown>;
        };
    };
} & {
    listActionInputFields: (options?: (({
        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;
    }) | undefined) => 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>;
} & {
    context: {
        meta: {
            listActionInputFields: PluginMeta<unknown>;
        };
    };
} & {
    getActionInputFieldsSchema: (options?: {
        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;
    } | undefined) => Promise<{
        data: Record<string, unknown>;
    }>;
} & {
    context: {
        meta: {
            getActionInputFieldsSchema: PluginMeta<unknown>;
        };
    };
} & {
    listActionInputFieldChoices: (options?: (({
        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;
    }) | undefined) => PaginatedSdkResult<{
        key?: string | undefined;
        label?: string | undefined;
        sample?: string | undefined;
        value?: string | undefined;
    }>;
} & {
    context: {
        meta: {
            listActionInputFieldChoices: PluginMeta<unknown>;
        };
    };
} & {
    listInputFields: (options?: (({
        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;
    }) | undefined) => 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>;
    context: {
        meta: {
            listInputFields: {
                categories: string[];
                deprecation: {
                    message: string;
                };
                type: "list";
                itemType: string;
                inputSchema: zod.ZodUnion<readonly [zod.ZodObject<{
                    app: zod.ZodString & {
                        _def: zod_v4_core.$ZodStringDef & PositionalMetadata;
                    };
                    actionType: zod.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: zod.ZodString & {
                        _def: zod_v4_core.$ZodStringDef & PositionalMetadata;
                    };
                    connection: zod.ZodOptional<zod.ZodUnion<readonly [zod.ZodString, zod.ZodNumber]>>;
                    connectionId: zod.ZodOptional<zod.ZodNullable<zod.ZodUnion<readonly [zod.ZodString, zod.ZodNumber]>>>;
                    authenticationId: zod.ZodOptional<zod.ZodNullable<zod.ZodUnion<readonly [zod.ZodString, zod.ZodNumber]>>>;
                    inputs: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodUnknown>>;
                    pageSize: zod.ZodOptional<zod.ZodNumber>;
                    maxItems: zod.ZodOptional<zod.ZodNumber>;
                    cursor: zod.ZodOptional<zod.ZodString>;
                }, zod_v4_core.$strip>, zod.ZodObject<{
                    appKey: zod.ZodString & {
                        _def: zod_v4_core.$ZodStringDef & PositionalMetadata;
                    };
                    actionType: zod.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: zod.ZodString;
                    connection: zod.ZodOptional<zod.ZodUnion<readonly [zod.ZodString, zod.ZodNumber]>>;
                    connectionId: zod.ZodOptional<zod.ZodNullable<zod.ZodUnion<readonly [zod.ZodString, zod.ZodNumber]>>>;
                    authenticationId: zod.ZodOptional<zod.ZodNullable<zod.ZodUnion<readonly [zod.ZodString, zod.ZodNumber]>>>;
                    inputs: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodUnknown>>;
                    pageSize: zod.ZodOptional<zod.ZodNumber>;
                    maxItems: zod.ZodOptional<zod.ZodNumber>;
                    cursor: zod.ZodOptional<zod.ZodString>;
                }, zod_v4_core.$strip>]>;
                outputSchema: zod.ZodUnion<readonly [zod.ZodObject<{
                    key: zod.ZodString;
                    type: zod.ZodLiteral<"input_field">;
                    default_value: zod.ZodString;
                    depends_on: zod.ZodArray<zod.ZodString>;
                    description: zod.ZodString;
                    invalidates_input_fields: zod.ZodBoolean;
                    is_required: zod.ZodBoolean;
                    placeholder: zod.ZodString;
                    title: zod.ZodString;
                    value_type: zod.ZodString;
                    format: zod.ZodOptional<zod.ZodString>;
                    items: zod.ZodOptional<zod.ZodObject<{
                        type: zod.ZodString;
                    }, zod_v4_core.$strip>>;
                }, zod_v4_core.$strip>, zod.ZodObject<{
                    key: zod.ZodString;
                    type: zod.ZodLiteral<"info_field">;
                    description: zod.ZodString;
                    title: zod.ZodOptional<zod.ZodString>;
                }, zod_v4_core.$strip>, zod.ZodType<FieldsetItem, unknown, zod_v4_core.$ZodTypeInternals<FieldsetItem, unknown>>]>;
                formatter: OutputFormatter<unknown, {
                    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, Record<string, unknown>, unknown>;
                defaultPageSize: number;
            };
        };
    };
} & {
    getInputFieldsSchema: (options?: {
        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;
    } | undefined) => Promise<{
        data: Record<string, unknown>;
    }>;
    context: {
        meta: {
            getInputFieldsSchema: {
                categories: string[];
                deprecation: {
                    message: string;
                };
                type: "function";
                inputSchema: zod.ZodUnion<readonly [zod.ZodObject<{
                    app: zod.ZodString & {
                        _def: zod_v4_core.$ZodStringDef & PositionalMetadata;
                    };
                    actionType: zod.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: zod.ZodString & {
                        _def: zod_v4_core.$ZodStringDef & PositionalMetadata;
                    };
                    connection: zod.ZodOptional<zod.ZodUnion<readonly [zod.ZodString, zod.ZodNumber]>>;
                    connectionId: zod.ZodOptional<zod.ZodNullable<zod.ZodUnion<readonly [zod.ZodString, zod.ZodNumber]>>>;
                    authenticationId: zod.ZodOptional<zod.ZodNullable<zod.ZodUnion<readonly [zod.ZodString, zod.ZodNumber]>>>;
                    inputs: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodUnknown>>;
                }, zod_v4_core.$strip>, zod.ZodObject<{
                    appKey: zod.ZodString & {
                        _def: zod_v4_core.$ZodStringDef & PositionalMetadata;
                    };
                    actionType: zod.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: zod.ZodString;
                    connection: zod.ZodOptional<zod.ZodUnion<readonly [zod.ZodString, zod.ZodNumber]>>;
                    connectionId: zod.ZodOptional<zod.ZodNullable<zod.ZodUnion<readonly [zod.ZodString, zod.ZodNumber]>>>;
                    authenticationId: zod.ZodOptional<zod.ZodNullable<zod.ZodUnion<readonly [zod.ZodString, zod.ZodNumber]>>>;
                    inputs: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodUnknown>>;
                }, zod_v4_core.$strip>]>;
            };
        };
    };
} & {
    listInputFieldChoices: (options?: (({
        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;
    }) | undefined) => PaginatedSdkResult<{
        key?: string | undefined;
        label?: string | undefined;
        sample?: string | undefined;
        value?: string | undefined;
    }>;
    context: {
        meta: {
            listInputFieldChoices: {
                categories: string[];
                deprecation: {
                    message: string;
                };
                type: "list";
                itemType: string;
                inputSchema: zod.ZodUnion<readonly [zod.ZodObject<{
                    app: zod.ZodString & {
                        _def: zod_v4_core.$ZodStringDef & PositionalMetadata;
                    };
                    actionType: zod.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: zod.ZodString & {
                        _def: zod_v4_core.$ZodStringDef & PositionalMetadata;
                    };
                    inputField: zod.ZodString & {
                        _def: zod_v4_core.$ZodStringDef & PositionalMetadata;
                    };
                    connection: zod.ZodOptional<zod.ZodUnion<readonly [zod.ZodString, zod.ZodNumber]>>;
                    connectionId: zod.ZodOptional<zod.ZodNullable<zod.ZodUnion<readonly [zod.ZodString, zod.ZodNumber]>>>;
                    authenticationId: zod.ZodOptional<zod.ZodNullable<zod.ZodUnion<readonly [zod.ZodString, zod.ZodNumber]>>>;
                    inputs: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodUnknown>>;
                    page: zod.ZodOptional<zod.ZodNumber>;
                    pageSize: zod.ZodOptional<zod.ZodNumber>;
                    maxItems: zod.ZodOptional<zod.ZodNumber>;
                    cursor: zod.ZodOptional<zod.ZodString>;
                }, zod_v4_core.$strip>, zod.ZodObject<{
                    appKey: zod.ZodString & {
                        _def: zod_v4_core.$ZodStringDef & PositionalMetadata;
                    };
                    actionType: zod.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: zod.ZodString;
                    inputFieldKey: zod.ZodString;
                    connection: zod.ZodOptional<zod.ZodUnion<readonly [zod.ZodString, zod.ZodNumber]>>;
                    connectionId: zod.ZodOptional<zod.ZodNullable<zod.ZodUnion<readonly [zod.ZodString, zod.ZodNumber]>>>;
                    authenticationId: zod.ZodOptional<zod.ZodNullable<zod.ZodUnion<readonly [zod.ZodString, zod.ZodNumber]>>>;
                    inputs: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodUnknown>>;
                    page: zod.ZodOptional<zod.ZodNumber>;
                    pageSize: zod.ZodOptional<zod.ZodNumber>;
                    maxItems: zod.ZodOptional<zod.ZodNumber>;
                    cursor: zod.ZodOptional<zod.ZodString>;
                }, zod_v4_core.$strip>]>;
                outputSchema: zod.ZodObject<{
                    key: zod.ZodOptional<zod.ZodString>;
                    label: zod.ZodOptional<zod.ZodString>;
                    sample: zod.ZodOptional<zod.ZodString>;
                    value: zod.ZodOptional<zod.ZodString>;
                }, zod_v4_core.$strip>;
                formatter: OutputFormatter<unknown, {
                    key?: string | undefined;
                    label?: string | undefined;
                    sample?: string | undefined;
                    value?: string | undefined;
                }, Record<string, unknown>, unknown>;
                defaultPageSize: number;
            };
        };
    };
} & {
    runAction: (options?: (({
        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;
    }) | undefined) => PaginatedSdkResult<unknown>;
} & {
    context: {
        meta: {
            runAction: PluginMeta<unknown>;
        };
    };
} & {
    listAuthentications: (options?: ({
        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;
    }>;
    context: {
        meta: {
            listAuthentications: {
                packages: string[];
                categories: string[];
                deprecation: {
                    message: string;
                };
                type: "list";
                itemType: string;
                inputSchema: zod.ZodObject<{
                    title: zod.ZodOptional<zod.ZodString>;
                    search: zod.ZodOptional<zod.ZodString>;
                    owner: zod.ZodOptional<zod.ZodString>;
                    app: zod.ZodOptional<zod.ZodString & {
                        _def: zod_v4_core.$ZodStringDef & PositionalMetadata;
                    }>;
                    appKey: zod.ZodOptional<zod.ZodString & {
                        _def: zod_v4_core.$ZodStringDef & PositionalMetadata;
                    }>;
                    connections: zod.ZodOptional<zod.ZodArray<zod.ZodString>>;
                    connectionIds: zod.ZodOptional<zod.ZodArray<zod.ZodString>>;
                    authenticationIds: zod.ZodOptional<zod.ZodArray<zod.ZodString>>;
                    account: zod.ZodOptional<zod.ZodString>;
                    accountId: zod.ZodOptional<zod.ZodString>;
                    includeShared: zod.ZodOptional<zod.ZodBoolean>;
                    isExpired: zod.ZodOptional<zod.ZodBoolean>;
                    expired: zod.ZodOptional<zod.ZodBoolean>;
                    pageSize: zod.ZodOptional<zod.ZodNumber>;
                    maxItems: zod.ZodOptional<zod.ZodNumber>;
                    cursor: zod.ZodOptional<zod.ZodString>;
                }, zod_v4_core.$strip>;
                outputSchema: zod.ZodObject<{
                    title: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
                    date: zod.ZodString;
                    is_invite_only: zod.ZodBoolean;
                    lastchanged: zod.ZodOptional<zod.ZodString>;
                    destination_selected_api: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
                    is_private: zod.ZodBoolean;
                    shared_with_all: zod.ZodBoolean;
                    is_stale: zod.ZodOptional<zod.ZodString>;
                    is_shared: zod.ZodOptional<zod.ZodString>;
                    marked_stale_at: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
                    label: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
                    identifier: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
                    url: zod.ZodOptional<zod.ZodString>;
                    groups: zod.ZodOptional<zod.ZodArray<zod.ZodRecord<zod.ZodString, zod.ZodUnknown>>>;
                    members: zod.ZodOptional<zod.ZodString>;
                    permissions: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodBoolean>>;
                    public_id: zod.ZodOptional<zod.ZodString>;
                    account_public_id: zod.ZodOptional<zod.ZodString>;
                    customuser_public_id: zod.ZodOptional<zod.ZodString>;
                    id: zod.ZodString;
                    account_id: zod.ZodString;
                    implementation_id: zod.ZodOptional<zod.ZodString>;
                    profile_id: zod.ZodOptional<zod.ZodString>;
                    is_expired: zod.ZodOptional<zod.ZodString>;
                    expired_at: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
                    app_key: zod.ZodOptional<zod.ZodString>;
                    app_version: zod.ZodOptional<zod.ZodString>;
                }, zod_v4_core.$strip>;
                formatter: OutputFormatter<unknown, {
                    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;
                }, Record<string, unknown>, unknown>;
            };
        };
    };
} & {
    getAuthentication: (options?: {
        connection?: string | number | undefined;
        connectionId?: string | number | undefined;
        authenticationId?: string | number | 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;
        };
    }>;
    context: {
        meta: {
            getAuthentication: {
                packages: string[];
                categories: string[];
                deprecation: {
                    message: string;
                };
                type: "item";
                itemType: string;
                inputSchema: zod.ZodObject<{
                    connection: zod.ZodOptional<zod.ZodUnion<readonly [zod.ZodString, zod.ZodNumber]>>;
                    connectionId: zod.ZodOptional<zod.ZodUnion<readonly [zod.ZodString, zod.ZodNumber]>>;
                    authenticationId: zod.ZodOptional<zod.ZodUnion<readonly [zod.ZodString, zod.ZodNumber]>>;
                }, zod_v4_core.$strip>;
                outputSchema: zod.ZodObject<{
                    title: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
                    date: zod.ZodString;
                    is_invite_only: zod.ZodBoolean;
                    lastchanged: zod.ZodOptional<zod.ZodString>;
                    destination_selected_api: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
                    is_private: zod.ZodBoolean;
                    shared_with_all: zod.ZodBoolean;
                    is_stale: zod.ZodOptional<zod.ZodString>;
                    is_shared: zod.ZodOptional<zod.ZodString>;
                    marked_stale_at: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
                    label: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
                    identifier: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
                    url: zod.ZodOptional<zod.ZodString>;
                    groups: zod.ZodOptional<zod.ZodArray<zod.ZodRecord<zod.ZodString, zod.ZodUnknown>>>;
                    members: zod.ZodOptional<zod.ZodString>;
                    permissions: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodBoolean>>;
                    public_id: zod.ZodOptional<zod.ZodString>;
                    account_public_id: zod.ZodOptional<zod.ZodString>;
                    customuser_public_id: zod.ZodOptional<zod.ZodString>;
                    id: zod.ZodString;
                    account_id: zod.ZodString;
                    implementation_id: zod.ZodOptional<zod.ZodString>;
                    profile_id: zod.ZodOptional<zod.ZodString>;
                    is_expired: zod.ZodOptional<zod.ZodString>;
                    expired_at: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
                    app_key: zod.ZodOptional<zod.ZodString>;
                    app_version: zod.ZodOptional<zod.ZodString>;
                }, zod_v4_core.$strip>;
                formatter: OutputFormatter<unknown, {
                    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;
                }, Record<string, unknown>, unknown>;
            };
        };
    };
} & {
    findFirstAuthentication: (options?: {
        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;
        };
    }>;
    context: {
        meta: {
            findFirstAuthentication: {
                packages: string[];
                categories: string[];
                deprecation: {
                    message: string;
                };
                type: "item";
                itemType: string;
                inputSchema: zod.ZodObject<{
                    title: zod.ZodOptional<zod.ZodString>;
                    search: zod.ZodOptional<zod.ZodString>;
                    appKey: zod.ZodOptional<zod.ZodString & {
                        _def: zod_v4_core.$ZodStringDef & PositionalMetadata;
                    }>;
                    app: zod.ZodOptional<zod.ZodString & {
                        _def: zod_v4_core.$ZodStringDef & PositionalMetadata;
                    }>;
                    owner: zod.ZodOptional<zod.ZodString>;
                    account: zod.ZodOptional<zod.ZodString>;
                    accountId: zod.ZodOptional<zod.ZodString>;
                    includeShared: zod.ZodOptional<zod.ZodBoolean>;
                    isExpired: zod.ZodOptional<zod.ZodBoolean>;
                    expired: zod.ZodOptional<zod.ZodBoolean>;
                }, zod_v4_core.$strip>;
                outputSchema: zod.ZodObject<{
                    title: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
                    date: zod.ZodString;
                    is_invite_only: zod.ZodBoolean;
                    lastchanged: zod.ZodOptional<zod.ZodString>;
                    destination_selected_api: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
                    is_private: zod.ZodBoolean;
                    shared_with_all: zod.ZodBoolean;
                    is_stale: zod.ZodOptional<zod.ZodString>;
                    is_shared: zod.ZodOptional<zod.ZodString>;
                    marked_stale_at: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
                    label: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
                    identifier: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
                    url: zod.ZodOptional<zod.ZodString>;
                    groups: zod.ZodOptional<zod.ZodArray<zod.ZodRecord<zod.ZodString, zod.ZodUnknown>>>;
                    members: zod.ZodOptional<zod.ZodString>;
                    permissions: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodBoolean>>;
                    public_id: zod.ZodOptional<zod.ZodString>;
                    account_public_id: zod.ZodOptional<zod.ZodString>;
                    customuser_public_id: zod.ZodOptional<zod.ZodString>;
                    id: zod.ZodString;
                    account_id: zod.ZodString;
                    implementation_id: zod.ZodOptional<zod.ZodString>;
                    profile_id: zod.ZodOptional<zod.ZodString>;
                    is_expired: zod.ZodOptional<zod.ZodString>;
                    expired_at: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
                    app_key: zod.ZodOptional<zod.ZodString>;
                    app_version: zod.ZodOptional<zod.ZodString>;
                }, zod_v4_core.$strip>;
                formatter: OutputFormatter<unknown, {
                    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;
                }, Record<string, unknown>, unknown>;
            };
        };
    };
} & {
    findUniqueAuthentication: (options?: {
        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;
        };
    }>;
    context: {
        meta: {
            findUniqueAuthentication: {
                packages: string[];
                categories: string[];
                deprecation: {
                    message: string;
                };
                type: "item";
                itemType: string;
                inputSchema: zod.ZodObject<{
                    title: zod.ZodOptional<zod.ZodString>;
                    search: zod.ZodOptional<zod.ZodString>;
                    appKey: zod.ZodOptional<zod.ZodString & {
                        _def: zod_v4_core.$ZodStringDef & PositionalMetadata;
                    }>;
                    app: zod.ZodOptional<zod.ZodString & {
                        _def: zod_v4_core.$ZodStringDef & PositionalMetadata;
                    }>;
                    owner: zod.ZodOptional<zod.ZodString>;
                    account: zod.ZodOptional<zod.ZodString>;
                    accountId: zod.ZodOptional<zod.ZodString>;
                    includeShared: zod.ZodOptional<zod.ZodBoolean>;
                    isExpired: zod.ZodOptional<zod.ZodBoolean>;
                    expired: zod.ZodOptional<zod.ZodBoolean>;
                }, zod_v4_core.$strip>;
                outputSchema: zod.ZodObject<{
                    title: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
                    date: zod.ZodString;
                    is_invite_only: zod.ZodBoolean;
                    lastchanged: zod.ZodOptional<zod.ZodString>;
                    destination_selected_api: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
                    is_private: zod.ZodBoolean;
                    shared_with_all: zod.ZodBoolean;
                    is_stale: zod.ZodOptional<zod.ZodString>;
                    is_shared: zod.ZodOptional<zod.ZodString>;
                    marked_stale_at: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
                    label: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
                    identifier: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
                    url: zod.ZodOptional<zod.ZodString>;
                    groups: zod.ZodOptional<zod.ZodArray<zod.ZodRecord<zod.ZodString, zod.ZodUnknown>>>;
                    members: zod.ZodOptional<zod.ZodString>;
                    permissions: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodBoolean>>;
                    public_id: zod.ZodOptional<zod.ZodString>;
                    account_public_id: zod.ZodOptional<zod.ZodString>;
                    customuser_public_id: zod.ZodOptional<zod.ZodString>;
                    id: zod.ZodString;
                    account_id: zod.ZodString;
                    implementation_id: zod.ZodOptional<zod.ZodString>;
                    profile_id: zod.ZodOptional<zod.ZodString>;
                    is_expired: zod.ZodOptional<zod.ZodString>;
                    expired_at: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
                    app_key: zod.ZodOptional<zod.ZodString>;
                    app_version: zod.ZodOptional<zod.ZodString>;
                }, zod_v4_core.$strip>;
                formatter: OutputFormatter<unknown, {
                    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;
                }, Record<string, unknown>, unknown>;
            };
        };
    };
} & {
    listClientCredentials: (options?: ({
        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;
    }>;
} & {
    context: {
        meta: {
            listClientCredentials: PluginMeta<unknown>;
        };
    };
} & {
    createClientCredentials: (options?: {
        name: string;
        allowedScopes: ("external" | "credentials")[];
        policy?: Record<string, unknown> | undefined;
    } | undefined) => Promise<{
        data: {
            client_id: string;
            name: string;
            client_secret: string;
        };
    }>;
} & {
    context: {
        meta: {
            createClientCredentials: PluginMeta<unknown>;
        };
    };
} & {
    deleteClientCredentials: (options?: {
        clientId: string;
    } | undefined) => Promise<{
        success: boolean;
    }>;
} & {
    context: {
        meta: {
            deleteClientCredentials: PluginMeta<unknown>;
        };
    };
} & {
    fetch: (url: string | URL, init?: ZapierFetchInitOptions) => Promise<Response>;
    context: {
        meta: {
            fetch: {
                description: string;
                packages: string[];
                categories: {
                    key: string;
                    title: string;
                }[];
                returnType: string;
                inputParameters: ({
                    name: string;
                    schema: zod.ZodUnion<readonly [zod.ZodString, zod.ZodCustom<URL, URL>]>;
                } | {
                    name: string;
                    schema: zod.ZodOptional<zod.ZodObject<{
                        method: zod.ZodOptional<zod.ZodEnum<{
                            GET: "GET";
                            POST: "POST";
                            DELETE: "DELETE";
                            PUT: "PUT";
                            PATCH: "PATCH";
                            HEAD: "HEAD";
                            OPTIONS: "OPTIONS";
                        }>>;
                        headers: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodString>>;
                        body: zod.ZodOptional<zod.ZodUnion<readonly [zod.ZodString, zod.ZodCustom<FormData, FormData>, zod.ZodCustom<URLSearchParams, URLSearchParams>, zod.ZodRecord<zod.ZodString, zod.ZodUnknown>]>>;
                        connectionId: zod.ZodOptional<zod.ZodUnion<readonly [zod.ZodString, zod.ZodNumber]>>;
                        connection: zod.ZodOptional<zod.ZodUnion<readonly [zod.ZodString, zod.ZodNumber]>>;
                        authenticationId: zod.ZodOptional<zod.ZodUnion<readonly [zod.ZodString, zod.ZodNumber]>>;
                        callbackUrl: zod.ZodOptional<zod.ZodString>;
                        maxTime: zod.ZodOptional<zod.ZodNumber>;
                    }, zod_v4_core.$strip>>;
                })[];
            };
        };
    };
} & {
    request: (options?: {
        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;
    } | undefined) => Promise<Response>;
} & {
    context: {
        meta: {
            request: PluginMeta<unknown>;
        };
    };
} & {
    listTables: (options?: ({
        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;
    }>;
} & {
    context: {
        meta: {
            listTables: PluginMeta<unknown>;
        };
    };
} & {
    getTable: (options?: {
        table: string;
    } | {
        tableId: 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;
        };
    }>;
} & {
    context: {
        meta: {
            getTable: PluginMeta<unknown>;
        };
    };
} & {
    deleteTable: (options?: {
        table: string;
    } | {
        tableId: string;
    } | undefined) => Promise<{
        success: boolean;
    }>;
} & {
    context: {
        meta: {
            deleteTable: PluginMeta<unknown>;
        };
    };
} & {
    createTable: (options?: {
        name: string;
        description?: string | undefined;
    } | 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;
        };
    }>;
} & {
    context: {
        meta: {
            createTable: PluginMeta<unknown>;
        };
    };
} & {
    listTableFields: (options?: {
        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;
    } | undefined) => Promise<{
        data: {
            id: string;
            type: "string" | "number" | "boolean" | "text" | "datetime" | "decimal" | "json" | "email" | "link" | "multiple_string" | "labeled_string" | "multiple_labeled_string" | "multiple_text" | "multiple_boolean" | "multiple_number" | "multiple_decimal" | "multiple_datetime" | "uuid" | "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;
        }[];
    }>;
} & {
    context: {
        meta: {
            listTableFields: PluginMeta<unknown>;
        };
    };
} & {
    createTableFields: (options?: {
        table: string;
        fields: {
            type: "string" | "number" | "boolean" | "text" | "datetime" | "decimal" | "json" | "email" | "link" | "multiple_string" | "labeled_string" | "multiple_labeled_string" | "multiple_text" | "multiple_boolean" | "multiple_number" | "multiple_decimal" | "multiple_datetime" | "uuid" | "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" | "multiple_string" | "labeled_string" | "multiple_labeled_string" | "multiple_text" | "multiple_boolean" | "multiple_number" | "multiple_decimal" | "multiple_datetime" | "uuid" | "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;
        }[];
    } | undefined) => Promise<{
        data: {
            id: string;
            type: "string" | "number" | "boolean" | "text" | "datetime" | "decimal" | "json" | "email" | "link" | "multiple_string" | "labeled_string" | "multiple_labeled_string" | "multiple_text" | "multiple_boolean" | "multiple_number" | "multiple_decimal" | "multiple_datetime" | "uuid" | "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;
        }[];
    }>;
} & {
    context: {
        meta: {
            createTableFields: PluginMeta<unknown>;
        };
    };
} & {
    deleteTableFields: (options?: {
        table: string;
        fields: (string | number)[];
    } | {
        tableId: string;
        fieldKeys: (string | number)[];
    } | undefined) => Promise<{
        success: boolean;
    }>;
} & {
    context: {
        meta: {
            deleteTableFields: PluginMeta<unknown>;
        };
    };
} & {
    listTableRecords: (options?: (({
        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;
    }) | undefined) => PaginatedSdkResult<{
        data: Record<string, unknown>;
        id: string;
        created_at: string;
        edited_at: string;
        deleted_at?: string | null | undefined;
    }>;
} & {
    context: {
        meta: {
            listTableRecords: PluginMeta<unknown>;
        };
    };
} & {
    getTableRecord: (options?: {
        table: string;
        record: string;
        keyMode: "names" | "ids";
    } | {
        tableId: string;
        recordId: string;
        keyMode: "names" | "ids";
    } | undefined) => Promise<{
        data: {
            data: Record<string, unknown>;
            id: string;
            created_at: string;
            edited_at: string;
            deleted_at?: string | null | undefined;
        };
    }>;
} & {
    context: {
        meta: {
            getTableRecord: PluginMeta<unknown>;
        };
    };
} & {
    createTableRecords: (options?: {
        table: string;
        records: {
            data: Record<string, unknown>;
        }[];
        keyMode: "names" | "ids";
    } | {
        tableId: string;
        records: {
            data: Record<string, unknown>;
        }[];
        keyMode: "names" | "ids";
    } | undefined) => Promise<{
        data: {
            data: Record<string, unknown>;
            id: string;
            created_at: string;
            edited_at: string;
            deleted_at?: string | null | undefined;
        }[];
    }>;
} & {
    context: {
        meta: {
            createTableRecords: PluginMeta<unknown>;
        };
    };
} & {
    deleteTableRecords: (options?: {
        table: string;
        records: string[];
    } | {
        tableId: string;
        recordIds: string[];
    } | undefined) => Promise<{
        success: boolean;
    }>;
} & {
    context: {
        meta: {
            deleteTableRecords: PluginMeta<unknown>;
        };
    };
} & {
    updateTableRecords: (options?: {
        table: string;
        records: {
            id: string;
            data: Record<string, unknown>;
        }[];
        keyMode: "names" | "ids";
    } | {
        tableId: string;
        records: {
            id: string;
            data: Record<string, unknown>;
        }[];
        keyMode: "names" | "ids";
    } | undefined) => Promise<{
        data: {
            data: Record<string, unknown>;
            id: string;
            created_at: string;
            edited_at: string;
            deleted_at?: string | null | undefined;
        }[];
    }>;
} & {
    context: {
        meta: {
            updateTableRecords: PluginMeta<unknown>;
        };
    };
} & {
    apps: ActionProxy & ZapierSdkApps;
    context: {
        meta: {
            "apps.{appKey}": {
                categories: string[];
                packages: string[];
                type: "function";
                inputSchema: zod.ZodObject<{
                    connectionId: zod.ZodOptional<zod.ZodUnion<readonly [zod.ZodString, zod.ZodNumber]>>;
                    connection: zod.ZodOptional<zod.ZodUnion<readonly [zod.ZodString, zod.ZodNumber]>>;
                    authenticationId: zod.ZodOptional<zod.ZodUnion<readonly [zod.ZodString, zod.ZodNumber]>>;
                }, zod_v4_core.$strip>;
                returnType: string;
            };
            "apps.{appKey}.{actionType}.{actionKey}": {
                categories: string[];
                packages: string[];
                type: "list";
                inputSchema: zod.ZodObject<{
                    inputs: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodUnknown>>;
                    connectionId: zod.ZodOptional<zod.ZodUnion<readonly [zod.ZodString, zod.ZodNumber]>>;
                    connection: zod.ZodOptional<zod.ZodUnion<readonly [zod.ZodString, zod.ZodNumber]>>;
                    authenticationId: zod.ZodOptional<zod.ZodUnion<readonly [zod.ZodString, zod.ZodNumber]>>;
                    timeoutMs: zod.ZodOptional<zod.ZodNumber>;
                }, zod_v4_core.$strip>;
                itemType: string;
                outputSchema: zod.ZodUnknown;
            };
        };
    };
} & {
    getRegistry: (options?: {
        package?: string;
    }) => RegistryResult;
} & {
    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;
        };
    }>;
} & {
    context: SdkContext;
};
interface ZapierSdk extends ReturnType<typeof createZapierSdk> {
}

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>[]>;

/**
 * Plugin schemas for listApps
 *
 * Imports base query schema from @zapier/zapier-sdk-core (sdkapi) and extends
 * with SDK-specific options.
 *
 * Note: The sdkapi endpoint uses ListAppsQuerySchema (HTTP query params),
 * but the SDK exposes ListAppsSchema (user-friendly options):
 * - ListAppsOptions accepts `appKeys` as array, `cursor`, `maxItems`
 * - ListAppsQuery accepts `appKeys` as comma-separated string, `offset`
 * - The plugin transforms between these formats
 */

/**
 * SDK user-facing options for listApps
 *
 * Extends ListAppsQuerySchema from zapier-sdk-core with SDK-specific options:
 * - appKeys: array (not comma-separated string)
 * - cursor: pagination cursor (not offset)
 * - maxItems: SDK-specific pagination limit
 */
declare const ListAppsSchema: z.ZodObject<{
    search: z.ZodOptional<z.ZodString>;
    apps: z.ZodOptional<z.ZodArray<z.ZodString>>;
    appKeys: z.ZodOptional<z.ZodArray<z.ZodString>>;
    pageSize: z.ZodOptional<z.ZodNumber>;
    maxItems: z.ZodOptional<z.ZodNumber>;
    cursor: z.ZodOptional<z.ZodString>;
}, z.core.$strip>;
type ListAppsOptions = z.infer<typeof ListAppsSchema>;

declare const GetAppSchema: z.ZodObject<{
    app: z.ZodString & {
        _def: z.core.$ZodStringDef & PositionalMetadata;
    };
}, z.core.$strip>;
declare const GetAppSchemaDeprecated: z.ZodObject<{
    appKey: z.ZodString & {
        _def: z.core.$ZodStringDef & PositionalMetadata;
    };
}, z.core.$strip>;
type GetAppOptions = z.infer<typeof GetAppSchema> | (Omit<z.infer<typeof GetAppSchemaDeprecated>, "appKey"> & {
    /** @deprecated Use `app` instead. */
    appKey: z.infer<typeof GetAppSchemaDeprecated>["appKey"];
});

declare const appKeyResolver: DynamicResolver$1<{
    getApp: (options: GetAppOptions) => Promise<{
        data: AppItem$1;
    }>;
    listApps: PaginatedSdkFunction<ListAppsOptions | undefined, AppItem$1>;
}, AppItem$1, {
    search?: string;
}>;

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"];
});

interface ActionTypeItem {
    key: string;
    name: string;
}
declare const actionTypeResolver: DynamicResolver$1<{
    listActions: PaginatedSdkFunction<ListActionsOptions, ActionItem$1>;
}, ActionTypeItem, {
    app: string;
}>;

interface ActionItem {
    key: string;
    title?: string;
    name?: string;
    description?: string;
    action_type: string;
    is_hidden?: boolean;
}
declare const actionKeyResolver: DynamicResolver$1<ListActionsPluginProvides, ActionItem, {
    app: string;
    actionType: ActionTypeProperty;
}>;

type ConnectionIdResolverSdk = ListConnectionsPluginProvides & GetAppPluginProvides;
type ConnectionIdResolver = DynamicResolver$1<ConnectionIdResolverSdk, ConnectionItem$1, {
    app?: string;
}>;
declare const connectionIdResolver: ConnectionIdResolver;
declare const connectionIdGenericResolver: ConnectionIdResolver;

type InputsResolver = {
    type: "fields";
    depends: readonly string[];
    fetch: (sdk: any, resolvedParams: {
        app: string;
        action: string;
        actionType: ActionTypeProperty;
        connection: string | number;
        inputs?: Record<string, unknown>;
    }) => Promise<RootFieldItem[]>;
};
declare const inputsResolver: InputsResolver;
declare const inputsAllOptionalResolver: InputsResolver;

declare const inputFieldKeyResolver: DynamicResolver$1<ListActionInputFieldsPluginProvides, InputFieldItem$1, {
    app: string;
    action: string;
    actionType: ActionTypeProperty;
    connection: string | number;
    inputs?: Record<string, unknown>;
}>;

declare const clientCredentialsNameResolver: StaticResolver$1;

declare const ClientCredentialsItemSchema: z.ZodObject<{
    client_id: z.ZodString;
    name: z.ZodString;
    allowed_scopes: z.ZodArray<z.ZodEnum<{
        credentials: "credentials";
        external: "external";
    }>>;
    created_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
    updated_at: z.ZodOptional<z.ZodString>;
}, z.core.$strip>;
type ClientCredentialsItem = z.infer<typeof ClientCredentialsItemSchema>;

declare const clientIdResolver: DynamicResolver$1<ListClientCredentialsPluginProvides, ClientCredentialsItem, {}>;

declare const listTablesPlugin: (sdk: {
    context: {
        api: ApiClient;
        resolveCredentials: () => Promise<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;
        } | undefined>;
    };
} & {
    context: EventEmissionContext;
} & {
    context: CapabilitiesContext;
} & {
    context: {
        meta: Record<string, PluginMeta>;
    };
}) => {
    listTables: (options?: ({
        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;
    }>;
} & {
    context: {
        meta: {
            listTables: PluginMeta<unknown>;
        };
    };
};
type ListTablesPluginProvides = ReturnType<typeof listTablesPlugin>;

declare const TableItemSchema: z.ZodObject<{
    id: z.ZodString;
    name: z.ZodString;
    description: z.ZodOptional<z.ZodString>;
    created_at: z.ZodString;
    edited_at: z.ZodString;
    kind: z.ZodEnum<{
        table: "table";
        virtual_table: "virtual_table";
    }>;
    account_id: z.ZodString;
    profile_id: z.ZodString;
    parent_table_id: z.ZodOptional<z.ZodString>;
}, z.core.$strip>;
type TableItem = z.infer<typeof TableItemSchema>;

declare const tableIdResolver: DynamicResolver$1<ListTablesPluginProvides, TableItem, {}>;

declare const listTriggerInboxesPlugin: (sdk: {
    context: {
        api: ApiClient;
        resolveCredentials: () => Promise<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;
        } | undefined>;
    };
} & {
    context: EventEmissionContext;
} & {
    context: {
        meta: Record<string, PluginMeta>;
    };
}) => {
    listTriggerInboxes: (options?: ({
        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;
        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>;
        };
    }>;
} & {
    context: {
        meta: {
            listTriggerInboxes: PluginMeta<unknown>;
        };
    };
};
type ListTriggerInboxesPluginProvides = ReturnType<typeof listTriggerInboxesPlugin>;

declare const TriggerInboxItemSchema: z.ZodObject<{
    id: z.ZodString;
    created_at: 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>;

declare const triggerInboxResolver: DynamicResolver$1<ListTriggerInboxesPluginProvides, TriggerInboxItem, {}>;

declare const listWorkflowsPlugin: (sdk: {
    context: {
        api: ApiClient;
        resolveCredentials: () => Promise<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;
        } | undefined>;
    };
} & {
    context: EventEmissionContext;
} & {
    context: {
        meta: Record<string, PluginMeta>;
    };
}) => {
    listWorkflows: (options?: ({
        pageSize?: number | undefined;
        maxItems?: number | undefined;
        cursor?: string | undefined;
    } & {
        cursor?: string;
        pageSize?: number;
        maxItems?: number;
    }) | undefined) => PaginatedSdkResult<{
        id: string;
        name: string;
        description: string | null;
        trigger_url: string;
        enabled: boolean;
        is_private: boolean;
        created_by_user_id: string | null;
        current_version_id: string | null;
        triggers: {
            selected_api: string;
            action: string;
            status: "failed" | "pending" | "active" | "unclaimed" | "releasing" | "released";
            authentication_id?: string | null | undefined;
            params?: Record<string, unknown> | undefined;
            error?: string | null | undefined;
        }[];
        created_at: string;
        updated_at: string;
        disabled_reason?: "trigger_claim_failed" | null | undefined;
    }>;
} & {
    context: {
        meta: {
            listWorkflows: PluginMeta<unknown>;
        };
    };
};
type ListWorkflowsPluginProvides = ReturnType<typeof listWorkflowsPlugin>;

declare const WorkflowItemSchema: z.ZodObject<{
    id: z.ZodString;
    name: z.ZodString;
    description: z.ZodNullable<z.ZodString>;
    trigger_url: z.ZodString;
    enabled: z.ZodBoolean;
    disabled_reason: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
        trigger_claim_failed: "trigger_claim_failed";
    }>>>;
    is_private: z.ZodBoolean;
    created_by_user_id: z.ZodNullable<z.ZodString>;
    current_version_id: z.ZodNullable<z.ZodString>;
    triggers: z.ZodArray<z.ZodObject<{
        selected_api: z.ZodString;
        action: z.ZodString;
        authentication_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
        params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
        status: z.ZodEnum<{
            failed: "failed";
            pending: "pending";
            active: "active";
            unclaimed: "unclaimed";
            releasing: "releasing";
            released: "released";
        }>;
        error: z.ZodOptional<z.ZodNullable<z.ZodString>>;
    }, z.core.$strip>>;
    created_at: z.ZodString;
    updated_at: z.ZodString;
}, z.core.$strip>;
type WorkflowItem = z.infer<typeof WorkflowItemSchema>;

declare const workflowIdResolver: DynamicResolver$1<ListWorkflowsPluginProvides, WorkflowItem, {}>;

declare const listDurableRunsPlugin: (sdk: {
    context: {
        api: ApiClient;
        resolveCredentials: () => Promise<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;
        } | undefined>;
    };
} & {
    context: EventEmissionContext;
} & {
    context: {
        meta: Record<string, PluginMeta>;
    };
}) => {
    listDurableRuns: (options?: ({
        pageSize?: number | undefined;
        cursor?: string | undefined;
        maxItems?: number | undefined;
    } & {
        cursor?: string;
        pageSize?: number;
        maxItems?: number;
    }) | undefined) => PaginatedSdkResult<{
        id: string;
        status: string;
        input: unknown;
        output: unknown;
        error: {
            [x: string]: unknown;
            code: string;
            message: string;
        } | null;
        execution_id: string | null;
        is_private: boolean;
        created_at: string;
        updated_at: string;
    }>;
} & {
    context: {
        meta: {
            listDurableRuns: PluginMeta<unknown>;
        };
    };
};
type ListDurableRunsPluginProvides = ReturnType<typeof listDurableRunsPlugin>;

declare const RunItemSchema: z.ZodObject<{
    id: z.ZodString;
    status: z.ZodUnion<readonly [z.ZodEnum<{
        failed: "failed";
        initialized: "initialized";
        started: "started";
        finished: "finished";
        cancelled: "cancelled";
    }>, z.ZodString]>;
    input: z.ZodUnknown;
    output: z.ZodNullable<z.ZodUnknown>;
    error: z.ZodNullable<z.ZodObject<{
        code: z.ZodString;
        message: z.ZodString;
    }, z.core.$loose>>;
    execution_id: z.ZodNullable<z.ZodString>;
    is_private: z.ZodBoolean;
    created_at: z.ZodString;
    updated_at: z.ZodString;
}, z.core.$strip>;
type RunItem = z.infer<typeof RunItemSchema>;

declare const durableRunIdResolver: DynamicResolver$1<ListDurableRunsPluginProvides, RunItem, {}>;

declare const listWorkflowVersionsPlugin: (sdk: {
    context: {
        api: ApiClient;
        resolveCredentials: () => Promise<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;
        } | undefined>;
    };
} & {
    context: EventEmissionContext;
} & {
    listWorkflows: (options?: ({
        pageSize?: number | undefined;
        maxItems?: number | undefined;
        cursor?: string | undefined;
    } & {
        cursor?: string;
        pageSize?: number;
        maxItems?: number;
    }) | undefined) => PaginatedSdkResult<{
        id: string;
        name: string;
        description: string | null;
        trigger_url: string;
        enabled: boolean;
        is_private: boolean;
        created_by_user_id: string | null;
        current_version_id: string | null;
        triggers: {
            selected_api: string;
            action: string;
            status: "failed" | "pending" | "active" | "unclaimed" | "releasing" | "released";
            authentication_id?: string | null | undefined;
            params?: Record<string, unknown> | undefined;
            error?: string | null | undefined;
        }[];
        created_at: string;
        updated_at: string;
        disabled_reason?: "trigger_claim_failed" | null | undefined;
    }>;
} & {
    context: {
        meta: {
            listWorkflows: PluginMeta<unknown>;
        };
    };
} & {
    context: {
        meta: Record<string, PluginMeta>;
    };
}) => {
    listWorkflowVersions: (options?: ({
        workflow: string;
        pageSize?: number | undefined;
        cursor?: string | undefined;
        maxItems?: number | undefined;
    } & {
        cursor?: string;
        pageSize?: number;
        maxItems?: number;
    }) | undefined) => PaginatedSdkResult<{
        id: string;
        workflow_id: string;
        zapier_durable_version: string;
        dependencies: Record<string, string> | null;
        created_by_user_id: string;
        created_at: string;
        trigger: {
            selected_api: string;
            action: string;
            authentication_id?: string | null | undefined;
            params?: Record<string, unknown> | undefined;
        } | null;
        connections: Record<string, {
            connection_id: string | number;
        }> | null;
        app_versions: Record<string, {
            implementation_name: string;
            version?: string | undefined;
        }> | null;
    }>;
} & {
    context: {
        meta: {
            listWorkflowVersions: PluginMeta<unknown>;
        };
    };
};
type ListWorkflowVersionsPluginProvides = ReturnType<typeof listWorkflowVersionsPlugin>;

declare const WorkflowVersionListItemSchema: z.ZodObject<{
    id: z.ZodString;
    workflow_id: z.ZodString;
    zapier_durable_version: z.ZodString;
    dependencies: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodString>>;
    created_by_user_id: z.ZodString;
    created_at: z.ZodString;
    trigger: z.ZodNullable<z.ZodObject<{
        selected_api: z.ZodString;
        action: z.ZodString;
        authentication_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
        params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
    }, z.core.$strip>>;
    connections: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodObject<{
        connection_id: z.ZodUnion<readonly [z.ZodNumber, z.ZodString, z.ZodString]>;
    }, z.core.$strip>>>;
    app_versions: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodObject<{
        implementation_name: z.ZodString;
        version: z.ZodOptional<z.ZodString>;
    }, z.core.$strip>>>;
}, z.core.$strip>;
type WorkflowVersionListItem = z.infer<typeof WorkflowVersionListItemSchema>;

declare const workflowVersionIdResolver: DynamicResolver$1<ListWorkflowVersionsPluginProvides, WorkflowVersionListItem, {
    workflow: string;
}>;

declare const listWorkflowRunsPlugin: (sdk: {
    context: {
        api: ApiClient;
        resolveCredentials: () => Promise<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;
        } | undefined>;
    };
} & {
    context: EventEmissionContext;
} & {
    listWorkflows: (options?: ({
        pageSize?: number | undefined;
        maxItems?: number | undefined;
        cursor?: string | undefined;
    } & {
        cursor?: string;
        pageSize?: number;
        maxItems?: number;
    }) | undefined) => PaginatedSdkResult<{
        id: string;
        name: string;
        description: string | null;
        trigger_url: string;
        enabled: boolean;
        is_private: boolean;
        created_by_user_id: string | null;
        current_version_id: string | null;
        triggers: {
            selected_api: string;
            action: string;
            status: "failed" | "pending" | "active" | "unclaimed" | "releasing" | "released";
            authentication_id?: string | null | undefined;
            params?: Record<string, unknown> | undefined;
            error?: string | null | undefined;
        }[];
        created_at: string;
        updated_at: string;
        disabled_reason?: "trigger_claim_failed" | null | undefined;
    }>;
} & {
    context: {
        meta: {
            listWorkflows: PluginMeta<unknown>;
        };
    };
} & {
    context: {
        meta: Record<string, PluginMeta>;
    };
}) => {
    listWorkflowRuns: (options?: ({
        workflow: string;
        pageSize?: number | undefined;
        cursor?: string | undefined;
        maxItems?: number | undefined;
    } & {
        cursor?: string;
        pageSize?: number;
        maxItems?: number;
    }) | undefined) => PaginatedSdkResult<{
        id: string;
        trigger_id: string | null;
        durable_run_id: string | null;
        workflow_version_id: string | null;
        status: string;
        input: unknown;
        error: unknown;
        created_at: string;
        updated_at: string;
    }>;
} & {
    context: {
        meta: {
            listWorkflowRuns: PluginMeta<unknown>;
        };
    };
};
type ListWorkflowRunsPluginProvides = ReturnType<typeof listWorkflowRunsPlugin>;

declare const WorkflowRunListItemSchema: z.ZodObject<{
    id: z.ZodString;
    trigger_id: z.ZodNullable<z.ZodString>;
    durable_run_id: z.ZodNullable<z.ZodString>;
    workflow_version_id: z.ZodNullable<z.ZodString>;
    status: z.ZodUnion<readonly [z.ZodEnum<{
        failed: "failed";
        initialized: "initialized";
        started: "started";
        finished: "finished";
        cancelled: "cancelled";
    }>, z.ZodString]>;
    input: z.ZodUnknown;
    error: z.ZodNullable<z.ZodUnknown>;
    created_at: z.ZodString;
    updated_at: z.ZodString;
}, z.core.$strip>;
type WorkflowRunListItem = z.infer<typeof WorkflowRunListItemSchema>;

declare const workflowRunIdResolver: DynamicResolver$1<ListWorkflowRunsPluginProvides, WorkflowRunListItem, {
    workflow: string;
}>;

declare const listTriggerInboxMessagesPlugin: (sdk: {
    context: {
        api: ApiClient;
        resolveCredentials: () => Promise<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;
        } | undefined>;
    };
} & {
    context: EventEmissionContext;
} & {
    listTriggerInboxes: (options?: ({
        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;
        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>;
        };
    }>;
} & {
    context: {
        meta: {
            listTriggerInboxes: PluginMeta<unknown>;
        };
    };
} & {
    context: {
        meta: Record<string, PluginMeta>;
    };
}) => {
    listTriggerInboxMessages: (options?: ({
        inbox: string;
        pageSize?: number | undefined;
        maxItems?: number | undefined;
        cursor?: string | undefined;
    } & {
        cursor?: string;
        pageSize?: number;
        maxItems?: number;
    }) | undefined) => PaginatedSdkResult<{
        id: string;
        created_at: string;
        status: string;
        message_attributes: {
            lease_count: number;
            error_message: string | null;
            possible_duplicate_data: boolean;
        };
    }>;
} & {
    context: {
        meta: {
            listTriggerInboxMessages: PluginMeta<unknown>;
        };
    };
};
type ListTriggerInboxMessagesPluginProvides = ReturnType<typeof listTriggerInboxMessagesPlugin>;

declare const triggerMessagesResolver: DynamicResolver$1<ListTriggerInboxMessagesPluginProvides, TriggerMessageItem, {
    inbox: string;
}>;

declare const listTableRecordsPlugin: (sdk: {
    context: {
        api: ApiClient;
        resolveCredentials: () => Promise<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;
        } | undefined>;
    };
} & {
    context: EventEmissionContext;
} & {
    listTables: (options?: ({
        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;
    }>;
} & {
    context: {
        meta: {
            listTables: PluginMeta<unknown>;
        };
    };
} & {
    listTableFields: (options?: {
        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;
    } | undefined) => Promise<{
        data: {
            id: string;
            type: "string" | "number" | "boolean" | "text" | "datetime" | "decimal" | "json" | "email" | "link" | "multiple_string" | "labeled_string" | "multiple_labeled_string" | "multiple_text" | "multiple_boolean" | "multiple_number" | "multiple_decimal" | "multiple_datetime" | "uuid" | "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;
        }[];
    }>;
} & {
    context: {
        meta: {
            listTableFields: PluginMeta<unknown>;
        };
    };
} & {
    context: {
        meta: Record<string, PluginMeta>;
    };
}) => {
    listTableRecords: (options?: (({
        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;
    }) | undefined) => PaginatedSdkResult<{
        data: Record<string, unknown>;
        id: string;
        created_at: string;
        edited_at: string;
        deleted_at?: string | null | undefined;
    }>;
} & {
    context: {
        meta: {
            listTableRecords: PluginMeta<unknown>;
        };
    };
};
type ListTableRecordsPluginProvides = ReturnType<typeof listTableRecordsPlugin>;

declare const RecordItemSchema: z.ZodObject<{
    id: z.ZodString;
    data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
    created_at: z.ZodString;
    edited_at: z.ZodString;
    deleted_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
}, z.core.$strip>;
type RecordItem = z.infer<typeof RecordItemSchema>;

declare const tableRecordIdResolver: DynamicResolver$1<ListTableRecordsPluginProvides, RecordItem, {
    table: string;
}>;
declare const tableRecordIdsResolver: DynamicResolver$1<ListTableRecordsPluginProvides, RecordItem, {
    table: string;
}>;

declare const listTableFieldsPlugin: (sdk: {
    context: {
        api: ApiClient;
        resolveCredentials: () => Promise<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;
        } | undefined>;
    };
} & {
    context: EventEmissionContext;
} & {
    listTables: (options?: ({
        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;
    }>;
} & {
    context: {
        meta: {
            listTables: PluginMeta<unknown>;
        };
    };
} & {
    context: {
        meta: Record<string, PluginMeta>;
    };
}) => {
    listTableFields: (options?: {
        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;
    } | undefined) => Promise<{
        data: {
            id: string;
            type: "string" | "number" | "boolean" | "text" | "datetime" | "decimal" | "json" | "email" | "link" | "multiple_string" | "labeled_string" | "multiple_labeled_string" | "multiple_text" | "multiple_boolean" | "multiple_number" | "multiple_decimal" | "multiple_datetime" | "uuid" | "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;
        }[];
    }>;
} & {
    context: {
        meta: {
            listTableFields: PluginMeta<unknown>;
        };
    };
};
type ListTableFieldsPluginProvides = ReturnType<typeof listTableFieldsPlugin>;

declare const FieldItemSchema: z.ZodObject<{
    id: z.ZodString;
    type: z.ZodEnum<{
        string: "string";
        number: "number";
        boolean: "boolean";
        text: "text";
        datetime: "datetime";
        decimal: "decimal";
        json: "json";
        email: "email";
        link: "link";
        multiple_string: "multiple_string";
        labeled_string: "labeled_string";
        multiple_labeled_string: "multiple_labeled_string";
        multiple_text: "multiple_text";
        multiple_boolean: "multiple_boolean";
        multiple_number: "multiple_number";
        multiple_decimal: "multiple_decimal";
        multiple_datetime: "multiple_datetime";
        uuid: "uuid";
        multiple_uuid: "multiple_uuid";
        multiple_json: "multiple_json";
        formula: "formula";
        button_trigger_zap: "button_trigger_zap";
        button_continue_zap: "button_continue_zap";
        multiple_email: "multiple_email";
        multiple_link: "multiple_link";
        currency: "currency";
        phone_number: "phone_number";
        ai_formula: "ai_formula";
        linked_record: "linked_record";
        multiple_linked_record: "multiple_linked_record";
    }>;
    name: z.ZodString;
    created_at: z.ZodOptional<z.ZodString>;
    edited_at: z.ZodOptional<z.ZodString>;
    options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
    config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
    deleted_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
}, z.core.$strip>;
type FieldItem = z.infer<typeof FieldItemSchema>;

declare const tableFieldIdsResolver: DynamicResolver$1<ListTableFieldsPluginProvides, FieldItem, {
    table: string;
}>;

declare const tableNameResolver: StaticResolver$1;

declare const tableFieldsResolver: ArrayResolver$1<unknown>;

declare const tableRecordsResolver: ArrayResolver$1<ListTableFieldsPluginProvides, {
    table: string;
}>;
declare const tableUpdateRecordsResolver: ArrayResolver$1<ListTableFieldsPluginProvides, {
    table: string;
}>;

declare const tableFiltersResolver: ArrayResolver$1<ListTableFieldsPluginProvides, {
    table: string;
}>;

declare const tableSortResolver: FieldsResolver<ListTableFieldsPluginProvides, {
    table: string;
}>;

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

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

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 getTablePlugin: (sdk: {
    context: {
        api: ApiClient;
        resolveCredentials: () => Promise<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;
        } | undefined>;
    };
} & {
    context: EventEmissionContext;
} & {
    listTables: (options?: ({
        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;
    }>;
} & {
    context: {
        meta: {
            listTables: PluginMeta<unknown>;
        };
    };
} & {
    context: {
        meta: Record<string, PluginMeta>;
    };
}) => {
    getTable: (options?: {
        table: string;
    } | {
        tableId: 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;
        };
    }>;
} & {
    context: {
        meta: {
            getTable: PluginMeta<unknown>;
        };
    };
};
type GetTablePluginProvides = ReturnType<typeof getTablePlugin>;

declare const createTablePlugin: (sdk: {
    context: {
        api: ApiClient;
        resolveCredentials: () => Promise<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;
        } | undefined>;
    };
} & {
    context: EventEmissionContext;
} & {
    context: {
        meta: Record<string, PluginMeta>;
    };
}) => {
    createTable: (options?: {
        name: string;
        description?: string | undefined;
    } | 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;
        };
    }>;
} & {
    context: {
        meta: {
            createTable: PluginMeta<unknown>;
        };
    };
};
type CreateTablePluginProvides = ReturnType<typeof createTablePlugin>;

declare const deleteTablePlugin: (sdk: {
    context: {
        api: ApiClient;
        resolveCredentials: () => Promise<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;
        } | undefined>;
    };
} & {
    context: EventEmissionContext;
} & {
    listTables: (options?: ({
        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;
    }>;
} & {
    context: {
        meta: {
            listTables: PluginMeta<unknown>;
        };
    };
} & {
    context: CapabilitiesContext;
} & {
    context: {
        meta: Record<string, PluginMeta>;
    };
}) => {
    deleteTable: (options?: {
        table: string;
    } | {
        tableId: string;
    } | undefined) => Promise<{
        success: boolean;
    }>;
} & {
    context: {
        meta: {
            deleteTable: PluginMeta<unknown>;
        };
    };
};
type DeleteTablePluginProvides = ReturnType<typeof deleteTablePlugin>;

declare const createTableFieldsPlugin: (sdk: {
    context: {
        api: ApiClient;
        resolveCredentials: () => Promise<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;
        } | undefined>;
    };
} & {
    context: EventEmissionContext;
} & {
    listTables: (options?: ({
        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;
    }>;
} & {
    context: {
        meta: {
            listTables: PluginMeta<unknown>;
        };
    };
} & {
    context: {
        meta: Record<string, PluginMeta>;
    };
}) => {
    createTableFields: (options?: {
        table: string;
        fields: {
            type: "string" | "number" | "boolean" | "text" | "datetime" | "decimal" | "json" | "email" | "link" | "multiple_string" | "labeled_string" | "multiple_labeled_string" | "multiple_text" | "multiple_boolean" | "multiple_number" | "multiple_decimal" | "multiple_datetime" | "uuid" | "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" | "multiple_string" | "labeled_string" | "multiple_labeled_string" | "multiple_text" | "multiple_boolean" | "multiple_number" | "multiple_decimal" | "multiple_datetime" | "uuid" | "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;
        }[];
    } | undefined) => Promise<{
        data: {
            id: string;
            type: "string" | "number" | "boolean" | "text" | "datetime" | "decimal" | "json" | "email" | "link" | "multiple_string" | "labeled_string" | "multiple_labeled_string" | "multiple_text" | "multiple_boolean" | "multiple_number" | "multiple_decimal" | "multiple_datetime" | "uuid" | "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;
        }[];
    }>;
} & {
    context: {
        meta: {
            createTableFields: PluginMeta<unknown>;
        };
    };
};
type CreateTableFieldsPluginProvides = ReturnType<typeof createTableFieldsPlugin>;

declare const deleteTableFieldsPlugin: (sdk: {
    context: {
        api: ApiClient;
        resolveCredentials: () => Promise<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;
        } | undefined>;
    };
} & {
    context: EventEmissionContext;
} & {
    listTables: (options?: ({
        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;
    }>;
} & {
    context: {
        meta: {
            listTables: PluginMeta<unknown>;
        };
    };
} & {
    listTableFields: (options?: {
        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;
    } | undefined) => Promise<{
        data: {
            id: string;
            type: "string" | "number" | "boolean" | "text" | "datetime" | "decimal" | "json" | "email" | "link" | "multiple_string" | "labeled_string" | "multiple_labeled_string" | "multiple_text" | "multiple_boolean" | "multiple_number" | "multiple_decimal" | "multiple_datetime" | "uuid" | "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;
        }[];
    }>;
} & {
    context: {
        meta: {
            listTableFields: PluginMeta<unknown>;
        };
    };
} & {
    context: {
        meta: Record<string, PluginMeta>;
    };
}) => {
    deleteTableFields: (options?: {
        table: string;
        fields: (string | number)[];
    } | {
        tableId: string;
        fieldKeys: (string | number)[];
    } | undefined) => Promise<{
        success: boolean;
    }>;
} & {
    context: {
        meta: {
            deleteTableFields: PluginMeta<unknown>;
        };
    };
};
type DeleteTableFieldsPluginProvides = ReturnType<typeof deleteTableFieldsPlugin>;

declare const getTableRecordPlugin: (sdk: {
    context: {
        api: ApiClient;
        resolveCredentials: () => Promise<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;
        } | undefined>;
    };
} & {
    context: EventEmissionContext;
} & {
    listTables: (options?: ({
        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;
    }>;
} & {
    context: {
        meta: {
            listTables: PluginMeta<unknown>;
        };
    };
} & {
    listTableRecords: (options?: (({
        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;
    }) | undefined) => PaginatedSdkResult<{
        data: Record<string, unknown>;
        id: string;
        created_at: string;
        edited_at: string;
        deleted_at?: string | null | undefined;
    }>;
} & {
    context: {
        meta: {
            listTableRecords: PluginMeta<unknown>;
        };
    };
} & {
    context: {
        meta: Record<string, PluginMeta>;
    };
}) => {
    getTableRecord: (options?: {
        table: string;
        record: string;
        keyMode: "names" | "ids";
    } | {
        tableId: string;
        recordId: string;
        keyMode: "names" | "ids";
    } | undefined) => Promise<{
        data: {
            data: Record<string, unknown>;
            id: string;
            created_at: string;
            edited_at: string;
            deleted_at?: string | null | undefined;
        };
    }>;
} & {
    context: {
        meta: {
            getTableRecord: PluginMeta<unknown>;
        };
    };
};
type GetTableRecordPluginProvides = ReturnType<typeof getTableRecordPlugin>;

declare const createTableRecordsPlugin: (sdk: {
    context: {
        api: ApiClient;
        resolveCredentials: () => Promise<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;
        } | undefined>;
    };
} & {
    context: EventEmissionContext;
} & {
    listTables: (options?: ({
        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;
    }>;
} & {
    context: {
        meta: {
            listTables: PluginMeta<unknown>;
        };
    };
} & {
    listTableFields: (options?: {
        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;
    } | undefined) => Promise<{
        data: {
            id: string;
            type: "string" | "number" | "boolean" | "text" | "datetime" | "decimal" | "json" | "email" | "link" | "multiple_string" | "labeled_string" | "multiple_labeled_string" | "multiple_text" | "multiple_boolean" | "multiple_number" | "multiple_decimal" | "multiple_datetime" | "uuid" | "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;
        }[];
    }>;
} & {
    context: {
        meta: {
            listTableFields: PluginMeta<unknown>;
        };
    };
} & {
    context: {
        meta: Record<string, PluginMeta>;
    };
}) => {
    createTableRecords: (options?: {
        table: string;
        records: {
            data: Record<string, unknown>;
        }[];
        keyMode: "names" | "ids";
    } | {
        tableId: string;
        records: {
            data: Record<string, unknown>;
        }[];
        keyMode: "names" | "ids";
    } | undefined) => Promise<{
        data: {
            data: Record<string, unknown>;
            id: string;
            created_at: string;
            edited_at: string;
            deleted_at?: string | null | undefined;
        }[];
    }>;
} & {
    context: {
        meta: {
            createTableRecords: PluginMeta<unknown>;
        };
    };
};
type CreateTableRecordsPluginProvides = ReturnType<typeof createTableRecordsPlugin>;

declare const deleteTableRecordsPlugin: (sdk: {
    context: {
        api: ApiClient;
        resolveCredentials: () => Promise<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;
        } | undefined>;
    };
} & {
    context: EventEmissionContext;
} & {
    listTables: (options?: ({
        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;
    }>;
} & {
    context: {
        meta: {
            listTables: PluginMeta<unknown>;
        };
    };
} & {
    listTableRecords: (options?: (({
        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;
    }) | undefined) => PaginatedSdkResult<{
        data: Record<string, unknown>;
        id: string;
        created_at: string;
        edited_at: string;
        deleted_at?: string | null | undefined;
    }>;
} & {
    context: {
        meta: {
            listTableRecords: PluginMeta<unknown>;
        };
    };
} & {
    context: {
        meta: Record<string, PluginMeta>;
    };
}) => {
    deleteTableRecords: (options?: {
        table: string;
        records: string[];
    } | {
        tableId: string;
        recordIds: string[];
    } | undefined) => Promise<{
        success: boolean;
    }>;
} & {
    context: {
        meta: {
            deleteTableRecords: PluginMeta<unknown>;
        };
    };
};
type DeleteTableRecordsPluginProvides = ReturnType<typeof deleteTableRecordsPlugin>;

declare const updateTableRecordsPlugin: (sdk: {
    context: {
        api: ApiClient;
        resolveCredentials: () => Promise<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;
        } | undefined>;
    };
} & {
    context: EventEmissionContext;
} & {
    listTables: (options?: ({
        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;
    }>;
} & {
    context: {
        meta: {
            listTables: PluginMeta<unknown>;
        };
    };
} & {
    listTableFields: (options?: {
        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;
    } | undefined) => Promise<{
        data: {
            id: string;
            type: "string" | "number" | "boolean" | "text" | "datetime" | "decimal" | "json" | "email" | "link" | "multiple_string" | "labeled_string" | "multiple_labeled_string" | "multiple_text" | "multiple_boolean" | "multiple_number" | "multiple_decimal" | "multiple_datetime" | "uuid" | "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;
        }[];
    }>;
} & {
    context: {
        meta: {
            listTableFields: PluginMeta<unknown>;
        };
    };
} & {
    context: {
        meta: Record<string, PluginMeta>;
    };
}) => {
    updateTableRecords: (options?: {
        table: string;
        records: {
            id: string;
            data: Record<string, unknown>;
        }[];
        keyMode: "names" | "ids";
    } | {
        tableId: string;
        records: {
            id: string;
            data: Record<string, unknown>;
        }[];
        keyMode: "names" | "ids";
    } | undefined) => Promise<{
        data: {
            data: Record<string, unknown>;
            id: string;
            created_at: string;
            edited_at: string;
            deleted_at?: string | null | undefined;
        }[];
    }>;
} & {
    context: {
        meta: {
            updateTableRecords: PluginMeta<unknown>;
        };
    };
};
type UpdateTableRecordsPluginProvides = ReturnType<typeof updateTableRecordsPlugin>;

/**
 * The minimal Zapier stack: an empty kitcore `createPluginStack()` seeded with
 * just Zapier's core error adapter, no SDK methods. `.use(...)` your own
 * plugins and `.toSdk()` to build a custom or test SDK; `createZapierSdkStack`
 * is this plus the full plugin set. Kept in its own light module so importing
 * it doesn't pull in the whole plugin graph.
 *
 *   const sdk = createZapierCoreStack()
 *     .use(() => ({ context: { options: {} } }))
 *     .use(() => ({ context: { api: mockApi } }))
 *     .use(myPlugin)
 *     .toSdk();
 */
declare function createZapierCoreStack(): PluginStack<object, {
    context: {
        meta: Record<string, PluginMeta>;
        hooks: MethodHooks;
    };
} & {
    context: {
        core: 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.
 */
declare const registryPlugin: (sdk: {
    context: {
        meta: Record<string, PluginMeta>;
    };
}) => {};

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