@junobuild/functions 0.0.7 → 0.0.8-next-2025-03-17

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/src/global.d.ts CHANGED
@@ -14,4 +14,9 @@ declare global {
14
14
 
15
15
  function __ic_cdk_id(): RawPrincipal;
16
16
  function __ic_cdk_print(msg: string): void;
17
+ function __ic_cdk_call_raw(
18
+ canisterId: RawPrincipal,
19
+ method: string,
20
+ args: Uint8Array<ArrayBuffer>
21
+ ): Promise<Uint8Array<ArrayBuffer>>;
17
22
  }
package/chunk-OVO3T2DM.js DELETED
@@ -1,2 +0,0 @@
1
- import*as r from"zod";var i=r.custom(o=>o instanceof Uint8Array,{message:"Expected Uint8Array"});import*as e from"zod";var a=e.bigint(),c=e.bigint(),p=e.custom(o=>o instanceof Uint8Array,{message:"Expected Uint8Array"}),n=i,f=e.string(),h=e.string();import*as t from"zod";var m=t.string().max(1024),z=t.object({owner:n,data:p,description:m.optional(),created_at:a,updated_at:a,version:c.optional()}).strict();export{i as a,a as b,c,p as d,n as e,f,h as g,m as h,z as i};
2
- //# sourceMappingURL=chunk-OVO3T2DM.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["src/schemas/candid.ts", "src/schemas/core.ts", "src/schemas/db.ts"],
4
- "sourcesContent": ["import * as z from 'zod';\n\n/**\n * @see RawPrincipal\n */\nexport const RawPrincipalSchema = z.custom<Uint8Array>((val) => val instanceof Uint8Array, {\n message: 'Expected Uint8Array'\n});\n\n/**\n * Represents a raw principal identifier.\n *\n * Principals are unique identities used in authentication and authorization.\n */\nexport type RawPrincipal = z.infer<typeof RawPrincipalSchema>;\n", "import * as z from 'zod';\nimport {RawPrincipalSchema} from './candid';\n\n/**\n * @see Timestamp\n */\nexport const TimestampSchema = z.bigint();\n\n/**\n * Represents a timestamp in nanoseconds since the Unix epoch.\n *\n * Used for tracking when events occur, such as document creation and updates.\n */\nexport type Timestamp = z.infer<typeof TimestampSchema>;\n\n/**\n * @see Version\n */\nexport const VersionSchema = z.bigint();\n\n/**\n * Represents a version number for tracking changes.\n *\n * This is typically incremented with each update to ensure consistency.\n */\nexport type Version = z.infer<typeof VersionSchema>;\n\n/**\n * @see RawData\n */\nexport const RawDataSchema = z.custom<Uint8Array>((val) => val instanceof Uint8Array, {\n message: 'Expected Uint8Array'\n});\n\n/**\n * Represents raw binary data.\n *\n * This is used to store unstructured data in a document.\n */\nexport type RawData = z.infer<typeof RawDataSchema>;\n\n/**\n * @see RawUserId\n */\nexport const RawUserIdSchema = RawPrincipalSchema;\n\n/**\n * Represents a raw user identifier.\n *\n * This is a principal associated with a user.\n */\nexport type RawUserId = z.infer<typeof RawUserIdSchema>;\n\n/**\n * @see Collection\n */\nexport const CollectionSchema = z.string();\n\n/**\n * A collection name where data are stored.\n */\nexport type Collection = z.infer<typeof CollectionSchema>;\n\n/**\n * @see Key\n */\nexport const KeySchema = z.string();\n\n/**\n * A unique key identifier within a collection.\n */\nexport type Key = z.infer<typeof KeySchema>;\n", "import * as z from 'zod';\nimport {RawDataSchema, RawUserIdSchema, TimestampSchema, VersionSchema} from './core';\n\n/**\n * @see DocDescription\n */\nexport const DocDescriptionSchema = z.string().max(1024);\n\n/**\n * Represents a document description with a maximum length of 1024 characters.\n */\nexport type DocDescription = z.infer<typeof DocDescriptionSchema>;\n\n/**\n * @see Doc\n */\nexport const DocSchema = z\n .object({\n /**\n * The user who owns this document.\n */\n owner: RawUserIdSchema,\n\n /**\n * The raw data of the document.\n */\n data: RawDataSchema,\n\n /**\n * An optional description of the document.\n */\n description: DocDescriptionSchema.optional(),\n\n /**\n * The timestamp when the document was first created.\n */\n created_at: TimestampSchema,\n\n /**\n * The timestamp when the document was last updated.\n */\n updated_at: TimestampSchema,\n\n /**\n * The version number of the document, used for consistency checks.\n * If not provided, it's assumed to be the first version.\n */\n version: VersionSchema.optional()\n })\n .strict();\n\n/**\n * Represents a document stored in a collection.\n */\nexport type Doc = z.infer<typeof DocSchema>;\n"],
5
- "mappings": "AAAA,UAAYA,MAAO,MAKZ,IAAMC,EAAuB,SAAoBC,GAAQA,aAAe,WAAY,CACzF,QAAS,qBACX,CAAC,ECPD,UAAYC,MAAO,MAMZ,IAAMC,EAAoB,SAAO,EAY3BC,EAAkB,SAAO,EAYzBC,EAAkB,SAAoBC,GAAQA,aAAe,WAAY,CACpF,QAAS,qBACX,CAAC,EAYYC,EAAkBC,EAYlBC,EAAqB,SAAO,EAU5BC,EAAc,SAAO,EClElC,UAAYC,MAAO,MAMZ,IAAMC,EAAyB,SAAO,EAAE,IAAI,IAAI,EAU1CC,EACV,SAAO,CAIN,MAAOC,EAKP,KAAMC,EAKN,YAAaH,EAAqB,SAAS,EAK3C,WAAYI,EAKZ,WAAYA,EAMZ,QAASC,EAAc,SAAS,CAClC,CAAC,EACA,OAAO",
6
- "names": ["z", "RawPrincipalSchema", "val", "z", "TimestampSchema", "VersionSchema", "RawDataSchema", "val", "RawUserIdSchema", "RawPrincipalSchema", "CollectionSchema", "KeySchema", "z", "DocDescriptionSchema", "DocSchema", "RawUserIdSchema", "RawDataSchema", "TimestampSchema", "VersionSchema"]
7
- }