@aeriajs/builtins 0.0.116 → 0.0.118

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,6 +1,8 @@
1
+ import { description } from './description.js';
1
2
  export declare const user: {
2
3
  description: {
3
4
  readonly $id: "user";
5
+ readonly icon: "users";
4
6
  readonly required: readonly ["name", "roles", "email"];
5
7
  readonly form: readonly ["name", "active", "roles", "email", "phone_number", "picture_file"];
6
8
  readonly indexes: readonly ["name"];
@@ -86,7 +88,6 @@ export declare const user: {
86
88
  readonly translate: true;
87
89
  };
88
90
  };
89
- readonly icon: "users";
90
91
  readonly filters: readonly ["name", "roles", "email", "phone_number"];
91
92
  readonly table: readonly ["name", "roles", "picture_file", "active", "updated_at"];
92
93
  readonly tableMeta: readonly ["email"];
@@ -102,8 +103,8 @@ export declare const user: {
102
103
  };
103
104
  };
104
105
  functions: {
105
- readonly get: (payload: import("@aeriajs/types").GetPayload<import("@aeriajs/types").SchemaWithId<any>>, context: import("@aeriajs/types").StrictContext<any>, options?: import("@aeriajs/core").GetOptions | undefined) => Promise<import("@aeriajs/types").GetReturnType<any>>;
106
- readonly getAll: (_payload: import("@aeriajs/types").GetAllPayload<import("@aeriajs/types").SchemaWithId<any>> | undefined, context: import("@aeriajs/types").StrictContext<any>, options?: import("@aeriajs/core").GetAllOptions | undefined) => Promise<{
106
+ readonly get: (payload: import("@aeriajs/types").GetPayload<import("@aeriajs/types").SchemaWithId<any>>, context: import("@aeriajs/types").StrictContext<any>, options?: import("@aeriajs/core").GetOptions) => Promise<import("@aeriajs/types").GetReturnType<any>>;
107
+ readonly getAll: (_payload: import("@aeriajs/types").GetAllPayload<import("@aeriajs/types").SchemaWithId<any>> | undefined, context: import("@aeriajs/types").StrictContext<any>, options?: import("@aeriajs/core").GetAllOptions) => Promise<{
107
108
  readonly _tag: "Result";
108
109
  readonly error: undefined;
109
110
  readonly result: import("@aeriajs/types").SchemaWithId<any>[];
@@ -115,7 +116,7 @@ export declare const user: {
115
116
  }> | {
116
117
  readonly _tag: "Result";
117
118
  readonly error: undefined;
118
- readonly result: import("mongodb").WithId<Omit<import("@aeriajs/types").PackReferences<import("@aeriajs/types").SchemaWithId<import("@aeriajs/types").Description<any>>>, "_id">> | null;
119
+ readonly result: import("mongodb").WithId<Omit<import("@aeriajs/types").PackReferences<import("@aeriajs/types").SchemaWithId<import("@aeriajs/types").Description>>, "_id">> | null;
119
120
  }>;
120
121
  readonly upload: (_props: unknown, context: import("@aeriajs/types").StrictContext<any>) => Promise<import("@aeriajs/types").Result.Error<{
121
122
  readonly code: import("@aeriajs/types").ACError.MalformedInput;
@@ -135,211 +136,10 @@ export declare const user: {
135
136
  readonly result: any;
136
137
  }>;
137
138
  readonly insert: (payload: {
138
- what: Omit<import("@aeriajs/types").PackReferences<import("@aeriajs/types").SchemaWithId<{
139
- readonly $id: "user";
140
- readonly required: readonly ["name", "roles", "email"];
141
- readonly form: readonly ["name", "active", "roles", "email", "phone_number", "picture_file"];
142
- readonly indexes: readonly ["name"];
143
- readonly properties: {
144
- readonly name: {
145
- readonly type: "string";
146
- };
147
- readonly given_name: {
148
- readonly getter: (document: any) => string;
149
- };
150
- readonly family_name: {
151
- readonly getter: (document: any) => string;
152
- };
153
- readonly active: {
154
- readonly type: "boolean";
155
- };
156
- readonly roles: {
157
- readonly type: "array";
158
- readonly items: {
159
- readonly type: "string";
160
- };
161
- readonly uniqueItems: true;
162
- };
163
- readonly email: {
164
- readonly type: "string";
165
- readonly inputType: "email";
166
- readonly unique: true;
167
- };
168
- readonly password: {
169
- readonly type: "string";
170
- readonly inputType: "password";
171
- readonly hidden: true;
172
- };
173
- readonly phone_number: {
174
- readonly type: "string";
175
- readonly mask: "(##) #####-####";
176
- };
177
- readonly picture_file: {
178
- readonly $ref: "file";
179
- readonly accept: readonly ["image/*"];
180
- };
181
- readonly picture: {
182
- readonly getter: (value: any) => any;
183
- };
184
- readonly group: {
185
- readonly type: "string";
186
- };
187
- readonly self_registered: {
188
- readonly type: "boolean";
189
- readonly readOnly: true;
190
- };
191
- readonly updated_at: {
192
- readonly type: "string";
193
- readonly format: "date-time";
194
- };
195
- };
196
- readonly presets: readonly ["crud", "view", "duplicate"];
197
- readonly layout: {
198
- readonly name: "grid";
199
- readonly options: {
200
- readonly title: "name";
201
- readonly badge: "roles";
202
- readonly picture: "picture_file";
203
- readonly information: "email";
204
- readonly active: "active";
205
- };
206
- };
207
- readonly individualActions: {
208
- readonly 'ui:spawnEdit': {
209
- readonly label: "action.edit";
210
- readonly icon: "pencil";
211
- readonly translate: true;
212
- };
213
- readonly 'route:/dashboard/user/changepass': {
214
- readonly label: "change_password";
215
- readonly icon: "key";
216
- readonly fetchItem: true;
217
- readonly translate: true;
218
- };
219
- readonly copyActivationLink: {
220
- readonly label: "copy_activation_link";
221
- readonly icon: "link";
222
- readonly translate: true;
223
- };
224
- };
225
- readonly icon: "users";
226
- readonly filters: readonly ["name", "roles", "email", "phone_number"];
227
- readonly table: readonly ["name", "roles", "picture_file", "active", "updated_at"];
228
- readonly tableMeta: readonly ["email"];
229
- readonly formLayout: {
230
- readonly fields: {
231
- readonly given_name: {
232
- readonly span: 3;
233
- };
234
- readonly family_name: {
235
- readonly span: 3;
236
- };
237
- };
238
- };
239
- }>>, "roles">;
240
- }, context: import("@aeriajs/types").Context<{
139
+ what: Omit<import("@aeriajs/types").PackReferences<import("@aeriajs/types").SchemaWithId<typeof description>>, "roles">;
140
+ }, context: import("@aeriajs/types").Context<typeof description>) => Promise<import("@aeriajs/types").InsertReturnType<import("@aeriajs/types").SchemaWithId<{
241
141
  readonly $id: "user";
242
- readonly required: readonly ["name", "roles", "email"];
243
- readonly form: readonly ["name", "active", "roles", "email", "phone_number", "picture_file"];
244
- readonly indexes: readonly ["name"];
245
- readonly properties: {
246
- readonly name: {
247
- readonly type: "string";
248
- };
249
- readonly given_name: {
250
- readonly getter: (document: any) => string;
251
- };
252
- readonly family_name: {
253
- readonly getter: (document: any) => string;
254
- };
255
- readonly active: {
256
- readonly type: "boolean";
257
- };
258
- readonly roles: {
259
- readonly type: "array";
260
- readonly items: {
261
- readonly type: "string";
262
- };
263
- readonly uniqueItems: true;
264
- };
265
- readonly email: {
266
- readonly type: "string";
267
- readonly inputType: "email";
268
- readonly unique: true;
269
- };
270
- readonly password: {
271
- readonly type: "string";
272
- readonly inputType: "password";
273
- readonly hidden: true;
274
- };
275
- readonly phone_number: {
276
- readonly type: "string";
277
- readonly mask: "(##) #####-####";
278
- };
279
- readonly picture_file: {
280
- readonly $ref: "file";
281
- readonly accept: readonly ["image/*"];
282
- };
283
- readonly picture: {
284
- readonly getter: (value: any) => any;
285
- };
286
- readonly group: {
287
- readonly type: "string";
288
- };
289
- readonly self_registered: {
290
- readonly type: "boolean";
291
- readonly readOnly: true;
292
- };
293
- readonly updated_at: {
294
- readonly type: "string";
295
- readonly format: "date-time";
296
- };
297
- };
298
- readonly presets: readonly ["crud", "view", "duplicate"];
299
- readonly layout: {
300
- readonly name: "grid";
301
- readonly options: {
302
- readonly title: "name";
303
- readonly badge: "roles";
304
- readonly picture: "picture_file";
305
- readonly information: "email";
306
- readonly active: "active";
307
- };
308
- };
309
- readonly individualActions: {
310
- readonly 'ui:spawnEdit': {
311
- readonly label: "action.edit";
312
- readonly icon: "pencil";
313
- readonly translate: true;
314
- };
315
- readonly 'route:/dashboard/user/changepass': {
316
- readonly label: "change_password";
317
- readonly icon: "key";
318
- readonly fetchItem: true;
319
- readonly translate: true;
320
- };
321
- readonly copyActivationLink: {
322
- readonly label: "copy_activation_link";
323
- readonly icon: "link";
324
- readonly translate: true;
325
- };
326
- };
327
142
  readonly icon: "users";
328
- readonly filters: readonly ["name", "roles", "email", "phone_number"];
329
- readonly table: readonly ["name", "roles", "picture_file", "active", "updated_at"];
330
- readonly tableMeta: readonly ["email"];
331
- readonly formLayout: {
332
- readonly fields: {
333
- readonly given_name: {
334
- readonly span: 3;
335
- };
336
- readonly family_name: {
337
- readonly span: 3;
338
- };
339
- };
340
- };
341
- }>) => Promise<import("@aeriajs/types").InsertReturnType<import("@aeriajs/types").SchemaWithId<{
342
- readonly $id: "user";
343
143
  readonly required: readonly ["name", "roles", "email"];
344
144
  readonly form: readonly ["name", "active", "roles", "email", "phone_number", "picture_file"];
345
145
  readonly indexes: readonly ["name"];
@@ -425,7 +225,6 @@ export declare const user: {
425
225
  readonly translate: true;
426
226
  };
427
227
  };
428
- readonly icon: "users";
429
228
  readonly filters: readonly ["name", "roles", "email", "phone_number"];
430
229
  readonly table: readonly ["name", "roles", "picture_file", "active", "updated_at"];
431
230
  readonly tableMeta: readonly ["email"];
@@ -444,1980 +243,52 @@ export declare const user: {
444
243
  email: string;
445
244
  password: string;
446
245
  } | {
447
- token?: import("@aeriajs/types").TokenRecipient | undefined;
246
+ token?: import("@aeriajs/types").TokenRecipient;
448
247
  revalidate: true;
449
- }, context: import("@aeriajs/types").Context<{
450
- readonly $id: "user";
451
- readonly required: readonly ["name", "roles", "email"];
452
- readonly form: readonly ["name", "active", "roles", "email", "phone_number", "picture_file"];
453
- readonly indexes: readonly ["name"];
454
- readonly properties: {
455
- readonly name: {
456
- readonly type: "string";
248
+ }, context: import("@aeriajs/types").Context<typeof description>) => Promise<import("@aeriajs/types").Result.Error<{
249
+ readonly code: import("@aeriajs/types").ACError.AuthorizationError;
250
+ } & {
251
+ httpStatus: import("@aeriajs/types").HTTPStatus.Unauthorized;
252
+ }> | {
253
+ readonly _tag: "Result";
254
+ readonly error: undefined;
255
+ readonly result: {
256
+ user: Pick<import("@aeriajs/types").SchemaWithId<typeof description>, "name" | "email" | "roles" | "active"> & {
257
+ _id: import("@aeriajs/core").ObjectId | null;
457
258
  };
458
- readonly given_name: {
459
- readonly getter: (document: any) => string;
259
+ token: import("@aeriajs/types").TokenRecipient;
260
+ } | {
261
+ user: {
262
+ _id: null;
263
+ name: string;
264
+ email: string;
265
+ roles: string[];
266
+ active: boolean;
460
267
  };
461
- readonly family_name: {
462
- readonly getter: (document: any) => string;
268
+ token: {
269
+ type: string;
270
+ content: string;
463
271
  };
464
- readonly active: {
465
- readonly type: "boolean";
272
+ };
273
+ } | import("@aeriajs/types").Result.Error<{
274
+ readonly code: import("./authenticate.js").AuthenticationError.InvalidCredentials;
275
+ } & {
276
+ httpStatus: import("@aeriajs/types").HTTPStatus.Unauthorized;
277
+ }> | import("@aeriajs/types").Result.Error<{
278
+ readonly code: import("./authenticate.js").AuthenticationError.InactiveUser;
279
+ } & {
280
+ httpStatus: import("@aeriajs/types").HTTPStatus.Unauthorized;
281
+ }>>;
282
+ readonly activate: (payload: {
283
+ password: string;
284
+ }, context: import("@aeriajs/types").Context<typeof description> & {
285
+ request: {
286
+ query: {
287
+ u?: string;
288
+ t?: string;
466
289
  };
467
- readonly roles: {
468
- readonly type: "array";
469
- readonly items: {
470
- readonly type: "string";
471
- };
472
- readonly uniqueItems: true;
473
- };
474
- readonly email: {
475
- readonly type: "string";
476
- readonly inputType: "email";
477
- readonly unique: true;
478
- };
479
- readonly password: {
480
- readonly type: "string";
481
- readonly inputType: "password";
482
- readonly hidden: true;
483
- };
484
- readonly phone_number: {
485
- readonly type: "string";
486
- readonly mask: "(##) #####-####";
487
- };
488
- readonly picture_file: {
489
- readonly $ref: "file";
490
- readonly accept: readonly ["image/*"];
491
- };
492
- readonly picture: {
493
- readonly getter: (value: any) => any;
494
- };
495
- readonly group: {
496
- readonly type: "string";
497
- };
498
- readonly self_registered: {
499
- readonly type: "boolean";
500
- readonly readOnly: true;
501
- };
502
- readonly updated_at: {
503
- readonly type: "string";
504
- readonly format: "date-time";
505
- };
506
- };
507
- readonly presets: readonly ["crud", "view", "duplicate"];
508
- readonly layout: {
509
- readonly name: "grid";
510
- readonly options: {
511
- readonly title: "name";
512
- readonly badge: "roles";
513
- readonly picture: "picture_file";
514
- readonly information: "email";
515
- readonly active: "active";
516
- };
517
- };
518
- readonly individualActions: {
519
- readonly 'ui:spawnEdit': {
520
- readonly label: "action.edit";
521
- readonly icon: "pencil";
522
- readonly translate: true;
523
- };
524
- readonly 'route:/dashboard/user/changepass': {
525
- readonly label: "change_password";
526
- readonly icon: "key";
527
- readonly fetchItem: true;
528
- readonly translate: true;
529
- };
530
- readonly copyActivationLink: {
531
- readonly label: "copy_activation_link";
532
- readonly icon: "link";
533
- readonly translate: true;
534
- };
535
- };
536
- readonly icon: "users";
537
- readonly filters: readonly ["name", "roles", "email", "phone_number"];
538
- readonly table: readonly ["name", "roles", "picture_file", "active", "updated_at"];
539
- readonly tableMeta: readonly ["email"];
540
- readonly formLayout: {
541
- readonly fields: {
542
- readonly given_name: {
543
- readonly span: 3;
544
- };
545
- readonly family_name: {
546
- readonly span: 3;
547
- };
548
- };
549
- };
550
- }>) => Promise<import("@aeriajs/types").Result.Error<{
551
- readonly code: import("@aeriajs/types").ACError.AuthorizationError;
552
- } & {
553
- httpStatus: import("@aeriajs/types").HTTPStatus.Unauthorized;
554
- }> | {
555
- readonly _tag: "Result";
556
- readonly error: undefined;
557
- readonly result: {
558
- user: Pick<import("@aeriajs/types").SchemaWithId<{
559
- readonly $id: "user";
560
- readonly required: readonly ["name", "roles", "email"];
561
- readonly form: readonly ["name", "active", "roles", "email", "phone_number", "picture_file"];
562
- readonly indexes: readonly ["name"];
563
- readonly properties: {
564
- readonly name: {
565
- readonly type: "string";
566
- };
567
- readonly given_name: {
568
- readonly getter: (document: any) => string;
569
- };
570
- readonly family_name: {
571
- readonly getter: (document: any) => string;
572
- };
573
- readonly active: {
574
- readonly type: "boolean";
575
- };
576
- readonly roles: {
577
- readonly type: "array";
578
- readonly items: {
579
- readonly type: "string";
580
- };
581
- readonly uniqueItems: true;
582
- };
583
- readonly email: {
584
- readonly type: "string";
585
- readonly inputType: "email";
586
- readonly unique: true;
587
- };
588
- readonly password: {
589
- readonly type: "string";
590
- readonly inputType: "password";
591
- readonly hidden: true;
592
- };
593
- readonly phone_number: {
594
- readonly type: "string";
595
- readonly mask: "(##) #####-####";
596
- };
597
- readonly picture_file: {
598
- readonly $ref: "file";
599
- readonly accept: readonly ["image/*"];
600
- };
601
- readonly picture: {
602
- readonly getter: (value: any) => any;
603
- };
604
- readonly group: {
605
- readonly type: "string";
606
- };
607
- readonly self_registered: {
608
- readonly type: "boolean";
609
- readonly readOnly: true;
610
- };
611
- readonly updated_at: {
612
- readonly type: "string";
613
- readonly format: "date-time";
614
- };
615
- };
616
- readonly presets: readonly ["crud", "view", "duplicate"];
617
- readonly layout: {
618
- readonly name: "grid";
619
- readonly options: {
620
- readonly title: "name";
621
- readonly badge: "roles";
622
- readonly picture: "picture_file";
623
- readonly information: "email";
624
- readonly active: "active";
625
- };
626
- };
627
- readonly individualActions: {
628
- readonly 'ui:spawnEdit': {
629
- readonly label: "action.edit";
630
- readonly icon: "pencil";
631
- readonly translate: true;
632
- };
633
- readonly 'route:/dashboard/user/changepass': {
634
- readonly label: "change_password";
635
- readonly icon: "key";
636
- readonly fetchItem: true;
637
- readonly translate: true;
638
- };
639
- readonly copyActivationLink: {
640
- readonly label: "copy_activation_link";
641
- readonly icon: "link";
642
- readonly translate: true;
643
- };
644
- };
645
- readonly icon: "users";
646
- readonly filters: readonly ["name", "roles", "email", "phone_number"];
647
- readonly table: readonly ["name", "roles", "picture_file", "active", "updated_at"];
648
- readonly tableMeta: readonly ["email"];
649
- readonly formLayout: {
650
- readonly fields: {
651
- readonly given_name: {
652
- readonly span: 3;
653
- };
654
- readonly family_name: {
655
- readonly span: 3;
656
- };
657
- };
658
- };
659
- }>, "name" | "roles" | "email" | "active"> & {
660
- _id: import("@aeriajs/core").ObjectId | null;
661
- };
662
- token: import("@aeriajs/types").TokenRecipient;
663
- } | {
664
- user: {
665
- _id: null;
666
- name: string;
667
- email: string;
668
- roles: string[];
669
- active: boolean;
670
- };
671
- token: {
672
- type: string;
673
- content: string;
674
- };
675
- };
676
- } | import("@aeriajs/types").Result.Error<{
677
- readonly code: import("./authenticate.js").AuthenticationError.InvalidCredentials;
678
- } & {
679
- httpStatus: import("@aeriajs/types").HTTPStatus.Unauthorized;
680
- }> | import("@aeriajs/types").Result.Error<{
681
- readonly code: import("./authenticate.js").AuthenticationError.InactiveUser;
682
- } & {
683
- httpStatus: import("@aeriajs/types").HTTPStatus.Unauthorized;
684
- }>>;
685
- readonly activate: (payload: {
686
- password: string;
687
- }, context: import("@aeriajs/types").RouteContext<null> & import("@aeriajs/types").CollectionContext<{
688
- readonly $id: "user";
689
- readonly required: readonly ["name", "roles", "email"];
690
- readonly form: readonly ["name", "active", "roles", "email", "phone_number", "picture_file"];
691
- readonly indexes: readonly ["name"];
692
- readonly properties: {
693
- readonly name: {
694
- readonly type: "string";
695
- };
696
- readonly given_name: {
697
- readonly getter: (document: any) => string;
698
- };
699
- readonly family_name: {
700
- readonly getter: (document: any) => string;
701
- };
702
- readonly active: {
703
- readonly type: "boolean";
704
- };
705
- readonly roles: {
706
- readonly type: "array";
707
- readonly items: {
708
- readonly type: "string";
709
- };
710
- readonly uniqueItems: true;
711
- };
712
- readonly email: {
713
- readonly type: "string";
714
- readonly inputType: "email";
715
- readonly unique: true;
716
- };
717
- readonly password: {
718
- readonly type: "string";
719
- readonly inputType: "password";
720
- readonly hidden: true;
721
- };
722
- readonly phone_number: {
723
- readonly type: "string";
724
- readonly mask: "(##) #####-####";
725
- };
726
- readonly picture_file: {
727
- readonly $ref: "file";
728
- readonly accept: readonly ["image/*"];
729
- };
730
- readonly picture: {
731
- readonly getter: (value: any) => any;
732
- };
733
- readonly group: {
734
- readonly type: "string";
735
- };
736
- readonly self_registered: {
737
- readonly type: "boolean";
738
- readonly readOnly: true;
739
- };
740
- readonly updated_at: {
741
- readonly type: "string";
742
- readonly format: "date-time";
743
- };
744
- };
745
- readonly presets: readonly ["crud", "view", "duplicate"];
746
- readonly layout: {
747
- readonly name: "grid";
748
- readonly options: {
749
- readonly title: "name";
750
- readonly badge: "roles";
751
- readonly picture: "picture_file";
752
- readonly information: "email";
753
- readonly active: "active";
754
- };
755
- };
756
- readonly individualActions: {
757
- readonly 'ui:spawnEdit': {
758
- readonly label: "action.edit";
759
- readonly icon: "pencil";
760
- readonly translate: true;
761
- };
762
- readonly 'route:/dashboard/user/changepass': {
763
- readonly label: "change_password";
764
- readonly icon: "key";
765
- readonly fetchItem: true;
766
- readonly translate: true;
767
- };
768
- readonly copyActivationLink: {
769
- readonly label: "copy_activation_link";
770
- readonly icon: "link";
771
- readonly translate: true;
772
- };
773
- };
774
- readonly icon: "users";
775
- readonly filters: readonly ["name", "roles", "email", "phone_number"];
776
- readonly table: readonly ["name", "roles", "picture_file", "active", "updated_at"];
777
- readonly tableMeta: readonly ["email"];
778
- readonly formLayout: {
779
- readonly fields: {
780
- readonly given_name: {
781
- readonly span: 3;
782
- };
783
- readonly family_name: {
784
- readonly span: 3;
785
- };
786
- };
787
- };
788
- }, any> & {
789
- request: {
790
- query: {
791
- u?: string | undefined;
792
- t?: string | undefined;
793
- };
794
- payload: {
795
- password?: string | undefined;
796
- };
797
- };
798
- }) => Promise<import("@aeriajs/types").GenericResponse | import("@aeriajs/types").Result.Error<{
799
- readonly code: import("./activate.js").ActivationError.InvalidLink;
800
- } & {
801
- httpStatus: import("@aeriajs/types").HTTPStatus.NotFound;
802
- }> | import("@aeriajs/types").Result.Error<{
803
- readonly code: import("./activate.js").ActivationError.UserNotFound;
804
- } & {
805
- httpStatus: import("@aeriajs/types").HTTPStatus.NotFound;
806
- }> | import("@aeriajs/types").Result.Error<{
807
- readonly code: import("./activate.js").ActivationError.AlreadyActiveUser;
808
- } & {
809
- httpStatus: import("@aeriajs/types").HTTPStatus.Forbidden;
810
- }> | import("@aeriajs/types").Result.Error<{
811
- readonly code: import("@aeriajs/types").ACError.MalformedInput;
812
- } & {
813
- httpStatus: import("@aeriajs/types").HTTPStatus.UnprocessableContent;
814
- }> | {
815
- readonly _tag: "Result";
816
- readonly error: undefined;
817
- readonly result: {
818
- readonly userId: any;
819
- };
820
- } | undefined>;
821
- readonly createAccount: (payload: Omit<Pick<{
822
- picture_file: import("@aeriajs/types").SchemaWithId<{
823
- readonly $id: "file";
824
- readonly owned: "always";
825
- readonly presets: readonly ["owned"];
826
- readonly indexes: readonly ["name", "link", "type"];
827
- readonly properties: {
828
- readonly type: {
829
- readonly type: "string";
830
- };
831
- readonly size: {
832
- readonly type: "number";
833
- };
834
- readonly last_modified: {
835
- readonly type: "string";
836
- readonly format: "date-time";
837
- };
838
- readonly name: {
839
- readonly type: "string";
840
- };
841
- readonly absolute_path: {
842
- readonly type: "string";
843
- };
844
- readonly relative_path: {
845
- readonly type: "string";
846
- };
847
- readonly immutable: {
848
- readonly type: "boolean";
849
- };
850
- readonly link: {
851
- readonly getter: (value: any) => Promise<string>;
852
- };
853
- readonly download_link: {
854
- readonly getter: (value: any) => Promise<string>;
855
- };
856
- };
857
- readonly actions: {
858
- readonly deleteAll: {
859
- readonly label: "Remover";
860
- readonly ask: true;
861
- readonly selection: true;
862
- };
863
- };
864
- readonly individualActions: {
865
- readonly remove: {
866
- readonly label: "Remover";
867
- readonly icon: "trash";
868
- readonly ask: true;
869
- };
870
- };
871
- }>;
872
- } & Omit<Readonly<import("@aeriajs/types").FilterReadonlyProperties<{
873
- readonly name: {
874
- readonly type: "string";
875
- };
876
- readonly given_name: {
877
- readonly getter: (document: any) => string;
878
- };
879
- readonly family_name: {
880
- readonly getter: (document: any) => string;
881
- };
882
- readonly active: {
883
- readonly type: "boolean";
884
- };
885
- readonly roles: {
886
- readonly type: "array";
887
- readonly items: {
888
- readonly type: "string";
889
- };
890
- readonly uniqueItems: true;
891
- };
892
- readonly email: {
893
- readonly type: "string";
894
- readonly inputType: "email";
895
- readonly unique: true;
896
- };
897
- readonly password: {
898
- readonly type: "string";
899
- readonly inputType: "password";
900
- readonly hidden: true;
901
- };
902
- readonly phone_number: {
903
- readonly type: "string";
904
- readonly mask: "(##) #####-####";
905
- };
906
- readonly picture_file: {
907
- readonly $ref: "file";
908
- readonly accept: readonly ["image/*"];
909
- };
910
- readonly picture: {
911
- readonly getter: (value: any) => any;
912
- };
913
- readonly group: {
914
- readonly type: "string";
915
- };
916
- readonly self_registered: {
917
- readonly type: "boolean";
918
- readonly readOnly: true;
919
- };
920
- readonly updated_at: {
921
- readonly type: "string";
922
- readonly format: "date-time";
923
- };
924
- }>> & {
925
- name: string;
926
- password: string;
927
- updated_at: Date;
928
- roles: string[];
929
- email: string;
930
- active: boolean;
931
- phone_number: string;
932
- picture_file: never;
933
- given_name: string;
934
- family_name: string;
935
- picture: any;
936
- group: string;
937
- }, "picture_file">, "name" | "roles" | "email"> & Partial<{
938
- picture_file: import("@aeriajs/types").SchemaWithId<{
939
- readonly $id: "file";
940
- readonly owned: "always";
941
- readonly presets: readonly ["owned"];
942
- readonly indexes: readonly ["name", "link", "type"];
943
- readonly properties: {
944
- readonly type: {
945
- readonly type: "string";
946
- };
947
- readonly size: {
948
- readonly type: "number";
949
- };
950
- readonly last_modified: {
951
- readonly type: "string";
952
- readonly format: "date-time";
953
- };
954
- readonly name: {
955
- readonly type: "string";
956
- };
957
- readonly absolute_path: {
958
- readonly type: "string";
959
- };
960
- readonly relative_path: {
961
- readonly type: "string";
962
- };
963
- readonly immutable: {
964
- readonly type: "boolean";
965
- };
966
- readonly link: {
967
- readonly getter: (value: any) => Promise<string>;
968
- };
969
- readonly download_link: {
970
- readonly getter: (value: any) => Promise<string>;
971
- };
972
- };
973
- readonly actions: {
974
- readonly deleteAll: {
975
- readonly label: "Remover";
976
- readonly ask: true;
977
- readonly selection: true;
978
- };
979
- };
980
- readonly individualActions: {
981
- readonly remove: {
982
- readonly label: "Remover";
983
- readonly icon: "trash";
984
- readonly ask: true;
985
- };
986
- };
987
- }>;
988
- } & Omit<Readonly<import("@aeriajs/types").FilterReadonlyProperties<{
989
- readonly name: {
990
- readonly type: "string";
991
- };
992
- readonly given_name: {
993
- readonly getter: (document: any) => string;
994
- };
995
- readonly family_name: {
996
- readonly getter: (document: any) => string;
997
- };
998
- readonly active: {
999
- readonly type: "boolean";
1000
- };
1001
- readonly roles: {
1002
- readonly type: "array";
1003
- readonly items: {
1004
- readonly type: "string";
1005
- };
1006
- readonly uniqueItems: true;
1007
- };
1008
- readonly email: {
1009
- readonly type: "string";
1010
- readonly inputType: "email";
1011
- readonly unique: true;
1012
- };
1013
- readonly password: {
1014
- readonly type: "string";
1015
- readonly inputType: "password";
1016
- readonly hidden: true;
1017
- };
1018
- readonly phone_number: {
1019
- readonly type: "string";
1020
- readonly mask: "(##) #####-####";
1021
- };
1022
- readonly picture_file: {
1023
- readonly $ref: "file";
1024
- readonly accept: readonly ["image/*"];
1025
- };
1026
- readonly picture: {
1027
- readonly getter: (value: any) => any;
1028
- };
1029
- readonly group: {
1030
- readonly type: "string";
1031
- };
1032
- readonly self_registered: {
1033
- readonly type: "boolean";
1034
- readonly readOnly: true;
1035
- };
1036
- readonly updated_at: {
1037
- readonly type: "string";
1038
- readonly format: "date-time";
1039
- };
1040
- }>> & {
1041
- name: string;
1042
- password: string;
1043
- updated_at: Date;
1044
- roles: string[];
1045
- email: string;
1046
- active: boolean;
1047
- phone_number: string;
1048
- picture_file: never;
1049
- given_name: string;
1050
- family_name: string;
1051
- picture: any;
1052
- group: string;
1053
- }, "picture_file">> & {
1054
- updated_at?: Date | undefined;
1055
- created_at?: Date | undefined;
1056
- }, "roles">, context: import("@aeriajs/types").Context<{
1057
- readonly $id: "user";
1058
- readonly required: readonly ["name", "roles", "email"];
1059
- readonly form: readonly ["name", "active", "roles", "email", "phone_number", "picture_file"];
1060
- readonly indexes: readonly ["name"];
1061
- readonly properties: {
1062
- readonly name: {
1063
- readonly type: "string";
1064
- };
1065
- readonly given_name: {
1066
- readonly getter: (document: any) => string;
1067
- };
1068
- readonly family_name: {
1069
- readonly getter: (document: any) => string;
1070
- };
1071
- readonly active: {
1072
- readonly type: "boolean";
1073
- };
1074
- readonly roles: {
1075
- readonly type: "array";
1076
- readonly items: {
1077
- readonly type: "string";
1078
- };
1079
- readonly uniqueItems: true;
1080
- };
1081
- readonly email: {
1082
- readonly type: "string";
1083
- readonly inputType: "email";
1084
- readonly unique: true;
1085
- };
1086
- readonly password: {
1087
- readonly type: "string";
1088
- readonly inputType: "password";
1089
- readonly hidden: true;
1090
- };
1091
- readonly phone_number: {
1092
- readonly type: "string";
1093
- readonly mask: "(##) #####-####";
1094
- };
1095
- readonly picture_file: {
1096
- readonly $ref: "file";
1097
- readonly accept: readonly ["image/*"];
1098
- };
1099
- readonly picture: {
1100
- readonly getter: (value: any) => any;
1101
- };
1102
- readonly group: {
1103
- readonly type: "string";
1104
- };
1105
- readonly self_registered: {
1106
- readonly type: "boolean";
1107
- readonly readOnly: true;
1108
- };
1109
- readonly updated_at: {
1110
- readonly type: "string";
1111
- readonly format: "date-time";
1112
- };
1113
- };
1114
- readonly presets: readonly ["crud", "view", "duplicate"];
1115
- readonly layout: {
1116
- readonly name: "grid";
1117
- readonly options: {
1118
- readonly title: "name";
1119
- readonly badge: "roles";
1120
- readonly picture: "picture_file";
1121
- readonly information: "email";
1122
- readonly active: "active";
1123
- };
1124
- };
1125
- readonly individualActions: {
1126
- readonly 'ui:spawnEdit': {
1127
- readonly label: "action.edit";
1128
- readonly icon: "pencil";
1129
- readonly translate: true;
1130
- };
1131
- readonly 'route:/dashboard/user/changepass': {
1132
- readonly label: "change_password";
1133
- readonly icon: "key";
1134
- readonly fetchItem: true;
1135
- readonly translate: true;
1136
- };
1137
- readonly copyActivationLink: {
1138
- readonly label: "copy_activation_link";
1139
- readonly icon: "link";
1140
- readonly translate: true;
1141
- };
1142
- };
1143
- readonly icon: "users";
1144
- readonly filters: readonly ["name", "roles", "email", "phone_number"];
1145
- readonly table: readonly ["name", "roles", "picture_file", "active", "updated_at"];
1146
- readonly tableMeta: readonly ["email"];
1147
- readonly formLayout: {
1148
- readonly fields: {
1149
- readonly given_name: {
1150
- readonly span: 3;
1151
- };
1152
- readonly family_name: {
1153
- readonly span: 3;
1154
- };
1155
- };
1156
- };
1157
- }>) => Promise<import("@aeriajs/types").Result.Error<{
1158
- readonly code: import("@aeriajs/types").ACError.MalformedInput;
1159
- readonly details: import("@aeriajs/types").ValidationError | import("@aeriajs/types").PropertyValidationError;
1160
- } & {
1161
- httpStatus: import("@aeriajs/types").HTTPStatus.BadRequest;
1162
- }> | {
1163
- readonly _tag: "Result";
1164
- readonly error: undefined;
1165
- readonly result: any;
1166
- }>;
1167
- readonly getInfo: (payload: {
1168
- userId: string;
1169
- token: string;
1170
- }, context: import("@aeriajs/types").Context<{
1171
- readonly $id: "user";
1172
- readonly required: readonly ["name", "roles", "email"];
1173
- readonly form: readonly ["name", "active", "roles", "email", "phone_number", "picture_file"];
1174
- readonly indexes: readonly ["name"];
1175
- readonly properties: {
1176
- readonly name: {
1177
- readonly type: "string";
1178
- };
1179
- readonly given_name: {
1180
- readonly getter: (document: any) => string;
1181
- };
1182
- readonly family_name: {
1183
- readonly getter: (document: any) => string;
1184
- };
1185
- readonly active: {
1186
- readonly type: "boolean";
1187
- };
1188
- readonly roles: {
1189
- readonly type: "array";
1190
- readonly items: {
1191
- readonly type: "string";
1192
- };
1193
- readonly uniqueItems: true;
1194
- };
1195
- readonly email: {
1196
- readonly type: "string";
1197
- readonly inputType: "email";
1198
- readonly unique: true;
1199
- };
1200
- readonly password: {
1201
- readonly type: "string";
1202
- readonly inputType: "password";
1203
- readonly hidden: true;
1204
- };
1205
- readonly phone_number: {
1206
- readonly type: "string";
1207
- readonly mask: "(##) #####-####";
1208
- };
1209
- readonly picture_file: {
1210
- readonly $ref: "file";
1211
- readonly accept: readonly ["image/*"];
1212
- };
1213
- readonly picture: {
1214
- readonly getter: (value: any) => any;
1215
- };
1216
- readonly group: {
1217
- readonly type: "string";
1218
- };
1219
- readonly self_registered: {
1220
- readonly type: "boolean";
1221
- readonly readOnly: true;
1222
- };
1223
- readonly updated_at: {
1224
- readonly type: "string";
1225
- readonly format: "date-time";
1226
- };
1227
- };
1228
- readonly presets: readonly ["crud", "view", "duplicate"];
1229
- readonly layout: {
1230
- readonly name: "grid";
1231
- readonly options: {
1232
- readonly title: "name";
1233
- readonly badge: "roles";
1234
- readonly picture: "picture_file";
1235
- readonly information: "email";
1236
- readonly active: "active";
1237
- };
1238
- };
1239
- readonly individualActions: {
1240
- readonly 'ui:spawnEdit': {
1241
- readonly label: "action.edit";
1242
- readonly icon: "pencil";
1243
- readonly translate: true;
1244
- };
1245
- readonly 'route:/dashboard/user/changepass': {
1246
- readonly label: "change_password";
1247
- readonly icon: "key";
1248
- readonly fetchItem: true;
1249
- readonly translate: true;
1250
- };
1251
- readonly copyActivationLink: {
1252
- readonly label: "copy_activation_link";
1253
- readonly icon: "link";
1254
- readonly translate: true;
1255
- };
1256
- };
1257
- readonly icon: "users";
1258
- readonly filters: readonly ["name", "roles", "email", "phone_number"];
1259
- readonly table: readonly ["name", "roles", "picture_file", "active", "updated_at"];
1260
- readonly tableMeta: readonly ["email"];
1261
- readonly formLayout: {
1262
- readonly fields: {
1263
- readonly given_name: {
1264
- readonly span: 3;
1265
- };
1266
- readonly family_name: {
1267
- readonly span: 3;
1268
- };
1269
- };
1270
- };
1271
- }>) => Promise<import("@aeriajs/types").Result.Error<{
1272
- readonly code: import("./getInfo.js").ActivationError.InvalidLink;
1273
- } & {
1274
- httpStatus: import("@aeriajs/types").HTTPStatus.NotFound;
1275
- }> | import("@aeriajs/types").Result.Error<{
1276
- readonly code: import("./getInfo.js").ActivationError.UserNotFound;
1277
- } & {
1278
- httpStatus: import("@aeriajs/types").HTTPStatus.NotFound;
1279
- }> | import("@aeriajs/types").Result.Error<{
1280
- readonly code: import("./getInfo.js").ActivationError.AlreadyActiveUser;
1281
- } & {
1282
- httpStatus: import("@aeriajs/types").HTTPStatus.Forbidden;
1283
- }> | {
1284
- readonly _tag: "Result";
1285
- readonly error: undefined;
1286
- readonly result: {
1287
- readonly name: any;
1288
- readonly email: any;
1289
- };
1290
- }>;
1291
- readonly getCurrentUser: (_payload: undefined, context: import("@aeriajs/types").Context<{
1292
- readonly $id: "user";
1293
- readonly required: readonly ["name", "roles", "email"];
1294
- readonly form: readonly ["name", "active", "roles", "email", "phone_number", "picture_file"];
1295
- readonly indexes: readonly ["name"];
1296
- readonly properties: {
1297
- readonly name: {
1298
- readonly type: "string";
1299
- };
1300
- readonly given_name: {
1301
- readonly getter: (document: any) => string;
1302
- };
1303
- readonly family_name: {
1304
- readonly getter: (document: any) => string;
1305
- };
1306
- readonly active: {
1307
- readonly type: "boolean";
1308
- };
1309
- readonly roles: {
1310
- readonly type: "array";
1311
- readonly items: {
1312
- readonly type: "string";
1313
- };
1314
- readonly uniqueItems: true;
1315
- };
1316
- readonly email: {
1317
- readonly type: "string";
1318
- readonly inputType: "email";
1319
- readonly unique: true;
1320
- };
1321
- readonly password: {
1322
- readonly type: "string";
1323
- readonly inputType: "password";
1324
- readonly hidden: true;
1325
- };
1326
- readonly phone_number: {
1327
- readonly type: "string";
1328
- readonly mask: "(##) #####-####";
1329
- };
1330
- readonly picture_file: {
1331
- readonly $ref: "file";
1332
- readonly accept: readonly ["image/*"];
1333
- };
1334
- readonly picture: {
1335
- readonly getter: (value: any) => any;
1336
- };
1337
- readonly group: {
1338
- readonly type: "string";
1339
- };
1340
- readonly self_registered: {
1341
- readonly type: "boolean";
1342
- readonly readOnly: true;
1343
- };
1344
- readonly updated_at: {
1345
- readonly type: "string";
1346
- readonly format: "date-time";
1347
- };
1348
- };
1349
- readonly presets: readonly ["crud", "view", "duplicate"];
1350
- readonly layout: {
1351
- readonly name: "grid";
1352
- readonly options: {
1353
- readonly title: "name";
1354
- readonly badge: "roles";
1355
- readonly picture: "picture_file";
1356
- readonly information: "email";
1357
- readonly active: "active";
1358
- };
1359
- };
1360
- readonly individualActions: {
1361
- readonly 'ui:spawnEdit': {
1362
- readonly label: "action.edit";
1363
- readonly icon: "pencil";
1364
- readonly translate: true;
1365
- };
1366
- readonly 'route:/dashboard/user/changepass': {
1367
- readonly label: "change_password";
1368
- readonly icon: "key";
1369
- readonly fetchItem: true;
1370
- readonly translate: true;
1371
- };
1372
- readonly copyActivationLink: {
1373
- readonly label: "copy_activation_link";
1374
- readonly icon: "link";
1375
- readonly translate: true;
1376
- };
1377
- };
1378
- readonly icon: "users";
1379
- readonly filters: readonly ["name", "roles", "email", "phone_number"];
1380
- readonly table: readonly ["name", "roles", "picture_file", "active", "updated_at"];
1381
- readonly tableMeta: readonly ["email"];
1382
- readonly formLayout: {
1383
- readonly fields: {
1384
- readonly given_name: {
1385
- readonly span: 3;
1386
- };
1387
- readonly family_name: {
1388
- readonly span: 3;
1389
- };
1390
- };
1391
- };
1392
- }>) => Promise<{
1393
- readonly _tag: "Result";
1394
- readonly error: undefined;
1395
- readonly result: import("@aeriajs/types").SchemaWithId<{
1396
- readonly $id: "user";
1397
- readonly required: readonly ["name", "roles", "email"];
1398
- readonly form: readonly ["name", "active", "roles", "email", "phone_number", "picture_file"];
1399
- readonly indexes: readonly ["name"];
1400
- readonly properties: {
1401
- readonly name: {
1402
- readonly type: "string";
1403
- };
1404
- readonly given_name: {
1405
- readonly getter: (document: any) => string;
1406
- };
1407
- readonly family_name: {
1408
- readonly getter: (document: any) => string;
1409
- };
1410
- readonly active: {
1411
- readonly type: "boolean";
1412
- };
1413
- readonly roles: {
1414
- readonly type: "array";
1415
- readonly items: {
1416
- readonly type: "string";
1417
- };
1418
- readonly uniqueItems: true;
1419
- };
1420
- readonly email: {
1421
- readonly type: "string";
1422
- readonly inputType: "email";
1423
- readonly unique: true;
1424
- };
1425
- readonly password: {
1426
- readonly type: "string";
1427
- readonly inputType: "password";
1428
- readonly hidden: true;
1429
- };
1430
- readonly phone_number: {
1431
- readonly type: "string";
1432
- readonly mask: "(##) #####-####";
1433
- };
1434
- readonly picture_file: {
1435
- readonly $ref: "file";
1436
- readonly accept: readonly ["image/*"];
1437
- };
1438
- readonly picture: {
1439
- readonly getter: (value: any) => any;
1440
- };
1441
- readonly group: {
1442
- readonly type: "string";
1443
- };
1444
- readonly self_registered: {
1445
- readonly type: "boolean";
1446
- readonly readOnly: true;
1447
- };
1448
- readonly updated_at: {
1449
- readonly type: "string";
1450
- readonly format: "date-time";
1451
- };
1452
- };
1453
- readonly presets: readonly ["crud", "view", "duplicate"];
1454
- readonly layout: {
1455
- readonly name: "grid";
1456
- readonly options: {
1457
- readonly title: "name";
1458
- readonly badge: "roles";
1459
- readonly picture: "picture_file";
1460
- readonly information: "email";
1461
- readonly active: "active";
1462
- };
1463
- };
1464
- readonly individualActions: {
1465
- readonly 'ui:spawnEdit': {
1466
- readonly label: "action.edit";
1467
- readonly icon: "pencil";
1468
- readonly translate: true;
1469
- };
1470
- readonly 'route:/dashboard/user/changepass': {
1471
- readonly label: "change_password";
1472
- readonly icon: "key";
1473
- readonly fetchItem: true;
1474
- readonly translate: true;
1475
- };
1476
- readonly copyActivationLink: {
1477
- readonly label: "copy_activation_link";
1478
- readonly icon: "link";
1479
- readonly translate: true;
1480
- };
1481
- };
1482
- readonly icon: "users";
1483
- readonly filters: readonly ["name", "roles", "email", "phone_number"];
1484
- readonly table: readonly ["name", "roles", "picture_file", "active", "updated_at"];
1485
- readonly tableMeta: readonly ["email"];
1486
- readonly formLayout: {
1487
- readonly fields: {
1488
- readonly given_name: {
1489
- readonly span: 3;
1490
- };
1491
- readonly family_name: {
1492
- readonly span: 3;
1493
- };
1494
- };
1495
- };
1496
- }>;
1497
- }>;
1498
- readonly getActivationLink: (payload: {
1499
- userId: string | import("@aeriajs/core").ObjectId;
1500
- }, context: import("@aeriajs/types").Context) => Promise<{
1501
- readonly _tag: "Error";
1502
- readonly error: import("@aeriajs/types").StrictEndpointError<import("@aeriajs/types").ACError.ResourceNotFound | import("@aeriajs/types").ACError.MalformedInput, unknown, import("@aeriajs/types").HTTPStatus.BadRequest | import("@aeriajs/types").HTTPStatus.NotFound>;
1503
- readonly result: undefined;
1504
- } | import("@aeriajs/types").Result.Error<{
1505
- readonly code: import("./activate.js").ActivationError.AlreadyActiveUser;
1506
- } & {
1507
- httpStatus: import("@aeriajs/types").HTTPStatus.Forbidden;
1508
- }> | {
1509
- readonly _tag: "Result";
1510
- readonly error: undefined;
1511
- readonly result: {
1512
- readonly url: string;
1513
- };
1514
- }>;
1515
- };
1516
- contracts: {
1517
- readonly getCurrentUser: {
1518
- readonly response: {
1519
- readonly $ref: "user";
1520
- };
1521
- };
1522
- };
1523
- exposedFunctions: any;
1524
- } & {
1525
- item: import("@aeriajs/types").SchemaWithId<{
1526
- readonly $id: "user";
1527
- readonly required: readonly ["name", "roles", "email"];
1528
- readonly form: readonly ["name", "active", "roles", "email", "phone_number", "picture_file"];
1529
- readonly indexes: readonly ["name"];
1530
- readonly properties: {
1531
- readonly name: {
1532
- readonly type: "string";
1533
- };
1534
- readonly given_name: {
1535
- readonly getter: (document: any) => string;
1536
- };
1537
- readonly family_name: {
1538
- readonly getter: (document: any) => string;
1539
- };
1540
- readonly active: {
1541
- readonly type: "boolean";
1542
- };
1543
- readonly roles: {
1544
- readonly type: "array";
1545
- readonly items: {
1546
- readonly type: "string";
1547
- };
1548
- readonly uniqueItems: true;
1549
- };
1550
- readonly email: {
1551
- readonly type: "string";
1552
- readonly inputType: "email";
1553
- readonly unique: true;
1554
- };
1555
- readonly password: {
1556
- readonly type: "string";
1557
- readonly inputType: "password";
1558
- readonly hidden: true;
1559
- };
1560
- readonly phone_number: {
1561
- readonly type: "string";
1562
- readonly mask: "(##) #####-####";
1563
- };
1564
- readonly picture_file: {
1565
- readonly $ref: "file";
1566
- readonly accept: readonly ["image/*"];
1567
- };
1568
- readonly picture: {
1569
- readonly getter: (value: any) => any;
1570
- };
1571
- readonly group: {
1572
- readonly type: "string";
1573
- };
1574
- readonly self_registered: {
1575
- readonly type: "boolean";
1576
- readonly readOnly: true;
1577
- };
1578
- readonly updated_at: {
1579
- readonly type: "string";
1580
- readonly format: "date-time";
1581
- };
1582
- };
1583
- readonly presets: readonly ["crud", "view", "duplicate"];
1584
- readonly layout: {
1585
- readonly name: "grid";
1586
- readonly options: {
1587
- readonly title: "name";
1588
- readonly badge: "roles";
1589
- readonly picture: "picture_file";
1590
- readonly information: "email";
1591
- readonly active: "active";
1592
- };
1593
- };
1594
- readonly individualActions: {
1595
- readonly 'ui:spawnEdit': {
1596
- readonly label: "action.edit";
1597
- readonly icon: "pencil";
1598
- readonly translate: true;
1599
- };
1600
- readonly 'route:/dashboard/user/changepass': {
1601
- readonly label: "change_password";
1602
- readonly icon: "key";
1603
- readonly fetchItem: true;
1604
- readonly translate: true;
1605
- };
1606
- readonly copyActivationLink: {
1607
- readonly label: "copy_activation_link";
1608
- readonly icon: "link";
1609
- readonly translate: true;
1610
- };
1611
- };
1612
- readonly icon: "users";
1613
- readonly filters: readonly ["name", "roles", "email", "phone_number"];
1614
- readonly table: readonly ["name", "roles", "picture_file", "active", "updated_at"];
1615
- readonly tableMeta: readonly ["email"];
1616
- readonly formLayout: {
1617
- readonly fields: {
1618
- readonly given_name: {
1619
- readonly span: 3;
1620
- };
1621
- readonly family_name: {
1622
- readonly span: 3;
1623
- };
1624
- };
1625
- };
1626
- }>;
1627
- description: {
1628
- readonly $id: "user";
1629
- readonly required: readonly ["name", "roles", "email"];
1630
- readonly form: readonly ["name", "active", "roles", "email", "phone_number", "picture_file"];
1631
- readonly indexes: readonly ["name"];
1632
- readonly properties: {
1633
- readonly name: {
1634
- readonly type: "string";
1635
- };
1636
- readonly given_name: {
1637
- readonly getter: (document: any) => string;
1638
- };
1639
- readonly family_name: {
1640
- readonly getter: (document: any) => string;
1641
- };
1642
- readonly active: {
1643
- readonly type: "boolean";
1644
- };
1645
- readonly roles: {
1646
- readonly type: "array";
1647
- readonly items: {
1648
- readonly type: "string";
1649
- };
1650
- readonly uniqueItems: true;
1651
- };
1652
- readonly email: {
1653
- readonly type: "string";
1654
- readonly inputType: "email";
1655
- readonly unique: true;
1656
- };
1657
- readonly password: {
1658
- readonly type: "string";
1659
- readonly inputType: "password";
1660
- readonly hidden: true;
1661
- };
1662
- readonly phone_number: {
1663
- readonly type: "string";
1664
- readonly mask: "(##) #####-####";
1665
- };
1666
- readonly picture_file: {
1667
- readonly $ref: "file";
1668
- readonly accept: readonly ["image/*"];
1669
- };
1670
- readonly picture: {
1671
- readonly getter: (value: any) => any;
1672
- };
1673
- readonly group: {
1674
- readonly type: "string";
1675
- };
1676
- readonly self_registered: {
1677
- readonly type: "boolean";
1678
- readonly readOnly: true;
1679
- };
1680
- readonly updated_at: {
1681
- readonly type: "string";
1682
- readonly format: "date-time";
1683
- };
1684
- };
1685
- readonly presets: readonly ["crud", "view", "duplicate"];
1686
- readonly layout: {
1687
- readonly name: "grid";
1688
- readonly options: {
1689
- readonly title: "name";
1690
- readonly badge: "roles";
1691
- readonly picture: "picture_file";
1692
- readonly information: "email";
1693
- readonly active: "active";
1694
- };
1695
- };
1696
- readonly individualActions: {
1697
- readonly 'ui:spawnEdit': {
1698
- readonly label: "action.edit";
1699
- readonly icon: "pencil";
1700
- readonly translate: true;
1701
- };
1702
- readonly 'route:/dashboard/user/changepass': {
1703
- readonly label: "change_password";
1704
- readonly icon: "key";
1705
- readonly fetchItem: true;
1706
- readonly translate: true;
1707
- };
1708
- readonly copyActivationLink: {
1709
- readonly label: "copy_activation_link";
1710
- readonly icon: "link";
1711
- readonly translate: true;
1712
- };
1713
- };
1714
- readonly icon: "users";
1715
- readonly filters: readonly ["name", "roles", "email", "phone_number"];
1716
- readonly table: readonly ["name", "roles", "picture_file", "active", "updated_at"];
1717
- readonly tableMeta: readonly ["email"];
1718
- readonly formLayout: {
1719
- readonly fields: {
1720
- readonly given_name: {
1721
- readonly span: 3;
1722
- };
1723
- readonly family_name: {
1724
- readonly span: 3;
1725
- };
1726
- };
1727
- };
1728
- };
1729
- functions: {
1730
- readonly get: (payload: import("@aeriajs/types").GetPayload<import("@aeriajs/types").SchemaWithId<any>>, context: import("@aeriajs/types").StrictContext<any>, options?: import("@aeriajs/core").GetOptions | undefined) => Promise<import("@aeriajs/types").GetReturnType<any>>;
1731
- readonly getAll: (_payload: import("@aeriajs/types").GetAllPayload<import("@aeriajs/types").SchemaWithId<any>> | undefined, context: import("@aeriajs/types").StrictContext<any>, options?: import("@aeriajs/core").GetAllOptions | undefined) => Promise<{
1732
- readonly _tag: "Result";
1733
- readonly error: undefined;
1734
- readonly result: import("@aeriajs/types").SchemaWithId<any>[];
1735
- }>;
1736
- readonly remove: (payload: import("@aeriajs/types").RemovePayload<import("@aeriajs/types").SchemaWithId<any>>, context: import("@aeriajs/types").StrictContext<any>) => Promise<import("@aeriajs/types").Result.Error<{
1737
- readonly code: import("@aeriajs/types").ACError.ResourceNotFound;
1738
- } & {
1739
- httpStatus: import("@aeriajs/types").HTTPStatus.NotFound;
1740
- }> | {
1741
- readonly _tag: "Result";
1742
- readonly error: undefined;
1743
- readonly result: import("mongodb").WithId<Omit<import("@aeriajs/types").PackReferences<import("@aeriajs/types").SchemaWithId<import("@aeriajs/types").Description<any>>>, "_id">> | null;
1744
- }>;
1745
- readonly upload: (_props: unknown, context: import("@aeriajs/types").StrictContext<any>) => Promise<import("@aeriajs/types").Result.Error<{
1746
- readonly code: import("@aeriajs/types").ACError.MalformedInput;
1747
- readonly details: import("@aeriajs/types").ValidationError | import("@aeriajs/types").PropertyValidationError;
1748
- } & {
1749
- httpStatus: import("@aeriajs/types").HTTPStatus.BadRequest;
1750
- }> | {
1751
- readonly _tag: "Result";
1752
- readonly error: undefined;
1753
- readonly result: {
1754
- readonly tempId: any;
1755
- };
1756
- }>;
1757
- readonly removeFile: (payload: import("@aeriajs/types").RemoveFilePayload, context: import("@aeriajs/types").StrictContext<any>) => Promise<{
1758
- readonly _tag: "Result";
1759
- readonly error: undefined;
1760
- readonly result: any;
1761
- }>;
1762
- readonly insert: (payload: {
1763
- what: Omit<import("@aeriajs/types").PackReferences<import("@aeriajs/types").SchemaWithId<{
1764
- readonly $id: "user";
1765
- readonly required: readonly ["name", "roles", "email"];
1766
- readonly form: readonly ["name", "active", "roles", "email", "phone_number", "picture_file"];
1767
- readonly indexes: readonly ["name"];
1768
- readonly properties: {
1769
- readonly name: {
1770
- readonly type: "string";
1771
- };
1772
- readonly given_name: {
1773
- readonly getter: (document: any) => string;
1774
- };
1775
- readonly family_name: {
1776
- readonly getter: (document: any) => string;
1777
- };
1778
- readonly active: {
1779
- readonly type: "boolean";
1780
- };
1781
- readonly roles: {
1782
- readonly type: "array";
1783
- readonly items: {
1784
- readonly type: "string";
1785
- };
1786
- readonly uniqueItems: true;
1787
- };
1788
- readonly email: {
1789
- readonly type: "string";
1790
- readonly inputType: "email";
1791
- readonly unique: true;
1792
- };
1793
- readonly password: {
1794
- readonly type: "string";
1795
- readonly inputType: "password";
1796
- readonly hidden: true;
1797
- };
1798
- readonly phone_number: {
1799
- readonly type: "string";
1800
- readonly mask: "(##) #####-####";
1801
- };
1802
- readonly picture_file: {
1803
- readonly $ref: "file";
1804
- readonly accept: readonly ["image/*"];
1805
- };
1806
- readonly picture: {
1807
- readonly getter: (value: any) => any;
1808
- };
1809
- readonly group: {
1810
- readonly type: "string";
1811
- };
1812
- readonly self_registered: {
1813
- readonly type: "boolean";
1814
- readonly readOnly: true;
1815
- };
1816
- readonly updated_at: {
1817
- readonly type: "string";
1818
- readonly format: "date-time";
1819
- };
1820
- };
1821
- readonly presets: readonly ["crud", "view", "duplicate"];
1822
- readonly layout: {
1823
- readonly name: "grid";
1824
- readonly options: {
1825
- readonly title: "name";
1826
- readonly badge: "roles";
1827
- readonly picture: "picture_file";
1828
- readonly information: "email";
1829
- readonly active: "active";
1830
- };
1831
- };
1832
- readonly individualActions: {
1833
- readonly 'ui:spawnEdit': {
1834
- readonly label: "action.edit";
1835
- readonly icon: "pencil";
1836
- readonly translate: true;
1837
- };
1838
- readonly 'route:/dashboard/user/changepass': {
1839
- readonly label: "change_password";
1840
- readonly icon: "key";
1841
- readonly fetchItem: true;
1842
- readonly translate: true;
1843
- };
1844
- readonly copyActivationLink: {
1845
- readonly label: "copy_activation_link";
1846
- readonly icon: "link";
1847
- readonly translate: true;
1848
- };
1849
- };
1850
- readonly icon: "users";
1851
- readonly filters: readonly ["name", "roles", "email", "phone_number"];
1852
- readonly table: readonly ["name", "roles", "picture_file", "active", "updated_at"];
1853
- readonly tableMeta: readonly ["email"];
1854
- readonly formLayout: {
1855
- readonly fields: {
1856
- readonly given_name: {
1857
- readonly span: 3;
1858
- };
1859
- readonly family_name: {
1860
- readonly span: 3;
1861
- };
1862
- };
1863
- };
1864
- }>>, "roles">;
1865
- }, context: import("@aeriajs/types").Context<{
1866
- readonly $id: "user";
1867
- readonly required: readonly ["name", "roles", "email"];
1868
- readonly form: readonly ["name", "active", "roles", "email", "phone_number", "picture_file"];
1869
- readonly indexes: readonly ["name"];
1870
- readonly properties: {
1871
- readonly name: {
1872
- readonly type: "string";
1873
- };
1874
- readonly given_name: {
1875
- readonly getter: (document: any) => string;
1876
- };
1877
- readonly family_name: {
1878
- readonly getter: (document: any) => string;
1879
- };
1880
- readonly active: {
1881
- readonly type: "boolean";
1882
- };
1883
- readonly roles: {
1884
- readonly type: "array";
1885
- readonly items: {
1886
- readonly type: "string";
1887
- };
1888
- readonly uniqueItems: true;
1889
- };
1890
- readonly email: {
1891
- readonly type: "string";
1892
- readonly inputType: "email";
1893
- readonly unique: true;
1894
- };
1895
- readonly password: {
1896
- readonly type: "string";
1897
- readonly inputType: "password";
1898
- readonly hidden: true;
1899
- };
1900
- readonly phone_number: {
1901
- readonly type: "string";
1902
- readonly mask: "(##) #####-####";
1903
- };
1904
- readonly picture_file: {
1905
- readonly $ref: "file";
1906
- readonly accept: readonly ["image/*"];
1907
- };
1908
- readonly picture: {
1909
- readonly getter: (value: any) => any;
1910
- };
1911
- readonly group: {
1912
- readonly type: "string";
1913
- };
1914
- readonly self_registered: {
1915
- readonly type: "boolean";
1916
- readonly readOnly: true;
1917
- };
1918
- readonly updated_at: {
1919
- readonly type: "string";
1920
- readonly format: "date-time";
1921
- };
1922
- };
1923
- readonly presets: readonly ["crud", "view", "duplicate"];
1924
- readonly layout: {
1925
- readonly name: "grid";
1926
- readonly options: {
1927
- readonly title: "name";
1928
- readonly badge: "roles";
1929
- readonly picture: "picture_file";
1930
- readonly information: "email";
1931
- readonly active: "active";
1932
- };
1933
- };
1934
- readonly individualActions: {
1935
- readonly 'ui:spawnEdit': {
1936
- readonly label: "action.edit";
1937
- readonly icon: "pencil";
1938
- readonly translate: true;
1939
- };
1940
- readonly 'route:/dashboard/user/changepass': {
1941
- readonly label: "change_password";
1942
- readonly icon: "key";
1943
- readonly fetchItem: true;
1944
- readonly translate: true;
1945
- };
1946
- readonly copyActivationLink: {
1947
- readonly label: "copy_activation_link";
1948
- readonly icon: "link";
1949
- readonly translate: true;
1950
- };
1951
- };
1952
- readonly icon: "users";
1953
- readonly filters: readonly ["name", "roles", "email", "phone_number"];
1954
- readonly table: readonly ["name", "roles", "picture_file", "active", "updated_at"];
1955
- readonly tableMeta: readonly ["email"];
1956
- readonly formLayout: {
1957
- readonly fields: {
1958
- readonly given_name: {
1959
- readonly span: 3;
1960
- };
1961
- readonly family_name: {
1962
- readonly span: 3;
1963
- };
1964
- };
1965
- };
1966
- }>) => Promise<import("@aeriajs/types").InsertReturnType<import("@aeriajs/types").SchemaWithId<{
1967
- readonly $id: "user";
1968
- readonly required: readonly ["name", "roles", "email"];
1969
- readonly form: readonly ["name", "active", "roles", "email", "phone_number", "picture_file"];
1970
- readonly indexes: readonly ["name"];
1971
- readonly properties: {
1972
- readonly name: {
1973
- readonly type: "string";
1974
- };
1975
- readonly given_name: {
1976
- readonly getter: (document: any) => string;
1977
- };
1978
- readonly family_name: {
1979
- readonly getter: (document: any) => string;
1980
- };
1981
- readonly active: {
1982
- readonly type: "boolean";
1983
- };
1984
- readonly roles: {
1985
- readonly type: "array";
1986
- readonly items: {
1987
- readonly type: "string";
1988
- };
1989
- readonly uniqueItems: true;
1990
- };
1991
- readonly email: {
1992
- readonly type: "string";
1993
- readonly inputType: "email";
1994
- readonly unique: true;
1995
- };
1996
- readonly password: {
1997
- readonly type: "string";
1998
- readonly inputType: "password";
1999
- readonly hidden: true;
2000
- };
2001
- readonly phone_number: {
2002
- readonly type: "string";
2003
- readonly mask: "(##) #####-####";
2004
- };
2005
- readonly picture_file: {
2006
- readonly $ref: "file";
2007
- readonly accept: readonly ["image/*"];
2008
- };
2009
- readonly picture: {
2010
- readonly getter: (value: any) => any;
2011
- };
2012
- readonly group: {
2013
- readonly type: "string";
2014
- };
2015
- readonly self_registered: {
2016
- readonly type: "boolean";
2017
- readonly readOnly: true;
2018
- };
2019
- readonly updated_at: {
2020
- readonly type: "string";
2021
- readonly format: "date-time";
2022
- };
2023
- };
2024
- readonly presets: readonly ["crud", "view", "duplicate"];
2025
- readonly layout: {
2026
- readonly name: "grid";
2027
- readonly options: {
2028
- readonly title: "name";
2029
- readonly badge: "roles";
2030
- readonly picture: "picture_file";
2031
- readonly information: "email";
2032
- readonly active: "active";
2033
- };
2034
- };
2035
- readonly individualActions: {
2036
- readonly 'ui:spawnEdit': {
2037
- readonly label: "action.edit";
2038
- readonly icon: "pencil";
2039
- readonly translate: true;
2040
- };
2041
- readonly 'route:/dashboard/user/changepass': {
2042
- readonly label: "change_password";
2043
- readonly icon: "key";
2044
- readonly fetchItem: true;
2045
- readonly translate: true;
2046
- };
2047
- readonly copyActivationLink: {
2048
- readonly label: "copy_activation_link";
2049
- readonly icon: "link";
2050
- readonly translate: true;
2051
- };
2052
- };
2053
- readonly icon: "users";
2054
- readonly filters: readonly ["name", "roles", "email", "phone_number"];
2055
- readonly table: readonly ["name", "roles", "picture_file", "active", "updated_at"];
2056
- readonly tableMeta: readonly ["email"];
2057
- readonly formLayout: {
2058
- readonly fields: {
2059
- readonly given_name: {
2060
- readonly span: 3;
2061
- };
2062
- readonly family_name: {
2063
- readonly span: 3;
2064
- };
2065
- };
2066
- };
2067
- }>>>;
2068
- readonly authenticate: (props: {
2069
- email: string;
2070
- password: string;
2071
- } | {
2072
- token?: import("@aeriajs/types").TokenRecipient | undefined;
2073
- revalidate: true;
2074
- }, context: import("@aeriajs/types").Context<{
2075
- readonly $id: "user";
2076
- readonly required: readonly ["name", "roles", "email"];
2077
- readonly form: readonly ["name", "active", "roles", "email", "phone_number", "picture_file"];
2078
- readonly indexes: readonly ["name"];
2079
- readonly properties: {
2080
- readonly name: {
2081
- readonly type: "string";
2082
- };
2083
- readonly given_name: {
2084
- readonly getter: (document: any) => string;
2085
- };
2086
- readonly family_name: {
2087
- readonly getter: (document: any) => string;
2088
- };
2089
- readonly active: {
2090
- readonly type: "boolean";
2091
- };
2092
- readonly roles: {
2093
- readonly type: "array";
2094
- readonly items: {
2095
- readonly type: "string";
2096
- };
2097
- readonly uniqueItems: true;
2098
- };
2099
- readonly email: {
2100
- readonly type: "string";
2101
- readonly inputType: "email";
2102
- readonly unique: true;
2103
- };
2104
- readonly password: {
2105
- readonly type: "string";
2106
- readonly inputType: "password";
2107
- readonly hidden: true;
2108
- };
2109
- readonly phone_number: {
2110
- readonly type: "string";
2111
- readonly mask: "(##) #####-####";
2112
- };
2113
- readonly picture_file: {
2114
- readonly $ref: "file";
2115
- readonly accept: readonly ["image/*"];
2116
- };
2117
- readonly picture: {
2118
- readonly getter: (value: any) => any;
2119
- };
2120
- readonly group: {
2121
- readonly type: "string";
2122
- };
2123
- readonly self_registered: {
2124
- readonly type: "boolean";
2125
- readonly readOnly: true;
2126
- };
2127
- readonly updated_at: {
2128
- readonly type: "string";
2129
- readonly format: "date-time";
2130
- };
2131
- };
2132
- readonly presets: readonly ["crud", "view", "duplicate"];
2133
- readonly layout: {
2134
- readonly name: "grid";
2135
- readonly options: {
2136
- readonly title: "name";
2137
- readonly badge: "roles";
2138
- readonly picture: "picture_file";
2139
- readonly information: "email";
2140
- readonly active: "active";
2141
- };
2142
- };
2143
- readonly individualActions: {
2144
- readonly 'ui:spawnEdit': {
2145
- readonly label: "action.edit";
2146
- readonly icon: "pencil";
2147
- readonly translate: true;
2148
- };
2149
- readonly 'route:/dashboard/user/changepass': {
2150
- readonly label: "change_password";
2151
- readonly icon: "key";
2152
- readonly fetchItem: true;
2153
- readonly translate: true;
2154
- };
2155
- readonly copyActivationLink: {
2156
- readonly label: "copy_activation_link";
2157
- readonly icon: "link";
2158
- readonly translate: true;
2159
- };
2160
- };
2161
- readonly icon: "users";
2162
- readonly filters: readonly ["name", "roles", "email", "phone_number"];
2163
- readonly table: readonly ["name", "roles", "picture_file", "active", "updated_at"];
2164
- readonly tableMeta: readonly ["email"];
2165
- readonly formLayout: {
2166
- readonly fields: {
2167
- readonly given_name: {
2168
- readonly span: 3;
2169
- };
2170
- readonly family_name: {
2171
- readonly span: 3;
2172
- };
2173
- };
2174
- };
2175
- }>) => Promise<import("@aeriajs/types").Result.Error<{
2176
- readonly code: import("@aeriajs/types").ACError.AuthorizationError;
2177
- } & {
2178
- httpStatus: import("@aeriajs/types").HTTPStatus.Unauthorized;
2179
- }> | {
2180
- readonly _tag: "Result";
2181
- readonly error: undefined;
2182
- readonly result: {
2183
- user: Pick<import("@aeriajs/types").SchemaWithId<{
2184
- readonly $id: "user";
2185
- readonly required: readonly ["name", "roles", "email"];
2186
- readonly form: readonly ["name", "active", "roles", "email", "phone_number", "picture_file"];
2187
- readonly indexes: readonly ["name"];
2188
- readonly properties: {
2189
- readonly name: {
2190
- readonly type: "string";
2191
- };
2192
- readonly given_name: {
2193
- readonly getter: (document: any) => string;
2194
- };
2195
- readonly family_name: {
2196
- readonly getter: (document: any) => string;
2197
- };
2198
- readonly active: {
2199
- readonly type: "boolean";
2200
- };
2201
- readonly roles: {
2202
- readonly type: "array";
2203
- readonly items: {
2204
- readonly type: "string";
2205
- };
2206
- readonly uniqueItems: true;
2207
- };
2208
- readonly email: {
2209
- readonly type: "string";
2210
- readonly inputType: "email";
2211
- readonly unique: true;
2212
- };
2213
- readonly password: {
2214
- readonly type: "string";
2215
- readonly inputType: "password";
2216
- readonly hidden: true;
2217
- };
2218
- readonly phone_number: {
2219
- readonly type: "string";
2220
- readonly mask: "(##) #####-####";
2221
- };
2222
- readonly picture_file: {
2223
- readonly $ref: "file";
2224
- readonly accept: readonly ["image/*"];
2225
- };
2226
- readonly picture: {
2227
- readonly getter: (value: any) => any;
2228
- };
2229
- readonly group: {
2230
- readonly type: "string";
2231
- };
2232
- readonly self_registered: {
2233
- readonly type: "boolean";
2234
- readonly readOnly: true;
2235
- };
2236
- readonly updated_at: {
2237
- readonly type: "string";
2238
- readonly format: "date-time";
2239
- };
2240
- };
2241
- readonly presets: readonly ["crud", "view", "duplicate"];
2242
- readonly layout: {
2243
- readonly name: "grid";
2244
- readonly options: {
2245
- readonly title: "name";
2246
- readonly badge: "roles";
2247
- readonly picture: "picture_file";
2248
- readonly information: "email";
2249
- readonly active: "active";
2250
- };
2251
- };
2252
- readonly individualActions: {
2253
- readonly 'ui:spawnEdit': {
2254
- readonly label: "action.edit";
2255
- readonly icon: "pencil";
2256
- readonly translate: true;
2257
- };
2258
- readonly 'route:/dashboard/user/changepass': {
2259
- readonly label: "change_password";
2260
- readonly icon: "key";
2261
- readonly fetchItem: true;
2262
- readonly translate: true;
2263
- };
2264
- readonly copyActivationLink: {
2265
- readonly label: "copy_activation_link";
2266
- readonly icon: "link";
2267
- readonly translate: true;
2268
- };
2269
- };
2270
- readonly icon: "users";
2271
- readonly filters: readonly ["name", "roles", "email", "phone_number"];
2272
- readonly table: readonly ["name", "roles", "picture_file", "active", "updated_at"];
2273
- readonly tableMeta: readonly ["email"];
2274
- readonly formLayout: {
2275
- readonly fields: {
2276
- readonly given_name: {
2277
- readonly span: 3;
2278
- };
2279
- readonly family_name: {
2280
- readonly span: 3;
2281
- };
2282
- };
2283
- };
2284
- }>, "name" | "roles" | "email" | "active"> & {
2285
- _id: import("@aeriajs/core").ObjectId | null;
2286
- };
2287
- token: import("@aeriajs/types").TokenRecipient;
2288
- } | {
2289
- user: {
2290
- _id: null;
2291
- name: string;
2292
- email: string;
2293
- roles: string[];
2294
- active: boolean;
2295
- };
2296
- token: {
2297
- type: string;
2298
- content: string;
2299
- };
2300
- };
2301
- } | import("@aeriajs/types").Result.Error<{
2302
- readonly code: import("./authenticate.js").AuthenticationError.InvalidCredentials;
2303
- } & {
2304
- httpStatus: import("@aeriajs/types").HTTPStatus.Unauthorized;
2305
- }> | import("@aeriajs/types").Result.Error<{
2306
- readonly code: import("./authenticate.js").AuthenticationError.InactiveUser;
2307
- } & {
2308
- httpStatus: import("@aeriajs/types").HTTPStatus.Unauthorized;
2309
- }>>;
2310
- readonly activate: (payload: {
2311
- password: string;
2312
- }, context: import("@aeriajs/types").RouteContext<null> & import("@aeriajs/types").CollectionContext<{
2313
- readonly $id: "user";
2314
- readonly required: readonly ["name", "roles", "email"];
2315
- readonly form: readonly ["name", "active", "roles", "email", "phone_number", "picture_file"];
2316
- readonly indexes: readonly ["name"];
2317
- readonly properties: {
2318
- readonly name: {
2319
- readonly type: "string";
2320
- };
2321
- readonly given_name: {
2322
- readonly getter: (document: any) => string;
2323
- };
2324
- readonly family_name: {
2325
- readonly getter: (document: any) => string;
2326
- };
2327
- readonly active: {
2328
- readonly type: "boolean";
2329
- };
2330
- readonly roles: {
2331
- readonly type: "array";
2332
- readonly items: {
2333
- readonly type: "string";
2334
- };
2335
- readonly uniqueItems: true;
2336
- };
2337
- readonly email: {
2338
- readonly type: "string";
2339
- readonly inputType: "email";
2340
- readonly unique: true;
2341
- };
2342
- readonly password: {
2343
- readonly type: "string";
2344
- readonly inputType: "password";
2345
- readonly hidden: true;
2346
- };
2347
- readonly phone_number: {
2348
- readonly type: "string";
2349
- readonly mask: "(##) #####-####";
2350
- };
2351
- readonly picture_file: {
2352
- readonly $ref: "file";
2353
- readonly accept: readonly ["image/*"];
2354
- };
2355
- readonly picture: {
2356
- readonly getter: (value: any) => any;
2357
- };
2358
- readonly group: {
2359
- readonly type: "string";
2360
- };
2361
- readonly self_registered: {
2362
- readonly type: "boolean";
2363
- readonly readOnly: true;
2364
- };
2365
- readonly updated_at: {
2366
- readonly type: "string";
2367
- readonly format: "date-time";
2368
- };
2369
- };
2370
- readonly presets: readonly ["crud", "view", "duplicate"];
2371
- readonly layout: {
2372
- readonly name: "grid";
2373
- readonly options: {
2374
- readonly title: "name";
2375
- readonly badge: "roles";
2376
- readonly picture: "picture_file";
2377
- readonly information: "email";
2378
- readonly active: "active";
2379
- };
2380
- };
2381
- readonly individualActions: {
2382
- readonly 'ui:spawnEdit': {
2383
- readonly label: "action.edit";
2384
- readonly icon: "pencil";
2385
- readonly translate: true;
2386
- };
2387
- readonly 'route:/dashboard/user/changepass': {
2388
- readonly label: "change_password";
2389
- readonly icon: "key";
2390
- readonly fetchItem: true;
2391
- readonly translate: true;
2392
- };
2393
- readonly copyActivationLink: {
2394
- readonly label: "copy_activation_link";
2395
- readonly icon: "link";
2396
- readonly translate: true;
2397
- };
2398
- };
2399
- readonly icon: "users";
2400
- readonly filters: readonly ["name", "roles", "email", "phone_number"];
2401
- readonly table: readonly ["name", "roles", "picture_file", "active", "updated_at"];
2402
- readonly tableMeta: readonly ["email"];
2403
- readonly formLayout: {
2404
- readonly fields: {
2405
- readonly given_name: {
2406
- readonly span: 3;
2407
- };
2408
- readonly family_name: {
2409
- readonly span: 3;
2410
- };
2411
- };
2412
- };
2413
- }, any> & {
2414
- request: {
2415
- query: {
2416
- u?: string | undefined;
2417
- t?: string | undefined;
2418
- };
2419
- payload: {
2420
- password?: string | undefined;
290
+ payload: {
291
+ password?: string;
2421
292
  };
2422
293
  };
2423
294
  }) => Promise<import("@aeriajs/types").GenericResponse | import("@aeriajs/types").Result.Error<{
@@ -2443,58 +314,179 @@ export declare const user: {
2443
314
  readonly userId: any;
2444
315
  };
2445
316
  } | undefined>;
2446
- readonly createAccount: (payload: Omit<Pick<{
2447
- picture_file: import("@aeriajs/types").SchemaWithId<{
2448
- readonly $id: "file";
2449
- readonly owned: "always";
2450
- readonly presets: readonly ["owned"];
2451
- readonly indexes: readonly ["name", "link", "type"];
317
+ readonly createAccount: (payload: Omit<import("@aeriajs/types").Schema<typeof description>, "roles">, context: import("@aeriajs/types").Context<typeof description>) => Promise<import("@aeriajs/types").Result.Error<{
318
+ readonly code: import("@aeriajs/types").ACError.MalformedInput;
319
+ readonly details: import("@aeriajs/types").ValidationError | import("@aeriajs/types").PropertyValidationError;
320
+ } & {
321
+ httpStatus: import("@aeriajs/types").HTTPStatus.BadRequest;
322
+ }> | {
323
+ readonly _tag: "Result";
324
+ readonly error: undefined;
325
+ readonly result: any;
326
+ }>;
327
+ readonly getInfo: (payload: {
328
+ userId: string;
329
+ token: string;
330
+ }, context: import("@aeriajs/types").Context<typeof description>) => Promise<import("@aeriajs/types").Result.Error<{
331
+ readonly code: import("./getInfo.js").ActivationError.InvalidLink;
332
+ } & {
333
+ httpStatus: import("@aeriajs/types").HTTPStatus.NotFound;
334
+ }> | import("@aeriajs/types").Result.Error<{
335
+ readonly code: import("./getInfo.js").ActivationError.UserNotFound;
336
+ } & {
337
+ httpStatus: import("@aeriajs/types").HTTPStatus.NotFound;
338
+ }> | import("@aeriajs/types").Result.Error<{
339
+ readonly code: import("./getInfo.js").ActivationError.AlreadyActiveUser;
340
+ } & {
341
+ httpStatus: import("@aeriajs/types").HTTPStatus.Forbidden;
342
+ }> | {
343
+ readonly _tag: "Result";
344
+ readonly error: undefined;
345
+ readonly result: {
346
+ readonly name: any;
347
+ readonly email: any;
348
+ };
349
+ }>;
350
+ readonly getCurrentUser: (_payload: undefined, context: import("@aeriajs/types").Context<typeof description>) => Promise<{
351
+ readonly _tag: "Result";
352
+ readonly error: undefined;
353
+ readonly result: import("@aeriajs/types").SchemaWithId<{
354
+ readonly $id: "user";
355
+ readonly icon: "users";
356
+ readonly required: readonly ["name", "roles", "email"];
357
+ readonly form: readonly ["name", "active", "roles", "email", "phone_number", "picture_file"];
358
+ readonly indexes: readonly ["name"];
2452
359
  readonly properties: {
2453
- readonly type: {
360
+ readonly name: {
2454
361
  readonly type: "string";
2455
362
  };
2456
- readonly size: {
2457
- readonly type: "number";
363
+ readonly given_name: {
364
+ readonly getter: (document: any) => string;
365
+ };
366
+ readonly family_name: {
367
+ readonly getter: (document: any) => string;
368
+ };
369
+ readonly active: {
370
+ readonly type: "boolean";
371
+ };
372
+ readonly roles: {
373
+ readonly type: "array";
374
+ readonly items: {
375
+ readonly type: "string";
376
+ };
377
+ readonly uniqueItems: true;
378
+ };
379
+ readonly email: {
380
+ readonly type: "string";
381
+ readonly inputType: "email";
382
+ readonly unique: true;
2458
383
  };
2459
- readonly last_modified: {
384
+ readonly password: {
2460
385
  readonly type: "string";
2461
- readonly format: "date-time";
386
+ readonly inputType: "password";
387
+ readonly hidden: true;
2462
388
  };
2463
- readonly name: {
389
+ readonly phone_number: {
2464
390
  readonly type: "string";
391
+ readonly mask: "(##) #####-####";
2465
392
  };
2466
- readonly absolute_path: {
2467
- readonly type: "string";
393
+ readonly picture_file: {
394
+ readonly $ref: "file";
395
+ readonly accept: readonly ["image/*"];
396
+ };
397
+ readonly picture: {
398
+ readonly getter: (value: any) => any;
2468
399
  };
2469
- readonly relative_path: {
400
+ readonly group: {
2470
401
  readonly type: "string";
2471
402
  };
2472
- readonly immutable: {
403
+ readonly self_registered: {
2473
404
  readonly type: "boolean";
405
+ readonly readOnly: true;
2474
406
  };
2475
- readonly link: {
2476
- readonly getter: (value: any) => Promise<string>;
2477
- };
2478
- readonly download_link: {
2479
- readonly getter: (value: any) => Promise<string>;
407
+ readonly updated_at: {
408
+ readonly type: "string";
409
+ readonly format: "date-time";
2480
410
  };
2481
411
  };
2482
- readonly actions: {
2483
- readonly deleteAll: {
2484
- readonly label: "Remover";
2485
- readonly ask: true;
2486
- readonly selection: true;
412
+ readonly presets: readonly ["crud", "view", "duplicate"];
413
+ readonly layout: {
414
+ readonly name: "grid";
415
+ readonly options: {
416
+ readonly title: "name";
417
+ readonly badge: "roles";
418
+ readonly picture: "picture_file";
419
+ readonly information: "email";
420
+ readonly active: "active";
2487
421
  };
2488
422
  };
2489
423
  readonly individualActions: {
2490
- readonly remove: {
2491
- readonly label: "Remover";
2492
- readonly icon: "trash";
2493
- readonly ask: true;
424
+ readonly 'ui:spawnEdit': {
425
+ readonly label: "action.edit";
426
+ readonly icon: "pencil";
427
+ readonly translate: true;
428
+ };
429
+ readonly 'route:/dashboard/user/changepass': {
430
+ readonly label: "change_password";
431
+ readonly icon: "key";
432
+ readonly fetchItem: true;
433
+ readonly translate: true;
434
+ };
435
+ readonly copyActivationLink: {
436
+ readonly label: "copy_activation_link";
437
+ readonly icon: "link";
438
+ readonly translate: true;
439
+ };
440
+ };
441
+ readonly filters: readonly ["name", "roles", "email", "phone_number"];
442
+ readonly table: readonly ["name", "roles", "picture_file", "active", "updated_at"];
443
+ readonly tableMeta: readonly ["email"];
444
+ readonly formLayout: {
445
+ readonly fields: {
446
+ readonly given_name: {
447
+ readonly span: 3;
448
+ };
449
+ readonly family_name: {
450
+ readonly span: 3;
451
+ };
2494
452
  };
2495
453
  };
2496
454
  }>;
2497
- } & Omit<Readonly<import("@aeriajs/types").FilterReadonlyProperties<{
455
+ }>;
456
+ readonly getActivationLink: (payload: {
457
+ userId: import("@aeriajs/core").ObjectId | string;
458
+ }, context: import("@aeriajs/types").Context) => Promise<{
459
+ readonly _tag: "Error";
460
+ readonly error: import("@aeriajs/types").StrictEndpointError<import("@aeriajs/types").ACError.ResourceNotFound | import("@aeriajs/types").ACError.MalformedInput, unknown, import("@aeriajs/types").HTTPStatus.BadRequest | import("@aeriajs/types").HTTPStatus.NotFound>;
461
+ readonly result: undefined;
462
+ } | import("@aeriajs/types").Result.Error<{
463
+ readonly code: import("./activate.js").ActivationError.AlreadyActiveUser;
464
+ } & {
465
+ httpStatus: import("@aeriajs/types").HTTPStatus.Forbidden;
466
+ }> | {
467
+ readonly _tag: "Result";
468
+ readonly error: undefined;
469
+ readonly result: {
470
+ readonly url: string;
471
+ };
472
+ }>;
473
+ };
474
+ contracts: {
475
+ readonly getCurrentUser: {
476
+ readonly response: {
477
+ readonly $ref: "user";
478
+ };
479
+ };
480
+ };
481
+ exposedFunctions: any;
482
+ } & {
483
+ item: import("@aeriajs/types").SchemaWithId<{
484
+ readonly $id: "user";
485
+ readonly icon: "users";
486
+ readonly required: readonly ["name", "roles", "email"];
487
+ readonly form: readonly ["name", "active", "roles", "email", "phone_number", "picture_file"];
488
+ readonly indexes: readonly ["name"];
489
+ readonly properties: {
2498
490
  readonly name: {
2499
491
  readonly type: "string";
2500
492
  };
@@ -2546,71 +538,57 @@ export declare const user: {
2546
538
  readonly type: "string";
2547
539
  readonly format: "date-time";
2548
540
  };
2549
- }>> & {
2550
- name: string;
2551
- password: string;
2552
- updated_at: Date;
2553
- roles: string[];
2554
- email: string;
2555
- active: boolean;
2556
- phone_number: string;
2557
- picture_file: never;
2558
- given_name: string;
2559
- family_name: string;
2560
- picture: any;
2561
- group: string;
2562
- }, "picture_file">, "name" | "roles" | "email"> & Partial<{
2563
- picture_file: import("@aeriajs/types").SchemaWithId<{
2564
- readonly $id: "file";
2565
- readonly owned: "always";
2566
- readonly presets: readonly ["owned"];
2567
- readonly indexes: readonly ["name", "link", "type"];
2568
- readonly properties: {
2569
- readonly type: {
2570
- readonly type: "string";
2571
- };
2572
- readonly size: {
2573
- readonly type: "number";
2574
- };
2575
- readonly last_modified: {
2576
- readonly type: "string";
2577
- readonly format: "date-time";
2578
- };
2579
- readonly name: {
2580
- readonly type: "string";
2581
- };
2582
- readonly absolute_path: {
2583
- readonly type: "string";
2584
- };
2585
- readonly relative_path: {
2586
- readonly type: "string";
2587
- };
2588
- readonly immutable: {
2589
- readonly type: "boolean";
2590
- };
2591
- readonly link: {
2592
- readonly getter: (value: any) => Promise<string>;
2593
- };
2594
- readonly download_link: {
2595
- readonly getter: (value: any) => Promise<string>;
2596
- };
2597
- };
2598
- readonly actions: {
2599
- readonly deleteAll: {
2600
- readonly label: "Remover";
2601
- readonly ask: true;
2602
- readonly selection: true;
2603
- };
541
+ };
542
+ readonly presets: readonly ["crud", "view", "duplicate"];
543
+ readonly layout: {
544
+ readonly name: "grid";
545
+ readonly options: {
546
+ readonly title: "name";
547
+ readonly badge: "roles";
548
+ readonly picture: "picture_file";
549
+ readonly information: "email";
550
+ readonly active: "active";
551
+ };
552
+ };
553
+ readonly individualActions: {
554
+ readonly 'ui:spawnEdit': {
555
+ readonly label: "action.edit";
556
+ readonly icon: "pencil";
557
+ readonly translate: true;
558
+ };
559
+ readonly 'route:/dashboard/user/changepass': {
560
+ readonly label: "change_password";
561
+ readonly icon: "key";
562
+ readonly fetchItem: true;
563
+ readonly translate: true;
564
+ };
565
+ readonly copyActivationLink: {
566
+ readonly label: "copy_activation_link";
567
+ readonly icon: "link";
568
+ readonly translate: true;
569
+ };
570
+ };
571
+ readonly filters: readonly ["name", "roles", "email", "phone_number"];
572
+ readonly table: readonly ["name", "roles", "picture_file", "active", "updated_at"];
573
+ readonly tableMeta: readonly ["email"];
574
+ readonly formLayout: {
575
+ readonly fields: {
576
+ readonly given_name: {
577
+ readonly span: 3;
2604
578
  };
2605
- readonly individualActions: {
2606
- readonly remove: {
2607
- readonly label: "Remover";
2608
- readonly icon: "trash";
2609
- readonly ask: true;
2610
- };
579
+ readonly family_name: {
580
+ readonly span: 3;
2611
581
  };
2612
- }>;
2613
- } & Omit<Readonly<import("@aeriajs/types").FilterReadonlyProperties<{
582
+ };
583
+ };
584
+ }>;
585
+ description: {
586
+ readonly $id: "user";
587
+ readonly icon: "users";
588
+ readonly required: readonly ["name", "roles", "email"];
589
+ readonly form: readonly ["name", "active", "roles", "email", "phone_number", "picture_file"];
590
+ readonly indexes: readonly ["name"];
591
+ readonly properties: {
2614
592
  readonly name: {
2615
593
  readonly type: "string";
2616
594
  };
@@ -2662,138 +640,88 @@ export declare const user: {
2662
640
  readonly type: "string";
2663
641
  readonly format: "date-time";
2664
642
  };
2665
- }>> & {
2666
- name: string;
2667
- password: string;
2668
- updated_at: Date;
2669
- roles: string[];
2670
- email: string;
2671
- active: boolean;
2672
- phone_number: string;
2673
- picture_file: never;
2674
- given_name: string;
2675
- family_name: string;
2676
- picture: any;
2677
- group: string;
2678
- }, "picture_file">> & {
2679
- updated_at?: Date | undefined;
2680
- created_at?: Date | undefined;
2681
- }, "roles">, context: import("@aeriajs/types").Context<{
2682
- readonly $id: "user";
2683
- readonly required: readonly ["name", "roles", "email"];
2684
- readonly form: readonly ["name", "active", "roles", "email", "phone_number", "picture_file"];
2685
- readonly indexes: readonly ["name"];
2686
- readonly properties: {
2687
- readonly name: {
2688
- readonly type: "string";
2689
- };
2690
- readonly given_name: {
2691
- readonly getter: (document: any) => string;
2692
- };
2693
- readonly family_name: {
2694
- readonly getter: (document: any) => string;
2695
- };
2696
- readonly active: {
2697
- readonly type: "boolean";
2698
- };
2699
- readonly roles: {
2700
- readonly type: "array";
2701
- readonly items: {
2702
- readonly type: "string";
2703
- };
2704
- readonly uniqueItems: true;
2705
- };
2706
- readonly email: {
2707
- readonly type: "string";
2708
- readonly inputType: "email";
2709
- readonly unique: true;
2710
- };
2711
- readonly password: {
2712
- readonly type: "string";
2713
- readonly inputType: "password";
2714
- readonly hidden: true;
2715
- };
2716
- readonly phone_number: {
2717
- readonly type: "string";
2718
- readonly mask: "(##) #####-####";
2719
- };
2720
- readonly picture_file: {
2721
- readonly $ref: "file";
2722
- readonly accept: readonly ["image/*"];
2723
- };
2724
- readonly picture: {
2725
- readonly getter: (value: any) => any;
2726
- };
2727
- readonly group: {
2728
- readonly type: "string";
2729
- };
2730
- readonly self_registered: {
2731
- readonly type: "boolean";
2732
- readonly readOnly: true;
2733
- };
2734
- readonly updated_at: {
2735
- readonly type: "string";
2736
- readonly format: "date-time";
2737
- };
643
+ };
644
+ readonly presets: readonly ["crud", "view", "duplicate"];
645
+ readonly layout: {
646
+ readonly name: "grid";
647
+ readonly options: {
648
+ readonly title: "name";
649
+ readonly badge: "roles";
650
+ readonly picture: "picture_file";
651
+ readonly information: "email";
652
+ readonly active: "active";
2738
653
  };
2739
- readonly presets: readonly ["crud", "view", "duplicate"];
2740
- readonly layout: {
2741
- readonly name: "grid";
2742
- readonly options: {
2743
- readonly title: "name";
2744
- readonly badge: "roles";
2745
- readonly picture: "picture_file";
2746
- readonly information: "email";
2747
- readonly active: "active";
2748
- };
654
+ };
655
+ readonly individualActions: {
656
+ readonly 'ui:spawnEdit': {
657
+ readonly label: "action.edit";
658
+ readonly icon: "pencil";
659
+ readonly translate: true;
660
+ };
661
+ readonly 'route:/dashboard/user/changepass': {
662
+ readonly label: "change_password";
663
+ readonly icon: "key";
664
+ readonly fetchItem: true;
665
+ readonly translate: true;
2749
666
  };
2750
- readonly individualActions: {
2751
- readonly 'ui:spawnEdit': {
2752
- readonly label: "action.edit";
2753
- readonly icon: "pencil";
2754
- readonly translate: true;
2755
- };
2756
- readonly 'route:/dashboard/user/changepass': {
2757
- readonly label: "change_password";
2758
- readonly icon: "key";
2759
- readonly fetchItem: true;
2760
- readonly translate: true;
2761
- };
2762
- readonly copyActivationLink: {
2763
- readonly label: "copy_activation_link";
2764
- readonly icon: "link";
2765
- readonly translate: true;
2766
- };
667
+ readonly copyActivationLink: {
668
+ readonly label: "copy_activation_link";
669
+ readonly icon: "link";
670
+ readonly translate: true;
2767
671
  };
2768
- readonly icon: "users";
2769
- readonly filters: readonly ["name", "roles", "email", "phone_number"];
2770
- readonly table: readonly ["name", "roles", "picture_file", "active", "updated_at"];
2771
- readonly tableMeta: readonly ["email"];
2772
- readonly formLayout: {
2773
- readonly fields: {
2774
- readonly given_name: {
2775
- readonly span: 3;
2776
- };
2777
- readonly family_name: {
2778
- readonly span: 3;
2779
- };
672
+ };
673
+ readonly filters: readonly ["name", "roles", "email", "phone_number"];
674
+ readonly table: readonly ["name", "roles", "picture_file", "active", "updated_at"];
675
+ readonly tableMeta: readonly ["email"];
676
+ readonly formLayout: {
677
+ readonly fields: {
678
+ readonly given_name: {
679
+ readonly span: 3;
680
+ };
681
+ readonly family_name: {
682
+ readonly span: 3;
2780
683
  };
2781
684
  };
2782
- }>) => Promise<import("@aeriajs/types").Result.Error<{
685
+ };
686
+ };
687
+ functions: {
688
+ readonly get: (payload: import("@aeriajs/types").GetPayload<import("@aeriajs/types").SchemaWithId<any>>, context: import("@aeriajs/types").StrictContext<any>, options?: import("@aeriajs/core").GetOptions) => Promise<import("@aeriajs/types").GetReturnType<any>>;
689
+ readonly getAll: (_payload: import("@aeriajs/types").GetAllPayload<import("@aeriajs/types").SchemaWithId<any>> | undefined, context: import("@aeriajs/types").StrictContext<any>, options?: import("@aeriajs/core").GetAllOptions) => Promise<{
690
+ readonly _tag: "Result";
691
+ readonly error: undefined;
692
+ readonly result: import("@aeriajs/types").SchemaWithId<any>[];
693
+ }>;
694
+ readonly remove: (payload: import("@aeriajs/types").RemovePayload<import("@aeriajs/types").SchemaWithId<any>>, context: import("@aeriajs/types").StrictContext<any>) => Promise<import("@aeriajs/types").Result.Error<{
695
+ readonly code: import("@aeriajs/types").ACError.ResourceNotFound;
696
+ } & {
697
+ httpStatus: import("@aeriajs/types").HTTPStatus.NotFound;
698
+ }> | {
699
+ readonly _tag: "Result";
700
+ readonly error: undefined;
701
+ readonly result: import("mongodb").WithId<Omit<import("@aeriajs/types").PackReferences<import("@aeriajs/types").SchemaWithId<import("@aeriajs/types").Description>>, "_id">> | null;
702
+ }>;
703
+ readonly upload: (_props: unknown, context: import("@aeriajs/types").StrictContext<any>) => Promise<import("@aeriajs/types").Result.Error<{
2783
704
  readonly code: import("@aeriajs/types").ACError.MalformedInput;
2784
705
  readonly details: import("@aeriajs/types").ValidationError | import("@aeriajs/types").PropertyValidationError;
2785
706
  } & {
2786
707
  httpStatus: import("@aeriajs/types").HTTPStatus.BadRequest;
2787
708
  }> | {
709
+ readonly _tag: "Result";
710
+ readonly error: undefined;
711
+ readonly result: {
712
+ readonly tempId: any;
713
+ };
714
+ }>;
715
+ readonly removeFile: (payload: import("@aeriajs/types").RemoveFilePayload, context: import("@aeriajs/types").StrictContext<any>) => Promise<{
2788
716
  readonly _tag: "Result";
2789
717
  readonly error: undefined;
2790
718
  readonly result: any;
2791
719
  }>;
2792
- readonly getInfo: (payload: {
2793
- userId: string;
2794
- token: string;
2795
- }, context: import("@aeriajs/types").Context<{
720
+ readonly insert: (payload: {
721
+ what: Omit<import("@aeriajs/types").PackReferences<import("@aeriajs/types").SchemaWithId<typeof description>>, "roles">;
722
+ }, context: import("@aeriajs/types").Context<typeof description>) => Promise<import("@aeriajs/types").InsertReturnType<import("@aeriajs/types").SchemaWithId<{
2796
723
  readonly $id: "user";
724
+ readonly icon: "users";
2797
725
  readonly required: readonly ["name", "roles", "email"];
2798
726
  readonly form: readonly ["name", "active", "roles", "email", "phone_number", "picture_file"];
2799
727
  readonly indexes: readonly ["name"];
@@ -2879,7 +807,6 @@ export declare const user: {
2879
807
  readonly translate: true;
2880
808
  };
2881
809
  };
2882
- readonly icon: "users";
2883
810
  readonly filters: readonly ["name", "roles", "email", "phone_number"];
2884
811
  readonly table: readonly ["name", "roles", "picture_file", "active", "updated_at"];
2885
812
  readonly tableMeta: readonly ["email"];
@@ -2893,7 +820,96 @@ export declare const user: {
2893
820
  };
2894
821
  };
2895
822
  };
2896
- }>) => Promise<import("@aeriajs/types").Result.Error<{
823
+ }>>>;
824
+ readonly authenticate: (props: {
825
+ email: string;
826
+ password: string;
827
+ } | {
828
+ token?: import("@aeriajs/types").TokenRecipient;
829
+ revalidate: true;
830
+ }, context: import("@aeriajs/types").Context<typeof description>) => Promise<import("@aeriajs/types").Result.Error<{
831
+ readonly code: import("@aeriajs/types").ACError.AuthorizationError;
832
+ } & {
833
+ httpStatus: import("@aeriajs/types").HTTPStatus.Unauthorized;
834
+ }> | {
835
+ readonly _tag: "Result";
836
+ readonly error: undefined;
837
+ readonly result: {
838
+ user: Pick<import("@aeriajs/types").SchemaWithId<typeof description>, "name" | "email" | "roles" | "active"> & {
839
+ _id: import("@aeriajs/core").ObjectId | null;
840
+ };
841
+ token: import("@aeriajs/types").TokenRecipient;
842
+ } | {
843
+ user: {
844
+ _id: null;
845
+ name: string;
846
+ email: string;
847
+ roles: string[];
848
+ active: boolean;
849
+ };
850
+ token: {
851
+ type: string;
852
+ content: string;
853
+ };
854
+ };
855
+ } | import("@aeriajs/types").Result.Error<{
856
+ readonly code: import("./authenticate.js").AuthenticationError.InvalidCredentials;
857
+ } & {
858
+ httpStatus: import("@aeriajs/types").HTTPStatus.Unauthorized;
859
+ }> | import("@aeriajs/types").Result.Error<{
860
+ readonly code: import("./authenticate.js").AuthenticationError.InactiveUser;
861
+ } & {
862
+ httpStatus: import("@aeriajs/types").HTTPStatus.Unauthorized;
863
+ }>>;
864
+ readonly activate: (payload: {
865
+ password: string;
866
+ }, context: import("@aeriajs/types").Context<typeof description> & {
867
+ request: {
868
+ query: {
869
+ u?: string;
870
+ t?: string;
871
+ };
872
+ payload: {
873
+ password?: string;
874
+ };
875
+ };
876
+ }) => Promise<import("@aeriajs/types").GenericResponse | import("@aeriajs/types").Result.Error<{
877
+ readonly code: import("./activate.js").ActivationError.InvalidLink;
878
+ } & {
879
+ httpStatus: import("@aeriajs/types").HTTPStatus.NotFound;
880
+ }> | import("@aeriajs/types").Result.Error<{
881
+ readonly code: import("./activate.js").ActivationError.UserNotFound;
882
+ } & {
883
+ httpStatus: import("@aeriajs/types").HTTPStatus.NotFound;
884
+ }> | import("@aeriajs/types").Result.Error<{
885
+ readonly code: import("./activate.js").ActivationError.AlreadyActiveUser;
886
+ } & {
887
+ httpStatus: import("@aeriajs/types").HTTPStatus.Forbidden;
888
+ }> | import("@aeriajs/types").Result.Error<{
889
+ readonly code: import("@aeriajs/types").ACError.MalformedInput;
890
+ } & {
891
+ httpStatus: import("@aeriajs/types").HTTPStatus.UnprocessableContent;
892
+ }> | {
893
+ readonly _tag: "Result";
894
+ readonly error: undefined;
895
+ readonly result: {
896
+ readonly userId: any;
897
+ };
898
+ } | undefined>;
899
+ readonly createAccount: (payload: Omit<import("@aeriajs/types").Schema<typeof description>, "roles">, context: import("@aeriajs/types").Context<typeof description>) => Promise<import("@aeriajs/types").Result.Error<{
900
+ readonly code: import("@aeriajs/types").ACError.MalformedInput;
901
+ readonly details: import("@aeriajs/types").ValidationError | import("@aeriajs/types").PropertyValidationError;
902
+ } & {
903
+ httpStatus: import("@aeriajs/types").HTTPStatus.BadRequest;
904
+ }> | {
905
+ readonly _tag: "Result";
906
+ readonly error: undefined;
907
+ readonly result: any;
908
+ }>;
909
+ readonly getInfo: (payload: {
910
+ userId: string;
911
+ token: string;
912
+ }, context: import("@aeriajs/types").Context<typeof description>) => Promise<import("@aeriajs/types").Result.Error<{
2897
913
  readonly code: import("./getInfo.js").ActivationError.InvalidLink;
2898
914
  } & {
2899
915
  httpStatus: import("@aeriajs/types").HTTPStatus.NotFound;
@@ -2913,112 +929,12 @@ export declare const user: {
2913
929
  readonly email: any;
2914
930
  };
2915
931
  }>;
2916
- readonly getCurrentUser: (_payload: undefined, context: import("@aeriajs/types").Context<{
2917
- readonly $id: "user";
2918
- readonly required: readonly ["name", "roles", "email"];
2919
- readonly form: readonly ["name", "active", "roles", "email", "phone_number", "picture_file"];
2920
- readonly indexes: readonly ["name"];
2921
- readonly properties: {
2922
- readonly name: {
2923
- readonly type: "string";
2924
- };
2925
- readonly given_name: {
2926
- readonly getter: (document: any) => string;
2927
- };
2928
- readonly family_name: {
2929
- readonly getter: (document: any) => string;
2930
- };
2931
- readonly active: {
2932
- readonly type: "boolean";
2933
- };
2934
- readonly roles: {
2935
- readonly type: "array";
2936
- readonly items: {
2937
- readonly type: "string";
2938
- };
2939
- readonly uniqueItems: true;
2940
- };
2941
- readonly email: {
2942
- readonly type: "string";
2943
- readonly inputType: "email";
2944
- readonly unique: true;
2945
- };
2946
- readonly password: {
2947
- readonly type: "string";
2948
- readonly inputType: "password";
2949
- readonly hidden: true;
2950
- };
2951
- readonly phone_number: {
2952
- readonly type: "string";
2953
- readonly mask: "(##) #####-####";
2954
- };
2955
- readonly picture_file: {
2956
- readonly $ref: "file";
2957
- readonly accept: readonly ["image/*"];
2958
- };
2959
- readonly picture: {
2960
- readonly getter: (value: any) => any;
2961
- };
2962
- readonly group: {
2963
- readonly type: "string";
2964
- };
2965
- readonly self_registered: {
2966
- readonly type: "boolean";
2967
- readonly readOnly: true;
2968
- };
2969
- readonly updated_at: {
2970
- readonly type: "string";
2971
- readonly format: "date-time";
2972
- };
2973
- };
2974
- readonly presets: readonly ["crud", "view", "duplicate"];
2975
- readonly layout: {
2976
- readonly name: "grid";
2977
- readonly options: {
2978
- readonly title: "name";
2979
- readonly badge: "roles";
2980
- readonly picture: "picture_file";
2981
- readonly information: "email";
2982
- readonly active: "active";
2983
- };
2984
- };
2985
- readonly individualActions: {
2986
- readonly 'ui:spawnEdit': {
2987
- readonly label: "action.edit";
2988
- readonly icon: "pencil";
2989
- readonly translate: true;
2990
- };
2991
- readonly 'route:/dashboard/user/changepass': {
2992
- readonly label: "change_password";
2993
- readonly icon: "key";
2994
- readonly fetchItem: true;
2995
- readonly translate: true;
2996
- };
2997
- readonly copyActivationLink: {
2998
- readonly label: "copy_activation_link";
2999
- readonly icon: "link";
3000
- readonly translate: true;
3001
- };
3002
- };
3003
- readonly icon: "users";
3004
- readonly filters: readonly ["name", "roles", "email", "phone_number"];
3005
- readonly table: readonly ["name", "roles", "picture_file", "active", "updated_at"];
3006
- readonly tableMeta: readonly ["email"];
3007
- readonly formLayout: {
3008
- readonly fields: {
3009
- readonly given_name: {
3010
- readonly span: 3;
3011
- };
3012
- readonly family_name: {
3013
- readonly span: 3;
3014
- };
3015
- };
3016
- };
3017
- }>) => Promise<{
932
+ readonly getCurrentUser: (_payload: undefined, context: import("@aeriajs/types").Context<typeof description>) => Promise<{
3018
933
  readonly _tag: "Result";
3019
934
  readonly error: undefined;
3020
935
  readonly result: import("@aeriajs/types").SchemaWithId<{
3021
936
  readonly $id: "user";
937
+ readonly icon: "users";
3022
938
  readonly required: readonly ["name", "roles", "email"];
3023
939
  readonly form: readonly ["name", "active", "roles", "email", "phone_number", "picture_file"];
3024
940
  readonly indexes: readonly ["name"];
@@ -3104,7 +1020,6 @@ export declare const user: {
3104
1020
  readonly translate: true;
3105
1021
  };
3106
1022
  };
3107
- readonly icon: "users";
3108
1023
  readonly filters: readonly ["name", "roles", "email", "phone_number"];
3109
1024
  readonly table: readonly ["name", "roles", "picture_file", "active", "updated_at"];
3110
1025
  readonly tableMeta: readonly ["email"];
@@ -3121,7 +1036,7 @@ export declare const user: {
3121
1036
  }>;
3122
1037
  }>;
3123
1038
  readonly getActivationLink: (payload: {
3124
- userId: string | import("@aeriajs/core").ObjectId;
1039
+ userId: import("@aeriajs/core").ObjectId | string;
3125
1040
  }, context: import("@aeriajs/types").Context) => Promise<{
3126
1041
  readonly _tag: "Error";
3127
1042
  readonly error: import("@aeriajs/types").StrictEndpointError<import("@aeriajs/types").ACError.ResourceNotFound | import("@aeriajs/types").ACError.MalformedInput, unknown, import("@aeriajs/types").HTTPStatus.BadRequest | import("@aeriajs/types").HTTPStatus.NotFound>;