lumiverse-spindle-types 0.4.33 → 0.4.34
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/src/api.ts +10 -0
- package/src/spindle-api.ts +10 -0
package/package.json
CHANGED
package/src/api.ts
CHANGED
|
@@ -1280,10 +1280,20 @@ export type WorkerToHost =
|
|
|
1280
1280
|
| { type: "frontend_message"; payload: unknown; userId?: string }
|
|
1281
1281
|
| { type: "user_storage_read"; requestId: string; path: string; userId?: string }
|
|
1282
1282
|
| { type: "user_storage_write"; requestId: string; path: string; data: string; userId?: string }
|
|
1283
|
+
| { type: "user_storage_read_binary"; requestId: string; path: string; userId?: string }
|
|
1284
|
+
| {
|
|
1285
|
+
type: "user_storage_write_binary";
|
|
1286
|
+
requestId: string;
|
|
1287
|
+
path: string;
|
|
1288
|
+
data: Uint8Array;
|
|
1289
|
+
userId?: string;
|
|
1290
|
+
}
|
|
1283
1291
|
| { type: "user_storage_delete"; requestId: string; path: string; userId?: string }
|
|
1284
1292
|
| { type: "user_storage_list"; requestId: string; prefix?: string; userId?: string }
|
|
1285
1293
|
| { type: "user_storage_exists"; requestId: string; path: string; userId?: string }
|
|
1286
1294
|
| { type: "user_storage_mkdir"; requestId: string; path: string; userId?: string }
|
|
1295
|
+
| { type: "user_storage_move"; requestId: string; from: string; to: string; userId?: string }
|
|
1296
|
+
| { type: "user_storage_stat"; requestId: string; path: string; userId?: string }
|
|
1287
1297
|
| { type: "enclave_put"; requestId: string; key: string; value: string; userId?: string }
|
|
1288
1298
|
| { type: "enclave_get"; requestId: string; key: string; userId?: string }
|
|
1289
1299
|
| { type: "enclave_delete"; requestId: string; key: string; userId?: string }
|
package/src/spindle-api.ts
CHANGED
|
@@ -255,10 +255,20 @@ export interface SpindleAPI {
|
|
|
255
255
|
userStorage: {
|
|
256
256
|
read(path: string, userId?: string): Promise<string>;
|
|
257
257
|
write(path: string, data: string, userId?: string): Promise<void>;
|
|
258
|
+
readBinary(path: string, userId?: string): Promise<Uint8Array>;
|
|
259
|
+
writeBinary(path: string, data: Uint8Array, userId?: string): Promise<void>;
|
|
258
260
|
delete(path: string, userId?: string): Promise<void>;
|
|
259
261
|
list(prefix?: string, userId?: string): Promise<string[]>;
|
|
260
262
|
exists(path: string, userId?: string): Promise<boolean>;
|
|
261
263
|
mkdir(path: string, userId?: string): Promise<void>;
|
|
264
|
+
move(from: string, to: string, userId?: string): Promise<void>;
|
|
265
|
+
stat(path: string, userId?: string): Promise<{
|
|
266
|
+
exists: boolean;
|
|
267
|
+
isFile: boolean;
|
|
268
|
+
isDirectory: boolean;
|
|
269
|
+
sizeBytes: number;
|
|
270
|
+
modifiedAt: string;
|
|
271
|
+
}>;
|
|
262
272
|
getJson<T>(path: string, options?: { fallback?: T; userId?: string }): Promise<T>;
|
|
263
273
|
setJson(path: string, value: unknown, options?: { indent?: number; userId?: string }): Promise<void>;
|
|
264
274
|
};
|