@aeriajs/builtins 0.0.14 → 0.0.16

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/index.d.ts CHANGED
@@ -60,154 +60,7 @@ export declare const collections: {
60
60
  };
61
61
  };
62
62
  functions: {
63
- readonly get: (payload: import("@aeriajs/types").GetPayload<import("@aeriajs/types").SchemaWithId<{
64
- readonly $id: "file";
65
- readonly owned: "always";
66
- readonly presets: readonly ["owned"];
67
- readonly indexes: readonly ["filename", "link", "mime"];
68
- readonly properties: {
69
- readonly mime: {
70
- readonly type: "string";
71
- };
72
- readonly size: {
73
- readonly type: "number";
74
- };
75
- readonly last_modified: {
76
- readonly type: "string";
77
- readonly format: "date-time";
78
- };
79
- readonly filename: {
80
- readonly type: "string";
81
- };
82
- readonly absolute_path: {
83
- readonly type: "string";
84
- };
85
- readonly relative_path: {
86
- readonly type: "string";
87
- };
88
- readonly immutable: {
89
- readonly type: "boolean";
90
- };
91
- readonly link: {
92
- readonly getter: (value: any) => Promise<string>;
93
- };
94
- readonly download_link: {
95
- readonly getter: (value: any) => Promise<string>;
96
- };
97
- };
98
- readonly actions: {
99
- readonly deleteAll: {
100
- readonly name: "Remover";
101
- readonly ask: true;
102
- readonly selection: true;
103
- };
104
- };
105
- readonly individualActions: {
106
- readonly remove: {
107
- readonly name: "Remover";
108
- readonly icon: "trash";
109
- readonly ask: true;
110
- };
111
- };
112
- }>>, context: import("@aeriajs/types").Context<{
113
- readonly $id: "file";
114
- readonly owned: "always";
115
- readonly presets: readonly ["owned"];
116
- readonly indexes: readonly ["filename", "link", "mime"];
117
- readonly properties: {
118
- readonly mime: {
119
- readonly type: "string";
120
- };
121
- readonly size: {
122
- readonly type: "number";
123
- };
124
- readonly last_modified: {
125
- readonly type: "string";
126
- readonly format: "date-time";
127
- };
128
- readonly filename: {
129
- readonly type: "string";
130
- };
131
- readonly absolute_path: {
132
- readonly type: "string";
133
- };
134
- readonly relative_path: {
135
- readonly type: "string";
136
- };
137
- readonly immutable: {
138
- readonly type: "boolean";
139
- };
140
- readonly link: {
141
- readonly getter: (value: any) => Promise<string>;
142
- };
143
- readonly download_link: {
144
- readonly getter: (value: any) => Promise<string>;
145
- };
146
- };
147
- readonly actions: {
148
- readonly deleteAll: {
149
- readonly name: "Remover";
150
- readonly ask: true;
151
- readonly selection: true;
152
- };
153
- };
154
- readonly individualActions: {
155
- readonly remove: {
156
- readonly name: "Remover";
157
- readonly icon: "trash";
158
- readonly ask: true;
159
- };
160
- };
161
- }, any>, options?: import("@aeriajs/api").GetOptions | undefined) => Promise<import("@aeriajs/types").SchemaWithId<{
162
- readonly $id: "file";
163
- readonly owned: "always";
164
- readonly presets: readonly ["owned"];
165
- readonly indexes: readonly ["filename", "link", "mime"];
166
- readonly properties: {
167
- readonly mime: {
168
- readonly type: "string";
169
- };
170
- readonly size: {
171
- readonly type: "number";
172
- };
173
- readonly last_modified: {
174
- readonly type: "string";
175
- readonly format: "date-time";
176
- };
177
- readonly filename: {
178
- readonly type: "string";
179
- };
180
- readonly absolute_path: {
181
- readonly type: "string";
182
- };
183
- readonly relative_path: {
184
- readonly type: "string";
185
- };
186
- readonly immutable: {
187
- readonly type: "boolean";
188
- };
189
- readonly link: {
190
- readonly getter: (value: any) => Promise<string>;
191
- };
192
- readonly download_link: {
193
- readonly getter: (value: any) => Promise<string>;
194
- };
195
- };
196
- readonly actions: {
197
- readonly deleteAll: {
198
- readonly name: "Remover";
199
- readonly ask: true;
200
- readonly selection: true;
201
- };
202
- };
203
- readonly individualActions: {
204
- readonly remove: {
205
- readonly name: "Remover";
206
- readonly icon: "trash";
207
- readonly ask: true;
208
- };
209
- };
210
- }> | null>;
63
+ 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>;
211
64
  readonly insert: (payload: {
212
65
  what: {
213
66
  content: string;
@@ -515,7 +368,7 @@ export declare const collections: {
515
368
  };
516
369
  }>) => Promise<any>;
517
370
  };
518
- }>, "description" | "functions" | "item"> & {
371
+ }>, "description" | "functions" | "item" | "accessControl" | "functionContracts"> & {
519
372
  item: import("@aeriajs/types").SchemaWithId<{
520
373
  readonly $id: "file";
521
374
  readonly owned: "always";
@@ -616,28 +469,341 @@ export declare const collections: {
616
469
  };
617
470
  };
618
471
  };
619
- functions: any;
620
- functionContracts: {
621
- [x: string]: import("@aeriajs/types").Contract;
622
- };
623
- };
624
- tempFile: Omit<import("@aeriajs/types").Collection<{
625
- description: {
626
- readonly $id: "tempFile";
627
- readonly temporary: {
628
- readonly index: "created_at";
629
- readonly expireAfterSeconds: 3600;
630
- };
631
- readonly properties: {
632
- readonly created_at: {
633
- readonly type: "string";
634
- readonly format: "date-time";
472
+ functions: {
473
+ 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>;
474
+ readonly insert: (payload: {
475
+ what: {
476
+ content: string;
477
+ } & Pick<import("@aeriajs/types").PackReferences<import("@aeriajs/types").SchemaWithId<{
478
+ readonly $id: "file";
479
+ readonly owned: "always";
480
+ readonly presets: readonly ["owned"];
481
+ readonly indexes: readonly ["filename", "link", "mime"];
482
+ readonly properties: {
483
+ readonly mime: {
484
+ readonly type: "string";
485
+ };
486
+ readonly size: {
487
+ readonly type: "number";
488
+ };
489
+ readonly last_modified: {
490
+ readonly type: "string";
491
+ readonly format: "date-time";
492
+ };
493
+ readonly filename: {
494
+ readonly type: "string";
495
+ };
496
+ readonly absolute_path: {
497
+ readonly type: "string";
498
+ };
499
+ readonly relative_path: {
500
+ readonly type: "string";
501
+ };
502
+ readonly immutable: {
503
+ readonly type: "boolean";
504
+ };
505
+ readonly link: {
506
+ readonly getter: (value: any) => Promise<string>;
507
+ };
508
+ readonly download_link: {
509
+ readonly getter: (value: any) => Promise<string>;
510
+ };
511
+ };
512
+ readonly actions: {
513
+ readonly deleteAll: {
514
+ readonly name: "Remover";
515
+ readonly ask: true;
516
+ readonly selection: true;
517
+ };
518
+ };
519
+ readonly individualActions: {
520
+ readonly remove: {
521
+ readonly name: "Remover";
522
+ readonly icon: "trash";
523
+ readonly ask: true;
524
+ };
525
+ };
526
+ }>>, "filename" | "absolute_path" | "_id" | "owner">;
527
+ }, context: import("@aeriajs/types").Context<{
528
+ readonly $id: "file";
529
+ readonly owned: "always";
530
+ readonly presets: readonly ["owned"];
531
+ readonly indexes: readonly ["filename", "link", "mime"];
532
+ readonly properties: {
533
+ readonly mime: {
534
+ readonly type: "string";
535
+ };
536
+ readonly size: {
537
+ readonly type: "number";
538
+ };
539
+ readonly last_modified: {
540
+ readonly type: "string";
541
+ readonly format: "date-time";
542
+ };
543
+ readonly filename: {
544
+ readonly type: "string";
545
+ };
546
+ readonly absolute_path: {
547
+ readonly type: "string";
548
+ };
549
+ readonly relative_path: {
550
+ readonly type: "string";
551
+ };
552
+ readonly immutable: {
553
+ readonly type: "boolean";
554
+ };
555
+ readonly link: {
556
+ readonly getter: (value: any) => Promise<string>;
557
+ };
558
+ readonly download_link: {
559
+ readonly getter: (value: any) => Promise<string>;
560
+ };
635
561
  };
636
- readonly absolute_path: {
637
- readonly type: "string";
562
+ readonly actions: {
563
+ readonly deleteAll: {
564
+ readonly name: "Remover";
565
+ readonly ask: true;
566
+ readonly selection: true;
567
+ };
638
568
  };
639
- readonly size: {
640
- readonly type: "number";
569
+ readonly individualActions: {
570
+ readonly remove: {
571
+ readonly name: "Remover";
572
+ readonly icon: "trash";
573
+ readonly ask: true;
574
+ };
575
+ };
576
+ }>) => Promise<import("@aeriajs/types").Right<any> | import("@aeriajs/types").Left<import("@aeriajs/types").ACErrors | import("@aeriajs/types").ValidationError>>;
577
+ readonly download: (payload: {
578
+ fileId: string;
579
+ options: readonly ("download" | "picture")[];
580
+ noHeaders?: boolean | undefined;
581
+ }, context: import("@aeriajs/types").Context<{
582
+ readonly $id: "file";
583
+ readonly owned: "always";
584
+ readonly presets: readonly ["owned"];
585
+ readonly indexes: readonly ["filename", "link", "mime"];
586
+ readonly properties: {
587
+ readonly mime: {
588
+ readonly type: "string";
589
+ };
590
+ readonly size: {
591
+ readonly type: "number";
592
+ };
593
+ readonly last_modified: {
594
+ readonly type: "string";
595
+ readonly format: "date-time";
596
+ };
597
+ readonly filename: {
598
+ readonly type: "string";
599
+ };
600
+ readonly absolute_path: {
601
+ readonly type: "string";
602
+ };
603
+ readonly relative_path: {
604
+ readonly type: "string";
605
+ };
606
+ readonly immutable: {
607
+ readonly type: "boolean";
608
+ };
609
+ readonly link: {
610
+ readonly getter: (value: any) => Promise<string>;
611
+ };
612
+ readonly download_link: {
613
+ readonly getter: (value: any) => Promise<string>;
614
+ };
615
+ };
616
+ readonly actions: {
617
+ readonly deleteAll: {
618
+ readonly name: "Remover";
619
+ readonly ask: true;
620
+ readonly selection: true;
621
+ };
622
+ };
623
+ readonly individualActions: {
624
+ readonly remove: {
625
+ readonly name: "Remover";
626
+ readonly icon: "trash";
627
+ readonly ask: true;
628
+ };
629
+ };
630
+ }>) => Promise<import("@aeriajs/types").Left<import("./collections/file/download.js").FileReadError.DocumentNotFound> | import("@aeriajs/types").Left<import("./collections/file/download.js").FileReadError.FileNotFound> | import("fs").ReadStream>;
631
+ readonly remove: (payload: import("@aeriajs/types").RemovePayload<import("@aeriajs/types").SchemaWithId<{
632
+ readonly $id: "file";
633
+ readonly owned: "always";
634
+ readonly presets: readonly ["owned"];
635
+ readonly indexes: readonly ["filename", "link", "mime"];
636
+ readonly properties: {
637
+ readonly mime: {
638
+ readonly type: "string";
639
+ };
640
+ readonly size: {
641
+ readonly type: "number";
642
+ };
643
+ readonly last_modified: {
644
+ readonly type: "string";
645
+ readonly format: "date-time";
646
+ };
647
+ readonly filename: {
648
+ readonly type: "string";
649
+ };
650
+ readonly absolute_path: {
651
+ readonly type: "string";
652
+ };
653
+ readonly relative_path: {
654
+ readonly type: "string";
655
+ };
656
+ readonly immutable: {
657
+ readonly type: "boolean";
658
+ };
659
+ readonly link: {
660
+ readonly getter: (value: any) => Promise<string>;
661
+ };
662
+ readonly download_link: {
663
+ readonly getter: (value: any) => Promise<string>;
664
+ };
665
+ };
666
+ readonly actions: {
667
+ readonly deleteAll: {
668
+ readonly name: "Remover";
669
+ readonly ask: true;
670
+ readonly selection: true;
671
+ };
672
+ };
673
+ readonly individualActions: {
674
+ readonly remove: {
675
+ readonly name: "Remover";
676
+ readonly icon: "trash";
677
+ readonly ask: true;
678
+ };
679
+ };
680
+ }>>, context: import("@aeriajs/types").Context<{
681
+ readonly $id: "file";
682
+ readonly owned: "always";
683
+ readonly presets: readonly ["owned"];
684
+ readonly indexes: readonly ["filename", "link", "mime"];
685
+ readonly properties: {
686
+ readonly mime: {
687
+ readonly type: "string";
688
+ };
689
+ readonly size: {
690
+ readonly type: "number";
691
+ };
692
+ readonly last_modified: {
693
+ readonly type: "string";
694
+ readonly format: "date-time";
695
+ };
696
+ readonly filename: {
697
+ readonly type: "string";
698
+ };
699
+ readonly absolute_path: {
700
+ readonly type: "string";
701
+ };
702
+ readonly relative_path: {
703
+ readonly type: "string";
704
+ };
705
+ readonly immutable: {
706
+ readonly type: "boolean";
707
+ };
708
+ readonly link: {
709
+ readonly getter: (value: any) => Promise<string>;
710
+ };
711
+ readonly download_link: {
712
+ readonly getter: (value: any) => Promise<string>;
713
+ };
714
+ };
715
+ readonly actions: {
716
+ readonly deleteAll: {
717
+ readonly name: "Remover";
718
+ readonly ask: true;
719
+ readonly selection: true;
720
+ };
721
+ };
722
+ readonly individualActions: {
723
+ readonly remove: {
724
+ readonly name: "Remover";
725
+ readonly icon: "trash";
726
+ readonly ask: true;
727
+ };
728
+ };
729
+ }>) => Promise<any>;
730
+ readonly removeAll: (payload: import("@aeriajs/types").RemoveAllPayload, context: import("@aeriajs/types").Context<{
731
+ readonly $id: "file";
732
+ readonly owned: "always";
733
+ readonly presets: readonly ["owned"];
734
+ readonly indexes: readonly ["filename", "link", "mime"];
735
+ readonly properties: {
736
+ readonly mime: {
737
+ readonly type: "string";
738
+ };
739
+ readonly size: {
740
+ readonly type: "number";
741
+ };
742
+ readonly last_modified: {
743
+ readonly type: "string";
744
+ readonly format: "date-time";
745
+ };
746
+ readonly filename: {
747
+ readonly type: "string";
748
+ };
749
+ readonly absolute_path: {
750
+ readonly type: "string";
751
+ };
752
+ readonly relative_path: {
753
+ readonly type: "string";
754
+ };
755
+ readonly immutable: {
756
+ readonly type: "boolean";
757
+ };
758
+ readonly link: {
759
+ readonly getter: (value: any) => Promise<string>;
760
+ };
761
+ readonly download_link: {
762
+ readonly getter: (value: any) => Promise<string>;
763
+ };
764
+ };
765
+ readonly actions: {
766
+ readonly deleteAll: {
767
+ readonly name: "Remover";
768
+ readonly ask: true;
769
+ readonly selection: true;
770
+ };
771
+ };
772
+ readonly individualActions: {
773
+ readonly remove: {
774
+ readonly name: "Remover";
775
+ readonly icon: "trash";
776
+ readonly ask: true;
777
+ };
778
+ };
779
+ }>) => Promise<any>;
780
+ };
781
+ functionContracts: Partial<{
782
+ readonly get: import("@aeriajs/types").Contract;
783
+ readonly insert: import("@aeriajs/types").Contract;
784
+ readonly download: import("@aeriajs/types").Contract;
785
+ readonly remove: import("@aeriajs/types").Contract;
786
+ readonly removeAll: import("@aeriajs/types").Contract;
787
+ }>;
788
+ accessControl: import("@aeriajs/types").AccessControl;
789
+ };
790
+ tempFile: Omit<import("@aeriajs/types").Collection<{
791
+ description: {
792
+ readonly $id: "tempFile";
793
+ readonly temporary: {
794
+ readonly index: "created_at";
795
+ readonly expireAfterSeconds: 3600;
796
+ };
797
+ readonly properties: {
798
+ readonly created_at: {
799
+ readonly type: "string";
800
+ readonly format: "date-time";
801
+ };
802
+ readonly absolute_path: {
803
+ readonly type: "string";
804
+ };
805
+ readonly size: {
806
+ readonly type: "number";
641
807
  };
642
808
  readonly mime: {
643
809
  readonly type: "number";
@@ -650,7 +816,7 @@ export declare const collections: {
650
816
  };
651
817
  };
652
818
  };
653
- }>, "description" | "functions" | "item"> & {
819
+ }>, "description" | "functions" | "item" | "accessControl" | "functionContracts"> & {
654
820
  item: import("@aeriajs/types").SchemaWithId<{
655
821
  readonly $id: "tempFile";
656
822
  readonly temporary: {
@@ -708,7 +874,8 @@ export declare const collections: {
708
874
  };
709
875
  };
710
876
  functions: {};
711
- functionContracts: {};
877
+ functionContracts: Partial<{}>;
878
+ accessControl: import("@aeriajs/types").AccessControl;
712
879
  };
713
880
  log: Omit<import("@aeriajs/types").Collection<{
714
881
  description: {
@@ -739,193 +906,11 @@ export declare const collections: {
739
906
  readonly filters: readonly ["context", "message", "owner"];
740
907
  };
741
908
  functions: {
742
- readonly get: (payload: import("@aeriajs/types").GetPayload<import("@aeriajs/types").SchemaWithId<{
743
- readonly $id: "log";
744
- readonly required: readonly ["context", "message"];
745
- readonly properties: {
746
- readonly owner: {
747
- readonly $ref: "user";
748
- readonly noForm: true;
749
- };
750
- readonly context: {
751
- readonly type: "string";
752
- };
753
- readonly message: {
754
- readonly type: "string";
755
- };
756
- readonly details: {
757
- readonly type: "object";
758
- readonly variable: true;
759
- };
760
- readonly created_at: {
761
- readonly type: "string";
762
- readonly format: "date-time";
763
- };
764
- };
765
- readonly icon: "magnifying-glass";
766
- readonly presets: readonly ["view"];
767
- readonly filters: readonly ["context", "message", "owner"];
768
- }>>, context: import("@aeriajs/types").Context<{
769
- readonly $id: "log";
770
- readonly required: readonly ["context", "message"];
771
- readonly properties: {
772
- readonly owner: {
773
- readonly $ref: "user";
774
- readonly noForm: true;
775
- };
776
- readonly context: {
777
- readonly type: "string";
778
- };
779
- readonly message: {
780
- readonly type: "string";
781
- };
782
- readonly details: {
783
- readonly type: "object";
784
- readonly variable: true;
785
- };
786
- readonly created_at: {
787
- readonly type: "string";
788
- readonly format: "date-time";
789
- };
790
- };
791
- readonly icon: "magnifying-glass";
792
- readonly presets: readonly ["view"];
793
- readonly filters: readonly ["context", "message", "owner"];
794
- }, {}>, options?: import("@aeriajs/api").GetOptions | undefined) => Promise<import("@aeriajs/types").SchemaWithId<{
795
- readonly $id: "log";
796
- readonly required: readonly ["context", "message"];
797
- readonly properties: {
798
- readonly owner: {
799
- readonly $ref: "user";
800
- readonly noForm: true;
801
- };
802
- readonly context: {
803
- readonly type: "string";
804
- };
805
- readonly message: {
806
- readonly type: "string";
807
- };
808
- readonly details: {
809
- readonly type: "object";
810
- readonly variable: true;
811
- };
812
- readonly created_at: {
813
- readonly type: "string";
814
- readonly format: "date-time";
815
- };
816
- };
817
- readonly icon: "magnifying-glass";
818
- readonly presets: readonly ["view"];
819
- readonly filters: readonly ["context", "message", "owner"];
820
- }> | null>;
821
- readonly getAll: (_payload: import("@aeriajs/types").GetAllPayload<import("@aeriajs/types").SchemaWithId<any>> | undefined, context: import("@aeriajs/types").Context<{
822
- readonly $id: "log";
823
- readonly required: readonly ["context", "message"];
824
- readonly properties: {
825
- readonly owner: {
826
- readonly $ref: "user";
827
- readonly noForm: true;
828
- };
829
- readonly context: {
830
- readonly type: "string";
831
- };
832
- readonly message: {
833
- readonly type: "string";
834
- };
835
- readonly details: {
836
- readonly type: "object";
837
- readonly variable: true;
838
- };
839
- readonly created_at: {
840
- readonly type: "string";
841
- readonly format: "date-time";
842
- };
843
- };
844
- readonly icon: "magnifying-glass";
845
- readonly presets: readonly ["view"];
846
- readonly filters: readonly ["context", "message", "owner"];
847
- }, {}>, options?: import("@aeriajs/api").GetAllOptions | undefined) => Promise<import("@aeriajs/types").SchemaWithId<{
848
- readonly $id: "log";
849
- readonly required: readonly ["context", "message"];
850
- readonly properties: {
851
- readonly owner: {
852
- readonly $ref: "user";
853
- readonly noForm: true;
854
- };
855
- readonly context: {
856
- readonly type: "string";
857
- };
858
- readonly message: {
859
- readonly type: "string";
860
- };
861
- readonly details: {
862
- readonly type: "object";
863
- readonly variable: true;
864
- };
865
- readonly created_at: {
866
- readonly type: "string";
867
- readonly format: "date-time";
868
- };
869
- };
870
- readonly icon: "magnifying-glass";
871
- readonly presets: readonly ["view"];
872
- readonly filters: readonly ["context", "message", "owner"];
873
- }>[]>;
874
- readonly insert: (payload: import("@aeriajs/types").InsertPayload<import("@aeriajs/types").SchemaWithId<{
875
- readonly $id: "log";
876
- readonly required: readonly ["context", "message"];
877
- readonly properties: {
878
- readonly owner: {
879
- readonly $ref: "user";
880
- readonly noForm: true;
881
- };
882
- readonly context: {
883
- readonly type: "string";
884
- };
885
- readonly message: {
886
- readonly type: "string";
887
- };
888
- readonly details: {
889
- readonly type: "object";
890
- readonly variable: true;
891
- };
892
- readonly created_at: {
893
- readonly type: "string";
894
- readonly format: "date-time";
895
- };
896
- };
897
- readonly icon: "magnifying-glass";
898
- readonly presets: readonly ["view"];
899
- readonly filters: readonly ["context", "message", "owner"];
900
- }>>, context: import("@aeriajs/types").Context<{
901
- readonly $id: "log";
902
- readonly required: readonly ["context", "message"];
903
- readonly properties: {
904
- readonly owner: {
905
- readonly $ref: "user";
906
- readonly noForm: true;
907
- };
908
- readonly context: {
909
- readonly type: "string";
910
- };
911
- readonly message: {
912
- readonly type: "string";
913
- };
914
- readonly details: {
915
- readonly type: "object";
916
- readonly variable: true;
917
- };
918
- readonly created_at: {
919
- readonly type: "string";
920
- readonly format: "date-time";
921
- };
922
- };
923
- readonly icon: "magnifying-glass";
924
- readonly presets: readonly ["view"];
925
- readonly filters: readonly ["context", "message", "owner"];
926
- }, {}>, options?: import("@aeriajs/api").InsertOptions | undefined) => Promise<import("@aeriajs/types").Right<any> | import("@aeriajs/types").Left<import("@aeriajs/types").ACErrors | import("@aeriajs/types").ValidationError>>;
909
+ 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>;
910
+ readonly getAll: <TContext_1 extends import("@aeriajs/types").Context, TDocument_1 = import("@aeriajs/types").SchemaWithId<TContext_1["description"]>>(_payload: import("@aeriajs/types").GetAllPayload<import("@aeriajs/types").SchemaWithId<any>> | undefined, context: TContext_1, options?: import("@aeriajs/api").GetAllOptions | undefined) => Promise<TDocument_1[]>;
911
+ readonly insert: <TContext_2 extends import("@aeriajs/types").Context, TDocument_2 = import("@aeriajs/types").SchemaWithId<TContext_2["description"]>>(payload: import("@aeriajs/types").InsertPayload<import("@aeriajs/types").SchemaWithId<TContext_2["description"]>>, context: TContext_2, options?: import("@aeriajs/api").InsertOptions | undefined) => Promise<import("@aeriajs/types").Right<any> | import("@aeriajs/types").Left<import("@aeriajs/types").ACErrors | import("@aeriajs/types").ValidationError>>;
927
912
  };
928
- }>, "description" | "functions" | "item"> & {
913
+ }>, "description" | "functions" | "item" | "accessControl" | "functionContracts"> & {
929
914
  item: import("@aeriajs/types").SchemaWithId<{
930
915
  readonly $id: "log";
931
916
  readonly required: readonly ["context", "message"];
@@ -980,8 +965,17 @@ export declare const collections: {
980
965
  readonly presets: readonly ["view"];
981
966
  readonly filters: readonly ["context", "message", "owner"];
982
967
  };
983
- functions: {};
984
- functionContracts: {};
968
+ functions: {
969
+ 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>;
970
+ readonly getAll: <TContext_1 extends import("@aeriajs/types").Context, TDocument_1 = import("@aeriajs/types").SchemaWithId<TContext_1["description"]>>(_payload: import("@aeriajs/types").GetAllPayload<import("@aeriajs/types").SchemaWithId<any>> | undefined, context: TContext_1, options?: import("@aeriajs/api").GetAllOptions | undefined) => Promise<TDocument_1[]>;
971
+ readonly insert: <TContext_2 extends import("@aeriajs/types").Context, TDocument_2 = import("@aeriajs/types").SchemaWithId<TContext_2["description"]>>(payload: import("@aeriajs/types").InsertPayload<import("@aeriajs/types").SchemaWithId<TContext_2["description"]>>, context: TContext_2, options?: import("@aeriajs/api").InsertOptions | undefined) => Promise<import("@aeriajs/types").Right<any> | import("@aeriajs/types").Left<import("@aeriajs/types").ACErrors | import("@aeriajs/types").ValidationError>>;
972
+ };
973
+ functionContracts: Partial<{
974
+ readonly get: import("@aeriajs/types").Contract;
975
+ readonly getAll: import("@aeriajs/types").Contract;
976
+ readonly insert: import("@aeriajs/types").Contract;
977
+ }>;
978
+ accessControl: import("@aeriajs/types").AccessControl;
985
979
  };
986
980
  resourceUsage: Omit<import("@aeriajs/types").Collection<{
987
981
  description: {
@@ -997,7 +991,7 @@ export declare const collections: {
997
991
  };
998
992
  };
999
993
  };
1000
- }>, "description" | "functions" | "item"> & {
994
+ }>, "description" | "functions" | "item" | "accessControl" | "functionContracts"> & {
1001
995
  item: import("@aeriajs/types").SchemaWithId<{
1002
996
  readonly $id: "resourceUsage";
1003
997
  readonly required: readonly [];
@@ -1025,9 +1019,10 @@ export declare const collections: {
1025
1019
  };
1026
1020
  };
1027
1021
  functions: {};
1028
- functionContracts: {};
1022
+ functionContracts: Partial<{}>;
1023
+ accessControl: import("@aeriajs/types").AccessControl;
1029
1024
  };
1030
- user: {
1025
+ user: Omit<import("@aeriajs/types").Collection<{
1031
1026
  description: {
1032
1027
  readonly $id: "user";
1033
1028
  readonly required: readonly ["name", "roles", "email"];
@@ -1128,7 +1123,120 @@ export declare const collections: {
1128
1123
  };
1129
1124
  };
1130
1125
  functions: {
1131
- readonly get: (payload: import("@aeriajs/types").GetPayload<import("@aeriajs/types").SchemaWithId<{
1126
+ 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>;
1127
+ readonly getAll: <TContext_1 extends import("@aeriajs/types").Context, TDocument_1 = import("@aeriajs/types").SchemaWithId<TContext_1["description"]>>(_payload: import("@aeriajs/types").GetAllPayload<import("@aeriajs/types").SchemaWithId<any>> | undefined, context: TContext_1, options?: import("@aeriajs/api").GetAllOptions | undefined) => Promise<TDocument_1[]>;
1128
+ readonly remove: <TContext_3 extends import("@aeriajs/types").Context>(payload: import("@aeriajs/types").RemovePayload<import("@aeriajs/types").SchemaWithId<TContext_3["description"]>>, context: TContext_3) => Promise<any>;
1129
+ readonly upload: <TContext_4 extends import("@aeriajs/types").Context>(_props: unknown, context: TContext_4) => Promise<import("@aeriajs/types").Left<import("@aeriajs/types").ValidationError | import("@aeriajs/types").PropertyValidationError> | {
1130
+ tempId: any;
1131
+ }>;
1132
+ readonly removeFile: <TContext_5 extends import("@aeriajs/types").Context>(payload: import("@aeriajs/types").RemoveFilePayload, context: TContext_5) => Promise<any>;
1133
+ readonly insert: (payload: {
1134
+ what: Omit<import("@aeriajs/types").PackReferences<import("@aeriajs/types").SchemaWithId<{
1135
+ readonly $id: "user";
1136
+ readonly required: readonly ["name", "roles", "email"];
1137
+ readonly form: readonly ["name", "active", "roles", "email", "phone_number", "picture_file"];
1138
+ readonly indexes: readonly ["name"];
1139
+ readonly freshItem: {
1140
+ readonly active: true;
1141
+ };
1142
+ readonly properties: {
1143
+ readonly name: {
1144
+ readonly type: "string";
1145
+ };
1146
+ readonly given_name: {
1147
+ readonly getter: (document: any) => string;
1148
+ };
1149
+ readonly family_name: {
1150
+ readonly getter: (document: any) => string;
1151
+ };
1152
+ readonly active: {
1153
+ readonly type: "boolean";
1154
+ };
1155
+ readonly roles: {
1156
+ readonly type: "array";
1157
+ readonly items: {
1158
+ readonly type: "string";
1159
+ };
1160
+ readonly uniqueItems: true;
1161
+ };
1162
+ readonly email: {
1163
+ readonly type: "string";
1164
+ readonly inputType: "email";
1165
+ readonly unique: true;
1166
+ };
1167
+ readonly password: {
1168
+ readonly type: "string";
1169
+ readonly inputType: "password";
1170
+ readonly hidden: true;
1171
+ };
1172
+ readonly phone_number: {
1173
+ readonly type: "string";
1174
+ readonly mask: "(##) #####-####";
1175
+ };
1176
+ readonly picture_file: {
1177
+ readonly $ref: "file";
1178
+ readonly accept: readonly ["image/*"];
1179
+ };
1180
+ readonly picture: {
1181
+ readonly getter: (value: any) => any;
1182
+ };
1183
+ readonly group: {
1184
+ readonly type: "string";
1185
+ };
1186
+ readonly self_registered: {
1187
+ readonly type: "boolean";
1188
+ readonly readOnly: true;
1189
+ };
1190
+ readonly updated_at: {
1191
+ readonly type: "string";
1192
+ readonly format: "date-time";
1193
+ };
1194
+ };
1195
+ readonly presets: readonly ["crud", "view", "duplicate"];
1196
+ readonly layout: {
1197
+ readonly name: "grid";
1198
+ readonly options: {
1199
+ readonly title: "name";
1200
+ readonly badge: "roles";
1201
+ readonly picture: "picture_file";
1202
+ readonly information: "email";
1203
+ readonly active: "active";
1204
+ readonly translateBadge: true;
1205
+ };
1206
+ };
1207
+ readonly individualActions: {
1208
+ readonly 'ui:spawnEdit': {
1209
+ readonly name: "Editar";
1210
+ readonly icon: "pencil";
1211
+ };
1212
+ readonly 'route:/dashboard/user/changepass': {
1213
+ readonly name: "Mudar senha";
1214
+ readonly icon: "key";
1215
+ readonly fetchItem: true;
1216
+ };
1217
+ };
1218
+ readonly icon: "users";
1219
+ readonly filters: readonly ["name", "roles", "email", "phone_number"];
1220
+ readonly table: readonly ["name", "roles", "picture_file", "active", "updated_at"];
1221
+ readonly tableMeta: readonly ["email"];
1222
+ readonly formLayout: {
1223
+ readonly fields: {
1224
+ readonly given_name: {
1225
+ readonly span: 3;
1226
+ };
1227
+ readonly family_name: {
1228
+ readonly span: 3;
1229
+ };
1230
+ };
1231
+ };
1232
+ }>>, "roles">;
1233
+ }, context: import("@aeriajs/types").Context) => Promise<import("@aeriajs/types").Right<any> | import("@aeriajs/types").Left<import("@aeriajs/types").ACErrors | import("@aeriajs/types").ValidationError>>;
1234
+ readonly authenticate: (props: {
1235
+ email: string;
1236
+ password: string;
1237
+ } | {
1238
+ revalidate: true;
1239
+ }, context: import("@aeriajs/types").Context<{
1132
1240
  readonly $id: "user";
1133
1241
  readonly required: readonly ["name", "roles", "email"];
1134
1242
  readonly form: readonly ["name", "active", "roles", "email", "phone_number", "picture_file"];
@@ -1226,204 +1334,116 @@ export declare const collections: {
1226
1334
  };
1227
1335
  };
1228
1336
  };
1229
- }>>, context: import("@aeriajs/types").Context<{
1230
- readonly $id: "user";
1231
- readonly required: readonly ["name", "roles", "email"];
1232
- readonly form: readonly ["name", "active", "roles", "email", "phone_number", "picture_file"];
1233
- readonly indexes: readonly ["name"];
1234
- readonly freshItem: {
1235
- readonly active: true;
1236
- };
1237
- readonly properties: {
1238
- readonly name: {
1239
- readonly type: "string";
1240
- };
1241
- readonly given_name: {
1242
- readonly getter: (document: any) => string;
1243
- };
1244
- readonly family_name: {
1245
- readonly getter: (document: any) => string;
1246
- };
1247
- readonly active: {
1248
- readonly type: "boolean";
1337
+ }>) => Promise<import("@aeriajs/types").Right<{
1338
+ user: Pick<import("@aeriajs/types").SchemaWithId<{
1339
+ readonly $id: "user";
1340
+ readonly required: readonly ["name", "roles", "email"];
1341
+ readonly form: readonly ["name", "active", "roles", "email", "phone_number", "picture_file"];
1342
+ readonly indexes: readonly ["name"];
1343
+ readonly freshItem: {
1344
+ readonly active: true;
1249
1345
  };
1250
- readonly roles: {
1251
- readonly type: "array";
1252
- readonly items: {
1346
+ readonly properties: {
1347
+ readonly name: {
1253
1348
  readonly type: "string";
1254
1349
  };
1255
- readonly uniqueItems: true;
1256
- };
1257
- readonly email: {
1258
- readonly type: "string";
1259
- readonly inputType: "email";
1260
- readonly unique: true;
1261
- };
1262
- readonly password: {
1263
- readonly type: "string";
1264
- readonly inputType: "password";
1265
- readonly hidden: true;
1266
- };
1267
- readonly phone_number: {
1268
- readonly type: "string";
1269
- readonly mask: "(##) #####-####";
1270
- };
1271
- readonly picture_file: {
1272
- readonly $ref: "file";
1273
- readonly accept: readonly ["image/*"];
1274
- };
1275
- readonly picture: {
1276
- readonly getter: (value: any) => any;
1277
- };
1278
- readonly group: {
1279
- readonly type: "string";
1280
- };
1281
- readonly self_registered: {
1282
- readonly type: "boolean";
1283
- readonly readOnly: true;
1284
- };
1285
- readonly updated_at: {
1286
- readonly type: "string";
1287
- readonly format: "date-time";
1288
- };
1289
- };
1290
- readonly presets: readonly ["crud", "view", "duplicate"];
1291
- readonly layout: {
1292
- readonly name: "grid";
1293
- readonly options: {
1294
- readonly title: "name";
1295
- readonly badge: "roles";
1296
- readonly picture: "picture_file";
1297
- readonly information: "email";
1298
- readonly active: "active";
1299
- readonly translateBadge: true;
1300
- };
1301
- };
1302
- readonly individualActions: {
1303
- readonly 'ui:spawnEdit': {
1304
- readonly name: "Editar";
1305
- readonly icon: "pencil";
1306
- };
1307
- readonly 'route:/dashboard/user/changepass': {
1308
- readonly name: "Mudar senha";
1309
- readonly icon: "key";
1310
- readonly fetchItem: true;
1311
- };
1312
- };
1313
- readonly icon: "users";
1314
- readonly filters: readonly ["name", "roles", "email", "phone_number"];
1315
- readonly table: readonly ["name", "roles", "picture_file", "active", "updated_at"];
1316
- readonly tableMeta: readonly ["email"];
1317
- readonly formLayout: {
1318
- readonly fields: {
1319
1350
  readonly given_name: {
1320
- readonly span: 3;
1351
+ readonly getter: (document: any) => string;
1321
1352
  };
1322
1353
  readonly family_name: {
1323
- readonly span: 3;
1354
+ readonly getter: (document: any) => string;
1324
1355
  };
1325
- };
1326
- };
1327
- }, any>, options?: import("@aeriajs/api").GetOptions | undefined) => Promise<import("@aeriajs/types").SchemaWithId<{
1328
- readonly $id: "user";
1329
- readonly required: readonly ["name", "roles", "email"];
1330
- readonly form: readonly ["name", "active", "roles", "email", "phone_number", "picture_file"];
1331
- readonly indexes: readonly ["name"];
1332
- readonly freshItem: {
1333
- readonly active: true;
1334
- };
1335
- readonly properties: {
1336
- readonly name: {
1337
- readonly type: "string";
1338
- };
1339
- readonly given_name: {
1340
- readonly getter: (document: any) => string;
1341
- };
1342
- readonly family_name: {
1343
- readonly getter: (document: any) => string;
1344
- };
1345
- readonly active: {
1346
- readonly type: "boolean";
1347
- };
1348
- readonly roles: {
1349
- readonly type: "array";
1350
- readonly items: {
1356
+ readonly active: {
1357
+ readonly type: "boolean";
1358
+ };
1359
+ readonly roles: {
1360
+ readonly type: "array";
1361
+ readonly items: {
1362
+ readonly type: "string";
1363
+ };
1364
+ readonly uniqueItems: true;
1365
+ };
1366
+ readonly email: {
1351
1367
  readonly type: "string";
1368
+ readonly inputType: "email";
1369
+ readonly unique: true;
1370
+ };
1371
+ readonly password: {
1372
+ readonly type: "string";
1373
+ readonly inputType: "password";
1374
+ readonly hidden: true;
1375
+ };
1376
+ readonly phone_number: {
1377
+ readonly type: "string";
1378
+ readonly mask: "(##) #####-####";
1379
+ };
1380
+ readonly picture_file: {
1381
+ readonly $ref: "file";
1382
+ readonly accept: readonly ["image/*"];
1383
+ };
1384
+ readonly picture: {
1385
+ readonly getter: (value: any) => any;
1386
+ };
1387
+ readonly group: {
1388
+ readonly type: "string";
1389
+ };
1390
+ readonly self_registered: {
1391
+ readonly type: "boolean";
1392
+ readonly readOnly: true;
1393
+ };
1394
+ readonly updated_at: {
1395
+ readonly type: "string";
1396
+ readonly format: "date-time";
1352
1397
  };
1353
- readonly uniqueItems: true;
1354
- };
1355
- readonly email: {
1356
- readonly type: "string";
1357
- readonly inputType: "email";
1358
- readonly unique: true;
1359
- };
1360
- readonly password: {
1361
- readonly type: "string";
1362
- readonly inputType: "password";
1363
- readonly hidden: true;
1364
- };
1365
- readonly phone_number: {
1366
- readonly type: "string";
1367
- readonly mask: "(##) #####-####";
1368
- };
1369
- readonly picture_file: {
1370
- readonly $ref: "file";
1371
- readonly accept: readonly ["image/*"];
1372
- };
1373
- readonly picture: {
1374
- readonly getter: (value: any) => any;
1375
- };
1376
- readonly group: {
1377
- readonly type: "string";
1378
- };
1379
- readonly self_registered: {
1380
- readonly type: "boolean";
1381
- readonly readOnly: true;
1382
- };
1383
- readonly updated_at: {
1384
- readonly type: "string";
1385
- readonly format: "date-time";
1386
- };
1387
- };
1388
- readonly presets: readonly ["crud", "view", "duplicate"];
1389
- readonly layout: {
1390
- readonly name: "grid";
1391
- readonly options: {
1392
- readonly title: "name";
1393
- readonly badge: "roles";
1394
- readonly picture: "picture_file";
1395
- readonly information: "email";
1396
- readonly active: "active";
1397
- readonly translateBadge: true;
1398
- };
1399
- };
1400
- readonly individualActions: {
1401
- readonly 'ui:spawnEdit': {
1402
- readonly name: "Editar";
1403
- readonly icon: "pencil";
1404
1398
  };
1405
- readonly 'route:/dashboard/user/changepass': {
1406
- readonly name: "Mudar senha";
1407
- readonly icon: "key";
1408
- readonly fetchItem: true;
1399
+ readonly presets: readonly ["crud", "view", "duplicate"];
1400
+ readonly layout: {
1401
+ readonly name: "grid";
1402
+ readonly options: {
1403
+ readonly title: "name";
1404
+ readonly badge: "roles";
1405
+ readonly picture: "picture_file";
1406
+ readonly information: "email";
1407
+ readonly active: "active";
1408
+ readonly translateBadge: true;
1409
+ };
1409
1410
  };
1410
- };
1411
- readonly icon: "users";
1412
- readonly filters: readonly ["name", "roles", "email", "phone_number"];
1413
- readonly table: readonly ["name", "roles", "picture_file", "active", "updated_at"];
1414
- readonly tableMeta: readonly ["email"];
1415
- readonly formLayout: {
1416
- readonly fields: {
1417
- readonly given_name: {
1418
- readonly span: 3;
1411
+ readonly individualActions: {
1412
+ readonly 'ui:spawnEdit': {
1413
+ readonly name: "Editar";
1414
+ readonly icon: "pencil";
1415
+ };
1416
+ readonly 'route:/dashboard/user/changepass': {
1417
+ readonly name: "Mudar senha";
1418
+ readonly icon: "key";
1419
+ readonly fetchItem: true;
1419
1420
  };
1420
- readonly family_name: {
1421
- readonly span: 3;
1421
+ };
1422
+ readonly icon: "users";
1423
+ readonly filters: readonly ["name", "roles", "email", "phone_number"];
1424
+ readonly table: readonly ["name", "roles", "picture_file", "active", "updated_at"];
1425
+ readonly tableMeta: readonly ["email"];
1426
+ readonly formLayout: {
1427
+ readonly fields: {
1428
+ readonly given_name: {
1429
+ readonly span: 3;
1430
+ };
1431
+ readonly family_name: {
1432
+ readonly span: 3;
1433
+ };
1422
1434
  };
1423
1435
  };
1436
+ }>, "name" | "roles" | "email" | "active"> & {
1437
+ _id: import("bson").ObjectId | null;
1438
+ };
1439
+ token: {
1440
+ type: "bearer";
1441
+ content: string;
1424
1442
  };
1425
- }> | null>;
1426
- readonly getAll: (_payload: import("@aeriajs/types").GetAllPayload<import("@aeriajs/types").SchemaWithId<any>> | undefined, context: import("@aeriajs/types").Context<{
1443
+ }> | import("@aeriajs/types").Left<import("./collections/user/authenticate.js").AuthenticationErrors.Unauthenticated> | import("@aeriajs/types").Left<import("./collections/user/authenticate.js").AuthenticationErrors.InvalidCredentials> | import("@aeriajs/types").Left<import("./collections/user/authenticate.js").AuthenticationErrors.InactiveUser>>;
1444
+ readonly activate: (payload: {
1445
+ password: string;
1446
+ }, context: import("@aeriajs/types").Context<{
1427
1447
  readonly $id: "user";
1428
1448
  readonly required: readonly ["name", "roles", "email"];
1429
1449
  readonly form: readonly ["name", "active", "roles", "email", "phone_number", "picture_file"];
@@ -1521,7 +1541,243 @@ export declare const collections: {
1521
1541
  };
1522
1542
  };
1523
1543
  };
1524
- }, any>, options?: import("@aeriajs/api").GetAllOptions | undefined) => Promise<import("@aeriajs/types").SchemaWithId<{
1544
+ }>) => Promise<import("@aeriajs/types").GenericResponse | import("@aeriajs/types").Left<import("./collections/user/activate.js").ActivationErrors.InvalidLink> | import("@aeriajs/types").Left<import("./collections/user/activate.js").ActivationErrors.UserNotFound> | import("@aeriajs/types").Left<import("./collections/user/activate.js").ActivationErrors.AlreadyActiveUser> | import("@aeriajs/types").Right<true>>;
1545
+ readonly createAccount: (payload: Omit<Pick<{
1546
+ picture_file: import("@aeriajs/types").SchemaWithId<{
1547
+ readonly $id: "file";
1548
+ readonly owned: "always";
1549
+ readonly presets: readonly ["owned"];
1550
+ readonly indexes: readonly ["filename", "link", "mime"];
1551
+ readonly properties: {
1552
+ readonly mime: {
1553
+ readonly type: "string";
1554
+ };
1555
+ readonly size: {
1556
+ readonly type: "number";
1557
+ };
1558
+ readonly last_modified: {
1559
+ readonly type: "string";
1560
+ readonly format: "date-time";
1561
+ };
1562
+ readonly filename: {
1563
+ readonly type: "string";
1564
+ };
1565
+ readonly absolute_path: {
1566
+ readonly type: "string";
1567
+ };
1568
+ readonly relative_path: {
1569
+ readonly type: "string";
1570
+ };
1571
+ readonly immutable: {
1572
+ readonly type: "boolean";
1573
+ };
1574
+ readonly link: {
1575
+ readonly getter: (value: any) => Promise<string>;
1576
+ };
1577
+ readonly download_link: {
1578
+ readonly getter: (value: any) => Promise<string>;
1579
+ };
1580
+ };
1581
+ readonly actions: {
1582
+ readonly deleteAll: {
1583
+ readonly name: "Remover";
1584
+ readonly ask: true;
1585
+ readonly selection: true;
1586
+ };
1587
+ };
1588
+ readonly individualActions: {
1589
+ readonly remove: {
1590
+ readonly name: "Remover";
1591
+ readonly icon: "trash";
1592
+ readonly ask: true;
1593
+ };
1594
+ };
1595
+ }>;
1596
+ } & Omit<Readonly<import("@aeriajs/types").FilterReadonlyProperties<{
1597
+ readonly name: {
1598
+ readonly type: "string";
1599
+ };
1600
+ readonly given_name: {
1601
+ readonly getter: (document: any) => string;
1602
+ };
1603
+ readonly family_name: {
1604
+ readonly getter: (document: any) => string;
1605
+ };
1606
+ readonly active: {
1607
+ readonly type: "boolean";
1608
+ };
1609
+ readonly roles: {
1610
+ readonly type: "array";
1611
+ readonly items: {
1612
+ readonly type: "string";
1613
+ };
1614
+ readonly uniqueItems: true;
1615
+ };
1616
+ readonly email: {
1617
+ readonly type: "string";
1618
+ readonly inputType: "email";
1619
+ readonly unique: true;
1620
+ };
1621
+ readonly password: {
1622
+ readonly type: "string";
1623
+ readonly inputType: "password";
1624
+ readonly hidden: true;
1625
+ };
1626
+ readonly phone_number: {
1627
+ readonly type: "string";
1628
+ readonly mask: "(##) #####-####";
1629
+ };
1630
+ readonly picture_file: {
1631
+ readonly $ref: "file";
1632
+ readonly accept: readonly ["image/*"];
1633
+ };
1634
+ readonly picture: {
1635
+ readonly getter: (value: any) => any;
1636
+ };
1637
+ readonly group: {
1638
+ readonly type: "string";
1639
+ };
1640
+ readonly self_registered: {
1641
+ readonly type: "boolean";
1642
+ readonly readOnly: true;
1643
+ };
1644
+ readonly updated_at: {
1645
+ readonly type: "string";
1646
+ readonly format: "date-time";
1647
+ };
1648
+ }>> & {
1649
+ name: string;
1650
+ password: string;
1651
+ updated_at: Date;
1652
+ roles: string[];
1653
+ email: string;
1654
+ active: boolean;
1655
+ phone_number: string;
1656
+ picture_file: never;
1657
+ given_name: string;
1658
+ family_name: string;
1659
+ picture: any;
1660
+ group: string;
1661
+ }, "picture_file">, "name" | "roles" | "email"> & Partial<{
1662
+ picture_file: import("@aeriajs/types").SchemaWithId<{
1663
+ readonly $id: "file";
1664
+ readonly owned: "always";
1665
+ readonly presets: readonly ["owned"];
1666
+ readonly indexes: readonly ["filename", "link", "mime"];
1667
+ readonly properties: {
1668
+ readonly mime: {
1669
+ readonly type: "string";
1670
+ };
1671
+ readonly size: {
1672
+ readonly type: "number";
1673
+ };
1674
+ readonly last_modified: {
1675
+ readonly type: "string";
1676
+ readonly format: "date-time";
1677
+ };
1678
+ readonly filename: {
1679
+ readonly type: "string";
1680
+ };
1681
+ readonly absolute_path: {
1682
+ readonly type: "string";
1683
+ };
1684
+ readonly relative_path: {
1685
+ readonly type: "string";
1686
+ };
1687
+ readonly immutable: {
1688
+ readonly type: "boolean";
1689
+ };
1690
+ readonly link: {
1691
+ readonly getter: (value: any) => Promise<string>;
1692
+ };
1693
+ readonly download_link: {
1694
+ readonly getter: (value: any) => Promise<string>;
1695
+ };
1696
+ };
1697
+ readonly actions: {
1698
+ readonly deleteAll: {
1699
+ readonly name: "Remover";
1700
+ readonly ask: true;
1701
+ readonly selection: true;
1702
+ };
1703
+ };
1704
+ readonly individualActions: {
1705
+ readonly remove: {
1706
+ readonly name: "Remover";
1707
+ readonly icon: "trash";
1708
+ readonly ask: true;
1709
+ };
1710
+ };
1711
+ }>;
1712
+ } & Omit<Readonly<import("@aeriajs/types").FilterReadonlyProperties<{
1713
+ readonly name: {
1714
+ readonly type: "string";
1715
+ };
1716
+ readonly given_name: {
1717
+ readonly getter: (document: any) => string;
1718
+ };
1719
+ readonly family_name: {
1720
+ readonly getter: (document: any) => string;
1721
+ };
1722
+ readonly active: {
1723
+ readonly type: "boolean";
1724
+ };
1725
+ readonly roles: {
1726
+ readonly type: "array";
1727
+ readonly items: {
1728
+ readonly type: "string";
1729
+ };
1730
+ readonly uniqueItems: true;
1731
+ };
1732
+ readonly email: {
1733
+ readonly type: "string";
1734
+ readonly inputType: "email";
1735
+ readonly unique: true;
1736
+ };
1737
+ readonly password: {
1738
+ readonly type: "string";
1739
+ readonly inputType: "password";
1740
+ readonly hidden: true;
1741
+ };
1742
+ readonly phone_number: {
1743
+ readonly type: "string";
1744
+ readonly mask: "(##) #####-####";
1745
+ };
1746
+ readonly picture_file: {
1747
+ readonly $ref: "file";
1748
+ readonly accept: readonly ["image/*"];
1749
+ };
1750
+ readonly picture: {
1751
+ readonly getter: (value: any) => any;
1752
+ };
1753
+ readonly group: {
1754
+ readonly type: "string";
1755
+ };
1756
+ readonly self_registered: {
1757
+ readonly type: "boolean";
1758
+ readonly readOnly: true;
1759
+ };
1760
+ readonly updated_at: {
1761
+ readonly type: "string";
1762
+ readonly format: "date-time";
1763
+ };
1764
+ }>> & {
1765
+ name: string;
1766
+ password: string;
1767
+ updated_at: Date;
1768
+ roles: string[];
1769
+ email: string;
1770
+ active: boolean;
1771
+ phone_number: string;
1772
+ picture_file: never;
1773
+ given_name: string;
1774
+ family_name: string;
1775
+ picture: any;
1776
+ group: string;
1777
+ }, "picture_file">> & {
1778
+ updated_at?: Date | undefined;
1779
+ created_at?: Date | undefined;
1780
+ }, "roles">, context: import("@aeriajs/types").Context<{
1525
1781
  readonly $id: "user";
1526
1782
  readonly required: readonly ["name", "roles", "email"];
1527
1783
  readonly form: readonly ["name", "active", "roles", "email", "phone_number", "picture_file"];
@@ -1619,8 +1875,7 @@ export declare const collections: {
1619
1875
  };
1620
1876
  };
1621
1877
  };
1622
- }>[]>;
1623
- readonly remove: (payload: import("@aeriajs/types").RemovePayload<import("@aeriajs/types").SchemaWithId<{
1878
+ }>) => Promise<import("@aeriajs/types").Left<import("@aeriajs/types").ValidationError | import("@aeriajs/types").PropertyValidationError> | import("@aeriajs/types").Right<import("mongodb").WithId<Omit<import("@aeriajs/types").PackReferences<import("@aeriajs/types").SchemaWithId<{
1624
1879
  readonly $id: "user";
1625
1880
  readonly required: readonly ["name", "roles", "email"];
1626
1881
  readonly form: readonly ["name", "active", "roles", "email", "phone_number", "picture_file"];
@@ -1718,7 +1973,11 @@ export declare const collections: {
1718
1973
  };
1719
1974
  };
1720
1975
  };
1721
- }>>, context: import("@aeriajs/types").Context<{
1976
+ }>>, "_id">>>>;
1977
+ readonly getInfo: (payload: {
1978
+ userId: string;
1979
+ token: string;
1980
+ }, context: import("@aeriajs/types").Context<{
1722
1981
  readonly $id: "user";
1723
1982
  readonly required: readonly ["name", "roles", "email"];
1724
1983
  readonly form: readonly ["name", "active", "roles", "email", "phone_number", "picture_file"];
@@ -1816,109 +2075,229 @@ export declare const collections: {
1816
2075
  };
1817
2076
  };
1818
2077
  };
1819
- }, any>) => Promise<any>;
1820
- readonly upload: <TContext extends import("@aeriajs/types").Context>(_props: unknown, context: TContext) => Promise<import("@aeriajs/types").Left<import("@aeriajs/types").ValidationError | import("@aeriajs/types").PropertyValidationError> | {
1821
- tempId: any;
1822
- }>;
1823
- readonly removeFile: (payload: import("@aeriajs/types").RemoveFilePayload, context: import("@aeriajs/types").Context<{
1824
- readonly $id: "user";
1825
- readonly required: readonly ["name", "roles", "email"];
1826
- readonly form: readonly ["name", "active", "roles", "email", "phone_number", "picture_file"];
1827
- readonly indexes: readonly ["name"];
1828
- readonly freshItem: {
1829
- readonly active: true;
2078
+ }>) => Promise<import("@aeriajs/types").Left<import("./collections/user/getInfo.js").ActivationErrors.InvalidLink> | import("@aeriajs/types").Left<import("./collections/user/getInfo.js").ActivationErrors.UserNotFound> | import("@aeriajs/types").Left<import("./collections/user/getInfo.js").ActivationErrors.AlreadyActiveUser> | import("@aeriajs/types").Right<{
2079
+ readonly name: string;
2080
+ readonly email: string;
2081
+ }>>;
2082
+ readonly getActivationLink: (userId: import("bson").ObjectId) => Promise<string>;
2083
+ };
2084
+ accessControl: {
2085
+ roles: {
2086
+ root: {
2087
+ grantEverything: true;
1830
2088
  };
1831
- readonly properties: {
1832
- readonly name: {
2089
+ guest: {
2090
+ grant: "authenticate"[];
2091
+ };
2092
+ };
2093
+ };
2094
+ }>, "description" | "functions" | "item" | "accessControl" | "functionContracts"> & {
2095
+ item: import("@aeriajs/types").SchemaWithId<{
2096
+ readonly $id: "user";
2097
+ readonly required: readonly ["name", "roles", "email"];
2098
+ readonly form: readonly ["name", "active", "roles", "email", "phone_number", "picture_file"];
2099
+ readonly indexes: readonly ["name"];
2100
+ readonly freshItem: {
2101
+ readonly active: true;
2102
+ };
2103
+ readonly properties: {
2104
+ readonly name: {
2105
+ readonly type: "string";
2106
+ };
2107
+ readonly given_name: {
2108
+ readonly getter: (document: any) => string;
2109
+ };
2110
+ readonly family_name: {
2111
+ readonly getter: (document: any) => string;
2112
+ };
2113
+ readonly active: {
2114
+ readonly type: "boolean";
2115
+ };
2116
+ readonly roles: {
2117
+ readonly type: "array";
2118
+ readonly items: {
1833
2119
  readonly type: "string";
1834
2120
  };
2121
+ readonly uniqueItems: true;
2122
+ };
2123
+ readonly email: {
2124
+ readonly type: "string";
2125
+ readonly inputType: "email";
2126
+ readonly unique: true;
2127
+ };
2128
+ readonly password: {
2129
+ readonly type: "string";
2130
+ readonly inputType: "password";
2131
+ readonly hidden: true;
2132
+ };
2133
+ readonly phone_number: {
2134
+ readonly type: "string";
2135
+ readonly mask: "(##) #####-####";
2136
+ };
2137
+ readonly picture_file: {
2138
+ readonly $ref: "file";
2139
+ readonly accept: readonly ["image/*"];
2140
+ };
2141
+ readonly picture: {
2142
+ readonly getter: (value: any) => any;
2143
+ };
2144
+ readonly group: {
2145
+ readonly type: "string";
2146
+ };
2147
+ readonly self_registered: {
2148
+ readonly type: "boolean";
2149
+ readonly readOnly: true;
2150
+ };
2151
+ readonly updated_at: {
2152
+ readonly type: "string";
2153
+ readonly format: "date-time";
2154
+ };
2155
+ };
2156
+ readonly presets: readonly ["crud", "view", "duplicate"];
2157
+ readonly layout: {
2158
+ readonly name: "grid";
2159
+ readonly options: {
2160
+ readonly title: "name";
2161
+ readonly badge: "roles";
2162
+ readonly picture: "picture_file";
2163
+ readonly information: "email";
2164
+ readonly active: "active";
2165
+ readonly translateBadge: true;
2166
+ };
2167
+ };
2168
+ readonly individualActions: {
2169
+ readonly 'ui:spawnEdit': {
2170
+ readonly name: "Editar";
2171
+ readonly icon: "pencil";
2172
+ };
2173
+ readonly 'route:/dashboard/user/changepass': {
2174
+ readonly name: "Mudar senha";
2175
+ readonly icon: "key";
2176
+ readonly fetchItem: true;
2177
+ };
2178
+ };
2179
+ readonly icon: "users";
2180
+ readonly filters: readonly ["name", "roles", "email", "phone_number"];
2181
+ readonly table: readonly ["name", "roles", "picture_file", "active", "updated_at"];
2182
+ readonly tableMeta: readonly ["email"];
2183
+ readonly formLayout: {
2184
+ readonly fields: {
1835
2185
  readonly given_name: {
1836
- readonly getter: (document: any) => string;
2186
+ readonly span: 3;
1837
2187
  };
1838
2188
  readonly family_name: {
1839
- readonly getter: (document: any) => string;
1840
- };
1841
- readonly active: {
1842
- readonly type: "boolean";
1843
- };
1844
- readonly roles: {
1845
- readonly type: "array";
1846
- readonly items: {
1847
- readonly type: "string";
1848
- };
1849
- readonly uniqueItems: true;
1850
- };
1851
- readonly email: {
1852
- readonly type: "string";
1853
- readonly inputType: "email";
1854
- readonly unique: true;
1855
- };
1856
- readonly password: {
1857
- readonly type: "string";
1858
- readonly inputType: "password";
1859
- readonly hidden: true;
1860
- };
1861
- readonly phone_number: {
1862
- readonly type: "string";
1863
- readonly mask: "(##) #####-####";
1864
- };
1865
- readonly picture_file: {
1866
- readonly $ref: "file";
1867
- readonly accept: readonly ["image/*"];
1868
- };
1869
- readonly picture: {
1870
- readonly getter: (value: any) => any;
1871
- };
1872
- readonly group: {
1873
- readonly type: "string";
1874
- };
1875
- readonly self_registered: {
1876
- readonly type: "boolean";
1877
- readonly readOnly: true;
2189
+ readonly span: 3;
1878
2190
  };
1879
- readonly updated_at: {
2191
+ };
2192
+ };
2193
+ }>;
2194
+ description: {
2195
+ readonly $id: "user";
2196
+ readonly required: readonly ["name", "roles", "email"];
2197
+ readonly form: readonly ["name", "active", "roles", "email", "phone_number", "picture_file"];
2198
+ readonly indexes: readonly ["name"];
2199
+ readonly freshItem: {
2200
+ readonly active: true;
2201
+ };
2202
+ readonly properties: {
2203
+ readonly name: {
2204
+ readonly type: "string";
2205
+ };
2206
+ readonly given_name: {
2207
+ readonly getter: (document: any) => string;
2208
+ };
2209
+ readonly family_name: {
2210
+ readonly getter: (document: any) => string;
2211
+ };
2212
+ readonly active: {
2213
+ readonly type: "boolean";
2214
+ };
2215
+ readonly roles: {
2216
+ readonly type: "array";
2217
+ readonly items: {
1880
2218
  readonly type: "string";
1881
- readonly format: "date-time";
1882
2219
  };
2220
+ readonly uniqueItems: true;
1883
2221
  };
1884
- readonly presets: readonly ["crud", "view", "duplicate"];
1885
- readonly layout: {
1886
- readonly name: "grid";
1887
- readonly options: {
1888
- readonly title: "name";
1889
- readonly badge: "roles";
1890
- readonly picture: "picture_file";
1891
- readonly information: "email";
1892
- readonly active: "active";
1893
- readonly translateBadge: true;
1894
- };
2222
+ readonly email: {
2223
+ readonly type: "string";
2224
+ readonly inputType: "email";
2225
+ readonly unique: true;
2226
+ };
2227
+ readonly password: {
2228
+ readonly type: "string";
2229
+ readonly inputType: "password";
2230
+ readonly hidden: true;
2231
+ };
2232
+ readonly phone_number: {
2233
+ readonly type: "string";
2234
+ readonly mask: "(##) #####-####";
2235
+ };
2236
+ readonly picture_file: {
2237
+ readonly $ref: "file";
2238
+ readonly accept: readonly ["image/*"];
2239
+ };
2240
+ readonly picture: {
2241
+ readonly getter: (value: any) => any;
2242
+ };
2243
+ readonly group: {
2244
+ readonly type: "string";
2245
+ };
2246
+ readonly self_registered: {
2247
+ readonly type: "boolean";
2248
+ readonly readOnly: true;
2249
+ };
2250
+ readonly updated_at: {
2251
+ readonly type: "string";
2252
+ readonly format: "date-time";
2253
+ };
2254
+ };
2255
+ readonly presets: readonly ["crud", "view", "duplicate"];
2256
+ readonly layout: {
2257
+ readonly name: "grid";
2258
+ readonly options: {
2259
+ readonly title: "name";
2260
+ readonly badge: "roles";
2261
+ readonly picture: "picture_file";
2262
+ readonly information: "email";
2263
+ readonly active: "active";
2264
+ readonly translateBadge: true;
2265
+ };
2266
+ };
2267
+ readonly individualActions: {
2268
+ readonly 'ui:spawnEdit': {
2269
+ readonly name: "Editar";
2270
+ readonly icon: "pencil";
1895
2271
  };
1896
- readonly individualActions: {
1897
- readonly 'ui:spawnEdit': {
1898
- readonly name: "Editar";
1899
- readonly icon: "pencil";
1900
- };
1901
- readonly 'route:/dashboard/user/changepass': {
1902
- readonly name: "Mudar senha";
1903
- readonly icon: "key";
1904
- readonly fetchItem: true;
1905
- };
2272
+ readonly 'route:/dashboard/user/changepass': {
2273
+ readonly name: "Mudar senha";
2274
+ readonly icon: "key";
2275
+ readonly fetchItem: true;
1906
2276
  };
1907
- readonly icon: "users";
1908
- readonly filters: readonly ["name", "roles", "email", "phone_number"];
1909
- readonly table: readonly ["name", "roles", "picture_file", "active", "updated_at"];
1910
- readonly tableMeta: readonly ["email"];
1911
- readonly formLayout: {
1912
- readonly fields: {
1913
- readonly given_name: {
1914
- readonly span: 3;
1915
- };
1916
- readonly family_name: {
1917
- readonly span: 3;
1918
- };
2277
+ };
2278
+ readonly icon: "users";
2279
+ readonly filters: readonly ["name", "roles", "email", "phone_number"];
2280
+ readonly table: readonly ["name", "roles", "picture_file", "active", "updated_at"];
2281
+ readonly tableMeta: readonly ["email"];
2282
+ readonly formLayout: {
2283
+ readonly fields: {
2284
+ readonly given_name: {
2285
+ readonly span: 3;
2286
+ };
2287
+ readonly family_name: {
2288
+ readonly span: 3;
1919
2289
  };
1920
2290
  };
1921
- }, any>) => Promise<any>;
2291
+ };
2292
+ };
2293
+ functions: {
2294
+ 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>;
2295
+ readonly getAll: <TContext_1 extends import("@aeriajs/types").Context, TDocument_1 = import("@aeriajs/types").SchemaWithId<TContext_1["description"]>>(_payload: import("@aeriajs/types").GetAllPayload<import("@aeriajs/types").SchemaWithId<any>> | undefined, context: TContext_1, options?: import("@aeriajs/api").GetAllOptions | undefined) => Promise<TDocument_1[]>;
2296
+ readonly remove: <TContext_3 extends import("@aeriajs/types").Context>(payload: import("@aeriajs/types").RemovePayload<import("@aeriajs/types").SchemaWithId<TContext_3["description"]>>, context: TContext_3) => Promise<any>;
2297
+ readonly upload: <TContext_4 extends import("@aeriajs/types").Context>(_props: unknown, context: TContext_4) => Promise<import("@aeriajs/types").Left<import("@aeriajs/types").ValidationError | import("@aeriajs/types").PropertyValidationError> | {
2298
+ tempId: any;
2299
+ }>;
2300
+ readonly removeFile: <TContext_5 extends import("@aeriajs/types").Context>(payload: import("@aeriajs/types").RemoveFilePayload, context: TContext_5) => Promise<any>;
1922
2301
  readonly insert: (payload: {
1923
2302
  what: Omit<import("@aeriajs/types").PackReferences<import("@aeriajs/types").SchemaWithId<{
1924
2303
  readonly $id: "user";
@@ -2870,219 +3249,20 @@ export declare const collections: {
2870
3249
  }>>;
2871
3250
  readonly getActivationLink: (userId: import("bson").ObjectId) => Promise<string>;
2872
3251
  };
2873
- accessControl: {
2874
- roles: {
2875
- root: {
2876
- grantEverything: true;
2877
- };
2878
- guest: {
2879
- grant: "authenticate"[];
2880
- };
2881
- };
2882
- };
2883
- } & {
2884
- item: import("@aeriajs/types").SchemaWithId<{
2885
- readonly $id: "user";
2886
- readonly required: readonly ["name", "roles", "email"];
2887
- readonly form: readonly ["name", "active", "roles", "email", "phone_number", "picture_file"];
2888
- readonly indexes: readonly ["name"];
2889
- readonly freshItem: {
2890
- readonly active: true;
2891
- };
2892
- readonly properties: {
2893
- readonly name: {
2894
- readonly type: "string";
2895
- };
2896
- readonly given_name: {
2897
- readonly getter: (document: any) => string;
2898
- };
2899
- readonly family_name: {
2900
- readonly getter: (document: any) => string;
2901
- };
2902
- readonly active: {
2903
- readonly type: "boolean";
2904
- };
2905
- readonly roles: {
2906
- readonly type: "array";
2907
- readonly items: {
2908
- readonly type: "string";
2909
- };
2910
- readonly uniqueItems: true;
2911
- };
2912
- readonly email: {
2913
- readonly type: "string";
2914
- readonly inputType: "email";
2915
- readonly unique: true;
2916
- };
2917
- readonly password: {
2918
- readonly type: "string";
2919
- readonly inputType: "password";
2920
- readonly hidden: true;
2921
- };
2922
- readonly phone_number: {
2923
- readonly type: "string";
2924
- readonly mask: "(##) #####-####";
2925
- };
2926
- readonly picture_file: {
2927
- readonly $ref: "file";
2928
- readonly accept: readonly ["image/*"];
2929
- };
2930
- readonly picture: {
2931
- readonly getter: (value: any) => any;
2932
- };
2933
- readonly group: {
2934
- readonly type: "string";
2935
- };
2936
- readonly self_registered: {
2937
- readonly type: "boolean";
2938
- readonly readOnly: true;
2939
- };
2940
- readonly updated_at: {
2941
- readonly type: "string";
2942
- readonly format: "date-time";
2943
- };
2944
- };
2945
- readonly presets: readonly ["crud", "view", "duplicate"];
2946
- readonly layout: {
2947
- readonly name: "grid";
2948
- readonly options: {
2949
- readonly title: "name";
2950
- readonly badge: "roles";
2951
- readonly picture: "picture_file";
2952
- readonly information: "email";
2953
- readonly active: "active";
2954
- readonly translateBadge: true;
2955
- };
2956
- };
2957
- readonly individualActions: {
2958
- readonly 'ui:spawnEdit': {
2959
- readonly name: "Editar";
2960
- readonly icon: "pencil";
2961
- };
2962
- readonly 'route:/dashboard/user/changepass': {
2963
- readonly name: "Mudar senha";
2964
- readonly icon: "key";
2965
- readonly fetchItem: true;
2966
- };
2967
- };
2968
- readonly icon: "users";
2969
- readonly filters: readonly ["name", "roles", "email", "phone_number"];
2970
- readonly table: readonly ["name", "roles", "picture_file", "active", "updated_at"];
2971
- readonly tableMeta: readonly ["email"];
2972
- readonly formLayout: {
2973
- readonly fields: {
2974
- readonly given_name: {
2975
- readonly span: 3;
2976
- };
2977
- readonly family_name: {
2978
- readonly span: 3;
2979
- };
2980
- };
2981
- };
3252
+ functionContracts: Partial<{
3253
+ readonly get: import("@aeriajs/types").Contract;
3254
+ readonly getAll: import("@aeriajs/types").Contract;
3255
+ readonly remove: import("@aeriajs/types").Contract;
3256
+ readonly upload: import("@aeriajs/types").Contract;
3257
+ readonly removeFile: import("@aeriajs/types").Contract;
3258
+ readonly insert: import("@aeriajs/types").Contract;
3259
+ readonly authenticate: import("@aeriajs/types").Contract;
3260
+ readonly activate: import("@aeriajs/types").Contract;
3261
+ readonly createAccount: import("@aeriajs/types").Contract;
3262
+ readonly getInfo: import("@aeriajs/types").Contract;
3263
+ readonly getActivationLink: import("@aeriajs/types").Contract;
2982
3264
  }>;
2983
- description: {
2984
- readonly $id: "user";
2985
- readonly required: readonly ["name", "roles", "email"];
2986
- readonly form: readonly ["name", "active", "roles", "email", "phone_number", "picture_file"];
2987
- readonly indexes: readonly ["name"];
2988
- readonly freshItem: {
2989
- readonly active: true;
2990
- };
2991
- readonly properties: {
2992
- readonly name: {
2993
- readonly type: "string";
2994
- };
2995
- readonly given_name: {
2996
- readonly getter: (document: any) => string;
2997
- };
2998
- readonly family_name: {
2999
- readonly getter: (document: any) => string;
3000
- };
3001
- readonly active: {
3002
- readonly type: "boolean";
3003
- };
3004
- readonly roles: {
3005
- readonly type: "array";
3006
- readonly items: {
3007
- readonly type: "string";
3008
- };
3009
- readonly uniqueItems: true;
3010
- };
3011
- readonly email: {
3012
- readonly type: "string";
3013
- readonly inputType: "email";
3014
- readonly unique: true;
3015
- };
3016
- readonly password: {
3017
- readonly type: "string";
3018
- readonly inputType: "password";
3019
- readonly hidden: true;
3020
- };
3021
- readonly phone_number: {
3022
- readonly type: "string";
3023
- readonly mask: "(##) #####-####";
3024
- };
3025
- readonly picture_file: {
3026
- readonly $ref: "file";
3027
- readonly accept: readonly ["image/*"];
3028
- };
3029
- readonly picture: {
3030
- readonly getter: (value: any) => any;
3031
- };
3032
- readonly group: {
3033
- readonly type: "string";
3034
- };
3035
- readonly self_registered: {
3036
- readonly type: "boolean";
3037
- readonly readOnly: true;
3038
- };
3039
- readonly updated_at: {
3040
- readonly type: "string";
3041
- readonly format: "date-time";
3042
- };
3043
- };
3044
- readonly presets: readonly ["crud", "view", "duplicate"];
3045
- readonly layout: {
3046
- readonly name: "grid";
3047
- readonly options: {
3048
- readonly title: "name";
3049
- readonly badge: "roles";
3050
- readonly picture: "picture_file";
3051
- readonly information: "email";
3052
- readonly active: "active";
3053
- readonly translateBadge: true;
3054
- };
3055
- };
3056
- readonly individualActions: {
3057
- readonly 'ui:spawnEdit': {
3058
- readonly name: "Editar";
3059
- readonly icon: "pencil";
3060
- };
3061
- readonly 'route:/dashboard/user/changepass': {
3062
- readonly name: "Mudar senha";
3063
- readonly icon: "key";
3064
- readonly fetchItem: true;
3065
- };
3066
- };
3067
- readonly icon: "users";
3068
- readonly filters: readonly ["name", "roles", "email", "phone_number"];
3069
- readonly table: readonly ["name", "roles", "picture_file", "active", "updated_at"];
3070
- readonly tableMeta: readonly ["email"];
3071
- readonly formLayout: {
3072
- readonly fields: {
3073
- readonly given_name: {
3074
- readonly span: 3;
3075
- };
3076
- readonly family_name: {
3077
- readonly span: 3;
3078
- };
3079
- };
3080
- };
3081
- };
3082
- functions: any;
3083
- functionContracts: {
3084
- [x: string]: import("@aeriajs/types").Contract;
3085
- };
3265
+ accessControl: import("@aeriajs/types").AccessControl;
3086
3266
  };
3087
3267
  };
3088
3268
  export type { File, TempFile, Log, ResourceUsage, User, };