iii-browser-sdk 0.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.spdx +22 -0
- package/api-docs.json +14513 -0
- package/dist/index.cjs +805 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +839 -0
- package/dist/index.d.cts.map +1 -0
- package/dist/index.d.mts +839 -0
- package/dist/index.d.mts.map +1 -0
- package/dist/index.mjs +800 -0
- package/dist/index.mjs.map +1 -0
- package/dist/state.cjs +14 -0
- package/dist/state.cjs.map +1 -0
- package/dist/state.d.cts +86 -0
- package/dist/state.d.cts.map +1 -0
- package/dist/state.d.mts +86 -0
- package/dist/state.d.mts.map +1 -0
- package/dist/state.mjs +12 -0
- package/dist/state.mjs.map +1 -0
- package/dist/stream-B4Etd7Hp.d.cts +145 -0
- package/dist/stream-B4Etd7Hp.d.cts.map +1 -0
- package/dist/stream-CCorhlLO.d.mts +145 -0
- package/dist/stream-CCorhlLO.d.mts.map +1 -0
- package/dist/stream.cjs +0 -0
- package/dist/stream.d.cts +2 -0
- package/dist/stream.d.mts +2 -0
- package/dist/stream.mjs +1 -0
- package/package.json +52 -0
- package/typedoc.json +8 -0
- package/vitest.config.ts +12 -0
- package/vitest.integration.config.ts +11 -0
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,839 @@
|
|
|
1
|
+
import { n as IStream } from "./stream-B4Etd7Hp.cjs";
|
|
2
|
+
|
|
3
|
+
//#region src/iii-types.d.ts
|
|
4
|
+
declare enum MessageType {
|
|
5
|
+
RegisterFunction = "registerfunction",
|
|
6
|
+
UnregisterFunction = "unregisterfunction",
|
|
7
|
+
RegisterService = "registerservice",
|
|
8
|
+
InvokeFunction = "invokefunction",
|
|
9
|
+
InvocationResult = "invocationresult",
|
|
10
|
+
RegisterTriggerType = "registertriggertype",
|
|
11
|
+
RegisterTrigger = "registertrigger",
|
|
12
|
+
UnregisterTrigger = "unregistertrigger",
|
|
13
|
+
UnregisterTriggerType = "unregistertriggertype",
|
|
14
|
+
TriggerRegistrationResult = "triggerregistrationresult",
|
|
15
|
+
WorkerRegistered = "workerregistered"
|
|
16
|
+
}
|
|
17
|
+
type RegisterTriggerTypeMessage = {
|
|
18
|
+
message_type: MessageType.RegisterTriggerType;
|
|
19
|
+
id: string;
|
|
20
|
+
description: string;
|
|
21
|
+
};
|
|
22
|
+
type RegisterTriggerMessage = {
|
|
23
|
+
message_type: MessageType.RegisterTrigger;
|
|
24
|
+
id: string;
|
|
25
|
+
type: string;
|
|
26
|
+
function_id: string;
|
|
27
|
+
config: unknown;
|
|
28
|
+
};
|
|
29
|
+
type RegisterServiceMessage = {
|
|
30
|
+
message_type: MessageType.RegisterService;
|
|
31
|
+
id: string;
|
|
32
|
+
name?: string;
|
|
33
|
+
description?: string;
|
|
34
|
+
parent_service_id?: string;
|
|
35
|
+
};
|
|
36
|
+
/**
|
|
37
|
+
* Authentication configuration for HTTP-invoked functions.
|
|
38
|
+
*
|
|
39
|
+
* - `hmac` -- HMAC signature verification using a shared secret.
|
|
40
|
+
* - `bearer` -- Bearer token authentication.
|
|
41
|
+
* - `api_key` -- API key sent via a custom header.
|
|
42
|
+
*/
|
|
43
|
+
type HttpAuthConfig = {
|
|
44
|
+
type: 'hmac';
|
|
45
|
+
secret_key: string;
|
|
46
|
+
} | {
|
|
47
|
+
type: 'bearer';
|
|
48
|
+
token_key: string;
|
|
49
|
+
} | {
|
|
50
|
+
type: 'api_key';
|
|
51
|
+
header: string;
|
|
52
|
+
value_key: string;
|
|
53
|
+
};
|
|
54
|
+
/**
|
|
55
|
+
* Configuration for registering an HTTP-invoked function (Lambda, Cloudflare
|
|
56
|
+
* Workers, etc.) instead of a local handler.
|
|
57
|
+
*/
|
|
58
|
+
type HttpInvocationConfig = {
|
|
59
|
+
/** URL to invoke. */url: string; /** HTTP method. Defaults to `POST`. */
|
|
60
|
+
method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE'; /** Timeout in milliseconds. */
|
|
61
|
+
timeout_ms?: number; /** Custom headers to send with the request. */
|
|
62
|
+
headers?: Record<string, string>; /** Authentication configuration. */
|
|
63
|
+
auth?: HttpAuthConfig;
|
|
64
|
+
};
|
|
65
|
+
type RegisterFunctionFormat = {
|
|
66
|
+
/**
|
|
67
|
+
* The name of the parameter
|
|
68
|
+
*/
|
|
69
|
+
name?: string;
|
|
70
|
+
/**
|
|
71
|
+
* The description of the parameter
|
|
72
|
+
*/
|
|
73
|
+
description?: string;
|
|
74
|
+
/**
|
|
75
|
+
* The type of the parameter
|
|
76
|
+
*/
|
|
77
|
+
type: 'string' | 'number' | 'boolean' | 'object' | 'array' | 'null' | 'map';
|
|
78
|
+
/**
|
|
79
|
+
* The body of the parameter
|
|
80
|
+
*/
|
|
81
|
+
properties?: Record<string, RegisterFunctionFormat>;
|
|
82
|
+
/**
|
|
83
|
+
* The items of the parameter
|
|
84
|
+
*/
|
|
85
|
+
items?: RegisterFunctionFormat;
|
|
86
|
+
/**
|
|
87
|
+
* Whether the parameter is required
|
|
88
|
+
*/
|
|
89
|
+
required?: string[];
|
|
90
|
+
};
|
|
91
|
+
type RegisterFunctionMessage = {
|
|
92
|
+
message_type: MessageType.RegisterFunction;
|
|
93
|
+
/**
|
|
94
|
+
* The path of the function (use :: for namespacing, e.g. external::my_lambda)
|
|
95
|
+
*/
|
|
96
|
+
id: string;
|
|
97
|
+
/**
|
|
98
|
+
* The description of the function
|
|
99
|
+
*/
|
|
100
|
+
description?: string;
|
|
101
|
+
/**
|
|
102
|
+
* The request format of the function
|
|
103
|
+
*/
|
|
104
|
+
request_format?: RegisterFunctionFormat;
|
|
105
|
+
/**
|
|
106
|
+
* The response format of the function
|
|
107
|
+
*/
|
|
108
|
+
response_format?: RegisterFunctionFormat;
|
|
109
|
+
metadata?: Record<string, unknown>;
|
|
110
|
+
/**
|
|
111
|
+
* HTTP invocation config for external HTTP functions (Lambda, Cloudflare Workers, etc.)
|
|
112
|
+
*/
|
|
113
|
+
invocation?: HttpInvocationConfig;
|
|
114
|
+
};
|
|
115
|
+
/**
|
|
116
|
+
* Routing action for {@link TriggerRequest}. Determines how the engine
|
|
117
|
+
* handles the invocation.
|
|
118
|
+
*
|
|
119
|
+
* - `enqueue` -- Routes through a named queue for async processing.
|
|
120
|
+
* - `void` -- Fire-and-forget, no response.
|
|
121
|
+
*/
|
|
122
|
+
type TriggerAction$1 = {
|
|
123
|
+
type: 'enqueue';
|
|
124
|
+
queue: string;
|
|
125
|
+
} | {
|
|
126
|
+
type: 'void';
|
|
127
|
+
};
|
|
128
|
+
/**
|
|
129
|
+
* Input passed to the RBAC auth function during WebSocket upgrade.
|
|
130
|
+
* Contains the HTTP headers, query parameters, and client IP from the
|
|
131
|
+
* connecting worker's upgrade request.
|
|
132
|
+
*/
|
|
133
|
+
type AuthInput = {
|
|
134
|
+
/** HTTP headers from the WebSocket upgrade request. */headers: Record<string, string>; /** Query parameters from the upgrade URL. Each key maps to an array of values to support repeated keys. */
|
|
135
|
+
query_params: Record<string, string[]>; /** IP address of the connecting client. */
|
|
136
|
+
ip_address: string;
|
|
137
|
+
};
|
|
138
|
+
/**
|
|
139
|
+
* Return value from the RBAC auth function. Controls which functions the
|
|
140
|
+
* authenticated worker can invoke and what context is forwarded to the
|
|
141
|
+
* middleware.
|
|
142
|
+
*/
|
|
143
|
+
type AuthResult = {
|
|
144
|
+
/** Additional function IDs to allow beyond the `expose_functions` config. */allowed_functions: string[]; /** Function IDs to deny even if they match `expose_functions`. Takes precedence over allowed. */
|
|
145
|
+
forbidden_functions: string[]; /** Trigger type IDs the worker may register triggers for. When omitted, all types are allowed. */
|
|
146
|
+
allowed_trigger_types?: string[]; /** Whether the worker may register new trigger types. */
|
|
147
|
+
allow_trigger_type_registration: boolean; /** Whether the worker may register new functions. Defaults to `true` if omitted. */
|
|
148
|
+
allow_function_registration?: boolean; /** Arbitrary context forwarded to the middleware function on every invocation. */
|
|
149
|
+
context: Record<string, unknown>;
|
|
150
|
+
};
|
|
151
|
+
/**
|
|
152
|
+
* Input passed to the RBAC middleware function on every function invocation
|
|
153
|
+
* through the RBAC port. The middleware can inspect, modify, or reject the
|
|
154
|
+
* call before it reaches the target function.
|
|
155
|
+
*/
|
|
156
|
+
type MiddlewareFunctionInput = {
|
|
157
|
+
/** ID of the function being invoked. */function_id: string; /** Payload sent by the caller. */
|
|
158
|
+
payload: Record<string, unknown>; /** Routing action, if any. */
|
|
159
|
+
action?: TriggerAction$1; /** Auth context returned by the auth function for this session. */
|
|
160
|
+
context: Record<string, unknown>;
|
|
161
|
+
};
|
|
162
|
+
/**
|
|
163
|
+
* Input passed to the `on_trigger_type_registration_function_id` hook
|
|
164
|
+
* when a worker attempts to register a new trigger type through the RBAC port.
|
|
165
|
+
* Return `true` to allow the registration.
|
|
166
|
+
*/
|
|
167
|
+
type OnTriggerTypeRegistrationInput = {
|
|
168
|
+
/** ID of the trigger type being registered. */trigger_type_id: string; /** Human-readable description of the trigger type. */
|
|
169
|
+
description: string; /** Auth context from `AuthResult.context` for this session. */
|
|
170
|
+
context: Record<string, unknown>;
|
|
171
|
+
};
|
|
172
|
+
/**
|
|
173
|
+
* Input passed to the `on_trigger_registration_function_id` hook
|
|
174
|
+
* when a worker attempts to register a trigger through the RBAC port.
|
|
175
|
+
* Return `true` to allow the registration.
|
|
176
|
+
*/
|
|
177
|
+
type OnTriggerRegistrationInput = {
|
|
178
|
+
/** ID of the trigger being registered. */trigger_id: string; /** Trigger type identifier. */
|
|
179
|
+
trigger_type: string; /** ID of the function this trigger is bound to. */
|
|
180
|
+
function_id: string; /** Trigger-specific configuration. */
|
|
181
|
+
config: unknown; /** Auth context from `AuthResult.context` for this session. */
|
|
182
|
+
context: Record<string, unknown>;
|
|
183
|
+
};
|
|
184
|
+
/**
|
|
185
|
+
* Input passed to the `on_function_registration_function_id` hook
|
|
186
|
+
* when a worker attempts to register a function through the RBAC port.
|
|
187
|
+
* Return `true` to allow the registration.
|
|
188
|
+
*/
|
|
189
|
+
type OnFunctionRegistrationInput = {
|
|
190
|
+
/** ID of the function being registered. */function_id: string; /** Human-readable description of the function. */
|
|
191
|
+
description?: string; /** Arbitrary metadata attached to the function. */
|
|
192
|
+
metadata?: Record<string, unknown>; /** Auth context from `AuthResult.context` for this session. */
|
|
193
|
+
context: Record<string, unknown>;
|
|
194
|
+
};
|
|
195
|
+
/**
|
|
196
|
+
* Result returned when a function is invoked with `TriggerAction.Enqueue`.
|
|
197
|
+
*/
|
|
198
|
+
type EnqueueResult = {
|
|
199
|
+
/** Unique receipt ID for the enqueued message. */messageReceiptId: string;
|
|
200
|
+
};
|
|
201
|
+
/**
|
|
202
|
+
* Request object passed to {@link ISdk.trigger}.
|
|
203
|
+
*
|
|
204
|
+
* @typeParam TInput - Type of the payload.
|
|
205
|
+
*/
|
|
206
|
+
type TriggerRequest<TInput = unknown> = {
|
|
207
|
+
/** ID of the function to invoke. */function_id: string; /** Payload to pass to the function. */
|
|
208
|
+
payload: TInput; /** Routing action. Omit for synchronous request/response. */
|
|
209
|
+
action?: TriggerAction$1; /** Override the default invocation timeout in milliseconds. */
|
|
210
|
+
timeoutMs?: number;
|
|
211
|
+
};
|
|
212
|
+
/**
|
|
213
|
+
* Metadata about a registered function, returned by `ISdk.listFunctions`.
|
|
214
|
+
*/
|
|
215
|
+
type FunctionInfo = {
|
|
216
|
+
/** Unique function identifier. */function_id: string; /** Human-readable description. */
|
|
217
|
+
description?: string; /** Schema describing expected request format. */
|
|
218
|
+
request_format?: RegisterFunctionFormat; /** Schema describing expected response format. */
|
|
219
|
+
response_format?: RegisterFunctionFormat; /** Arbitrary metadata attached to the function. */
|
|
220
|
+
metadata?: Record<string, unknown>;
|
|
221
|
+
};
|
|
222
|
+
/**
|
|
223
|
+
* Information about a registered trigger.
|
|
224
|
+
*/
|
|
225
|
+
type TriggerInfo = {
|
|
226
|
+
/** Unique trigger identifier. */id: string; /** Type of the trigger (e.g. `http`, `cron`, `queue`). */
|
|
227
|
+
trigger_type: string; /** ID of the function this trigger is bound to. */
|
|
228
|
+
function_id: string; /** Trigger-specific configuration. */
|
|
229
|
+
config?: unknown;
|
|
230
|
+
};
|
|
231
|
+
/**
|
|
232
|
+
* Information about a registered trigger type, returned by `ISdk.listTriggerTypes`.
|
|
233
|
+
*/
|
|
234
|
+
type TriggerTypeInfo = {
|
|
235
|
+
/** Trigger type identifier (e.g. `http`, `cron`, `queue`). */id: string; /** Human-readable description of the trigger type. */
|
|
236
|
+
description: string; /** JSON Schema for the trigger configuration. */
|
|
237
|
+
trigger_request_format?: unknown; /** JSON Schema for the call request payload. */
|
|
238
|
+
call_request_format?: unknown;
|
|
239
|
+
};
|
|
240
|
+
/** Worker connection status. */
|
|
241
|
+
type WorkerStatus = 'connected' | 'available' | 'busy' | 'disconnected';
|
|
242
|
+
/**
|
|
243
|
+
* Metadata about a connected worker, returned by `ISdk.listWorkers`.
|
|
244
|
+
*/
|
|
245
|
+
type WorkerInfo = {
|
|
246
|
+
/** Unique worker identifier assigned by the engine. */id: string; /** Display name of the worker. */
|
|
247
|
+
name?: string; /** Runtime environment (e.g. `node`, `python`, `rust`). */
|
|
248
|
+
runtime?: string; /** SDK version. */
|
|
249
|
+
version?: string; /** Operating system info. */
|
|
250
|
+
os?: string; /** IP address of the worker. */
|
|
251
|
+
ip_address?: string; /** Current connection status. */
|
|
252
|
+
status: WorkerStatus; /** Timestamp (ms since epoch) when the worker connected. */
|
|
253
|
+
connected_at_ms: number; /** Number of functions registered by this worker. */
|
|
254
|
+
function_count: number; /** List of function IDs registered by this worker. */
|
|
255
|
+
functions: string[]; /** Number of currently active invocations. */
|
|
256
|
+
active_invocations: number;
|
|
257
|
+
};
|
|
258
|
+
/**
|
|
259
|
+
* Serializable reference to one end of a streaming channel. Can be included
|
|
260
|
+
* in invocation payloads to pass channel endpoints between workers.
|
|
261
|
+
*/
|
|
262
|
+
type StreamChannelRef = {
|
|
263
|
+
/** Unique channel identifier. */channel_id: string; /** Access key for authentication. */
|
|
264
|
+
access_key: string; /** Whether this ref is for reading or writing. */
|
|
265
|
+
direction: 'read' | 'write';
|
|
266
|
+
};
|
|
267
|
+
//#endregion
|
|
268
|
+
//#region src/channels.d.ts
|
|
269
|
+
/**
|
|
270
|
+
* Write end of a streaming channel. Uses native browser WebSocket.
|
|
271
|
+
*
|
|
272
|
+
* @example
|
|
273
|
+
* ```typescript
|
|
274
|
+
* const channel = await iii.createChannel()
|
|
275
|
+
*
|
|
276
|
+
* channel.writer.sendMessage(JSON.stringify({ type: 'event', data: 'test' }))
|
|
277
|
+
* channel.writer.sendBinary(new Uint8Array([1, 2, 3]))
|
|
278
|
+
* channel.writer.close()
|
|
279
|
+
* ```
|
|
280
|
+
*/
|
|
281
|
+
declare class ChannelWriter {
|
|
282
|
+
private static readonly FRAME_SIZE;
|
|
283
|
+
private ws;
|
|
284
|
+
private wsReady;
|
|
285
|
+
private readonly pendingMessages;
|
|
286
|
+
private readonly url;
|
|
287
|
+
constructor(engineWsBase: string, ref: StreamChannelRef);
|
|
288
|
+
private ensureConnected;
|
|
289
|
+
/** Send a text message through the channel. */
|
|
290
|
+
sendMessage(msg: string): void;
|
|
291
|
+
/** Send binary data through the channel. */
|
|
292
|
+
sendBinary(data: Uint8Array): void;
|
|
293
|
+
/** Close the channel writer. */
|
|
294
|
+
close(): void;
|
|
295
|
+
private sendRaw;
|
|
296
|
+
}
|
|
297
|
+
/**
|
|
298
|
+
* Read end of a streaming channel. Uses native browser WebSocket.
|
|
299
|
+
*
|
|
300
|
+
* @example
|
|
301
|
+
* ```typescript
|
|
302
|
+
* const channel = await iii.createChannel()
|
|
303
|
+
*
|
|
304
|
+
* channel.reader.onMessage((msg) => console.log('Got:', msg))
|
|
305
|
+
* channel.reader.onBinary((data) => console.log('Binary:', data.byteLength))
|
|
306
|
+
* ```
|
|
307
|
+
*/
|
|
308
|
+
declare class ChannelReader {
|
|
309
|
+
private ws;
|
|
310
|
+
private connected;
|
|
311
|
+
private readonly messageCallbacks;
|
|
312
|
+
private readonly binaryCallbacks;
|
|
313
|
+
private readonly url;
|
|
314
|
+
constructor(engineWsBase: string, ref: StreamChannelRef);
|
|
315
|
+
private ensureConnected;
|
|
316
|
+
/** Register a callback to receive text messages from the channel. */
|
|
317
|
+
onMessage(callback: (msg: string) => void): void;
|
|
318
|
+
/** Register a callback to receive binary data from the channel. */
|
|
319
|
+
onBinary(callback: (data: Uint8Array) => void): void;
|
|
320
|
+
/** Read all binary data from the channel until it closes. */
|
|
321
|
+
readAll(): Promise<Uint8Array>;
|
|
322
|
+
/** Close the channel reader. */
|
|
323
|
+
close(): void;
|
|
324
|
+
}
|
|
325
|
+
//#endregion
|
|
326
|
+
//#region src/iii-constants.d.ts
|
|
327
|
+
/** Configuration for WebSocket reconnection behavior */
|
|
328
|
+
interface IIIReconnectionConfig {
|
|
329
|
+
/** Starting delay in milliseconds (default: 1000ms) */
|
|
330
|
+
initialDelayMs: number;
|
|
331
|
+
/** Maximum delay cap in milliseconds (default: 30000ms) */
|
|
332
|
+
maxDelayMs: number;
|
|
333
|
+
/** Exponential backoff multiplier (default: 2) */
|
|
334
|
+
backoffMultiplier: number;
|
|
335
|
+
/** Random jitter factor 0-1 (default: 0.3) */
|
|
336
|
+
jitterFactor: number;
|
|
337
|
+
/** Maximum retry attempts, -1 for infinite (default: -1) */
|
|
338
|
+
maxRetries: number;
|
|
339
|
+
}
|
|
340
|
+
//#endregion
|
|
341
|
+
//#region src/triggers.d.ts
|
|
342
|
+
/**
|
|
343
|
+
* Configuration passed to a trigger handler when a trigger instance is
|
|
344
|
+
* registered or unregistered.
|
|
345
|
+
*
|
|
346
|
+
* @typeParam TConfig - Type of the trigger-specific configuration.
|
|
347
|
+
*/
|
|
348
|
+
type TriggerConfig<TConfig> = {
|
|
349
|
+
/** Trigger instance ID. */id: string; /** Function to invoke when the trigger fires. */
|
|
350
|
+
function_id: string; /** Trigger-specific configuration. */
|
|
351
|
+
config: TConfig;
|
|
352
|
+
};
|
|
353
|
+
/**
|
|
354
|
+
* Handler interface for custom trigger types. Passed to
|
|
355
|
+
* `ISdk.registerTriggerType`.
|
|
356
|
+
*
|
|
357
|
+
* @typeParam TConfig - Type of the trigger-specific configuration.
|
|
358
|
+
*
|
|
359
|
+
* @example
|
|
360
|
+
* ```typescript
|
|
361
|
+
* const handler: TriggerHandler<{ interval: number }> = {
|
|
362
|
+
* async registerTrigger({ id, function_id, config }) {
|
|
363
|
+
* // Set up periodic invocation
|
|
364
|
+
* },
|
|
365
|
+
* async unregisterTrigger({ id, function_id, config }) {
|
|
366
|
+
* // Clean up
|
|
367
|
+
* },
|
|
368
|
+
* }
|
|
369
|
+
* ```
|
|
370
|
+
*/
|
|
371
|
+
type TriggerHandler<TConfig> = {
|
|
372
|
+
/** Called when a trigger instance is registered. */registerTrigger(config: TriggerConfig<TConfig>): Promise<void>; /** Called when a trigger instance is unregistered. */
|
|
373
|
+
unregisterTrigger(config: TriggerConfig<TConfig>): Promise<void>;
|
|
374
|
+
};
|
|
375
|
+
//#endregion
|
|
376
|
+
//#region src/types.d.ts
|
|
377
|
+
/**
|
|
378
|
+
* Async function handler for a registered function. Receives the invocation
|
|
379
|
+
* payload and returns the result.
|
|
380
|
+
*
|
|
381
|
+
* @typeParam TInput - Type of the invocation payload.
|
|
382
|
+
* @typeParam TOutput - Type of the return value.
|
|
383
|
+
*
|
|
384
|
+
* @example
|
|
385
|
+
* ```typescript
|
|
386
|
+
* const handler: RemoteFunctionHandler<{ name: string }, { message: string }> =
|
|
387
|
+
* async (data) => ({ message: `Hello, ${data.name}!` })
|
|
388
|
+
* ```
|
|
389
|
+
*/
|
|
390
|
+
type RemoteFunctionHandler<TInput = any, TOutput = any> = (data: TInput) => Promise<TOutput>;
|
|
391
|
+
type RegisterTriggerInput = Omit<RegisterTriggerMessage, 'message_type' | 'id'>;
|
|
392
|
+
type RegisterServiceInput = Omit<RegisterServiceMessage, 'message_type'>;
|
|
393
|
+
type RegisterFunctionInput = Omit<RegisterFunctionMessage, 'message_type'>;
|
|
394
|
+
type RegisterTriggerTypeInput = Omit<RegisterTriggerTypeMessage, 'message_type'>;
|
|
395
|
+
type FunctionsAvailableCallback = (functions: FunctionInfo[]) => void;
|
|
396
|
+
interface ISdk {
|
|
397
|
+
/**
|
|
398
|
+
* Registers a new trigger. A trigger is a way to invoke a function when a certain event occurs.
|
|
399
|
+
* @param trigger - The trigger to register
|
|
400
|
+
* @returns A trigger object that can be used to unregister the trigger
|
|
401
|
+
*
|
|
402
|
+
* @example
|
|
403
|
+
* ```typescript
|
|
404
|
+
* const trigger = iii.registerTrigger({
|
|
405
|
+
* type: 'cron',
|
|
406
|
+
* function_id: 'my-service::process-batch',
|
|
407
|
+
* config: { schedule: '*\/5 * * * *' },
|
|
408
|
+
* })
|
|
409
|
+
*
|
|
410
|
+
* // Later, remove the trigger
|
|
411
|
+
* trigger.unregister()
|
|
412
|
+
* ```
|
|
413
|
+
*/
|
|
414
|
+
registerTrigger(trigger: RegisterTriggerInput): Trigger;
|
|
415
|
+
/**
|
|
416
|
+
* Registers a new function with a local handler.
|
|
417
|
+
* @param func - The function to register
|
|
418
|
+
* @param handler - The handler for local execution
|
|
419
|
+
* @returns A handle that can be used to unregister the function
|
|
420
|
+
*
|
|
421
|
+
* @example
|
|
422
|
+
* ```typescript
|
|
423
|
+
* const ref = iii.registerFunction(
|
|
424
|
+
* { id: 'greet', description: 'Returns a greeting' },
|
|
425
|
+
* async (data: { name: string }) => ({ message: `Hello, ${data.name}!` }),
|
|
426
|
+
* )
|
|
427
|
+
*
|
|
428
|
+
* // Later, remove the function
|
|
429
|
+
* ref.unregister()
|
|
430
|
+
* ```
|
|
431
|
+
*/
|
|
432
|
+
/**
|
|
433
|
+
* Registers a new service.
|
|
434
|
+
* @param message - The service to register
|
|
435
|
+
*/
|
|
436
|
+
registerService(message: RegisterServiceInput): void;
|
|
437
|
+
registerFunction(func: RegisterFunctionInput, handler: RemoteFunctionHandler): FunctionRef;
|
|
438
|
+
/**
|
|
439
|
+
* Registers a new function with an HTTP invocation config (Lambda, Cloudflare
|
|
440
|
+
* Workers, etc.).
|
|
441
|
+
* @param func - The function to register
|
|
442
|
+
* @param invocation - HTTP invocation config
|
|
443
|
+
* @returns A handle that can be used to unregister the function
|
|
444
|
+
*
|
|
445
|
+
* @example
|
|
446
|
+
* ```typescript
|
|
447
|
+
* const ref = iii.registerFunction(
|
|
448
|
+
* { id: 'external::my-lambda', description: 'Proxied Lambda function' },
|
|
449
|
+
* {
|
|
450
|
+
* url: 'https://abc123.lambda-url.us-east-1.on.aws',
|
|
451
|
+
* method: 'POST',
|
|
452
|
+
* timeout_ms: 30_000,
|
|
453
|
+
* auth: { type: 'bearer', token_key: 'LAMBDA_AUTH_TOKEN' },
|
|
454
|
+
* },
|
|
455
|
+
* )
|
|
456
|
+
* ```
|
|
457
|
+
*/
|
|
458
|
+
registerFunction(func: RegisterFunctionInput, invocation: HttpInvocationConfig): FunctionRef;
|
|
459
|
+
/**
|
|
460
|
+
* Invokes a function using a request object.
|
|
461
|
+
*
|
|
462
|
+
* @param request - The trigger request containing function_id, payload, and optional action/timeout
|
|
463
|
+
* @returns The result of the function
|
|
464
|
+
*
|
|
465
|
+
* @example
|
|
466
|
+
* ```typescript
|
|
467
|
+
* // Synchronous invocation
|
|
468
|
+
* const result = await iii.trigger<{ name: string }, { message: string }>({
|
|
469
|
+
* function_id: 'greet',
|
|
470
|
+
* payload: { name: 'World' },
|
|
471
|
+
* timeoutMs: 5000,
|
|
472
|
+
* })
|
|
473
|
+
* console.log(result.message) // "Hello, World!"
|
|
474
|
+
*
|
|
475
|
+
* // Fire-and-forget
|
|
476
|
+
* await iii.trigger({
|
|
477
|
+
* function_id: 'send-email',
|
|
478
|
+
* payload: { to: 'user@example.com' },
|
|
479
|
+
* action: TriggerAction.Void(),
|
|
480
|
+
* })
|
|
481
|
+
*
|
|
482
|
+
* // Enqueue for async processing
|
|
483
|
+
* const receipt = await iii.trigger({
|
|
484
|
+
* function_id: 'process-order',
|
|
485
|
+
* payload: { orderId: '123' },
|
|
486
|
+
* action: TriggerAction.Enqueue({ queue: 'orders' }),
|
|
487
|
+
* })
|
|
488
|
+
* ```
|
|
489
|
+
*/
|
|
490
|
+
trigger<TInput, TOutput>(request: TriggerRequest<TInput>): Promise<TOutput>;
|
|
491
|
+
/**
|
|
492
|
+
* Lists all registered functions.
|
|
493
|
+
*
|
|
494
|
+
* @example
|
|
495
|
+
* ```typescript
|
|
496
|
+
* const functions = await iii.listFunctions()
|
|
497
|
+
* for (const fn of functions) {
|
|
498
|
+
* console.log(`${fn.function_id}: ${fn.description}`)
|
|
499
|
+
* }
|
|
500
|
+
* ```
|
|
501
|
+
*/
|
|
502
|
+
listFunctions(): Promise<FunctionInfo[]>;
|
|
503
|
+
/**
|
|
504
|
+
* Lists all connected workers.
|
|
505
|
+
*
|
|
506
|
+
* @returns An array of {@link WorkerInfo} objects.
|
|
507
|
+
*/
|
|
508
|
+
listWorkers(): Promise<WorkerInfo[]>;
|
|
509
|
+
/**
|
|
510
|
+
* Lists all registered triggers.
|
|
511
|
+
* @param includeInternal - Whether to include internal triggers (default: false)
|
|
512
|
+
*/
|
|
513
|
+
listTriggers(includeInternal?: boolean): Promise<TriggerInfo[]>;
|
|
514
|
+
/**
|
|
515
|
+
* Lists all trigger types registered with the engine.
|
|
516
|
+
* @param includeInternal - Whether to include internal trigger types (default: false)
|
|
517
|
+
*
|
|
518
|
+
* @example
|
|
519
|
+
* ```typescript
|
|
520
|
+
* const triggerTypes = await iii.listTriggerTypes()
|
|
521
|
+
* for (const tt of triggerTypes) {
|
|
522
|
+
* console.log(`${tt.id}: ${tt.description}`)
|
|
523
|
+
* }
|
|
524
|
+
* ```
|
|
525
|
+
*/
|
|
526
|
+
listTriggerTypes(includeInternal?: boolean): Promise<TriggerTypeInfo[]>;
|
|
527
|
+
/**
|
|
528
|
+
* Registers a new trigger type. A trigger type is a way to invoke a function when a certain event occurs.
|
|
529
|
+
* @param triggerType - The trigger type to register
|
|
530
|
+
* @param handler - The handler for the trigger type
|
|
531
|
+
* @returns A trigger type object that can be used to unregister the trigger type
|
|
532
|
+
*
|
|
533
|
+
* @example
|
|
534
|
+
* ```typescript
|
|
535
|
+
* type CronConfig = { schedule: string }
|
|
536
|
+
*
|
|
537
|
+
* iii.registerTriggerType<CronConfig>(
|
|
538
|
+
* { id: 'cron', description: 'Fires on a cron schedule' },
|
|
539
|
+
* {
|
|
540
|
+
* async registerTrigger({ id, function_id, config }) {
|
|
541
|
+
* startCronJob(id, config.schedule, () =>
|
|
542
|
+
* iii.trigger({ function_id, payload: {} }),
|
|
543
|
+
* )
|
|
544
|
+
* },
|
|
545
|
+
* async unregisterTrigger({ id }) {
|
|
546
|
+
* stopCronJob(id)
|
|
547
|
+
* },
|
|
548
|
+
* },
|
|
549
|
+
* )
|
|
550
|
+
* ```
|
|
551
|
+
*/
|
|
552
|
+
registerTriggerType<TConfig>(triggerType: RegisterTriggerTypeInput, handler: TriggerHandler<TConfig>): TriggerTypeRef<TConfig>;
|
|
553
|
+
/**
|
|
554
|
+
* Unregisters a trigger type.
|
|
555
|
+
* @param triggerType - The trigger type to unregister
|
|
556
|
+
*
|
|
557
|
+
* @example
|
|
558
|
+
* ```typescript
|
|
559
|
+
* iii.unregisterTriggerType({ id: 'cron', description: 'Fires on a cron schedule' })
|
|
560
|
+
* ```
|
|
561
|
+
*/
|
|
562
|
+
unregisterTriggerType(triggerType: RegisterTriggerTypeInput): void;
|
|
563
|
+
/**
|
|
564
|
+
* Creates a streaming channel pair for worker-to-worker data transfer.
|
|
565
|
+
* Returns a Channel with a local writer/reader and serializable refs that
|
|
566
|
+
* can be passed as fields in the invocation data to other functions.
|
|
567
|
+
*
|
|
568
|
+
* @param bufferSize - Optional buffer size for the channel (default: 64)
|
|
569
|
+
* @returns A Channel with writer, reader, and their serializable refs
|
|
570
|
+
*
|
|
571
|
+
* @example
|
|
572
|
+
* ```typescript
|
|
573
|
+
* const channel = await iii.createChannel()
|
|
574
|
+
*
|
|
575
|
+
* // Pass the writer ref to another function
|
|
576
|
+
* await iii.trigger({
|
|
577
|
+
* function_id: 'stream-producer',
|
|
578
|
+
* payload: { outputChannel: channel.writerRef },
|
|
579
|
+
* })
|
|
580
|
+
*
|
|
581
|
+
* // Read data locally
|
|
582
|
+
* channel.reader.onMessage((msg) => {
|
|
583
|
+
* console.log('Received:', msg)
|
|
584
|
+
* })
|
|
585
|
+
* ```
|
|
586
|
+
*/
|
|
587
|
+
createChannel(bufferSize?: number): Promise<Channel>;
|
|
588
|
+
/**
|
|
589
|
+
* Creates a new stream implementation.
|
|
590
|
+
*
|
|
591
|
+
* This overrides the default stream implementation.
|
|
592
|
+
*
|
|
593
|
+
* @param streamName - The name of the stream
|
|
594
|
+
* @param stream - The stream implementation
|
|
595
|
+
*
|
|
596
|
+
* @example
|
|
597
|
+
* ```typescript
|
|
598
|
+
* iii.createStream('sessions', {
|
|
599
|
+
* async get({ group_id, item_id }) { return null },
|
|
600
|
+
* async set({ group_id, item_id, data }) { return { new_value: data } },
|
|
601
|
+
* async delete({ group_id, item_id }) { return {} },
|
|
602
|
+
* async list({ group_id }) { return [] },
|
|
603
|
+
* async listGroups() { return [] },
|
|
604
|
+
* async update() { return null },
|
|
605
|
+
* })
|
|
606
|
+
* ```
|
|
607
|
+
*/
|
|
608
|
+
createStream<TData>(streamName: string, stream: IStream<TData>): void;
|
|
609
|
+
/**
|
|
610
|
+
* Registers a callback to receive the current functions list
|
|
611
|
+
* when the engine announces changes.
|
|
612
|
+
*
|
|
613
|
+
* @example
|
|
614
|
+
* ```typescript
|
|
615
|
+
* const unsubscribe = iii.onFunctionsAvailable((functions) => {
|
|
616
|
+
* console.log(`${functions.length} functions available:`)
|
|
617
|
+
* for (const fn of functions) {
|
|
618
|
+
* console.log(` - ${fn.function_id}`)
|
|
619
|
+
* }
|
|
620
|
+
* })
|
|
621
|
+
*
|
|
622
|
+
* // Later, stop listening
|
|
623
|
+
* unsubscribe()
|
|
624
|
+
* ```
|
|
625
|
+
*/
|
|
626
|
+
onFunctionsAvailable(callback: FunctionsAvailableCallback): () => void;
|
|
627
|
+
/**
|
|
628
|
+
* Gracefully shutdown the iii, cleaning up all resources.
|
|
629
|
+
*
|
|
630
|
+
* @example
|
|
631
|
+
* ```typescript
|
|
632
|
+
* await iii.shutdown()
|
|
633
|
+
* ```
|
|
634
|
+
*/
|
|
635
|
+
shutdown(): Promise<void>;
|
|
636
|
+
}
|
|
637
|
+
/**
|
|
638
|
+
* Handle returned by {@link ISdk.registerTrigger}. Use `unregister()` to
|
|
639
|
+
* remove the trigger from the engine.
|
|
640
|
+
*/
|
|
641
|
+
type Trigger = {
|
|
642
|
+
/** Removes this trigger from the engine. */unregister(): void;
|
|
643
|
+
};
|
|
644
|
+
/**
|
|
645
|
+
* Handle returned by {@link ISdk.registerFunction}. Contains the function's
|
|
646
|
+
* `id` and an `unregister()` method.
|
|
647
|
+
*/
|
|
648
|
+
type FunctionRef = {
|
|
649
|
+
/** The unique function identifier. */id: string; /** Removes this function from the engine. */
|
|
650
|
+
unregister: () => void;
|
|
651
|
+
};
|
|
652
|
+
/**
|
|
653
|
+
* Typed handle returned by {@link ISdk.registerTriggerType}.
|
|
654
|
+
*
|
|
655
|
+
* Provides convenience methods to register triggers and functions scoped
|
|
656
|
+
* to this trigger type, so callers don't need to repeat the `type` field.
|
|
657
|
+
*
|
|
658
|
+
* @typeParam TConfig - Trigger-specific configuration type.
|
|
659
|
+
*
|
|
660
|
+
* @example
|
|
661
|
+
* ```typescript
|
|
662
|
+
* type CronConfig = { schedule: string }
|
|
663
|
+
*
|
|
664
|
+
* const cron = iii.registerTriggerType<CronConfig>(
|
|
665
|
+
* { id: 'cron', description: 'Fires on a cron schedule' },
|
|
666
|
+
* cronHandler,
|
|
667
|
+
* )
|
|
668
|
+
*
|
|
669
|
+
* // Register a trigger -- type is inferred as CronConfig
|
|
670
|
+
* cron.registerTrigger('my-fn', { schedule: '* * * * *' })
|
|
671
|
+
*
|
|
672
|
+
* // Register a function and bind a trigger in one call
|
|
673
|
+
* cron.registerFunction(
|
|
674
|
+
* { id: 'my-fn', description: 'Cron-triggered function' },
|
|
675
|
+
* async (data) => { return { ok: true } },
|
|
676
|
+
* { schedule: '* * * * *' },
|
|
677
|
+
* )
|
|
678
|
+
* ```
|
|
679
|
+
*/
|
|
680
|
+
type TriggerTypeRef<TConfig = unknown> = {
|
|
681
|
+
/** The trigger type identifier. */id: string;
|
|
682
|
+
/**
|
|
683
|
+
* Register a trigger bound to this trigger type.
|
|
684
|
+
*
|
|
685
|
+
* @param functionId - The function to invoke when the trigger fires.
|
|
686
|
+
* @param config - Trigger-specific configuration.
|
|
687
|
+
* @returns A {@link Trigger} handle with an `unregister()` method.
|
|
688
|
+
*/
|
|
689
|
+
registerTrigger(functionId: string, config: TConfig): Trigger;
|
|
690
|
+
/**
|
|
691
|
+
* Register a function and immediately bind it to this trigger type.
|
|
692
|
+
*
|
|
693
|
+
* @param func - Function registration input.
|
|
694
|
+
* @param handler - Local function handler.
|
|
695
|
+
* @param config - Trigger-specific configuration.
|
|
696
|
+
* @returns A {@link FunctionRef} handle.
|
|
697
|
+
*/
|
|
698
|
+
registerFunction(func: RegisterFunctionInput, handler: RemoteFunctionHandler, config: TConfig): FunctionRef;
|
|
699
|
+
/**
|
|
700
|
+
* Unregister this trigger type from the engine.
|
|
701
|
+
*/
|
|
702
|
+
unregister(): void;
|
|
703
|
+
};
|
|
704
|
+
/**
|
|
705
|
+
* A streaming channel pair for worker-to-worker data transfer. Created via
|
|
706
|
+
* {@link ISdk.createChannel}.
|
|
707
|
+
*/
|
|
708
|
+
type Channel = {
|
|
709
|
+
/** Writer end of the channel. */writer: ChannelWriter; /** Reader end of the channel. */
|
|
710
|
+
reader: ChannelReader; /** Serializable reference to the writer (can be sent to other workers). */
|
|
711
|
+
writerRef: StreamChannelRef; /** Serializable reference to the reader (can be sent to other workers). */
|
|
712
|
+
readerRef: StreamChannelRef;
|
|
713
|
+
};
|
|
714
|
+
/**
|
|
715
|
+
* Incoming HTTP request received by a function registered with an HTTP trigger.
|
|
716
|
+
*
|
|
717
|
+
* @typeParam TBody - Type of the parsed request body.
|
|
718
|
+
*/
|
|
719
|
+
type ApiRequest<TBody = unknown> = {
|
|
720
|
+
path_params: Record<string, string>;
|
|
721
|
+
query_params: Record<string, string | string[]>;
|
|
722
|
+
body: TBody;
|
|
723
|
+
headers: Record<string, string | string[]>;
|
|
724
|
+
method: string;
|
|
725
|
+
};
|
|
726
|
+
/**
|
|
727
|
+
* Structured API response returned from HTTP function handlers.
|
|
728
|
+
*
|
|
729
|
+
* @typeParam TStatus - HTTP status code literal type.
|
|
730
|
+
* @typeParam TBody - Type of the response body.
|
|
731
|
+
*
|
|
732
|
+
* @example
|
|
733
|
+
* ```typescript
|
|
734
|
+
* const response: ApiResponse = {
|
|
735
|
+
* status_code: 200,
|
|
736
|
+
* headers: { 'content-type': 'application/json' },
|
|
737
|
+
* body: { message: 'ok' },
|
|
738
|
+
* }
|
|
739
|
+
* ```
|
|
740
|
+
*/
|
|
741
|
+
type ApiResponse<TStatus extends number = number, TBody = string | Record<string, unknown>> = {
|
|
742
|
+
/** HTTP status code. */status_code: TStatus; /** Response headers. */
|
|
743
|
+
headers?: Record<string, string>; /** Response body. */
|
|
744
|
+
body?: TBody;
|
|
745
|
+
};
|
|
746
|
+
//#endregion
|
|
747
|
+
//#region src/iii.d.ts
|
|
748
|
+
/** @internal */
|
|
749
|
+
type TelemetryOptions = {
|
|
750
|
+
language?: string;
|
|
751
|
+
project_name?: string;
|
|
752
|
+
framework?: string;
|
|
753
|
+
amplitude_api_key?: string;
|
|
754
|
+
};
|
|
755
|
+
/**
|
|
756
|
+
* Configuration options passed to {@link registerWorker}.
|
|
757
|
+
*
|
|
758
|
+
* @example
|
|
759
|
+
* ```typescript
|
|
760
|
+
* const iii = registerWorker('ws://localhost:49135', {
|
|
761
|
+
* workerName: 'my-browser-worker',
|
|
762
|
+
* invocationTimeoutMs: 10000,
|
|
763
|
+
* reconnectionConfig: { maxRetries: 5 },
|
|
764
|
+
* })
|
|
765
|
+
* ```
|
|
766
|
+
*/
|
|
767
|
+
type InitOptions = {
|
|
768
|
+
/** Display name for this worker. Defaults to `browser:<random-id>`. */workerName?: string; /** Default timeout for `trigger()` in milliseconds. Defaults to `30000`. */
|
|
769
|
+
invocationTimeoutMs?: number;
|
|
770
|
+
/**
|
|
771
|
+
* WebSocket reconnection behavior.
|
|
772
|
+
*
|
|
773
|
+
* @see {@link IIIReconnectionConfig} for available fields and defaults.
|
|
774
|
+
*/
|
|
775
|
+
reconnectionConfig?: Partial<IIIReconnectionConfig>; /** Custom headers are not supported by browser WebSocket. Use query parameters or cookies for auth. */
|
|
776
|
+
headers?: Record<string, string>; /** @internal */
|
|
777
|
+
telemetry?: TelemetryOptions;
|
|
778
|
+
};
|
|
779
|
+
/**
|
|
780
|
+
* Factory object that constructs routing actions for {@link ISdk.trigger}.
|
|
781
|
+
*
|
|
782
|
+
* @example
|
|
783
|
+
* ```typescript
|
|
784
|
+
* import { TriggerAction } from 'iii-browser-sdk'
|
|
785
|
+
*
|
|
786
|
+
* // Enqueue to a named queue
|
|
787
|
+
* iii.trigger({
|
|
788
|
+
* function_id: 'process',
|
|
789
|
+
* payload: { data: 'hello' },
|
|
790
|
+
* action: TriggerAction.Enqueue({ queue: 'jobs' }),
|
|
791
|
+
* })
|
|
792
|
+
*
|
|
793
|
+
* // Fire-and-forget
|
|
794
|
+
* iii.trigger({
|
|
795
|
+
* function_id: 'notify',
|
|
796
|
+
* payload: {},
|
|
797
|
+
* action: TriggerAction.Void(),
|
|
798
|
+
* })
|
|
799
|
+
* ```
|
|
800
|
+
*/
|
|
801
|
+
declare const TriggerAction: {
|
|
802
|
+
/**
|
|
803
|
+
* Routes the invocation through a named queue. The engine enqueues the job,
|
|
804
|
+
* acknowledges the caller with `{ messageReceiptId }`, and processes it
|
|
805
|
+
* asynchronously.
|
|
806
|
+
*
|
|
807
|
+
* @param opts - Queue routing options.
|
|
808
|
+
* @param opts.queue - Name of the target queue.
|
|
809
|
+
*/
|
|
810
|
+
readonly Enqueue: (opts: {
|
|
811
|
+
queue: string;
|
|
812
|
+
}) => TriggerAction$1;
|
|
813
|
+
/**
|
|
814
|
+
* Fire-and-forget routing. The engine forwards the invocation without
|
|
815
|
+
* waiting for a response or queuing the job.
|
|
816
|
+
*/
|
|
817
|
+
readonly Void: () => TriggerAction$1;
|
|
818
|
+
};
|
|
819
|
+
/**
|
|
820
|
+
* Creates and returns a connected SDK instance. The WebSocket connection is
|
|
821
|
+
* established automatically -- there is no separate `connect()` call.
|
|
822
|
+
*
|
|
823
|
+
* @param address - WebSocket URL of the III engine (e.g. `ws://localhost:49135`).
|
|
824
|
+
* @param options - Optional {@link InitOptions} for worker name, timeouts, and reconnection.
|
|
825
|
+
* @returns A connected {@link ISdk} instance.
|
|
826
|
+
*
|
|
827
|
+
* @example
|
|
828
|
+
* ```typescript
|
|
829
|
+
* import { registerWorker } from 'iii-browser-sdk'
|
|
830
|
+
*
|
|
831
|
+
* const iii = registerWorker('ws://localhost:49135', {
|
|
832
|
+
* workerName: 'my-browser-worker',
|
|
833
|
+
* })
|
|
834
|
+
* ```
|
|
835
|
+
*/
|
|
836
|
+
declare const registerWorker: (address: string, options?: InitOptions) => ISdk;
|
|
837
|
+
//#endregion
|
|
838
|
+
export { type ApiRequest, type ApiResponse, type AuthInput, type AuthResult, type Channel, ChannelReader, ChannelWriter, type EnqueueResult, type FunctionRef, type HttpAuthConfig, type HttpInvocationConfig, type ISdk, type InitOptions, type MessageType, type MiddlewareFunctionInput, type OnFunctionRegistrationInput, type OnTriggerRegistrationInput, type OnTriggerTypeRegistrationInput, type RegisterFunctionInput, type RegisterFunctionMessage, type RegisterServiceInput, type RegisterTriggerInput, type RegisterTriggerMessage, type RegisterTriggerTypeInput, type RegisterTriggerTypeMessage, type RemoteFunctionHandler, type StreamChannelRef, type Trigger, TriggerAction, type TriggerAction$1 as TriggerActionType, type TriggerConfig, type TriggerHandler, type TriggerInfo, type TriggerRequest, type TriggerTypeInfo, type TriggerTypeRef, registerWorker };
|
|
839
|
+
//# sourceMappingURL=index.d.cts.map
|