@aeriajs/builtins 0.0.14 → 0.0.15
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/dist/collections/file/index.d.ts +354 -105
- package/dist/collections/log/index.d.ts +44 -188
- package/dist/collections/resourceUsage/index.d.ts +18 -2
- package/dist/collections/user/index.d.ts +860 -378
- package/dist/index.d.ts +1436 -833
- package/package.json +2 -2
|
@@ -28,7 +28,7 @@ export declare const tempFile: Omit<import("@aeriajs/types").Collection<{
|
|
|
28
28
|
};
|
|
29
29
|
};
|
|
30
30
|
};
|
|
31
|
-
}>, "description" | "functions" | "item"> & {
|
|
31
|
+
}>, "description" | "functions" | "item" | "accessControl" | "functionContracts"> & {
|
|
32
32
|
item: import("@aeriajs/types").SchemaWithId<{
|
|
33
33
|
readonly $id: "tempFile";
|
|
34
34
|
readonly temporary: {
|
|
@@ -86,7 +86,38 @@ export declare const tempFile: Omit<import("@aeriajs/types").Collection<{
|
|
|
86
86
|
};
|
|
87
87
|
};
|
|
88
88
|
functions: {};
|
|
89
|
-
functionContracts: {}
|
|
89
|
+
functionContracts: Partial<{}>;
|
|
90
|
+
accessControl: import("@aeriajs/types").AccessControl | import("@aeriajs/types").AccessControl<{
|
|
91
|
+
description: {
|
|
92
|
+
readonly $id: "tempFile";
|
|
93
|
+
readonly temporary: {
|
|
94
|
+
readonly index: "created_at";
|
|
95
|
+
readonly expireAfterSeconds: 3600;
|
|
96
|
+
};
|
|
97
|
+
readonly properties: {
|
|
98
|
+
readonly created_at: {
|
|
99
|
+
readonly type: "string";
|
|
100
|
+
readonly format: "date-time";
|
|
101
|
+
};
|
|
102
|
+
readonly absolute_path: {
|
|
103
|
+
readonly type: "string";
|
|
104
|
+
};
|
|
105
|
+
readonly size: {
|
|
106
|
+
readonly type: "number";
|
|
107
|
+
};
|
|
108
|
+
readonly mime: {
|
|
109
|
+
readonly type: "number";
|
|
110
|
+
};
|
|
111
|
+
readonly collection: {
|
|
112
|
+
readonly type: "string";
|
|
113
|
+
};
|
|
114
|
+
readonly filename: {
|
|
115
|
+
readonly type: "string";
|
|
116
|
+
};
|
|
117
|
+
};
|
|
118
|
+
};
|
|
119
|
+
functions: any;
|
|
120
|
+
}> | undefined;
|
|
90
121
|
};
|
|
91
122
|
export declare const file: Omit<import("@aeriajs/types").Collection<{
|
|
92
123
|
description: {
|
|
@@ -140,7 +171,165 @@ export declare const file: Omit<import("@aeriajs/types").Collection<{
|
|
|
140
171
|
};
|
|
141
172
|
};
|
|
142
173
|
functions: {
|
|
143
|
-
readonly get: (payload: import("@aeriajs/types").GetPayload<import("@aeriajs/types").SchemaWithId<
|
|
174
|
+
readonly get: <TContext extends import("@aeriajs/types").Context, TDocument = import("@aeriajs/types").SchemaWithId<TContext["description"]>>(payload: import("@aeriajs/types").GetPayload<import("@aeriajs/types").SchemaWithId<TContext["description"]>>, context: TContext extends import("@aeriajs/types").Context<any> ? TContext : never, options?: import("@aeriajs/api").GetOptions | undefined) => Promise<TDocument | null>;
|
|
175
|
+
readonly insert: (payload: {
|
|
176
|
+
what: {
|
|
177
|
+
content: string;
|
|
178
|
+
} & Pick<import("@aeriajs/types").PackReferences<import("@aeriajs/types").SchemaWithId<{
|
|
179
|
+
readonly $id: "file";
|
|
180
|
+
readonly owned: "always";
|
|
181
|
+
readonly presets: readonly ["owned"];
|
|
182
|
+
readonly indexes: readonly ["filename", "link", "mime"];
|
|
183
|
+
readonly properties: {
|
|
184
|
+
readonly mime: {
|
|
185
|
+
readonly type: "string";
|
|
186
|
+
};
|
|
187
|
+
readonly size: {
|
|
188
|
+
readonly type: "number";
|
|
189
|
+
};
|
|
190
|
+
readonly last_modified: {
|
|
191
|
+
readonly type: "string";
|
|
192
|
+
readonly format: "date-time";
|
|
193
|
+
};
|
|
194
|
+
readonly filename: {
|
|
195
|
+
readonly type: "string";
|
|
196
|
+
};
|
|
197
|
+
readonly absolute_path: {
|
|
198
|
+
readonly type: "string";
|
|
199
|
+
};
|
|
200
|
+
readonly relative_path: {
|
|
201
|
+
readonly type: "string";
|
|
202
|
+
};
|
|
203
|
+
readonly immutable: {
|
|
204
|
+
readonly type: "boolean";
|
|
205
|
+
};
|
|
206
|
+
readonly link: {
|
|
207
|
+
readonly getter: (value: any) => Promise<string>;
|
|
208
|
+
};
|
|
209
|
+
readonly download_link: {
|
|
210
|
+
readonly getter: (value: any) => Promise<string>;
|
|
211
|
+
};
|
|
212
|
+
};
|
|
213
|
+
readonly actions: {
|
|
214
|
+
readonly deleteAll: {
|
|
215
|
+
readonly name: "Remover";
|
|
216
|
+
readonly ask: true;
|
|
217
|
+
readonly selection: true;
|
|
218
|
+
};
|
|
219
|
+
};
|
|
220
|
+
readonly individualActions: {
|
|
221
|
+
readonly remove: {
|
|
222
|
+
readonly name: "Remover";
|
|
223
|
+
readonly icon: "trash";
|
|
224
|
+
readonly ask: true;
|
|
225
|
+
};
|
|
226
|
+
};
|
|
227
|
+
}>>, "filename" | "absolute_path" | "_id" | "owner">;
|
|
228
|
+
}, context: import("@aeriajs/types").Context<{
|
|
229
|
+
readonly $id: "file";
|
|
230
|
+
readonly owned: "always";
|
|
231
|
+
readonly presets: readonly ["owned"];
|
|
232
|
+
readonly indexes: readonly ["filename", "link", "mime"];
|
|
233
|
+
readonly properties: {
|
|
234
|
+
readonly mime: {
|
|
235
|
+
readonly type: "string";
|
|
236
|
+
};
|
|
237
|
+
readonly size: {
|
|
238
|
+
readonly type: "number";
|
|
239
|
+
};
|
|
240
|
+
readonly last_modified: {
|
|
241
|
+
readonly type: "string";
|
|
242
|
+
readonly format: "date-time";
|
|
243
|
+
};
|
|
244
|
+
readonly filename: {
|
|
245
|
+
readonly type: "string";
|
|
246
|
+
};
|
|
247
|
+
readonly absolute_path: {
|
|
248
|
+
readonly type: "string";
|
|
249
|
+
};
|
|
250
|
+
readonly relative_path: {
|
|
251
|
+
readonly type: "string";
|
|
252
|
+
};
|
|
253
|
+
readonly immutable: {
|
|
254
|
+
readonly type: "boolean";
|
|
255
|
+
};
|
|
256
|
+
readonly link: {
|
|
257
|
+
readonly getter: (value: any) => Promise<string>;
|
|
258
|
+
};
|
|
259
|
+
readonly download_link: {
|
|
260
|
+
readonly getter: (value: any) => Promise<string>;
|
|
261
|
+
};
|
|
262
|
+
};
|
|
263
|
+
readonly actions: {
|
|
264
|
+
readonly deleteAll: {
|
|
265
|
+
readonly name: "Remover";
|
|
266
|
+
readonly ask: true;
|
|
267
|
+
readonly selection: true;
|
|
268
|
+
};
|
|
269
|
+
};
|
|
270
|
+
readonly individualActions: {
|
|
271
|
+
readonly remove: {
|
|
272
|
+
readonly name: "Remover";
|
|
273
|
+
readonly icon: "trash";
|
|
274
|
+
readonly ask: true;
|
|
275
|
+
};
|
|
276
|
+
};
|
|
277
|
+
}>) => Promise<import("@aeriajs/types").Right<any> | import("@aeriajs/types").Left<import("@aeriajs/types").ACErrors | import("@aeriajs/types").ValidationError>>;
|
|
278
|
+
readonly download: (payload: {
|
|
279
|
+
fileId: string;
|
|
280
|
+
options: readonly ("download" | "picture")[];
|
|
281
|
+
noHeaders?: boolean | undefined;
|
|
282
|
+
}, context: import("@aeriajs/types").Context<{
|
|
283
|
+
readonly $id: "file";
|
|
284
|
+
readonly owned: "always";
|
|
285
|
+
readonly presets: readonly ["owned"];
|
|
286
|
+
readonly indexes: readonly ["filename", "link", "mime"];
|
|
287
|
+
readonly properties: {
|
|
288
|
+
readonly mime: {
|
|
289
|
+
readonly type: "string";
|
|
290
|
+
};
|
|
291
|
+
readonly size: {
|
|
292
|
+
readonly type: "number";
|
|
293
|
+
};
|
|
294
|
+
readonly last_modified: {
|
|
295
|
+
readonly type: "string";
|
|
296
|
+
readonly format: "date-time";
|
|
297
|
+
};
|
|
298
|
+
readonly filename: {
|
|
299
|
+
readonly type: "string";
|
|
300
|
+
};
|
|
301
|
+
readonly absolute_path: {
|
|
302
|
+
readonly type: "string";
|
|
303
|
+
};
|
|
304
|
+
readonly relative_path: {
|
|
305
|
+
readonly type: "string";
|
|
306
|
+
};
|
|
307
|
+
readonly immutable: {
|
|
308
|
+
readonly type: "boolean";
|
|
309
|
+
};
|
|
310
|
+
readonly link: {
|
|
311
|
+
readonly getter: (value: any) => Promise<string>;
|
|
312
|
+
};
|
|
313
|
+
readonly download_link: {
|
|
314
|
+
readonly getter: (value: any) => Promise<string>;
|
|
315
|
+
};
|
|
316
|
+
};
|
|
317
|
+
readonly actions: {
|
|
318
|
+
readonly deleteAll: {
|
|
319
|
+
readonly name: "Remover";
|
|
320
|
+
readonly ask: true;
|
|
321
|
+
readonly selection: true;
|
|
322
|
+
};
|
|
323
|
+
};
|
|
324
|
+
readonly individualActions: {
|
|
325
|
+
readonly remove: {
|
|
326
|
+
readonly name: "Remover";
|
|
327
|
+
readonly icon: "trash";
|
|
328
|
+
readonly ask: true;
|
|
329
|
+
};
|
|
330
|
+
};
|
|
331
|
+
}>) => Promise<import("@aeriajs/types").Left<import("./download.js").FileReadError.DocumentNotFound> | import("@aeriajs/types").Left<import("./download.js").FileReadError.FileNotFound> | import("fs").ReadStream>;
|
|
332
|
+
readonly remove: (payload: import("@aeriajs/types").RemovePayload<import("@aeriajs/types").SchemaWithId<{
|
|
144
333
|
readonly $id: "file";
|
|
145
334
|
readonly owned: "always";
|
|
146
335
|
readonly presets: readonly ["owned"];
|
|
@@ -238,7 +427,8 @@ export declare const file: Omit<import("@aeriajs/types").Collection<{
|
|
|
238
427
|
readonly ask: true;
|
|
239
428
|
};
|
|
240
429
|
};
|
|
241
|
-
}
|
|
430
|
+
}>) => Promise<any>;
|
|
431
|
+
readonly removeAll: (payload: import("@aeriajs/types").RemoveAllPayload, context: import("@aeriajs/types").Context<{
|
|
242
432
|
readonly $id: "file";
|
|
243
433
|
readonly owned: "always";
|
|
244
434
|
readonly presets: readonly ["owned"];
|
|
@@ -287,7 +477,111 @@ export declare const file: Omit<import("@aeriajs/types").Collection<{
|
|
|
287
477
|
readonly ask: true;
|
|
288
478
|
};
|
|
289
479
|
};
|
|
290
|
-
}>
|
|
480
|
+
}>) => Promise<any>;
|
|
481
|
+
};
|
|
482
|
+
}>, "description" | "functions" | "item" | "accessControl" | "functionContracts"> & {
|
|
483
|
+
item: import("@aeriajs/types").SchemaWithId<{
|
|
484
|
+
readonly $id: "file";
|
|
485
|
+
readonly owned: "always";
|
|
486
|
+
readonly presets: readonly ["owned"];
|
|
487
|
+
readonly indexes: readonly ["filename", "link", "mime"];
|
|
488
|
+
readonly properties: {
|
|
489
|
+
readonly mime: {
|
|
490
|
+
readonly type: "string";
|
|
491
|
+
};
|
|
492
|
+
readonly size: {
|
|
493
|
+
readonly type: "number";
|
|
494
|
+
};
|
|
495
|
+
readonly last_modified: {
|
|
496
|
+
readonly type: "string";
|
|
497
|
+
readonly format: "date-time";
|
|
498
|
+
};
|
|
499
|
+
readonly filename: {
|
|
500
|
+
readonly type: "string";
|
|
501
|
+
};
|
|
502
|
+
readonly absolute_path: {
|
|
503
|
+
readonly type: "string";
|
|
504
|
+
};
|
|
505
|
+
readonly relative_path: {
|
|
506
|
+
readonly type: "string";
|
|
507
|
+
};
|
|
508
|
+
readonly immutable: {
|
|
509
|
+
readonly type: "boolean";
|
|
510
|
+
};
|
|
511
|
+
readonly link: {
|
|
512
|
+
readonly getter: (value: any) => Promise<string>;
|
|
513
|
+
};
|
|
514
|
+
readonly download_link: {
|
|
515
|
+
readonly getter: (value: any) => Promise<string>;
|
|
516
|
+
};
|
|
517
|
+
};
|
|
518
|
+
readonly actions: {
|
|
519
|
+
readonly deleteAll: {
|
|
520
|
+
readonly name: "Remover";
|
|
521
|
+
readonly ask: true;
|
|
522
|
+
readonly selection: true;
|
|
523
|
+
};
|
|
524
|
+
};
|
|
525
|
+
readonly individualActions: {
|
|
526
|
+
readonly remove: {
|
|
527
|
+
readonly name: "Remover";
|
|
528
|
+
readonly icon: "trash";
|
|
529
|
+
readonly ask: true;
|
|
530
|
+
};
|
|
531
|
+
};
|
|
532
|
+
}>;
|
|
533
|
+
description: {
|
|
534
|
+
readonly $id: "file";
|
|
535
|
+
readonly owned: "always";
|
|
536
|
+
readonly presets: readonly ["owned"];
|
|
537
|
+
readonly indexes: readonly ["filename", "link", "mime"];
|
|
538
|
+
readonly properties: {
|
|
539
|
+
readonly mime: {
|
|
540
|
+
readonly type: "string";
|
|
541
|
+
};
|
|
542
|
+
readonly size: {
|
|
543
|
+
readonly type: "number";
|
|
544
|
+
};
|
|
545
|
+
readonly last_modified: {
|
|
546
|
+
readonly type: "string";
|
|
547
|
+
readonly format: "date-time";
|
|
548
|
+
};
|
|
549
|
+
readonly filename: {
|
|
550
|
+
readonly type: "string";
|
|
551
|
+
};
|
|
552
|
+
readonly absolute_path: {
|
|
553
|
+
readonly type: "string";
|
|
554
|
+
};
|
|
555
|
+
readonly relative_path: {
|
|
556
|
+
readonly type: "string";
|
|
557
|
+
};
|
|
558
|
+
readonly immutable: {
|
|
559
|
+
readonly type: "boolean";
|
|
560
|
+
};
|
|
561
|
+
readonly link: {
|
|
562
|
+
readonly getter: (value: any) => Promise<string>;
|
|
563
|
+
};
|
|
564
|
+
readonly download_link: {
|
|
565
|
+
readonly getter: (value: any) => Promise<string>;
|
|
566
|
+
};
|
|
567
|
+
};
|
|
568
|
+
readonly actions: {
|
|
569
|
+
readonly deleteAll: {
|
|
570
|
+
readonly name: "Remover";
|
|
571
|
+
readonly ask: true;
|
|
572
|
+
readonly selection: true;
|
|
573
|
+
};
|
|
574
|
+
};
|
|
575
|
+
readonly individualActions: {
|
|
576
|
+
readonly remove: {
|
|
577
|
+
readonly name: "Remover";
|
|
578
|
+
readonly icon: "trash";
|
|
579
|
+
readonly ask: true;
|
|
580
|
+
};
|
|
581
|
+
};
|
|
582
|
+
};
|
|
583
|
+
functions: {
|
|
584
|
+
readonly get: <TContext extends import("@aeriajs/types").Context, TDocument = import("@aeriajs/types").SchemaWithId<TContext["description"]>>(payload: import("@aeriajs/types").GetPayload<import("@aeriajs/types").SchemaWithId<TContext["description"]>>, context: TContext extends import("@aeriajs/types").Context<any> ? TContext : never, options?: import("@aeriajs/api").GetOptions | undefined) => Promise<TDocument | null>;
|
|
291
585
|
readonly insert: (payload: {
|
|
292
586
|
what: {
|
|
293
587
|
content: string;
|
|
@@ -595,109 +889,64 @@ export declare const file: Omit<import("@aeriajs/types").Collection<{
|
|
|
595
889
|
};
|
|
596
890
|
}>) => Promise<any>;
|
|
597
891
|
};
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
readonly
|
|
601
|
-
readonly
|
|
602
|
-
readonly
|
|
603
|
-
readonly
|
|
604
|
-
readonly properties: {
|
|
605
|
-
readonly mime: {
|
|
606
|
-
readonly type: "string";
|
|
607
|
-
};
|
|
608
|
-
readonly size: {
|
|
609
|
-
readonly type: "number";
|
|
610
|
-
};
|
|
611
|
-
readonly last_modified: {
|
|
612
|
-
readonly type: "string";
|
|
613
|
-
readonly format: "date-time";
|
|
614
|
-
};
|
|
615
|
-
readonly filename: {
|
|
616
|
-
readonly type: "string";
|
|
617
|
-
};
|
|
618
|
-
readonly absolute_path: {
|
|
619
|
-
readonly type: "string";
|
|
620
|
-
};
|
|
621
|
-
readonly relative_path: {
|
|
622
|
-
readonly type: "string";
|
|
623
|
-
};
|
|
624
|
-
readonly immutable: {
|
|
625
|
-
readonly type: "boolean";
|
|
626
|
-
};
|
|
627
|
-
readonly link: {
|
|
628
|
-
readonly getter: (value: any) => Promise<string>;
|
|
629
|
-
};
|
|
630
|
-
readonly download_link: {
|
|
631
|
-
readonly getter: (value: any) => Promise<string>;
|
|
632
|
-
};
|
|
633
|
-
};
|
|
634
|
-
readonly actions: {
|
|
635
|
-
readonly deleteAll: {
|
|
636
|
-
readonly name: "Remover";
|
|
637
|
-
readonly ask: true;
|
|
638
|
-
readonly selection: true;
|
|
639
|
-
};
|
|
640
|
-
};
|
|
641
|
-
readonly individualActions: {
|
|
642
|
-
readonly remove: {
|
|
643
|
-
readonly name: "Remover";
|
|
644
|
-
readonly icon: "trash";
|
|
645
|
-
readonly ask: true;
|
|
646
|
-
};
|
|
647
|
-
};
|
|
892
|
+
functionContracts: Partial<{
|
|
893
|
+
readonly get: import("@aeriajs/types").Contract;
|
|
894
|
+
readonly insert: import("@aeriajs/types").Contract;
|
|
895
|
+
readonly download: import("@aeriajs/types").Contract;
|
|
896
|
+
readonly remove: import("@aeriajs/types").Contract;
|
|
897
|
+
readonly removeAll: import("@aeriajs/types").Contract;
|
|
648
898
|
}>;
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
readonly
|
|
656
|
-
readonly
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
readonly
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
readonly
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
readonly
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
readonly
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
readonly
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
readonly
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
readonly
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
readonly
|
|
899
|
+
accessControl: import("@aeriajs/types").AccessControl | import("@aeriajs/types").AccessControl<{
|
|
900
|
+
description: {
|
|
901
|
+
readonly $id: "file";
|
|
902
|
+
readonly owned: "always";
|
|
903
|
+
readonly presets: readonly ["owned"];
|
|
904
|
+
readonly indexes: readonly ["filename", "link", "mime"];
|
|
905
|
+
readonly properties: {
|
|
906
|
+
readonly mime: {
|
|
907
|
+
readonly type: "string";
|
|
908
|
+
};
|
|
909
|
+
readonly size: {
|
|
910
|
+
readonly type: "number";
|
|
911
|
+
};
|
|
912
|
+
readonly last_modified: {
|
|
913
|
+
readonly type: "string";
|
|
914
|
+
readonly format: "date-time";
|
|
915
|
+
};
|
|
916
|
+
readonly filename: {
|
|
917
|
+
readonly type: "string";
|
|
918
|
+
};
|
|
919
|
+
readonly absolute_path: {
|
|
920
|
+
readonly type: "string";
|
|
921
|
+
};
|
|
922
|
+
readonly relative_path: {
|
|
923
|
+
readonly type: "string";
|
|
924
|
+
};
|
|
925
|
+
readonly immutable: {
|
|
926
|
+
readonly type: "boolean";
|
|
927
|
+
};
|
|
928
|
+
readonly link: {
|
|
929
|
+
readonly getter: (value: any) => Promise<string>;
|
|
930
|
+
};
|
|
931
|
+
readonly download_link: {
|
|
932
|
+
readonly getter: (value: any) => Promise<string>;
|
|
933
|
+
};
|
|
682
934
|
};
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
935
|
+
readonly actions: {
|
|
936
|
+
readonly deleteAll: {
|
|
937
|
+
readonly name: "Remover";
|
|
938
|
+
readonly ask: true;
|
|
939
|
+
readonly selection: true;
|
|
940
|
+
};
|
|
689
941
|
};
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
942
|
+
readonly individualActions: {
|
|
943
|
+
readonly remove: {
|
|
944
|
+
readonly name: "Remover";
|
|
945
|
+
readonly icon: "trash";
|
|
946
|
+
readonly ask: true;
|
|
947
|
+
};
|
|
696
948
|
};
|
|
697
949
|
};
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
functionContracts: {
|
|
701
|
-
[x: string]: import("@aeriajs/types").Contract;
|
|
702
|
-
};
|
|
950
|
+
functions: any;
|
|
951
|
+
}> | undefined;
|
|
703
952
|
};
|