@junobuild/functions 0.0.15 → 0.1.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.
@@ -0,0 +1,298 @@
1
+ import * as z from 'zod';
2
+ import { type ListParams } from '../../schemas/list';
3
+ import { type Collection, type RawUserId, type UserId } from '../../schemas/satellite';
4
+ /**
5
+ * @see CollectionParams
6
+ */
7
+ export declare const CollectionParamsSchema: z.ZodObject<{
8
+ collection: z.ZodString;
9
+ }, "strict", z.ZodTypeAny, {
10
+ collection: string;
11
+ }, {
12
+ collection: string;
13
+ }>;
14
+ /**
15
+ * The parameters required to scope an operation to a collection.
16
+ */
17
+ export interface CollectionParams {
18
+ /**
19
+ * The name of the collection to target.
20
+ */
21
+ collection: Collection;
22
+ }
23
+ /**
24
+ * @see ListStoreParams
25
+ */
26
+ export declare const ListStoreParamsSchema: z.ZodObject<z.objectUtil.extendShape<{
27
+ collection: z.ZodString;
28
+ }, {
29
+ caller: z.ZodUnion<[z.ZodType<Uint8Array<ArrayBufferLike>, z.ZodTypeDef, Uint8Array<ArrayBufferLike>>, z.ZodType<import("@dfinity/principal").Principal, z.ZodTypeDef, import("@dfinity/principal").Principal>]>;
30
+ params: z.ZodObject<{
31
+ matcher: z.ZodOptional<z.ZodObject<{
32
+ key: z.ZodOptional<z.ZodString>;
33
+ description: z.ZodOptional<z.ZodString>;
34
+ created_at: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
35
+ equal: z.ZodBigInt;
36
+ }, "strip", z.ZodTypeAny, {
37
+ equal: bigint;
38
+ }, {
39
+ equal: bigint;
40
+ }>, z.ZodObject<{
41
+ greater_than: z.ZodBigInt;
42
+ }, "strip", z.ZodTypeAny, {
43
+ greater_than: bigint;
44
+ }, {
45
+ greater_than: bigint;
46
+ }>, z.ZodObject<{
47
+ less_than: z.ZodBigInt;
48
+ }, "strip", z.ZodTypeAny, {
49
+ less_than: bigint;
50
+ }, {
51
+ less_than: bigint;
52
+ }>, z.ZodObject<{
53
+ between: z.ZodTuple<[z.ZodBigInt, z.ZodBigInt], null>;
54
+ }, "strip", z.ZodTypeAny, {
55
+ between: [bigint, bigint];
56
+ }, {
57
+ between: [bigint, bigint];
58
+ }>]>>;
59
+ updated_at: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
60
+ equal: z.ZodBigInt;
61
+ }, "strip", z.ZodTypeAny, {
62
+ equal: bigint;
63
+ }, {
64
+ equal: bigint;
65
+ }>, z.ZodObject<{
66
+ greater_than: z.ZodBigInt;
67
+ }, "strip", z.ZodTypeAny, {
68
+ greater_than: bigint;
69
+ }, {
70
+ greater_than: bigint;
71
+ }>, z.ZodObject<{
72
+ less_than: z.ZodBigInt;
73
+ }, "strip", z.ZodTypeAny, {
74
+ less_than: bigint;
75
+ }, {
76
+ less_than: bigint;
77
+ }>, z.ZodObject<{
78
+ between: z.ZodTuple<[z.ZodBigInt, z.ZodBigInt], null>;
79
+ }, "strip", z.ZodTypeAny, {
80
+ between: [bigint, bigint];
81
+ }, {
82
+ between: [bigint, bigint];
83
+ }>]>>;
84
+ }, "strict", z.ZodTypeAny, {
85
+ description?: string | undefined;
86
+ created_at?: {
87
+ equal: bigint;
88
+ } | {
89
+ greater_than: bigint;
90
+ } | {
91
+ less_than: bigint;
92
+ } | {
93
+ between: [bigint, bigint];
94
+ } | undefined;
95
+ updated_at?: {
96
+ equal: bigint;
97
+ } | {
98
+ greater_than: bigint;
99
+ } | {
100
+ less_than: bigint;
101
+ } | {
102
+ between: [bigint, bigint];
103
+ } | undefined;
104
+ key?: string | undefined;
105
+ }, {
106
+ description?: string | undefined;
107
+ created_at?: {
108
+ equal: bigint;
109
+ } | {
110
+ greater_than: bigint;
111
+ } | {
112
+ less_than: bigint;
113
+ } | {
114
+ between: [bigint, bigint];
115
+ } | undefined;
116
+ updated_at?: {
117
+ equal: bigint;
118
+ } | {
119
+ greater_than: bigint;
120
+ } | {
121
+ less_than: bigint;
122
+ } | {
123
+ between: [bigint, bigint];
124
+ } | undefined;
125
+ key?: string | undefined;
126
+ }>>;
127
+ paginate: z.ZodOptional<z.ZodObject<{
128
+ start_after: z.ZodOptional<z.ZodString>;
129
+ limit: z.ZodOptional<z.ZodBigInt>;
130
+ }, "strict", z.ZodTypeAny, {
131
+ start_after?: string | undefined;
132
+ limit?: bigint | undefined;
133
+ }, {
134
+ start_after?: string | undefined;
135
+ limit?: bigint | undefined;
136
+ }>>;
137
+ order: z.ZodOptional<z.ZodObject<{
138
+ desc: z.ZodBoolean;
139
+ field: z.ZodEnum<["keys", "created_at", "updated_at"]>;
140
+ }, "strict", z.ZodTypeAny, {
141
+ desc: boolean;
142
+ field: "keys" | "created_at" | "updated_at";
143
+ }, {
144
+ desc: boolean;
145
+ field: "keys" | "created_at" | "updated_at";
146
+ }>>;
147
+ owner: z.ZodOptional<z.ZodType<Uint8Array<ArrayBufferLike>, z.ZodTypeDef, Uint8Array<ArrayBufferLike>>>;
148
+ }, "strict", z.ZodTypeAny, {
149
+ owner?: Uint8Array<ArrayBufferLike> | undefined;
150
+ matcher?: {
151
+ description?: string | undefined;
152
+ created_at?: {
153
+ equal: bigint;
154
+ } | {
155
+ greater_than: bigint;
156
+ } | {
157
+ less_than: bigint;
158
+ } | {
159
+ between: [bigint, bigint];
160
+ } | undefined;
161
+ updated_at?: {
162
+ equal: bigint;
163
+ } | {
164
+ greater_than: bigint;
165
+ } | {
166
+ less_than: bigint;
167
+ } | {
168
+ between: [bigint, bigint];
169
+ } | undefined;
170
+ key?: string | undefined;
171
+ } | undefined;
172
+ paginate?: {
173
+ start_after?: string | undefined;
174
+ limit?: bigint | undefined;
175
+ } | undefined;
176
+ order?: {
177
+ desc: boolean;
178
+ field: "keys" | "created_at" | "updated_at";
179
+ } | undefined;
180
+ }, {
181
+ owner?: Uint8Array<ArrayBufferLike> | undefined;
182
+ matcher?: {
183
+ description?: string | undefined;
184
+ created_at?: {
185
+ equal: bigint;
186
+ } | {
187
+ greater_than: bigint;
188
+ } | {
189
+ less_than: bigint;
190
+ } | {
191
+ between: [bigint, bigint];
192
+ } | undefined;
193
+ updated_at?: {
194
+ equal: bigint;
195
+ } | {
196
+ greater_than: bigint;
197
+ } | {
198
+ less_than: bigint;
199
+ } | {
200
+ between: [bigint, bigint];
201
+ } | undefined;
202
+ key?: string | undefined;
203
+ } | undefined;
204
+ paginate?: {
205
+ start_after?: string | undefined;
206
+ limit?: bigint | undefined;
207
+ } | undefined;
208
+ order?: {
209
+ desc: boolean;
210
+ field: "keys" | "created_at" | "updated_at";
211
+ } | undefined;
212
+ }>;
213
+ }>, "strict", z.ZodTypeAny, {
214
+ params: {
215
+ owner?: Uint8Array<ArrayBufferLike> | undefined;
216
+ matcher?: {
217
+ description?: string | undefined;
218
+ created_at?: {
219
+ equal: bigint;
220
+ } | {
221
+ greater_than: bigint;
222
+ } | {
223
+ less_than: bigint;
224
+ } | {
225
+ between: [bigint, bigint];
226
+ } | undefined;
227
+ updated_at?: {
228
+ equal: bigint;
229
+ } | {
230
+ greater_than: bigint;
231
+ } | {
232
+ less_than: bigint;
233
+ } | {
234
+ between: [bigint, bigint];
235
+ } | undefined;
236
+ key?: string | undefined;
237
+ } | undefined;
238
+ paginate?: {
239
+ start_after?: string | undefined;
240
+ limit?: bigint | undefined;
241
+ } | undefined;
242
+ order?: {
243
+ desc: boolean;
244
+ field: "keys" | "created_at" | "updated_at";
245
+ } | undefined;
246
+ };
247
+ caller: Uint8Array<ArrayBufferLike> | import("@dfinity/principal").Principal;
248
+ collection: string;
249
+ }, {
250
+ params: {
251
+ owner?: Uint8Array<ArrayBufferLike> | undefined;
252
+ matcher?: {
253
+ description?: string | undefined;
254
+ created_at?: {
255
+ equal: bigint;
256
+ } | {
257
+ greater_than: bigint;
258
+ } | {
259
+ less_than: bigint;
260
+ } | {
261
+ between: [bigint, bigint];
262
+ } | undefined;
263
+ updated_at?: {
264
+ equal: bigint;
265
+ } | {
266
+ greater_than: bigint;
267
+ } | {
268
+ less_than: bigint;
269
+ } | {
270
+ between: [bigint, bigint];
271
+ } | undefined;
272
+ key?: string | undefined;
273
+ } | undefined;
274
+ paginate?: {
275
+ start_after?: string | undefined;
276
+ limit?: bigint | undefined;
277
+ } | undefined;
278
+ order?: {
279
+ desc: boolean;
280
+ field: "keys" | "created_at" | "updated_at";
281
+ } | undefined;
282
+ };
283
+ caller: Uint8Array<ArrayBufferLike> | import("@dfinity/principal").Principal;
284
+ collection: string;
285
+ }>;
286
+ /**
287
+ * The parameters required to list documents from the datastore respectively assets from the storage.
288
+ */
289
+ export type ListStoreParams = CollectionParams & {
290
+ /**
291
+ * The identity of the caller requesting the list operation.
292
+ */
293
+ caller: RawUserId | UserId;
294
+ /**
295
+ * Optional filtering, ordering, and pagination parameters.
296
+ */
297
+ params: ListParams;
298
+ };