@junobuild/functions 0.1.4 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +365 -356
- package/chunk-KY6LCVKU.js +2 -0
- package/chunk-KY6LCVKU.js.map +7 -0
- package/chunk-R6MTJSTE.js +2 -0
- package/chunk-R6MTJSTE.js.map +7 -0
- package/hooks/assertions.d.ts +382 -6958
- package/hooks/hooks.d.ts +649 -10260
- package/hooks/schemas/collections.d.ts +3 -7
- package/hooks/schemas/context.d.ts +6 -13
- package/hooks/schemas/db/context.d.ts +87 -3332
- package/hooks/schemas/db/payload.d.ts +19 -173
- package/hooks/schemas/satellite.env.d.ts +2 -2
- package/hooks/schemas/storage/context.d.ts +111 -1861
- package/hooks/schemas/storage/payload.d.ts +29 -203
- package/ic-cdk/schemas/call.d.ts +9 -19
- package/ic-cdk.js +1 -1
- package/ic-cdk.js.map +2 -2
- package/index.js +1 -1
- package/index.js.map +4 -4
- package/package.json +1 -1
- package/schemas/candid.d.ts +4 -4
- package/schemas/db.d.ts +11 -51
- package/schemas/list.d.ts +51 -303
- package/schemas/satellite.d.ts +3 -3
- package/schemas/storage.d.ts +66 -312
- package/sdk/schemas/collections.d.ts +5 -2
- package/sdk/schemas/controllers.d.ts +39 -85
- package/sdk/schemas/db.d.ts +152 -874
- package/sdk/schemas/params.d.ts +24 -247
- package/sdk/schemas/storage.d.ts +86 -830
- package/sdk.js +1 -1
- package/sdk.js.map +2 -2
- package/utils/zod.utils.d.ts +2 -0
- package/chunk-CCKUQNB5.js +0 -2
- package/chunk-CCKUQNB5.js.map +0 -7
- package/chunk-SFZECPH3.js +0 -2
- package/chunk-SFZECPH3.js.map +0 -7
|
@@ -1,15 +1,11 @@
|
|
|
1
|
-
import * as z from 'zod';
|
|
1
|
+
import * as z from 'zod/v4';
|
|
2
2
|
import type { Collection } from '../../schemas/satellite';
|
|
3
3
|
/**
|
|
4
4
|
* @see Collections
|
|
5
5
|
*/
|
|
6
6
|
export declare const CollectionsSchema: z.ZodObject<{
|
|
7
|
-
collections: z.ZodReadonly<z.ZodArray<z.ZodString
|
|
8
|
-
},
|
|
9
|
-
collections: readonly string[];
|
|
10
|
-
}, {
|
|
11
|
-
collections: readonly string[];
|
|
12
|
-
}>;
|
|
7
|
+
collections: z.ZodReadonly<z.ZodArray<z.ZodString>>;
|
|
8
|
+
}, z.core.$strict>;
|
|
13
9
|
/**
|
|
14
10
|
* Defines the collections where a hook or assertion should run.
|
|
15
11
|
*/
|
|
@@ -1,19 +1,12 @@
|
|
|
1
|
-
import
|
|
2
|
-
import * as z from 'zod';
|
|
1
|
+
import * as z from 'zod/v4';
|
|
3
2
|
import { type RawUserId } from '../../schemas/satellite';
|
|
4
3
|
/**
|
|
5
4
|
* @see HookContext
|
|
6
5
|
*/
|
|
7
|
-
export declare const HookContextSchema: <T extends z.ZodTypeAny>(dataSchema: T) => ZodObject<{
|
|
8
|
-
caller: z.
|
|
6
|
+
export declare const HookContextSchema: <T extends z.ZodTypeAny>(dataSchema: T) => z.ZodObject<{
|
|
7
|
+
caller: z.ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>;
|
|
9
8
|
data: T;
|
|
10
|
-
},
|
|
11
|
-
caller: z.ZodType<Uint8Array<ArrayBufferLike>, z.ZodTypeDef, Uint8Array<ArrayBufferLike>>;
|
|
12
|
-
data: T;
|
|
13
|
-
}>, baseObjectInputType<{
|
|
14
|
-
caller: z.ZodType<Uint8Array<ArrayBufferLike>, z.ZodTypeDef, Uint8Array<ArrayBufferLike>>;
|
|
15
|
-
data: T;
|
|
16
|
-
}>>;
|
|
9
|
+
}, z.core.$strict>;
|
|
17
10
|
/**
|
|
18
11
|
* Represents the context provided to hooks, containing information about the caller and related data.
|
|
19
12
|
*
|
|
@@ -32,7 +25,7 @@ export interface HookContext<T> {
|
|
|
32
25
|
/**
|
|
33
26
|
* @see AssertFunction
|
|
34
27
|
*/
|
|
35
|
-
export declare const AssertFunctionSchema: <T extends z.ZodTypeAny>(contextSchema: T) => z.
|
|
28
|
+
export declare const AssertFunctionSchema: <T extends z.ZodTypeAny>(contextSchema: T) => z.ZodCustom<z.core.$InferInnerFunctionType<z.ZodTuple<[T], null>, z.ZodVoid>, z.core.$InferInnerFunctionType<z.ZodTuple<[T], null>, z.ZodVoid>>;
|
|
36
29
|
/**
|
|
37
30
|
* Defines the `assert` function schema for assertions.
|
|
38
31
|
*
|
|
@@ -44,7 +37,7 @@ export type AssertFunction<T> = (context: T) => void;
|
|
|
44
37
|
/**
|
|
45
38
|
* @see RunFunction
|
|
46
39
|
*/
|
|
47
|
-
export declare const RunFunctionSchema: <T extends z.ZodTypeAny>(contextSchema: T) => z.
|
|
40
|
+
export declare const RunFunctionSchema: <T extends z.ZodTypeAny>(contextSchema: T) => z.ZodCustom<z.core.$InferInnerFunctionType<z.ZodTuple<[T], null>, z.ZodUnion<[z.ZodPromise<z.ZodVoid>, z.ZodVoid]>>, z.core.$InferInnerFunctionType<z.ZodTuple<[T], null>, z.ZodUnion<[z.ZodPromise<z.ZodVoid>, z.ZodVoid]>>>;
|
|
48
41
|
/**
|
|
49
42
|
* Defines the `run` function schema for hooks.
|
|
50
43
|
*
|