@junobuild/functions 0.0.15 → 0.1.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/README.md CHANGED
@@ -30,6 +30,7 @@ JavaScript and TypeScript utilities for [Juno] Serverless Functions.
30
30
  - [defineHook](#gear-definehook)
31
31
  - [defineHook](#gear-definehook)
32
32
  - [defineHook](#gear-definehook)
33
+ - [createListResultsSchema](#gear-createlistresultsschema)
33
34
  - [normalizeCaller](#gear-normalizecaller)
34
35
  - [getAdminControllers](#gear-getadmincontrollers)
35
36
  - [getControllers](#gear-getcontrollers)
@@ -37,10 +38,26 @@ JavaScript and TypeScript utilities for [Juno] Serverless Functions.
37
38
  - [isController](#gear-iscontroller)
38
39
  - [setDocStore](#gear-setdocstore)
39
40
  - [deleteDocStore](#gear-deletedocstore)
41
+ - [getDocStore](#gear-getdocstore)
42
+ - [listDocsStore](#gear-listdocsstore)
43
+ - [countCollectionDocsStore](#gear-countcollectiondocsstore)
44
+ - [countDocsStore](#gear-countdocsstore)
45
+ - [deleteDocsStore](#gear-deletedocsstore)
46
+ - [deleteFilteredDocsStore](#gear-deletefiltereddocsstore)
40
47
  - [decodeDocData](#gear-decodedocdata)
41
48
  - [encodeDocData](#gear-encodedocdata)
49
+ - [countCollectionAssetsStore](#gear-countcollectionassetsstore)
50
+ - [countAssetsStore](#gear-countassetsstore)
51
+ - [setAssetHandler](#gear-setassethandler)
52
+ - [deleteAssetStore](#gear-deleteassetstore)
53
+ - [deleteAssetsStore](#gear-deleteassetsstore)
54
+ - [deleteFilteredAssetsStore](#gear-deletefilteredassetsstore)
55
+ - [getAssetStore](#gear-getassetstore)
56
+ - [listAssetsStore](#gear-listassetsstore)
57
+ - [getContentChunksStore](#gear-getcontentchunksstore)
42
58
  - [call](#gear-call)
43
59
  - [id](#gear-id)
60
+ - [time](#gear-time)
44
61
 
45
62
  #### :gear: HookContextSchema
46
63
 
@@ -170,6 +187,16 @@ JavaScript and TypeScript utilities for [Juno] Serverless Functions.
170
187
 
171
188
  [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/hooks.ts#L181)
172
189
 
190
+ #### :gear: createListResultsSchema
191
+
192
+ Represents a list result.
193
+
194
+ | Function | Type |
195
+ | ------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
196
+ | `createListResultsSchema` | `<T extends z.ZodTypeAny>(itemData: T) => ZodObject<{ items: ZodArray<ZodTuple<[ZodString, T], null>, "many">; items_length: ZodBigInt; items_page: ZodOptional<...>; matches_length: ZodBigInt; matches_pages: ZodOptional<...>; }, "strict", ZodTypeAny, { ...; }, { ...; }>` |
197
+
198
+ [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/schemas/list.ts#L128)
199
+
173
200
  #### :gear: normalizeCaller
174
201
 
175
202
  Normalizes a user ID into a raw `Uint8Array` representation.
@@ -203,7 +230,7 @@ Gets the list of controllers from the Satellite.
203
230
  | ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
204
231
  | `getControllers` | `() => [Uint8Array<ArrayBufferLike>, { created_at: bigint; updated_at: bigint; metadata: [string, string][]; scope: "write" or "admin"; expires_at?: bigint or undefined; }][]` |
205
232
 
206
- [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/controllers.sdk.ts#L25)
233
+ [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/controllers.sdk.ts#L24)
207
234
 
208
235
  #### :gear: isAdminController
209
236
 
@@ -218,7 +245,7 @@ Parameters:
218
245
  - `params`: - The parameters including the caller identity
219
246
  and the list of controllers to verify against.
220
247
 
221
- [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/controllers.sdk.ts#L37)
248
+ [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/controllers.sdk.ts#L36)
222
249
 
223
250
  #### :gear: isController
224
251
 
@@ -233,7 +260,7 @@ Parameters:
233
260
  - `params`: - The parameters including the caller identity
234
261
  and the list of controllers to verify against.
235
262
 
236
- [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/controllers.sdk.ts#L57)
263
+ [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/controllers.sdk.ts#L56)
237
264
 
238
265
  #### :gear: setDocStore
239
266
 
@@ -241,31 +268,115 @@ Stores or updates a document in the datastore.
241
268
 
242
269
  The data must have been encoded - using encodeDocData - before calling this function.
243
270
 
244
- | Function | Type |
245
- | ------------- | ------------------------------------- |
246
- | `setDocStore` | `(params: SetDocStoreParams) => void` |
271
+ | Function | Type |
272
+ | ------------- | ------------------------------------------------------ |
273
+ | `setDocStore` | `(params: SetDocStoreParams) => DocContext<DocUpsert>` |
247
274
 
248
275
  Parameters:
249
276
 
250
277
  - `params`: - The parameters required to store the document,
251
278
  including the caller, collection, key, and document data.
252
279
 
253
- [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/db.sdk.ts#L20)
280
+ [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/db.sdk.ts#L39)
254
281
 
255
282
  #### :gear: deleteDocStore
256
283
 
257
- Delete a document in the datastore.
284
+ Deletes a document from the datastore.
258
285
 
259
- | Function | Type |
260
- | ---------------- | ---------------------------------------- |
261
- | `deleteDocStore` | `(params: DeleteDocStoreParams) => void` |
286
+ | Function | Type |
287
+ | ---------------- | --------------------------------------------------------- |
288
+ | `deleteDocStore` | `(params: DeleteDocStoreParams) => DocContext<OptionDoc>` |
262
289
 
263
290
  Parameters:
264
291
 
265
292
  - `params`: - The parameters required to delete the document,
266
- including the caller, collection, key, and version of the document.
293
+ including the caller, collection, key, and the expected version of the document.
267
294
 
268
- [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/db.sdk.ts#L39)
295
+ [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/db.sdk.ts#L61)
296
+
297
+ #### :gear: getDocStore
298
+
299
+ Retrieve a document from the datastore.
300
+
301
+ | Function | Type |
302
+ | ------------- | ------------------------------------------ |
303
+ | `getDocStore` | `(params: GetDocStoreParams) => OptionDoc` |
304
+
305
+ Parameters:
306
+
307
+ - `params`: - The parameters required to get the document.
308
+
309
+ [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/db.sdk.ts#L81)
310
+
311
+ #### :gear: listDocsStore
312
+
313
+ Lists documents from the datastore using optional filtering, pagination, and ordering parameters.
314
+
315
+ | Function | Type |
316
+ | --------------- | ----------------------------------------------- |
317
+ | `listDocsStore` | `(params: ListStoreParams) => ListResults<Doc>` |
318
+
319
+ Parameters:
320
+
321
+ - `params`: - The parameters required to perform the list operation.
322
+
323
+ [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/db.sdk.ts#L101)
324
+
325
+ #### :gear: countCollectionDocsStore
326
+
327
+ Counts the number of documents in a specific collection.
328
+
329
+ | Function | Type |
330
+ | -------------------------- | -------------------------------------- |
331
+ | `countCollectionDocsStore` | `(params: CollectionParams) => bigint` |
332
+
333
+ Parameters:
334
+
335
+ - `params`: - The parameters required to count documents in the collection.
336
+
337
+ [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/db.sdk.ts#L121)
338
+
339
+ #### :gear: countDocsStore
340
+
341
+ Counts the number of documents in a collection matching specific filters and owned by a specific caller.
342
+
343
+ | Function | Type |
344
+ | ---------------- | ------------------------------------- |
345
+ | `countDocsStore` | `(params: ListStoreParams) => bigint` |
346
+
347
+ Parameters:
348
+
349
+ - `params`: - The parameters required to perform the filtered count.
350
+
351
+ [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/db.sdk.ts#L139)
352
+
353
+ #### :gear: deleteDocsStore
354
+
355
+ Delete documents in a specific collection of the Datastore.
356
+
357
+ | Function | Type |
358
+ | ----------------- | ------------------------------------ |
359
+ | `deleteDocsStore` | `(params: CollectionParams) => void` |
360
+
361
+ Parameters:
362
+
363
+ - `params`: - The parameters required to delete documents in the collection.
364
+
365
+ [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/db.sdk.ts#L157)
366
+
367
+ #### :gear: deleteFilteredDocsStore
368
+
369
+ Delete documents in a collection matching specific filters and owned by a specific caller.
370
+
371
+ | Function | Type |
372
+ | ------------------------- | ------------------------------------------------------ |
373
+ | `deleteFilteredDocsStore` | `(params: ListStoreParams) => DocContext<OptionDoc>[]` |
374
+
375
+ Parameters:
376
+
377
+ - `params`: - The parameters required to perform the filtered deletion.
378
+
379
+ [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/db.sdk.ts#L175)
269
380
 
270
381
  #### :gear: decodeDocData
271
382
 
@@ -295,6 +406,134 @@ Parameters:
295
406
 
296
407
  [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/serializer.sdk.ts#L21)
297
408
 
409
+ #### :gear: countCollectionAssetsStore
410
+
411
+ Counts the number of assets in a specific collection.
412
+
413
+ | Function | Type |
414
+ | ---------------------------- | -------------------------------------- |
415
+ | `countCollectionAssetsStore` | `(params: CollectionParams) => bigint` |
416
+
417
+ Parameters:
418
+
419
+ - `params`: - The parameters required to count assets in the collection.
420
+
421
+ [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/storage.sdk.ts#L35)
422
+
423
+ #### :gear: countAssetsStore
424
+
425
+ Counts the number of assets in a collection matching specific filters and owned by a specific caller.
426
+
427
+ | Function | Type |
428
+ | ------------------ | ------------------------------------- |
429
+ | `countAssetsStore` | `(params: ListStoreParams) => bigint` |
430
+
431
+ Parameters:
432
+
433
+ - `params`: - The parameters required to perform the filtered count.
434
+
435
+ [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/storage.sdk.ts#L53)
436
+
437
+ #### :gear: setAssetHandler
438
+
439
+ Sets or updates an asset in the storage.
440
+
441
+ | Function | Type |
442
+ | ----------------- | ----------------------------------------- |
443
+ | `setAssetHandler` | `(params: SetAssetHandlerParams) => void` |
444
+
445
+ Parameters:
446
+
447
+ - `params`: - The parameters required to set or update an asset.
448
+
449
+ [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/storage.sdk.ts#L71)
450
+
451
+ #### :gear: deleteAssetStore
452
+
453
+ Deletes an asset from the storage.
454
+
455
+ | Function | Type |
456
+ | ------------------ | ---------------------------------------------- |
457
+ | `deleteAssetStore` | `(params: GetAssetStoreParams) => OptionAsset` |
458
+
459
+ Parameters:
460
+
461
+ - `params`: - The parameters required to delete the asset.
462
+
463
+ [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/storage.sdk.ts#L89)
464
+
465
+ #### :gear: deleteAssetsStore
466
+
467
+ Delete assets in a specific collection of the Storage.
468
+
469
+ | Function | Type |
470
+ | ------------------- | ------------------------------------ |
471
+ | `deleteAssetsStore` | `(params: CollectionParams) => void` |
472
+
473
+ Parameters:
474
+
475
+ - `params`: - The parameters required to delete assets in the collection.
476
+
477
+ [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/storage.sdk.ts#L107)
478
+
479
+ #### :gear: deleteFilteredAssetsStore
480
+
481
+ Delete assets in a collection matching specific filters and owned by a specific caller.
482
+
483
+ | Function | Type |
484
+ | --------------------------- | -------------------------------------------- |
485
+ | `deleteFilteredAssetsStore` | `(params: ListStoreParams) => OptionAsset[]` |
486
+
487
+ Parameters:
488
+
489
+ - `params`: - The parameters required to perform the filtered deletion.
490
+
491
+ [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/storage.sdk.ts#L125)
492
+
493
+ #### :gear: getAssetStore
494
+
495
+ Retrieve an asset from the storage.
496
+
497
+ | Function | Type |
498
+ | --------------- | ---------------------------------------------- |
499
+ | `getAssetStore` | `(params: GetAssetStoreParams) => OptionAsset` |
500
+
501
+ Parameters:
502
+
503
+ - `params`: - The parameters required to get the asset.
504
+
505
+ [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/storage.sdk.ts#L147)
506
+
507
+ #### :gear: listAssetsStore
508
+
509
+ Lists assets (without content) from the storage using optional filtering, pagination, and ordering parameters.
510
+
511
+ | Function | Type |
512
+ | ----------------- | ---------------------------------------------------------- |
513
+ | `listAssetsStore` | `(params: ListStoreParams) => ListResults<AssetNoContent>` |
514
+
515
+ Parameters:
516
+
517
+ - `params`: - The parameters required to perform the list operation.
518
+
519
+ [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/storage.sdk.ts#L167)
520
+
521
+ #### :gear: getContentChunksStore
522
+
523
+ Retrieves content chunks of an asset.
524
+
525
+ This function fetches a content chunk of a given asset encoding using the specified parameters.
526
+
527
+ | Function | Type |
528
+ | ----------------------- | ------------------------------------------------------------ |
529
+ | `getContentChunksStore` | `(params: GetContentChunksStoreParams) => Blob or undefined` |
530
+
531
+ Parameters:
532
+
533
+ - `params`: - The parameters including encoding, chunk index, and memory type.
534
+
535
+ [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/storage.sdk.ts#L189)
536
+
298
537
  #### :gear: call
299
538
 
300
539
  Makes an asynchronous call to a canister on the Internet Computer.
@@ -326,6 +565,20 @@ the Principal of the executing canister.
326
565
 
327
566
  [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/ic-cdk/id.ic-cdk.ts#L12)
328
567
 
568
+ #### :gear: time
569
+
570
+ Gets current timestamp, in nanoseconds since the epoch (1970-01-01)
571
+
572
+ This function is a JavaScript binding for the Rust function
573
+ [`ic_cdk::time()`](https://docs.rs/ic-cdk/latest/ic_cdk/api/fn.time.html), which returns
574
+ the system time publicly exposed and verified part of the IC state tree
575
+
576
+ | Function | Type |
577
+ | -------- | -------------- |
578
+ | `time` | `() => bigint` |
579
+
580
+ [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/ic-cdk/time.ic-cdk.ts#L10)
581
+
329
582
  ### :wrench: Constants
330
583
 
331
584
  - [Uint8ArraySchema](#gear-uint8arrayschema)
@@ -355,9 +608,16 @@ the Principal of the executing canister.
355
608
  - [AssertSetDocContextSchema](#gear-assertsetdoccontextschema)
356
609
  - [AssertDeleteDocContextSchema](#gear-assertdeletedoccontextschema)
357
610
  - [SatelliteEnvSchema](#gear-satelliteenvschema)
611
+ - [HeaderFieldsSchema](#gear-headerfieldsschema)
612
+ - [BlobSchema](#gear-blobschema)
613
+ - [AssetKeySchema](#gear-assetkeyschema)
614
+ - [AssetEncodingSchema](#gear-assetencodingschema)
358
615
  - [AssetSchema](#gear-assetschema)
616
+ - [AssetNoContentSchema](#gear-assetnocontentschema)
359
617
  - [BatchSchema](#gear-batchschema)
360
618
  - [CommitBatchSchema](#gear-commitbatchschema)
619
+ - [FullPathSchema](#gear-fullpathschema)
620
+ - [OptionAssetSchema](#gear-optionassetschema)
361
621
  - [AssetAssertUploadSchema](#gear-assetassertuploadschema)
362
622
  - [OnUploadAssetContextSchema](#gear-onuploadassetcontextschema)
363
623
  - [OnDeleteAssetContextSchema](#gear-ondeleteassetcontextschema)
@@ -380,14 +640,38 @@ the Principal of the executing canister.
380
640
  - [OnDeleteManyAssetsSchema](#gear-ondeletemanyassetsschema)
381
641
  - [OnDeleteFilteredAssetsSchema](#gear-ondeletefilteredassetsschema)
382
642
  - [HookSchema](#gear-hookschema)
643
+ - [TimestampMatcherSchema](#gear-timestampmatcherschema)
644
+ - [ListMatcherSchema](#gear-listmatcherschema)
645
+ - [ListPaginateSchema](#gear-listpaginateschema)
646
+ - [ListOrderFieldSchema](#gear-listorderfieldschema)
647
+ - [ListOrderSchema](#gear-listorderschema)
648
+ - [ListParamsSchema](#gear-listparamsschema)
383
649
  - [ControllerScopeSchema](#gear-controllerscopeschema)
384
650
  - [MetadataSchema](#gear-metadataschema)
385
651
  - [ControllerSchema](#gear-controllerschema)
386
652
  - [ControllerRecordSchema](#gear-controllerrecordschema)
387
653
  - [ControllersSchema](#gear-controllersschema)
388
654
  - [ControllerCheckParamsSchema](#gear-controllercheckparamsschema)
655
+ - [CollectionParamsSchema](#gear-collectionparamsschema)
656
+ - [ListStoreParamsSchema](#gear-liststoreparamsschema)
657
+ - [GetDocStoreParamsSchema](#gear-getdocstoreparamsschema)
389
658
  - [SetDocStoreParamsSchema](#gear-setdocstoreparamsschema)
390
659
  - [DeleteDocStoreParamsSchema](#gear-deletedocstoreparamsschema)
660
+ - [CountCollectionDocsStoreParamsSchema](#gear-countcollectiondocsstoreparamsschema)
661
+ - [CountDocsStoreParamsSchema](#gear-countdocsstoreparamsschema)
662
+ - [ListDocsStoreParamsSchema](#gear-listdocsstoreparamsschema)
663
+ - [DeleteDocsStoreParamsSchema](#gear-deletedocsstoreparamsschema)
664
+ - [DeleteFilteredDocsStoreParamsSchema](#gear-deletefiltereddocsstoreparamsschema)
665
+ - [MemorySchema](#gear-memoryschema)
666
+ - [GetAssetStoreParamsSchema](#gear-getassetstoreparamsschema)
667
+ - [CountCollectionAssetsStoreParamsSchema](#gear-countcollectionassetsstoreparamsschema)
668
+ - [CountAssetsStoreParamsSchema](#gear-countassetsstoreparamsschema)
669
+ - [SetAssetHandlerParamsSchema](#gear-setassethandlerparamsschema)
670
+ - [DeleteAssetsStoreParamsSchema](#gear-deleteassetsstoreparamsschema)
671
+ - [DeleteFilteredAssetsStoreParamsSchema](#gear-deletefilteredassetsstoreparamsschema)
672
+ - [DeleteAssetStoreParamsSchema](#gear-deleteassetstoreparamsschema)
673
+ - [ListAssetsStoreParamsSchema](#gear-listassetsstoreparamsschema)
674
+ - [GetContentChunksStoreParamsSchema](#gear-getcontentchunksstoreparamsschema)
391
675
  - [IDLTypeSchema](#gear-idltypeschema)
392
676
  - [CallArgSchema](#gear-callargschema)
393
677
  - [CallArgsSchema](#gear-callargsschema)
@@ -612,21 +896,61 @@ A schema that validates a value is an Uint8Array.
612
896
 
613
897
  [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/schemas/satellite.env.ts#L6)
614
898
 
899
+ #### :gear: HeaderFieldsSchema
900
+
901
+ | Constant | Type |
902
+ | -------------------- | ---------------------------------------------------------- |
903
+ | `HeaderFieldsSchema` | `ZodArray<ZodTuple<[ZodString, ZodString], null>, "many">` |
904
+
905
+ [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/schemas/storage.ts#L29)
906
+
907
+ #### :gear: BlobSchema
908
+
909
+ | Constant | Type |
910
+ | ------------ | ------------------------------------------------------------------------------- |
911
+ | `BlobSchema` | `ZodType<Uint8Array<ArrayBufferLike>, ZodTypeDef, Uint8Array<ArrayBufferLike>>` |
912
+
913
+ [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/schemas/storage.ts#L39)
914
+
915
+ #### :gear: AssetKeySchema
916
+
917
+ | Constant | Type |
918
+ | ---------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
919
+ | `AssetKeySchema` | `ZodObject<{ name: ZodString; full_path: ZodString; token: ZodOptional<ZodString>; collection: ZodString; owner: ZodType<Uint8Array<ArrayBufferLike>, ZodTypeDef, Uint8Array<...>>; description: ZodOptional<...>; }, "strict", ZodTypeAny, { ...; }, { ...; }>` |
920
+
921
+ [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/schemas/storage.ts#L71)
922
+
923
+ #### :gear: AssetEncodingSchema
924
+
925
+ | Constant | Type |
926
+ | --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
927
+ | `AssetEncodingSchema` | `ZodObject<{ modified: ZodBigInt; content_chunks: ZodArray<ZodType<Uint8Array<ArrayBufferLike>, ZodTypeDef, Uint8Array<ArrayBufferLike>>, "many">; total_length: ZodBigInt; sha256: ZodEffects<...>; }, "strip", ZodTypeAny, { ...; }, { ...; }>` |
928
+
929
+ [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/schemas/storage.ts#L121)
930
+
615
931
  #### :gear: AssetSchema
616
932
 
617
933
  | Constant | Type |
618
934
  | ------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
619
- | `AssetSchema` | `ZodObject<{ key: ZodObject<{ name: ZodString; full_path: ZodString; token: ZodOptional<ZodString>; collection: ZodString; owner: ZodType<Uint8Array<ArrayBufferLike>, ZodTypeDef, Uint8Array<...>>; description: ZodOptional<...>; }, "strip", ZodTypeAny, { ...; }, { ...; }>; ... 4 more ...; version: ZodOptional<...>; },...` |
935
+ | `AssetSchema` | `ZodObject<{ key: ZodObject<{ name: ZodString; full_path: ZodString; token: ZodOptional<ZodString>; collection: ZodString; owner: ZodType<Uint8Array<ArrayBufferLike>, ZodTypeDef, Uint8Array<...>>; description: ZodOptional<...>; }, "strict", ZodTypeAny, { ...; }, { ...; }>; ... 4 more ...; version: ZodOptional<...>; }...` |
620
936
 
621
- [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/schemas/storage.ts#L144)
937
+ [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/schemas/storage.ts#L176)
938
+
939
+ #### :gear: AssetNoContentSchema
940
+
941
+ | Constant | Type |
942
+ | ---------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
943
+ | `AssetNoContentSchema` | `ZodObject<extendShape<Omit<{ key: ZodObject<{ name: ZodString; full_path: ZodString; token: ZodOptional<ZodString>; collection: ZodString; owner: ZodType<Uint8Array<ArrayBufferLike>, ZodTypeDef, Uint8Array<...>>; description: ZodOptional<...>; }, "strict", ZodTypeAny, { ...; }, { ...; }>; ... 4 more ...; version: Zo...` |
944
+
945
+ [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/schemas/storage.ts#L225)
622
946
 
623
947
  #### :gear: BatchSchema
624
948
 
625
949
  | Constant | Type |
626
950
  | ------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
627
- | `BatchSchema` | `ZodObject<{ key: ZodObject<{ name: ZodString; full_path: ZodString; token: ZodOptional<ZodString>; collection: ZodString; owner: ZodType<Uint8Array<ArrayBufferLike>, ZodTypeDef, Uint8Array<...>>; description: ZodOptional<...>; }, "strip", ZodTypeAny, { ...; }, { ...; }>; reference_id: ZodOptional<...>; expires_at: Z...` |
951
+ | `BatchSchema` | `ZodObject<{ key: ZodObject<{ name: ZodString; full_path: ZodString; token: ZodOptional<ZodString>; collection: ZodString; owner: ZodType<Uint8Array<ArrayBufferLike>, ZodTypeDef, Uint8Array<...>>; description: ZodOptional<...>; }, "strict", ZodTypeAny, { ...; }, { ...; }>; reference_id: ZodOptional<...>; expires_at: ...` |
628
952
 
629
- [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/schemas/storage.ts#L213)
953
+ [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/schemas/storage.ts#L251)
630
954
 
631
955
  #### :gear: CommitBatchSchema
632
956
 
@@ -634,13 +958,29 @@ A schema that validates a value is an Uint8Array.
634
958
  | ------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
635
959
  | `CommitBatchSchema` | `ZodObject<{ batch_id: ZodBigInt; headers: ZodArray<ZodTuple<[ZodString, ZodString], null>, "many">; chunk_ids: ZodArray<ZodBigInt, "many">; }, "strict", ZodTypeAny, { ...; }, { ...; }>` |
636
960
 
637
- [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/schemas/storage.ts#L270)
961
+ [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/schemas/storage.ts#L308)
962
+
963
+ #### :gear: FullPathSchema
964
+
965
+ | Constant | Type |
966
+ | ---------------- | ----------- |
967
+ | `FullPathSchema` | `ZodString` |
968
+
969
+ [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/schemas/storage.ts#L339)
970
+
971
+ #### :gear: OptionAssetSchema
972
+
973
+ | Constant | Type |
974
+ | ------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
975
+ | `OptionAssetSchema` | `ZodOptional<ZodObject<{ key: ZodObject<{ name: ZodString; full_path: ZodString; token: ZodOptional<ZodString>; collection: ZodString; owner: ZodType<Uint8Array<ArrayBufferLike>, ZodTypeDef, Uint8Array<...>>; description: ZodOptional<...>; }, "strict", ZodTypeAny, { ...; }, { ...; }>; ... 4 more ...; version: ZodOpti...` |
976
+
977
+ [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/schemas/storage.ts#L352)
638
978
 
639
979
  #### :gear: AssetAssertUploadSchema
640
980
 
641
981
  | Constant | Type |
642
982
  | ------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
643
- | `AssetAssertUploadSchema` | `ZodObject<{ current: ZodOptional<ZodObject<{ key: ZodObject<{ name: ZodString; full_path: ZodString; token: ZodOptional<ZodString>; collection: ZodString; owner: ZodType<...>; description: ZodOptional<...>; }, "strip", ZodTypeAny, { ...; }, { ...; }>; ... 4 more ...; version: ZodOptional<...>; }, "strict", ZodTypeAn...` |
983
+ | `AssetAssertUploadSchema` | `ZodObject<{ current: ZodOptional<ZodObject<{ key: ZodObject<{ name: ZodString; full_path: ZodString; token: ZodOptional<ZodString>; collection: ZodString; owner: ZodType<...>; description: ZodOptional<...>; }, "strict", ZodTypeAny, { ...; }, { ...; }>; ... 4 more ...; version: ZodOptional<...>; }, "strict", ZodTypeA...` |
644
984
 
645
985
  [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/schemas/storage/payload.ts#L14)
646
986
 
@@ -812,6 +1152,54 @@ A schema that validates a value is an Uint8Array.
812
1152
 
813
1153
  [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/hooks.ts#L144)
814
1154
 
1155
+ #### :gear: TimestampMatcherSchema
1156
+
1157
+ | Constant | Type |
1158
+ | ------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
1159
+ | `TimestampMatcherSchema` | `ZodUnion<[ZodObject<{ equal: ZodBigInt; }, "strip", ZodTypeAny, { equal: bigint; }, { equal: bigint; }>, ZodObject<{ greater_than: ZodBigInt; }, "strip", ZodTypeAny, { ...; }, { ...; }>, ZodObject<...>, ZodObject<...>]>` |
1160
+
1161
+ [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/schemas/list.ts#L16)
1162
+
1163
+ #### :gear: ListMatcherSchema
1164
+
1165
+ | Constant | Type |
1166
+ | ------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
1167
+ | `ListMatcherSchema` | `ZodObject<{ key: ZodOptional<ZodString>; description: ZodOptional<ZodString>; created_at: ZodOptional<ZodUnion<[ZodObject<{ equal: ZodBigInt; }, "strip", ZodTypeAny, { ...; }, { ...; }>, ZodObject<...>, ZodObject<...>, ZodObject<...>]>>; updated_at: ZodOptional<...>; }, "strict", ZodTypeAny, { ...; }, { ...; }>` |
1168
+
1169
+ [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/schemas/list.ts#L35)
1170
+
1171
+ #### :gear: ListPaginateSchema
1172
+
1173
+ | Constant | Type |
1174
+ | -------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
1175
+ | `ListPaginateSchema` | `ZodObject<{ start_after: ZodOptional<ZodString>; limit: ZodOptional<ZodBigInt>; }, "strict", ZodTypeAny, { start_after?: string or undefined; limit?: bigint or undefined; }, { ...; }>` |
1176
+
1177
+ [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/schemas/list.ts#L57)
1178
+
1179
+ #### :gear: ListOrderFieldSchema
1180
+
1181
+ | Constant | Type |
1182
+ | ---------------------- | ----------------------------------------------- |
1183
+ | `ListOrderFieldSchema` | `ZodEnum<["keys", "created_at", "updated_at"]>` |
1184
+
1185
+ [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/schemas/list.ts#L75)
1186
+
1187
+ #### :gear: ListOrderSchema
1188
+
1189
+ | Constant | Type |
1190
+ | ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
1191
+ | `ListOrderSchema` | `ZodObject<{ desc: ZodBoolean; field: ZodEnum<["keys", "created_at", "updated_at"]>; }, "strict", ZodTypeAny, { desc: boolean; field: "keys" or "created_at" or "updated_at"; }, { ...; }>` |
1192
+
1193
+ [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/schemas/list.ts#L85)
1194
+
1195
+ #### :gear: ListParamsSchema
1196
+
1197
+ | Constant | Type |
1198
+ | ------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
1199
+ | `ListParamsSchema` | `ZodObject<{ matcher: ZodOptional<ZodObject<{ key: ZodOptional<ZodString>; description: ZodOptional<ZodString>; created_at: ZodOptional<ZodUnion<[ZodObject<{ equal: ZodBigInt; }, "strip", ZodTypeAny, { ...; }, { ...; }>, ZodObject<...>, ZodObject<...>, ZodObject<...>]>>; updated_at: ZodOptional<...>; }, "strict", Zod...` |
1200
+
1201
+ [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/schemas/list.ts#L103)
1202
+
815
1203
  #### :gear: ControllerScopeSchema
816
1204
 
817
1205
  | Constant | Type |
@@ -860,21 +1248,165 @@ A schema that validates a value is an Uint8Array.
860
1248
 
861
1249
  [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/schemas/controllers.ts#L99)
862
1250
 
1251
+ #### :gear: CollectionParamsSchema
1252
+
1253
+ | Constant | Type |
1254
+ | ------------------------ | --------------------------------------------------------------------------------------------------------------- |
1255
+ | `CollectionParamsSchema` | `ZodObject<{ collection: ZodString; }, "strict", ZodTypeAny, { collection: string; }, { collection: string; }>` |
1256
+
1257
+ [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/schemas/params.ts#L15)
1258
+
1259
+ #### :gear: ListStoreParamsSchema
1260
+
1261
+ | Constant | Type |
1262
+ | ----------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
1263
+ | `ListStoreParamsSchema` | `ZodObject<extendShape<{ collection: ZodString; }, { caller: ZodUnion<[ZodType<Uint8Array<ArrayBufferLike>, ZodTypeDef, Uint8Array<ArrayBufferLike>>, ZodType<...>]>; params: ZodObject<...>; }>, "strict", ZodTypeAny, { ...; }, { ...; }>` |
1264
+
1265
+ [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/schemas/params.ts#L34)
1266
+
1267
+ #### :gear: GetDocStoreParamsSchema
1268
+
1269
+ | Constant | Type |
1270
+ | ------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
1271
+ | `GetDocStoreParamsSchema` | `ZodObject<extendShape<{ collection: ZodString; }, { caller: ZodUnion<[ZodType<Uint8Array<ArrayBufferLike>, ZodTypeDef, Uint8Array<ArrayBufferLike>>, ZodType<...>]>; key: ZodString; }>, "strict", ZodTypeAny, { ...; }, { ...; }>` |
1272
+
1273
+ [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/schemas/db.ts#L20)
1274
+
863
1275
  #### :gear: SetDocStoreParamsSchema
864
1276
 
865
- | Constant | Type |
866
- | ------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
867
- | `SetDocStoreParamsSchema` | `ZodObject<extendShape<{ caller: ZodUnion<[ZodType<Uint8Array<ArrayBufferLike>, ZodTypeDef, Uint8Array<ArrayBufferLike>>, ZodType<...>]>; collection: ZodString; key: ZodString; }, { ...; }>, "strict", ZodTypeAny, { ...; }, { ...; }>` |
1277
+ | Constant | Type |
1278
+ | ------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
1279
+ | `SetDocStoreParamsSchema` | `ZodObject<extendShape<extendShape<{ collection: ZodString; }, { caller: ZodUnion<[ZodType<Uint8Array<ArrayBufferLike>, ZodTypeDef, Uint8Array<ArrayBufferLike>>, ZodType<...>]>; key: ZodString; }>, { ...; }>, "strict", ZodTypeAny, { ...; }, { ...; }>` |
868
1280
 
869
- [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/schemas/db.ts#L46)
1281
+ [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/schemas/db.ts#L43)
870
1282
 
871
1283
  #### :gear: DeleteDocStoreParamsSchema
872
1284
 
873
- | Constant | Type |
874
- | ---------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
875
- | `DeleteDocStoreParamsSchema` | `ZodObject<extendShape<{ caller: ZodUnion<[ZodType<Uint8Array<ArrayBufferLike>, ZodTypeDef, Uint8Array<ArrayBufferLike>>, ZodType<...>]>; collection: ZodString; key: ZodString; }, { ...; }>, "strict", ZodTypeAny, { ...; }, { ...; }>` |
1285
+ | Constant | Type |
1286
+ | ---------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
1287
+ | `DeleteDocStoreParamsSchema` | `ZodObject<extendShape<extendShape<{ collection: ZodString; }, { caller: ZodUnion<[ZodType<Uint8Array<ArrayBufferLike>, ZodTypeDef, Uint8Array<ArrayBufferLike>>, ZodType<...>]>; key: ZodString; }>, { ...; }>, "strict", ZodTypeAny, { ...; }, { ...; }>` |
1288
+
1289
+ [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/schemas/db.ts#L63)
1290
+
1291
+ #### :gear: CountCollectionDocsStoreParamsSchema
1292
+
1293
+ | Constant | Type |
1294
+ | -------------------------------------- | --------------------------------------------------------------------------------------------------------------- |
1295
+ | `CountCollectionDocsStoreParamsSchema` | `ZodObject<{ collection: ZodString; }, "strict", ZodTypeAny, { collection: string; }, { collection: string; }>` |
1296
+
1297
+ [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/schemas/db.ts#L83)
1298
+
1299
+ #### :gear: CountDocsStoreParamsSchema
1300
+
1301
+ | Constant | Type |
1302
+ | ---------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
1303
+ | `CountDocsStoreParamsSchema` | `ZodObject<extendShape<{ collection: ZodString; }, { caller: ZodUnion<[ZodType<Uint8Array<ArrayBufferLike>, ZodTypeDef, Uint8Array<ArrayBufferLike>>, ZodType<...>]>; params: ZodObject<...>; }>, "strict", ZodTypeAny, { ...; }, { ...; }>` |
1304
+
1305
+ [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/schemas/db.ts#L93)
1306
+
1307
+ #### :gear: ListDocsStoreParamsSchema
1308
+
1309
+ | Constant | Type |
1310
+ | --------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
1311
+ | `ListDocsStoreParamsSchema` | `ZodObject<extendShape<{ collection: ZodString; }, { caller: ZodUnion<[ZodType<Uint8Array<ArrayBufferLike>, ZodTypeDef, Uint8Array<ArrayBufferLike>>, ZodType<...>]>; params: ZodObject<...>; }>, "strict", ZodTypeAny, { ...; }, { ...; }>` |
1312
+
1313
+ [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/schemas/db.ts#L103)
1314
+
1315
+ #### :gear: DeleteDocsStoreParamsSchema
1316
+
1317
+ | Constant | Type |
1318
+ | ----------------------------- | --------------------------------------------------------------------------------------------------------------- |
1319
+ | `DeleteDocsStoreParamsSchema` | `ZodObject<{ collection: ZodString; }, "strict", ZodTypeAny, { collection: string; }, { collection: string; }>` |
1320
+
1321
+ [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/schemas/db.ts#L113)
1322
+
1323
+ #### :gear: DeleteFilteredDocsStoreParamsSchema
1324
+
1325
+ | Constant | Type |
1326
+ | ------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
1327
+ | `DeleteFilteredDocsStoreParamsSchema` | `ZodObject<extendShape<{ collection: ZodString; }, { caller: ZodUnion<[ZodType<Uint8Array<ArrayBufferLike>, ZodTypeDef, Uint8Array<ArrayBufferLike>>, ZodType<...>]>; params: ZodObject<...>; }>, "strict", ZodTypeAny, { ...; }, { ...; }>` |
1328
+
1329
+ [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/schemas/db.ts#L123)
1330
+
1331
+ #### :gear: MemorySchema
1332
+
1333
+ | Constant | Type |
1334
+ | -------------- | ----------------------------- |
1335
+ | `MemorySchema` | `ZodEnum<["heap", "stable"]>` |
1336
+
1337
+ [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/schemas/collections.ts#L6)
1338
+
1339
+ #### :gear: GetAssetStoreParamsSchema
1340
+
1341
+ | Constant | Type |
1342
+ | --------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
1343
+ | `GetAssetStoreParamsSchema` | `ZodObject<extendShape<{ collection: ZodString; }, { caller: ZodUnion<[ZodType<Uint8Array<ArrayBufferLike>, ZodTypeDef, Uint8Array<ArrayBufferLike>>, ZodType<...>]>; full_path: ZodString; }>, "strict", ZodTypeAny, { ...; }, { ...; }>` |
1344
+
1345
+ [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/schemas/storage.ts#L26)
1346
+
1347
+ #### :gear: CountCollectionAssetsStoreParamsSchema
1348
+
1349
+ | Constant | Type |
1350
+ | ---------------------------------------- | --------------------------------------------------------------------------------------------------------------- |
1351
+ | `CountCollectionAssetsStoreParamsSchema` | `ZodObject<{ collection: ZodString; }, "strict", ZodTypeAny, { collection: string; }, { collection: string; }>` |
1352
+
1353
+ [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/schemas/storage.ts#L49)
1354
+
1355
+ #### :gear: CountAssetsStoreParamsSchema
1356
+
1357
+ | Constant | Type |
1358
+ | ------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
1359
+ | `CountAssetsStoreParamsSchema` | `ZodObject<extendShape<{ collection: ZodString; }, { caller: ZodUnion<[ZodType<Uint8Array<ArrayBufferLike>, ZodTypeDef, Uint8Array<ArrayBufferLike>>, ZodType<...>]>; params: ZodObject<...>; }>, "strict", ZodTypeAny, { ...; }, { ...; }>` |
1360
+
1361
+ [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/schemas/storage.ts#L59)
1362
+
1363
+ #### :gear: SetAssetHandlerParamsSchema
1364
+
1365
+ | Constant | Type |
1366
+ | ----------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
1367
+ | `SetAssetHandlerParamsSchema` | `ZodObject<{ key: ZodObject<{ name: ZodString; full_path: ZodString; token: ZodOptional<ZodString>; collection: ZodString; owner: ZodType<Uint8Array<ArrayBufferLike>, ZodTypeDef, Uint8Array<...>>; description: ZodOptional<...>; }, "strict", ZodTypeAny, { ...; }, { ...; }>; content: ZodType<...>; headers: ZodArray<......` |
1368
+
1369
+ [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/schemas/storage.ts#L69)
1370
+
1371
+ #### :gear: DeleteAssetsStoreParamsSchema
1372
+
1373
+ | Constant | Type |
1374
+ | ------------------------------- | --------------------------------------------------------------------------------------------------------------- |
1375
+ | `DeleteAssetsStoreParamsSchema` | `ZodObject<{ collection: ZodString; }, "strict", ZodTypeAny, { collection: string; }, { collection: string; }>` |
1376
+
1377
+ [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/schemas/storage.ts#L100)
1378
+
1379
+ #### :gear: DeleteFilteredAssetsStoreParamsSchema
1380
+
1381
+ | Constant | Type |
1382
+ | --------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
1383
+ | `DeleteFilteredAssetsStoreParamsSchema` | `ZodObject<extendShape<{ collection: ZodString; }, { caller: ZodUnion<[ZodType<Uint8Array<ArrayBufferLike>, ZodTypeDef, Uint8Array<ArrayBufferLike>>, ZodType<...>]>; params: ZodObject<...>; }>, "strict", ZodTypeAny, { ...; }, { ...; }>` |
1384
+
1385
+ [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/schemas/storage.ts#L110)
1386
+
1387
+ #### :gear: DeleteAssetStoreParamsSchema
1388
+
1389
+ | Constant | Type |
1390
+ | ------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
1391
+ | `DeleteAssetStoreParamsSchema` | `ZodObject<extendShape<{ collection: ZodString; }, { caller: ZodUnion<[ZodType<Uint8Array<ArrayBufferLike>, ZodTypeDef, Uint8Array<ArrayBufferLike>>, ZodType<...>]>; full_path: ZodString; }>, "strict", ZodTypeAny, { ...; }, { ...; }>` |
1392
+
1393
+ [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/schemas/storage.ts#L120)
876
1394
 
877
- [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/schemas/db.ts#L66)
1395
+ #### :gear: ListAssetsStoreParamsSchema
1396
+
1397
+ | Constant | Type |
1398
+ | ----------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
1399
+ | `ListAssetsStoreParamsSchema` | `ZodObject<extendShape<{ collection: ZodString; }, { caller: ZodUnion<[ZodType<Uint8Array<ArrayBufferLike>, ZodTypeDef, Uint8Array<ArrayBufferLike>>, ZodType<...>]>; params: ZodObject<...>; }>, "strict", ZodTypeAny, { ...; }, { ...; }>` |
1400
+
1401
+ [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/schemas/storage.ts#L130)
1402
+
1403
+ #### :gear: GetContentChunksStoreParamsSchema
1404
+
1405
+ | Constant | Type |
1406
+ | ----------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
1407
+ | `GetContentChunksStoreParamsSchema` | `ZodObject<{ encoding: ZodObject<{ modified: ZodBigInt; content_chunks: ZodArray<ZodType<Uint8Array<ArrayBufferLike>, ZodTypeDef, Uint8Array<ArrayBufferLike>>, "many">; total_length: ZodBigInt; sha256: ZodEffects<...>; }, "strip", ZodTypeAny, { ...; }, { ...; }>; chunk_index: ZodBigInt; memory: ZodEnum<...>; }, "stri...` |
1408
+
1409
+ [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/schemas/storage.ts#L140)
878
1410
 
879
1411
  #### :gear: IDLTypeSchema
880
1412
 
@@ -939,9 +1471,16 @@ Schema for encoding the call arguments.
939
1471
  - [Batch](#gear-batch)
940
1472
  - [CommitBatch](#gear-commitbatch)
941
1473
  - [AssetAssertUpload](#gear-assetassertupload)
1474
+ - [ListMatcher](#gear-listmatcher)
1475
+ - [ListPaginate](#gear-listpaginate)
1476
+ - [ListOrder](#gear-listorder)
1477
+ - [ListParams](#gear-listparams)
1478
+ - [ListResults](#gear-listresults)
942
1479
  - [Controller](#gear-controller)
943
1480
  - [ControllerCheckParams](#gear-controllercheckparams)
944
- - [DocStoreParams](#gear-docstoreparams)
1481
+ - [CollectionParams](#gear-collectionparams)
1482
+ - [SetAssetHandlerParams](#gear-setassethandlerparams)
1483
+ - [GetContentChunksStoreParams](#gear-getcontentchunksstoreparams)
945
1484
  - [CallParams](#gear-callparams)
946
1485
 
947
1486
  #### :gear: Collections
@@ -1067,25 +1606,25 @@ Represents a specific encoding of an asset, such as "gzip" or "identity" (no com
1067
1606
 
1068
1607
  A stored asset including its metadata, encodings, and timestamps.
1069
1608
 
1070
- | Property | Type | Description |
1071
- | ------------ | ------------------------------- | ---------------------------------------------------------------------------------------------- |
1072
- | `key` | `AssetKey` | Metadata about the asset's identity and ownership. |
1073
- | `headers` | `HeaderField[]` | Optional HTTP headers associated with the asset. |
1074
- | `encodings` | `Record<string, AssetEncoding>` | A mapping from encoding types (e.g., "identity", "gzip") to the corresponding encoded version. |
1075
- | `created_at` | `bigint` | Timestamp when the asset was created. |
1076
- | `updated_at` | `bigint` | Timestamp when the asset was last updated. |
1077
- | `version` | `bigint or undefined` | Optional version number of the asset. |
1609
+ | Property | Type | Description |
1610
+ | ------------ | --------------------------------- | ---------------------------------------------------------------------------------------------- |
1611
+ | `key` | `AssetKey` | Metadata about the asset's identity and ownership. |
1612
+ | `headers` | `HeaderField[]` | Optional HTTP headers associated with the asset. |
1613
+ | `encodings` | `[EncodingType, AssetEncoding][]` | A mapping from encoding types (e.g., "identity", "gzip") to the corresponding encoded version. |
1614
+ | `created_at` | `bigint` | Timestamp when the asset was created. |
1615
+ | `updated_at` | `bigint` | Timestamp when the asset was last updated. |
1616
+ | `version` | `bigint or undefined` | Optional version number of the asset. |
1078
1617
 
1079
1618
  #### :gear: Batch
1080
1619
 
1081
1620
  Represents a batch of chunks to be uploaded and committed to an asset.
1082
1621
 
1083
- | Property | Type | Description |
1084
- | --------------- | --------------------- | ------------------------------------------------- |
1085
- | `key` | `AssetKey` | The metadata key for the asset being uploaded. |
1086
- | `reference_id` | `bigint or undefined` | Optional reference ID for tracking or validation. |
1087
- | `expires_at` | `bigint` | Timestamp when this batch expires. |
1088
- | `encoding_type` | `string or undefined` | Optional encoding format (e.g., "gzip"). |
1622
+ | Property | Type | Description |
1623
+ | --------------- | --------------------------- | ------------------------------------------------- |
1624
+ | `key` | `AssetKey` | The metadata key for the asset being uploaded. |
1625
+ | `reference_id` | `bigint or undefined` | Optional reference ID for tracking or validation. |
1626
+ | `expires_at` | `bigint` | Timestamp when this batch expires. |
1627
+ | `encoding_type` | `EncodingType or undefined` | Optional encoding format (e.g., "gzip"). |
1089
1628
 
1090
1629
  #### :gear: CommitBatch
1091
1630
 
@@ -1107,6 +1646,58 @@ Represents a validation context before uploading an asset.
1107
1646
  | `batch` | `Batch` | The batch metadata being uploaded. |
1108
1647
  | `commit_batch` | `CommitBatch` | The commit data describing headers and chunk ids. |
1109
1648
 
1649
+ #### :gear: ListMatcher
1650
+
1651
+ Matcher used to filter list results.
1652
+
1653
+ | Property | Type | Description |
1654
+ | ------------- | ------------------------------- | ----------- |
1655
+ | `key` | `string or undefined` | |
1656
+ | `description` | `string or undefined` | |
1657
+ | `created_at` | `TimestampMatcher or undefined` | |
1658
+ | `updated_at` | `TimestampMatcher or undefined` | |
1659
+
1660
+ #### :gear: ListPaginate
1661
+
1662
+ Optional pagination controls for listing.
1663
+
1664
+ | Property | Type | Description |
1665
+ | ------------- | --------------------- | ----------- |
1666
+ | `start_after` | `string or undefined` | |
1667
+ | `limit` | `bigint or undefined` | |
1668
+
1669
+ #### :gear: ListOrder
1670
+
1671
+ Ordering strategy for listing documents.
1672
+
1673
+ | Property | Type | Description |
1674
+ | -------- | ---------------- | ----------- |
1675
+ | `desc` | `boolean` | |
1676
+ | `field` | `ListOrderField` | |
1677
+
1678
+ #### :gear: ListParams
1679
+
1680
+ Full set of listing parameters.
1681
+
1682
+ | Property | Type | Description |
1683
+ | ---------- | ------------------------------------------ | ----------- |
1684
+ | `matcher` | `ListMatcher or undefined` | |
1685
+ | `paginate` | `ListPaginate or undefined` | |
1686
+ | `order` | `ListOrder or undefined` | |
1687
+ | `owner` | `Uint8Array<ArrayBufferLike> or undefined` | |
1688
+
1689
+ #### :gear: ListResults
1690
+
1691
+ List results, parameterized by type of returned item.
1692
+
1693
+ | Property | Type | Description |
1694
+ | ---------------- | --------------------- | ----------- |
1695
+ | `items` | `[string, T][]` | |
1696
+ | `items_length` | `bigint` | |
1697
+ | `items_page` | `bigint or undefined` | |
1698
+ | `matches_length` | `bigint` | |
1699
+ | `matches_pages` | `bigint or undefined` | |
1700
+
1110
1701
  #### :gear: Controller
1111
1702
 
1112
1703
  Represents a controller with access scope and associated metadata.
@@ -1128,15 +1719,33 @@ Represents the parameters required to perform controller checks.
1128
1719
  | `caller` | `Uint8Array<ArrayBufferLike> or Principal` | The identity of the caller to verify against the controller list. |
1129
1720
  | `controllers` | `[Uint8Array<ArrayBufferLike>, { created_at: bigint; updated_at: bigint; metadata: [string, string][]; scope: "write" or "admin"; expires_at?: bigint or undefined; }][]` | The list of controllers to check against. |
1130
1721
 
1131
- #### :gear: DocStoreParams
1722
+ #### :gear: CollectionParams
1132
1723
 
1133
- Represents the base parameters required to access the datastore and modify a document.
1724
+ The parameters required to scope an operation to a collection.
1134
1725
 
1135
- | Property | Type | Description |
1136
- | ------------ | ------------------------------------------ | -------------------------------------------------------- |
1137
- | `caller` | `Uint8Array<ArrayBufferLike> or Principal` | The caller who initiate the document operation. |
1138
- | `collection` | `string` | The name of the collection where the document is stored. |
1139
- | `key` | `string` | The key identifying the document within the collection. |
1726
+ | Property | Type | Description |
1727
+ | ------------ | -------- | ------------------------------------- |
1728
+ | `collection` | `string` | The name of the collection to target. |
1729
+
1730
+ #### :gear: SetAssetHandlerParams
1731
+
1732
+ The parameters required to set (or update) an asset.
1733
+
1734
+ | Property | Type | Description |
1735
+ | --------- | -------------- | -------------------------------- |
1736
+ | `key` | `AssetKey` | The key identifying the asset. |
1737
+ | `content` | `Blob` | The binary content of the asset. |
1738
+ | `headers` | `HeaderFields` | Associated HTTP headers. |
1739
+
1740
+ #### :gear: GetContentChunksStoreParams
1741
+
1742
+ The parameters required to retrieve a specific chunk from an asset.
1743
+
1744
+ | Property | Type | Description |
1745
+ | ------------- | -------------------- | ------------------------------------------- |
1746
+ | `encoding` | `AssetEncoding` | The encoding of the chunks. |
1747
+ | `chunk_index` | `bigint` | The index of the chunk to retrieve. |
1748
+ | `memory` | `"heap" or "stable"` | The memory type to retrieve the chunk from. |
1140
1749
 
1141
1750
  #### :gear: CallParams
1142
1751
 
@@ -1173,13 +1782,18 @@ Type representing the parameters required to make a canister call.
1173
1782
  - [AssertDeleteDocContext](#gear-assertdeletedoccontext)
1174
1783
  - [SatelliteEnv](#gear-satelliteenv)
1175
1784
  - [HeaderField](#gear-headerfield)
1785
+ - [HeaderFields](#gear-headerfields)
1176
1786
  - [Blob](#gear-blob)
1177
1787
  - [BlobOrKey](#gear-bloborkey)
1178
1788
  - [Hash](#gear-hash)
1789
+ - [AssetEncodingNoContent](#gear-assetencodingnocontent)
1179
1790
  - [EncodingType](#gear-encodingtype)
1791
+ - [AssetNoContent](#gear-assetnocontent)
1180
1792
  - [ReferenceId](#gear-referenceid)
1181
1793
  - [ChunkId](#gear-chunkid)
1182
1794
  - [BatchId](#gear-batchid)
1795
+ - [FullPath](#gear-fullpath)
1796
+ - [OptionAsset](#gear-optionasset)
1183
1797
  - [OnUploadAssetContext](#gear-onuploadassetcontext)
1184
1798
  - [OnDeleteAssetContext](#gear-ondeleteassetcontext)
1185
1799
  - [OnDeleteManyAssetsContext](#gear-ondeletemanyassetscontext)
@@ -1207,12 +1821,29 @@ Type representing the parameters required to make a canister call.
1207
1821
  - [Hook](#gear-hook)
1208
1822
  - [HookFn](#gear-hookfn)
1209
1823
  - [HookFnOrObject](#gear-hookfnorobject)
1824
+ - [TimestampMatcher](#gear-timestampmatcher)
1825
+ - [ListOrderField](#gear-listorderfield)
1210
1826
  - [ControllerScope](#gear-controllerscope)
1211
1827
  - [Metadata](#gear-metadata)
1212
1828
  - [ControllerRecord](#gear-controllerrecord)
1213
1829
  - [Controllers](#gear-controllers)
1830
+ - [ListStoreParams](#gear-liststoreparams)
1831
+ - [GetDocStoreParams](#gear-getdocstoreparams)
1214
1832
  - [SetDocStoreParams](#gear-setdocstoreparams)
1215
1833
  - [DeleteDocStoreParams](#gear-deletedocstoreparams)
1834
+ - [CountCollectionDocsStoreParams](#gear-countcollectiondocsstoreparams)
1835
+ - [CountDocsStoreParams](#gear-countdocsstoreparams)
1836
+ - [ListDocsStoreParams](#gear-listdocsstoreparams)
1837
+ - [DeleteDocsStoreParams](#gear-deletedocsstoreparams)
1838
+ - [DeleteFilteredDocsStoreParams](#gear-deletefiltereddocsstoreparams)
1839
+ - [Memory](#gear-memory)
1840
+ - [GetAssetStoreParams](#gear-getassetstoreparams)
1841
+ - [CountCollectionAssetsStoreParams](#gear-countcollectionassetsstoreparams)
1842
+ - [CountAssetsStoreParams](#gear-countassetsstoreparams)
1843
+ - [DeleteAssetsStoreParams](#gear-deleteassetsstoreparams)
1844
+ - [DeleteFilteredAssetsStoreParams](#gear-deletefilteredassetsstoreparams)
1845
+ - [DeleteAssetStoreParams](#gear-deleteassetstoreparams)
1846
+ - [ListAssetsStoreParams](#gear-listassetsstoreparams)
1216
1847
  - [IDLType](#gear-idltype)
1217
1848
  - [CallArg](#gear-callarg)
1218
1849
  - [CallArgs](#gear-callargs)
@@ -1479,6 +2110,16 @@ Represents a single HTTP header as a tuple of name and value.
1479
2110
 
1480
2111
  [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/schemas/storage.ts#L24)
1481
2112
 
2113
+ #### :gear: HeaderFields
2114
+
2115
+ Represents a list of HTTP headers.
2116
+
2117
+ | Type | Type |
2118
+ | -------------- | --------------- |
2119
+ | `HeaderFields` | `HeaderField[]` |
2120
+
2121
+ [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/schemas/storage.ts#L34)
2122
+
1482
2123
  #### :gear: Blob
1483
2124
 
1484
2125
  Binary content used in asset encoding.
@@ -1487,7 +2128,7 @@ Binary content used in asset encoding.
1487
2128
  | ------ | ------------ |
1488
2129
  | `Blob` | `Uint8Array` |
1489
2130
 
1490
- [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/schemas/storage.ts#L34)
2131
+ [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/schemas/storage.ts#L44)
1491
2132
 
1492
2133
  #### :gear: BlobOrKey
1493
2134
 
@@ -1497,7 +2138,7 @@ When stable memory is used, chunks are saved within a StableBTreeMap and their k
1497
2138
  | ----------- | ------------ |
1498
2139
  | `BlobOrKey` | `Uint8Array` |
1499
2140
 
1500
- [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/schemas/storage.ts#L44)
2141
+ [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/schemas/storage.ts#L54)
1501
2142
 
1502
2143
  #### :gear: Hash
1503
2144
 
@@ -1507,17 +2148,37 @@ Represents a SHA-256 hash as a 32-byte binary value.
1507
2148
  | ------ | ------------ |
1508
2149
  | `Hash` | `Uint8Array` |
1509
2150
 
1510
- [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/schemas/storage.ts#L56)
2151
+ [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/schemas/storage.ts#L66)
2152
+
2153
+ #### :gear: AssetEncodingNoContent
2154
+
2155
+ Represents a specific encoding of an asset, such as "gzip" or "identity" (no compression), without the chunks.
2156
+
2157
+ | Type | Type |
2158
+ | ------------------------ | --------------------------------------- |
2159
+ | `AssetEncodingNoContent` | `Omit<AssetEncoding, 'content_chunks'>` |
2160
+
2161
+ [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/schemas/storage.ts#L161)
1511
2162
 
1512
2163
  #### :gear: EncodingType
1513
2164
 
1514
2165
  A string identifier representing a specific encoding format (e.g., "gzip", "identity").
1515
2166
 
1516
- | Type | Type |
1517
- | -------------- | ---- |
1518
- | `EncodingType` | |
2167
+ | Type | Type |
2168
+ | -------------- | --------------------------------------------------------- |
2169
+ | `EncodingType` | `'identity' or 'gzip' or 'compress' or 'deflate' or 'br'` |
2170
+
2171
+ [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/schemas/storage.ts#L171)
1519
2172
 
1520
- [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/schemas/storage.ts#L198)
2173
+ #### :gear: AssetNoContent
2174
+
2175
+ A stored asset including its metadata, encodings without chunks, and timestamps.
2176
+
2177
+ | Type | Type |
2178
+ | ---------------- | --------------------------------------------------------------------------------------- |
2179
+ | `AssetNoContent` | `Omit<Asset, 'encodings'> and { encodings: [EncodingType, AssetEncodingNoContent][]; }` |
2180
+
2181
+ [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/schemas/storage.ts#L234)
1521
2182
 
1522
2183
  #### :gear: ReferenceId
1523
2184
 
@@ -1527,7 +2188,7 @@ A unique reference identifier for batches.
1527
2188
  | ------------- | ---- |
1528
2189
  | `ReferenceId` | |
1529
2190
 
1530
- [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/schemas/storage.ts#L208)
2191
+ [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/schemas/storage.ts#L246)
1531
2192
 
1532
2193
  #### :gear: ChunkId
1533
2194
 
@@ -1537,7 +2198,7 @@ A unique identifier representing a single chunk of data.
1537
2198
  | --------- | ---- |
1538
2199
  | `ChunkId` | |
1539
2200
 
1540
- [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/schemas/storage.ts#L255)
2201
+ [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/schemas/storage.ts#L293)
1541
2202
 
1542
2203
  #### :gear: BatchId
1543
2204
 
@@ -1547,7 +2208,30 @@ A unique identifier representing a batch of upload.
1547
2208
  | --------- | ---- |
1548
2209
  | `BatchId` | |
1549
2210
 
1550
- [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/schemas/storage.ts#L265)
2211
+ [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/schemas/storage.ts#L303)
2212
+
2213
+ #### :gear: FullPath
2214
+
2215
+ Represents the relative path of an asset in storage.
2216
+ For assets that are not part of the frontend app, the collection must be included at the root of the path.
2217
+
2218
+ Example: `/images/a-sun-above-the-mountains.png`
2219
+
2220
+ | Type | Type |
2221
+ | ---------- | ---- |
2222
+ | `FullPath` | |
2223
+
2224
+ [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/schemas/storage.ts#L347)
2225
+
2226
+ #### :gear: OptionAsset
2227
+
2228
+ A shorthand for an asset that might or not be defined.
2229
+
2230
+ | Type | Type |
2231
+ | ------------- | -------------------- |
2232
+ | `OptionAsset` | `Asset or undefined` |
2233
+
2234
+ [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/schemas/storage.ts#L357)
1551
2235
 
1552
2236
  #### :gear: OnUploadAssetContext
1553
2237
 
@@ -1825,6 +2509,26 @@ All hooks definitions.
1825
2509
 
1826
2510
  [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/hooks/hooks.ts#L176)
1827
2511
 
2512
+ #### :gear: TimestampMatcher
2513
+
2514
+ TimestampMatcher matches a timestamp field using a specific strategy.
2515
+
2516
+ | Type | Type |
2517
+ | ------------------ | ---- | --------------------------------------------------------------------------------------------------------------- |
2518
+ | `TimestampMatcher` | ` | {equal: Timestamp} or {greater_than: Timestamp} or {less_than: Timestamp} or {between: [Timestamp, Timestamp]}` |
2519
+
2520
+ [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/schemas/list.ts#L26)
2521
+
2522
+ #### :gear: ListOrderField
2523
+
2524
+ Enum representing possible fields to order by.
2525
+
2526
+ | Type | Type |
2527
+ | ---------------- | ---------------------------------------- |
2528
+ | `ListOrderField` | `'keys' or 'updated_at' or 'created_at'` |
2529
+
2530
+ [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/schemas/list.ts#L80)
2531
+
1828
2532
  #### :gear: ControllerScope
1829
2533
 
1830
2534
  Represents the permission scope of a controller.
@@ -1865,6 +2569,26 @@ Represents a list of controllers.
1865
2569
 
1866
2570
  [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/schemas/controllers.ts#L94)
1867
2571
 
2572
+ #### :gear: ListStoreParams
2573
+
2574
+ The parameters required to list documents from the datastore respectively assets from the storage.
2575
+
2576
+ | Type | Type |
2577
+ | ----------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
2578
+ | `ListStoreParams` | `CollectionParams and { /** * The identity of the caller requesting the list operation. */ caller: RawUserId or UserId; /** * Optional filtering, ordering, and pagination parameters. */ params: ListParams; }` |
2579
+
2580
+ [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/schemas/params.ts#L42)
2581
+
2582
+ #### :gear: GetDocStoreParams
2583
+
2584
+ Represents the base parameters required to access the datastore and modify a document.
2585
+
2586
+ | Type | Type |
2587
+ | ------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
2588
+ | `GetDocStoreParams` | `CollectionParams and { /** * The caller who initiate the document operation. */ caller: RawUserId or UserId; /** * The key identifying the document within the collection. */ key: Key; }` |
2589
+
2590
+ [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/schemas/db.ts#L28)
2591
+
1868
2592
  #### :gear: SetDocStoreParams
1869
2593
 
1870
2594
  Represents the parameters required to store or update a document.
@@ -1872,11 +2596,11 @@ Represents the parameters required to store or update a document.
1872
2596
  This includes the document data along with metadata such as the caller,
1873
2597
  collection, and key.
1874
2598
 
1875
- | Type | Type |
1876
- | ------------------- | ---------------------------------------------------------------------------------------------------------------------------------- |
1877
- | `SetDocStoreParams` | `DocStoreParams and { /** * The data, optional description and version required to create or update a document. */ doc: SetDoc; }` |
2599
+ | Type | Type |
2600
+ | ------------------- | ------------------------------------------------------------------------------------------------------------------------------------- |
2601
+ | `SetDocStoreParams` | `GetDocStoreParams and { /** * The data, optional description and version required to create or update a document. */ doc: SetDoc; }` |
1878
2602
 
1879
- [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/schemas/db.ts#L56)
2603
+ [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/schemas/db.ts#L53)
1880
2604
 
1881
2605
  #### :gear: DeleteDocStoreParams
1882
2606
 
@@ -1885,11 +2609,141 @@ Represents the parameters required to delete a document.
1885
2609
  This includes the document version along with metadata such as the caller,
1886
2610
  collection, and key.
1887
2611
 
1888
- | Type | Type |
1889
- | ---------------------- | ----------------------------------------------------------------------------------------- |
1890
- | `DeleteDocStoreParams` | `DocStoreParams and { /** * The version required to delete a document. */ doc: DelDoc; }` |
2612
+ | Type | Type |
2613
+ | ---------------------- | -------------------------------------------------------------------------------------------- |
2614
+ | `DeleteDocStoreParams` | `GetDocStoreParams and { /** * The version required to delete a document. */ doc: DelDoc; }` |
2615
+
2616
+ [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/schemas/db.ts#L73)
2617
+
2618
+ #### :gear: CountCollectionDocsStoreParams
2619
+
2620
+ The parameters required to count documents from the datastore.
2621
+
2622
+ | Type | Type |
2623
+ | -------------------------------- | ------------------ |
2624
+ | `CountCollectionDocsStoreParams` | `CollectionParams` |
2625
+
2626
+ [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/schemas/db.ts#L88)
2627
+
2628
+ #### :gear: CountDocsStoreParams
2629
+
2630
+ The parameters required to count documents from the datastore.
2631
+
2632
+ | Type | Type |
2633
+ | ---------------------- | ----------------- |
2634
+ | `CountDocsStoreParams` | `ListStoreParams` |
2635
+
2636
+ [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/schemas/db.ts#L98)
2637
+
2638
+ #### :gear: ListDocsStoreParams
2639
+
2640
+ The parameters required to list documents from the datastore.
2641
+
2642
+ | Type | Type |
2643
+ | --------------------- | ----------------- |
2644
+ | `ListDocsStoreParams` | `ListStoreParams` |
2645
+
2646
+ [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/schemas/db.ts#L108)
2647
+
2648
+ #### :gear: DeleteDocsStoreParams
2649
+
2650
+ The parameters required to delete the documents from a collection of the datastore.
2651
+
2652
+ | Type | Type |
2653
+ | ----------------------- | ------------------ |
2654
+ | `DeleteDocsStoreParams` | `CollectionParams` |
2655
+
2656
+ [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/schemas/db.ts#L118)
2657
+
2658
+ #### :gear: DeleteFilteredDocsStoreParams
2659
+
2660
+ The parameters required to delete documents from the datastore.
2661
+
2662
+ | Type | Type |
2663
+ | ------------------------------- | ----------------- |
2664
+ | `DeleteFilteredDocsStoreParams` | `ListStoreParams` |
2665
+
2666
+ [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/schemas/db.ts#L128)
2667
+
2668
+ #### :gear: Memory
2669
+
2670
+ Memory type used to select storage or datastore location.
2671
+
2672
+ | Type | Type |
2673
+ | -------- | ------------------------------ |
2674
+ | `Memory` | `z.infer<typeof MemorySchema>` |
2675
+
2676
+ [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/schemas/collections.ts#L11)
2677
+
2678
+ #### :gear: GetAssetStoreParams
2679
+
2680
+ Represents the base parameters required to access the storage and modify an asset.
2681
+
2682
+ | Type | Type |
2683
+ | --------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
2684
+ | `GetAssetStoreParams` | `CollectionParams and { /** * The caller who initiate the document operation. */ caller: RawUserId or UserId; /** * The full_path identifying the asset within the collection. */ full_path: FullPath; }` |
2685
+
2686
+ [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/schemas/storage.ts#L34)
2687
+
2688
+ #### :gear: CountCollectionAssetsStoreParams
2689
+
2690
+ The parameters required to count documents from the storage.
2691
+
2692
+ | Type | Type |
2693
+ | ---------------------------------- | ------------------ |
2694
+ | `CountCollectionAssetsStoreParams` | `CollectionParams` |
2695
+
2696
+ [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/schemas/storage.ts#L54)
2697
+
2698
+ #### :gear: CountAssetsStoreParams
2699
+
2700
+ The parameters required to count documents from the storage.
2701
+
2702
+ | Type | Type |
2703
+ | ------------------------ | ----------------- |
2704
+ | `CountAssetsStoreParams` | `ListStoreParams` |
2705
+
2706
+ [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/schemas/storage.ts#L64)
2707
+
2708
+ #### :gear: DeleteAssetsStoreParams
2709
+
2710
+ The parameters required to delete the assets from a collection of the storage.
2711
+
2712
+ | Type | Type |
2713
+ | ------------------------- | ------------------ |
2714
+ | `DeleteAssetsStoreParams` | `CollectionParams` |
2715
+
2716
+ [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/schemas/storage.ts#L105)
2717
+
2718
+ #### :gear: DeleteFilteredAssetsStoreParams
2719
+
2720
+ The parameters required to delete assets from the storage.
2721
+
2722
+ | Type | Type |
2723
+ | --------------------------------- | ----------------- |
2724
+ | `DeleteFilteredAssetsStoreParams` | `ListStoreParams` |
2725
+
2726
+ [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/schemas/storage.ts#L115)
2727
+
2728
+ #### :gear: DeleteAssetStoreParams
2729
+
2730
+ Represents the parameters required to delete an asset.
2731
+
2732
+ | Type | Type |
2733
+ | ------------------------ | --------------------- |
2734
+ | `DeleteAssetStoreParams` | `GetAssetStoreParams` |
2735
+
2736
+ [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/schemas/storage.ts#L125)
2737
+
2738
+ #### :gear: ListAssetsStoreParams
2739
+
2740
+ The parameters required to list documents from the datastore.
2741
+
2742
+ | Type | Type |
2743
+ | ----------------------- | ----------------- |
2744
+ | `ListAssetsStoreParams` | `ListStoreParams` |
1891
2745
 
1892
- [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/schemas/db.ts#L76)
2746
+ [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/schemas/storage.ts#L135)
1893
2747
 
1894
2748
  #### :gear: IDLType
1895
2749