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; /** 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 { 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`), 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` in `.d.ts` rather than expanding the * full triple-intersection at every callsite. */ export interface PaginatedSdkResult extends Promise>, AsyncIterable> { items(): AsyncIterable; } export type PaginatedSdkFunction = (options: TOptions) => PaginatedSdkResult; //# sourceMappingURL=functions.d.ts.map