@junobuild/functions 0.6.0 → 0.7.0-next-2026-03-14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/canisters/cmc/index.js +1 -1
- package/canisters/index.js +1 -1
- package/canisters/ledger/icp/index.js +1 -1
- package/canisters/ledger/icrc/index.js +1 -1
- package/chunk-3CCXJJ4Y.js +2 -0
- package/chunk-3CCXJJ4Y.js.map +7 -0
- package/{chunk-HVIYPRXX.js → chunk-5IWIJYKG.js} +2 -2
- package/{chunk-W42LR3ZN.js → chunk-6QTAU2M5.js} +2 -2
- package/chunk-BAYP4XBH.js +2 -0
- package/{chunk-2LVPADWI.js → chunk-EHQF2DOU.js} +2 -2
- package/ic-cdk.js +1 -1
- package/index.js +1 -1
- package/package.json +6 -6
- package/sdk.js +1 -1
- package/chunk-7JYM2CKB.js +0 -2
- package/chunk-7JYM2CKB.js.map +0 -7
- package/chunk-XRHVLXYG.js +0 -2
- /package/{chunk-HVIYPRXX.js.map → chunk-5IWIJYKG.js.map} +0 -0
- /package/{chunk-W42LR3ZN.js.map → chunk-6QTAU2M5.js.map} +0 -0
- /package/{chunk-XRHVLXYG.js.map → chunk-BAYP4XBH.js.map} +0 -0
- /package/{chunk-2LVPADWI.js.map → chunk-EHQF2DOU.js.map} +0 -0
package/canisters/cmc/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as s}from"../../chunk-BXZ5PSUW.js";import{a as e}from"../../chunk-
|
|
1
|
+
import{a as s}from"../../chunk-BXZ5PSUW.js";import{a as e}from"../../chunk-EHQF2DOU.js";import{g as i}from"../../chunk-6QTAU2M5.js";import{a as p}from"../../chunk-BAYP4XBH.js";import"../../chunk-3CCXJJ4Y.js";import{e as o}from"../../chunk-CAQXR2VB.js";import"../../chunk-4C666HHU.js";var r=class extends e{constructor(t={}){p.parse(t),super({canisterId:t?.canisterId??s})}notifyTopUp=async({args:t})=>await i({canisterId:this.canisterId,method:"notify_top_up",args:[[o.NotifyTopUpArg,t]],result:o.NotifyTopUpResult})};export{r as CMCCanister,o as CmcIdl};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
package/canisters/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as o}from"../chunk-
|
|
1
|
+
import{a as o}from"../chunk-BAYP4XBH.js";import"../chunk-3CCXJJ4Y.js";import"../chunk-4C666HHU.js";export{o as CanisterOptionsSchema};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b as d}from"../../../chunk-BXZ5PSUW.js";import{a}from"../../../chunk-
|
|
1
|
+
import{b as d}from"../../../chunk-BXZ5PSUW.js";import{a}from"../../../chunk-EHQF2DOU.js";import{g as t}from"../../../chunk-6QTAU2M5.js";import{a as p}from"../../../chunk-BAYP4XBH.js";import"../../../chunk-3CCXJJ4Y.js";import{g as i,h as e}from"../../../chunk-CAQXR2VB.js";import"../../../chunk-4C666HHU.js";var s=class extends a{constructor(r={}){p.parse(r),super({canisterId:r?.canisterId??d})}transfer=async({args:r})=>await t({canisterId:this.canisterId,method:"transfer",args:[[e.TransferArgs,r]],result:e.TransferResult})};export{i as IcpIndexIdl,s as IcpLedgerCanister,e as IcpLedgerIdl};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../../../chunk-
|
|
1
|
+
import{a}from"../../../chunk-EHQF2DOU.js";import{g as c}from"../../../chunk-6QTAU2M5.js";import{a as t}from"../../../chunk-BAYP4XBH.js";import"../../../chunk-3CCXJJ4Y.js";import{i as n,j as e}from"../../../chunk-CAQXR2VB.js";import"../../../chunk-4C666HHU.js";var i=t.required();var s=class extends a{constructor(r){i.parse(r),super({canisterId:r.canisterId})}icrc1BalanceOf=async({account:r})=>await c({canisterId:this.canisterId,method:"icrc1_balance_of",args:[[e.Account,r]],result:e.Tokens});icrc1Transfer=async({args:r})=>await c({canisterId:this.canisterId,method:"icrc1_transfer",args:[[e.TransferArg,r]],result:e.TransferResult});icrc2TransferFrom=async({args:r})=>await c({canisterId:this.canisterId,method:"icrc2_transfer_from",args:[[e.TransferFromArgs,r]],result:e.TransferFromResult})};export{i as IcrcCanisterOptionsSchema,n as IcrcIndexIdl,s as IcrcLedgerCanister,e as IcrcLedgerIdl};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["src/schemas/candid.ts"],
|
|
4
|
+
"sourcesContent": ["import {\n PrincipalSchema as DfnPrincipalSchema,\n Uint8ArraySchema as DfnUint8ArraySchema\n} from '@junobuild/schema';\nimport type * as z from 'zod';\n\n/**\n * A schema that validates a value is an Uint8Array.\n */\nexport const Uint8ArraySchema = DfnUint8ArraySchema;\n\n/**\n * @see RawPrincipal\n */\nexport const RawPrincipalSchema = Uint8ArraySchema;\n\n/**\n * Represents a raw principal - a Uint8Array representation of a Principal.\n */\nexport type RawPrincipal = Uint8Array;\n\n/**\n * @see Principal\n */\nexport const PrincipalSchema = DfnPrincipalSchema;\n\n/**\n * Represents a principal - i.e. an object instantiated with the class Principal.\n */\nexport type Principal = z.infer<typeof PrincipalSchema>;\n"],
|
|
5
|
+
"mappings": "AAAA,OACE,mBAAmBA,EACnB,oBAAoBC,MACf,oBAMA,IAAMC,EAAmBD,EAKnBE,EAAqBD,EAUrBE,EAAkBJ",
|
|
6
|
+
"names": ["DfnPrincipalSchema", "DfnUint8ArraySchema", "Uint8ArraySchema", "RawPrincipalSchema", "PrincipalSchema"]
|
|
7
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as c,b as h,c as l}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as c,b as h,c as l}from"./chunk-3CCXJJ4Y.js";import*as a from"zod";var o=a.bigint(),n=a.bigint(),s=h,E=l,y=a.string(),p=a.string(),r=a.string().max(1024);import*as m from"zod";var g=c,b=m.object({owner:s,data:g,description:r.optional(),created_at:o,updated_at:o,version:n.optional()}).strict(),V=b.optional(),v=m.object({data:g,description:r.optional(),version:n.optional()}).strict(),M=m.object({version:n.optional()}).strict();import*as e from"zod";var u=e.tuple([e.string(),e.string()]),x=e.array(u),T=c,D=T,A=e.instanceof(Uint8Array).refine(i=>i.length===32,{message:"Hash must be a Uint8Array of length 32"}),z=e.object({name:e.string(),full_path:e.string(),token:e.string().optional(),collection:y,owner:s,description:r.optional()}).strict(),S=e.object({modified:o,content_chunks:e.array(D),total_length:e.bigint(),sha256:A}),w=S.omit({content_chunks:!0}).strict(),d=e.enum(["identity","gzip","compress","deflate","br"]),_=e.object({key:z,headers:x,encodings:e.array(e.tuple([d,S])),created_at:o,updated_at:o,version:n.optional()}).strict(),Z=_.omit({encodings:!0}).extend({encodings:e.array(e.tuple([d,w]))}).strict(),R=e.bigint(),G=e.object({key:z,reference_id:R.optional(),expires_at:o,encoding_type:d.optional()}).strict(),I=e.bigint(),U=e.bigint(),Q=e.object({batch_id:U,headers:x,chunk_ids:e.array(I)}).strict(),W=e.string(),X=e.string().optional(),Y=_.optional();import*as t from"zod";var f=t.union([t.object({equal:o}),t.object({greater_than:o}),t.object({less_than:o}),t.object({between:t.tuple([o,o])})]),j=t.object({key:p.optional(),description:r.optional(),created_at:f.optional(),updated_at:f.optional()}).strict(),k=t.object({start_after:p.optional(),limit:t.bigint().optional()}).strict(),O=t.enum(["keys","created_at","updated_at"]),C=t.object({desc:t.boolean(),field:O}).strict(),te=t.object({matcher:j.optional(),paginate:k.optional(),order:C.optional(),owner:s.optional()}).strict(),oe=i=>t.object({items:t.array(t.tuple([p,i])),items_length:t.bigint(),items_page:t.bigint().optional(),matches_length:t.bigint(),matches_pages:t.bigint().optional()}).strict();import{jsonReplacer as L,jsonReviver as K}from"@dfinity/utils";var re=i=>JSON.parse(__juno_satellite_datastore_raw_data_to_text(i),K),ne=i=>__juno_satellite_datastore_raw_data_from_text(JSON.stringify(i,L));export{o as a,n as b,s as c,E as d,y as e,p as f,r as g,g as h,b as i,V as j,v as k,M as l,x as m,T as n,z as o,S as p,_ as q,Z as r,G as s,Q as t,W as u,X as v,Y as w,f as x,j as y,k as z,O as A,C as B,te as C,oe as D,re as E,ne as F};
|
|
2
|
+
//# sourceMappingURL=chunk-5IWIJYKG.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b as o,c as s}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{b as o,c as s}from"./chunk-3CCXJJ4Y.js";import{IDL as w}from"@icp-sdk/core/candid";import*as e from"zod";var n=e.custom(r=>r instanceof w.Type,{message:"Invalid IDL.Type"}),A=e.tuple([n,e.unknown()]),S=e.array(A),z=n,l=e.object({canisterId:o.or(s),method:e.string().min(1),args:S.optional(),result:z.optional()});var t=class extends Error{constructor(){super(),this.message="More than one object returned by the response. This is unexpected."}};import{toNullable as D}from"@dfinity/utils";import{IDL as p}from"@icp-sdk/core/candid";import{Principal as L}from"@icp-sdk/core/principal";var M=async r=>{l.parse(r);let{canisterId:c,method:i,args:m,result:y}=r,u=L.from(c).toUint8Array(),[f,d]=(m??[]).reduce(([I,x],[T,P])=>[[...I,T],[...x,P]],[[],[]]),h=new Uint8Array(p.encode([...f],[...d])),g=await __ic_cdk_call_raw(u,i,h),a=p.decode(D(y),g);if(a.length>1)throw new t;let[C]=a;return C};export{n as a,A as b,S as c,z as d,l as e,t as f,M as g};
|
|
2
|
+
//# sourceMappingURL=chunk-6QTAU2M5.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{c as r}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{c as r}from"./chunk-3CCXJJ4Y.js";import*as e from"zod";var s=e.strictObject({canisterId:r}),t=class{#r;constructor({canisterId:a}){this.#r=a}get canisterId(){return this.#r}};export{t as a};
|
|
2
|
+
//# sourceMappingURL=chunk-EHQF2DOU.js.map
|
package/ic-cdk.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as c,b as n,c as e,d as l,e as a,f as m,g as f}from"./chunk-
|
|
1
|
+
import{a as c,b as n,c as e,d as l,e as a,f as m,g as f}from"./chunk-6QTAU2M5.js";import"./chunk-3CCXJJ4Y.js";import"./chunk-4C666HHU.js";import{Principal as o}from"@icp-sdk/core/principal";var t=()=>o.fromUint8Array(__ic_cdk_caller()),_=()=>t();import{Principal as p}from"@icp-sdk/core/principal";var r=()=>p.fromUint8Array(__ic_cdk_id()),d=()=>r(),k=()=>r();var u=()=>__ic_cdk_time();export{n as CallArgSchema,e as CallArgsSchema,a as CallParamsSchema,m as CallResponseLengthError,l as CallResultSchema,c as IDLTypeSchema,f as call,_ as caller,r as canisterSelf,d as id,t as msgCaller,k as satelliteSelf,u as time};
|
|
2
2
|
//# sourceMappingURL=ic-cdk.js.map
|
package/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{A as Xe,B as $e,C as et,D as tt,E as W,F as Q,a as _e,b as ve,c as I,d as Ee,e as J,f as K,g as We,h as Qe,i as u,j as Ne,k as q,l as G,m as Me,n as Pe,o as Be,p as Ye,q as m,r as Ie,s as L,t as V,u as Je,v as Ke,w as qe,x as Ge,y as Le,z as Ve}from"./chunk-
|
|
1
|
+
import{A as Xe,B as $e,C as et,D as tt,E as W,F as Q,a as _e,b as ve,c as I,d as Ee,e as J,f as K,g as We,h as Qe,i as u,j as Ne,k as q,l as G,m as Me,n as Pe,o as Be,p as Ye,q as m,r as Ie,s as L,t as V,u as Je,v as Ke,w as qe,x as Ge,y as Le,z as Ve}from"./chunk-5IWIJYKG.js";import{a as je,b as we,c as He}from"./chunk-3CCXJJ4Y.js";import"./chunk-4C666HHU.js";import*as s from"zod";import*as O from"zod";var d=O.record(O.string(),O.string());import*as X from"zod";var n=e=>X.custom(o=>typeof o=="function"&&e.implement(o));var i={QUERY:"__juno_function_query",UPDATE:"__juno_function_update"};import*as t from"zod";var U=t.strictObject({type:t.enum([i.QUERY,i.UPDATE])}),C=t.strictObject({...U.shape,args:t.instanceof(t.ZodObject),result:t.instanceof(t.ZodObject),handler:n(t.function({input:t.tuple([t.unknown()]),output:t.union([t.unknown(),t.promise(t.unknown())])}))}),R=t.strictObject({...U.shape,args:t.instanceof(t.ZodObject),handler:n(t.function({input:t.tuple([t.unknown()]),output:t.union([t.void(),t.promise(t.void())])}))}),F=t.strictObject({...U.shape,result:t.instanceof(t.ZodObject),handler:n(t.function({input:t.tuple([]),output:t.union([t.unknown(),t.promise(t.unknown())])}))}),g=t.strictObject({...U.shape,handler:n(t.function({input:t.tuple([]),output:t.union([t.void(),t.promise(t.void())])}))}),ct=t.union([C,R,F,g]);var Z=s.strictObject({type:s.literal(i.QUERY)}),k=s.union([s.strictObject({...C.shape,...Z.shape}),s.strictObject({...R.shape,...Z.shape}),s.strictObject({...F.shape,...Z.shape}),s.strictObject({...g.shape,...Z.shape})]),he=e=>s.function({input:s.tuple([d]),output:e}),dt=e=>s.union([e,n(he(e))]);function xt(e){if(typeof e=="function")return a=>{let x={...e(a),type:i.QUERY};return k.parse(x),x};let o={...e,type:i.QUERY};return k.parse(o),o}import*as r from"zod";var b=r.strictObject({type:r.literal(i.UPDATE)}),j=r.union([r.strictObject({...C.shape,...b.shape}),r.strictObject({...R.shape,...b.shape}),r.strictObject({...F.shape,...b.shape}),r.strictObject({...g.shape,...b.shape})]),Te=e=>r.function({input:r.tuple([d]),output:e}),zt=e=>r.union([e,n(Te(e))]);function Dt(e){if(typeof e=="function")return a=>{let x={...e(a),type:i.UPDATE};return j.parse(x),x};let o={...e,type:i.UPDATE};return j.parse(o),o}import*as T from"zod";import*as z from"zod";var w=z.object({collections:z.array(z.string()).readonly()}).strict();import*as c from"zod";var p=e=>c.strictObject({caller:I,data:e}),$=e=>n(c.function({input:c.tuple([e]),output:c.void()})),ee=e=>n(c.function({input:c.tuple([e]),output:c.promise(c.void()).or(c.void())}));import*as D from"zod";import*as H from"zod";var N=H.object({before:u.optional(),after:u}).strict(),te=H.object({current:u.optional(),proposed:q}).strict(),oe=H.object({current:u.optional(),proposed:G}).strict();var h=e=>D.strictObject({collection:J,key:K,data:e}),ne=p(h(N)),se=p(D.array(h(N))),M=p(h(u.optional())),P=p(D.array(h(u.optional()))),B=p(D.array(h(u.optional()))),re=p(h(te)),pe=p(h(oe));import*as Y from"zod";import*as ce from"zod";var ae=ce.object({current:m.optional(),batch:L,commit_batch:V}).strict();var ie=p(m),ue=p(m.optional()),le=p(Y.array(m.optional())),me=p(Y.array(m.optional())),de=p(ae),xe=p(m);var _=e=>w.extend({assert:$(e)}).strict(),ye=_(re),Se=_(pe),ze=_(de),De=_(xe),Jt=T.union([ye,Se,ze,De]),fe=e=>T.function({input:T.tuple([d]),output:e}),Kt=e=>T.union([e,n(fe(e))]);function qt(e){return e}import*as y from"zod";var l=e=>w.extend({run:ee(e)}).strict(),Oe=l(ne),Ce=l(se),oo=l(M),no=l(P),so=l(B),Re=l(ie),Fe=l(ue),ge=l(le),Ue=l(me),ro=y.union([Oe,Ce,M,P,B,Re,Fe,ge,Ue]),Ze=e=>y.function({input:y.tuple([d]),output:e}),po=e=>y.union([e,n(Ze(e))]);function co(e){return e}import{nonNullish as f}from"@dfinity/utils";import*as S from"zod";var Ae=S.union([k,j]);globalThis.__juno_satellite_fn_invoke_sync=(e,o)=>{Ae.parse(e);let a="args"in e&&e.args instanceof S.ZodType?e.args?.parse(f(o)?W(o):void 0):void 0,E=f(a)?e.handler(a):e.handler(),A="result"in e&&e.result instanceof S.ZodType?e.result?.parse(E):void 0;globalThis.jsResult=f(A)?Q(A):A};globalThis.__juno_satellite_fn_invoke_async=async(e,o)=>{Ae.parse(e);let a="args"in e&&e.args instanceof S.ZodType?e.args?.parse(f(o)?W(o):void 0):void 0,E=await(async()=>f(a)?await e.handler(a):await e.handler())(),A="result"in e&&e.result instanceof S.ZodType?e.result?.parse(E):void 0;globalThis.jsResult=f(A)?Q(A):A};import{jsonReplacer as ke}from"@dfinity/utils";var v=e=>{let o=e.map(a=>typeof a=="object"?JSON.stringify(a,ke):a).join(" ");globalThis.__ic_cdk_print(o)};globalThis.console={info(...e){v(e)},log(...e){v(e)},warn(...e){v(e)},error(...e){v(e)}};var be=()=>(__juno_satellite_random()>>>0)/4294967296;globalThis.Math.random=be;export{xe as AssertDeleteAssetContextSchema,De as AssertDeleteAssetSchema,pe as AssertDeleteDocContextSchema,Se as AssertDeleteDocSchema,Kt as AssertFnOrObjectSchema,fe as AssertFnSchema,$ as AssertFunctionSchema,Jt as AssertSchema,re as AssertSetDocContextSchema,ye as AssertSetDocSchema,de as AssertUploadAssetContextSchema,ze as AssertUploadAssetSchema,Ke as AssetAccessTokenSchema,ae as AssetAssertUploadSchema,Ye as AssetEncodingSchema,Be as AssetKeySchema,Ie as AssetNoContentSchema,m as AssetSchema,L as BatchSchema,Pe as BlobSchema,J as CollectionSchema,w as CollectionsSchema,V as CommitBatchSchema,ct as CustomFunctionSchema,C as CustomFunctionWithArgsAndResultSchema,R as CustomFunctionWithArgsSchema,F as CustomFunctionWithResultSchema,g as CustomFunctionWithoutArgsAndResultSchema,G as DelDocSchema,We as DescriptionSchema,oe as DocAssertDeleteSchema,te as DocAssertSetSchema,h as DocContextSchema,u as DocSchema,N as DocUpsertSchema,Je as FullPathSchema,Me as HeaderFieldsSchema,p as HookContextSchema,po as HookFnOrObjectSchema,Ze as HookFnSchema,ro as HookSchema,K as KeySchema,Le as ListMatcherSchema,Xe as ListOrderFieldSchema,$e as ListOrderSchema,Ve as ListPaginateSchema,et as ListParamsSchema,ue as OnDeleteAssetContextSchema,Fe as OnDeleteAssetSchema,M as OnDeleteDocContextSchema,oo as OnDeleteDocSchema,me as OnDeleteFilteredAssetsContextSchema,Ue as OnDeleteFilteredAssetsSchema,B as OnDeleteFilteredDocsContextSchema,so as OnDeleteFilteredDocsSchema,le as OnDeleteManyAssetsContextSchema,ge as OnDeleteManyAssetsSchema,P as OnDeleteManyDocsContextSchema,no as OnDeleteManyDocsSchema,ne as OnSetDocContextSchema,Oe as OnSetDocSchema,se as OnSetManyDocsContextSchema,Ce as OnSetManyDocsSchema,ie as OnUploadAssetContextSchema,Re as OnUploadAssetSchema,qe as OptionAssetSchema,Ne as OptionDocSchema,He as PrincipalSchema,dt as QueryFnOrObjectSchema,he as QueryFnSchema,k as QuerySchema,Qe as RawDataSchema,we as RawPrincipalSchema,I as RawUserIdSchema,ee as RunFunctionSchema,d as SatelliteEnvSchema,q as SetDocSchema,Ge as TimestampMatcherSchema,_e as TimestampSchema,je as Uint8ArraySchema,zt as UpdateFnOrObjectSchema,Te as UpdateFnSchema,j as UpdateSchema,Ee as UserIdSchema,ve as VersionSchema,tt as createListResultsSchema,qt as defineAssert,co as defineHook,xt as defineQuery,Dt as defineUpdate};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@junobuild/functions",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0-next-2026-03-14",
|
|
4
4
|
"description": "JavaScript and TypeScript utilities for Juno Serverless Functions",
|
|
5
5
|
"author": "David Dal Busco (https://daviddalbusco.com)",
|
|
6
6
|
"license": "MIT",
|
|
@@ -94,9 +94,9 @@
|
|
|
94
94
|
],
|
|
95
95
|
"homepage": "https://juno.build",
|
|
96
96
|
"peerDependencies": {
|
|
97
|
-
"@dfinity/utils": "
|
|
98
|
-
"@icp-sdk/core": "
|
|
99
|
-
"@junobuild/
|
|
100
|
-
"zod": "
|
|
97
|
+
"@dfinity/utils": "*",
|
|
98
|
+
"@icp-sdk/core": "*",
|
|
99
|
+
"@junobuild/schema": "*",
|
|
100
|
+
"zod": "*"
|
|
101
101
|
}
|
|
102
|
-
}
|
|
102
|
+
}
|
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-
|
|
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};
|
|
2
2
|
//# sourceMappingURL=sdk.js.map
|
package/chunk-7JYM2CKB.js
DELETED
package/chunk-7JYM2CKB.js.map
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["src/schemas/candid.ts"],
|
|
4
|
-
"sourcesContent": ["import {\n PrincipalSchema as DfnPrincipalSchema,\n Uint8ArraySchema as DfnUint8ArraySchema\n} from '@junobuild/zod';\nimport type * as z from 'zod';\n\n/**\n * A schema that validates a value is an Uint8Array.\n */\nexport const Uint8ArraySchema = DfnUint8ArraySchema;\n\n/**\n * @see RawPrincipal\n */\nexport const RawPrincipalSchema = Uint8ArraySchema;\n\n/**\n * Represents a raw principal - a Uint8Array representation of a Principal.\n */\nexport type RawPrincipal = Uint8Array;\n\n/**\n * @see Principal\n */\nexport const PrincipalSchema = DfnPrincipalSchema;\n\n/**\n * Represents a principal - i.e. an object instantiated with the class Principal.\n */\nexport type Principal = z.infer<typeof PrincipalSchema>;\n"],
|
|
5
|
-
"mappings": "AAAA,OACE,mBAAmBA,EACnB,oBAAoBC,MACf,iBAMA,IAAMC,EAAmBD,EAKnBE,EAAqBD,EAUrBE,EAAkBJ",
|
|
6
|
-
"names": ["DfnPrincipalSchema", "DfnUint8ArraySchema", "Uint8ArraySchema", "RawPrincipalSchema", "PrincipalSchema"]
|
|
7
|
-
}
|
package/chunk-XRHVLXYG.js
DELETED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|