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

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.
@@ -1,158 +0,0 @@
1
- import * as z from 'zod';
2
- import { type RawUserId, type Timestamp, type UserId } from '../../schemas/satellite';
3
- /**
4
- * @see ControllerScope
5
- */
6
- export declare const ControllerScopeSchema: z.ZodEnum<{
7
- write: "write";
8
- admin: "admin";
9
- submit: "submit";
10
- }>;
11
- /**
12
- * Represents the permission scope of a controller.
13
- */
14
- export type ControllerScope = z.infer<typeof ControllerScopeSchema>;
15
- /**
16
- * @see ControllerKind
17
- */
18
- export declare const ControllerKindSchema: z.ZodEnum<{
19
- automation: "automation";
20
- emulator: "emulator";
21
- }>;
22
- /**
23
- * Represents a specific kind of controller. Meant for informational purposes.
24
- */
25
- export type ControllerKind = z.infer<typeof ControllerKindSchema>;
26
- /**
27
- * @see MetadataSchema
28
- */
29
- export declare const MetadataSchema: z.ZodTuple<[z.ZodString, z.ZodString], null>;
30
- /**
31
- * Represents a single metadata entry as a key-value tuple.
32
- */
33
- export type Metadata = z.infer<typeof MetadataSchema>;
34
- /**
35
- * @see ControllerSchema
36
- */
37
- export declare const ControllerSchema: z.ZodObject<{
38
- metadata: z.ZodArray<z.ZodTuple<[z.ZodString, z.ZodString], null>>;
39
- created_at: z.ZodBigInt;
40
- updated_at: z.ZodBigInt;
41
- expires_at: z.ZodOptional<z.ZodBigInt>;
42
- scope: z.ZodEnum<{
43
- write: "write";
44
- admin: "admin";
45
- submit: "submit";
46
- }>;
47
- kind: z.ZodOptional<z.ZodEnum<{
48
- automation: "automation";
49
- emulator: "emulator";
50
- }>>;
51
- }, z.core.$strict>;
52
- /**
53
- * Represents a controller with access scope and associated metadata.
54
- */
55
- export interface Controller {
56
- /**
57
- * A list of key-value metadata pairs associated with the controller.
58
- */
59
- metadata: Metadata[];
60
- /**
61
- * The timestamp when the controller was created.
62
- */
63
- created_at: Timestamp;
64
- /**
65
- * The timestamp when the controller was last updated.
66
- */
67
- updated_at: Timestamp;
68
- /**
69
- * Optional expiration timestamp for the controller.
70
- */
71
- expires_at?: Timestamp;
72
- /**
73
- * The scope assigned to the controller.
74
- */
75
- scope: ControllerScope;
76
- /**
77
- * An optional kind identifier of the controller.
78
- */
79
- kind?: ControllerKind;
80
- }
81
- /**
82
- * @see ControllerRecordSchema
83
- */
84
- export declare const ControllerRecordSchema: z.ZodTuple<[z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>, z.ZodObject<{
85
- metadata: z.ZodArray<z.ZodTuple<[z.ZodString, z.ZodString], null>>;
86
- created_at: z.ZodBigInt;
87
- updated_at: z.ZodBigInt;
88
- expires_at: z.ZodOptional<z.ZodBigInt>;
89
- scope: z.ZodEnum<{
90
- write: "write";
91
- admin: "admin";
92
- submit: "submit";
93
- }>;
94
- kind: z.ZodOptional<z.ZodEnum<{
95
- automation: "automation";
96
- emulator: "emulator";
97
- }>>;
98
- }, z.core.$strict>], null>;
99
- /**
100
- * Represents a tuple containing the principal ID and associated controller data.
101
- */
102
- export type ControllerRecord = z.infer<typeof ControllerRecordSchema>;
103
- /**
104
- * @see ControllersSchema
105
- */
106
- export declare const ControllersSchema: z.ZodArray<z.ZodTuple<[z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>, z.ZodObject<{
107
- metadata: z.ZodArray<z.ZodTuple<[z.ZodString, z.ZodString], null>>;
108
- created_at: z.ZodBigInt;
109
- updated_at: z.ZodBigInt;
110
- expires_at: z.ZodOptional<z.ZodBigInt>;
111
- scope: z.ZodEnum<{
112
- write: "write";
113
- admin: "admin";
114
- submit: "submit";
115
- }>;
116
- kind: z.ZodOptional<z.ZodEnum<{
117
- automation: "automation";
118
- emulator: "emulator";
119
- }>>;
120
- }, z.core.$strict>], null>>;
121
- /**
122
- * Represents a list of controllers.
123
- */
124
- export type Controllers = z.infer<typeof ControllersSchema>;
125
- /**
126
- * @see ControllerCheckParamsSchema
127
- */
128
- export declare const ControllerCheckParamsSchema: z.ZodObject<{
129
- caller: z.ZodUnion<[z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>, z.ZodPipe<z.ZodCustom<import("@icp-sdk/core/principal").Principal, import("@icp-sdk/core/principal").Principal>, z.ZodTransform<import("@icp-sdk/core/principal").Principal, import("@icp-sdk/core/principal").Principal>>]>;
130
- controllers: z.ZodArray<z.ZodTuple<[z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>, z.ZodObject<{
131
- metadata: z.ZodArray<z.ZodTuple<[z.ZodString, z.ZodString], null>>;
132
- created_at: z.ZodBigInt;
133
- updated_at: z.ZodBigInt;
134
- expires_at: z.ZodOptional<z.ZodBigInt>;
135
- scope: z.ZodEnum<{
136
- write: "write";
137
- admin: "admin";
138
- submit: "submit";
139
- }>;
140
- kind: z.ZodOptional<z.ZodEnum<{
141
- automation: "automation";
142
- emulator: "emulator";
143
- }>>;
144
- }, z.core.$strict>], null>>;
145
- }, z.core.$strip>;
146
- /**
147
- * Represents the parameters required to perform controller checks.
148
- */
149
- export interface ControllerCheckParams {
150
- /**
151
- * The identity of the caller to verify against the controller list.
152
- */
153
- caller: RawUserId | UserId;
154
- /**
155
- * The list of controllers to check against.
156
- */
157
- controllers: Controllers;
158
- }