@junobuild/functions 0.7.2 → 0.8.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.
Files changed (120) hide show
  1. package/README.md +399 -223
  2. package/canisters/ckbtc/index.js +1 -1
  3. package/canisters/cketh/index.js +1 -1
  4. package/canisters/cmc/index.js +1 -1
  5. package/canisters/declarations/ckbtc/bitcoin.did.d.ts +1 -1
  6. package/canisters/declarations/ckbtc/minter.did.d.ts +1 -1
  7. package/canisters/declarations/cketh/minter.did.d.ts +1 -1
  8. package/canisters/declarations/cketh/orchestrator.did.d.ts +1 -1
  9. package/canisters/declarations/cmc/cmc.did.d.ts +1 -1
  10. package/canisters/declarations/ic-management/ic-management.did.d.ts +1 -1
  11. package/canisters/declarations/ledger-icp/index.did.d.ts +1 -1
  12. package/canisters/declarations/ledger-icp/ledger.did.d.ts +1 -1
  13. package/canisters/declarations/ledger-icrc/icrc_icrc-1.did.d.ts +1 -1
  14. package/canisters/declarations/ledger-icrc/icrc_icrc-10.did.d.ts +1 -1
  15. package/canisters/declarations/ledger-icrc/icrc_index.did.d.ts +1 -1
  16. package/canisters/declarations/ledger-icrc/icrc_ledger.did.d.ts +1 -1
  17. package/canisters/declarations/ledger-icrc/icrc_nft-ledger.did.d.ts +1 -1
  18. package/canisters/declarations/nns/genesis_token.did.d.ts +1 -1
  19. package/canisters/declarations/nns/governance.did.d.ts +1 -1
  20. package/canisters/declarations/nns/governance_test.did.d.ts +1 -1
  21. package/canisters/declarations/nns/sns_wasm.did.d.ts +1 -1
  22. package/canisters/declarations/sns/governance.did.d.ts +1 -1
  23. package/canisters/declarations/sns/governance_test.did.d.ts +1 -1
  24. package/canisters/declarations/sns/root.did.d.ts +1 -1
  25. package/canisters/declarations/sns/swap.did.d.ts +1 -1
  26. package/canisters/ic-management/index.js +1 -1
  27. package/canisters/index.js +1 -1
  28. package/canisters/ledger/icp/index.js +1 -1
  29. package/canisters/ledger/icrc/index.js +1 -1
  30. package/canisters/nns/index.js +1 -1
  31. package/canisters/sns/index.js +1 -1
  32. package/{chunk-CAQXR2VB.js → chunk-I4MVAQHI.js} +1 -1
  33. package/{chunk-CAQXR2VB.js.map → chunk-I4MVAQHI.js.map} +1 -1
  34. package/chunk-JU5CZHLY.js +2 -0
  35. package/chunk-JU5CZHLY.js.map +7 -0
  36. package/chunk-VIFVPVUD.js +2 -0
  37. package/chunk-VIFVPVUD.js.map +7 -0
  38. package/chunk-X3EF7OU6.js +2 -0
  39. package/chunk-X3EF7OU6.js.map +7 -0
  40. package/chunk-YHNBR22R.js +2 -0
  41. package/chunk-YHNBR22R.js.map +7 -0
  42. package/chunk-ZBCLFWQJ.js +2 -0
  43. package/chunk-ZBCLFWQJ.js.map +7 -0
  44. package/functions/query.d.ts +8 -0
  45. package/functions/schemas/function.d.ts +27 -0
  46. package/functions/update.d.ts +8 -0
  47. package/global.d.ts +15 -6
  48. package/ic-cdk/http-request.ic-cdk.d.ts +10 -0
  49. package/ic-cdk/schemas/call.d.ts +1 -1
  50. package/ic-cdk/schemas/http-request.d.ts +142 -0
  51. package/ic-cdk.d.ts +2 -0
  52. package/ic-cdk.js +1 -1
  53. package/ic-cdk.js.map +4 -4
  54. package/index.d.ts +1 -1
  55. package/index.js +1 -1
  56. package/index.js.map +3 -3
  57. package/package.json +3 -3
  58. package/schemas/principal.d.ts +8 -0
  59. package/schemas/satellite.d.ts +1 -1
  60. package/sdk/access-keys.sdk.d.ts +50 -0
  61. package/sdk/guards.sdk.d.ts +25 -0
  62. package/sdk/schemas/{controllers.d.ts → access-keys.d.ts} +39 -38
  63. package/sdk.d.ts +3 -2
  64. package/sdk.js +1 -1
  65. package/sdk.js.map +4 -4
  66. package/src/canisters/declarations/ckbtc/bitcoin.did.d.ts +1 -1
  67. package/src/canisters/declarations/ckbtc/bitcoin.did.idl.js +1 -1
  68. package/src/canisters/declarations/ckbtc/minter.did.d.ts +1 -1
  69. package/src/canisters/declarations/ckbtc/minter.did.idl.js +1 -1
  70. package/src/canisters/declarations/cketh/minter.did.d.ts +1 -1
  71. package/src/canisters/declarations/cketh/minter.did.idl.js +1 -1
  72. package/src/canisters/declarations/cketh/orchestrator.did.d.ts +1 -1
  73. package/src/canisters/declarations/cketh/orchestrator.did.idl.js +1 -1
  74. package/src/canisters/declarations/cmc/cmc.did.d.ts +1 -1
  75. package/src/canisters/declarations/cmc/cmc.did.idl.js +1 -1
  76. package/src/canisters/declarations/ic-management/ic-management.did.d.ts +1 -1
  77. package/src/canisters/declarations/ic-management/ic-management.did.idl.js +1 -1
  78. package/src/canisters/declarations/ledger-icp/index.did.d.ts +1 -1
  79. package/src/canisters/declarations/ledger-icp/index.did.idl.js +1 -1
  80. package/src/canisters/declarations/ledger-icp/ledger.did.d.ts +1 -1
  81. package/src/canisters/declarations/ledger-icp/ledger.did.idl.js +1 -1
  82. package/src/canisters/declarations/ledger-icrc/icrc_icrc-1.did.d.ts +1 -1
  83. package/src/canisters/declarations/ledger-icrc/icrc_icrc-1.did.idl.js +1 -1
  84. package/src/canisters/declarations/ledger-icrc/icrc_icrc-10.did.d.ts +1 -1
  85. package/src/canisters/declarations/ledger-icrc/icrc_icrc-10.did.idl.js +1 -1
  86. package/src/canisters/declarations/ledger-icrc/icrc_index.did.d.ts +1 -1
  87. package/src/canisters/declarations/ledger-icrc/icrc_index.did.idl.js +1 -1
  88. package/src/canisters/declarations/ledger-icrc/icrc_ledger.did.d.ts +1 -1
  89. package/src/canisters/declarations/ledger-icrc/icrc_ledger.did.idl.js +1 -1
  90. package/src/canisters/declarations/ledger-icrc/icrc_nft-ledger.did.d.ts +1 -1
  91. package/src/canisters/declarations/ledger-icrc/icrc_nft-ledger.did.idl.js +1 -1
  92. package/src/canisters/declarations/nns/genesis_token.did.d.ts +1 -1
  93. package/src/canisters/declarations/nns/genesis_token.did.idl.js +1 -1
  94. package/src/canisters/declarations/nns/governance.did.d.ts +1 -1
  95. package/src/canisters/declarations/nns/governance.did.idl.js +1 -1
  96. package/src/canisters/declarations/nns/governance_test.did.d.ts +1 -1
  97. package/src/canisters/declarations/nns/governance_test.did.idl.js +1 -1
  98. package/src/canisters/declarations/nns/sns_wasm.did.d.ts +1 -1
  99. package/src/canisters/declarations/nns/sns_wasm.did.idl.js +1 -1
  100. package/src/canisters/declarations/sns/governance.did.d.ts +1 -1
  101. package/src/canisters/declarations/sns/governance.did.idl.js +1 -1
  102. package/src/canisters/declarations/sns/governance_test.did.d.ts +1 -1
  103. package/src/canisters/declarations/sns/governance_test.did.idl.js +1 -1
  104. package/src/canisters/declarations/sns/root.did.d.ts +1 -1
  105. package/src/canisters/declarations/sns/root.did.idl.js +1 -1
  106. package/src/canisters/declarations/sns/swap.did.d.ts +1 -1
  107. package/src/canisters/declarations/sns/swap.did.idl.js +1 -1
  108. package/src/global.d.ts +15 -6
  109. package/chunk-3CCXJJ4Y.js +0 -2
  110. package/chunk-3CCXJJ4Y.js.map +0 -7
  111. package/chunk-5IWIJYKG.js +0 -2
  112. package/chunk-5IWIJYKG.js.map +0 -7
  113. package/chunk-6QTAU2M5.js +0 -2
  114. package/chunk-6QTAU2M5.js.map +0 -7
  115. package/chunk-BAYP4XBH.js +0 -2
  116. package/chunk-BAYP4XBH.js.map +0 -7
  117. package/chunk-EHQF2DOU.js +0 -2
  118. package/chunk-EHQF2DOU.js.map +0 -7
  119. package/schemas/candid.d.ts +0 -21
  120. package/sdk/controllers.sdk.d.ts +0 -39
package/sdk.js CHANGED
@@ -1,2 +1,2 @@
1
- import{C as I,E as te,F as oe,a as d,c as n,d as m,e as y,f as x,k as D,l as u,m as A,n as f,o as k,p as g,u as U,v as z}from"./chunk-5IWIJYKG.js";import{b as h}from"./chunk-3CCXJJ4Y.js";import"./chunk-4C666HHU.js";import*as l from"zod";var V=l.enum(["write","admin","submit"]),W=l.enum(["automation","emulator"]),X=l.tuple([l.string(),l.string()]),Y=l.object({metadata:l.array(X),created_at:d,updated_at:d,expires_at:d.optional(),scope:V,kind:W.optional()}).strict(),Z=l.tuple([h,Y]),$=l.array(Z),C=l.object({caller:n.or(m),controllers:$});import{Principal as ee}from"@icp-sdk/core/principal";var a=e=>ee.from(e).toUint8Array();var ie=()=>__juno_satellite_get_admin_controllers(),pe=()=>__juno_satellite_get_controllers(),Se=e=>{C.parse(e);let{caller:t,controllers:o}=e,r=a(t);return __juno_satellite_is_admin_controller(r,o)},de=e=>{C.parse(e);let{caller:t,controllers:o}=e,r=a(t);return __juno_satellite_is_controller(r,o)};import*as L from"zod";var c=L.object({collection:y}).strict(),i=c.extend({caller:n.or(m),params:I}).strict();var _=c.extend({caller:n.or(m),key:x}).strict(),j=_.extend({doc:D}).strict(),b=_.extend({doc:u}).strict(),R=c,G=i,v=i,F=c,w=i;var ke=e=>{j.parse(e);let{caller:t,collection:o,key:r,doc:s}=e,p=a(t);return __juno_satellite_datastore_set_doc_store(p,o,r,s)},ge=e=>{b.parse(e);let{caller:t,collection:o,key:r,doc:s}=e,p=a(t);return __juno_satellite_datastore_delete_doc_store(p,o,r,s)},Ue=e=>{_.parse(e);let{caller:t,collection:o,key:r}=e,s=a(t);return __juno_satellite_datastore_get_doc_store(s,o,r)},ze=e=>{v.parse(e);let{caller:t,collection:o,params:r}=e,s=a(t);return __juno_satellite_datastore_list_docs_store(s,o,r)},Ie=e=>{R.parse(e);let{collection:t}=e;return __juno_satellite_datastore_count_collection_docs_store(t)},Le=e=>{G.parse(e);let{caller:t,collection:o,params:r}=e,s=a(t);return __juno_satellite_datastore_count_docs_store(s,o,r)},je=e=>{F.parse(e);let{collection:t}=e;__juno_satellite_datastore_delete_docs_store(t)},be=e=>{w.parse(e);let{caller:t,collection:o,params:r}=e,s=a(t);return __juno_satellite_datastore_delete_filtered_docs_store(s,o,r)};import*as T from"zod";var K=T.enum(["heap","stable"]);import*as S from"zod";var P=c.extend({caller:n.or(m),full_path:U}).strict(),M=c,H=i,O=S.object({key:k,content:f,headers:A}).strict(),B=c,E=i,N=P,q=P.extend({token:z}),J=i,Q=S.object({encoding:g,chunk_index:S.bigint(),memory:K}).strict();var Oe=e=>{M.parse(e);let{collection:t}=e;return __juno_satellite_storage_count_collection_assets_store(t)},Be=e=>{H.parse(e);let{caller:t,collection:o,params:r}=e,s=a(t);return __juno_satellite_storage_count_assets_store(s,o,r)},Ee=e=>{O.parse(e);let{key:t,content:o,headers:r}=e;__juno_satellite_storage_set_asset_handler(t,o,r)},Ne=e=>{N.parse(e);let{caller:t,collection:o,full_path:r}=e,s=a(t);return __juno_satellite_storage_delete_asset_store(s,o,r)},qe=e=>{B.parse(e);let{collection:t}=e;__juno_satellite_storage_delete_assets_store(t)},Je=e=>{E.parse(e);let{caller:t,collection:o,params:r}=e,s=a(t);return __juno_satellite_storage_delete_filtered_assets_store(s,o,r)},Qe=e=>{q.parse(e);let{caller:t,collection:o,full_path:r,token:s}=e,p=a(t);__juno_satellite_storage_set_asset_token_store(p,o,r,s)},Ve=e=>{P.parse(e);let{caller:t,collection:o,full_path:r}=e,s=a(t);return __juno_satellite_storage_get_asset_store(s,o,r)},We=e=>{J.parse(e);let{caller:t,collection:o,params:r}=e,s=a(t);return __juno_satellite_storage_list_assets_store(s,o,r)},Xe=e=>{Q.parse(e);let{encoding:t,chunk_index:o,memory:r}=e;return __juno_satellite_storage_get_content_chunks_store(t,o,r)};export{c as CollectionParamsSchema,C as ControllerCheckParamsSchema,W as ControllerKindSchema,Z as ControllerRecordSchema,Y as ControllerSchema,V as ControllerScopeSchema,$ as ControllersSchema,H as CountAssetsStoreParamsSchema,M as CountCollectionAssetsStoreParamsSchema,R as CountCollectionDocsStoreParamsSchema,G as CountDocsStoreParamsSchema,N as DeleteAssetStoreParamsSchema,B as DeleteAssetsStoreParamsSchema,b as DeleteDocStoreParamsSchema,F as DeleteDocsStoreParamsSchema,E as DeleteFilteredAssetsStoreParamsSchema,w as DeleteFilteredDocsStoreParamsSchema,P as GetAssetStoreParamsSchema,Q as GetContentChunksStoreParamsSchema,_ as GetDocStoreParamsSchema,J as ListAssetsStoreParamsSchema,v as ListDocsStoreParamsSchema,i as ListStoreParamsSchema,K as MemorySchema,X as MetadataSchema,O as SetAssetHandlerParamsSchema,q as SetAssetTokenStoreParamsSchema,j as SetDocStoreParamsSchema,Be as countAssetsStore,Oe as countCollectionAssetsStore,Ie as countCollectionDocsStore,Le as countDocsStore,te as decodeDocData,Ne as deleteAssetStore,qe as deleteAssetsStore,ge as deleteDocStore,je as deleteDocsStore,Je as deleteFilteredAssetsStore,be as deleteFilteredDocsStore,oe as encodeDocData,ie as getAdminControllers,Ve as getAssetStore,Xe as getContentChunksStore,pe as getControllers,Ue as getDocStore,Se as isAdminController,de as isController,We as listAssetsStore,ze as listDocsStore,Ee as setAssetHandler,Qe as setAssetTokenStore,ke as setDocStore};
1
+ import{C as U,E as te,F as se,a as _,c as n,d as m,e as A,f as x,k as u,l as D,m as C,n as f,o as K,p as k,u as g,v as I}from"./chunk-VIFVPVUD.js";import{a as h}from"./chunk-JU5CZHLY.js";import"./chunk-4C666HHU.js";import*as c from"zod";var J=c.enum(["write","admin","submit"]),Q=c.enum(["automation","emulator"]),X=c.tuple([c.string(),c.string()]),Y=c.object({metadata:c.array(X),created_at:_,updated_at:_,expires_at:_.optional(),scope:J,kind:Q.optional()}).strict(),Z=c.tuple([h,Y]),$=c.array(Z),d=c.object({id:n.or(m),accessKeys:$});import{Principal as ee}from"@icp-sdk/core/principal";var a=e=>ee.from(e).toUint8Array();var ie=()=>__juno_satellite_get_admin_access_keys(),pe=()=>__juno_satellite_get_access_keys(),Se=e=>{d.parse(e);let{id:t,accessKeys:s}=e,o=a(t);return __juno_satellite_is_write_access_key(o,s)},_e=e=>{d.parse(e);let{id:t,accessKeys:s}=e,o=a(t);return __juno_satellite_is_valid_access_key(o,s)},de=e=>{d.parse(e);let{id:t,accessKeys:s}=e,o=a(t);return __juno_satellite_is_admin_controller(o,s)};import*as j from"zod";var l=j.object({collection:A}).strict(),i=l.extend({caller:n.or(m),params:U}).strict();var y=l.extend({caller:n.or(m),key:x}).strict(),L=y.extend({doc:u}).strict(),z=y.extend({doc:D}).strict(),R=l,b=i,w=i,v=l,G=i;var ke=e=>{L.parse(e);let{caller:t,collection:s,key:o,doc:r}=e,p=a(t);return __juno_satellite_datastore_set_doc_store(p,s,o,r)},ge=e=>{z.parse(e);let{caller:t,collection:s,key:o,doc:r}=e,p=a(t);return __juno_satellite_datastore_delete_doc_store(p,s,o,r)},Ie=e=>{y.parse(e);let{caller:t,collection:s,key:o}=e,r=a(t);return __juno_satellite_datastore_get_doc_store(r,s,o)},Ue=e=>{w.parse(e);let{caller:t,collection:s,params:o}=e,r=a(t);return __juno_satellite_datastore_list_docs_store(r,s,o)},je=e=>{R.parse(e);let{collection:t}=e;return __juno_satellite_datastore_count_collection_docs_store(t)},Le=e=>{b.parse(e);let{caller:t,collection:s,params:o}=e,r=a(t);return __juno_satellite_datastore_count_docs_store(r,s,o)},ze=e=>{v.parse(e);let{collection:t}=e;__juno_satellite_datastore_delete_docs_store(t)},Re=e=>{G.parse(e);let{caller:t,collection:s,params:o}=e,r=a(t);return __juno_satellite_datastore_delete_filtered_docs_store(r,s,o)};var we=()=>{__juno_satellite_caller_is_admin()},ve=()=>__juno_satellite_caller_has_write_permission(),Ge=()=>__juno_satellite_caller_is_access_key();import*as F from"zod";var T=F.enum(["heap","stable"]);import*as S from"zod";var P=l.extend({caller:n.or(m),full_path:g}).strict(),H=l,M=i,O=S.object({key:K,content:f,headers:C}).strict(),B=l,E=i,N=P,W=P.extend({token:I}),V=i,q=S.object({encoding:k,chunk_index:S.bigint(),memory:T}).strict();var Ve=e=>{H.parse(e);let{collection:t}=e;return __juno_satellite_storage_count_collection_assets_store(t)},qe=e=>{M.parse(e);let{caller:t,collection:s,params:o}=e,r=a(t);return __juno_satellite_storage_count_assets_store(r,s,o)},Je=e=>{O.parse(e);let{key:t,content:s,headers:o}=e;__juno_satellite_storage_set_asset_handler(t,s,o)},Qe=e=>{N.parse(e);let{caller:t,collection:s,full_path:o}=e,r=a(t);return __juno_satellite_storage_delete_asset_store(r,s,o)},Xe=e=>{B.parse(e);let{collection:t}=e;__juno_satellite_storage_delete_assets_store(t)},Ye=e=>{E.parse(e);let{caller:t,collection:s,params:o}=e,r=a(t);return __juno_satellite_storage_delete_filtered_assets_store(r,s,o)},Ze=e=>{W.parse(e);let{caller:t,collection:s,full_path:o,token:r}=e,p=a(t);__juno_satellite_storage_set_asset_token_store(p,s,o,r)},$e=e=>{P.parse(e);let{caller:t,collection:s,full_path:o}=e,r=a(t);return __juno_satellite_storage_get_asset_store(r,s,o)},et=e=>{V.parse(e);let{caller:t,collection:s,params:o}=e,r=a(t);return __juno_satellite_storage_list_assets_store(r,s,o)},tt=e=>{q.parse(e);let{encoding:t,chunk_index:s,memory:o}=e;return __juno_satellite_storage_get_content_chunks_store(t,s,o)};export{d as AccessKeyCheckParamsSchema,Q as AccessKeyKindSchema,Z as AccessKeyRecordSchema,Y as AccessKeySchema,J as AccessKeyScopeSchema,$ as AccessKeysSchema,l as CollectionParamsSchema,M as CountAssetsStoreParamsSchema,H as CountCollectionAssetsStoreParamsSchema,R as CountCollectionDocsStoreParamsSchema,b as CountDocsStoreParamsSchema,N as DeleteAssetStoreParamsSchema,B as DeleteAssetsStoreParamsSchema,z as DeleteDocStoreParamsSchema,v as DeleteDocsStoreParamsSchema,E as DeleteFilteredAssetsStoreParamsSchema,G as DeleteFilteredDocsStoreParamsSchema,P as GetAssetStoreParamsSchema,q as GetContentChunksStoreParamsSchema,y as GetDocStoreParamsSchema,V as ListAssetsStoreParamsSchema,w as ListDocsStoreParamsSchema,i as ListStoreParamsSchema,T as MemorySchema,X as MetadataSchema,O as SetAssetHandlerParamsSchema,W as SetAssetTokenStoreParamsSchema,L as SetDocStoreParamsSchema,ve as callerHasWritePermission,Ge as callerIsAccessKey,we as callerIsAdmin,qe as countAssetsStore,Ve as countCollectionAssetsStore,je as countCollectionDocsStore,Le as countDocsStore,te as decodeDocData,Qe as deleteAssetStore,Xe as deleteAssetsStore,ge as deleteDocStore,ze as deleteDocsStore,Ye as deleteFilteredAssetsStore,Re as deleteFilteredDocsStore,se as encodeDocData,pe as getAccessKeys,ie as getAdminAccessKeys,$e as getAssetStore,tt as getContentChunksStore,Ie as getDocStore,de as isAdminController,_e as isValidAccessKey,Se as isWriteAccessKey,et as listAssetsStore,Ue as listDocsStore,Je as setAssetHandler,Ze as setAssetTokenStore,ke as setDocStore};
2
2
  //# sourceMappingURL=sdk.js.map
package/sdk.js.map CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["src/sdk/schemas/controllers.ts", "src/sdk/utils/caller.utils.ts", "src/sdk/controllers.sdk.ts", "src/sdk/schemas/params.ts", "src/sdk/schemas/db.ts", "src/sdk/db.sdk.ts", "src/sdk/schemas/collections.ts", "src/sdk/schemas/storage.ts", "src/sdk/storage.sdk.ts"],
4
- "sourcesContent": ["import * as z from 'zod';\nimport {RawPrincipalSchema} from '../../schemas/candid';\nimport {\n type RawUserId,\n type Timestamp,\n type UserId,\n RawUserIdSchema,\n TimestampSchema,\n UserIdSchema\n} from '../../schemas/satellite';\n\n/**\n * @see ControllerScope\n */\nexport const ControllerScopeSchema = z.enum(['write', 'admin', 'submit']);\n\n/**\n * Represents the permission scope of a controller.\n */\nexport type ControllerScope = z.infer<typeof ControllerScopeSchema>;\n\n/**\n * @see ControllerKind\n */\nexport const ControllerKindSchema = z.enum(['automation', 'emulator']);\n\n/**\n * Represents a specific kind of controller. Meant for informational purposes.\n */\nexport type ControllerKind = z.infer<typeof ControllerKindSchema>;\n\n/**\n * @see MetadataSchema\n */\nexport const MetadataSchema = z.tuple([z.string(), z.string()]);\n\n/**\n * Represents a single metadata entry as a key-value tuple.\n */\nexport type Metadata = z.infer<typeof MetadataSchema>;\n\n/**\n * @see ControllerSchema\n */\nexport const ControllerSchema = z\n .object({\n metadata: z.array(MetadataSchema),\n created_at: TimestampSchema,\n updated_at: TimestampSchema,\n expires_at: TimestampSchema.optional(),\n scope: ControllerScopeSchema,\n kind: ControllerKindSchema.optional()\n })\n .strict();\n\n/**\n * Represents a controller with access scope and associated metadata.\n */\nexport interface Controller {\n /**\n * A list of key-value metadata pairs associated with the controller.\n */\n metadata: Metadata[];\n\n /**\n * The timestamp when the controller was created.\n */\n created_at: Timestamp;\n\n /**\n * The timestamp when the controller was last updated.\n */\n updated_at: Timestamp;\n\n /**\n * Optional expiration timestamp for the controller.\n */\n expires_at?: Timestamp;\n\n /**\n * The scope assigned to the controller.\n */\n scope: ControllerScope;\n\n /**\n * An optional kind identifier of the controller.\n */\n kind?: ControllerKind;\n}\n\n/**\n * @see ControllerRecordSchema\n */\nexport const ControllerRecordSchema = z.tuple([RawPrincipalSchema, ControllerSchema]);\n\n/**\n * Represents a tuple containing the principal ID and associated controller data.\n */\nexport type ControllerRecord = z.infer<typeof ControllerRecordSchema>;\n\n/**\n * @see ControllersSchema\n */\nexport const ControllersSchema = z.array(ControllerRecordSchema);\n\n/**\n * Represents a list of controllers.\n */\nexport type Controllers = z.infer<typeof ControllersSchema>;\n\n/**\n * @see ControllerCheckParamsSchema\n */\nexport const ControllerCheckParamsSchema = z.object({\n caller: RawUserIdSchema.or(UserIdSchema),\n controllers: ControllersSchema\n});\n\n/**\n * Represents the parameters required to perform controller checks.\n */\nexport interface ControllerCheckParams {\n /**\n * The identity of the caller to verify against the controller list.\n */\n caller: RawUserId | UserId;\n\n /**\n * The list of controllers to check against.\n */\n controllers: Controllers;\n}\n", "import {Principal} from '@icp-sdk/core/principal';\nimport type {RawUserId, UserId} from '../../schemas/satellite';\n\n/**\n * Normalizes a user ID into a raw `Uint8Array` representation.\n *\n * @param {RawUserId | UserId} caller - The caller identity, either a raw `Uint8Array`\n * or a `Principal` instance.\n *\n * @returns {RawUserId} The raw user ID as a `Uint8Array`.\n */\nexport const normalizeCaller = (caller: RawUserId | UserId): RawUserId =>\n Principal.from(caller).toUint8Array();\n", "import {\n type ControllerCheckParams,\n type Controllers,\n ControllerCheckParamsSchema\n} from './schemas/controllers';\nimport {normalizeCaller} from './utils/caller.utils';\n\n/**\n * Gets the list of admin controllers from the Satellite.\n *\n * @returns {Controllers} The list of admin controllers.\n *\n * @throws {z.ZodError} If the returned value does not match the expected schema.\n */\nexport const getAdminControllers = (): Controllers => __juno_satellite_get_admin_controllers();\n\n/**\n * Gets the list of controllers from the Satellite.\n *\n * @returns {Controllers} The list of all controllers.\n *\n * @throws {z.ZodError} If the returned value does not match the expected schema.\n */\nexport const getControllers = (): Controllers => __juno_satellite_get_controllers();\n\n/**\n * Checks if the given caller is an admin among the provided controllers.\n *\n * @param {ControllerCheckParams} params - The parameters including the caller identity\n * and the list of controllers to verify against.\n *\n * @returns {boolean} Whether the caller is an admin.\n *\n * @throws {z.ZodError} If any input does not match the expected schema.\n */\nexport const isAdminController = (params: ControllerCheckParams): boolean => {\n ControllerCheckParamsSchema.parse(params);\n\n const {caller: providedCaller, controllers} = params;\n\n const caller = normalizeCaller(providedCaller);\n\n return __juno_satellite_is_admin_controller(caller, controllers);\n};\n\n/**\n * Checks if the given caller exists among the provided controllers.\n *\n * @param {ControllerCheckParams} params - The parameters including the caller identity\n * and the list of controllers to verify against.\n *\n * @returns {boolean} Whether the caller is a controller.\n *\n * @throws {z.ZodError} If any input does not match the expected schema.\n */\nexport const isController = (params: ControllerCheckParams): boolean => {\n ControllerCheckParamsSchema.parse(params);\n\n const {caller: providedCaller, controllers} = params;\n\n const caller = normalizeCaller(providedCaller);\n\n return __juno_satellite_is_controller(caller, controllers);\n};\n", "import * as z from 'zod';\nimport {type ListParams, ListParamsSchema} from '../../schemas/list';\nimport {\n type Collection,\n CollectionSchema,\n type RawUserId,\n RawUserIdSchema,\n type UserId,\n UserIdSchema\n} from '../../schemas/satellite';\n\n/**\n * @see CollectionParams\n */\nexport const CollectionParamsSchema = z\n .object({\n collection: CollectionSchema\n })\n .strict();\n\n/**\n * The parameters required to scope an operation to a collection.\n */\nexport interface CollectionParams {\n /**\n * The name of the collection to target.\n */\n collection: Collection;\n}\n\n/**\n * @see ListStoreParams\n */\nexport const ListStoreParamsSchema = CollectionParamsSchema.extend({\n caller: RawUserIdSchema.or(UserIdSchema),\n params: ListParamsSchema\n}).strict();\n\n/**\n * The parameters required to list documents from the datastore respectively assets from the storage.\n */\nexport type ListStoreParams = CollectionParams & {\n /**\n * The identity of the caller requesting the list operation.\n */\n caller: RawUserId | UserId;\n\n /**\n * Optional filtering, ordering, and pagination parameters.\n */\n params: ListParams;\n};\n", "import {type DelDoc, DelDocSchema, type SetDoc, SetDocSchema} from '../../schemas/db';\nimport {\n type Key,\n KeySchema,\n type RawUserId,\n RawUserIdSchema,\n type UserId,\n UserIdSchema\n} from '../../schemas/satellite';\nimport {\n type CollectionParams,\n CollectionParamsSchema,\n type ListStoreParams,\n ListStoreParamsSchema\n} from './params';\n\n/**\n * @see GetDocStoreParams\n */\nexport const GetDocStoreParamsSchema = CollectionParamsSchema.extend({\n caller: RawUserIdSchema.or(UserIdSchema),\n key: KeySchema\n}).strict();\n\n/**\n * Represents the base parameters required to access the datastore and modify a document.\n */\nexport type GetDocStoreParams = CollectionParams & {\n /**\n * The caller who initiate the document operation.\n */\n caller: RawUserId | UserId;\n\n /**\n * The key identifying the document within the collection.\n */\n key: Key;\n};\n\n/**\n * @see SetDocStoreParams\n */\nexport const SetDocStoreParamsSchema = GetDocStoreParamsSchema.extend({\n doc: SetDocSchema\n}).strict();\n\n/**\n * Represents the parameters required to store or update a document.\n *\n * This includes the document data along with metadata such as the caller,\n * collection, and key.\n */\nexport type SetDocStoreParams = GetDocStoreParams & {\n /**\n * The data, optional description and version required to create or update a document.\n */\n doc: SetDoc;\n};\n\n/**\n * @see DeleteDocStoreParams\n */\nexport const DeleteDocStoreParamsSchema = GetDocStoreParamsSchema.extend({\n doc: DelDocSchema\n}).strict();\n\n/**\n * Represents the parameters required to delete a document.\n *\n * This includes the document version along with metadata such as the caller,\n * collection, and key.\n */\nexport type DeleteDocStoreParams = GetDocStoreParams & {\n /**\n * The version required to delete a document.\n */\n doc: DelDoc;\n};\n\n/**\n * @see CountCollectionDocsStoreParams\n */\nexport const CountCollectionDocsStoreParamsSchema = CollectionParamsSchema;\n\n/**\n * The parameters required to count documents from the datastore.\n */\nexport type CountCollectionDocsStoreParams = CollectionParams;\n\n/**\n * @see CountDocsStoreParams\n */\nexport const CountDocsStoreParamsSchema = ListStoreParamsSchema;\n\n/**\n * The parameters required to count documents from the datastore.\n */\nexport type CountDocsStoreParams = ListStoreParams;\n\n/**\n * @see ListDocsStoreParams\n */\nexport const ListDocsStoreParamsSchema = ListStoreParamsSchema;\n\n/**\n * The parameters required to list documents from the datastore.\n */\nexport type ListDocsStoreParams = ListStoreParams;\n\n/**\n * @see DeleteDocsStoreParams\n */\nexport const DeleteDocsStoreParamsSchema = CollectionParamsSchema;\n\n/**\n * The parameters required to delete the documents from a collection of the datastore.\n */\nexport type DeleteDocsStoreParams = CollectionParams;\n\n/**\n * @see DeleteFilteredDocsParams\n */\nexport const DeleteFilteredDocsStoreParamsSchema = ListStoreParamsSchema;\n\n/**\n * The parameters required to delete documents from the datastore.\n */\nexport type DeleteFilteredDocsStoreParams = ListStoreParams;\n", "import type {DocContext} from '../hooks/schemas/db/context';\nimport type {DocUpsert} from '../hooks/schemas/db/payload';\nimport type {Doc, OptionDoc} from '../schemas/db';\nimport type {ListResults} from '../schemas/list';\nimport {\n type CountCollectionDocsStoreParams,\n CountCollectionDocsStoreParamsSchema,\n type CountDocsStoreParams,\n CountDocsStoreParamsSchema,\n type DeleteDocsStoreParams,\n DeleteDocsStoreParamsSchema,\n type DeleteDocStoreParams,\n DeleteDocStoreParamsSchema,\n type DeleteFilteredDocsStoreParams,\n DeleteFilteredDocsStoreParamsSchema,\n type GetDocStoreParams,\n GetDocStoreParamsSchema,\n type ListDocsStoreParams,\n ListDocsStoreParamsSchema,\n type SetDocStoreParams,\n SetDocStoreParamsSchema\n} from './schemas/db';\nimport {normalizeCaller} from './utils/caller.utils';\n\n/**\n * Stores or updates a document in the datastore.\n *\n * The data must have been encoded - using encodeDocData - before calling this function.\n *\n * @param {SetDocStoreParams} params - The parameters required to store the document,\n * including the caller, collection, key, and document data.\n *\n * @returns {DocContext<DocUpsert>} The context of the stored or updated document,\n * including its key, collection, and both the previous and current versions of the document.\n *\n * @throws {z.ZodError} If the provided parameters do not match the expected schema.\n * @throws {Error} If the Satellite fails to validate or store the document.\n */\nexport const setDocStore = (params: SetDocStoreParams): DocContext<DocUpsert> => {\n SetDocStoreParamsSchema.parse(params);\n\n const {caller: providedCaller, collection, key, doc} = params;\n\n const caller = normalizeCaller(providedCaller);\n\n return __juno_satellite_datastore_set_doc_store(caller, collection, key, doc);\n};\n\n/**\n * Deletes a document from the datastore.\n *\n * @param {DeleteDocStoreParams} params - The parameters required to delete the document,\n * including the caller, collection, key, and the expected version of the document.\n *\n * @returns {DocContext<OptionDoc>} The context of the deleted document,\n * including its key, collection, and optionally the previous document data if it existed.\n *\n * @throws {z.ZodError} If the provided parameters do not match the expected schema.\n * @throws {Error} If the Satellite fails to validate the request or the document cannot be deleted.\n */\nexport const deleteDocStore = (params: DeleteDocStoreParams): DocContext<OptionDoc> => {\n DeleteDocStoreParamsSchema.parse(params);\n\n const {caller: providedCaller, collection, key, doc} = params;\n\n const caller = normalizeCaller(providedCaller);\n\n return __juno_satellite_datastore_delete_doc_store(caller, collection, key, doc);\n};\n\n/**\n * Retrieve a document from the datastore.\n *\n * @param {GetDocStoreParams} params - The parameters required to get the document.\n *\n * @returns {OptionDoc} The document if found, or undefined if not.\n *\n * @throws {z.ZodError} If the provided parameters do not match the expected schema.\n * @throws {Error} If the Satellite fails while retrieving the document.\n */\nexport const getDocStore = (params: GetDocStoreParams): OptionDoc => {\n GetDocStoreParamsSchema.parse(params);\n\n const {caller: providedCaller, collection, key} = params;\n\n const caller = normalizeCaller(providedCaller);\n\n return __juno_satellite_datastore_get_doc_store(caller, collection, key);\n};\n\n/**\n * Lists documents from the datastore using optional filtering, pagination, and ordering parameters.\n *\n * @param {ListStoreParams} params - The parameters required to perform the list operation.\n *\n * @returns {ListResults<Doc>} A list result containing matching documents and pagination metadata.\n *\n * @throws {z.ZodError} If the input parameters do not conform to the schema.\n * @throws {Error} If the Satellite fails while performing the listing operation.\n */\nexport const listDocsStore = (params: ListDocsStoreParams): ListResults<Doc> => {\n ListDocsStoreParamsSchema.parse(params);\n\n const {caller: providedCaller, collection, params: listParams} = params;\n\n const caller = normalizeCaller(providedCaller);\n\n return __juno_satellite_datastore_list_docs_store(caller, collection, listParams);\n};\n\n/**\n * Counts the number of documents in a specific collection.\n *\n * @param {CountCollectionDocsStoreParams} params - The parameters required to count documents in the collection.\n *\n * @returns {bigint} The total number of documents in the specified collection.\n *\n * @throws {z.ZodError} If the input parameters do not conform to the schema.\n * @throws {Error} If the Satellite fails while performing the count operation.\n */\nexport const countCollectionDocsStore = (params: CountCollectionDocsStoreParams): bigint => {\n CountCollectionDocsStoreParamsSchema.parse(params);\n\n const {collection} = params;\n\n return __juno_satellite_datastore_count_collection_docs_store(collection);\n};\n\n/**\n * Counts the number of documents in a collection matching specific filters and owned by a specific caller.\n *\n * @param {CountDocsStoreParams} params - The parameters required to perform the filtered count.\n *\n * @returns {bigint} The number of documents that match the provided filters.\n *\n * @throws {z.ZodError} If the input parameters do not conform to the schema.\n * @throws {Error} If the Satellite fails while performing the count operation.\n */\nexport const countDocsStore = (params: CountDocsStoreParams): bigint => {\n CountDocsStoreParamsSchema.parse(params);\n\n const {caller: providedCaller, collection, params: listParams} = params;\n\n const caller = normalizeCaller(providedCaller);\n\n return __juno_satellite_datastore_count_docs_store(caller, collection, listParams);\n};\n\n/**\n * Delete documents in a specific collection of the Datastore.\n *\n * @param {DeleteDocsStoreParams} params - The parameters required to delete documents in the collection.\n *\n * @throws {z.ZodError} If the input parameters do not conform to the schema.\n * @throws {Error} If the Satellite fails while performing the count operation.\n */\nexport const deleteDocsStore = (params: DeleteDocsStoreParams): void => {\n DeleteDocsStoreParamsSchema.parse(params);\n\n const {collection} = params;\n\n __juno_satellite_datastore_delete_docs_store(collection);\n};\n\n/**\n * Delete documents in a collection matching specific filters and owned by a specific caller.\n *\n * @param {DeleteFilteredDocsStoreParams} params - The parameters required to perform the filtered deletion.\n *\n * @returns {DocContext<OptionDoc>[]} The context resulting of the deletion of documents that match the provided filters.\n *\n * @throws {z.ZodError} If the input parameters do not conform to the schema.\n * @throws {Error} If the Satellite fails while performing the count operation.\n */\nexport const deleteFilteredDocsStore = (\n params: DeleteFilteredDocsStoreParams\n): DocContext<OptionDoc>[] => {\n DeleteFilteredDocsStoreParamsSchema.parse(params);\n\n const {caller: providedCaller, collection, params: listParams} = params;\n\n const caller = normalizeCaller(providedCaller);\n\n return __juno_satellite_datastore_delete_filtered_docs_store(caller, collection, listParams);\n};\n", "import * as z from 'zod';\n\n/**\n * @see Memory\n */\nexport const MemorySchema = z.enum(['heap', 'stable']);\n\n/**\n * Memory type used to select storage or datastore location.\n */\nexport type Memory = z.infer<typeof MemorySchema>;\n", "import * as z from 'zod';\nimport {type RawUserId, type UserId, RawUserIdSchema, UserIdSchema} from '../../schemas/satellite';\nimport {\n type AssetAccessToken,\n type AssetEncoding,\n type AssetKey,\n type Blob,\n type FullPath,\n type HeaderFields,\n AssetAccessTokenSchema,\n AssetEncodingSchema,\n AssetKeySchema,\n BlobSchema,\n FullPathSchema,\n HeaderFieldsSchema\n} from '../../schemas/storage';\nimport {type Memory, MemorySchema} from './collections';\nimport {\n type CollectionParams,\n type ListStoreParams,\n CollectionParamsSchema,\n ListStoreParamsSchema\n} from './params';\n\n/**\n * @see GetAssetStoreParams\n */\nexport const GetAssetStoreParamsSchema = CollectionParamsSchema.extend({\n caller: RawUserIdSchema.or(UserIdSchema),\n full_path: FullPathSchema\n}).strict();\n\n/**\n * Represents the base parameters required to access the storage and modify an asset.\n */\nexport type GetAssetStoreParams = CollectionParams & {\n /**\n * The caller who initiate the document operation.\n */\n caller: RawUserId | UserId;\n\n /**\n * The full_path identifying the asset within the collection.\n */\n full_path: FullPath;\n};\n\n/**\n * @see CountCollectionAssetsStoreParams\n */\nexport const CountCollectionAssetsStoreParamsSchema = CollectionParamsSchema;\n\n/**\n * The parameters required to count documents from the storage.\n */\nexport type CountCollectionAssetsStoreParams = CollectionParams;\n\n/**\n * @see CountAssetsStoreParams\n */\nexport const CountAssetsStoreParamsSchema = ListStoreParamsSchema;\n\n/**\n * The parameters required to count documents from the storage.\n */\nexport type CountAssetsStoreParams = ListStoreParams;\n\n/**\n * @see SetAssetHandlerParams\n */\nexport const SetAssetHandlerParamsSchema = z\n .object({\n key: AssetKeySchema,\n content: BlobSchema,\n headers: HeaderFieldsSchema\n })\n .strict();\n\n/**\n * The parameters required to set (or update) an asset.\n */\nexport interface SetAssetHandlerParams {\n /**\n * The key identifying the asset.\n */\n key: AssetKey;\n\n /**\n * The binary content of the asset.\n */\n content: Blob;\n\n /**\n * Associated HTTP headers.\n */\n headers: HeaderFields;\n}\n\n/**\n * @see DeleteAssetsStoreParams\n */\nexport const DeleteAssetsStoreParamsSchema = CollectionParamsSchema;\n\n/**\n * The parameters required to delete the assets from a collection of the storage.\n */\nexport type DeleteAssetsStoreParams = CollectionParams;\n\n/**\n * @see DeleteFilteredAssetsParams\n */\nexport const DeleteFilteredAssetsStoreParamsSchema = ListStoreParamsSchema;\n\n/**\n * The parameters required to delete assets from the storage.\n */\nexport type DeleteFilteredAssetsStoreParams = ListStoreParams;\n\n/**\n * @see DeleteAssetStoreParams\n */\nexport const DeleteAssetStoreParamsSchema = GetAssetStoreParamsSchema;\n\n/**\n * Represents the parameters required to delete an asset.\n */\nexport type DeleteAssetStoreParams = GetAssetStoreParams;\n\n/**\n * @see SetAssetTokenStoreParams\n */\nexport const SetAssetTokenStoreParamsSchema = GetAssetStoreParamsSchema.extend({\n token: AssetAccessTokenSchema\n});\n\n/**\n * Represents the parameters required to delete an asset.\n */\nexport type SetAssetTokenStoreParams = GetAssetStoreParams & {\n /**\n * The token to apply to the asset.\n * Setting `undefined` removes the protection and makes the asset public.\n */\n token: AssetAccessToken;\n};\n\n/**\n * @see ListAssetsStoreParams\n */\nexport const ListAssetsStoreParamsSchema = ListStoreParamsSchema;\n\n/**\n * The parameters required to list documents from the datastore.\n */\nexport type ListAssetsStoreParams = ListStoreParams;\n\n/**\n * @see GetContentChunksStoreParams\n */\nexport const GetContentChunksStoreParamsSchema = z\n .object({\n encoding: AssetEncodingSchema,\n chunk_index: z.bigint(),\n memory: MemorySchema\n })\n .strict();\n\n/**\n * The parameters required to retrieve a specific chunk from an asset.\n */\nexport interface GetContentChunksStoreParams {\n /**\n * The encoding of the chunks.\n */\n encoding: AssetEncoding;\n\n /**\n * The index of the chunk to retrieve.\n */\n chunk_index: bigint;\n\n /**\n * The memory type to retrieve the chunk from.\n */\n memory: Memory;\n}\n", "import type {ListResults} from '../schemas/list';\nimport type {AssetNoContent, Blob, OptionAsset} from '../schemas/storage';\nimport {\n type CountAssetsStoreParams,\n CountAssetsStoreParamsSchema,\n type CountCollectionAssetsStoreParams,\n CountCollectionAssetsStoreParamsSchema,\n type DeleteAssetsStoreParams,\n DeleteAssetsStoreParamsSchema,\n type DeleteAssetStoreParams,\n DeleteAssetStoreParamsSchema,\n type DeleteFilteredAssetsStoreParams,\n DeleteFilteredAssetsStoreParamsSchema,\n type GetAssetStoreParams,\n GetAssetStoreParamsSchema,\n type GetContentChunksStoreParams,\n GetContentChunksStoreParamsSchema,\n type ListAssetsStoreParams,\n ListAssetsStoreParamsSchema,\n type SetAssetHandlerParams,\n SetAssetHandlerParamsSchema,\n type SetAssetTokenStoreParams,\n SetAssetTokenStoreParamsSchema\n} from './schemas/storage';\nimport {normalizeCaller} from './utils/caller.utils';\n\n/**\n * Counts the number of assets in a specific collection.\n *\n * @param {CountCollectionAssetsStoreParams} params - The parameters required to count assets in the collection.\n *\n * @returns {bigint} The total number of assets in the specified collection.\n *\n * @throws {z.ZodError} If the input parameters do not conform to the schema.\n * @throws {Error} If the Satellite fails while performing the count operation.\n */\nexport const countCollectionAssetsStore = (params: CountCollectionAssetsStoreParams): bigint => {\n CountCollectionAssetsStoreParamsSchema.parse(params);\n\n const {collection} = params;\n\n return __juno_satellite_storage_count_collection_assets_store(collection);\n};\n\n/**\n * Counts the number of assets in a collection matching specific filters and owned by a specific caller.\n *\n * @param {CountAssetsStoreParams} params - The parameters required to perform the filtered count.\n *\n * @returns {bigint} The number of assets that match the provided filters.\n *\n * @throws {z.ZodError} If the input parameters do not conform to the schema.\n * @throws {Error} If the Satellite fails while performing the count operation.\n */\nexport const countAssetsStore = (params: CountAssetsStoreParams): bigint => {\n CountAssetsStoreParamsSchema.parse(params);\n\n const {caller: providedCaller, collection, params: listParams} = params;\n\n const caller = normalizeCaller(providedCaller);\n\n return __juno_satellite_storage_count_assets_store(caller, collection, listParams);\n};\n\n/**\n * Sets or updates an asset in the storage.\n *\n * @param {SetAssetHandlerParams} params - The parameters required to set or update an asset.\n *\n * @throws {z.ZodError} If the input parameters do not conform to the schema.\n * @throws {Error} If the Satellite fails while performing the operation.\n */\nexport const setAssetHandler = (params: SetAssetHandlerParams): void => {\n SetAssetHandlerParamsSchema.parse(params);\n\n const {key, content, headers} = params;\n\n __juno_satellite_storage_set_asset_handler(key, content, headers);\n};\n\n/**\n * Deletes an asset from the storage.\n *\n * @param {DeleteAssetStoreParams} params - The parameters required to delete the asset.\n *\n * @returns {OptionAsset} The potentially deleted asset.\n *\n * @throws {z.ZodError} If the provided parameters do not match the expected schema.\n * @throws {Error} If the Satellite fails to validate the request or the asset cannot be deleted.\n */\nexport const deleteAssetStore = (params: DeleteAssetStoreParams): OptionAsset => {\n DeleteAssetStoreParamsSchema.parse(params);\n\n const {caller: providedCaller, collection, full_path} = params;\n\n const caller = normalizeCaller(providedCaller);\n\n return __juno_satellite_storage_delete_asset_store(caller, collection, full_path);\n};\n\n/**\n * Delete assets in a specific collection of the Storage.\n *\n * @param {DeleteAssetsStoreParams} params - The parameters required to delete assets in the collection.\n *\n * @throws {z.ZodError} If the input parameters do not conform to the schema.\n * @throws {Error} If the Satellite fails while performing the count operation.\n */\nexport const deleteAssetsStore = (params: DeleteAssetsStoreParams): void => {\n DeleteAssetsStoreParamsSchema.parse(params);\n\n const {collection} = params;\n\n __juno_satellite_storage_delete_assets_store(collection);\n};\n\n/**\n * Delete assets in a collection matching specific filters and owned by a specific caller.\n *\n * @param {DeleteFilteredAssetsStoreParams} params - The parameters required to perform the filtered deletion.\n *\n * @returns {OptionAsset[]} The potential asset resulting of the deletion that match the provided filters.\n *\n * @throws {z.ZodError} If the input parameters do not conform to the schema.\n * @throws {Error} If the Satellite fails while performing the count operation.\n */\nexport const deleteFilteredAssetsStore = (\n params: DeleteFilteredAssetsStoreParams\n): OptionAsset[] => {\n DeleteFilteredAssetsStoreParamsSchema.parse(params);\n\n const {caller: providedCaller, collection, params: listParams} = params;\n\n const caller = normalizeCaller(providedCaller);\n\n return __juno_satellite_storage_delete_filtered_assets_store(caller, collection, listParams);\n};\n\n/**\n * Set or update an access token for an asset in a collection's store.\n *\n * @param {SetAssetTokenStoreParams} params - The parameters required to set the token of the asset.\n *\n *@throws {z.ZodError} If the provided parameters do not match the expected schema.\n * @throws {Error} If the Satellite fails to validate the request or the token cannot be set.\n */\nexport const setAssetTokenStore = (params: SetAssetTokenStoreParams): void => {\n SetAssetTokenStoreParamsSchema.parse(params);\n\n const {caller: providedCaller, collection, full_path, token} = params;\n\n const caller = normalizeCaller(providedCaller);\n\n __juno_satellite_storage_set_asset_token_store(caller, collection, full_path, token);\n};\n\n/**\n * Retrieve an asset from the storage.\n *\n * @param {GetAssetStoreParams} params - The parameters required to get the asset.\n *\n * @returns {OptionAsset} The asset if found, or undefined if not.\n *\n * @throws {z.ZodError} If the provided parameters do not match the expected schema.\n * @throws {Error} If the Satellite fails while retrieving the document.\n */\nexport const getAssetStore = (params: GetAssetStoreParams): OptionAsset => {\n GetAssetStoreParamsSchema.parse(params);\n\n const {caller: providedCaller, collection, full_path} = params;\n\n const caller = normalizeCaller(providedCaller);\n\n return __juno_satellite_storage_get_asset_store(caller, collection, full_path);\n};\n\n/**\n * Lists assets (without content) from the storage using optional filtering, pagination, and ordering parameters.\n *\n * @param {ListStoreParams} params - The parameters required to perform the list operation.\n *\n * @returns {ListResults<AssetNoContent>} A list result containing matching assets and pagination metadata.\n *\n * @throws {z.ZodError} If the input parameters do not conform to the schema.\n * @throws {Error} If the Satellite fails while performing the listing operation.\n */\nexport const listAssetsStore = (params: ListAssetsStoreParams): ListResults<AssetNoContent> => {\n ListAssetsStoreParamsSchema.parse(params);\n\n const {caller: providedCaller, collection, params: listParams} = params;\n\n const caller = normalizeCaller(providedCaller);\n\n return __juno_satellite_storage_list_assets_store(caller, collection, listParams);\n};\n\n/**\n * Retrieves content chunks of an asset.\n *\n * This function fetches a content chunk of a given asset encoding using the specified parameters.\n *\n * @param {GetContentChunksStoreParams} params - The parameters including encoding, chunk index, and memory type.\n *\n * @returns {Blob | undefined} The content chunk if found, or `undefined` if not.\n *\n * @throws {z.ZodError} If the input parameters do not conform to the schema.\n * @throws {Error} If the Satellite throws an internal error during retrieval.\n */\nexport const getContentChunksStore = (params: GetContentChunksStoreParams): Blob | undefined => {\n GetContentChunksStoreParamsSchema.parse(params);\n\n const {encoding, chunk_index, memory} = params;\n\n return __juno_satellite_storage_get_content_chunks_store(encoding, chunk_index, memory);\n};\n"],
5
- "mappings": "uNAAA,UAAYA,MAAO,MAcZ,IAAMC,EAA0B,OAAK,CAAC,QAAS,QAAS,QAAQ,CAAC,EAU3DC,EAAyB,OAAK,CAAC,aAAc,UAAU,CAAC,EAUxDC,EAAmB,QAAM,CAAG,SAAO,EAAK,SAAO,CAAC,CAAC,EAUjDC,EACV,SAAO,CACN,SAAY,QAAMD,CAAc,EAChC,WAAYE,EACZ,WAAYA,EACZ,WAAYA,EAAgB,SAAS,EACrC,MAAOJ,EACP,KAAMC,EAAqB,SAAS,CACtC,CAAC,EACA,OAAO,EAwCGI,EAA2B,QAAM,CAACC,EAAoBH,CAAgB,CAAC,EAUvEI,EAAsB,QAAMF,CAAsB,EAUlDG,EAAgC,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chema", "ControllerSchema", "TimestampSchema", "ControllerRecordSchema", "RawPrincipalSchema", "ControllersSchema", "ControllerCheckParamsSchema", "RawUserIdSchema", "UserIdSchema", "Principal", "normalizeCaller", "caller", "getAdminControllers", "getControllers", "isAdminController", "params", "ControllerCheckParamsSchema", "providedCaller", "controllers", "caller", "normalizeCaller", "isController", "z", "CollectionParamsSchema", "CollectionSchema", "ListStoreParamsSchema", "RawUserIdSchema", "UserIdSchema", "ListParamsSchema", "GetDocStoreParamsSchema", "CollectionParamsSchema", "RawUserIdSchema", "UserIdSchema", "KeySchema", "SetDocStoreParamsSchema", "SetDocSchema", "DeleteDocStoreParamsSchema", "DelDocSchema", "CountCollectionDocsStoreParamsSchema", "CountDocsStoreParamsSchema", "ListStoreParamsSchema", "ListDocsStoreParamsSchema", "DeleteDocsStoreParamsSchema", "DeleteFilteredDocsStoreParamsSchema", "setDocStore", "params", "SetDocStoreParamsSchema", "providedCaller", "collection", "key", "doc", "caller", "normalizeCaller", "deleteDocStore", "DeleteDocStoreParamsSchema", "getDocStore", "GetDocStoreParamsSchema", "listDocsStore", "ListDocsStoreParamsSchema", "listParams", "countCollectionDocsStore", "CountCollectionDocsStoreParamsSchema", "countDocsStore", "CountDocsStoreParamsSchema", "deleteDocsStore", "DeleteDocsStoreParamsSchema", "deleteFilteredDocsStore", "DeleteFilteredDocsStoreParamsSchema", "z", "MemorySchema", "z", "GetAssetStoreParamsSchema", "CollectionParamsSchema", "RawUserIdSchema", "UserIdSchema", "FullPathSchema", "CountCollectionAssetsStoreParamsSchema", "CountAssetsStoreParamsSchema", "ListStoreParamsSchema", "SetAssetHandlerParamsSchema", "AssetKeySchema", "BlobSchema", "HeaderFieldsSchema", "DeleteAssetsStoreParamsSchema", "DeleteFilteredAssetsStoreParamsSchema", "DeleteAssetStoreParamsSchema", "SetAssetTokenStoreParamsSchema", "AssetAccessTokenSchema", "ListAssetsStoreParamsSchema", "GetContentChunksStoreParamsSchema", "AssetEncodingSchema", "MemorySchema", "countCollectionAssetsStore", "params", "CountCollectionAssetsStoreParamsSchema", "collection", "countAssetsStore", "CountAssetsStoreParamsSchema", "providedCaller", "listParams", "caller", "normalizeCaller", "setAssetHandler", "SetAssetHandlerParamsSchema", "key", "content", "headers", "deleteAssetStore", "DeleteAssetStoreParamsSchema", "full_path", "deleteAssetsStore", "DeleteAssetsStoreParamsSchema", "deleteFilteredAssetsStore", "DeleteFilteredAssetsStoreParamsSchema", "setAssetTokenStore", "SetAssetTokenStoreParamsSchema", "token", "getAssetStore", "GetAssetStoreParamsSchema", "listAssetsStore", "ListAssetsStoreParamsSchema", "getContentChunksStore", "GetContentChunksStoreParamsSchema", "encoding", "chunk_index", "memory"]
3
+ "sources": ["src/sdk/schemas/access-keys.ts", "src/sdk/utils/caller.utils.ts", "src/sdk/access-keys.sdk.ts", "src/sdk/schemas/params.ts", "src/sdk/schemas/db.ts", "src/sdk/db.sdk.ts", "src/sdk/guards.sdk.ts", "src/sdk/schemas/collections.ts", "src/sdk/schemas/storage.ts", "src/sdk/storage.sdk.ts"],
4
+ "sourcesContent": ["import * as z from 'zod';\nimport {type RawPrincipal, RawPrincipalSchema} from '../../schemas/principal';\nimport {\n type RawUserId,\n RawUserIdSchema,\n type Timestamp,\n TimestampSchema,\n type UserId,\n UserIdSchema\n} from '../../schemas/satellite';\n\n/**\n * @see AccessKeyScope\n */\nexport const AccessKeyScopeSchema = z.enum(['write', 'admin', 'submit']);\n\n/**\n * Represents the permission scope of an access key.\n */\nexport type AccessKeyScope = z.infer<typeof AccessKeyScopeSchema>;\n\n/**\n * @see AccessKeyKind\n */\nexport const AccessKeyKindSchema = z.enum(['automation', 'emulator']);\n\n/**\n * Represents a specific kind of access key. Meant for informational purposes.\n */\nexport type AccessKeyKind = z.infer<typeof AccessKeyKindSchema>;\n\n/**\n * @see MetadataSchema\n */\nexport const MetadataSchema = z.tuple([z.string(), z.string()]);\n\n/**\n * Represents a single metadata entry as a key-value tuple.\n */\nexport type Metadata = z.infer<typeof MetadataSchema>;\n\n/**\n * @see AccessKeySchema\n */\nexport const AccessKeySchema = z\n .object({\n metadata: z.array(MetadataSchema),\n created_at: TimestampSchema,\n updated_at: TimestampSchema,\n expires_at: TimestampSchema.optional(),\n scope: AccessKeyScopeSchema,\n kind: AccessKeyKindSchema.optional()\n })\n .strict();\n\n/**\n * Represents an access key with access scope and associated metadata.\n */\nexport interface AccessKey {\n /**\n * A list of key-value metadata pairs associated with the access key.\n */\n metadata: Metadata[];\n\n /**\n * The timestamp when the access key was created.\n */\n created_at: Timestamp;\n\n /**\n * The timestamp when the access key was last updated.\n */\n updated_at: Timestamp;\n\n /**\n * Optional expiration timestamp for the access key.\n */\n expires_at?: Timestamp;\n\n /**\n * The scope assigned to the access key.\n */\n scope: AccessKeyScope;\n\n /**\n * An optional kind identifier of the access key.\n */\n kind?: AccessKeyKind;\n}\n\n/**\n * @see AccessKeyRecordSchema\n */\nexport const AccessKeyRecordSchema = z.tuple([RawPrincipalSchema, AccessKeySchema]);\n\n/**\n * Represents a tuple containing the principal ID and associated access key data.\n */\nexport type AccessKeyRecord = z.infer<typeof AccessKeyRecordSchema>;\n\n/**\n * @see AccessKeysSchema\n */\nexport const AccessKeysSchema = z.array(AccessKeyRecordSchema);\n\n/**\n * Represents a list of access keys.\n */\nexport type AccessKeys = [RawPrincipal, AccessKey][];\n\n/**\n * @see AccessKeyCheckParamsSchema\n */\nexport const AccessKeyCheckParamsSchema = z.object({\n id: RawUserIdSchema.or(UserIdSchema),\n accessKeys: AccessKeysSchema\n});\n\n/**\n * Represents the parameters required to perform an access key checks.\n */\nexport interface AccessKeyCheckParams {\n /**\n * The identity to verify against the access keys.\n */\n id: RawUserId | UserId;\n\n /**\n * The list of access keys to check against.\n */\n accessKeys: AccessKeys;\n}\n", "import {Principal} from '@icp-sdk/core/principal';\nimport type {RawUserId, UserId} from '../../schemas/satellite';\n\n/**\n * Normalizes a user ID into a raw `Uint8Array` representation.\n *\n * @param {RawUserId | UserId} caller - The caller identity, either a raw `Uint8Array`\n * or a `Principal` instance.\n *\n * @returns {RawUserId} The raw user ID as a `Uint8Array`.\n */\nexport const normalizeCaller = (caller: RawUserId | UserId): RawUserId =>\n Principal.from(caller).toUint8Array();\n", "import {\n type AccessKeyCheckParams,\n type AccessKeys,\n AccessKeyCheckParamsSchema\n} from './schemas/access-keys';\nimport {normalizeCaller} from './utils/caller.utils';\n\n/**\n * Gets the list of admin access keys from the Satellite.\n *\n * @returns {AccessKeys} The list of admin acces keys.\n *\n * @throws {z.ZodError} If the returned value does not match the expected schema.\n */\nexport const getAdminAccessKeys = (): AccessKeys => __juno_satellite_get_admin_access_keys();\n\n/**\n * Gets the list of access keys from the Satellite.\n *\n * @returns {AccessKeys} The list of all access keys.\n *\n * @throws {z.ZodError} If the returned value does not match the expected schema.\n */\nexport const getAccessKeys = (): AccessKeys => __juno_satellite_get_access_keys();\n\n/**\n * Checks if the given id exists among the provided access keys.\n *\n * @param {AccessKeyCheckParams} params - The parameters including the id\n * and the list of access keys to verify against.\n *\n * @returns {boolean} Whether the id is an access key with write permission.\n *\n * @throws {z.ZodError} If any input does not match the expected schema.\n */\nexport const isWriteAccessKey = (params: AccessKeyCheckParams): boolean => {\n AccessKeyCheckParamsSchema.parse(params);\n\n const {id: providedId, accessKeys} = params;\n\n const id = normalizeCaller(providedId);\n\n return __juno_satellite_is_write_access_key(id, accessKeys);\n};\n\n/**\n * Checks if the given id exists among the provided access keys.\n *\n * @param {AccessKeyCheckParams} params - The parameters including the id\n * and the list of access keys to verify against.\n *\n * @returns {boolean} Whether the id is an access key.\n *\n * @throws {z.ZodError} If any input does not match the expected schema.\n */\nexport const isValidAccessKey = (params: AccessKeyCheckParams): boolean => {\n AccessKeyCheckParamsSchema.parse(params);\n\n const {id: providedId, accessKeys} = params;\n\n const id = normalizeCaller(providedId);\n\n return __juno_satellite_is_valid_access_key(id, accessKeys);\n};\n\n/**\n * Checks if the given id is an admin among the provided access keys and a controller as known on the Internet Computer.\n *\n * @param {AccessKeyCheckParams} params - The parameters including the id\n * and the list of access keys to verify against.\n *\n * @returns {boolean} Whether the id is an admin and a controller of the Satellite on the Internet Computer.\n *\n * @throws {z.ZodError} If any input does not match the expected schema.\n */\nexport const isAdminController = (params: AccessKeyCheckParams): boolean => {\n AccessKeyCheckParamsSchema.parse(params);\n\n const {id: providedId, accessKeys} = params;\n\n const id = normalizeCaller(providedId);\n\n return __juno_satellite_is_admin_controller(id, accessKeys);\n};\n", "import * as z from 'zod';\nimport {type ListParams, ListParamsSchema} from '../../schemas/list';\nimport {\n type Collection,\n CollectionSchema,\n type RawUserId,\n RawUserIdSchema,\n type UserId,\n UserIdSchema\n} from '../../schemas/satellite';\n\n/**\n * @see CollectionParams\n */\nexport const CollectionParamsSchema = z\n .object({\n collection: CollectionSchema\n })\n .strict();\n\n/**\n * The parameters required to scope an operation to a collection.\n */\nexport interface CollectionParams {\n /**\n * The name of the collection to target.\n */\n collection: Collection;\n}\n\n/**\n * @see ListStoreParams\n */\nexport const ListStoreParamsSchema = CollectionParamsSchema.extend({\n caller: RawUserIdSchema.or(UserIdSchema),\n params: ListParamsSchema\n}).strict();\n\n/**\n * The parameters required to list documents from the datastore respectively assets from the storage.\n */\nexport type ListStoreParams = CollectionParams & {\n /**\n * The identity of the caller requesting the list operation.\n */\n caller: RawUserId | UserId;\n\n /**\n * Optional filtering, ordering, and pagination parameters.\n */\n params: ListParams;\n};\n", "import {type DelDoc, DelDocSchema, type SetDoc, SetDocSchema} from '../../schemas/db';\nimport {\n type Key,\n KeySchema,\n type RawUserId,\n RawUserIdSchema,\n type UserId,\n UserIdSchema\n} from '../../schemas/satellite';\nimport {\n type CollectionParams,\n CollectionParamsSchema,\n type ListStoreParams,\n ListStoreParamsSchema\n} from './params';\n\n/**\n * @see GetDocStoreParams\n */\nexport const GetDocStoreParamsSchema = CollectionParamsSchema.extend({\n caller: RawUserIdSchema.or(UserIdSchema),\n key: KeySchema\n}).strict();\n\n/**\n * Represents the base parameters required to access the datastore and modify a document.\n */\nexport type GetDocStoreParams = CollectionParams & {\n /**\n * The caller who initiate the document operation.\n */\n caller: RawUserId | UserId;\n\n /**\n * The key identifying the document within the collection.\n */\n key: Key;\n};\n\n/**\n * @see SetDocStoreParams\n */\nexport const SetDocStoreParamsSchema = GetDocStoreParamsSchema.extend({\n doc: SetDocSchema\n}).strict();\n\n/**\n * Represents the parameters required to store or update a document.\n *\n * This includes the document data along with metadata such as the caller,\n * collection, and key.\n */\nexport type SetDocStoreParams = GetDocStoreParams & {\n /**\n * The data, optional description and version required to create or update a document.\n */\n doc: SetDoc;\n};\n\n/**\n * @see DeleteDocStoreParams\n */\nexport const DeleteDocStoreParamsSchema = GetDocStoreParamsSchema.extend({\n doc: DelDocSchema\n}).strict();\n\n/**\n * Represents the parameters required to delete a document.\n *\n * This includes the document version along with metadata such as the caller,\n * collection, and key.\n */\nexport type DeleteDocStoreParams = GetDocStoreParams & {\n /**\n * The version required to delete a document.\n */\n doc: DelDoc;\n};\n\n/**\n * @see CountCollectionDocsStoreParams\n */\nexport const CountCollectionDocsStoreParamsSchema = CollectionParamsSchema;\n\n/**\n * The parameters required to count documents from the datastore.\n */\nexport type CountCollectionDocsStoreParams = CollectionParams;\n\n/**\n * @see CountDocsStoreParams\n */\nexport const CountDocsStoreParamsSchema = ListStoreParamsSchema;\n\n/**\n * The parameters required to count documents from the datastore.\n */\nexport type CountDocsStoreParams = ListStoreParams;\n\n/**\n * @see ListDocsStoreParams\n */\nexport const ListDocsStoreParamsSchema = ListStoreParamsSchema;\n\n/**\n * The parameters required to list documents from the datastore.\n */\nexport type ListDocsStoreParams = ListStoreParams;\n\n/**\n * @see DeleteDocsStoreParams\n */\nexport const DeleteDocsStoreParamsSchema = CollectionParamsSchema;\n\n/**\n * The parameters required to delete the documents from a collection of the datastore.\n */\nexport type DeleteDocsStoreParams = CollectionParams;\n\n/**\n * @see DeleteFilteredDocsParams\n */\nexport const DeleteFilteredDocsStoreParamsSchema = ListStoreParamsSchema;\n\n/**\n * The parameters required to delete documents from the datastore.\n */\nexport type DeleteFilteredDocsStoreParams = ListStoreParams;\n", "import type {DocContext} from '../hooks/schemas/db/context';\nimport type {DocUpsert} from '../hooks/schemas/db/payload';\nimport type {Doc, OptionDoc} from '../schemas/db';\nimport type {ListResults} from '../schemas/list';\nimport {\n type CountCollectionDocsStoreParams,\n CountCollectionDocsStoreParamsSchema,\n type CountDocsStoreParams,\n CountDocsStoreParamsSchema,\n type DeleteDocsStoreParams,\n DeleteDocsStoreParamsSchema,\n type DeleteDocStoreParams,\n DeleteDocStoreParamsSchema,\n type DeleteFilteredDocsStoreParams,\n DeleteFilteredDocsStoreParamsSchema,\n type GetDocStoreParams,\n GetDocStoreParamsSchema,\n type ListDocsStoreParams,\n ListDocsStoreParamsSchema,\n type SetDocStoreParams,\n SetDocStoreParamsSchema\n} from './schemas/db';\nimport {normalizeCaller} from './utils/caller.utils';\n\n/**\n * Stores or updates a document in the datastore.\n *\n * The data must have been encoded - using encodeDocData - before calling this function.\n *\n * @param {SetDocStoreParams} params - The parameters required to store the document,\n * including the caller, collection, key, and document data.\n *\n * @returns {DocContext<DocUpsert>} The context of the stored or updated document,\n * including its key, collection, and both the previous and current versions of the document.\n *\n * @throws {z.ZodError} If the provided parameters do not match the expected schema.\n * @throws {Error} If the Satellite fails to validate or store the document.\n */\nexport const setDocStore = (params: SetDocStoreParams): DocContext<DocUpsert> => {\n SetDocStoreParamsSchema.parse(params);\n\n const {caller: providedCaller, collection, key, doc} = params;\n\n const caller = normalizeCaller(providedCaller);\n\n return __juno_satellite_datastore_set_doc_store(caller, collection, key, doc);\n};\n\n/**\n * Deletes a document from the datastore.\n *\n * @param {DeleteDocStoreParams} params - The parameters required to delete the document,\n * including the caller, collection, key, and the expected version of the document.\n *\n * @returns {DocContext<OptionDoc>} The context of the deleted document,\n * including its key, collection, and optionally the previous document data if it existed.\n *\n * @throws {z.ZodError} If the provided parameters do not match the expected schema.\n * @throws {Error} If the Satellite fails to validate the request or the document cannot be deleted.\n */\nexport const deleteDocStore = (params: DeleteDocStoreParams): DocContext<OptionDoc> => {\n DeleteDocStoreParamsSchema.parse(params);\n\n const {caller: providedCaller, collection, key, doc} = params;\n\n const caller = normalizeCaller(providedCaller);\n\n return __juno_satellite_datastore_delete_doc_store(caller, collection, key, doc);\n};\n\n/**\n * Retrieve a document from the datastore.\n *\n * @param {GetDocStoreParams} params - The parameters required to get the document.\n *\n * @returns {OptionDoc} The document if found, or undefined if not.\n *\n * @throws {z.ZodError} If the provided parameters do not match the expected schema.\n * @throws {Error} If the Satellite fails while retrieving the document.\n */\nexport const getDocStore = (params: GetDocStoreParams): OptionDoc => {\n GetDocStoreParamsSchema.parse(params);\n\n const {caller: providedCaller, collection, key} = params;\n\n const caller = normalizeCaller(providedCaller);\n\n return __juno_satellite_datastore_get_doc_store(caller, collection, key);\n};\n\n/**\n * Lists documents from the datastore using optional filtering, pagination, and ordering parameters.\n *\n * @param {ListStoreParams} params - The parameters required to perform the list operation.\n *\n * @returns {ListResults<Doc>} A list result containing matching documents and pagination metadata.\n *\n * @throws {z.ZodError} If the input parameters do not conform to the schema.\n * @throws {Error} If the Satellite fails while performing the listing operation.\n */\nexport const listDocsStore = (params: ListDocsStoreParams): ListResults<Doc> => {\n ListDocsStoreParamsSchema.parse(params);\n\n const {caller: providedCaller, collection, params: listParams} = params;\n\n const caller = normalizeCaller(providedCaller);\n\n return __juno_satellite_datastore_list_docs_store(caller, collection, listParams);\n};\n\n/**\n * Counts the number of documents in a specific collection.\n *\n * @param {CountCollectionDocsStoreParams} params - The parameters required to count documents in the collection.\n *\n * @returns {bigint} The total number of documents in the specified collection.\n *\n * @throws {z.ZodError} If the input parameters do not conform to the schema.\n * @throws {Error} If the Satellite fails while performing the count operation.\n */\nexport const countCollectionDocsStore = (params: CountCollectionDocsStoreParams): bigint => {\n CountCollectionDocsStoreParamsSchema.parse(params);\n\n const {collection} = params;\n\n return __juno_satellite_datastore_count_collection_docs_store(collection);\n};\n\n/**\n * Counts the number of documents in a collection matching specific filters and owned by a specific caller.\n *\n * @param {CountDocsStoreParams} params - The parameters required to perform the filtered count.\n *\n * @returns {bigint} The number of documents that match the provided filters.\n *\n * @throws {z.ZodError} If the input parameters do not conform to the schema.\n * @throws {Error} If the Satellite fails while performing the count operation.\n */\nexport const countDocsStore = (params: CountDocsStoreParams): bigint => {\n CountDocsStoreParamsSchema.parse(params);\n\n const {caller: providedCaller, collection, params: listParams} = params;\n\n const caller = normalizeCaller(providedCaller);\n\n return __juno_satellite_datastore_count_docs_store(caller, collection, listParams);\n};\n\n/**\n * Delete documents in a specific collection of the Datastore.\n *\n * @param {DeleteDocsStoreParams} params - The parameters required to delete documents in the collection.\n *\n * @throws {z.ZodError} If the input parameters do not conform to the schema.\n * @throws {Error} If the Satellite fails while performing the count operation.\n */\nexport const deleteDocsStore = (params: DeleteDocsStoreParams): void => {\n DeleteDocsStoreParamsSchema.parse(params);\n\n const {collection} = params;\n\n __juno_satellite_datastore_delete_docs_store(collection);\n};\n\n/**\n * Delete documents in a collection matching specific filters and owned by a specific caller.\n *\n * @param {DeleteFilteredDocsStoreParams} params - The parameters required to perform the filtered deletion.\n *\n * @returns {DocContext<OptionDoc>[]} The context resulting of the deletion of documents that match the provided filters.\n *\n * @throws {z.ZodError} If the input parameters do not conform to the schema.\n * @throws {Error} If the Satellite fails while performing the count operation.\n */\nexport const deleteFilteredDocsStore = (\n params: DeleteFilteredDocsStoreParams\n): DocContext<OptionDoc>[] => {\n DeleteFilteredDocsStoreParamsSchema.parse(params);\n\n const {caller: providedCaller, collection, params: listParams} = params;\n\n const caller = normalizeCaller(providedCaller);\n\n return __juno_satellite_datastore_delete_filtered_docs_store(caller, collection, listParams);\n};\n", "import type {AccessKeys} from './schemas/access-keys';\n\n/**\n * Guard that succeeds if the caller is an admin access key of this satellite.\n *\n * @returns {void}\n *\n * @throws {z.ZodError} If the caller is not an admin access key.\n */\nexport const callerIsAdmin = () => {\n __juno_satellite_caller_is_admin();\n};\n\n/**\n * Guard that succeeds if the caller is an access key with write permission.\n *\n * @returns {void}\n *\n * @throws {z.ZodError} If the caller does not have write permission.\n */\nexport const callerHasWritePermission = (): AccessKeys =>\n __juno_satellite_caller_has_write_permission();\n\n/**\n * Guard that succeeds if the caller is any recognized access key of this satellite.\n *\n * @returns {void}\n *\n * @throws {z.ZodError} If the caller is not a recognized access key.\n */\nexport const callerIsAccessKey = (): AccessKeys => __juno_satellite_caller_is_access_key();\n", "import * as z from 'zod';\n\n/**\n * @see Memory\n */\nexport const MemorySchema = z.enum(['heap', 'stable']);\n\n/**\n * Memory type used to select storage or datastore location.\n */\nexport type Memory = z.infer<typeof MemorySchema>;\n", "import * as z from 'zod';\nimport {type RawUserId, type UserId, RawUserIdSchema, UserIdSchema} from '../../schemas/satellite';\nimport {\n type AssetAccessToken,\n type AssetEncoding,\n type AssetKey,\n type Blob,\n type FullPath,\n type HeaderFields,\n AssetAccessTokenSchema,\n AssetEncodingSchema,\n AssetKeySchema,\n BlobSchema,\n FullPathSchema,\n HeaderFieldsSchema\n} from '../../schemas/storage';\nimport {type Memory, MemorySchema} from './collections';\nimport {\n type CollectionParams,\n type ListStoreParams,\n CollectionParamsSchema,\n ListStoreParamsSchema\n} from './params';\n\n/**\n * @see GetAssetStoreParams\n */\nexport const GetAssetStoreParamsSchema = CollectionParamsSchema.extend({\n caller: RawUserIdSchema.or(UserIdSchema),\n full_path: FullPathSchema\n}).strict();\n\n/**\n * Represents the base parameters required to access the storage and modify an asset.\n */\nexport type GetAssetStoreParams = CollectionParams & {\n /**\n * The caller who initiate the document operation.\n */\n caller: RawUserId | UserId;\n\n /**\n * The full_path identifying the asset within the collection.\n */\n full_path: FullPath;\n};\n\n/**\n * @see CountCollectionAssetsStoreParams\n */\nexport const CountCollectionAssetsStoreParamsSchema = CollectionParamsSchema;\n\n/**\n * The parameters required to count documents from the storage.\n */\nexport type CountCollectionAssetsStoreParams = CollectionParams;\n\n/**\n * @see CountAssetsStoreParams\n */\nexport const CountAssetsStoreParamsSchema = ListStoreParamsSchema;\n\n/**\n * The parameters required to count documents from the storage.\n */\nexport type CountAssetsStoreParams = ListStoreParams;\n\n/**\n * @see SetAssetHandlerParams\n */\nexport const SetAssetHandlerParamsSchema = z\n .object({\n key: AssetKeySchema,\n content: BlobSchema,\n headers: HeaderFieldsSchema\n })\n .strict();\n\n/**\n * The parameters required to set (or update) an asset.\n */\nexport interface SetAssetHandlerParams {\n /**\n * The key identifying the asset.\n */\n key: AssetKey;\n\n /**\n * The binary content of the asset.\n */\n content: Blob;\n\n /**\n * Associated HTTP headers.\n */\n headers: HeaderFields;\n}\n\n/**\n * @see DeleteAssetsStoreParams\n */\nexport const DeleteAssetsStoreParamsSchema = CollectionParamsSchema;\n\n/**\n * The parameters required to delete the assets from a collection of the storage.\n */\nexport type DeleteAssetsStoreParams = CollectionParams;\n\n/**\n * @see DeleteFilteredAssetsParams\n */\nexport const DeleteFilteredAssetsStoreParamsSchema = ListStoreParamsSchema;\n\n/**\n * The parameters required to delete assets from the storage.\n */\nexport type DeleteFilteredAssetsStoreParams = ListStoreParams;\n\n/**\n * @see DeleteAssetStoreParams\n */\nexport const DeleteAssetStoreParamsSchema = GetAssetStoreParamsSchema;\n\n/**\n * Represents the parameters required to delete an asset.\n */\nexport type DeleteAssetStoreParams = GetAssetStoreParams;\n\n/**\n * @see SetAssetTokenStoreParams\n */\nexport const SetAssetTokenStoreParamsSchema = GetAssetStoreParamsSchema.extend({\n token: AssetAccessTokenSchema\n});\n\n/**\n * Represents the parameters required to delete an asset.\n */\nexport type SetAssetTokenStoreParams = GetAssetStoreParams & {\n /**\n * The token to apply to the asset.\n * Setting `undefined` removes the protection and makes the asset public.\n */\n token: AssetAccessToken;\n};\n\n/**\n * @see ListAssetsStoreParams\n */\nexport const ListAssetsStoreParamsSchema = ListStoreParamsSchema;\n\n/**\n * The parameters required to list documents from the datastore.\n */\nexport type ListAssetsStoreParams = ListStoreParams;\n\n/**\n * @see GetContentChunksStoreParams\n */\nexport const GetContentChunksStoreParamsSchema = z\n .object({\n encoding: AssetEncodingSchema,\n chunk_index: z.bigint(),\n memory: MemorySchema\n })\n .strict();\n\n/**\n * The parameters required to retrieve a specific chunk from an asset.\n */\nexport interface GetContentChunksStoreParams {\n /**\n * The encoding of the chunks.\n */\n encoding: AssetEncoding;\n\n /**\n * The index of the chunk to retrieve.\n */\n chunk_index: bigint;\n\n /**\n * The memory type to retrieve the chunk from.\n */\n memory: Memory;\n}\n", "import type {ListResults} from '../schemas/list';\nimport type {AssetNoContent, Blob, OptionAsset} from '../schemas/storage';\nimport {\n type CountAssetsStoreParams,\n CountAssetsStoreParamsSchema,\n type CountCollectionAssetsStoreParams,\n CountCollectionAssetsStoreParamsSchema,\n type DeleteAssetsStoreParams,\n DeleteAssetsStoreParamsSchema,\n type DeleteAssetStoreParams,\n DeleteAssetStoreParamsSchema,\n type DeleteFilteredAssetsStoreParams,\n DeleteFilteredAssetsStoreParamsSchema,\n type GetAssetStoreParams,\n GetAssetStoreParamsSchema,\n type GetContentChunksStoreParams,\n GetContentChunksStoreParamsSchema,\n type ListAssetsStoreParams,\n ListAssetsStoreParamsSchema,\n type SetAssetHandlerParams,\n SetAssetHandlerParamsSchema,\n type SetAssetTokenStoreParams,\n SetAssetTokenStoreParamsSchema\n} from './schemas/storage';\nimport {normalizeCaller} from './utils/caller.utils';\n\n/**\n * Counts the number of assets in a specific collection.\n *\n * @param {CountCollectionAssetsStoreParams} params - The parameters required to count assets in the collection.\n *\n * @returns {bigint} The total number of assets in the specified collection.\n *\n * @throws {z.ZodError} If the input parameters do not conform to the schema.\n * @throws {Error} If the Satellite fails while performing the count operation.\n */\nexport const countCollectionAssetsStore = (params: CountCollectionAssetsStoreParams): bigint => {\n CountCollectionAssetsStoreParamsSchema.parse(params);\n\n const {collection} = params;\n\n return __juno_satellite_storage_count_collection_assets_store(collection);\n};\n\n/**\n * Counts the number of assets in a collection matching specific filters and owned by a specific caller.\n *\n * @param {CountAssetsStoreParams} params - The parameters required to perform the filtered count.\n *\n * @returns {bigint} The number of assets that match the provided filters.\n *\n * @throws {z.ZodError} If the input parameters do not conform to the schema.\n * @throws {Error} If the Satellite fails while performing the count operation.\n */\nexport const countAssetsStore = (params: CountAssetsStoreParams): bigint => {\n CountAssetsStoreParamsSchema.parse(params);\n\n const {caller: providedCaller, collection, params: listParams} = params;\n\n const caller = normalizeCaller(providedCaller);\n\n return __juno_satellite_storage_count_assets_store(caller, collection, listParams);\n};\n\n/**\n * Sets or updates an asset in the storage.\n *\n * @param {SetAssetHandlerParams} params - The parameters required to set or update an asset.\n *\n * @throws {z.ZodError} If the input parameters do not conform to the schema.\n * @throws {Error} If the Satellite fails while performing the operation.\n */\nexport const setAssetHandler = (params: SetAssetHandlerParams): void => {\n SetAssetHandlerParamsSchema.parse(params);\n\n const {key, content, headers} = params;\n\n __juno_satellite_storage_set_asset_handler(key, content, headers);\n};\n\n/**\n * Deletes an asset from the storage.\n *\n * @param {DeleteAssetStoreParams} params - The parameters required to delete the asset.\n *\n * @returns {OptionAsset} The potentially deleted asset.\n *\n * @throws {z.ZodError} If the provided parameters do not match the expected schema.\n * @throws {Error} If the Satellite fails to validate the request or the asset cannot be deleted.\n */\nexport const deleteAssetStore = (params: DeleteAssetStoreParams): OptionAsset => {\n DeleteAssetStoreParamsSchema.parse(params);\n\n const {caller: providedCaller, collection, full_path} = params;\n\n const caller = normalizeCaller(providedCaller);\n\n return __juno_satellite_storage_delete_asset_store(caller, collection, full_path);\n};\n\n/**\n * Delete assets in a specific collection of the Storage.\n *\n * @param {DeleteAssetsStoreParams} params - The parameters required to delete assets in the collection.\n *\n * @throws {z.ZodError} If the input parameters do not conform to the schema.\n * @throws {Error} If the Satellite fails while performing the count operation.\n */\nexport const deleteAssetsStore = (params: DeleteAssetsStoreParams): void => {\n DeleteAssetsStoreParamsSchema.parse(params);\n\n const {collection} = params;\n\n __juno_satellite_storage_delete_assets_store(collection);\n};\n\n/**\n * Delete assets in a collection matching specific filters and owned by a specific caller.\n *\n * @param {DeleteFilteredAssetsStoreParams} params - The parameters required to perform the filtered deletion.\n *\n * @returns {OptionAsset[]} The potential asset resulting of the deletion that match the provided filters.\n *\n * @throws {z.ZodError} If the input parameters do not conform to the schema.\n * @throws {Error} If the Satellite fails while performing the count operation.\n */\nexport const deleteFilteredAssetsStore = (\n params: DeleteFilteredAssetsStoreParams\n): OptionAsset[] => {\n DeleteFilteredAssetsStoreParamsSchema.parse(params);\n\n const {caller: providedCaller, collection, params: listParams} = params;\n\n const caller = normalizeCaller(providedCaller);\n\n return __juno_satellite_storage_delete_filtered_assets_store(caller, collection, listParams);\n};\n\n/**\n * Set or update an access token for an asset in a collection's store.\n *\n * @param {SetAssetTokenStoreParams} params - The parameters required to set the token of the asset.\n *\n *@throws {z.ZodError} If the provided parameters do not match the expected schema.\n * @throws {Error} If the Satellite fails to validate the request or the token cannot be set.\n */\nexport const setAssetTokenStore = (params: SetAssetTokenStoreParams): void => {\n SetAssetTokenStoreParamsSchema.parse(params);\n\n const {caller: providedCaller, collection, full_path, token} = params;\n\n const caller = normalizeCaller(providedCaller);\n\n __juno_satellite_storage_set_asset_token_store(caller, collection, full_path, token);\n};\n\n/**\n * Retrieve an asset from the storage.\n *\n * @param {GetAssetStoreParams} params - The parameters required to get the asset.\n *\n * @returns {OptionAsset} The asset if found, or undefined if not.\n *\n * @throws {z.ZodError} If the provided parameters do not match the expected schema.\n * @throws {Error} If the Satellite fails while retrieving the document.\n */\nexport const getAssetStore = (params: GetAssetStoreParams): OptionAsset => {\n GetAssetStoreParamsSchema.parse(params);\n\n const {caller: providedCaller, collection, full_path} = params;\n\n const caller = normalizeCaller(providedCaller);\n\n return __juno_satellite_storage_get_asset_store(caller, collection, full_path);\n};\n\n/**\n * Lists assets (without content) from the storage using optional filtering, pagination, and ordering parameters.\n *\n * @param {ListStoreParams} params - The parameters required to perform the list operation.\n *\n * @returns {ListResults<AssetNoContent>} A list result containing matching assets and pagination metadata.\n *\n * @throws {z.ZodError} If the input parameters do not conform to the schema.\n * @throws {Error} If the Satellite fails while performing the listing operation.\n */\nexport const listAssetsStore = (params: ListAssetsStoreParams): ListResults<AssetNoContent> => {\n ListAssetsStoreParamsSchema.parse(params);\n\n const {caller: providedCaller, collection, params: listParams} = params;\n\n const caller = normalizeCaller(providedCaller);\n\n return __juno_satellite_storage_list_assets_store(caller, collection, listParams);\n};\n\n/**\n * Retrieves content chunks of an asset.\n *\n * This function fetches a content chunk of a given asset encoding using the specified parameters.\n *\n * @param {GetContentChunksStoreParams} params - The parameters including encoding, chunk index, and memory type.\n *\n * @returns {Blob | undefined} The content chunk if found, or `undefined` if not.\n *\n * @throws {z.ZodError} If the input parameters do not conform to the schema.\n * @throws {Error} If the Satellite throws an internal error during retrieval.\n */\nexport const getContentChunksStore = (params: GetContentChunksStoreParams): Blob | undefined => {\n GetContentChunksStoreParamsSchema.parse(params);\n\n const {encoding, chunk_index, memory} = params;\n\n return __juno_satellite_storage_get_content_chunks_store(encoding, chunk_index, memory);\n};\n"],
5
+ "mappings": "uNAAA,UAAYA,MAAO,MAcZ,IAAMC,EAAyB,OAAK,CAAC,QAAS,QAAS,QAAQ,CAAC,EAU1DC,EAAwB,OAAK,CAAC,aAAc,UAAU,CAAC,EAUvDC,EAAmB,QAAM,CAAG,SAAO,EAAK,SAAO,CAAC,CAAC,EAUjDC,EACV,SAAO,CACN,SAAY,QAAMD,CAAc,EAChC,WAAYE,EACZ,WAAYA,EACZ,WAAYA,EAAgB,SAAS,EACrC,MAAOJ,EACP,KAAMC,EAAoB,SAAS,CACrC,CAAC,EACA,OAAO,EAwCGI,EAA0B,QAAM,CAACC,EAAoBH,CAAe,CAAC,EAUrEI,EAAqB,QAAMF,CAAqB,EAUhDG,EAA+B,SAAO,CACjD,GAAIC,EAAgB,GAAGC,CAAY,EACnC,WAAYH,CACd,CAAC,ECpHD,OAAQ,aAAAI,OAAgB,0BAWjB,IAAMC,EAAmBC,GAC9BF,GAAU,KAAKE,CAAM,EAAE,aAAa,ECE/B,IAAMC,GAAqB,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EAAIhC,EAExC,OAAO,kDAAkD8B,EAAUC,EAAaC,CAAM,CACxF",
6
+ "names": ["z", "AccessKeyScopeSchema", "AccessKeyKindSchema", "MetadataSchema", "AccessKeySchema", "TimestampSchema", "AccessKeyRecordSchema", "RawPrincipalSchema", "AccessKeysSchema", "AccessKeyCheckParamsSchema", "RawUserIdSchema", "UserIdSchema", "Principal", "normalizeCaller", "caller", "getAdminAccessKeys", "getAccessKeys", "isWriteAccessKey", "params", "AccessKeyCheckParamsSchema", "providedId", "accessKeys", "id", "normalizeCaller", "isValidAccessKey", "isAdminController", "z", "CollectionParamsSchema", "CollectionSchema", "ListStoreParamsSchema", "RawUserIdSchema", "UserIdSchema", "ListParamsSchema", "GetDocStoreParamsSchema", "CollectionParamsSchema", "RawUserIdSchema", "UserIdSchema", "KeySchema", "SetDocStoreParamsSchema", "SetDocSchema", "DeleteDocStoreParamsSchema", "DelDocSchema", "CountCollectionDocsStoreParamsSchema", "CountDocsStoreParamsSchema", "ListStoreParamsSchema", "ListDocsStoreParamsSchema", "DeleteDocsStoreParamsSchema", "DeleteFilteredDocsStoreParamsSchema", "setDocStore", "params", "SetDocStoreParamsSchema", "providedCaller", "collection", "key", "doc", "caller", "normalizeCaller", "deleteDocStore", "DeleteDocStoreParamsSchema", "getDocStore", "GetDocStoreParamsSchema", "listDocsStore", "ListDocsStoreParamsSchema", "listParams", "countCollectionDocsStore", "CountCollectionDocsStoreParamsSchema", "countDocsStore", "CountDocsStoreParamsSchema", "deleteDocsStore", "DeleteDocsStoreParamsSchema", "deleteFilteredDocsStore", "DeleteFilteredDocsStoreParamsSchema", "callerIsAdmin", "callerHasWritePermission", "callerIsAccessKey", "z", "MemorySchema", "z", "GetAssetStoreParamsSchema", "CollectionParamsSchema", "RawUserIdSchema", "UserIdSchema", "FullPathSchema", "CountCollectionAssetsStoreParamsSchema", "CountAssetsStoreParamsSchema", "ListStoreParamsSchema", "SetAssetHandlerParamsSchema", "AssetKeySchema", "BlobSchema", "HeaderFieldsSchema", "DeleteAssetsStoreParamsSchema", "DeleteFilteredAssetsStoreParamsSchema", "DeleteAssetStoreParamsSchema", "SetAssetTokenStoreParamsSchema", "AssetAccessTokenSchema", "ListAssetsStoreParamsSchema", "GetContentChunksStoreParamsSchema", "AssetEncodingSchema", "MemorySchema", "countCollectionAssetsStore", "params", "CountCollectionAssetsStoreParamsSchema", "collection", "countAssetsStore", "CountAssetsStoreParamsSchema", "providedCaller", "listParams", "caller", "normalizeCaller", "setAssetHandler", "SetAssetHandlerParamsSchema", "key", "content", "headers", "deleteAssetStore", "DeleteAssetStoreParamsSchema", "full_path", "deleteAssetsStore", "DeleteAssetsStoreParamsSchema", "deleteFilteredAssetsStore", "DeleteFilteredAssetsStoreParamsSchema", "setAssetTokenStore", "SetAssetTokenStoreParamsSchema", "token", "getAssetStore", "GetAssetStoreParamsSchema", "listAssetsStore", "ListAssetsStoreParamsSchema", "getContentChunksStore", "GetContentChunksStoreParamsSchema", "encoding", "chunk_index", "memory"]
7
7
  }
@@ -2,7 +2,7 @@
2
2
 
3
3
  // @ts-nocheck
4
4
 
5
- // This file was automatically generated by @icp-sdk/bindgen@0.2.0.
5
+ // This file was automatically generated by @icp-sdk/bindgen@0.3.0.
6
6
  // You should NOT make any changes in this file as it will be overwritten.
7
7
  // Additionally, you should also exclude this file from your linter and/or formatter to prevent it from being checked or modified.
8
8
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  // @ts-nocheck
4
4
 
5
- // This file was automatically generated by @icp-sdk/bindgen@0.2.0.
5
+ // This file was automatically generated by @icp-sdk/bindgen@0.3.0.
6
6
  // You should NOT make any changes in this file as it will be overwritten.
7
7
  // Additionally, you should also exclude this file from your linter and/or formatter to prevent it from being checked or modified.
8
8
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  // @ts-nocheck
4
4
 
5
- // This file was automatically generated by @icp-sdk/bindgen@0.2.0.
5
+ // This file was automatically generated by @icp-sdk/bindgen@0.3.0.
6
6
  // You should NOT make any changes in this file as it will be overwritten.
7
7
  // Additionally, you should also exclude this file from your linter and/or formatter to prevent it from being checked or modified.
8
8
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  // @ts-nocheck
4
4
 
5
- // This file was automatically generated by @icp-sdk/bindgen@0.2.0.
5
+ // This file was automatically generated by @icp-sdk/bindgen@0.3.0.
6
6
  // You should NOT make any changes in this file as it will be overwritten.
7
7
  // Additionally, you should also exclude this file from your linter and/or formatter to prevent it from being checked or modified.
8
8
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  // @ts-nocheck
4
4
 
5
- // This file was automatically generated by @icp-sdk/bindgen@0.2.0.
5
+ // This file was automatically generated by @icp-sdk/bindgen@0.3.0.
6
6
  // You should NOT make any changes in this file as it will be overwritten.
7
7
  // Additionally, you should also exclude this file from your linter and/or formatter to prevent it from being checked or modified.
8
8
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  // @ts-nocheck
4
4
 
5
- // This file was automatically generated by @icp-sdk/bindgen@0.2.0.
5
+ // This file was automatically generated by @icp-sdk/bindgen@0.3.0.
6
6
  // You should NOT make any changes in this file as it will be overwritten.
7
7
  // Additionally, you should also exclude this file from your linter and/or formatter to prevent it from being checked or modified.
8
8
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  // @ts-nocheck
4
4
 
5
- // This file was automatically generated by @icp-sdk/bindgen@0.2.0.
5
+ // This file was automatically generated by @icp-sdk/bindgen@0.3.0.
6
6
  // You should NOT make any changes in this file as it will be overwritten.
7
7
  // Additionally, you should also exclude this file from your linter and/or formatter to prevent it from being checked or modified.
8
8
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  // @ts-nocheck
4
4
 
5
- // This file was automatically generated by @icp-sdk/bindgen@0.2.0.
5
+ // This file was automatically generated by @icp-sdk/bindgen@0.3.0.
6
6
  // You should NOT make any changes in this file as it will be overwritten.
7
7
  // Additionally, you should also exclude this file from your linter and/or formatter to prevent it from being checked or modified.
8
8
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  // @ts-nocheck
4
4
 
5
- // This file was automatically generated by @icp-sdk/bindgen@0.2.0.
5
+ // This file was automatically generated by @icp-sdk/bindgen@0.3.0.
6
6
  // You should NOT make any changes in this file as it will be overwritten.
7
7
  // Additionally, you should also exclude this file from your linter and/or formatter to prevent it from being checked or modified.
8
8
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  // @ts-nocheck
4
4
 
5
- // This file was automatically generated by @icp-sdk/bindgen@0.2.0.
5
+ // This file was automatically generated by @icp-sdk/bindgen@0.3.0.
6
6
  // You should NOT make any changes in this file as it will be overwritten.
7
7
  // Additionally, you should also exclude this file from your linter and/or formatter to prevent it from being checked or modified.
8
8
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  // @ts-nocheck
4
4
 
5
- // This file was automatically generated by @icp-sdk/bindgen@0.2.0.
5
+ // This file was automatically generated by @icp-sdk/bindgen@0.3.0.
6
6
  // You should NOT make any changes in this file as it will be overwritten.
7
7
  // Additionally, you should also exclude this file from your linter and/or formatter to prevent it from being checked or modified.
8
8
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  // @ts-nocheck
4
4
 
5
- // This file was automatically generated by @icp-sdk/bindgen@0.2.0.
5
+ // This file was automatically generated by @icp-sdk/bindgen@0.3.0.
6
6
  // You should NOT make any changes in this file as it will be overwritten.
7
7
  // Additionally, you should also exclude this file from your linter and/or formatter to prevent it from being checked or modified.
8
8
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  // @ts-nocheck
4
4
 
5
- // This file was automatically generated by @icp-sdk/bindgen@0.2.0.
5
+ // This file was automatically generated by @icp-sdk/bindgen@0.3.0.
6
6
  // You should NOT make any changes in this file as it will be overwritten.
7
7
  // Additionally, you should also exclude this file from your linter and/or formatter to prevent it from being checked or modified.
8
8
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  // @ts-nocheck
4
4
 
5
- // This file was automatically generated by @icp-sdk/bindgen@0.2.0.
5
+ // This file was automatically generated by @icp-sdk/bindgen@0.3.0.
6
6
  // You should NOT make any changes in this file as it will be overwritten.
7
7
  // Additionally, you should also exclude this file from your linter and/or formatter to prevent it from being checked or modified.
8
8
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  // @ts-nocheck
4
4
 
5
- // This file was automatically generated by @icp-sdk/bindgen@0.2.0.
5
+ // This file was automatically generated by @icp-sdk/bindgen@0.3.0.
6
6
  // You should NOT make any changes in this file as it will be overwritten.
7
7
  // Additionally, you should also exclude this file from your linter and/or formatter to prevent it from being checked or modified.
8
8
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  // @ts-nocheck
4
4
 
5
- // This file was automatically generated by @icp-sdk/bindgen@0.2.0.
5
+ // This file was automatically generated by @icp-sdk/bindgen@0.3.0.
6
6
  // You should NOT make any changes in this file as it will be overwritten.
7
7
  // Additionally, you should also exclude this file from your linter and/or formatter to prevent it from being checked or modified.
8
8
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  // @ts-nocheck
4
4
 
5
- // This file was automatically generated by @icp-sdk/bindgen@0.2.0.
5
+ // This file was automatically generated by @icp-sdk/bindgen@0.3.0.
6
6
  // You should NOT make any changes in this file as it will be overwritten.
7
7
  // Additionally, you should also exclude this file from your linter and/or formatter to prevent it from being checked or modified.
8
8
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  // @ts-nocheck
4
4
 
5
- // This file was automatically generated by @icp-sdk/bindgen@0.2.0.
5
+ // This file was automatically generated by @icp-sdk/bindgen@0.3.0.
6
6
  // You should NOT make any changes in this file as it will be overwritten.
7
7
  // Additionally, you should also exclude this file from your linter and/or formatter to prevent it from being checked or modified.
8
8
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  // @ts-nocheck
4
4
 
5
- // This file was automatically generated by @icp-sdk/bindgen@0.2.0.
5
+ // This file was automatically generated by @icp-sdk/bindgen@0.3.0.
6
6
  // You should NOT make any changes in this file as it will be overwritten.
7
7
  // Additionally, you should also exclude this file from your linter and/or formatter to prevent it from being checked or modified.
8
8
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  // @ts-nocheck
4
4
 
5
- // This file was automatically generated by @icp-sdk/bindgen@0.2.0.
5
+ // This file was automatically generated by @icp-sdk/bindgen@0.3.0.
6
6
  // You should NOT make any changes in this file as it will be overwritten.
7
7
  // Additionally, you should also exclude this file from your linter and/or formatter to prevent it from being checked or modified.
8
8
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  // @ts-nocheck
4
4
 
5
- // This file was automatically generated by @icp-sdk/bindgen@0.2.0.
5
+ // This file was automatically generated by @icp-sdk/bindgen@0.3.0.
6
6
  // You should NOT make any changes in this file as it will be overwritten.
7
7
  // Additionally, you should also exclude this file from your linter and/or formatter to prevent it from being checked or modified.
8
8
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  // @ts-nocheck
4
4
 
5
- // This file was automatically generated by @icp-sdk/bindgen@0.2.0.
5
+ // This file was automatically generated by @icp-sdk/bindgen@0.3.0.
6
6
  // You should NOT make any changes in this file as it will be overwritten.
7
7
  // Additionally, you should also exclude this file from your linter and/or formatter to prevent it from being checked or modified.
8
8
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  // @ts-nocheck
4
4
 
5
- // This file was automatically generated by @icp-sdk/bindgen@0.2.0.
5
+ // This file was automatically generated by @icp-sdk/bindgen@0.3.0.
6
6
  // You should NOT make any changes in this file as it will be overwritten.
7
7
  // Additionally, you should also exclude this file from your linter and/or formatter to prevent it from being checked or modified.
8
8
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  // @ts-nocheck
4
4
 
5
- // This file was automatically generated by @icp-sdk/bindgen@0.2.0.
5
+ // This file was automatically generated by @icp-sdk/bindgen@0.3.0.
6
6
  // You should NOT make any changes in this file as it will be overwritten.
7
7
  // Additionally, you should also exclude this file from your linter and/or formatter to prevent it from being checked or modified.
8
8
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  // @ts-nocheck
4
4
 
5
- // This file was automatically generated by @icp-sdk/bindgen@0.2.0.
5
+ // This file was automatically generated by @icp-sdk/bindgen@0.3.0.
6
6
  // You should NOT make any changes in this file as it will be overwritten.
7
7
  // Additionally, you should also exclude this file from your linter and/or formatter to prevent it from being checked or modified.
8
8
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  // @ts-nocheck
4
4
 
5
- // This file was automatically generated by @icp-sdk/bindgen@0.2.0.
5
+ // This file was automatically generated by @icp-sdk/bindgen@0.3.0.
6
6
  // You should NOT make any changes in this file as it will be overwritten.
7
7
  // Additionally, you should also exclude this file from your linter and/or formatter to prevent it from being checked or modified.
8
8
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  // @ts-nocheck
4
4
 
5
- // This file was automatically generated by @icp-sdk/bindgen@0.2.0.
5
+ // This file was automatically generated by @icp-sdk/bindgen@0.3.0.
6
6
  // You should NOT make any changes in this file as it will be overwritten.
7
7
  // Additionally, you should also exclude this file from your linter and/or formatter to prevent it from being checked or modified.
8
8
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  // @ts-nocheck
4
4
 
5
- // This file was automatically generated by @icp-sdk/bindgen@0.2.0.
5
+ // This file was automatically generated by @icp-sdk/bindgen@0.3.0.
6
6
  // You should NOT make any changes in this file as it will be overwritten.
7
7
  // Additionally, you should also exclude this file from your linter and/or formatter to prevent it from being checked or modified.
8
8
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  // @ts-nocheck
4
4
 
5
- // This file was automatically generated by @icp-sdk/bindgen@0.2.0.
5
+ // This file was automatically generated by @icp-sdk/bindgen@0.3.0.
6
6
  // You should NOT make any changes in this file as it will be overwritten.
7
7
  // Additionally, you should also exclude this file from your linter and/or formatter to prevent it from being checked or modified.
8
8
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  // @ts-nocheck
4
4
 
5
- // This file was automatically generated by @icp-sdk/bindgen@0.2.0.
5
+ // This file was automatically generated by @icp-sdk/bindgen@0.3.0.
6
6
  // You should NOT make any changes in this file as it will be overwritten.
7
7
  // Additionally, you should also exclude this file from your linter and/or formatter to prevent it from being checked or modified.
8
8
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  // @ts-nocheck
4
4
 
5
- // This file was automatically generated by @icp-sdk/bindgen@0.2.0.
5
+ // This file was automatically generated by @icp-sdk/bindgen@0.3.0.
6
6
  // You should NOT make any changes in this file as it will be overwritten.
7
7
  // Additionally, you should also exclude this file from your linter and/or formatter to prevent it from being checked or modified.
8
8
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  // @ts-nocheck
4
4
 
5
- // This file was automatically generated by @icp-sdk/bindgen@0.2.0.
5
+ // This file was automatically generated by @icp-sdk/bindgen@0.3.0.
6
6
  // You should NOT make any changes in this file as it will be overwritten.
7
7
  // Additionally, you should also exclude this file from your linter and/or formatter to prevent it from being checked or modified.
8
8
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  // @ts-nocheck
4
4
 
5
- // This file was automatically generated by @icp-sdk/bindgen@0.2.0.
5
+ // This file was automatically generated by @icp-sdk/bindgen@0.3.0.
6
6
  // You should NOT make any changes in this file as it will be overwritten.
7
7
  // Additionally, you should also exclude this file from your linter and/or formatter to prevent it from being checked or modified.
8
8
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  // @ts-nocheck
4
4
 
5
- // This file was automatically generated by @icp-sdk/bindgen@0.2.0.
5
+ // This file was automatically generated by @icp-sdk/bindgen@0.3.0.
6
6
  // You should NOT make any changes in this file as it will be overwritten.
7
7
  // Additionally, you should also exclude this file from your linter and/or formatter to prevent it from being checked or modified.
8
8
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  // @ts-nocheck
4
4
 
5
- // This file was automatically generated by @icp-sdk/bindgen@0.2.0.
5
+ // This file was automatically generated by @icp-sdk/bindgen@0.3.0.
6
6
  // You should NOT make any changes in this file as it will be overwritten.
7
7
  // Additionally, you should also exclude this file from your linter and/or formatter to prevent it from being checked or modified.
8
8