@rivetkit/rivetkit-wasm 0.0.0-pr.4860.7a44823 → 0.0.0-pr.4860.b5fe23b
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/package.json +1 -1
- package/pkg/rivetkit_wasm.d.ts +186 -13
- package/pkg/rivetkit_wasm.js +1109 -146
- package/pkg/rivetkit_wasm_bg.wasm +0 -0
- package/pkg/rivetkit_wasm_bg.wasm.d.ts +89 -10
package/package.json
CHANGED
package/pkg/rivetkit_wasm.d.ts
CHANGED
|
@@ -1,16 +1,49 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
|
-
export function
|
|
4
|
-
export function bridgeRivetErrorPrefix(): string;
|
|
3
|
+
export function start(): void;
|
|
5
4
|
export function awaitPromise(promise: Promise<any>): Promise<any>;
|
|
6
5
|
export function roundTripBytes(bytes: Uint8Array): Uint8Array;
|
|
6
|
+
export function bridgeRivetErrorPrefix(): string;
|
|
7
|
+
export function uint8ArrayFromBytes(bytes: Uint8Array): Uint8Array;
|
|
7
8
|
export class ActorContext {
|
|
8
9
|
free(): void;
|
|
10
|
+
keepAwake(promise: Promise<any>): Promise<any>;
|
|
11
|
+
saveState(payload: any): Promise<void>;
|
|
12
|
+
waitUntil(promise: Promise<any>): void;
|
|
13
|
+
abortSignal(): any;
|
|
14
|
+
connectConn(params: Uint8Array, request: any): Promise<ConnHandle>;
|
|
15
|
+
requestSave(opts: any): void;
|
|
16
|
+
registerTask(promise: Promise<any>): void;
|
|
17
|
+
runtimeState(): any;
|
|
18
|
+
inspectorSnapshot(): object;
|
|
19
|
+
endOnStateChange(): void;
|
|
20
|
+
restartRunHandler(): void;
|
|
21
|
+
beginOnStateChange(): void;
|
|
22
|
+
requestSaveAndWait(opts: any): Promise<void>;
|
|
23
|
+
verifyInspectorAuth(bearer_token?: string | null): Promise<void>;
|
|
24
|
+
endWebsocketCallback(region_id: number): void;
|
|
25
|
+
beginWebsocketCallback(): number;
|
|
26
|
+
dirtyHibernatableConns(): Array<any>;
|
|
27
|
+
kv(): Kv;
|
|
28
|
+
takePendingHibernationChanges(): Array<any>;
|
|
29
|
+
key(): any;
|
|
9
30
|
constructor();
|
|
31
|
+
sql(): SqliteDb;
|
|
32
|
+
name(): string;
|
|
33
|
+
conns(): Array<any>;
|
|
34
|
+
queue(): Queue;
|
|
35
|
+
sleep(): void;
|
|
36
|
+
state(): Uint8Array;
|
|
37
|
+
region(): string;
|
|
38
|
+
destroy(): void;
|
|
39
|
+
actorId(): string;
|
|
40
|
+
schedule(): Schedule;
|
|
41
|
+
broadcast(name: string, args: Uint8Array): void;
|
|
42
|
+
setAlarm(timestamp_ms?: number | null): void;
|
|
10
43
|
}
|
|
11
44
|
export class ActorFactory {
|
|
12
45
|
free(): void;
|
|
13
|
-
constructor(
|
|
46
|
+
constructor(callbacks: any, config: any);
|
|
14
47
|
}
|
|
15
48
|
export class CancellationToken {
|
|
16
49
|
free(): void;
|
|
@@ -22,6 +55,13 @@ export class CancellationToken {
|
|
|
22
55
|
export class ConnHandle {
|
|
23
56
|
private constructor();
|
|
24
57
|
free(): void;
|
|
58
|
+
disconnect(reason?: string | null): Promise<void>;
|
|
59
|
+
isHibernatable(): boolean;
|
|
60
|
+
id(): string;
|
|
61
|
+
send(name: string, args: Uint8Array): void;
|
|
62
|
+
state(): Uint8Array;
|
|
63
|
+
params(): Uint8Array;
|
|
64
|
+
setState(state: Uint8Array): void;
|
|
25
65
|
}
|
|
26
66
|
export class CoreRegistry {
|
|
27
67
|
free(): void;
|
|
@@ -30,9 +70,63 @@ export class CoreRegistry {
|
|
|
30
70
|
register(name: string, factory: ActorFactory): void;
|
|
31
71
|
shutdown(): Promise<void>;
|
|
32
72
|
}
|
|
73
|
+
export class Kv {
|
|
74
|
+
private constructor();
|
|
75
|
+
free(): void;
|
|
76
|
+
delete(key: Uint8Array): Promise<void>;
|
|
77
|
+
listRange(start: Uint8Array, end: Uint8Array, options: any): Promise<any>;
|
|
78
|
+
listPrefix(prefix: Uint8Array, options: any): Promise<any>;
|
|
79
|
+
batchDelete(keys: Array<any>): Promise<void>;
|
|
80
|
+
deleteRange(start: Uint8Array, end: Uint8Array): Promise<void>;
|
|
81
|
+
get(key: Uint8Array): Promise<any>;
|
|
82
|
+
put(key: Uint8Array, value: Uint8Array): Promise<void>;
|
|
83
|
+
batchGet(keys: Array<any>): Promise<any>;
|
|
84
|
+
batchPut(entries: Array<any>): Promise<void>;
|
|
85
|
+
}
|
|
86
|
+
export class Queue {
|
|
87
|
+
private constructor();
|
|
88
|
+
free(): void;
|
|
89
|
+
nextBatch(options: any, signal?: CancellationToken | null): Promise<Array<any>>;
|
|
90
|
+
tryNextBatch(options: any): Array<any>;
|
|
91
|
+
waitForNames(names: any, options: any, signal?: CancellationToken | null): Promise<QueueMessage>;
|
|
92
|
+
enqueueAndWait(name: string, body: Uint8Array, options: any, signal?: CancellationToken | null): Promise<Uint8Array | undefined>;
|
|
93
|
+
inspectMessages(): Promise<Array<any>>;
|
|
94
|
+
waitForNamesAvailable(names: any, options: any): Promise<void>;
|
|
95
|
+
send(name: string, body: Uint8Array): Promise<QueueMessage>;
|
|
96
|
+
maxSize(): number;
|
|
97
|
+
}
|
|
98
|
+
export class QueueMessage {
|
|
99
|
+
private constructor();
|
|
100
|
+
free(): void;
|
|
101
|
+
createdAt(): number;
|
|
102
|
+
isCompletable(): boolean;
|
|
103
|
+
id(): bigint;
|
|
104
|
+
body(): Uint8Array;
|
|
105
|
+
name(): string;
|
|
106
|
+
complete(response: any): Promise<void>;
|
|
107
|
+
}
|
|
108
|
+
export class Schedule {
|
|
109
|
+
private constructor();
|
|
110
|
+
free(): void;
|
|
111
|
+
at(timestamp_ms: number, action_name: string, args: Uint8Array): void;
|
|
112
|
+
after(duration_ms: number, action_name: string, args: Uint8Array): void;
|
|
113
|
+
}
|
|
114
|
+
export class SqliteDb {
|
|
115
|
+
private constructor();
|
|
116
|
+
free(): void;
|
|
117
|
+
executeWrite(sql: string, params: any): Promise<any>;
|
|
118
|
+
run(sql: string, params: any): Promise<any>;
|
|
119
|
+
exec(sql: string): Promise<any>;
|
|
120
|
+
close(): Promise<void>;
|
|
121
|
+
query(sql: string, params: any): Promise<any>;
|
|
122
|
+
execute(sql: string, params: any): Promise<any>;
|
|
123
|
+
}
|
|
33
124
|
export class WebSocketHandle {
|
|
34
125
|
private constructor();
|
|
35
126
|
free(): void;
|
|
127
|
+
setEventCallback(callback: Function): void;
|
|
128
|
+
send(data: Uint8Array, binary: boolean): void;
|
|
129
|
+
close(code?: number | null, reason?: string | null): Promise<void>;
|
|
36
130
|
}
|
|
37
131
|
|
|
38
132
|
export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
|
|
@@ -42,8 +136,42 @@ export interface InitOutput {
|
|
|
42
136
|
readonly __wbg_actorcontext_free: (a: number, b: number) => void;
|
|
43
137
|
readonly __wbg_actorfactory_free: (a: number, b: number) => void;
|
|
44
138
|
readonly __wbg_cancellationtoken_free: (a: number, b: number) => void;
|
|
139
|
+
readonly __wbg_connhandle_free: (a: number, b: number) => void;
|
|
45
140
|
readonly __wbg_coreregistry_free: (a: number, b: number) => void;
|
|
141
|
+
readonly __wbg_kv_free: (a: number, b: number) => void;
|
|
142
|
+
readonly __wbg_queuemessage_free: (a: number, b: number) => void;
|
|
143
|
+
readonly __wbg_sqlitedb_free: (a: number, b: number) => void;
|
|
144
|
+
readonly __wbg_websockethandle_free: (a: number, b: number) => void;
|
|
145
|
+
readonly actorcontext_abortSignal: (a: number) => [number, number, number];
|
|
146
|
+
readonly actorcontext_actorId: (a: number) => [number, number];
|
|
147
|
+
readonly actorcontext_beginOnStateChange: (a: number) => void;
|
|
148
|
+
readonly actorcontext_beginWebsocketCallback: (a: number) => number;
|
|
149
|
+
readonly actorcontext_broadcast: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
150
|
+
readonly actorcontext_connectConn: (a: number, b: number, c: number, d: any) => any;
|
|
151
|
+
readonly actorcontext_conns: (a: number) => any;
|
|
152
|
+
readonly actorcontext_destroy: (a: number) => [number, number];
|
|
153
|
+
readonly actorcontext_dirtyHibernatableConns: (a: number) => any;
|
|
154
|
+
readonly actorcontext_endOnStateChange: (a: number) => void;
|
|
155
|
+
readonly actorcontext_endWebsocketCallback: (a: number, b: number) => void;
|
|
156
|
+
readonly actorcontext_inspectorSnapshot: (a: number) => [number, number, number];
|
|
157
|
+
readonly actorcontext_keepAwake: (a: number, b: any) => any;
|
|
158
|
+
readonly actorcontext_key: (a: number) => [number, number, number];
|
|
159
|
+
readonly actorcontext_kv: (a: number) => number;
|
|
160
|
+
readonly actorcontext_name: (a: number) => [number, number];
|
|
46
161
|
readonly actorcontext_new: () => [number, number, number];
|
|
162
|
+
readonly actorcontext_region: (a: number) => [number, number];
|
|
163
|
+
readonly actorcontext_registerTask: (a: number, b: any) => void;
|
|
164
|
+
readonly actorcontext_requestSave: (a: number, b: any) => void;
|
|
165
|
+
readonly actorcontext_requestSaveAndWait: (a: number, b: any) => any;
|
|
166
|
+
readonly actorcontext_restartRunHandler: (a: number) => void;
|
|
167
|
+
readonly actorcontext_runtimeState: (a: number) => any;
|
|
168
|
+
readonly actorcontext_saveState: (a: number, b: any) => any;
|
|
169
|
+
readonly actorcontext_setAlarm: (a: number, b: number, c: number) => [number, number];
|
|
170
|
+
readonly actorcontext_sleep: (a: number) => [number, number];
|
|
171
|
+
readonly actorcontext_sql: (a: number) => number;
|
|
172
|
+
readonly actorcontext_state: (a: number) => [number, number];
|
|
173
|
+
readonly actorcontext_takePendingHibernationChanges: (a: number) => any;
|
|
174
|
+
readonly actorcontext_verifyInspectorAuth: (a: number, b: number, c: number) => any;
|
|
47
175
|
readonly actorfactory_new: (a: any, b: any) => [number, number, number];
|
|
48
176
|
readonly awaitPromise: (a: any) => any;
|
|
49
177
|
readonly bridgeRivetErrorPrefix: () => [number, number];
|
|
@@ -51,25 +179,70 @@ export interface InitOutput {
|
|
|
51
179
|
readonly cancellationtoken_cancel: (a: number) => void;
|
|
52
180
|
readonly cancellationtoken_new: () => number;
|
|
53
181
|
readonly cancellationtoken_onCancelled: (a: number, b: any) => void;
|
|
182
|
+
readonly connhandle_disconnect: (a: number, b: number, c: number) => any;
|
|
183
|
+
readonly connhandle_id: (a: number) => [number, number];
|
|
184
|
+
readonly connhandle_isHibernatable: (a: number) => number;
|
|
185
|
+
readonly connhandle_params: (a: number) => [number, number];
|
|
186
|
+
readonly connhandle_send: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
187
|
+
readonly connhandle_setState: (a: number, b: number, c: number) => void;
|
|
188
|
+
readonly connhandle_state: (a: number) => [number, number];
|
|
54
189
|
readonly coreregistry_new: () => number;
|
|
55
190
|
readonly coreregistry_register: (a: number, b: number, c: number, d: number) => [number, number];
|
|
56
191
|
readonly coreregistry_serve: (a: number, b: any) => any;
|
|
57
192
|
readonly coreregistry_shutdown: (a: number) => any;
|
|
193
|
+
readonly kv_batchDelete: (a: number, b: any) => any;
|
|
194
|
+
readonly kv_batchGet: (a: number, b: any) => any;
|
|
195
|
+
readonly kv_batchPut: (a: number, b: any) => any;
|
|
196
|
+
readonly kv_delete: (a: number, b: number, c: number) => any;
|
|
197
|
+
readonly kv_deleteRange: (a: number, b: number, c: number, d: number, e: number) => any;
|
|
198
|
+
readonly kv_get: (a: number, b: number, c: number) => any;
|
|
199
|
+
readonly kv_listPrefix: (a: number, b: number, c: number, d: any) => any;
|
|
200
|
+
readonly kv_listRange: (a: number, b: number, c: number, d: number, e: number, f: any) => any;
|
|
201
|
+
readonly kv_put: (a: number, b: number, c: number, d: number, e: number) => any;
|
|
202
|
+
readonly queue_enqueueAndWait: (a: number, b: number, c: number, d: number, e: number, f: any, g: number) => any;
|
|
203
|
+
readonly queue_inspectMessages: (a: number) => any;
|
|
204
|
+
readonly queue_maxSize: (a: number) => number;
|
|
205
|
+
readonly queue_nextBatch: (a: number, b: any, c: number) => any;
|
|
206
|
+
readonly queue_send: (a: number, b: number, c: number, d: number, e: number) => any;
|
|
207
|
+
readonly queue_tryNextBatch: (a: number, b: any) => [number, number, number];
|
|
208
|
+
readonly queue_waitForNames: (a: number, b: any, c: any, d: number) => any;
|
|
209
|
+
readonly queue_waitForNamesAvailable: (a: number, b: any, c: any) => any;
|
|
210
|
+
readonly queuemessage_body: (a: number) => [number, number];
|
|
211
|
+
readonly queuemessage_complete: (a: number, b: any) => any;
|
|
212
|
+
readonly queuemessage_createdAt: (a: number) => number;
|
|
213
|
+
readonly queuemessage_id: (a: number) => bigint;
|
|
214
|
+
readonly queuemessage_isCompletable: (a: number) => number;
|
|
215
|
+
readonly queuemessage_name: (a: number) => [number, number];
|
|
58
216
|
readonly roundTripBytes: (a: number, b: number) => [number, number];
|
|
217
|
+
readonly schedule_after: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
218
|
+
readonly schedule_at: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
219
|
+
readonly sqlitedb_close: (a: number) => any;
|
|
220
|
+
readonly sqlitedb_exec: (a: number, b: number, c: number) => any;
|
|
221
|
+
readonly sqlitedb_execute: (a: number, b: number, c: number, d: any) => any;
|
|
222
|
+
readonly sqlitedb_executeWrite: (a: number, b: number, c: number, d: any) => any;
|
|
223
|
+
readonly sqlitedb_query: (a: number, b: number, c: number, d: any) => any;
|
|
224
|
+
readonly sqlitedb_run: (a: number, b: number, c: number, d: any) => any;
|
|
59
225
|
readonly uint8ArrayFromBytes: (a: number, b: number) => any;
|
|
60
|
-
readonly
|
|
61
|
-
readonly
|
|
62
|
-
readonly
|
|
63
|
-
readonly
|
|
64
|
-
readonly
|
|
226
|
+
readonly websockethandle_close: (a: number, b: number, c: number, d: number) => any;
|
|
227
|
+
readonly websockethandle_send: (a: number, b: number, c: number, d: number) => [number, number];
|
|
228
|
+
readonly websockethandle_setEventCallback: (a: number, b: any) => void;
|
|
229
|
+
readonly start: () => void;
|
|
230
|
+
readonly actorcontext_waitUntil: (a: number, b: any) => void;
|
|
231
|
+
readonly actorcontext_queue: (a: number) => number;
|
|
232
|
+
readonly actorcontext_schedule: (a: number) => number;
|
|
233
|
+
readonly __wbg_schedule_free: (a: number, b: number) => void;
|
|
234
|
+
readonly __wbg_queue_free: (a: number, b: number) => void;
|
|
65
235
|
readonly __wbindgen_malloc: (a: number, b: number) => number;
|
|
66
236
|
readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
|
|
67
|
-
readonly
|
|
68
|
-
readonly
|
|
237
|
+
readonly __wbindgen_exn_store: (a: number) => void;
|
|
238
|
+
readonly __externref_table_alloc: () => number;
|
|
239
|
+
readonly __wbindgen_export_4: WebAssembly.Table;
|
|
69
240
|
readonly __wbindgen_free: (a: number, b: number, c: number) => void;
|
|
70
|
-
readonly
|
|
71
|
-
readonly
|
|
72
|
-
readonly
|
|
241
|
+
readonly __wbindgen_export_6: WebAssembly.Table;
|
|
242
|
+
readonly __externref_table_dealloc: (a: number) => void;
|
|
243
|
+
readonly closure1512_externref_shim: (a: number, b: number, c: any) => void;
|
|
244
|
+
readonly closure1715_externref_shim: (a: number, b: number, c: any) => void;
|
|
245
|
+
readonly closure1934_externref_shim: (a: number, b: number, c: any, d: any) => void;
|
|
73
246
|
readonly __wbindgen_start: () => void;
|
|
74
247
|
}
|
|
75
248
|
|