@aeriajs/builtins 0.0.162 → 0.0.164

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.
@@ -11,10 +11,10 @@ export declare const user: {
11
11
  readonly type: "string";
12
12
  };
13
13
  readonly given_name: {
14
- readonly getter: (document: any) => any;
14
+ readonly getter: (doc: object) => string | undefined;
15
15
  };
16
16
  readonly family_name: {
17
- readonly getter: (document: any) => any;
17
+ readonly getter: (doc: object) => string | undefined;
18
18
  };
19
19
  readonly active: {
20
20
  readonly type: "boolean";
@@ -45,7 +45,7 @@ export declare const user: {
45
45
  readonly accept: readonly ["image/*"];
46
46
  };
47
47
  readonly picture: {
48
- readonly getter: (value: any) => any;
48
+ readonly getter: (doc: object) => string | undefined;
49
49
  };
50
50
  readonly group: {
51
51
  readonly type: "string";
@@ -101,17 +101,9 @@ export declare const user: {
101
101
  };
102
102
  };
103
103
  functions: {
104
- 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<import("@aeriajs/types").SchemaWithId<any>>>;
105
- 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<{
106
- readonly _tag: "Error";
107
- readonly error: import("@aeriajs/types").ACError.InvalidLimit | import("@aeriajs/types").ACError.OwnershipError;
108
- readonly result: undefined;
109
- } | {
110
- readonly _tag: "Result";
111
- readonly error: undefined;
112
- readonly result: import("@aeriajs/types").SchemaWithId<any>[];
113
- }>;
114
- readonly remove: (payload: import("@aeriajs/types").RemovePayload<import("@aeriajs/types").SchemaWithId<any>>, context: import("@aeriajs/types").StrictContext<any>, options?: import("@aeriajs/core").RemoveOptions) => Promise<{
104
+ get: <TContext extends import("@aeriajs/types").Context>(payload: import("@aeriajs/types").GetPayload<import("@aeriajs/types").SchemaWithId<TContext["description"]>>, context: TContext, options?: import("@aeriajs/core").GetOptions) => Promise<import("@aeriajs/types").GetReturnType<import("@aeriajs/types").SchemaWithId<TContext["description"]>>>;
105
+ getAll: <TContext extends import("@aeriajs/types").Context>(payload: import("@aeriajs/types").GetAllPayload<import("@aeriajs/types").SchemaWithId<TContext["description"]>> | undefined, context: TContext, options?: import("@aeriajs/core").GetAllOptions) => Promise<import("@aeriajs/types").Result.Either<any, any>>;
106
+ remove: <TContext extends import("@aeriajs/types").Context>(payload: import("@aeriajs/types").RemovePayload<import("@aeriajs/types").SchemaWithId<TContext["description"]>>, context: TContext, options?: import("@aeriajs/core").RemoveOptions) => Promise<{
115
107
  readonly _tag: "Result";
116
108
  readonly error: undefined;
117
109
  readonly result: import("mongodb").WithId<Omit<import("@aeriajs/types").PackReferences<import("@aeriajs/types").SchemaWithId<import("@aeriajs/types").Description>>, "_id">> | null;
@@ -124,7 +116,7 @@ export declare const user: {
124
116
  } & {
125
117
  httpStatus: import("@aeriajs/types").HTTPStatus.Forbidden;
126
118
  }>>;
127
- readonly upload: (_props: unknown, context: import("@aeriajs/types").StrictContext<any>) => Promise<import("@aeriajs/types").Result.Error<{
119
+ upload: <TContext extends import("@aeriajs/types").Context>(_props: unknown, context: TContext) => Promise<import("@aeriajs/types").Result.Error<{
128
120
  readonly code: import("@aeriajs/types").ACError.MalformedInput;
129
121
  readonly details: import("@aeriajs/types").ValidationError | import("@aeriajs/types").PropertyValidationError;
130
122
  } & {
@@ -136,7 +128,7 @@ export declare const user: {
136
128
  readonly tempId: any;
137
129
  };
138
130
  }>;
139
- readonly removeFile: (payload: import("@aeriajs/types").RemoveFilePayload, context: import("@aeriajs/types").StrictContext<any>, options?: import("@aeriajs/core").RemoveFileOptions) => Promise<{
131
+ removeFile: <TContext extends import("@aeriajs/types").Context>(payload: import("@aeriajs/types").RemoveFilePayload, context: TContext, options?: import("@aeriajs/core").RemoveFileOptions) => Promise<{
140
132
  readonly _tag: "Result";
141
133
  readonly error: undefined;
142
134
  readonly result: any;
@@ -145,8 +137,8 @@ export declare const user: {
145
137
  } & {
146
138
  httpStatus: import("@aeriajs/types").HTTPStatus.Forbidden;
147
139
  }>>;
148
- readonly insert: (payload: NoInfer<import("@aeriajs/types").InsertPayload<import("@aeriajs/types").SchemaWithId<any>>>, context: import("@aeriajs/types").Context<any>) => Promise<import("@aeriajs/types").InsertReturnType<import("@aeriajs/types").SchemaWithId<any>>>;
149
- readonly authenticate: (props: {
140
+ insert: <TDescription extends import("@aeriajs/types").Description, TInsertPayload extends import("@aeriajs/types").InsertPayload<import("@aeriajs/types").SchemaWithId<TDescription>>>(payload: NoInfer<TInsertPayload>, context: import("@aeriajs/types").Context<TDescription>) => Promise<import("@aeriajs/types").InsertReturnType<import("@aeriajs/types").SchemaWithId<TDescription>>>;
141
+ authenticate: (props: {
150
142
  email: string;
151
143
  password: string;
152
144
  } | {
@@ -185,7 +177,7 @@ export declare const user: {
185
177
  } & {
186
178
  httpStatus: import("@aeriajs/types").HTTPStatus.Unauthorized;
187
179
  }>>;
188
- readonly activate: (payload: {
180
+ activate: (payload: {
189
181
  password: string;
190
182
  }, context: import("@aeriajs/types").Context<typeof description> & {
191
183
  request: {
@@ -220,17 +212,116 @@ export declare const user: {
220
212
  readonly userId: any;
221
213
  };
222
214
  } | undefined>;
223
- readonly createAccount: (payload: Partial<import("@aeriajs/types").SchemaWithId<typeof description>>, context: import("@aeriajs/types").Context<typeof description>) => Promise<import("@aeriajs/types").Result.Error<{
215
+ createAccount: (payload: Partial<import("@aeriajs/types").SchemaWithId<typeof description>>, context: import("@aeriajs/types").Context<typeof description>) => Promise<import("@aeriajs/types").Result.Error<{
216
+ readonly code: import("./createAccount.js").CreateAccountError;
217
+ } & {
218
+ httpStatus: import("@aeriajs/types").HTTPStatus.Forbidden;
219
+ }> | import("@aeriajs/types").Result.Error<{
224
220
  readonly code: import("@aeriajs/types").ACError.MalformedInput;
225
- readonly details: import("@aeriajs/types").ValidationError | import("@aeriajs/types").PropertyValidationError;
221
+ readonly details: import("@aeriajs/types").PropertyValidationError | import("@aeriajs/types").ValidationError;
226
222
  } & {
227
223
  httpStatus: import("@aeriajs/types").HTTPStatus.BadRequest;
228
- }> | {
229
- readonly _tag: "Result";
230
- readonly error: undefined;
231
- readonly result: any;
232
- }>;
233
- readonly getInfo: (payload: {
224
+ }> | import("@aeriajs/types").InsertReturnType<import("@aeriajs/types").SchemaWithId<{
225
+ readonly $id: "user";
226
+ readonly icon: "users";
227
+ readonly required: readonly ["name", "roles", "email"];
228
+ readonly form: readonly ["name", "active", "roles", "email", "phone_number", "picture_file"];
229
+ readonly indexes: readonly ["name"];
230
+ readonly properties: {
231
+ readonly name: {
232
+ readonly type: "string";
233
+ };
234
+ readonly given_name: {
235
+ readonly getter: (doc: object) => string | undefined;
236
+ };
237
+ readonly family_name: {
238
+ readonly getter: (doc: object) => string | undefined;
239
+ };
240
+ readonly active: {
241
+ readonly type: "boolean";
242
+ };
243
+ readonly roles: {
244
+ readonly type: "array";
245
+ readonly items: {
246
+ readonly type: "string";
247
+ };
248
+ readonly uniqueItems: true;
249
+ };
250
+ readonly email: {
251
+ readonly type: "string";
252
+ readonly inputType: "email";
253
+ readonly unique: true;
254
+ };
255
+ readonly password: {
256
+ readonly type: "string";
257
+ readonly inputType: "password";
258
+ readonly hidden: true;
259
+ };
260
+ readonly phone_number: {
261
+ readonly type: "string";
262
+ readonly mask: "(##) #####-####";
263
+ };
264
+ readonly picture_file: {
265
+ readonly $ref: "file";
266
+ readonly accept: readonly ["image/*"];
267
+ };
268
+ readonly picture: {
269
+ readonly getter: (doc: object) => string | undefined;
270
+ };
271
+ readonly group: {
272
+ readonly type: "string";
273
+ };
274
+ readonly self_registered: {
275
+ readonly type: "boolean";
276
+ readonly readOnly: true;
277
+ };
278
+ readonly updated_at: {
279
+ readonly type: "string";
280
+ readonly format: "date-time";
281
+ };
282
+ };
283
+ readonly presets: readonly ["crud", "duplicate"];
284
+ readonly layout: {
285
+ readonly name: "grid";
286
+ readonly options: {
287
+ readonly title: "name";
288
+ readonly badge: "roles";
289
+ readonly picture: "picture_file";
290
+ readonly information: "email";
291
+ readonly active: "active";
292
+ };
293
+ };
294
+ readonly individualActions: {
295
+ readonly changePassword: {
296
+ readonly label: "change_password";
297
+ readonly icon: "key";
298
+ readonly translate: true;
299
+ readonly route: {
300
+ readonly name: "/dashboard/user/changepass";
301
+ readonly fetchItem: true;
302
+ };
303
+ };
304
+ readonly copyActivationLink: {
305
+ readonly label: "copy_activation_link";
306
+ readonly icon: "link";
307
+ readonly translate: true;
308
+ };
309
+ };
310
+ readonly filters: readonly ["name", "roles", "email", "phone_number"];
311
+ readonly table: readonly ["name", "roles", "picture_file", "active", "updated_at"];
312
+ readonly tableMeta: readonly ["email"];
313
+ readonly formLayout: {
314
+ readonly fields: {
315
+ readonly given_name: {
316
+ readonly span: 3;
317
+ };
318
+ readonly family_name: {
319
+ readonly span: 3;
320
+ };
321
+ };
322
+ };
323
+ }>>>;
324
+ getInfo: (payload: {
234
325
  userId: string;
235
326
  token: string;
236
327
  }, context: import("@aeriajs/types").Context<typeof description>) => Promise<import("@aeriajs/types").Result.Error<{
@@ -253,7 +344,7 @@ export declare const user: {
253
344
  readonly email: any;
254
345
  };
255
346
  }>;
256
- readonly getCurrentUser: (_payload: undefined, context: import("@aeriajs/types").Context<typeof description>) => Promise<{
347
+ getCurrentUser: (_payload: undefined, context: import("@aeriajs/types").Context<typeof description>) => Promise<{
257
348
  readonly _tag: "Result";
258
349
  readonly error: undefined;
259
350
  readonly result: import("@aeriajs/types").SchemaWithId<{
@@ -267,10 +358,10 @@ export declare const user: {
267
358
  readonly type: "string";
268
359
  };
269
360
  readonly given_name: {
270
- readonly getter: (document: any) => any;
361
+ readonly getter: (doc: object) => string | undefined;
271
362
  };
272
363
  readonly family_name: {
273
- readonly getter: (document: any) => any;
364
+ readonly getter: (doc: object) => string | undefined;
274
365
  };
275
366
  readonly active: {
276
367
  readonly type: "boolean";
@@ -301,7 +392,7 @@ export declare const user: {
301
392
  readonly accept: readonly ["image/*"];
302
393
  };
303
394
  readonly picture: {
304
- readonly getter: (value: any) => any;
395
+ readonly getter: (doc: object) => string | undefined;
305
396
  };
306
397
  readonly group: {
307
398
  readonly type: "string";
@@ -357,7 +448,7 @@ export declare const user: {
357
448
  };
358
449
  }>;
359
450
  }>;
360
- readonly getActivationLink: (payload: {
451
+ getActivationLink: (payload: {
361
452
  userId: import("@aeriajs/core").ObjectId | string;
362
453
  }, context: import("@aeriajs/types").Context) => Promise<{
363
454
  readonly _tag: "Error";
@@ -395,10 +486,10 @@ export declare const user: {
395
486
  readonly type: "string";
396
487
  };
397
488
  readonly given_name: {
398
- readonly getter: (document: any) => any;
489
+ readonly getter: (doc: object) => string | undefined;
399
490
  };
400
491
  readonly family_name: {
401
- readonly getter: (document: any) => any;
492
+ readonly getter: (doc: object) => string | undefined;
402
493
  };
403
494
  readonly active: {
404
495
  readonly type: "boolean";
@@ -429,7 +520,7 @@ export declare const user: {
429
520
  readonly accept: readonly ["image/*"];
430
521
  };
431
522
  readonly picture: {
432
- readonly getter: (value: any) => any;
523
+ readonly getter: (doc: object) => string | undefined;
433
524
  };
434
525
  readonly group: {
435
526
  readonly type: "string";
@@ -495,10 +586,10 @@ export declare const user: {
495
586
  readonly type: "string";
496
587
  };
497
588
  readonly given_name: {
498
- readonly getter: (document: any) => any;
589
+ readonly getter: (doc: object) => string | undefined;
499
590
  };
500
591
  readonly family_name: {
501
- readonly getter: (document: any) => any;
592
+ readonly getter: (doc: object) => string | undefined;
502
593
  };
503
594
  readonly active: {
504
595
  readonly type: "boolean";
@@ -529,7 +620,7 @@ export declare const user: {
529
620
  readonly accept: readonly ["image/*"];
530
621
  };
531
622
  readonly picture: {
532
- readonly getter: (value: any) => any;
623
+ readonly getter: (doc: object) => string | undefined;
533
624
  };
534
625
  readonly group: {
535
626
  readonly type: "string";
@@ -585,17 +676,9 @@ export declare const user: {
585
676
  };
586
677
  };
587
678
  functions: {
588
- 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<import("@aeriajs/types").SchemaWithId<any>>>;
589
- 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<{
590
- readonly _tag: "Error";
591
- readonly error: import("@aeriajs/types").ACError.InvalidLimit | import("@aeriajs/types").ACError.OwnershipError;
592
- readonly result: undefined;
593
- } | {
594
- readonly _tag: "Result";
595
- readonly error: undefined;
596
- readonly result: import("@aeriajs/types").SchemaWithId<any>[];
597
- }>;
598
- readonly remove: (payload: import("@aeriajs/types").RemovePayload<import("@aeriajs/types").SchemaWithId<any>>, context: import("@aeriajs/types").StrictContext<any>, options?: import("@aeriajs/core").RemoveOptions) => Promise<{
679
+ get: <TContext extends import("@aeriajs/types").Context>(payload: import("@aeriajs/types").GetPayload<import("@aeriajs/types").SchemaWithId<TContext["description"]>>, context: TContext, options?: import("@aeriajs/core").GetOptions) => Promise<import("@aeriajs/types").GetReturnType<import("@aeriajs/types").SchemaWithId<TContext["description"]>>>;
680
+ getAll: <TContext extends import("@aeriajs/types").Context>(payload: import("@aeriajs/types").GetAllPayload<import("@aeriajs/types").SchemaWithId<TContext["description"]>> | undefined, context: TContext, options?: import("@aeriajs/core").GetAllOptions) => Promise<import("@aeriajs/types").Result.Either<any, any>>;
681
+ remove: <TContext extends import("@aeriajs/types").Context>(payload: import("@aeriajs/types").RemovePayload<import("@aeriajs/types").SchemaWithId<TContext["description"]>>, context: TContext, options?: import("@aeriajs/core").RemoveOptions) => Promise<{
599
682
  readonly _tag: "Result";
600
683
  readonly error: undefined;
601
684
  readonly result: import("mongodb").WithId<Omit<import("@aeriajs/types").PackReferences<import("@aeriajs/types").SchemaWithId<import("@aeriajs/types").Description>>, "_id">> | null;
@@ -608,7 +691,7 @@ export declare const user: {
608
691
  } & {
609
692
  httpStatus: import("@aeriajs/types").HTTPStatus.Forbidden;
610
693
  }>>;
611
- readonly upload: (_props: unknown, context: import("@aeriajs/types").StrictContext<any>) => Promise<import("@aeriajs/types").Result.Error<{
694
+ upload: <TContext extends import("@aeriajs/types").Context>(_props: unknown, context: TContext) => Promise<import("@aeriajs/types").Result.Error<{
612
695
  readonly code: import("@aeriajs/types").ACError.MalformedInput;
613
696
  readonly details: import("@aeriajs/types").ValidationError | import("@aeriajs/types").PropertyValidationError;
614
697
  } & {
@@ -620,7 +703,7 @@ export declare const user: {
620
703
  readonly tempId: any;
621
704
  };
622
705
  }>;
623
- readonly removeFile: (payload: import("@aeriajs/types").RemoveFilePayload, context: import("@aeriajs/types").StrictContext<any>, options?: import("@aeriajs/core").RemoveFileOptions) => Promise<{
706
+ removeFile: <TContext extends import("@aeriajs/types").Context>(payload: import("@aeriajs/types").RemoveFilePayload, context: TContext, options?: import("@aeriajs/core").RemoveFileOptions) => Promise<{
624
707
  readonly _tag: "Result";
625
708
  readonly error: undefined;
626
709
  readonly result: any;
@@ -629,8 +712,8 @@ export declare const user: {
629
712
  } & {
630
713
  httpStatus: import("@aeriajs/types").HTTPStatus.Forbidden;
631
714
  }>>;
632
- readonly insert: (payload: NoInfer<import("@aeriajs/types").InsertPayload<import("@aeriajs/types").SchemaWithId<any>>>, context: import("@aeriajs/types").Context<any>) => Promise<import("@aeriajs/types").InsertReturnType<import("@aeriajs/types").SchemaWithId<any>>>;
633
- readonly authenticate: (props: {
715
+ insert: <TDescription extends import("@aeriajs/types").Description, TInsertPayload extends import("@aeriajs/types").InsertPayload<import("@aeriajs/types").SchemaWithId<TDescription>>>(payload: NoInfer<TInsertPayload>, context: import("@aeriajs/types").Context<TDescription>) => Promise<import("@aeriajs/types").InsertReturnType<import("@aeriajs/types").SchemaWithId<TDescription>>>;
716
+ authenticate: (props: {
634
717
  email: string;
635
718
  password: string;
636
719
  } | {
@@ -669,7 +752,7 @@ export declare const user: {
669
752
  } & {
670
753
  httpStatus: import("@aeriajs/types").HTTPStatus.Unauthorized;
671
754
  }>>;
672
- readonly activate: (payload: {
755
+ activate: (payload: {
673
756
  password: string;
674
757
  }, context: import("@aeriajs/types").Context<typeof description> & {
675
758
  request: {
@@ -704,17 +787,116 @@ export declare const user: {
704
787
  readonly userId: any;
705
788
  };
706
789
  } | undefined>;
707
- readonly createAccount: (payload: Partial<import("@aeriajs/types").SchemaWithId<typeof description>>, context: import("@aeriajs/types").Context<typeof description>) => Promise<import("@aeriajs/types").Result.Error<{
790
+ createAccount: (payload: Partial<import("@aeriajs/types").SchemaWithId<typeof description>>, context: import("@aeriajs/types").Context<typeof description>) => Promise<import("@aeriajs/types").Result.Error<{
791
+ readonly code: import("./createAccount.js").CreateAccountError;
792
+ } & {
793
+ httpStatus: import("@aeriajs/types").HTTPStatus.Forbidden;
794
+ }> | import("@aeriajs/types").Result.Error<{
708
795
  readonly code: import("@aeriajs/types").ACError.MalformedInput;
709
- readonly details: import("@aeriajs/types").ValidationError | import("@aeriajs/types").PropertyValidationError;
796
+ readonly details: import("@aeriajs/types").PropertyValidationError | import("@aeriajs/types").ValidationError;
710
797
  } & {
711
798
  httpStatus: import("@aeriajs/types").HTTPStatus.BadRequest;
712
- }> | {
713
- readonly _tag: "Result";
714
- readonly error: undefined;
715
- readonly result: any;
716
- }>;
717
- readonly getInfo: (payload: {
799
+ }> | import("@aeriajs/types").InsertReturnType<import("@aeriajs/types").SchemaWithId<{
800
+ readonly $id: "user";
801
+ readonly icon: "users";
802
+ readonly required: readonly ["name", "roles", "email"];
803
+ readonly form: readonly ["name", "active", "roles", "email", "phone_number", "picture_file"];
804
+ readonly indexes: readonly ["name"];
805
+ readonly properties: {
806
+ readonly name: {
807
+ readonly type: "string";
808
+ };
809
+ readonly given_name: {
810
+ readonly getter: (doc: object) => string | undefined;
811
+ };
812
+ readonly family_name: {
813
+ readonly getter: (doc: object) => string | undefined;
814
+ };
815
+ readonly active: {
816
+ readonly type: "boolean";
817
+ };
818
+ readonly roles: {
819
+ readonly type: "array";
820
+ readonly items: {
821
+ readonly type: "string";
822
+ };
823
+ readonly uniqueItems: true;
824
+ };
825
+ readonly email: {
826
+ readonly type: "string";
827
+ readonly inputType: "email";
828
+ readonly unique: true;
829
+ };
830
+ readonly password: {
831
+ readonly type: "string";
832
+ readonly inputType: "password";
833
+ readonly hidden: true;
834
+ };
835
+ readonly phone_number: {
836
+ readonly type: "string";
837
+ readonly mask: "(##) #####-####";
838
+ };
839
+ readonly picture_file: {
840
+ readonly $ref: "file";
841
+ readonly accept: readonly ["image/*"];
842
+ };
843
+ readonly picture: {
844
+ readonly getter: (doc: object) => string | undefined;
845
+ };
846
+ readonly group: {
847
+ readonly type: "string";
848
+ };
849
+ readonly self_registered: {
850
+ readonly type: "boolean";
851
+ readonly readOnly: true;
852
+ };
853
+ readonly updated_at: {
854
+ readonly type: "string";
855
+ readonly format: "date-time";
856
+ };
857
+ };
858
+ readonly presets: readonly ["crud", "duplicate"];
859
+ readonly layout: {
860
+ readonly name: "grid";
861
+ readonly options: {
862
+ readonly title: "name";
863
+ readonly badge: "roles";
864
+ readonly picture: "picture_file";
865
+ readonly information: "email";
866
+ readonly active: "active";
867
+ };
868
+ };
869
+ readonly individualActions: {
870
+ readonly changePassword: {
871
+ readonly label: "change_password";
872
+ readonly icon: "key";
873
+ readonly translate: true;
874
+ readonly route: {
875
+ readonly name: "/dashboard/user/changepass";
876
+ readonly fetchItem: true;
877
+ };
878
+ };
879
+ readonly copyActivationLink: {
880
+ readonly label: "copy_activation_link";
881
+ readonly icon: "link";
882
+ readonly translate: true;
883
+ };
884
+ };
885
+ readonly filters: readonly ["name", "roles", "email", "phone_number"];
886
+ readonly table: readonly ["name", "roles", "picture_file", "active", "updated_at"];
887
+ readonly tableMeta: readonly ["email"];
888
+ readonly formLayout: {
889
+ readonly fields: {
890
+ readonly given_name: {
891
+ readonly span: 3;
892
+ };
893
+ readonly family_name: {
894
+ readonly span: 3;
895
+ };
896
+ };
897
+ };
898
+ }>>>;
899
+ getInfo: (payload: {
718
900
  userId: string;
719
901
  token: string;
720
902
  }, context: import("@aeriajs/types").Context<typeof description>) => Promise<import("@aeriajs/types").Result.Error<{
@@ -737,7 +919,7 @@ export declare const user: {
737
919
  readonly email: any;
738
920
  };
739
921
  }>;
740
- readonly getCurrentUser: (_payload: undefined, context: import("@aeriajs/types").Context<typeof description>) => Promise<{
922
+ getCurrentUser: (_payload: undefined, context: import("@aeriajs/types").Context<typeof description>) => Promise<{
741
923
  readonly _tag: "Result";
742
924
  readonly error: undefined;
743
925
  readonly result: import("@aeriajs/types").SchemaWithId<{
@@ -751,10 +933,10 @@ export declare const user: {
751
933
  readonly type: "string";
752
934
  };
753
935
  readonly given_name: {
754
- readonly getter: (document: any) => any;
936
+ readonly getter: (doc: object) => string | undefined;
755
937
  };
756
938
  readonly family_name: {
757
- readonly getter: (document: any) => any;
939
+ readonly getter: (doc: object) => string | undefined;
758
940
  };
759
941
  readonly active: {
760
942
  readonly type: "boolean";
@@ -785,7 +967,7 @@ export declare const user: {
785
967
  readonly accept: readonly ["image/*"];
786
968
  };
787
969
  readonly picture: {
788
- readonly getter: (value: any) => any;
970
+ readonly getter: (doc: object) => string | undefined;
789
971
  };
790
972
  readonly group: {
791
973
  readonly type: "string";
@@ -841,7 +1023,7 @@ export declare const user: {
841
1023
  };
842
1024
  }>;
843
1025
  }>;
844
- readonly getActivationLink: (payload: {
1026
+ getActivationLink: (payload: {
845
1027
  userId: import("@aeriajs/core").ObjectId | string;
846
1028
  }, context: import("@aeriajs/types").Context) => Promise<{
847
1029
  readonly _tag: "Error";
@@ -10,6 +10,20 @@ const createAccount_js_1 = require("./createAccount.js");
10
10
  const getInfo_js_1 = require("./getInfo.js");
11
11
  const getCurrentUser_js_1 = require("./getCurrentUser.js");
12
12
  const getActivationLink_js_1 = require("./getActivationLink.js");
13
+ const functions = {
14
+ get: core_1.get,
15
+ getAll: core_1.getAll,
16
+ remove: core_1.remove,
17
+ upload: core_1.upload,
18
+ removeFile: core_1.removeFile,
19
+ insert: insert_js_1.insert,
20
+ authenticate: authenticate_js_1.authenticate,
21
+ activate: activate_js_1.activate,
22
+ createAccount: createAccount_js_1.createAccount,
23
+ getInfo: getInfo_js_1.getInfo,
24
+ getCurrentUser: getCurrentUser_js_1.getCurrentUser,
25
+ getActivationLink: getActivationLink_js_1.getActivationLink,
26
+ };
13
27
  const exposedFunctions = {
14
28
  get: true,
15
29
  getAll: ['root'],
@@ -26,20 +40,7 @@ const exposedFunctions = {
26
40
  };
27
41
  exports.user = (0, core_1.defineCollection)({
28
42
  description: description_js_1.description,
29
- functions: {
30
- get: core_1.get,
31
- getAll: core_1.getAll,
32
- remove: core_1.remove,
33
- upload: core_1.upload,
34
- removeFile: core_1.removeFile,
35
- insert: insert_js_1.insert,
36
- authenticate: authenticate_js_1.authenticate,
37
- activate: activate_js_1.activate,
38
- createAccount: createAccount_js_1.createAccount,
39
- getInfo: getInfo_js_1.getInfo,
40
- getCurrentUser: getCurrentUser_js_1.getCurrentUser,
41
- getActivationLink: getActivationLink_js_1.getActivationLink,
42
- },
43
+ functions,
43
44
  contracts: {
44
45
  getCurrentUser: {
45
46
  response: {
@@ -8,6 +8,20 @@ import { createAccount } from "./createAccount.mjs";
8
8
  import { getInfo } from "./getInfo.mjs";
9
9
  import { getCurrentUser } from "./getCurrentUser.mjs";
10
10
  import { getActivationLink } from "./getActivationLink.mjs";
11
+ const functions = {
12
+ get,
13
+ getAll,
14
+ remove,
15
+ upload,
16
+ removeFile,
17
+ insert,
18
+ authenticate,
19
+ activate,
20
+ createAccount,
21
+ getInfo,
22
+ getCurrentUser,
23
+ getActivationLink
24
+ };
11
25
  const exposedFunctions = {
12
26
  get: true,
13
27
  getAll: ["root"],
@@ -24,20 +38,7 @@ const exposedFunctions = {
24
38
  };
25
39
  export const user = defineCollection({
26
40
  description,
27
- functions: {
28
- get,
29
- getAll,
30
- remove,
31
- upload,
32
- removeFile,
33
- insert,
34
- authenticate,
35
- activate,
36
- createAccount,
37
- getInfo,
38
- getCurrentUser,
39
- getActivationLink
40
- },
41
+ functions,
41
42
  contracts: {
42
43
  getCurrentUser: {
43
44
  response: {
@@ -56,7 +56,7 @@ export declare const describe: (contextOrPayload: RouteContext | typeof Payload)
56
56
  readonly _tag: "Error";
57
57
  readonly error: {
58
58
  readonly code: ACError.MalformedInput;
59
- readonly details: import("@aeriajs/types").ValidationError | import("@aeriajs/types").PropertyValidationError;
59
+ readonly details: import("@aeriajs/types").PropertyValidationError | import("@aeriajs/types").ValidationError;
60
60
  };
61
61
  readonly result: undefined;
62
62
  } | {