@rivetkit/rivetkit-wasm 0.0.0-main.879b6a2 → 0.0.0-main.b2d3b94

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.
@@ -203,42 +203,10 @@ function debugString(val) {
203
203
  return className;
204
204
  }
205
205
 
206
- function passArray8ToWasm0(arg, malloc) {
207
- const ptr = malloc(arg.length * 1, 1) >>> 0;
208
- getUint8ArrayMemory0().set(arg, ptr / 1);
209
- WASM_VECTOR_LEN = arg.length;
210
- return ptr;
211
- }
212
-
213
- function takeFromExternrefTable0(idx) {
214
- const value = wasm.__wbindgen_export_4.get(idx);
215
- wasm.__externref_table_dealloc(idx);
216
- return value;
217
- }
218
-
219
- function _assertClass(instance, klass) {
220
- if (!(instance instanceof klass)) {
221
- throw new Error(`expected instance of ${klass.name}`);
222
- }
223
- }
224
-
225
206
  export function start() {
226
207
  wasm.start();
227
208
  }
228
209
 
229
- /**
230
- * @param {Uint8Array} bytes
231
- * @returns {Uint8Array}
232
- */
233
- export function roundTripBytes(bytes) {
234
- const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
235
- const len0 = WASM_VECTOR_LEN;
236
- const ret = wasm.roundTripBytes(ptr0, len0);
237
- var v2 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
238
- wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
239
- return v2;
240
- }
241
-
242
210
  /**
243
211
  * @returns {string}
244
212
  */
@@ -255,6 +223,25 @@ export function bridgeRivetErrorPrefix() {
255
223
  }
256
224
  }
257
225
 
226
+ function passArray8ToWasm0(arg, malloc) {
227
+ const ptr = malloc(arg.length * 1, 1) >>> 0;
228
+ getUint8ArrayMemory0().set(arg, ptr / 1);
229
+ WASM_VECTOR_LEN = arg.length;
230
+ return ptr;
231
+ }
232
+ /**
233
+ * @param {Uint8Array} bytes
234
+ * @returns {Uint8Array}
235
+ */
236
+ export function roundTripBytes(bytes) {
237
+ const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
238
+ const len0 = WASM_VECTOR_LEN;
239
+ const ret = wasm.roundTripBytes(ptr0, len0);
240
+ var v2 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
241
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
242
+ return v2;
243
+ }
244
+
258
245
  /**
259
246
  * @param {Uint8Array} bytes
260
247
  * @returns {Uint8Array}
@@ -275,16 +262,27 @@ export function awaitPromise(promise) {
275
262
  return ret;
276
263
  }
277
264
 
278
- function __wbg_adapter_46(arg0, arg1, arg2) {
279
- wasm.closure1598_externref_shim(arg0, arg1, arg2);
265
+ function _assertClass(instance, klass) {
266
+ if (!(instance instanceof klass)) {
267
+ throw new Error(`expected instance of ${klass.name}`);
268
+ }
269
+ }
270
+
271
+ function takeFromExternrefTable0(idx) {
272
+ const value = wasm.__wbindgen_export_4.get(idx);
273
+ wasm.__externref_table_dealloc(idx);
274
+ return value;
275
+ }
276
+ function __wbg_adapter_50(arg0, arg1, arg2) {
277
+ wasm.closure1987_externref_shim(arg0, arg1, arg2);
280
278
  }
281
279
 
282
- function __wbg_adapter_55(arg0, arg1, arg2) {
283
- wasm.closure1950_externref_shim(arg0, arg1, arg2);
280
+ function __wbg_adapter_59(arg0, arg1, arg2) {
281
+ wasm.closure2385_externref_shim(arg0, arg1, arg2);
284
282
  }
285
283
 
286
- function __wbg_adapter_268(arg0, arg1, arg2, arg3) {
287
- wasm.closure2181_externref_shim(arg0, arg1, arg2, arg3);
284
+ function __wbg_adapter_297(arg0, arg1, arg2, arg3) {
285
+ wasm.closure2620_externref_shim(arg0, arg1, arg2, arg3);
288
286
  }
289
287
 
290
288
  const __wbindgen_enum_BinaryType = ["blob", "arraybuffer"];
@@ -314,12 +312,6 @@ export class ActorContext {
314
312
  const ptr = this.__destroy_into_raw();
315
313
  wasm.__wbg_actorcontext_free(ptr, 0);
316
314
  }
317
- /**
318
- * @param {Promise<any>} promise
319
- */
320
- keepAwake(promise) {
321
- wasm.actorcontext_keepAwake(this.__wbg_ptr, promise);
322
- }
323
315
  /**
324
316
  * @param {any} payload
325
317
  * @returns {Promise<void>}
@@ -328,6 +320,79 @@ export class ActorContext {
328
320
  const ret = wasm.actorcontext_saveState(this.__wbg_ptr, payload);
329
321
  return ret;
330
322
  }
323
+ /**
324
+ * @param {Uint8Array} params
325
+ * @param {any} request
326
+ * @returns {Promise<ConnHandle>}
327
+ */
328
+ connectConn(params, request) {
329
+ const ptr0 = passArray8ToWasm0(params, wasm.__wbindgen_malloc);
330
+ const len0 = WASM_VECTOR_LEN;
331
+ const ret = wasm.actorcontext_connectConn(this.__wbg_ptr, ptr0, len0, request);
332
+ return ret;
333
+ }
334
+ /**
335
+ * @param {number | null} [timestamp_ms]
336
+ * @returns {Promise<void>}
337
+ */
338
+ setRunWakeAt(timestamp_ms) {
339
+ const ret = wasm.actorcontext_setRunWakeAt(this.__wbg_ptr, !isLikeNone(timestamp_ms), isLikeNone(timestamp_ms) ? 0 : timestamp_ms);
340
+ return ret;
341
+ }
342
+ /**
343
+ * @param {any} opts
344
+ * @returns {Promise<void>}
345
+ */
346
+ requestSaveAndWait(opts) {
347
+ const ret = wasm.actorcontext_requestSaveAndWait(this.__wbg_ptr, opts);
348
+ return ret;
349
+ }
350
+ /**
351
+ * @param {string | null} [bearer_token]
352
+ * @returns {Promise<void>}
353
+ */
354
+ verifyInspectorAuth(bearer_token) {
355
+ var ptr0 = isLikeNone(bearer_token) ? 0 : passStringToWasm0(bearer_token, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
356
+ var len0 = WASM_VECTOR_LEN;
357
+ const ret = wasm.actorcontext_verifyInspectorAuth(this.__wbg_ptr, ptr0, len0);
358
+ return ret;
359
+ }
360
+ /**
361
+ * @param {number | null} [timeout_ms]
362
+ * @returns {Promise<ActorStateTransaction>}
363
+ */
364
+ beginStateTransaction(timeout_ms) {
365
+ const ret = wasm.actorcontext_beginStateTransaction(this.__wbg_ptr, !isLikeNone(timeout_ms), isLikeNone(timeout_ms) ? 0 : timeout_ms);
366
+ return ret;
367
+ }
368
+ /**
369
+ * @param {any} writes
370
+ * @returns {Promise<void>}
371
+ */
372
+ saveStateAndWorkflowBatch(writes) {
373
+ const ret = wasm.actorcontext_saveStateAndWorkflowBatch(this.__wbg_ptr, writes);
374
+ return ret;
375
+ }
376
+ /**
377
+ * @returns {Promise<boolean>}
378
+ */
379
+ waitForTrackedShutdownWork() {
380
+ const ret = wasm.actorcontext_waitForTrackedShutdownWork(this.__wbg_ptr);
381
+ return ret;
382
+ }
383
+ /**
384
+ * @returns {Promise<void>}
385
+ */
386
+ waitForTrackedShutdownWorkUnbounded() {
387
+ const ret = wasm.actorcontext_waitForTrackedShutdownWorkUnbounded(this.__wbg_ptr);
388
+ return ret;
389
+ }
390
+ /**
391
+ * @param {Promise<any>} promise
392
+ */
393
+ keepAwake(promise) {
394
+ wasm.actorcontext_keepAwake(this.__wbg_ptr, promise);
395
+ }
331
396
  /**
332
397
  * @param {Promise<any>} promise
333
398
  */
@@ -344,17 +409,6 @@ export class ActorContext {
344
409
  }
345
410
  return takeFromExternrefTable0(ret[0]);
346
411
  }
347
- /**
348
- * @param {Uint8Array} params
349
- * @param {any} request
350
- * @returns {Promise<ConnHandle>}
351
- */
352
- connectConn(params, request) {
353
- const ptr0 = passArray8ToWasm0(params, wasm.__wbindgen_malloc);
354
- const len0 = WASM_VECTOR_LEN;
355
- const ret = wasm.actorcontext_connectConn(this.__wbg_ptr, ptr0, len0, request);
356
- return ret;
357
- }
358
412
  /**
359
413
  * @param {any} opts
360
414
  */
@@ -401,29 +455,14 @@ export class ActorContext {
401
455
  wasm.actorcontext_endOnStateChange(this.__wbg_ptr);
402
456
  }
403
457
  restartRunHandler() {
404
- wasm.actorcontext_restartRunHandler(this.__wbg_ptr);
458
+ const ret = wasm.actorcontext_restartRunHandler(this.__wbg_ptr);
459
+ if (ret[1]) {
460
+ throw takeFromExternrefTable0(ret[0]);
461
+ }
405
462
  }
406
463
  beginOnStateChange() {
407
464
  wasm.actorcontext_beginOnStateChange(this.__wbg_ptr);
408
465
  }
409
- /**
410
- * @param {any} opts
411
- * @returns {Promise<void>}
412
- */
413
- requestSaveAndWait(opts) {
414
- const ret = wasm.actorcontext_requestSaveAndWait(this.__wbg_ptr, opts);
415
- return ret;
416
- }
417
- /**
418
- * @param {string | null} [bearer_token]
419
- * @returns {Promise<void>}
420
- */
421
- verifyInspectorAuth(bearer_token) {
422
- var ptr0 = isLikeNone(bearer_token) ? 0 : passStringToWasm0(bearer_token, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
423
- var len0 = WASM_VECTOR_LEN;
424
- const ret = wasm.actorcontext_verifyInspectorAuth(this.__wbg_ptr, ptr0, len0);
425
- return ret;
426
- }
427
466
  /**
428
467
  * @param {number} region_id
429
468
  */
@@ -451,13 +490,6 @@ export class ActorContext {
451
490
  const ret = wasm.actorcontext_kv(this.__wbg_ptr);
452
491
  return Kv.__wrap(ret);
453
492
  }
454
- /**
455
- * @returns {Promise<boolean>}
456
- */
457
- waitForTrackedShutdownWork() {
458
- const ret = wasm.actorcontext_waitForTrackedShutdownWork(this.__wbg_ptr);
459
- return ret;
460
- }
461
493
  /**
462
494
  * @returns {Array<any>}
463
495
  */
@@ -491,13 +523,6 @@ export class ActorContext {
491
523
  const ret = wasm.actorcontext_sql(this.__wbg_ptr);
492
524
  return SqliteDb.__wrap(ret);
493
525
  }
494
- /**
495
- * @returns {Promise<void>}
496
- */
497
- waitForTrackedShutdownWorkUnbounded() {
498
- const ret = wasm.actorcontext_waitForTrackedShutdownWorkUnbounded(this.__wbg_ptr);
499
- return ret;
500
- }
501
526
  /**
502
527
  * @returns {string}
503
528
  */
@@ -639,12 +664,73 @@ export class ActorFactory {
639
664
  }
640
665
  }
641
666
 
667
+ const ActorStateTransactionFinalization = (typeof FinalizationRegistry === 'undefined')
668
+ ? { register: () => {}, unregister: () => {} }
669
+ : new FinalizationRegistry(ptr => wasm.__wbg_actorstatetransaction_free(ptr >>> 0, 1));
670
+
671
+ export class ActorStateTransaction {
672
+
673
+ static __wrap(ptr) {
674
+ ptr = ptr >>> 0;
675
+ const obj = Object.create(ActorStateTransaction.prototype);
676
+ obj.__wbg_ptr = ptr;
677
+ ActorStateTransactionFinalization.register(obj, obj.__wbg_ptr, obj);
678
+ return obj;
679
+ }
680
+
681
+ __destroy_into_raw() {
682
+ const ptr = this.__wbg_ptr;
683
+ this.__wbg_ptr = 0;
684
+ ActorStateTransactionFinalization.unregister(this);
685
+ return ptr;
686
+ }
687
+
688
+ free() {
689
+ const ptr = this.__destroy_into_raw();
690
+ wasm.__wbg_actorstatetransaction_free(ptr, 0);
691
+ }
692
+ /**
693
+ * @param {any} payload
694
+ * @returns {Promise<void>}
695
+ */
696
+ commit(payload) {
697
+ const ret = wasm.actorstatetransaction_commit(this.__wbg_ptr, payload);
698
+ return ret;
699
+ }
700
+ /**
701
+ * @param {string} sql
702
+ * @param {any} params
703
+ * @returns {Promise<any>}
704
+ */
705
+ execute(sql, params) {
706
+ const ptr0 = passStringToWasm0(sql, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
707
+ const len0 = WASM_VECTOR_LEN;
708
+ const ret = wasm.actorstatetransaction_execute(this.__wbg_ptr, ptr0, len0, params);
709
+ return ret;
710
+ }
711
+ /**
712
+ * @returns {Promise<void>}
713
+ */
714
+ rollback() {
715
+ const ret = wasm.actorstatetransaction_rollback(this.__wbg_ptr);
716
+ return ret;
717
+ }
718
+ }
719
+
642
720
  const CancellationTokenFinalization = (typeof FinalizationRegistry === 'undefined')
643
721
  ? { register: () => {}, unregister: () => {} }
644
722
  : new FinalizationRegistry(ptr => wasm.__wbg_cancellationtoken_free(ptr >>> 0, 1));
645
723
 
646
724
  export class CancellationToken {
647
725
 
726
+ static __wrap(ptr) {
727
+ ptr = ptr >>> 0;
728
+ const obj = Object.create(CancellationToken.prototype);
729
+ obj.__wbg_ptr = ptr;
730
+ CancellationTokenFinalization.register(obj, obj.__wbg_ptr, obj);
731
+ return obj;
732
+ }
733
+
648
734
  __destroy_into_raw() {
649
735
  const ptr = this.__wbg_ptr;
650
736
  this.__wbg_ptr = 0;
@@ -805,12 +891,6 @@ export class CoreRegistry {
805
891
  const ret = wasm.coreregistry_handleServerlessRequest(this.__wbg_ptr, req, on_stream_event, cancel_token.__wbg_ptr, config);
806
892
  return ret;
807
893
  }
808
- constructor() {
809
- const ret = wasm.coreregistry_new();
810
- this.__wbg_ptr = ret >>> 0;
811
- CoreRegistryFinalization.register(this, this.__wbg_ptr, this);
812
- return this;
813
- }
814
894
  /**
815
895
  * @param {any} config
816
896
  * @returns {Promise<void>}
@@ -819,6 +899,19 @@ export class CoreRegistry {
819
899
  const ret = wasm.coreregistry_serve(this.__wbg_ptr, config);
820
900
  return ret;
821
901
  }
902
+ /**
903
+ * @returns {Promise<void>}
904
+ */
905
+ shutdown() {
906
+ const ret = wasm.coreregistry_shutdown(this.__wbg_ptr);
907
+ return ret;
908
+ }
909
+ constructor() {
910
+ const ret = wasm.coreregistry_new();
911
+ this.__wbg_ptr = ret >>> 0;
912
+ CoreRegistryFinalization.register(this, this.__wbg_ptr, this);
913
+ return this;
914
+ }
822
915
  /**
823
916
  * @param {string} name
824
917
  * @param {ActorFactory} factory
@@ -832,13 +925,6 @@ export class CoreRegistry {
832
925
  throw takeFromExternrefTable0(ret[0]);
833
926
  }
834
927
  }
835
- /**
836
- * @returns {Promise<void>}
837
- */
838
- shutdown() {
839
- const ret = wasm.coreregistry_shutdown(this.__wbg_ptr);
840
- return ret;
841
- }
842
928
  }
843
929
 
844
930
  const KvFinalization = (typeof FinalizationRegistry === 'undefined')
@@ -1002,17 +1088,6 @@ export class Queue {
1002
1088
  const ret = wasm.queue_nextBatch(this.__wbg_ptr, options, ptr0);
1003
1089
  return ret;
1004
1090
  }
1005
- /**
1006
- * @param {any} options
1007
- * @returns {Array<any>}
1008
- */
1009
- tryNextBatch(options) {
1010
- const ret = wasm.queue_tryNextBatch(this.__wbg_ptr, options);
1011
- if (ret[2]) {
1012
- throw takeFromExternrefTable0(ret[1]);
1013
- }
1014
- return takeFromExternrefTable0(ret[0]);
1015
- }
1016
1091
  /**
1017
1092
  * @param {any} names
1018
1093
  * @param {any} options
@@ -1055,6 +1130,20 @@ export class Queue {
1055
1130
  const ret = wasm.queue_inspectMessages(this.__wbg_ptr);
1056
1131
  return ret;
1057
1132
  }
1133
+ /**
1134
+ * @param {bigint} message_id
1135
+ * @param {string} expected_name
1136
+ * @param {Uint8Array | null} [response]
1137
+ * @returns {Promise<boolean>}
1138
+ */
1139
+ completePersisted(message_id, expected_name, response) {
1140
+ const ptr0 = passStringToWasm0(expected_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1141
+ const len0 = WASM_VECTOR_LEN;
1142
+ var ptr1 = isLikeNone(response) ? 0 : passArray8ToWasm0(response, wasm.__wbindgen_malloc);
1143
+ var len1 = WASM_VECTOR_LEN;
1144
+ const ret = wasm.queue_completePersisted(this.__wbg_ptr, message_id, ptr0, len0, ptr1, len1);
1145
+ return ret;
1146
+ }
1058
1147
  /**
1059
1148
  * @param {any} names
1060
1149
  * @param {any} options
@@ -1077,6 +1166,24 @@ export class Queue {
1077
1166
  const ret = wasm.queue_send(this.__wbg_ptr, ptr0, len0, ptr1, len1);
1078
1167
  return ret;
1079
1168
  }
1169
+ /**
1170
+ * @returns {Promise<void>}
1171
+ */
1172
+ reset() {
1173
+ const ret = wasm.queue_reset(this.__wbg_ptr);
1174
+ return ret;
1175
+ }
1176
+ /**
1177
+ * @param {any} options
1178
+ * @returns {Array<any>}
1179
+ */
1180
+ tryNextBatch(options) {
1181
+ const ret = wasm.queue_tryNextBatch(this.__wbg_ptr, options);
1182
+ if (ret[2]) {
1183
+ throw takeFromExternrefTable0(ret[1]);
1184
+ }
1185
+ return takeFromExternrefTable0(ret[0]);
1186
+ }
1080
1187
  /**
1081
1188
  * @returns {number}
1082
1189
  */
@@ -1111,6 +1218,14 @@ export class QueueMessage {
1111
1218
  const ptr = this.__destroy_into_raw();
1112
1219
  wasm.__wbg_queuemessage_free(ptr, 0);
1113
1220
  }
1221
+ /**
1222
+ * @param {any} response
1223
+ * @returns {Promise<void>}
1224
+ */
1225
+ complete(response) {
1226
+ const ret = wasm.queuemessage_complete(this.__wbg_ptr, response);
1227
+ return ret;
1228
+ }
1114
1229
  /**
1115
1230
  * @returns {number}
1116
1231
  */
@@ -1156,14 +1271,6 @@ export class QueueMessage {
1156
1271
  wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
1157
1272
  }
1158
1273
  }
1159
- /**
1160
- * @param {any} response
1161
- * @returns {Promise<void>}
1162
- */
1163
- complete(response) {
1164
- const ret = wasm.queuemessage_complete(this.__wbg_ptr, response);
1165
- return ret;
1166
- }
1167
1274
  }
1168
1275
 
1169
1276
  const ScheduleFinalization = (typeof FinalizationRegistry === 'undefined')
@@ -1191,29 +1298,139 @@ export class Schedule {
1191
1298
  const ptr = this.__destroy_into_raw();
1192
1299
  wasm.__wbg_schedule_free(ptr, 0);
1193
1300
  }
1301
+ /**
1302
+ * @param {string} name
1303
+ * @param {number} interval_ms
1304
+ * @param {string} action_name
1305
+ * @param {Uint8Array} args
1306
+ * @param {number | null} [max_history]
1307
+ * @returns {Promise<void>}
1308
+ */
1309
+ cronEvery(name, interval_ms, action_name, args, max_history) {
1310
+ const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1311
+ const len0 = WASM_VECTOR_LEN;
1312
+ const ptr1 = passStringToWasm0(action_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1313
+ const len1 = WASM_VECTOR_LEN;
1314
+ const ptr2 = passArray8ToWasm0(args, wasm.__wbindgen_malloc);
1315
+ const len2 = WASM_VECTOR_LEN;
1316
+ const ret = wasm.schedule_cronEvery(this.__wbg_ptr, ptr0, len0, interval_ms, ptr1, len1, ptr2, len2, !isLikeNone(max_history), isLikeNone(max_history) ? 0 : max_history);
1317
+ return ret;
1318
+ }
1319
+ /**
1320
+ * @param {string} name
1321
+ * @returns {Promise<boolean>}
1322
+ */
1323
+ cronDelete(name) {
1324
+ const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1325
+ const len0 = WASM_VECTOR_LEN;
1326
+ const ret = wasm.schedule_cronDelete(this.__wbg_ptr, ptr0, len0);
1327
+ return ret;
1328
+ }
1329
+ /**
1330
+ * @param {string} name
1331
+ * @param {number | null} [limit]
1332
+ * @returns {Promise<any>}
1333
+ */
1334
+ cronHistory(name, limit) {
1335
+ const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1336
+ const len0 = WASM_VECTOR_LEN;
1337
+ const ret = wasm.schedule_cronHistory(this.__wbg_ptr, ptr0, len0, !isLikeNone(limit), isLikeNone(limit) ? 0 : limit);
1338
+ return ret;
1339
+ }
1194
1340
  /**
1195
1341
  * @param {number} timestamp_ms
1196
1342
  * @param {string} action_name
1197
1343
  * @param {Uint8Array} args
1344
+ * @returns {Promise<string>}
1198
1345
  */
1199
1346
  at(timestamp_ms, action_name, args) {
1200
1347
  const ptr0 = passStringToWasm0(action_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1201
1348
  const len0 = WASM_VECTOR_LEN;
1202
1349
  const ptr1 = passArray8ToWasm0(args, wasm.__wbindgen_malloc);
1203
1350
  const len1 = WASM_VECTOR_LEN;
1204
- wasm.schedule_at(this.__wbg_ptr, timestamp_ms, ptr0, len0, ptr1, len1);
1351
+ const ret = wasm.schedule_at(this.__wbg_ptr, timestamp_ms, ptr0, len0, ptr1, len1);
1352
+ return ret;
1353
+ }
1354
+ /**
1355
+ * @param {string} id
1356
+ * @returns {Promise<any>}
1357
+ */
1358
+ get(id) {
1359
+ const ptr0 = passStringToWasm0(id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1360
+ const len0 = WASM_VECTOR_LEN;
1361
+ const ret = wasm.schedule_get(this.__wbg_ptr, ptr0, len0);
1362
+ return ret;
1363
+ }
1364
+ /**
1365
+ * @returns {Promise<any>}
1366
+ */
1367
+ list() {
1368
+ const ret = wasm.schedule_list(this.__wbg_ptr);
1369
+ return ret;
1205
1370
  }
1206
1371
  /**
1207
1372
  * @param {number} duration_ms
1208
1373
  * @param {string} action_name
1209
1374
  * @param {Uint8Array} args
1375
+ * @returns {Promise<string>}
1210
1376
  */
1211
1377
  after(duration_ms, action_name, args) {
1212
1378
  const ptr0 = passStringToWasm0(action_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1213
1379
  const len0 = WASM_VECTOR_LEN;
1214
1380
  const ptr1 = passArray8ToWasm0(args, wasm.__wbindgen_malloc);
1215
1381
  const len1 = WASM_VECTOR_LEN;
1216
- wasm.schedule_after(this.__wbg_ptr, duration_ms, ptr0, len0, ptr1, len1);
1382
+ const ret = wasm.schedule_after(this.__wbg_ptr, duration_ms, ptr0, len0, ptr1, len1);
1383
+ return ret;
1384
+ }
1385
+ /**
1386
+ * @param {string} id
1387
+ * @returns {Promise<boolean>}
1388
+ */
1389
+ cancel(id) {
1390
+ const ptr0 = passStringToWasm0(id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1391
+ const len0 = WASM_VECTOR_LEN;
1392
+ const ret = wasm.schedule_cancel(this.__wbg_ptr, ptr0, len0);
1393
+ return ret;
1394
+ }
1395
+ /**
1396
+ * @param {string} name
1397
+ * @returns {Promise<any>}
1398
+ */
1399
+ cronGet(name) {
1400
+ const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1401
+ const len0 = WASM_VECTOR_LEN;
1402
+ const ret = wasm.schedule_cronGet(this.__wbg_ptr, ptr0, len0);
1403
+ return ret;
1404
+ }
1405
+ /**
1406
+ * @param {string} name
1407
+ * @param {string} expression
1408
+ * @param {string | null | undefined} timezone
1409
+ * @param {string} action_name
1410
+ * @param {Uint8Array} args
1411
+ * @param {number | null} [max_history]
1412
+ * @returns {Promise<void>}
1413
+ */
1414
+ cronSet(name, expression, timezone, action_name, args, max_history) {
1415
+ const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1416
+ const len0 = WASM_VECTOR_LEN;
1417
+ const ptr1 = passStringToWasm0(expression, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1418
+ const len1 = WASM_VECTOR_LEN;
1419
+ var ptr2 = isLikeNone(timezone) ? 0 : passStringToWasm0(timezone, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1420
+ var len2 = WASM_VECTOR_LEN;
1421
+ const ptr3 = passStringToWasm0(action_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1422
+ const len3 = WASM_VECTOR_LEN;
1423
+ const ptr4 = passArray8ToWasm0(args, wasm.__wbindgen_malloc);
1424
+ const len4 = WASM_VECTOR_LEN;
1425
+ const ret = wasm.schedule_cronSet(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, ptr4, len4, !isLikeNone(max_history), isLikeNone(max_history) ? 0 : max_history);
1426
+ return ret;
1427
+ }
1428
+ /**
1429
+ * @returns {Promise<any>}
1430
+ */
1431
+ cronList() {
1432
+ const ret = wasm.schedule_cronList(this.__wbg_ptr);
1433
+ return ret;
1217
1434
  }
1218
1435
  }
1219
1436
 
@@ -1242,6 +1459,25 @@ export class SqliteDb {
1242
1459
  const ptr = this.__destroy_into_raw();
1243
1460
  wasm.__wbg_sqlitedb_free(ptr, 0);
1244
1461
  }
1462
+ /**
1463
+ * @param {any} statements
1464
+ * @returns {Promise<any>}
1465
+ */
1466
+ executeBatch(statements) {
1467
+ const ret = wasm.sqlitedb_executeBatch(this.__wbg_ptr, statements);
1468
+ return ret;
1469
+ }
1470
+ /**
1471
+ * @param {number | null} [timeout_ms]
1472
+ * @param {string | null} [name]
1473
+ * @returns {Promise<SqliteTransaction>}
1474
+ */
1475
+ beginTransaction(timeout_ms, name) {
1476
+ var ptr0 = isLikeNone(name) ? 0 : passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1477
+ var len0 = WASM_VECTOR_LEN;
1478
+ const ret = wasm.sqlitedb_beginTransaction(this.__wbg_ptr, !isLikeNone(timeout_ms), isLikeNone(timeout_ms) ? 0 : timeout_ms, ptr0, len0);
1479
+ return ret;
1480
+ }
1245
1481
  /**
1246
1482
  * @param {string} sql
1247
1483
  * @param {any} params
@@ -1294,6 +1530,68 @@ export class SqliteDb {
1294
1530
  }
1295
1531
  }
1296
1532
 
1533
+ const SqliteTransactionFinalization = (typeof FinalizationRegistry === 'undefined')
1534
+ ? { register: () => {}, unregister: () => {} }
1535
+ : new FinalizationRegistry(ptr => wasm.__wbg_sqlitetransaction_free(ptr >>> 0, 1));
1536
+
1537
+ export class SqliteTransaction {
1538
+
1539
+ static __wrap(ptr) {
1540
+ ptr = ptr >>> 0;
1541
+ const obj = Object.create(SqliteTransaction.prototype);
1542
+ obj.__wbg_ptr = ptr;
1543
+ SqliteTransactionFinalization.register(obj, obj.__wbg_ptr, obj);
1544
+ return obj;
1545
+ }
1546
+
1547
+ __destroy_into_raw() {
1548
+ const ptr = this.__wbg_ptr;
1549
+ this.__wbg_ptr = 0;
1550
+ SqliteTransactionFinalization.unregister(this);
1551
+ return ptr;
1552
+ }
1553
+
1554
+ free() {
1555
+ const ptr = this.__destroy_into_raw();
1556
+ wasm.__wbg_sqlitetransaction_free(ptr, 0);
1557
+ }
1558
+ /**
1559
+ * @param {string} sql
1560
+ * @returns {Promise<any>}
1561
+ */
1562
+ exec(sql) {
1563
+ const ptr0 = passStringToWasm0(sql, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1564
+ const len0 = WASM_VECTOR_LEN;
1565
+ const ret = wasm.sqlitetransaction_exec(this.__wbg_ptr, ptr0, len0);
1566
+ return ret;
1567
+ }
1568
+ /**
1569
+ * @returns {Promise<void>}
1570
+ */
1571
+ commit() {
1572
+ const ret = wasm.sqlitetransaction_commit(this.__wbg_ptr);
1573
+ return ret;
1574
+ }
1575
+ /**
1576
+ * @param {string} sql
1577
+ * @param {any} params
1578
+ * @returns {Promise<any>}
1579
+ */
1580
+ execute(sql, params) {
1581
+ const ptr0 = passStringToWasm0(sql, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1582
+ const len0 = WASM_VECTOR_LEN;
1583
+ const ret = wasm.sqlitetransaction_execute(this.__wbg_ptr, ptr0, len0, params);
1584
+ return ret;
1585
+ }
1586
+ /**
1587
+ * @returns {Promise<void>}
1588
+ */
1589
+ rollback() {
1590
+ const ret = wasm.sqlitetransaction_rollback(this.__wbg_ptr);
1591
+ return ret;
1592
+ }
1593
+ }
1594
+
1297
1595
  const WebSocketHandleFinalization = (typeof FinalizationRegistry === 'undefined')
1298
1596
  ? { register: () => {}, unregister: () => {} }
1299
1597
  : new FinalizationRegistry(ptr => wasm.__wbg_websockethandle_free(ptr >>> 0, 1));
@@ -1319,6 +1617,17 @@ export class WebSocketHandle {
1319
1617
  const ptr = this.__destroy_into_raw();
1320
1618
  wasm.__wbg_websockethandle_free(ptr, 0);
1321
1619
  }
1620
+ /**
1621
+ * @param {number | null} [code]
1622
+ * @param {string | null} [reason]
1623
+ * @returns {Promise<void>}
1624
+ */
1625
+ close(code, reason) {
1626
+ var ptr0 = isLikeNone(reason) ? 0 : passStringToWasm0(reason, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1627
+ var len0 = WASM_VECTOR_LEN;
1628
+ const ret = wasm.websockethandle_close(this.__wbg_ptr, isLikeNone(code) ? 0xFFFFFF : code, ptr0, len0);
1629
+ return ret;
1630
+ }
1322
1631
  /**
1323
1632
  * @param {Function} callback
1324
1633
  */
@@ -1337,17 +1646,6 @@ export class WebSocketHandle {
1337
1646
  throw takeFromExternrefTable0(ret[0]);
1338
1647
  }
1339
1648
  }
1340
- /**
1341
- * @param {number | null} [code]
1342
- * @param {string | null} [reason]
1343
- * @returns {Promise<void>}
1344
- */
1345
- close(code, reason) {
1346
- var ptr0 = isLikeNone(reason) ? 0 : passStringToWasm0(reason, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1347
- var len0 = WASM_VECTOR_LEN;
1348
- const ret = wasm.websockethandle_close(this.__wbg_ptr, isLikeNone(code) ? 0xFFFFFF : code, ptr0, len0);
1349
- return ret;
1350
- }
1351
1649
  }
1352
1650
 
1353
1651
  async function __wbg_load(module, imports) {
@@ -1395,6 +1693,10 @@ function __wbg_get_imports() {
1395
1693
  const ret = ActorContext.__wrap(arg0);
1396
1694
  return ret;
1397
1695
  };
1696
+ imports.wbg.__wbg_actorstatetransaction_new = function(arg0) {
1697
+ const ret = ActorStateTransaction.__wrap(arg0);
1698
+ return ret;
1699
+ };
1398
1700
  imports.wbg.__wbg_buffer_09165b52af8c5237 = function(arg0) {
1399
1701
  const ret = arg0.buffer;
1400
1702
  return ret;
@@ -1403,6 +1705,10 @@ function __wbg_get_imports() {
1403
1705
  const ret = arg0.buffer;
1404
1706
  return ret;
1405
1707
  };
1708
+ imports.wbg.__wbg_bufferedAmount_a482960ac51b25e8 = function(arg0) {
1709
+ const ret = arg0.bufferedAmount;
1710
+ return ret;
1711
+ };
1406
1712
  imports.wbg.__wbg_call_672a4d21634d4a24 = function() { return handleError(function (arg0, arg1) {
1407
1713
  const ret = arg0.call(arg1);
1408
1714
  return ret;
@@ -1415,6 +1721,10 @@ function __wbg_get_imports() {
1415
1721
  const ret = arg0.call(arg1, arg2, arg3);
1416
1722
  return ret;
1417
1723
  }, arguments) };
1724
+ imports.wbg.__wbg_cancellationtoken_new = function(arg0) {
1725
+ const ret = CancellationToken.__wrap(arg0);
1726
+ return ret;
1727
+ };
1418
1728
  imports.wbg.__wbg_close_2893b7d056a0627d = function() { return handleError(function (arg0) {
1419
1729
  arg0.close();
1420
1730
  }, arguments) };
@@ -1570,7 +1880,7 @@ function __wbg_get_imports() {
1570
1880
  const a = state0.a;
1571
1881
  state0.a = 0;
1572
1882
  try {
1573
- return __wbg_adapter_268(a, state0.b, arg0, arg1);
1883
+ return __wbg_adapter_297(a, state0.b, arg0, arg1);
1574
1884
  } finally {
1575
1885
  state0.a = a;
1576
1886
  }
@@ -1585,6 +1895,10 @@ function __wbg_get_imports() {
1585
1895
  const ret = new Object();
1586
1896
  return ret;
1587
1897
  };
1898
+ imports.wbg.__wbg_new_5e0be73521bc8c17 = function() {
1899
+ const ret = new Map();
1900
+ return ret;
1901
+ };
1588
1902
  imports.wbg.__wbg_new_78feb108b6472713 = function() {
1589
1903
  const ret = new Array();
1590
1904
  return ret;
@@ -1694,6 +2008,10 @@ function __wbg_get_imports() {
1694
2008
  imports.wbg.__wbg_set_65595bdd868b3009 = function(arg0, arg1, arg2) {
1695
2009
  arg0.set(arg1, arg2 >>> 0);
1696
2010
  };
2011
+ imports.wbg.__wbg_set_8fc6bf8a5b1071d1 = function(arg0, arg1, arg2) {
2012
+ const ret = arg0.set(arg1, arg2);
2013
+ return ret;
2014
+ };
1697
2015
  imports.wbg.__wbg_set_bb8cecf6a62b9f46 = function() { return handleError(function (arg0, arg1, arg2) {
1698
2016
  const ret = Reflect.set(arg0, arg1, arg2);
1699
2017
  return ret;
@@ -1713,6 +2031,10 @@ function __wbg_get_imports() {
1713
2031
  imports.wbg.__wbg_setonopen_2da654e1f39745d5 = function(arg0, arg1) {
1714
2032
  arg0.onopen = arg1;
1715
2033
  };
2034
+ imports.wbg.__wbg_sqlitetransaction_new = function(arg0) {
2035
+ const ret = SqliteTransaction.__wrap(arg0);
2036
+ return ret;
2037
+ };
1716
2038
  imports.wbg.__wbg_stack_0ed75d68575b0f3c = function(arg0, arg1) {
1717
2039
  const ret = arg1.stack;
1718
2040
  const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
@@ -1768,6 +2090,14 @@ function __wbg_get_imports() {
1768
2090
  const ret = +arg0;
1769
2091
  return ret;
1770
2092
  };
2093
+ imports.wbg.__wbindgen_bigint_from_i64 = function(arg0) {
2094
+ const ret = arg0;
2095
+ return ret;
2096
+ };
2097
+ imports.wbg.__wbindgen_bigint_from_u64 = function(arg0) {
2098
+ const ret = BigInt.asUintN(64, arg0);
2099
+ return ret;
2100
+ };
1771
2101
  imports.wbg.__wbindgen_boolean_get = function(arg0) {
1772
2102
  const v = arg0;
1773
2103
  const ret = typeof(v) === 'boolean' ? (v ? 1 : 0) : 2;
@@ -1782,24 +2112,24 @@ function __wbg_get_imports() {
1782
2112
  const ret = false;
1783
2113
  return ret;
1784
2114
  };
1785
- imports.wbg.__wbindgen_closure_wrapper3727 = function(arg0, arg1, arg2) {
1786
- const ret = makeMutClosure(arg0, arg1, 1599, __wbg_adapter_46);
2115
+ imports.wbg.__wbindgen_closure_wrapper4951 = function(arg0, arg1, arg2) {
2116
+ const ret = makeMutClosure(arg0, arg1, 1988, __wbg_adapter_50);
1787
2117
  return ret;
1788
2118
  };
1789
- imports.wbg.__wbindgen_closure_wrapper3729 = function(arg0, arg1, arg2) {
1790
- const ret = makeMutClosure(arg0, arg1, 1599, __wbg_adapter_46);
2119
+ imports.wbg.__wbindgen_closure_wrapper4953 = function(arg0, arg1, arg2) {
2120
+ const ret = makeMutClosure(arg0, arg1, 1988, __wbg_adapter_50);
1791
2121
  return ret;
1792
2122
  };
1793
- imports.wbg.__wbindgen_closure_wrapper3731 = function(arg0, arg1, arg2) {
1794
- const ret = makeMutClosure(arg0, arg1, 1599, __wbg_adapter_46);
2123
+ imports.wbg.__wbindgen_closure_wrapper4955 = function(arg0, arg1, arg2) {
2124
+ const ret = makeMutClosure(arg0, arg1, 1988, __wbg_adapter_50);
1795
2125
  return ret;
1796
2126
  };
1797
- imports.wbg.__wbindgen_closure_wrapper3733 = function(arg0, arg1, arg2) {
1798
- const ret = makeMutClosure(arg0, arg1, 1599, __wbg_adapter_46);
2127
+ imports.wbg.__wbindgen_closure_wrapper4957 = function(arg0, arg1, arg2) {
2128
+ const ret = makeMutClosure(arg0, arg1, 1988, __wbg_adapter_50);
1799
2129
  return ret;
1800
2130
  };
1801
- imports.wbg.__wbindgen_closure_wrapper4574 = function(arg0, arg1, arg2) {
1802
- const ret = makeMutClosure(arg0, arg1, 1951, __wbg_adapter_55);
2131
+ imports.wbg.__wbindgen_closure_wrapper5599 = function(arg0, arg1, arg2) {
2132
+ const ret = makeMutClosure(arg0, arg1, 2386, __wbg_adapter_59);
1803
2133
  return ret;
1804
2134
  };
1805
2135
  imports.wbg.__wbindgen_debug_string = function(arg0, arg1) {