@aeriajs/builtins 0.0.73 → 0.0.74

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.
@@ -7,4 +7,4 @@ export declare enum ActivationErrors {
7
7
  }
8
8
  export declare const activate: (payload: {
9
9
  password: string;
10
- }, context: Context<typeof description>) => Promise<import("@aeriajs/types").Left<ActivationErrors.InvalidLink> | import("@aeriajs/types").Left<ActivationErrors.UserNotFound> | import("@aeriajs/types").Left<ActivationErrors.AlreadyActiveUser> | import("@aeriajs/types").GenericResponse | import("@aeriajs/types").Right<true>>;
10
+ }, context: Context<typeof description>) => Promise<import("@aeriajs/types").GenericResponse | import("@aeriajs/types").Left<ActivationErrors.InvalidLink> | import("@aeriajs/types").Left<ActivationErrors.UserNotFound> | import("@aeriajs/types").Left<ActivationErrors.AlreadyActiveUser> | import("@aeriajs/types").Right<true>>;
@@ -1,3 +1,102 @@
1
1
  import type { Context, Schema } from '@aeriajs/types';
2
2
  import type { description } from './description.js';
3
- export declare const createAccount: (payload: Omit<Schema<typeof description>, 'roles'>, context: Context<typeof description>) => Promise<import("@aeriajs/types").Left<import("@aeriajs/types").ValidationError | import("@aeriajs/types").PropertyValidationError> | import("@aeriajs/types").Right<any>>;
3
+ export declare const createAccount: (payload: Omit<Schema<typeof description>, 'roles'>, context: Context<typeof description>) => Promise<import("@aeriajs/types").Left<import("@aeriajs/types").ValidationError | import("@aeriajs/types").PropertyValidationError> | import("@aeriajs/types").Right<import("mongodb").WithId<Omit<import("@aeriajs/types").PackReferences<import("@aeriajs/types").SchemaWithId<{
4
+ readonly $id: "user";
5
+ readonly required: readonly ["name", "roles", "email"];
6
+ readonly form: readonly ["name", "active", "roles", "email", "phone_number", "picture_file"];
7
+ readonly indexes: readonly ["name"];
8
+ readonly freshItem: {
9
+ readonly active: true;
10
+ };
11
+ readonly properties: {
12
+ readonly name: {
13
+ readonly type: "string";
14
+ };
15
+ readonly given_name: {
16
+ readonly getter: (document: any) => string;
17
+ };
18
+ readonly family_name: {
19
+ readonly getter: (document: any) => string;
20
+ };
21
+ readonly active: {
22
+ readonly type: "boolean";
23
+ };
24
+ readonly roles: {
25
+ readonly type: "array";
26
+ readonly items: {
27
+ readonly type: "string";
28
+ };
29
+ readonly uniqueItems: true;
30
+ };
31
+ readonly email: {
32
+ readonly type: "string";
33
+ readonly inputType: "email";
34
+ readonly unique: true;
35
+ };
36
+ readonly password: {
37
+ readonly type: "string";
38
+ readonly inputType: "password";
39
+ readonly hidden: true;
40
+ };
41
+ readonly phone_number: {
42
+ readonly type: "string";
43
+ readonly mask: "(##) #####-####";
44
+ };
45
+ readonly picture_file: {
46
+ readonly $ref: "file";
47
+ readonly accept: readonly ["image/*"];
48
+ };
49
+ readonly picture: {
50
+ readonly getter: (value: any) => any;
51
+ };
52
+ readonly group: {
53
+ readonly type: "string";
54
+ };
55
+ readonly self_registered: {
56
+ readonly type: "boolean";
57
+ readonly readOnly: true;
58
+ };
59
+ readonly updated_at: {
60
+ readonly type: "string";
61
+ readonly format: "date-time";
62
+ };
63
+ };
64
+ readonly presets: readonly ["crud", "view", "duplicate"];
65
+ readonly layout: {
66
+ readonly name: "grid";
67
+ readonly options: {
68
+ readonly title: "name";
69
+ readonly badge: "roles";
70
+ readonly picture: "picture_file";
71
+ readonly information: "email";
72
+ readonly active: "active";
73
+ };
74
+ };
75
+ readonly individualActions: {
76
+ readonly 'ui:spawnEdit': {
77
+ readonly name: "action.edit";
78
+ readonly icon: "pencil";
79
+ readonly translate: true;
80
+ };
81
+ readonly 'route:/dashboard/user/changepass': {
82
+ readonly name: "change_password";
83
+ readonly icon: "key";
84
+ readonly fetchItem: true;
85
+ readonly translate: true;
86
+ };
87
+ };
88
+ readonly icon: "users";
89
+ readonly filters: readonly ["name", "roles", "email", "phone_number"];
90
+ readonly table: readonly ["name", "roles", "picture_file", "active", "updated_at"];
91
+ readonly tableMeta: readonly ["email"];
92
+ readonly formLayout: {
93
+ readonly fields: {
94
+ readonly given_name: {
95
+ readonly span: 3;
96
+ };
97
+ readonly family_name: {
98
+ readonly span: 3;
99
+ };
100
+ };
101
+ };
102
+ }>>, "_id">>>>;
@@ -9,6 +9,6 @@ export declare const getInfo: (payload: {
9
9
  userId: string;
10
10
  token: string;
11
11
  }, context: Context<typeof description>) => Promise<import("@aeriajs/types").Left<ActivationErrors.InvalidLink> | import("@aeriajs/types").Left<ActivationErrors.UserNotFound> | import("@aeriajs/types").Left<ActivationErrors.AlreadyActiveUser> | import("@aeriajs/types").Right<{
12
- readonly name: any;
13
- readonly email: any;
12
+ readonly name: string;
13
+ readonly email: string;
14
14
  }>>;
@@ -612,7 +612,7 @@ export declare const user: Omit<import("@aeriajs/types").Collection<{
612
612
  };
613
613
  };
614
614
  };
615
- }>, "name" | "roles" | "email" | "active"> & {
615
+ }>, "name" | "active" | "roles" | "email"> & {
616
616
  _id: import("@aeriajs/core").ObjectId | null;
617
617
  };
618
618
  token: import("@aeriajs/types").TokenRecipient;
@@ -730,7 +730,7 @@ export declare const user: Omit<import("@aeriajs/types").Collection<{
730
730
  };
731
731
  };
732
732
  };
733
- }>) => Promise<import("@aeriajs/types").Left<import("./activate.js").ActivationErrors.InvalidLink> | import("@aeriajs/types").Left<import("./activate.js").ActivationErrors.UserNotFound> | import("@aeriajs/types").Left<import("./activate.js").ActivationErrors.AlreadyActiveUser> | import("@aeriajs/types").GenericResponse | import("@aeriajs/types").Right<true>>;
733
+ }>) => Promise<import("@aeriajs/types").GenericResponse | import("@aeriajs/types").Left<import("./activate.js").ActivationErrors.InvalidLink> | import("@aeriajs/types").Left<import("./activate.js").ActivationErrors.UserNotFound> | import("@aeriajs/types").Left<import("./activate.js").ActivationErrors.AlreadyActiveUser> | import("@aeriajs/types").Right<true>>;
734
734
  readonly createAccount: (payload: Omit<Pick<{
735
735
  picture_file: import("@aeriajs/types").SchemaWithId<{
736
736
  readonly $id: "file";
@@ -838,14 +838,14 @@ export declare const user: Omit<import("@aeriajs/types").Collection<{
838
838
  name: string;
839
839
  password: string;
840
840
  updated_at: Date;
841
+ active: boolean;
841
842
  roles: string[];
842
843
  email: string;
843
- active: boolean;
844
+ picture: any;
844
845
  phone_number: string;
845
846
  picture_file: never;
846
847
  given_name: string;
847
848
  family_name: string;
848
- picture: any;
849
849
  group: string;
850
850
  }, "picture_file">, "name" | "roles" | "email"> & Partial<{
851
851
  picture_file: import("@aeriajs/types").SchemaWithId<{
@@ -954,14 +954,14 @@ export declare const user: Omit<import("@aeriajs/types").Collection<{
954
954
  name: string;
955
955
  password: string;
956
956
  updated_at: Date;
957
+ active: boolean;
957
958
  roles: string[];
958
959
  email: string;
959
- active: boolean;
960
+ picture: any;
960
961
  phone_number: string;
961
962
  picture_file: never;
962
963
  given_name: string;
963
964
  family_name: string;
964
- picture: any;
965
965
  group: string;
966
966
  }, "picture_file">> & {
967
967
  updated_at?: Date | undefined;
@@ -1065,7 +1065,106 @@ export declare const user: Omit<import("@aeriajs/types").Collection<{
1065
1065
  };
1066
1066
  };
1067
1067
  };
1068
- }>) => Promise<import("@aeriajs/types").Left<import("@aeriajs/types").ValidationError | import("@aeriajs/types").PropertyValidationError> | import("@aeriajs/types").Right<any>>;
1068
+ }>) => Promise<import("@aeriajs/types").Left<import("@aeriajs/types").ValidationError | import("@aeriajs/types").PropertyValidationError> | import("@aeriajs/types").Right<import("mongodb").WithId<Omit<import("@aeriajs/types").PackReferences<import("@aeriajs/types").SchemaWithId<{
1069
+ readonly $id: "user";
1070
+ readonly required: readonly ["name", "roles", "email"];
1071
+ readonly form: readonly ["name", "active", "roles", "email", "phone_number", "picture_file"];
1072
+ readonly indexes: readonly ["name"];
1073
+ readonly freshItem: {
1074
+ readonly active: true;
1075
+ };
1076
+ readonly properties: {
1077
+ readonly name: {
1078
+ readonly type: "string";
1079
+ };
1080
+ readonly given_name: {
1081
+ readonly getter: (document: any) => string;
1082
+ };
1083
+ readonly family_name: {
1084
+ readonly getter: (document: any) => string;
1085
+ };
1086
+ readonly active: {
1087
+ readonly type: "boolean";
1088
+ };
1089
+ readonly roles: {
1090
+ readonly type: "array";
1091
+ readonly items: {
1092
+ readonly type: "string";
1093
+ };
1094
+ readonly uniqueItems: true;
1095
+ };
1096
+ readonly email: {
1097
+ readonly type: "string";
1098
+ readonly inputType: "email";
1099
+ readonly unique: true;
1100
+ };
1101
+ readonly password: {
1102
+ readonly type: "string";
1103
+ readonly inputType: "password";
1104
+ readonly hidden: true;
1105
+ };
1106
+ readonly phone_number: {
1107
+ readonly type: "string";
1108
+ readonly mask: "(##) #####-####";
1109
+ };
1110
+ readonly picture_file: {
1111
+ readonly $ref: "file";
1112
+ readonly accept: readonly ["image/*"];
1113
+ };
1114
+ readonly picture: {
1115
+ readonly getter: (value: any) => any;
1116
+ };
1117
+ readonly group: {
1118
+ readonly type: "string";
1119
+ };
1120
+ readonly self_registered: {
1121
+ readonly type: "boolean";
1122
+ readonly readOnly: true;
1123
+ };
1124
+ readonly updated_at: {
1125
+ readonly type: "string";
1126
+ readonly format: "date-time";
1127
+ };
1128
+ };
1129
+ readonly presets: readonly ["crud", "view", "duplicate"];
1130
+ readonly layout: {
1131
+ readonly name: "grid";
1132
+ readonly options: {
1133
+ readonly title: "name";
1134
+ readonly badge: "roles";
1135
+ readonly picture: "picture_file";
1136
+ readonly information: "email";
1137
+ readonly active: "active";
1138
+ };
1139
+ };
1140
+ readonly individualActions: {
1141
+ readonly 'ui:spawnEdit': {
1142
+ readonly name: "action.edit";
1143
+ readonly icon: "pencil";
1144
+ readonly translate: true;
1145
+ };
1146
+ readonly 'route:/dashboard/user/changepass': {
1147
+ readonly name: "change_password";
1148
+ readonly icon: "key";
1149
+ readonly fetchItem: true;
1150
+ readonly translate: true;
1151
+ };
1152
+ };
1153
+ readonly icon: "users";
1154
+ readonly filters: readonly ["name", "roles", "email", "phone_number"];
1155
+ readonly table: readonly ["name", "roles", "picture_file", "active", "updated_at"];
1156
+ readonly tableMeta: readonly ["email"];
1157
+ readonly formLayout: {
1158
+ readonly fields: {
1159
+ readonly given_name: {
1160
+ readonly span: 3;
1161
+ };
1162
+ readonly family_name: {
1163
+ readonly span: 3;
1164
+ };
1165
+ };
1166
+ };
1167
+ }>>, "_id">>>>;
1069
1168
  readonly getInfo: (payload: {
1070
1169
  userId: string;
1071
1170
  token: string;
@@ -1169,8 +1268,8 @@ export declare const user: Omit<import("@aeriajs/types").Collection<{
1169
1268
  };
1170
1269
  };
1171
1270
  }>) => Promise<import("@aeriajs/types").Left<import("./getInfo.js").ActivationErrors.InvalidLink> | import("@aeriajs/types").Left<import("./getInfo.js").ActivationErrors.UserNotFound> | import("@aeriajs/types").Left<import("./getInfo.js").ActivationErrors.AlreadyActiveUser> | import("@aeriajs/types").Right<{
1172
- readonly name: any;
1173
- readonly email: any;
1271
+ readonly name: string;
1272
+ readonly email: string;
1174
1273
  }>>;
1175
1274
  readonly getActivationLink: (userId: import("@aeriajs/core").ObjectId) => Promise<string>;
1176
1275
  };
@@ -1898,7 +1997,7 @@ export declare const user: Omit<import("@aeriajs/types").Collection<{
1898
1997
  };
1899
1998
  };
1900
1999
  };
1901
- }>, "name" | "roles" | "email" | "active"> & {
2000
+ }>, "name" | "active" | "roles" | "email"> & {
1902
2001
  _id: import("@aeriajs/core").ObjectId | null;
1903
2002
  };
1904
2003
  token: import("@aeriajs/types").TokenRecipient;
@@ -2016,7 +2115,7 @@ export declare const user: Omit<import("@aeriajs/types").Collection<{
2016
2115
  };
2017
2116
  };
2018
2117
  };
2019
- }>) => Promise<import("@aeriajs/types").Left<import("./activate.js").ActivationErrors.InvalidLink> | import("@aeriajs/types").Left<import("./activate.js").ActivationErrors.UserNotFound> | import("@aeriajs/types").Left<import("./activate.js").ActivationErrors.AlreadyActiveUser> | import("@aeriajs/types").GenericResponse | import("@aeriajs/types").Right<true>>;
2118
+ }>) => Promise<import("@aeriajs/types").GenericResponse | import("@aeriajs/types").Left<import("./activate.js").ActivationErrors.InvalidLink> | import("@aeriajs/types").Left<import("./activate.js").ActivationErrors.UserNotFound> | import("@aeriajs/types").Left<import("./activate.js").ActivationErrors.AlreadyActiveUser> | import("@aeriajs/types").Right<true>>;
2020
2119
  readonly createAccount: (payload: Omit<Pick<{
2021
2120
  picture_file: import("@aeriajs/types").SchemaWithId<{
2022
2121
  readonly $id: "file";
@@ -2124,14 +2223,14 @@ export declare const user: Omit<import("@aeriajs/types").Collection<{
2124
2223
  name: string;
2125
2224
  password: string;
2126
2225
  updated_at: Date;
2226
+ active: boolean;
2127
2227
  roles: string[];
2128
2228
  email: string;
2129
- active: boolean;
2229
+ picture: any;
2130
2230
  phone_number: string;
2131
2231
  picture_file: never;
2132
2232
  given_name: string;
2133
2233
  family_name: string;
2134
- picture: any;
2135
2234
  group: string;
2136
2235
  }, "picture_file">, "name" | "roles" | "email"> & Partial<{
2137
2236
  picture_file: import("@aeriajs/types").SchemaWithId<{
@@ -2240,14 +2339,14 @@ export declare const user: Omit<import("@aeriajs/types").Collection<{
2240
2339
  name: string;
2241
2340
  password: string;
2242
2341
  updated_at: Date;
2342
+ active: boolean;
2243
2343
  roles: string[];
2244
2344
  email: string;
2245
- active: boolean;
2345
+ picture: any;
2246
2346
  phone_number: string;
2247
2347
  picture_file: never;
2248
2348
  given_name: string;
2249
2349
  family_name: string;
2250
- picture: any;
2251
2350
  group: string;
2252
2351
  }, "picture_file">> & {
2253
2352
  updated_at?: Date | undefined;
@@ -2351,7 +2450,106 @@ export declare const user: Omit<import("@aeriajs/types").Collection<{
2351
2450
  };
2352
2451
  };
2353
2452
  };
2354
- }>) => Promise<import("@aeriajs/types").Left<import("@aeriajs/types").ValidationError | import("@aeriajs/types").PropertyValidationError> | import("@aeriajs/types").Right<any>>;
2453
+ }>) => Promise<import("@aeriajs/types").Left<import("@aeriajs/types").ValidationError | import("@aeriajs/types").PropertyValidationError> | import("@aeriajs/types").Right<import("mongodb").WithId<Omit<import("@aeriajs/types").PackReferences<import("@aeriajs/types").SchemaWithId<{
2454
+ readonly $id: "user";
2455
+ readonly required: readonly ["name", "roles", "email"];
2456
+ readonly form: readonly ["name", "active", "roles", "email", "phone_number", "picture_file"];
2457
+ readonly indexes: readonly ["name"];
2458
+ readonly freshItem: {
2459
+ readonly active: true;
2460
+ };
2461
+ readonly properties: {
2462
+ readonly name: {
2463
+ readonly type: "string";
2464
+ };
2465
+ readonly given_name: {
2466
+ readonly getter: (document: any) => string;
2467
+ };
2468
+ readonly family_name: {
2469
+ readonly getter: (document: any) => string;
2470
+ };
2471
+ readonly active: {
2472
+ readonly type: "boolean";
2473
+ };
2474
+ readonly roles: {
2475
+ readonly type: "array";
2476
+ readonly items: {
2477
+ readonly type: "string";
2478
+ };
2479
+ readonly uniqueItems: true;
2480
+ };
2481
+ readonly email: {
2482
+ readonly type: "string";
2483
+ readonly inputType: "email";
2484
+ readonly unique: true;
2485
+ };
2486
+ readonly password: {
2487
+ readonly type: "string";
2488
+ readonly inputType: "password";
2489
+ readonly hidden: true;
2490
+ };
2491
+ readonly phone_number: {
2492
+ readonly type: "string";
2493
+ readonly mask: "(##) #####-####";
2494
+ };
2495
+ readonly picture_file: {
2496
+ readonly $ref: "file";
2497
+ readonly accept: readonly ["image/*"];
2498
+ };
2499
+ readonly picture: {
2500
+ readonly getter: (value: any) => any;
2501
+ };
2502
+ readonly group: {
2503
+ readonly type: "string";
2504
+ };
2505
+ readonly self_registered: {
2506
+ readonly type: "boolean";
2507
+ readonly readOnly: true;
2508
+ };
2509
+ readonly updated_at: {
2510
+ readonly type: "string";
2511
+ readonly format: "date-time";
2512
+ };
2513
+ };
2514
+ readonly presets: readonly ["crud", "view", "duplicate"];
2515
+ readonly layout: {
2516
+ readonly name: "grid";
2517
+ readonly options: {
2518
+ readonly title: "name";
2519
+ readonly badge: "roles";
2520
+ readonly picture: "picture_file";
2521
+ readonly information: "email";
2522
+ readonly active: "active";
2523
+ };
2524
+ };
2525
+ readonly individualActions: {
2526
+ readonly 'ui:spawnEdit': {
2527
+ readonly name: "action.edit";
2528
+ readonly icon: "pencil";
2529
+ readonly translate: true;
2530
+ };
2531
+ readonly 'route:/dashboard/user/changepass': {
2532
+ readonly name: "change_password";
2533
+ readonly icon: "key";
2534
+ readonly fetchItem: true;
2535
+ readonly translate: true;
2536
+ };
2537
+ };
2538
+ readonly icon: "users";
2539
+ readonly filters: readonly ["name", "roles", "email", "phone_number"];
2540
+ readonly table: readonly ["name", "roles", "picture_file", "active", "updated_at"];
2541
+ readonly tableMeta: readonly ["email"];
2542
+ readonly formLayout: {
2543
+ readonly fields: {
2544
+ readonly given_name: {
2545
+ readonly span: 3;
2546
+ };
2547
+ readonly family_name: {
2548
+ readonly span: 3;
2549
+ };
2550
+ };
2551
+ };
2552
+ }>>, "_id">>>>;
2355
2553
  readonly getInfo: (payload: {
2356
2554
  userId: string;
2357
2555
  token: string;
@@ -2455,8 +2653,8 @@ export declare const user: Omit<import("@aeriajs/types").Collection<{
2455
2653
  };
2456
2654
  };
2457
2655
  }>) => Promise<import("@aeriajs/types").Left<import("./getInfo.js").ActivationErrors.InvalidLink> | import("@aeriajs/types").Left<import("./getInfo.js").ActivationErrors.UserNotFound> | import("@aeriajs/types").Left<import("./getInfo.js").ActivationErrors.AlreadyActiveUser> | import("@aeriajs/types").Right<{
2458
- readonly name: any;
2459
- readonly email: any;
2656
+ readonly name: string;
2657
+ readonly email: string;
2460
2658
  }>>;
2461
2659
  readonly getActivationLink: (userId: import("@aeriajs/core").ObjectId) => Promise<string>;
2462
2660
  };
@@ -110,7 +110,7 @@ export declare const describe: (contextOrPayload: RouteContext | Payload) => Pro
110
110
  };
111
111
  };
112
112
  };
113
- }>, "name" | "roles" | "email" | "active"> & {
113
+ }>, "name" | "active" | "roles" | "email"> & {
114
114
  _id: import("@aeriajs/core").ObjectId | null;
115
115
  };
116
116
  token: import("@aeriajs/types").TokenRecipient;
package/dist/index.d.ts CHANGED
@@ -1797,7 +1797,7 @@ export declare const collections: {
1797
1797
  };
1798
1798
  };
1799
1799
  };
1800
- }>, "name" | "roles" | "email" | "active"> & {
1800
+ }>, "name" | "active" | "roles" | "email"> & {
1801
1801
  _id: import("mongodb").ObjectId | null;
1802
1802
  };
1803
1803
  token: import("@aeriajs/types").TokenRecipient;
@@ -1915,7 +1915,7 @@ export declare const collections: {
1915
1915
  };
1916
1916
  };
1917
1917
  };
1918
- }>) => Promise<import("@aeriajs/types").Left<import("./collections/user/activate.js").ActivationErrors.InvalidLink> | import("@aeriajs/types").Left<import("./collections/user/activate.js").ActivationErrors.UserNotFound> | import("@aeriajs/types").Left<import("./collections/user/activate.js").ActivationErrors.AlreadyActiveUser> | import("@aeriajs/types").GenericResponse | import("@aeriajs/types").Right<true>>;
1918
+ }>) => Promise<import("@aeriajs/types").GenericResponse | import("@aeriajs/types").Left<import("./collections/user/activate.js").ActivationErrors.InvalidLink> | import("@aeriajs/types").Left<import("./collections/user/activate.js").ActivationErrors.UserNotFound> | import("@aeriajs/types").Left<import("./collections/user/activate.js").ActivationErrors.AlreadyActiveUser> | import("@aeriajs/types").Right<true>>;
1919
1919
  readonly createAccount: (payload: Omit<Pick<{
1920
1920
  picture_file: import("@aeriajs/types").SchemaWithId<{
1921
1921
  readonly $id: "file";
@@ -2023,14 +2023,14 @@ export declare const collections: {
2023
2023
  name: string;
2024
2024
  password: string;
2025
2025
  updated_at: Date;
2026
+ active: boolean;
2026
2027
  roles: string[];
2027
2028
  email: string;
2028
- active: boolean;
2029
+ picture: any;
2029
2030
  phone_number: string;
2030
2031
  picture_file: never;
2031
2032
  given_name: string;
2032
2033
  family_name: string;
2033
- picture: any;
2034
2034
  group: string;
2035
2035
  }, "picture_file">, "name" | "roles" | "email"> & Partial<{
2036
2036
  picture_file: import("@aeriajs/types").SchemaWithId<{
@@ -2139,14 +2139,14 @@ export declare const collections: {
2139
2139
  name: string;
2140
2140
  password: string;
2141
2141
  updated_at: Date;
2142
+ active: boolean;
2142
2143
  roles: string[];
2143
2144
  email: string;
2144
- active: boolean;
2145
+ picture: any;
2145
2146
  phone_number: string;
2146
2147
  picture_file: never;
2147
2148
  given_name: string;
2148
2149
  family_name: string;
2149
- picture: any;
2150
2150
  group: string;
2151
2151
  }, "picture_file">> & {
2152
2152
  updated_at?: Date | undefined;
@@ -2250,7 +2250,106 @@ export declare const collections: {
2250
2250
  };
2251
2251
  };
2252
2252
  };
2253
- }>) => Promise<import("@aeriajs/types").Left<import("@aeriajs/types").ValidationError | import("@aeriajs/types").PropertyValidationError> | import("@aeriajs/types").Right<any>>;
2253
+ }>) => Promise<import("@aeriajs/types").Left<import("@aeriajs/types").ValidationError | import("@aeriajs/types").PropertyValidationError> | import("@aeriajs/types").Right<import("mongodb").WithId<Omit<import("@aeriajs/types").PackReferences<import("@aeriajs/types").SchemaWithId<{
2254
+ readonly $id: "user";
2255
+ readonly required: readonly ["name", "roles", "email"];
2256
+ readonly form: readonly ["name", "active", "roles", "email", "phone_number", "picture_file"];
2257
+ readonly indexes: readonly ["name"];
2258
+ readonly freshItem: {
2259
+ readonly active: true;
2260
+ };
2261
+ readonly properties: {
2262
+ readonly name: {
2263
+ readonly type: "string";
2264
+ };
2265
+ readonly given_name: {
2266
+ readonly getter: (document: any) => string;
2267
+ };
2268
+ readonly family_name: {
2269
+ readonly getter: (document: any) => string;
2270
+ };
2271
+ readonly active: {
2272
+ readonly type: "boolean";
2273
+ };
2274
+ readonly roles: {
2275
+ readonly type: "array";
2276
+ readonly items: {
2277
+ readonly type: "string";
2278
+ };
2279
+ readonly uniqueItems: true;
2280
+ };
2281
+ readonly email: {
2282
+ readonly type: "string";
2283
+ readonly inputType: "email";
2284
+ readonly unique: true;
2285
+ };
2286
+ readonly password: {
2287
+ readonly type: "string";
2288
+ readonly inputType: "password";
2289
+ readonly hidden: true;
2290
+ };
2291
+ readonly phone_number: {
2292
+ readonly type: "string";
2293
+ readonly mask: "(##) #####-####";
2294
+ };
2295
+ readonly picture_file: {
2296
+ readonly $ref: "file";
2297
+ readonly accept: readonly ["image/*"];
2298
+ };
2299
+ readonly picture: {
2300
+ readonly getter: (value: any) => any;
2301
+ };
2302
+ readonly group: {
2303
+ readonly type: "string";
2304
+ };
2305
+ readonly self_registered: {
2306
+ readonly type: "boolean";
2307
+ readonly readOnly: true;
2308
+ };
2309
+ readonly updated_at: {
2310
+ readonly type: "string";
2311
+ readonly format: "date-time";
2312
+ };
2313
+ };
2314
+ readonly presets: readonly ["crud", "view", "duplicate"];
2315
+ readonly layout: {
2316
+ readonly name: "grid";
2317
+ readonly options: {
2318
+ readonly title: "name";
2319
+ readonly badge: "roles";
2320
+ readonly picture: "picture_file";
2321
+ readonly information: "email";
2322
+ readonly active: "active";
2323
+ };
2324
+ };
2325
+ readonly individualActions: {
2326
+ readonly 'ui:spawnEdit': {
2327
+ readonly name: "action.edit";
2328
+ readonly icon: "pencil";
2329
+ readonly translate: true;
2330
+ };
2331
+ readonly 'route:/dashboard/user/changepass': {
2332
+ readonly name: "change_password";
2333
+ readonly icon: "key";
2334
+ readonly fetchItem: true;
2335
+ readonly translate: true;
2336
+ };
2337
+ };
2338
+ readonly icon: "users";
2339
+ readonly filters: readonly ["name", "roles", "email", "phone_number"];
2340
+ readonly table: readonly ["name", "roles", "picture_file", "active", "updated_at"];
2341
+ readonly tableMeta: readonly ["email"];
2342
+ readonly formLayout: {
2343
+ readonly fields: {
2344
+ readonly given_name: {
2345
+ readonly span: 3;
2346
+ };
2347
+ readonly family_name: {
2348
+ readonly span: 3;
2349
+ };
2350
+ };
2351
+ };
2352
+ }>>, "_id">>>>;
2254
2353
  readonly getInfo: (payload: {
2255
2354
  userId: string;
2256
2355
  token: string;
@@ -2354,8 +2453,8 @@ export declare const collections: {
2354
2453
  };
2355
2454
  };
2356
2455
  }>) => Promise<import("@aeriajs/types").Left<import("./collections/user/getInfo.js").ActivationErrors.InvalidLink> | import("@aeriajs/types").Left<import("./collections/user/getInfo.js").ActivationErrors.UserNotFound> | import("@aeriajs/types").Left<import("./collections/user/getInfo.js").ActivationErrors.AlreadyActiveUser> | import("@aeriajs/types").Right<{
2357
- readonly name: any;
2358
- readonly email: any;
2456
+ readonly name: string;
2457
+ readonly email: string;
2359
2458
  }>>;
2360
2459
  readonly getActivationLink: (userId: import("mongodb").ObjectId) => Promise<string>;
2361
2460
  };
@@ -3083,7 +3182,7 @@ export declare const collections: {
3083
3182
  };
3084
3183
  };
3085
3184
  };
3086
- }>, "name" | "roles" | "email" | "active"> & {
3185
+ }>, "name" | "active" | "roles" | "email"> & {
3087
3186
  _id: import("mongodb").ObjectId | null;
3088
3187
  };
3089
3188
  token: import("@aeriajs/types").TokenRecipient;
@@ -3201,7 +3300,7 @@ export declare const collections: {
3201
3300
  };
3202
3301
  };
3203
3302
  };
3204
- }>) => Promise<import("@aeriajs/types").Left<import("./collections/user/activate.js").ActivationErrors.InvalidLink> | import("@aeriajs/types").Left<import("./collections/user/activate.js").ActivationErrors.UserNotFound> | import("@aeriajs/types").Left<import("./collections/user/activate.js").ActivationErrors.AlreadyActiveUser> | import("@aeriajs/types").GenericResponse | import("@aeriajs/types").Right<true>>;
3303
+ }>) => Promise<import("@aeriajs/types").GenericResponse | import("@aeriajs/types").Left<import("./collections/user/activate.js").ActivationErrors.InvalidLink> | import("@aeriajs/types").Left<import("./collections/user/activate.js").ActivationErrors.UserNotFound> | import("@aeriajs/types").Left<import("./collections/user/activate.js").ActivationErrors.AlreadyActiveUser> | import("@aeriajs/types").Right<true>>;
3205
3304
  readonly createAccount: (payload: Omit<Pick<{
3206
3305
  picture_file: import("@aeriajs/types").SchemaWithId<{
3207
3306
  readonly $id: "file";
@@ -3309,14 +3408,14 @@ export declare const collections: {
3309
3408
  name: string;
3310
3409
  password: string;
3311
3410
  updated_at: Date;
3411
+ active: boolean;
3312
3412
  roles: string[];
3313
3413
  email: string;
3314
- active: boolean;
3414
+ picture: any;
3315
3415
  phone_number: string;
3316
3416
  picture_file: never;
3317
3417
  given_name: string;
3318
3418
  family_name: string;
3319
- picture: any;
3320
3419
  group: string;
3321
3420
  }, "picture_file">, "name" | "roles" | "email"> & Partial<{
3322
3421
  picture_file: import("@aeriajs/types").SchemaWithId<{
@@ -3425,14 +3524,14 @@ export declare const collections: {
3425
3524
  name: string;
3426
3525
  password: string;
3427
3526
  updated_at: Date;
3527
+ active: boolean;
3428
3528
  roles: string[];
3429
3529
  email: string;
3430
- active: boolean;
3530
+ picture: any;
3431
3531
  phone_number: string;
3432
3532
  picture_file: never;
3433
3533
  given_name: string;
3434
3534
  family_name: string;
3435
- picture: any;
3436
3535
  group: string;
3437
3536
  }, "picture_file">> & {
3438
3537
  updated_at?: Date | undefined;
@@ -3536,7 +3635,106 @@ export declare const collections: {
3536
3635
  };
3537
3636
  };
3538
3637
  };
3539
- }>) => Promise<import("@aeriajs/types").Left<import("@aeriajs/types").ValidationError | import("@aeriajs/types").PropertyValidationError> | import("@aeriajs/types").Right<any>>;
3638
+ }>) => Promise<import("@aeriajs/types").Left<import("@aeriajs/types").ValidationError | import("@aeriajs/types").PropertyValidationError> | import("@aeriajs/types").Right<import("mongodb").WithId<Omit<import("@aeriajs/types").PackReferences<import("@aeriajs/types").SchemaWithId<{
3639
+ readonly $id: "user";
3640
+ readonly required: readonly ["name", "roles", "email"];
3641
+ readonly form: readonly ["name", "active", "roles", "email", "phone_number", "picture_file"];
3642
+ readonly indexes: readonly ["name"];
3643
+ readonly freshItem: {
3644
+ readonly active: true;
3645
+ };
3646
+ readonly properties: {
3647
+ readonly name: {
3648
+ readonly type: "string";
3649
+ };
3650
+ readonly given_name: {
3651
+ readonly getter: (document: any) => string;
3652
+ };
3653
+ readonly family_name: {
3654
+ readonly getter: (document: any) => string;
3655
+ };
3656
+ readonly active: {
3657
+ readonly type: "boolean";
3658
+ };
3659
+ readonly roles: {
3660
+ readonly type: "array";
3661
+ readonly items: {
3662
+ readonly type: "string";
3663
+ };
3664
+ readonly uniqueItems: true;
3665
+ };
3666
+ readonly email: {
3667
+ readonly type: "string";
3668
+ readonly inputType: "email";
3669
+ readonly unique: true;
3670
+ };
3671
+ readonly password: {
3672
+ readonly type: "string";
3673
+ readonly inputType: "password";
3674
+ readonly hidden: true;
3675
+ };
3676
+ readonly phone_number: {
3677
+ readonly type: "string";
3678
+ readonly mask: "(##) #####-####";
3679
+ };
3680
+ readonly picture_file: {
3681
+ readonly $ref: "file";
3682
+ readonly accept: readonly ["image/*"];
3683
+ };
3684
+ readonly picture: {
3685
+ readonly getter: (value: any) => any;
3686
+ };
3687
+ readonly group: {
3688
+ readonly type: "string";
3689
+ };
3690
+ readonly self_registered: {
3691
+ readonly type: "boolean";
3692
+ readonly readOnly: true;
3693
+ };
3694
+ readonly updated_at: {
3695
+ readonly type: "string";
3696
+ readonly format: "date-time";
3697
+ };
3698
+ };
3699
+ readonly presets: readonly ["crud", "view", "duplicate"];
3700
+ readonly layout: {
3701
+ readonly name: "grid";
3702
+ readonly options: {
3703
+ readonly title: "name";
3704
+ readonly badge: "roles";
3705
+ readonly picture: "picture_file";
3706
+ readonly information: "email";
3707
+ readonly active: "active";
3708
+ };
3709
+ };
3710
+ readonly individualActions: {
3711
+ readonly 'ui:spawnEdit': {
3712
+ readonly name: "action.edit";
3713
+ readonly icon: "pencil";
3714
+ readonly translate: true;
3715
+ };
3716
+ readonly 'route:/dashboard/user/changepass': {
3717
+ readonly name: "change_password";
3718
+ readonly icon: "key";
3719
+ readonly fetchItem: true;
3720
+ readonly translate: true;
3721
+ };
3722
+ };
3723
+ readonly icon: "users";
3724
+ readonly filters: readonly ["name", "roles", "email", "phone_number"];
3725
+ readonly table: readonly ["name", "roles", "picture_file", "active", "updated_at"];
3726
+ readonly tableMeta: readonly ["email"];
3727
+ readonly formLayout: {
3728
+ readonly fields: {
3729
+ readonly given_name: {
3730
+ readonly span: 3;
3731
+ };
3732
+ readonly family_name: {
3733
+ readonly span: 3;
3734
+ };
3735
+ };
3736
+ };
3737
+ }>>, "_id">>>>;
3540
3738
  readonly getInfo: (payload: {
3541
3739
  userId: string;
3542
3740
  token: string;
@@ -3640,8 +3838,8 @@ export declare const collections: {
3640
3838
  };
3641
3839
  };
3642
3840
  }>) => Promise<import("@aeriajs/types").Left<import("./collections/user/getInfo.js").ActivationErrors.InvalidLink> | import("@aeriajs/types").Left<import("./collections/user/getInfo.js").ActivationErrors.UserNotFound> | import("@aeriajs/types").Left<import("./collections/user/getInfo.js").ActivationErrors.AlreadyActiveUser> | import("@aeriajs/types").Right<{
3643
- readonly name: any;
3644
- readonly email: any;
3841
+ readonly name: string;
3842
+ readonly email: string;
3645
3843
  }>>;
3646
3844
  readonly getActivationLink: (userId: import("mongodb").ObjectId) => Promise<string>;
3647
3845
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aeriajs/builtins",
3
- "version": "0.0.73",
3
+ "version": "0.0.74",
4
4
  "description": "## Installation",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -46,12 +46,12 @@
46
46
  "mongodb": "^6.5.0"
47
47
  },
48
48
  "peerDependencies": {
49
- "@aeriajs/access-control": "^0.0.40",
50
- "@aeriajs/core": "^0.0.73",
51
- "@aeriajs/common": "^0.0.40",
52
- "@aeriajs/entrypoint": "^0.0.40",
53
- "@aeriajs/types": "^0.0.37",
54
- "@aeriajs/validation": "^0.0.43"
49
+ "@aeriajs/access-control": "^0.0.41",
50
+ "@aeriajs/core": "^0.0.74",
51
+ "@aeriajs/common": "^0.0.41",
52
+ "@aeriajs/entrypoint": "^0.0.41",
53
+ "@aeriajs/types": "^0.0.38",
54
+ "@aeriajs/validation": "^0.0.44"
55
55
  },
56
56
  "scripts": {
57
57
  "test": "echo skipping",