import { ZapierSdkOptions, BaseEvent } from '@zapier/zapier-sdk'; import { E as Extension, Z as ZapierSdkCli } from './extensions-D1NeCGqK.js'; import '@zapier/kitcore'; import 'zod'; import 'zod/v4/core'; interface ZapierCliSdkOptions extends ZapierSdkOptions { /** * Extra plugins discovered from `@zapier/zapier-sdk` extension packages. * Pre-resolved by `cli.ts` (`utils/extensions.ts`) so this factory stays * synchronous. Each plugin is layered onto the chain after all built-in * CLI plugins, so its functions appear in `getRegistry({ package: "cli" })` * automatically. */ extensions?: Extension[]; } /** * Create a Zapier SDK instance configured specifically for the CLI * Includes all CLI-specific plugins in addition to the standard SDK functionality */ declare function createZapierCliSdk(options?: ZapierCliSdkOptions): ZapierSdkCli; /** * CLI-specific telemetry event definitions */ /** * Event emitted when a CLI command is executed */ interface CliCommandExecutedEvent extends BaseEvent { system_name: string; session_id?: string | null; cli_version?: string | null; cli_arguments?: (string | null)[] | null; cli_primary_command?: string | null; os_platform?: string | null; os_release?: string | null; os_architecture?: string | null; platform_versions?: Record | null; selected_api?: string | null; app_id?: number | null; app_version_id?: number | null; execution_duration_ms?: number | null; success_flag: boolean; exit_code?: number | null; error_message?: string | null; command_category?: string | null; requires_auth?: boolean | null; is_ci_environment?: boolean | null; ci_platform?: string | null; package_manager?: string | null; made_network_requests?: boolean | null; files_modified_count?: number | null; files_created_count?: number | null; files_processed_size_bytes?: number | null; peak_memory_usage_bytes?: number | null; cpu_time_ms?: number | null; subprocess_count?: number | null; used_non_interactive_mode?: boolean | null; is_headless?: boolean | null; stdin_is_tty?: boolean | null; stdout_is_tty?: boolean | null; agent?: string | null; } /** * CLI-specific event builders * * Provides builder functions for CLI command telemetry that auto-populate * common CLI fields and system information. */ interface CliEventContext { 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; session_id?: string | null; selected_api?: string | null; app_id?: number | null; app_version_id?: number | null; } interface CliCommandExecutedEventData { cli_primary_command: string; success_flag: boolean; execution_duration_ms?: number | null; exit_code?: number | null; error_message?: string | null; command_category?: string | null; requires_auth?: boolean | null; cli_arguments?: (string | null)[] | null; cli_version?: string | null; made_network_requests?: boolean | null; files_modified_count?: number | null; files_created_count?: number | null; files_processed_size_bytes?: number | null; peak_memory_usage_bytes?: number | null; cpu_time_ms?: number | null; subprocess_count?: number | null; used_non_interactive_mode?: boolean | null; is_headless?: boolean | null; package_manager?: string | null; } declare function buildCliCommandExecutedEvent({ data, context, cliVersion, }: { data: CliCommandExecutedEventData; context?: CliEventContext; cliVersion?: string; }): CliCommandExecutedEvent; interface CliOption { name: string; flag: string; short?: string; description: string; } declare enum ReservedCliParameter { Version = "version", Help = "help" } /** CLI options at the framework level, not defined by any SDK command. */ declare const RESERVED_CLI_OPTIONS: readonly Readonly[]; declare function getReservedCliOption(name: ReservedCliParameter): Readonly; /** CLI options automatically added to every SDK-generated command. */ declare const SHARED_COMMAND_CLI_OPTIONS: readonly Readonly[]; /** * The kebab-case flag name (without leading dashes) of a boolean param's * disable spelling, or undefined when the param's schema doesn't declare * `negatable` metadata. Exported for the docs generator, so the CLI's * rendering of the metadata lives in one place. */ declare function negationKebabName(param: { name: string; negatable?: true | string; }): string | undefined; export { type CliCommandExecutedEvent, type CliCommandExecutedEventData, type CliEventContext, RESERVED_CLI_OPTIONS, ReservedCliParameter, SHARED_COMMAND_CLI_OPTIONS, type ZapierCliSdkOptions, buildCliCommandExecutedEvent, createZapierCliSdk, getReservedCliOption, negationKebabName };