@junobuild/functions 0.7.1 → 0.7.2-next-2026-03-20.1

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
@@ -47,10 +47,11 @@ JavaScript and TypeScript utilities for [Juno] Serverless Functions.
47
47
  - [decodeDocData](#gear-decodedocdata)
48
48
  - [encodeDocData](#gear-encodedocdata)
49
49
  - [normalizeCaller](#gear-normalizecaller)
50
- - [getAdminControllers](#gear-getadmincontrollers)
51
- - [getControllers](#gear-getcontrollers)
52
- - [isAdminController](#gear-isadmincontroller)
53
- - [isController](#gear-iscontroller)
50
+ - [getAdminAccessKeys](#gear-getadminaccesskeys)
51
+ - [getAccessKeys](#gear-getaccesskeys)
52
+ - [isWriteAccessKey](#gear-iswriteaccesskey)
53
+ - [isValidAccessKey](#gear-isvalidaccesskey)
54
+ - [isAdminAccessKey](#gear-isadminaccesskey)
54
55
  - [setDocStore](#gear-setdocstore)
55
56
  - [deleteDocStore](#gear-deletedocstore)
56
57
  - [getDocStore](#gear-getdocstore)
@@ -59,6 +60,9 @@ JavaScript and TypeScript utilities for [Juno] Serverless Functions.
59
60
  - [countDocsStore](#gear-countdocsstore)
60
61
  - [deleteDocsStore](#gear-deletedocsstore)
61
62
  - [deleteFilteredDocsStore](#gear-deletefiltereddocsstore)
63
+ - [callerIsAdmin](#gear-callerisadmin)
64
+ - [callerHasWritePermission](#gear-callerhaswritepermission)
65
+ - [callerIsAccessKey](#gear-callerisaccesskey)
62
66
  - [countCollectionAssetsStore](#gear-countcollectionassetsstore)
63
67
  - [countAssetsStore](#gear-countassetsstore)
64
68
  - [setAssetHandler](#gear-setassethandler)
@@ -417,71 +421,90 @@ The raw user ID as a `Uint8Array`.
417
421
 
418
422
  [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/utils/caller.utils.ts#L12)
419
423
 
420
- #### :gear: getAdminControllers
424
+ #### :gear: getAdminAccessKeys
421
425
 
422
- Gets the list of admin controllers from the Satellite.
426
+ Gets the list of admin access keys from the Satellite.
423
427
 
424
- | Function | Type |
425
- | --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
426
- | `getAdminControllers` | `() => [Uint8Array<ArrayBuffer>, { metadata: [string, string][]; created_at: bigint; updated_at: bigint; scope: "write" or "admin" or "submit"; expires_at?: bigint or undefined; kind?: "automation" or ... 1 more ... or undefined; }][]` |
428
+ | Function | Type |
429
+ | -------------------- | ------------------ |
430
+ | `getAdminAccessKeys` | `() => AccessKeys` |
427
431
 
428
432
  Returns:
429
433
 
430
- The list of admin controllers.
434
+ The list of admin acces keys.
431
435
 
432
- [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/controllers.sdk.ts#L15)
436
+ [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/accessKeys.sdk.ts#L11)
433
437
 
434
- #### :gear: getControllers
438
+ #### :gear: getAccessKeys
435
439
 
436
- Gets the list of controllers from the Satellite.
440
+ Gets the list of access keys from the Satellite.
437
441
 
438
- | Function | Type |
439
- | ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
440
- | `getControllers` | `() => [Uint8Array<ArrayBuffer>, { metadata: [string, string][]; created_at: bigint; updated_at: bigint; scope: "write" or "admin" or "submit"; expires_at?: bigint or undefined; kind?: "automation" or ... 1 more ... or undefined; }][]` |
442
+ | Function | Type |
443
+ | --------------- | ------------------ |
444
+ | `getAccessKeys` | `() => AccessKeys` |
441
445
 
442
446
  Returns:
443
447
 
444
- The list of all controllers.
448
+ The list of all access keys.
445
449
 
446
- [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/controllers.sdk.ts#L24)
450
+ [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/accessKeys.sdk.ts#L20)
447
451
 
448
- #### :gear: isAdminController
452
+ #### :gear: isWriteAccessKey
449
453
 
450
- Checks if the given caller is an admin among the provided controllers.
454
+ Checks if the given id exists among the provided access keys.
451
455
 
452
- | Function | Type |
453
- | ------------------- | -------------------------------------------- |
454
- | `isAdminController` | `(params: ControllerCheckParams) => boolean` |
456
+ | Function | Type |
457
+ | ------------------ | ------------------------------------------- |
458
+ | `isWriteAccessKey` | `(params: AccessKeyCheckParams) => boolean` |
455
459
 
456
460
  Parameters:
457
461
 
458
- - `params`: - The parameters including the caller identity
459
- and the list of controllers to verify against.
462
+ - `params`: - The parameters including the id
463
+ and the list of access keys to verify against.
460
464
 
461
465
  Returns:
462
466
 
463
- Whether the caller is an admin.
467
+ Whether the id is an access key with write permission.
464
468
 
465
- [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/controllers.sdk.ts#L36)
469
+ [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/accessKeys.sdk.ts#L32)
466
470
 
467
- #### :gear: isController
471
+ #### :gear: isValidAccessKey
468
472
 
469
- Checks if the given caller exists among the provided controllers.
473
+ Checks if the given id exists among the provided access keys.
470
474
 
471
- | Function | Type |
472
- | -------------- | -------------------------------------------- |
473
- | `isController` | `(params: ControllerCheckParams) => boolean` |
475
+ | Function | Type |
476
+ | ------------------ | ------------------------------------------- |
477
+ | `isValidAccessKey` | `(params: AccessKeyCheckParams) => boolean` |
474
478
 
475
479
  Parameters:
476
480
 
477
- - `params`: - The parameters including the caller identity
478
- and the list of controllers to verify against.
481
+ - `params`: - The parameters including the id
482
+ and the list of access keys to verify against.
479
483
 
480
484
  Returns:
481
485
 
482
- Whether the caller is a controller.
486
+ Whether the id is an access key.
483
487
 
484
- [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/controllers.sdk.ts#L56)
488
+ [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/accessKeys.sdk.ts#L52)
489
+
490
+ #### :gear: isAdminAccessKey
491
+
492
+ Checks if the given id is an admin among the provided access keys.
493
+
494
+ | Function | Type |
495
+ | ------------------ | ------------------------------------------- |
496
+ | `isAdminAccessKey` | `(params: AccessKeyCheckParams) => boolean` |
497
+
498
+ Parameters:
499
+
500
+ - `params`: - The parameters including the id
501
+ and the list of access keys to verify against.
502
+
503
+ Returns:
504
+
505
+ Whether the id is an admin.
506
+
507
+ [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/accessKeys.sdk.ts#L72)
485
508
 
486
509
  #### :gear: setDocStore
487
510
 
@@ -629,6 +652,36 @@ The context resulting of the deletion of documents that match the provided filte
629
652
 
630
653
  [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/db.sdk.ts#L175)
631
654
 
655
+ #### :gear: callerIsAdmin
656
+
657
+ Guard that succeeds if the caller is an admin access key of this satellite.
658
+
659
+ | Function | Type |
660
+ | --------------- | ------------ |
661
+ | `callerIsAdmin` | `() => void` |
662
+
663
+ [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/guards.sdk.ts#L10)
664
+
665
+ #### :gear: callerHasWritePermission
666
+
667
+ Guard that succeeds if the caller is an access key with write permission.
668
+
669
+ | Function | Type |
670
+ | -------------------------- | ------------------ |
671
+ | `callerHasWritePermission` | `() => AccessKeys` |
672
+
673
+ [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/guards.sdk.ts#L21)
674
+
675
+ #### :gear: callerIsAccessKey
676
+
677
+ Guard that succeeds if the caller is any recognized access key of this satellite.
678
+
679
+ | Function | Type |
680
+ | ------------------- | ------------------ |
681
+ | `callerIsAccessKey` | `() => AccessKeys` |
682
+
683
+ [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/guards.sdk.ts#L31)
684
+
632
685
  #### :gear: countCollectionAssetsStore
633
686
 
634
687
  Counts the number of assets in a specific collection.
@@ -916,9 +969,7 @@ The current timestamp.
916
969
  - [CustomFunctionSchema](#gear-customfunctionschema)
917
970
  - [QuerySchema](#gear-queryschema)
918
971
  - [UpdateSchema](#gear-updateschema)
919
- - [Uint8ArraySchema](#gear-uint8arrayschema)
920
972
  - [RawPrincipalSchema](#gear-rawprincipalschema)
921
- - [PrincipalSchema](#gear-principalschema)
922
973
  - [TimestampSchema](#gear-timestampschema)
923
974
  - [VersionSchema](#gear-versionschema)
924
975
  - [RawUserIdSchema](#gear-rawuseridschema)
@@ -981,13 +1032,13 @@ The current timestamp.
981
1032
  - [ListOrderFieldSchema](#gear-listorderfieldschema)
982
1033
  - [ListOrderSchema](#gear-listorderschema)
983
1034
  - [ListParamsSchema](#gear-listparamsschema)
984
- - [ControllerScopeSchema](#gear-controllerscopeschema)
985
- - [ControllerKindSchema](#gear-controllerkindschema)
1035
+ - [AccessKeyScopeSchema](#gear-accesskeyscopeschema)
1036
+ - [AccessKeyKindSchema](#gear-accesskeykindschema)
986
1037
  - [MetadataSchema](#gear-metadataschema)
987
- - [ControllerSchema](#gear-controllerschema)
988
- - [ControllerRecordSchema](#gear-controllerrecordschema)
989
- - [ControllersSchema](#gear-controllersschema)
990
- - [ControllerCheckParamsSchema](#gear-controllercheckparamsschema)
1038
+ - [AccessKeySchema](#gear-accesskeyschema)
1039
+ - [AccessKeyRecordSchema](#gear-accesskeyrecordschema)
1040
+ - [AccessKeysSchema](#gear-accesskeysschema)
1041
+ - [AccessKeyCheckParamsSchema](#gear-accesskeycheckparamsschema)
991
1042
  - [CollectionParamsSchema](#gear-collectionparamsschema)
992
1043
  - [ListStoreParamsSchema](#gear-liststoreparamsschema)
993
1044
  - [GetDocStoreParamsSchema](#gear-getdocstoreparamsschema)
@@ -1122,16 +1173,6 @@ References:
1122
1173
 
1123
1174
  [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/functions/update.ts#L23)
1124
1175
 
1125
- #### :gear: Uint8ArraySchema
1126
-
1127
- A schema that validates a value is an Uint8Array.
1128
-
1129
- | Constant | Type |
1130
- | ------------------ | ------------------------------------------------------------- |
1131
- | `Uint8ArraySchema` | `ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>` |
1132
-
1133
- [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/schemas/candid.ts#L10)
1134
-
1135
1176
  #### :gear: RawPrincipalSchema
1136
1177
 
1137
1178
  | Constant | Type |
@@ -1142,19 +1183,7 @@ References:
1142
1183
 
1143
1184
  - RawPrincipal
1144
1185
 
1145
- [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/schemas/candid.ts#L15)
1146
-
1147
- #### :gear: PrincipalSchema
1148
-
1149
- | Constant | Type |
1150
- | ----------------- | ------------------------------------------------------------------------------ |
1151
- | `PrincipalSchema` | `ZodPipe<ZodCustom<Principal, Principal>, ZodTransform<Principal, Principal>>` |
1152
-
1153
- References:
1154
-
1155
- - Principal
1156
-
1157
- [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/schemas/candid.ts#L25)
1186
+ [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/schemas/principal.ts#L6)
1158
1187
 
1159
1188
  #### :gear: TimestampSchema
1160
1189
 
@@ -1166,7 +1195,7 @@ References:
1166
1195
 
1167
1196
  - Timestamp
1168
1197
 
1169
- [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/schemas/satellite.ts#L7)
1198
+ [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/schemas/satellite.ts#L8)
1170
1199
 
1171
1200
  #### :gear: VersionSchema
1172
1201
 
@@ -1178,7 +1207,7 @@ References:
1178
1207
 
1179
1208
  - Version
1180
1209
 
1181
- [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/schemas/satellite.ts#L19)
1210
+ [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/schemas/satellite.ts#L20)
1182
1211
 
1183
1212
  #### :gear: RawUserIdSchema
1184
1213
 
@@ -1190,19 +1219,19 @@ References:
1190
1219
 
1191
1220
  - RawUserId
1192
1221
 
1193
- [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/schemas/satellite.ts#L31)
1222
+ [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/schemas/satellite.ts#L32)
1194
1223
 
1195
1224
  #### :gear: UserIdSchema
1196
1225
 
1197
- | Constant | Type |
1198
- | -------------- | ------------------------------------------------------------------------------ |
1199
- | `UserIdSchema` | `ZodPipe<ZodCustom<Principal, Principal>, ZodTransform<Principal, Principal>>` |
1226
+ | Constant | Type |
1227
+ | -------------- | ------------------------------------------------------ |
1228
+ | `UserIdSchema` | `ZodPipe<ZodCustom<any, any>, ZodTransform<any, any>>` |
1200
1229
 
1201
1230
  References:
1202
1231
 
1203
1232
  - UserId
1204
1233
 
1205
- [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/schemas/satellite.ts#L43)
1234
+ [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/schemas/satellite.ts#L44)
1206
1235
 
1207
1236
  #### :gear: CollectionSchema
1208
1237
 
@@ -1214,7 +1243,7 @@ References:
1214
1243
 
1215
1244
  - Collection
1216
1245
 
1217
- [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/schemas/satellite.ts#L55)
1246
+ [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/schemas/satellite.ts#L56)
1218
1247
 
1219
1248
  #### :gear: KeySchema
1220
1249
 
@@ -1226,7 +1255,7 @@ References:
1226
1255
 
1227
1256
  - Key
1228
1257
 
1229
- [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/schemas/satellite.ts#L65)
1258
+ [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/schemas/satellite.ts#L66)
1230
1259
 
1231
1260
  #### :gear: DescriptionSchema
1232
1261
 
@@ -1238,7 +1267,7 @@ References:
1238
1267
 
1239
1268
  - Description
1240
1269
 
1241
- [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/schemas/satellite.ts#L75)
1270
+ [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/schemas/satellite.ts#L76)
1242
1271
 
1243
1272
  #### :gear: CollectionsSchema
1244
1273
 
@@ -1900,29 +1929,29 @@ References:
1900
1929
 
1901
1930
  [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/schemas/list.ts#L103)
1902
1931
 
1903
- #### :gear: ControllerScopeSchema
1932
+ #### :gear: AccessKeyScopeSchema
1904
1933
 
1905
- | Constant | Type |
1906
- | ----------------------- | ---------------------------------------------------------------- |
1907
- | `ControllerScopeSchema` | `ZodEnum<{ write: "write"; admin: "admin"; submit: "submit"; }>` |
1934
+ | Constant | Type |
1935
+ | ---------------------- | ---------------------------------------------------------------- |
1936
+ | `AccessKeyScopeSchema` | `ZodEnum<{ write: "write"; admin: "admin"; submit: "submit"; }>` |
1908
1937
 
1909
1938
  References:
1910
1939
 
1911
- - ControllerScope
1940
+ - AccessKeyScope
1912
1941
 
1913
- [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/schemas/controllers.ts#L15)
1942
+ [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/schemas/accessKeys.ts#L15)
1914
1943
 
1915
- #### :gear: ControllerKindSchema
1944
+ #### :gear: AccessKeyKindSchema
1916
1945
 
1917
- | Constant | Type |
1918
- | ---------------------- | -------------------------------------------------------------- |
1919
- | `ControllerKindSchema` | `ZodEnum<{ automation: "automation"; emulator: "emulator"; }>` |
1946
+ | Constant | Type |
1947
+ | --------------------- | -------------------------------------------------------------- |
1948
+ | `AccessKeyKindSchema` | `ZodEnum<{ automation: "automation"; emulator: "emulator"; }>` |
1920
1949
 
1921
1950
  References:
1922
1951
 
1923
- - ControllerKind
1952
+ - AccessKeyKind
1924
1953
 
1925
- [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/schemas/controllers.ts#L25)
1954
+ [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/schemas/accessKeys.ts#L25)
1926
1955
 
1927
1956
  #### :gear: MetadataSchema
1928
1957
 
@@ -1934,55 +1963,55 @@ References:
1934
1963
 
1935
1964
  - MetadataSchema
1936
1965
 
1937
- [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/schemas/controllers.ts#L35)
1966
+ [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/schemas/accessKeys.ts#L35)
1938
1967
 
1939
- #### :gear: ControllerSchema
1968
+ #### :gear: AccessKeySchema
1940
1969
 
1941
- | Constant | Type |
1942
- | ------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
1943
- | `ControllerSchema` | `ZodObject<{ metadata: ZodArray<ZodTuple<[ZodString, ZodString], null>>; created_at: ZodBigInt; updated_at: ZodBigInt; expires_at: ZodOptional<...>; scope: ZodEnum<...>; kind: ZodOptional<...>; }, $strict>` |
1970
+ | Constant | Type |
1971
+ | ----------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
1972
+ | `AccessKeySchema` | `ZodObject<{ metadata: ZodArray<ZodTuple<[ZodString, ZodString], null>>; created_at: ZodBigInt; updated_at: ZodBigInt; expires_at: ZodOptional<...>; scope: ZodEnum<...>; kind: ZodOptional<...>; }, $strict>` |
1944
1973
 
1945
1974
  References:
1946
1975
 
1947
- - ControllerSchema
1976
+ - AccessKeySchema
1948
1977
 
1949
- [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/schemas/controllers.ts#L45)
1978
+ [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/schemas/accessKeys.ts#L45)
1950
1979
 
1951
- #### :gear: ControllerRecordSchema
1980
+ #### :gear: AccessKeyRecordSchema
1952
1981
 
1953
- | Constant | Type |
1954
- | ------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
1955
- | `ControllerRecordSchema` | `ZodTuple<[ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>, ZodObject<{ metadata: ZodArray<ZodTuple<[ZodString, ZodString], null>>; ... 4 more ...; kind: ZodOptional<...>; }, $strict>], null>` |
1982
+ | Constant | Type |
1983
+ | ----------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
1984
+ | `AccessKeyRecordSchema` | `ZodTuple<[ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>, ZodObject<{ metadata: ZodArray<ZodTuple<[ZodString, ZodString], null>>; ... 4 more ...; kind: ZodOptional<...>; }, $strict>], null>` |
1956
1985
 
1957
1986
  References:
1958
1987
 
1959
- - ControllerRecordSchema
1988
+ - AccessKeyRecordSchema
1960
1989
 
1961
- [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/schemas/controllers.ts#L94)
1990
+ [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/schemas/accessKeys.ts#L94)
1962
1991
 
1963
- #### :gear: ControllersSchema
1992
+ #### :gear: AccessKeysSchema
1964
1993
 
1965
- | Constant | Type |
1966
- | ------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
1967
- | `ControllersSchema` | `ZodArray<ZodTuple<[ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>, ZodObject<{ metadata: ZodArray<ZodTuple<[ZodString, ZodString], null>>; ... 4 more ...; kind: ZodOptional<...>; }, $strict>], null>>` |
1994
+ | Constant | Type |
1995
+ | ------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
1996
+ | `AccessKeysSchema` | `ZodArray<ZodTuple<[ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>, ZodObject<{ metadata: ZodArray<ZodTuple<[ZodString, ZodString], null>>; ... 4 more ...; kind: ZodOptional<...>; }, $strict>], null>>` |
1968
1997
 
1969
1998
  References:
1970
1999
 
1971
- - ControllersSchema
2000
+ - AccessKeysSchema
1972
2001
 
1973
- [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/schemas/controllers.ts#L104)
2002
+ [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/schemas/accessKeys.ts#L104)
1974
2003
 
1975
- #### :gear: ControllerCheckParamsSchema
2004
+ #### :gear: AccessKeyCheckParamsSchema
1976
2005
 
1977
- | Constant | Type |
1978
- | ----------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
1979
- | `ControllerCheckParamsSchema` | `ZodObject<{ caller: ZodUnion<[ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>, ZodPipe<ZodCustom<Principal, Principal>, ZodTransform<...>>]>; controllers: ZodArray<...>; }, $strip>` |
2006
+ | Constant | Type |
2007
+ | ---------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
2008
+ | `AccessKeyCheckParamsSchema` | `ZodObject<{ id: ZodUnion<[ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>, ZodPipe<ZodCustom<any, any>, ZodTransform<...>>]>; accessKeys: ZodArray<...>; }, $strip>` |
1980
2009
 
1981
2010
  References:
1982
2011
 
1983
- - ControllerCheckParamsSchema
2012
+ - AccessKeyCheckParamsSchema
1984
2013
 
1985
- [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/schemas/controllers.ts#L114)
2014
+ [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/schemas/accessKeys.ts#L114)
1986
2015
 
1987
2016
  #### :gear: CollectionParamsSchema
1988
2017
 
@@ -2246,7 +2275,7 @@ References:
2246
2275
 
2247
2276
  - IDLType
2248
2277
 
2249
- [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/ic-cdk/schemas/call.ts#L9)
2278
+ [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/ic-cdk/schemas/call.ts#L10)
2250
2279
 
2251
2280
  #### :gear: CallArgSchema
2252
2281
 
@@ -2258,7 +2287,7 @@ References:
2258
2287
 
2259
2288
  - CallArg
2260
2289
 
2261
- [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/ic-cdk/schemas/call.ts#L21)
2290
+ [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/ic-cdk/schemas/call.ts#L22)
2262
2291
 
2263
2292
  #### :gear: CallArgsSchema
2264
2293
 
@@ -2272,7 +2301,7 @@ References:
2272
2301
 
2273
2302
  - CallArgs
2274
2303
 
2275
- [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/ic-cdk/schemas/call.ts#L33)
2304
+ [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/ic-cdk/schemas/call.ts#L34)
2276
2305
 
2277
2306
  #### :gear: CallResultSchema
2278
2307
 
@@ -2284,19 +2313,19 @@ References:
2284
2313
 
2285
2314
  - CallResult
2286
2315
 
2287
- [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/ic-cdk/schemas/call.ts#L49)
2316
+ [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/ic-cdk/schemas/call.ts#L50)
2288
2317
 
2289
2318
  #### :gear: CallParamsSchema
2290
2319
 
2291
- | Constant | Type |
2292
- | ------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
2293
- | `CallParamsSchema` | `ZodObject<{ canisterId: ZodUnion<[ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>, ZodPipe<ZodCustom<Principal, Principal>, ZodTransform<...>>]>; method: ZodString; args: ZodOptional<...>; result: ZodOptional<...>; }, $strip>` |
2320
+ | Constant | Type |
2321
+ | ------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
2322
+ | `CallParamsSchema` | `ZodObject<{ canisterId: ZodUnion<[ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>, ZodPipe<ZodCustom<any, any>, ZodTransform<...>>]>; method: ZodString; args: ZodOptional<...>; result: ZodOptional<...>; }, $strip>` |
2294
2323
 
2295
2324
  References:
2296
2325
 
2297
2326
  - CallParams
2298
2327
 
2299
- [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/ic-cdk/schemas/call.ts#L59)
2328
+ [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/ic-cdk/schemas/call.ts#L60)
2300
2329
 
2301
2330
  ### :factory: CallResponseLengthError
2302
2331
 
@@ -2328,8 +2357,8 @@ References:
2328
2357
  - [ListOrder](#gear-listorder)
2329
2358
  - [ListParams](#gear-listparams)
2330
2359
  - [ListResults](#gear-listresults)
2331
- - [Controller](#gear-controller)
2332
- - [ControllerCheckParams](#gear-controllercheckparams)
2360
+ - [AccessKey](#gear-accesskey)
2361
+ - [AccessKeyCheckParams](#gear-accesskeycheckparams)
2333
2362
  - [CollectionParams](#gear-collectionparams)
2334
2363
  - [SetAssetHandlerParams](#gear-setassethandlerparams)
2335
2364
  - [GetContentChunksStoreParams](#gear-getcontentchunksstoreparams)
@@ -2634,31 +2663,31 @@ List results, parameterized by type of returned item.
2634
2663
 
2635
2664
  [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/schemas/list.ts#L142)
2636
2665
 
2637
- #### :gear: Controller
2666
+ #### :gear: AccessKey
2638
2667
 
2639
- Represents a controller with access scope and associated metadata.
2668
+ Represents an access key with access scope and associated metadata.
2640
2669
 
2641
2670
  | Property | Type | Description |
2642
2671
  | ------------ | ----------------------------------------- | ------------------------------------------------------------------ |
2643
- | `metadata` | `[string, string][]` | A list of key-value metadata pairs associated with the controller. |
2644
- | `created_at` | `bigint` | The timestamp when the controller was created. |
2645
- | `updated_at` | `bigint` | The timestamp when the controller was last updated. |
2646
- | `expires_at` | `bigint or undefined` | Optional expiration timestamp for the controller. |
2647
- | `scope` | `"write" or "admin" or "submit"` | The scope assigned to the controller. |
2648
- | `kind` | `"automation" or "emulator" or undefined` | An optional kind identifier of the controller. |
2672
+ | `metadata` | `[string, string][]` | A list of key-value metadata pairs associated with the access key. |
2673
+ | `created_at` | `bigint` | The timestamp when the access key was created. |
2674
+ | `updated_at` | `bigint` | The timestamp when the access key was last updated. |
2675
+ | `expires_at` | `bigint or undefined` | Optional expiration timestamp for the access key. |
2676
+ | `scope` | `"write" or "admin" or "submit"` | The scope assigned to the access key. |
2677
+ | `kind` | `"automation" or "emulator" or undefined` | An optional kind identifier of the access key. |
2649
2678
 
2650
- [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/schemas/controllers.ts#L59)
2679
+ [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/schemas/accessKeys.ts#L59)
2651
2680
 
2652
- #### :gear: ControllerCheckParams
2681
+ #### :gear: AccessKeyCheckParams
2653
2682
 
2654
- Represents the parameters required to perform controller checks.
2683
+ Represents the parameters required to perform an access key checks.
2655
2684
 
2656
- | Property | Type | Description |
2657
- | ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------- |
2658
- | `caller` | `any` | The identity of the caller to verify against the controller list. |
2659
- | `controllers` | `[Uint8Array<ArrayBuffer>, { metadata: [string, string][]; created_at: bigint; updated_at: bigint; scope: "write" or "admin" or "submit"; expires_at?: bigint or undefined; kind?: "automation" or ... 1 more ... or undefined; }][]` | The list of controllers to check against. |
2685
+ | Property | Type | Description |
2686
+ | ------------ | ------------ | ----------------------------------------------- |
2687
+ | `id` | `any` | The identity to verify against the access keys. |
2688
+ | `accessKeys` | `AccessKeys` | The list of access keys to check against. |
2660
2689
 
2661
- [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/schemas/controllers.ts#L122)
2690
+ [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/schemas/accessKeys.ts#L122)
2662
2691
 
2663
2692
  #### :gear: CollectionParams
2664
2693
 
@@ -2705,7 +2734,7 @@ Type representing the parameters required to make a canister call.
2705
2734
  | `args` | `[IDL.Type<unknown>, unknown][] or undefined` | The arguments, including types and values, for the canister call. |
2706
2735
  | `result` | `any` | The expected result type used for decoding the response. |
2707
2736
 
2708
- [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/ic-cdk/schemas/call.ts#L69)
2737
+ [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/ic-cdk/schemas/call.ts#L70)
2709
2738
 
2710
2739
  ### :cocktail: Types
2711
2740
 
@@ -2721,7 +2750,6 @@ Type representing the parameters required to make a canister call.
2721
2750
  - [UpdateFn](#gear-updatefn)
2722
2751
  - [UpdateFnOrObject](#gear-updatefnorobject)
2723
2752
  - [RawPrincipal](#gear-rawprincipal)
2724
- - [Principal](#gear-principal)
2725
2753
  - [Timestamp](#gear-timestamp)
2726
2754
  - [Version](#gear-version)
2727
2755
  - [RawUserId](#gear-rawuserid)
@@ -2783,11 +2811,11 @@ Type representing the parameters required to make a canister call.
2783
2811
  - [HookFnOrObject](#gear-hookfnorobject)
2784
2812
  - [TimestampMatcher](#gear-timestampmatcher)
2785
2813
  - [ListOrderField](#gear-listorderfield)
2786
- - [ControllerScope](#gear-controllerscope)
2787
- - [ControllerKind](#gear-controllerkind)
2814
+ - [AccessKeyScope](#gear-accesskeyscope)
2815
+ - [AccessKeyKind](#gear-accesskeykind)
2788
2816
  - [Metadata](#gear-metadata)
2789
- - [ControllerRecord](#gear-controllerrecord)
2790
- - [Controllers](#gear-controllers)
2817
+ - [AccessKeyRecord](#gear-accesskeyrecord)
2818
+ - [AccessKeys](#gear-accesskeys)
2791
2819
  - [ListStoreParams](#gear-liststoreparams)
2792
2820
  - [GetDocStoreParams](#gear-getdocstoreparams)
2793
2821
  - [SetDocStoreParams](#gear-setdocstoreparams)
@@ -2940,17 +2968,7 @@ Represents a raw principal - a Uint8Array representation of a Principal.
2940
2968
  | -------------- | ------------ |
2941
2969
  | `RawPrincipal` | `Uint8Array` |
2942
2970
 
2943
- [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/schemas/candid.ts#L20)
2944
-
2945
- #### :gear: Principal
2946
-
2947
- Represents a principal - i.e. an object instantiated with the class Principal.
2948
-
2949
- | Type | Type |
2950
- | ----------- | --------------------------------- |
2951
- | `Principal` | `z.infer<typeof PrincipalSchema>` |
2952
-
2953
- [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/schemas/candid.ts#L30)
2971
+ [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/schemas/principal.ts#L11)
2954
2972
 
2955
2973
  #### :gear: Timestamp
2956
2974
 
@@ -2962,7 +2980,7 @@ Used for tracking when events occur, such as document creation and updates.
2962
2980
  | ----------- | --------------------------------- |
2963
2981
  | `Timestamp` | `z.infer<typeof TimestampSchema>` |
2964
2982
 
2965
- [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/schemas/satellite.ts#L14)
2983
+ [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/schemas/satellite.ts#L15)
2966
2984
 
2967
2985
  #### :gear: Version
2968
2986
 
@@ -2974,7 +2992,7 @@ This is typically incremented with each update to ensure consistency.
2974
2992
  | --------- | ------------------------------- |
2975
2993
  | `Version` | `z.infer<typeof VersionSchema>` |
2976
2994
 
2977
- [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/schemas/satellite.ts#L26)
2995
+ [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/schemas/satellite.ts#L27)
2978
2996
 
2979
2997
  #### :gear: RawUserId
2980
2998
 
@@ -2986,7 +3004,7 @@ This is a principal associated with a user.
2986
3004
  | ----------- | -------------- |
2987
3005
  | `RawUserId` | `RawPrincipal` |
2988
3006
 
2989
- [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/schemas/satellite.ts#L38)
3007
+ [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/schemas/satellite.ts#L39)
2990
3008
 
2991
3009
  #### :gear: UserId
2992
3010
 
@@ -2998,7 +3016,7 @@ This is a principal associated with a user.
2998
3016
  | -------- | ------------------------------ |
2999
3017
  | `UserId` | `z.infer<typeof UserIdSchema>` |
3000
3018
 
3001
- [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/schemas/satellite.ts#L50)
3019
+ [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/schemas/satellite.ts#L51)
3002
3020
 
3003
3021
  #### :gear: Collection
3004
3022
 
@@ -3008,7 +3026,7 @@ A collection name where data are stored.
3008
3026
  | ------------ | ---------------------------------- |
3009
3027
  | `Collection` | `z.infer<typeof CollectionSchema>` |
3010
3028
 
3011
- [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/schemas/satellite.ts#L60)
3029
+ [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/schemas/satellite.ts#L61)
3012
3030
 
3013
3031
  #### :gear: Key
3014
3032
 
@@ -3018,7 +3036,7 @@ A key identifier within a collection.
3018
3036
  | ----- | --------------------------- |
3019
3037
  | `Key` | `z.infer<typeof KeySchema>` |
3020
3038
 
3021
- [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/schemas/satellite.ts#L70)
3039
+ [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/schemas/satellite.ts#L71)
3022
3040
 
3023
3041
  #### :gear: Description
3024
3042
 
@@ -3029,7 +3047,7 @@ Used for document and asset fields which can be useful for search purpose.
3029
3047
  | ------------- | ----------------------------------- |
3030
3048
  | `Description` | `z.infer<typeof DescriptionSchema>` |
3031
3049
 
3032
- [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/schemas/satellite.ts#L81)
3050
+ [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/schemas/satellite.ts#L82)
3033
3051
 
3034
3052
  #### :gear: AssertFunction
3035
3053
 
@@ -3610,25 +3628,25 @@ Enum representing possible fields to order by.
3610
3628
 
3611
3629
  [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/schemas/list.ts#L80)
3612
3630
 
3613
- #### :gear: ControllerScope
3631
+ #### :gear: AccessKeyScope
3614
3632
 
3615
- Represents the permission scope of a controller.
3633
+ Represents the permission scope of an access key.
3616
3634
 
3617
- | Type | Type |
3618
- | ----------------- | --------------------------------------- |
3619
- | `ControllerScope` | `z.infer<typeof ControllerScopeSchema>` |
3635
+ | Type | Type |
3636
+ | ---------------- | -------------------------------------- |
3637
+ | `AccessKeyScope` | `z.infer<typeof AccessKeyScopeSchema>` |
3620
3638
 
3621
- [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/schemas/controllers.ts#L20)
3639
+ [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/schemas/accessKeys.ts#L20)
3622
3640
 
3623
- #### :gear: ControllerKind
3641
+ #### :gear: AccessKeyKind
3624
3642
 
3625
- Represents a specific kind of controller. Meant for informational purposes.
3643
+ Represents a specific kind of access key. Meant for informational purposes.
3626
3644
 
3627
- | Type | Type |
3628
- | ---------------- | -------------------------------------- |
3629
- | `ControllerKind` | `z.infer<typeof ControllerKindSchema>` |
3645
+ | Type | Type |
3646
+ | --------------- | ------------------------------------- |
3647
+ | `AccessKeyKind` | `z.infer<typeof AccessKeyKindSchema>` |
3630
3648
 
3631
- [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/schemas/controllers.ts#L30)
3649
+ [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/schemas/accessKeys.ts#L30)
3632
3650
 
3633
3651
  #### :gear: Metadata
3634
3652
 
@@ -3638,27 +3656,27 @@ Represents a single metadata entry as a key-value tuple.
3638
3656
  | ---------- | -------------------------------- |
3639
3657
  | `Metadata` | `z.infer<typeof MetadataSchema>` |
3640
3658
 
3641
- [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/schemas/controllers.ts#L40)
3659
+ [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/schemas/accessKeys.ts#L40)
3642
3660
 
3643
- #### :gear: ControllerRecord
3661
+ #### :gear: AccessKeyRecord
3644
3662
 
3645
- Represents a tuple containing the principal ID and associated controller data.
3663
+ Represents a tuple containing the principal ID and associated access key data.
3646
3664
 
3647
- | Type | Type |
3648
- | ------------------ | ---------------------------------------- |
3649
- | `ControllerRecord` | `z.infer<typeof ControllerRecordSchema>` |
3665
+ | Type | Type |
3666
+ | ----------------- | --------------------------------------- |
3667
+ | `AccessKeyRecord` | `z.infer<typeof AccessKeyRecordSchema>` |
3650
3668
 
3651
- [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/schemas/controllers.ts#L99)
3669
+ [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/schemas/accessKeys.ts#L99)
3652
3670
 
3653
- #### :gear: Controllers
3671
+ #### :gear: AccessKeys
3654
3672
 
3655
- Represents a list of controllers.
3673
+ Represents a list of access keys.
3656
3674
 
3657
- | Type | Type |
3658
- | ------------- | ----------------------------------- |
3659
- | `Controllers` | `z.infer<typeof ControllersSchema>` |
3675
+ | Type | Type |
3676
+ | ------------ | ----------------------------- |
3677
+ | `AccessKeys` | `[RawPrincipal, AccessKey][]` |
3660
3678
 
3661
- [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/schemas/controllers.ts#L109)
3679
+ [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/sdk/schemas/accessKeys.ts#L109)
3662
3680
 
3663
3681
  #### :gear: ListStoreParams
3664
3682
 
@@ -3854,7 +3872,7 @@ Custom validation function to verify if a value is an instance of `IDL.Type` fro
3854
3872
  | --------- | ------------------------------- |
3855
3873
  | `IDLType` | `z.infer<typeof IDLTypeSchema>` |
3856
3874
 
3857
- [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/ic-cdk/schemas/call.ts#L16)
3875
+ [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/ic-cdk/schemas/call.ts#L17)
3858
3876
 
3859
3877
  #### :gear: CallArg
3860
3878
 
@@ -3864,7 +3882,7 @@ A call argument consisting of its IDL type and corresponding value.
3864
3882
  | --------- | ------------------------------- |
3865
3883
  | `CallArg` | `z.infer<typeof CallArgSchema>` |
3866
3884
 
3867
- [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/ic-cdk/schemas/call.ts#L26)
3885
+ [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/ic-cdk/schemas/call.ts#L27)
3868
3886
 
3869
3887
  #### :gear: CallArgs
3870
3888
 
@@ -3880,7 +3898,7 @@ The order of arguments is preserved for the function call.
3880
3898
  | ---------- | -------------------------------- |
3881
3899
  | `CallArgs` | `z.infer<typeof CallArgsSchema>` |
3882
3900
 
3883
- [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/ic-cdk/schemas/call.ts#L44)
3901
+ [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/ic-cdk/schemas/call.ts#L45)
3884
3902
 
3885
3903
  #### :gear: CallResult
3886
3904
 
@@ -3890,7 +3908,7 @@ Defines the type used to decode the result of a canister call.
3890
3908
  | ------------ | ---------------------------------- |
3891
3909
  | `CallResult` | `z.infer<typeof CallResultSchema>` |
3892
3910
 
3893
- [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/ic-cdk/schemas/call.ts#L54)
3911
+ [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/functions/src/ic-cdk/schemas/call.ts#L55)
3894
3912
 
3895
3913
  <!-- TSDOC_END -->
3896
3914