import type { ApiClient } from "../api/types";
/**
 * Function-related types and interfaces
 */
export interface FunctionOptions {
    /** Base URL for Zapier API */
    baseUrl?: string;
    /** Authentication token */
    token?: string;
    /** Function to dynamically resolve authentication token */
    getToken?: () => Promise<string | undefined>;
    /** Optional pre-instantiated API client */
    api?: ApiClient;
    /** Enable debug logging */
    debug?: boolean;
    /** Custom fetch implementation */
    fetch?: typeof globalThis.fetch;
}
/**
 * Single page of a paginated SDK list result. Returned from the page-level
 * promise and yielded from the page-level async iterable.
 */
export 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.
 */
export interface PaginatedSdkResult<TItem> extends Promise<SdkPage<TItem>>, AsyncIterable<SdkPage<TItem>> {
    items(): AsyncIterable<TItem>;
}
export type PaginatedSdkFunction<TOptions, TItem> = (options: TOptions) => PaginatedSdkResult<TItem>;
//# sourceMappingURL=functions.d.ts.map