import { A as OnTriggerRegistrationInput, C as AuthInput, D as MiddlewareFunctionInput, E as MessageType, F as RegisterTriggerMessage, I as RegisterTriggerTypeMessage, L as StreamChannelRef, M as OnTriggerTypeRegistrationInput, N as OnTriggerTypeRegistrationResult, O as OnFunctionRegistrationInput, P as RegisterFunctionMessage, R as TriggerRequest, S as ChannelWriter, T as EnqueueResult, _ as IIIConnectionState, a as ISdk, c as RegisterTriggerInput, d as Trigger, f as TriggerTypeRef, g as EngineTriggers, h as EngineFunctions, i as FunctionRef, j as OnTriggerRegistrationResult, k as OnFunctionRegistrationResult, l as RegisterTriggerTypeInput, m as TriggerHandler, n as ApiResponse, o as RegisterFunctionInput, p as TriggerConfig, r as Channel, s as RegisterFunctionOptions, t as ApiRequest, u as RemoteFunctionHandler, v as IIIReconnectionConfig, w as AuthResult, x as ChannelReader } from "./types-C0IeU5Ph.mjs"; //#region src/iii.d.ts /** * Configuration options passed to {@link registerWorker}. * * @example * ```typescript * const iii = registerWorker('ws://localhost:49135', { * invocationTimeoutMs: 10000, * reconnectionConfig: { maxRetries: 5 }, * }) * ``` */ type InitOptions = { /** Default timeout for `trigger()` in milliseconds. Defaults to `30000`. */invocationTimeoutMs?: number; /** * WebSocket reconnection behavior. * * @see {@link IIIReconnectionConfig} for available fields and defaults. */ reconnectionConfig?: Partial; /** Custom headers are not supported by browser WebSocket. Use query parameters or cookies for auth. */ headers?: Record; }; /** * Factory object that constructs routing actions for {@link ISdk.trigger}. * * @example * ```typescript * import { TriggerAction } from 'iii-browser-sdk' * * // Enqueue to a named queue * iii.trigger({ * function_id: 'process', * payload: { data: 'hello' }, * action: TriggerAction.Enqueue({ queue: 'jobs' }), * }) * * // Fire-and-forget * iii.trigger({ * function_id: 'notify', * payload: {}, * action: TriggerAction.Void(), * }) * ``` */ declare const TriggerAction: { /** * Routes the invocation through a named queue. The engine enqueues the job, * acknowledges the caller with `{ messageReceiptId }`, and processes it * asynchronously. * * @param opts - Queue routing options. * @param opts.queue - Name of the target queue. */ readonly Enqueue: (opts: { queue: string; }) => { queue: string; type: "enqueue"; }; /** * Fire-and-forget routing. The engine forwards the invocation without * waiting for a response or queuing the job. */ readonly Void: () => { type: "void"; }; }; /** * Creates and returns a connected SDK instance. The WebSocket connection is * established automatically -- there is no separate `connect()` call. * * @param address - WebSocket URL of the III engine (e.g. `ws://localhost:49135`). * @param options - Optional {@link InitOptions} for worker name, timeouts, and reconnection. * @returns A connected {@link ISdk} instance. * * @example * ```typescript * import { registerWorker } from 'iii-browser-sdk' * * const iii = registerWorker('ws://localhost:49135') * ``` */ declare const registerWorker: (address: string, options?: InitOptions) => ISdk; //#endregion export { type ApiRequest, type ApiResponse, type AuthInput, type AuthResult, type Channel, ChannelReader, ChannelWriter, EngineFunctions, EngineTriggers, type EnqueueResult, type FunctionRef, type IIIConnectionState, type ISdk, type InitOptions, type MessageType, type MiddlewareFunctionInput, type OnFunctionRegistrationInput, type OnFunctionRegistrationResult, type OnTriggerRegistrationInput, type OnTriggerRegistrationResult, type OnTriggerTypeRegistrationInput, type OnTriggerTypeRegistrationResult, type RegisterFunctionInput, type RegisterFunctionMessage, type RegisterFunctionOptions, type RegisterTriggerInput, type RegisterTriggerMessage, type RegisterTriggerTypeInput, type RegisterTriggerTypeMessage, type RemoteFunctionHandler, type StreamChannelRef, type Trigger, TriggerAction, type TriggerConfig, type TriggerHandler, type TriggerRequest, type TriggerTypeRef, registerWorker }; //# sourceMappingURL=index.d.mts.map