@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.
@@ -1,36 +1,50 @@
1
- import * as z from 'zod';
2
1
  import { type DelDoc, type SetDoc } from '../../schemas/db';
3
- import { type Collection, type Key, type RawUserId, type UserId } from '../../schemas/satellite';
2
+ import { type Key, type RawUserId, type UserId } from '../../schemas/satellite';
3
+ import { type CollectionParams, type ListStoreParams } from './params';
4
+ /**
5
+ * @see GetDocStoreParams
6
+ */
7
+ export declare const GetDocStoreParamsSchema: import("zod").ZodObject<import("zod").objectUtil.extendShape<{
8
+ collection: import("zod").ZodString;
9
+ }, {
10
+ caller: import("zod").ZodUnion<[import("zod").ZodType<Uint8Array<ArrayBufferLike>, import("zod").ZodTypeDef, Uint8Array<ArrayBufferLike>>, import("zod").ZodType<import("@dfinity/principal").Principal, import("zod").ZodTypeDef, import("@dfinity/principal").Principal>]>;
11
+ key: import("zod").ZodString;
12
+ }>, "strict", import("zod").ZodTypeAny, {
13
+ caller: Uint8Array<ArrayBufferLike> | import("@dfinity/principal").Principal;
14
+ collection: string;
15
+ key: string;
16
+ }, {
17
+ caller: Uint8Array<ArrayBufferLike> | import("@dfinity/principal").Principal;
18
+ collection: string;
19
+ key: string;
20
+ }>;
4
21
  /**
5
22
  * Represents the base parameters required to access the datastore and modify a document.
6
23
  */
7
- export interface DocStoreParams {
24
+ export type GetDocStoreParams = CollectionParams & {
8
25
  /**
9
26
  * The caller who initiate the document operation.
10
27
  */
11
28
  caller: RawUserId | UserId;
12
- /**
13
- * The name of the collection where the document is stored.
14
- */
15
- collection: Collection;
16
29
  /**
17
30
  * The key identifying the document within the collection.
18
31
  */
19
32
  key: Key;
20
- }
33
+ };
21
34
  /**
22
35
  * @see SetDocStoreParams
23
36
  */
24
- export declare const SetDocStoreParamsSchema: z.ZodObject<z.objectUtil.extendShape<{
25
- caller: z.ZodUnion<[z.ZodType<Uint8Array<ArrayBufferLike>, z.ZodTypeDef, Uint8Array<ArrayBufferLike>>, z.ZodType<import("@dfinity/principal").Principal, z.ZodTypeDef, import("@dfinity/principal").Principal>]>;
26
- collection: z.ZodString;
27
- key: z.ZodString;
37
+ export declare const SetDocStoreParamsSchema: import("zod").ZodObject<import("zod").objectUtil.extendShape<import("zod").objectUtil.extendShape<{
38
+ collection: import("zod").ZodString;
28
39
  }, {
29
- doc: z.ZodObject<{
30
- data: z.ZodType<Uint8Array<ArrayBufferLike>, z.ZodTypeDef, Uint8Array<ArrayBufferLike>>;
31
- description: z.ZodOptional<z.ZodString>;
32
- version: z.ZodOptional<z.ZodBigInt>;
33
- }, "strict", z.ZodTypeAny, {
40
+ caller: import("zod").ZodUnion<[import("zod").ZodType<Uint8Array<ArrayBufferLike>, import("zod").ZodTypeDef, Uint8Array<ArrayBufferLike>>, import("zod").ZodType<import("@dfinity/principal").Principal, import("zod").ZodTypeDef, import("@dfinity/principal").Principal>]>;
41
+ key: import("zod").ZodString;
42
+ }>, {
43
+ doc: import("zod").ZodObject<{
44
+ data: import("zod").ZodType<Uint8Array<ArrayBufferLike>, import("zod").ZodTypeDef, Uint8Array<ArrayBufferLike>>;
45
+ description: import("zod").ZodOptional<import("zod").ZodString>;
46
+ version: import("zod").ZodOptional<import("zod").ZodBigInt>;
47
+ }, "strict", import("zod").ZodTypeAny, {
34
48
  data: Uint8Array<ArrayBufferLike>;
35
49
  description?: string | undefined;
36
50
  version?: bigint | undefined;
@@ -39,7 +53,7 @@ export declare const SetDocStoreParamsSchema: z.ZodObject<z.objectUtil.extendSha
39
53
  description?: string | undefined;
40
54
  version?: bigint | undefined;
41
55
  }>;
42
- }>, "strict", z.ZodTypeAny, {
56
+ }>, "strict", import("zod").ZodTypeAny, {
43
57
  caller: Uint8Array<ArrayBufferLike> | import("@dfinity/principal").Principal;
44
58
  collection: string;
45
59
  key: string;
@@ -64,7 +78,7 @@ export declare const SetDocStoreParamsSchema: z.ZodObject<z.objectUtil.extendSha
64
78
  * This includes the document data along with metadata such as the caller,
65
79
  * collection, and key.
66
80
  */
67
- export type SetDocStoreParams = DocStoreParams & {
81
+ export type SetDocStoreParams = GetDocStoreParams & {
68
82
  /**
69
83
  * The data, optional description and version required to create or update a document.
70
84
  */
@@ -73,19 +87,20 @@ export type SetDocStoreParams = DocStoreParams & {
73
87
  /**
74
88
  * @see DeleteDocStoreParams
75
89
  */
76
- export declare const DeleteDocStoreParamsSchema: z.ZodObject<z.objectUtil.extendShape<{
77
- caller: z.ZodUnion<[z.ZodType<Uint8Array<ArrayBufferLike>, z.ZodTypeDef, Uint8Array<ArrayBufferLike>>, z.ZodType<import("@dfinity/principal").Principal, z.ZodTypeDef, import("@dfinity/principal").Principal>]>;
78
- collection: z.ZodString;
79
- key: z.ZodString;
90
+ export declare const DeleteDocStoreParamsSchema: import("zod").ZodObject<import("zod").objectUtil.extendShape<import("zod").objectUtil.extendShape<{
91
+ collection: import("zod").ZodString;
80
92
  }, {
81
- doc: z.ZodObject<{
82
- version: z.ZodOptional<z.ZodBigInt>;
83
- }, "strict", z.ZodTypeAny, {
93
+ caller: import("zod").ZodUnion<[import("zod").ZodType<Uint8Array<ArrayBufferLike>, import("zod").ZodTypeDef, Uint8Array<ArrayBufferLike>>, import("zod").ZodType<import("@dfinity/principal").Principal, import("zod").ZodTypeDef, import("@dfinity/principal").Principal>]>;
94
+ key: import("zod").ZodString;
95
+ }>, {
96
+ doc: import("zod").ZodObject<{
97
+ version: import("zod").ZodOptional<import("zod").ZodBigInt>;
98
+ }, "strict", import("zod").ZodTypeAny, {
84
99
  version?: bigint | undefined;
85
100
  }, {
86
101
  version?: bigint | undefined;
87
102
  }>;
88
- }>, "strict", z.ZodTypeAny, {
103
+ }>, "strict", import("zod").ZodTypeAny, {
89
104
  caller: Uint8Array<ArrayBufferLike> | import("@dfinity/principal").Principal;
90
105
  collection: string;
91
106
  key: string;
@@ -106,9 +121,838 @@ export declare const DeleteDocStoreParamsSchema: z.ZodObject<z.objectUtil.extend
106
121
  * This includes the document version along with metadata such as the caller,
107
122
  * collection, and key.
108
123
  */
109
- export type DeleteDocStoreParams = DocStoreParams & {
124
+ export type DeleteDocStoreParams = GetDocStoreParams & {
110
125
  /**
111
126
  * The version required to delete a document.
112
127
  */
113
128
  doc: DelDoc;
114
129
  };
130
+ /**
131
+ * @see CountCollectionDocsStoreParams
132
+ */
133
+ export declare const CountCollectionDocsStoreParamsSchema: import("zod").ZodObject<{
134
+ collection: import("zod").ZodString;
135
+ }, "strict", import("zod").ZodTypeAny, {
136
+ collection: string;
137
+ }, {
138
+ collection: string;
139
+ }>;
140
+ /**
141
+ * The parameters required to count documents from the datastore.
142
+ */
143
+ export type CountCollectionDocsStoreParams = CollectionParams;
144
+ /**
145
+ * @see CountDocsStoreParams
146
+ */
147
+ export declare const CountDocsStoreParamsSchema: import("zod").ZodObject<import("zod").objectUtil.extendShape<{
148
+ collection: import("zod").ZodString;
149
+ }, {
150
+ caller: import("zod").ZodUnion<[import("zod").ZodType<Uint8Array<ArrayBufferLike>, import("zod").ZodTypeDef, Uint8Array<ArrayBufferLike>>, import("zod").ZodType<import("@dfinity/principal").Principal, import("zod").ZodTypeDef, import("@dfinity/principal").Principal>]>;
151
+ params: import("zod").ZodObject<{
152
+ matcher: import("zod").ZodOptional<import("zod").ZodObject<{
153
+ key: import("zod").ZodOptional<import("zod").ZodString>;
154
+ description: import("zod").ZodOptional<import("zod").ZodString>;
155
+ created_at: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodObject<{
156
+ equal: import("zod").ZodBigInt;
157
+ }, "strip", import("zod").ZodTypeAny, {
158
+ equal: bigint;
159
+ }, {
160
+ equal: bigint;
161
+ }>, import("zod").ZodObject<{
162
+ greater_than: import("zod").ZodBigInt;
163
+ }, "strip", import("zod").ZodTypeAny, {
164
+ greater_than: bigint;
165
+ }, {
166
+ greater_than: bigint;
167
+ }>, import("zod").ZodObject<{
168
+ less_than: import("zod").ZodBigInt;
169
+ }, "strip", import("zod").ZodTypeAny, {
170
+ less_than: bigint;
171
+ }, {
172
+ less_than: bigint;
173
+ }>, import("zod").ZodObject<{
174
+ between: import("zod").ZodTuple<[import("zod").ZodBigInt, import("zod").ZodBigInt], null>;
175
+ }, "strip", import("zod").ZodTypeAny, {
176
+ between: [bigint, bigint];
177
+ }, {
178
+ between: [bigint, bigint];
179
+ }>]>>;
180
+ updated_at: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodObject<{
181
+ equal: import("zod").ZodBigInt;
182
+ }, "strip", import("zod").ZodTypeAny, {
183
+ equal: bigint;
184
+ }, {
185
+ equal: bigint;
186
+ }>, import("zod").ZodObject<{
187
+ greater_than: import("zod").ZodBigInt;
188
+ }, "strip", import("zod").ZodTypeAny, {
189
+ greater_than: bigint;
190
+ }, {
191
+ greater_than: bigint;
192
+ }>, import("zod").ZodObject<{
193
+ less_than: import("zod").ZodBigInt;
194
+ }, "strip", import("zod").ZodTypeAny, {
195
+ less_than: bigint;
196
+ }, {
197
+ less_than: bigint;
198
+ }>, import("zod").ZodObject<{
199
+ between: import("zod").ZodTuple<[import("zod").ZodBigInt, import("zod").ZodBigInt], null>;
200
+ }, "strip", import("zod").ZodTypeAny, {
201
+ between: [bigint, bigint];
202
+ }, {
203
+ between: [bigint, bigint];
204
+ }>]>>;
205
+ }, "strict", import("zod").ZodTypeAny, {
206
+ description?: string | undefined;
207
+ created_at?: {
208
+ equal: bigint;
209
+ } | {
210
+ greater_than: bigint;
211
+ } | {
212
+ less_than: bigint;
213
+ } | {
214
+ between: [bigint, bigint];
215
+ } | undefined;
216
+ updated_at?: {
217
+ equal: bigint;
218
+ } | {
219
+ greater_than: bigint;
220
+ } | {
221
+ less_than: bigint;
222
+ } | {
223
+ between: [bigint, bigint];
224
+ } | undefined;
225
+ key?: string | undefined;
226
+ }, {
227
+ description?: string | undefined;
228
+ created_at?: {
229
+ equal: bigint;
230
+ } | {
231
+ greater_than: bigint;
232
+ } | {
233
+ less_than: bigint;
234
+ } | {
235
+ between: [bigint, bigint];
236
+ } | undefined;
237
+ updated_at?: {
238
+ equal: bigint;
239
+ } | {
240
+ greater_than: bigint;
241
+ } | {
242
+ less_than: bigint;
243
+ } | {
244
+ between: [bigint, bigint];
245
+ } | undefined;
246
+ key?: string | undefined;
247
+ }>>;
248
+ paginate: import("zod").ZodOptional<import("zod").ZodObject<{
249
+ start_after: import("zod").ZodOptional<import("zod").ZodString>;
250
+ limit: import("zod").ZodOptional<import("zod").ZodBigInt>;
251
+ }, "strict", import("zod").ZodTypeAny, {
252
+ start_after?: string | undefined;
253
+ limit?: bigint | undefined;
254
+ }, {
255
+ start_after?: string | undefined;
256
+ limit?: bigint | undefined;
257
+ }>>;
258
+ order: import("zod").ZodOptional<import("zod").ZodObject<{
259
+ desc: import("zod").ZodBoolean;
260
+ field: import("zod").ZodEnum<["keys", "created_at", "updated_at"]>;
261
+ }, "strict", import("zod").ZodTypeAny, {
262
+ desc: boolean;
263
+ field: "keys" | "created_at" | "updated_at";
264
+ }, {
265
+ desc: boolean;
266
+ field: "keys" | "created_at" | "updated_at";
267
+ }>>;
268
+ owner: import("zod").ZodOptional<import("zod").ZodType<Uint8Array<ArrayBufferLike>, import("zod").ZodTypeDef, Uint8Array<ArrayBufferLike>>>;
269
+ }, "strict", import("zod").ZodTypeAny, {
270
+ owner?: Uint8Array<ArrayBufferLike> | undefined;
271
+ matcher?: {
272
+ description?: string | undefined;
273
+ created_at?: {
274
+ equal: bigint;
275
+ } | {
276
+ greater_than: bigint;
277
+ } | {
278
+ less_than: bigint;
279
+ } | {
280
+ between: [bigint, bigint];
281
+ } | undefined;
282
+ updated_at?: {
283
+ equal: bigint;
284
+ } | {
285
+ greater_than: bigint;
286
+ } | {
287
+ less_than: bigint;
288
+ } | {
289
+ between: [bigint, bigint];
290
+ } | undefined;
291
+ key?: string | undefined;
292
+ } | undefined;
293
+ paginate?: {
294
+ start_after?: string | undefined;
295
+ limit?: bigint | undefined;
296
+ } | undefined;
297
+ order?: {
298
+ desc: boolean;
299
+ field: "keys" | "created_at" | "updated_at";
300
+ } | undefined;
301
+ }, {
302
+ owner?: Uint8Array<ArrayBufferLike> | undefined;
303
+ matcher?: {
304
+ description?: string | undefined;
305
+ created_at?: {
306
+ equal: bigint;
307
+ } | {
308
+ greater_than: bigint;
309
+ } | {
310
+ less_than: bigint;
311
+ } | {
312
+ between: [bigint, bigint];
313
+ } | undefined;
314
+ updated_at?: {
315
+ equal: bigint;
316
+ } | {
317
+ greater_than: bigint;
318
+ } | {
319
+ less_than: bigint;
320
+ } | {
321
+ between: [bigint, bigint];
322
+ } | undefined;
323
+ key?: string | undefined;
324
+ } | undefined;
325
+ paginate?: {
326
+ start_after?: string | undefined;
327
+ limit?: bigint | undefined;
328
+ } | undefined;
329
+ order?: {
330
+ desc: boolean;
331
+ field: "keys" | "created_at" | "updated_at";
332
+ } | undefined;
333
+ }>;
334
+ }>, "strict", import("zod").ZodTypeAny, {
335
+ params: {
336
+ owner?: Uint8Array<ArrayBufferLike> | undefined;
337
+ matcher?: {
338
+ description?: string | undefined;
339
+ created_at?: {
340
+ equal: bigint;
341
+ } | {
342
+ greater_than: bigint;
343
+ } | {
344
+ less_than: bigint;
345
+ } | {
346
+ between: [bigint, bigint];
347
+ } | undefined;
348
+ updated_at?: {
349
+ equal: bigint;
350
+ } | {
351
+ greater_than: bigint;
352
+ } | {
353
+ less_than: bigint;
354
+ } | {
355
+ between: [bigint, bigint];
356
+ } | undefined;
357
+ key?: string | undefined;
358
+ } | undefined;
359
+ paginate?: {
360
+ start_after?: string | undefined;
361
+ limit?: bigint | undefined;
362
+ } | undefined;
363
+ order?: {
364
+ desc: boolean;
365
+ field: "keys" | "created_at" | "updated_at";
366
+ } | undefined;
367
+ };
368
+ caller: Uint8Array<ArrayBufferLike> | import("@dfinity/principal").Principal;
369
+ collection: string;
370
+ }, {
371
+ params: {
372
+ owner?: Uint8Array<ArrayBufferLike> | undefined;
373
+ matcher?: {
374
+ description?: string | undefined;
375
+ created_at?: {
376
+ equal: bigint;
377
+ } | {
378
+ greater_than: bigint;
379
+ } | {
380
+ less_than: bigint;
381
+ } | {
382
+ between: [bigint, bigint];
383
+ } | undefined;
384
+ updated_at?: {
385
+ equal: bigint;
386
+ } | {
387
+ greater_than: bigint;
388
+ } | {
389
+ less_than: bigint;
390
+ } | {
391
+ between: [bigint, bigint];
392
+ } | undefined;
393
+ key?: string | undefined;
394
+ } | undefined;
395
+ paginate?: {
396
+ start_after?: string | undefined;
397
+ limit?: bigint | undefined;
398
+ } | undefined;
399
+ order?: {
400
+ desc: boolean;
401
+ field: "keys" | "created_at" | "updated_at";
402
+ } | undefined;
403
+ };
404
+ caller: Uint8Array<ArrayBufferLike> | import("@dfinity/principal").Principal;
405
+ collection: string;
406
+ }>;
407
+ /**
408
+ * The parameters required to count documents from the datastore.
409
+ */
410
+ export type CountDocsStoreParams = ListStoreParams;
411
+ /**
412
+ * @see ListDocsStoreParams
413
+ */
414
+ export declare const ListDocsStoreParamsSchema: import("zod").ZodObject<import("zod").objectUtil.extendShape<{
415
+ collection: import("zod").ZodString;
416
+ }, {
417
+ caller: import("zod").ZodUnion<[import("zod").ZodType<Uint8Array<ArrayBufferLike>, import("zod").ZodTypeDef, Uint8Array<ArrayBufferLike>>, import("zod").ZodType<import("@dfinity/principal").Principal, import("zod").ZodTypeDef, import("@dfinity/principal").Principal>]>;
418
+ params: import("zod").ZodObject<{
419
+ matcher: import("zod").ZodOptional<import("zod").ZodObject<{
420
+ key: import("zod").ZodOptional<import("zod").ZodString>;
421
+ description: import("zod").ZodOptional<import("zod").ZodString>;
422
+ created_at: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodObject<{
423
+ equal: import("zod").ZodBigInt;
424
+ }, "strip", import("zod").ZodTypeAny, {
425
+ equal: bigint;
426
+ }, {
427
+ equal: bigint;
428
+ }>, import("zod").ZodObject<{
429
+ greater_than: import("zod").ZodBigInt;
430
+ }, "strip", import("zod").ZodTypeAny, {
431
+ greater_than: bigint;
432
+ }, {
433
+ greater_than: bigint;
434
+ }>, import("zod").ZodObject<{
435
+ less_than: import("zod").ZodBigInt;
436
+ }, "strip", import("zod").ZodTypeAny, {
437
+ less_than: bigint;
438
+ }, {
439
+ less_than: bigint;
440
+ }>, import("zod").ZodObject<{
441
+ between: import("zod").ZodTuple<[import("zod").ZodBigInt, import("zod").ZodBigInt], null>;
442
+ }, "strip", import("zod").ZodTypeAny, {
443
+ between: [bigint, bigint];
444
+ }, {
445
+ between: [bigint, bigint];
446
+ }>]>>;
447
+ updated_at: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodObject<{
448
+ equal: import("zod").ZodBigInt;
449
+ }, "strip", import("zod").ZodTypeAny, {
450
+ equal: bigint;
451
+ }, {
452
+ equal: bigint;
453
+ }>, import("zod").ZodObject<{
454
+ greater_than: import("zod").ZodBigInt;
455
+ }, "strip", import("zod").ZodTypeAny, {
456
+ greater_than: bigint;
457
+ }, {
458
+ greater_than: bigint;
459
+ }>, import("zod").ZodObject<{
460
+ less_than: import("zod").ZodBigInt;
461
+ }, "strip", import("zod").ZodTypeAny, {
462
+ less_than: bigint;
463
+ }, {
464
+ less_than: bigint;
465
+ }>, import("zod").ZodObject<{
466
+ between: import("zod").ZodTuple<[import("zod").ZodBigInt, import("zod").ZodBigInt], null>;
467
+ }, "strip", import("zod").ZodTypeAny, {
468
+ between: [bigint, bigint];
469
+ }, {
470
+ between: [bigint, bigint];
471
+ }>]>>;
472
+ }, "strict", import("zod").ZodTypeAny, {
473
+ description?: string | undefined;
474
+ created_at?: {
475
+ equal: bigint;
476
+ } | {
477
+ greater_than: bigint;
478
+ } | {
479
+ less_than: bigint;
480
+ } | {
481
+ between: [bigint, bigint];
482
+ } | undefined;
483
+ updated_at?: {
484
+ equal: bigint;
485
+ } | {
486
+ greater_than: bigint;
487
+ } | {
488
+ less_than: bigint;
489
+ } | {
490
+ between: [bigint, bigint];
491
+ } | undefined;
492
+ key?: string | undefined;
493
+ }, {
494
+ description?: string | undefined;
495
+ created_at?: {
496
+ equal: bigint;
497
+ } | {
498
+ greater_than: bigint;
499
+ } | {
500
+ less_than: bigint;
501
+ } | {
502
+ between: [bigint, bigint];
503
+ } | undefined;
504
+ updated_at?: {
505
+ equal: bigint;
506
+ } | {
507
+ greater_than: bigint;
508
+ } | {
509
+ less_than: bigint;
510
+ } | {
511
+ between: [bigint, bigint];
512
+ } | undefined;
513
+ key?: string | undefined;
514
+ }>>;
515
+ paginate: import("zod").ZodOptional<import("zod").ZodObject<{
516
+ start_after: import("zod").ZodOptional<import("zod").ZodString>;
517
+ limit: import("zod").ZodOptional<import("zod").ZodBigInt>;
518
+ }, "strict", import("zod").ZodTypeAny, {
519
+ start_after?: string | undefined;
520
+ limit?: bigint | undefined;
521
+ }, {
522
+ start_after?: string | undefined;
523
+ limit?: bigint | undefined;
524
+ }>>;
525
+ order: import("zod").ZodOptional<import("zod").ZodObject<{
526
+ desc: import("zod").ZodBoolean;
527
+ field: import("zod").ZodEnum<["keys", "created_at", "updated_at"]>;
528
+ }, "strict", import("zod").ZodTypeAny, {
529
+ desc: boolean;
530
+ field: "keys" | "created_at" | "updated_at";
531
+ }, {
532
+ desc: boolean;
533
+ field: "keys" | "created_at" | "updated_at";
534
+ }>>;
535
+ owner: import("zod").ZodOptional<import("zod").ZodType<Uint8Array<ArrayBufferLike>, import("zod").ZodTypeDef, Uint8Array<ArrayBufferLike>>>;
536
+ }, "strict", import("zod").ZodTypeAny, {
537
+ owner?: Uint8Array<ArrayBufferLike> | undefined;
538
+ matcher?: {
539
+ description?: string | undefined;
540
+ created_at?: {
541
+ equal: bigint;
542
+ } | {
543
+ greater_than: bigint;
544
+ } | {
545
+ less_than: bigint;
546
+ } | {
547
+ between: [bigint, bigint];
548
+ } | undefined;
549
+ updated_at?: {
550
+ equal: bigint;
551
+ } | {
552
+ greater_than: bigint;
553
+ } | {
554
+ less_than: bigint;
555
+ } | {
556
+ between: [bigint, bigint];
557
+ } | undefined;
558
+ key?: string | undefined;
559
+ } | undefined;
560
+ paginate?: {
561
+ start_after?: string | undefined;
562
+ limit?: bigint | undefined;
563
+ } | undefined;
564
+ order?: {
565
+ desc: boolean;
566
+ field: "keys" | "created_at" | "updated_at";
567
+ } | undefined;
568
+ }, {
569
+ owner?: Uint8Array<ArrayBufferLike> | undefined;
570
+ matcher?: {
571
+ description?: string | undefined;
572
+ created_at?: {
573
+ equal: bigint;
574
+ } | {
575
+ greater_than: bigint;
576
+ } | {
577
+ less_than: bigint;
578
+ } | {
579
+ between: [bigint, bigint];
580
+ } | undefined;
581
+ updated_at?: {
582
+ equal: bigint;
583
+ } | {
584
+ greater_than: bigint;
585
+ } | {
586
+ less_than: bigint;
587
+ } | {
588
+ between: [bigint, bigint];
589
+ } | undefined;
590
+ key?: string | undefined;
591
+ } | undefined;
592
+ paginate?: {
593
+ start_after?: string | undefined;
594
+ limit?: bigint | undefined;
595
+ } | undefined;
596
+ order?: {
597
+ desc: boolean;
598
+ field: "keys" | "created_at" | "updated_at";
599
+ } | undefined;
600
+ }>;
601
+ }>, "strict", import("zod").ZodTypeAny, {
602
+ params: {
603
+ owner?: Uint8Array<ArrayBufferLike> | undefined;
604
+ matcher?: {
605
+ description?: string | undefined;
606
+ created_at?: {
607
+ equal: bigint;
608
+ } | {
609
+ greater_than: bigint;
610
+ } | {
611
+ less_than: bigint;
612
+ } | {
613
+ between: [bigint, bigint];
614
+ } | undefined;
615
+ updated_at?: {
616
+ equal: bigint;
617
+ } | {
618
+ greater_than: bigint;
619
+ } | {
620
+ less_than: bigint;
621
+ } | {
622
+ between: [bigint, bigint];
623
+ } | undefined;
624
+ key?: string | undefined;
625
+ } | undefined;
626
+ paginate?: {
627
+ start_after?: string | undefined;
628
+ limit?: bigint | undefined;
629
+ } | undefined;
630
+ order?: {
631
+ desc: boolean;
632
+ field: "keys" | "created_at" | "updated_at";
633
+ } | undefined;
634
+ };
635
+ caller: Uint8Array<ArrayBufferLike> | import("@dfinity/principal").Principal;
636
+ collection: string;
637
+ }, {
638
+ params: {
639
+ owner?: Uint8Array<ArrayBufferLike> | undefined;
640
+ matcher?: {
641
+ description?: string | undefined;
642
+ created_at?: {
643
+ equal: bigint;
644
+ } | {
645
+ greater_than: bigint;
646
+ } | {
647
+ less_than: bigint;
648
+ } | {
649
+ between: [bigint, bigint];
650
+ } | undefined;
651
+ updated_at?: {
652
+ equal: bigint;
653
+ } | {
654
+ greater_than: bigint;
655
+ } | {
656
+ less_than: bigint;
657
+ } | {
658
+ between: [bigint, bigint];
659
+ } | undefined;
660
+ key?: string | undefined;
661
+ } | undefined;
662
+ paginate?: {
663
+ start_after?: string | undefined;
664
+ limit?: bigint | undefined;
665
+ } | undefined;
666
+ order?: {
667
+ desc: boolean;
668
+ field: "keys" | "created_at" | "updated_at";
669
+ } | undefined;
670
+ };
671
+ caller: Uint8Array<ArrayBufferLike> | import("@dfinity/principal").Principal;
672
+ collection: string;
673
+ }>;
674
+ /**
675
+ * The parameters required to list documents from the datastore.
676
+ */
677
+ export type ListDocsStoreParams = ListStoreParams;
678
+ /**
679
+ * @see DeleteDocsStoreParams
680
+ */
681
+ export declare const DeleteDocsStoreParamsSchema: import("zod").ZodObject<{
682
+ collection: import("zod").ZodString;
683
+ }, "strict", import("zod").ZodTypeAny, {
684
+ collection: string;
685
+ }, {
686
+ collection: string;
687
+ }>;
688
+ /**
689
+ * The parameters required to delete the documents from a collection of the datastore.
690
+ */
691
+ export type DeleteDocsStoreParams = CollectionParams;
692
+ /**
693
+ * @see DeleteFilteredDocsParams
694
+ */
695
+ export declare const DeleteFilteredDocsStoreParamsSchema: import("zod").ZodObject<import("zod").objectUtil.extendShape<{
696
+ collection: import("zod").ZodString;
697
+ }, {
698
+ caller: import("zod").ZodUnion<[import("zod").ZodType<Uint8Array<ArrayBufferLike>, import("zod").ZodTypeDef, Uint8Array<ArrayBufferLike>>, import("zod").ZodType<import("@dfinity/principal").Principal, import("zod").ZodTypeDef, import("@dfinity/principal").Principal>]>;
699
+ params: import("zod").ZodObject<{
700
+ matcher: import("zod").ZodOptional<import("zod").ZodObject<{
701
+ key: import("zod").ZodOptional<import("zod").ZodString>;
702
+ description: import("zod").ZodOptional<import("zod").ZodString>;
703
+ created_at: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodObject<{
704
+ equal: import("zod").ZodBigInt;
705
+ }, "strip", import("zod").ZodTypeAny, {
706
+ equal: bigint;
707
+ }, {
708
+ equal: bigint;
709
+ }>, import("zod").ZodObject<{
710
+ greater_than: import("zod").ZodBigInt;
711
+ }, "strip", import("zod").ZodTypeAny, {
712
+ greater_than: bigint;
713
+ }, {
714
+ greater_than: bigint;
715
+ }>, import("zod").ZodObject<{
716
+ less_than: import("zod").ZodBigInt;
717
+ }, "strip", import("zod").ZodTypeAny, {
718
+ less_than: bigint;
719
+ }, {
720
+ less_than: bigint;
721
+ }>, import("zod").ZodObject<{
722
+ between: import("zod").ZodTuple<[import("zod").ZodBigInt, import("zod").ZodBigInt], null>;
723
+ }, "strip", import("zod").ZodTypeAny, {
724
+ between: [bigint, bigint];
725
+ }, {
726
+ between: [bigint, bigint];
727
+ }>]>>;
728
+ updated_at: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodObject<{
729
+ equal: import("zod").ZodBigInt;
730
+ }, "strip", import("zod").ZodTypeAny, {
731
+ equal: bigint;
732
+ }, {
733
+ equal: bigint;
734
+ }>, import("zod").ZodObject<{
735
+ greater_than: import("zod").ZodBigInt;
736
+ }, "strip", import("zod").ZodTypeAny, {
737
+ greater_than: bigint;
738
+ }, {
739
+ greater_than: bigint;
740
+ }>, import("zod").ZodObject<{
741
+ less_than: import("zod").ZodBigInt;
742
+ }, "strip", import("zod").ZodTypeAny, {
743
+ less_than: bigint;
744
+ }, {
745
+ less_than: bigint;
746
+ }>, import("zod").ZodObject<{
747
+ between: import("zod").ZodTuple<[import("zod").ZodBigInt, import("zod").ZodBigInt], null>;
748
+ }, "strip", import("zod").ZodTypeAny, {
749
+ between: [bigint, bigint];
750
+ }, {
751
+ between: [bigint, bigint];
752
+ }>]>>;
753
+ }, "strict", import("zod").ZodTypeAny, {
754
+ description?: string | undefined;
755
+ created_at?: {
756
+ equal: bigint;
757
+ } | {
758
+ greater_than: bigint;
759
+ } | {
760
+ less_than: bigint;
761
+ } | {
762
+ between: [bigint, bigint];
763
+ } | undefined;
764
+ updated_at?: {
765
+ equal: bigint;
766
+ } | {
767
+ greater_than: bigint;
768
+ } | {
769
+ less_than: bigint;
770
+ } | {
771
+ between: [bigint, bigint];
772
+ } | undefined;
773
+ key?: string | undefined;
774
+ }, {
775
+ description?: string | undefined;
776
+ created_at?: {
777
+ equal: bigint;
778
+ } | {
779
+ greater_than: bigint;
780
+ } | {
781
+ less_than: bigint;
782
+ } | {
783
+ between: [bigint, bigint];
784
+ } | undefined;
785
+ updated_at?: {
786
+ equal: bigint;
787
+ } | {
788
+ greater_than: bigint;
789
+ } | {
790
+ less_than: bigint;
791
+ } | {
792
+ between: [bigint, bigint];
793
+ } | undefined;
794
+ key?: string | undefined;
795
+ }>>;
796
+ paginate: import("zod").ZodOptional<import("zod").ZodObject<{
797
+ start_after: import("zod").ZodOptional<import("zod").ZodString>;
798
+ limit: import("zod").ZodOptional<import("zod").ZodBigInt>;
799
+ }, "strict", import("zod").ZodTypeAny, {
800
+ start_after?: string | undefined;
801
+ limit?: bigint | undefined;
802
+ }, {
803
+ start_after?: string | undefined;
804
+ limit?: bigint | undefined;
805
+ }>>;
806
+ order: import("zod").ZodOptional<import("zod").ZodObject<{
807
+ desc: import("zod").ZodBoolean;
808
+ field: import("zod").ZodEnum<["keys", "created_at", "updated_at"]>;
809
+ }, "strict", import("zod").ZodTypeAny, {
810
+ desc: boolean;
811
+ field: "keys" | "created_at" | "updated_at";
812
+ }, {
813
+ desc: boolean;
814
+ field: "keys" | "created_at" | "updated_at";
815
+ }>>;
816
+ owner: import("zod").ZodOptional<import("zod").ZodType<Uint8Array<ArrayBufferLike>, import("zod").ZodTypeDef, Uint8Array<ArrayBufferLike>>>;
817
+ }, "strict", import("zod").ZodTypeAny, {
818
+ owner?: Uint8Array<ArrayBufferLike> | undefined;
819
+ matcher?: {
820
+ description?: string | undefined;
821
+ created_at?: {
822
+ equal: bigint;
823
+ } | {
824
+ greater_than: bigint;
825
+ } | {
826
+ less_than: bigint;
827
+ } | {
828
+ between: [bigint, bigint];
829
+ } | undefined;
830
+ updated_at?: {
831
+ equal: bigint;
832
+ } | {
833
+ greater_than: bigint;
834
+ } | {
835
+ less_than: bigint;
836
+ } | {
837
+ between: [bigint, bigint];
838
+ } | undefined;
839
+ key?: string | undefined;
840
+ } | undefined;
841
+ paginate?: {
842
+ start_after?: string | undefined;
843
+ limit?: bigint | undefined;
844
+ } | undefined;
845
+ order?: {
846
+ desc: boolean;
847
+ field: "keys" | "created_at" | "updated_at";
848
+ } | undefined;
849
+ }, {
850
+ owner?: Uint8Array<ArrayBufferLike> | undefined;
851
+ matcher?: {
852
+ description?: string | undefined;
853
+ created_at?: {
854
+ equal: bigint;
855
+ } | {
856
+ greater_than: bigint;
857
+ } | {
858
+ less_than: bigint;
859
+ } | {
860
+ between: [bigint, bigint];
861
+ } | undefined;
862
+ updated_at?: {
863
+ equal: bigint;
864
+ } | {
865
+ greater_than: bigint;
866
+ } | {
867
+ less_than: bigint;
868
+ } | {
869
+ between: [bigint, bigint];
870
+ } | undefined;
871
+ key?: string | undefined;
872
+ } | undefined;
873
+ paginate?: {
874
+ start_after?: string | undefined;
875
+ limit?: bigint | undefined;
876
+ } | undefined;
877
+ order?: {
878
+ desc: boolean;
879
+ field: "keys" | "created_at" | "updated_at";
880
+ } | undefined;
881
+ }>;
882
+ }>, "strict", import("zod").ZodTypeAny, {
883
+ params: {
884
+ owner?: Uint8Array<ArrayBufferLike> | undefined;
885
+ matcher?: {
886
+ description?: string | undefined;
887
+ created_at?: {
888
+ equal: bigint;
889
+ } | {
890
+ greater_than: bigint;
891
+ } | {
892
+ less_than: bigint;
893
+ } | {
894
+ between: [bigint, bigint];
895
+ } | undefined;
896
+ updated_at?: {
897
+ equal: bigint;
898
+ } | {
899
+ greater_than: bigint;
900
+ } | {
901
+ less_than: bigint;
902
+ } | {
903
+ between: [bigint, bigint];
904
+ } | undefined;
905
+ key?: string | undefined;
906
+ } | undefined;
907
+ paginate?: {
908
+ start_after?: string | undefined;
909
+ limit?: bigint | undefined;
910
+ } | undefined;
911
+ order?: {
912
+ desc: boolean;
913
+ field: "keys" | "created_at" | "updated_at";
914
+ } | undefined;
915
+ };
916
+ caller: Uint8Array<ArrayBufferLike> | import("@dfinity/principal").Principal;
917
+ collection: string;
918
+ }, {
919
+ params: {
920
+ owner?: Uint8Array<ArrayBufferLike> | undefined;
921
+ matcher?: {
922
+ description?: string | undefined;
923
+ created_at?: {
924
+ equal: bigint;
925
+ } | {
926
+ greater_than: bigint;
927
+ } | {
928
+ less_than: bigint;
929
+ } | {
930
+ between: [bigint, bigint];
931
+ } | undefined;
932
+ updated_at?: {
933
+ equal: bigint;
934
+ } | {
935
+ greater_than: bigint;
936
+ } | {
937
+ less_than: bigint;
938
+ } | {
939
+ between: [bigint, bigint];
940
+ } | undefined;
941
+ key?: string | undefined;
942
+ } | undefined;
943
+ paginate?: {
944
+ start_after?: string | undefined;
945
+ limit?: bigint | undefined;
946
+ } | undefined;
947
+ order?: {
948
+ desc: boolean;
949
+ field: "keys" | "created_at" | "updated_at";
950
+ } | undefined;
951
+ };
952
+ caller: Uint8Array<ArrayBufferLike> | import("@dfinity/principal").Principal;
953
+ collection: string;
954
+ }>;
955
+ /**
956
+ * The parameters required to delete documents from the datastore.
957
+ */
958
+ export type DeleteFilteredDocsStoreParams = ListStoreParams;