@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.
- package/dist/authentication.d.ts +3 -1
- package/dist/authentication.js +5 -10
- package/dist/authentication.mjs +5 -10
- package/dist/collections/file/description.d.ts +2 -2
- package/dist/collections/file/description.js +12 -7
- package/dist/collections/file/description.mjs +12 -7
- package/dist/collections/file/index.d.ts +10 -10
- package/dist/collections/file/insert.d.ts +2 -2
- package/dist/collections/log/index.d.ts +2 -18
- package/dist/collections/user/createAccount.d.ts +110 -8
- package/dist/collections/user/createAccount.js +16 -10
- package/dist/collections/user/createAccount.mjs +16 -10
- package/dist/collections/user/description.d.ts +3 -3
- package/dist/collections/user/description.js +12 -6
- package/dist/collections/user/description.mjs +12 -6
- package/dist/collections/user/getCurrentUser.d.ts +3 -3
- package/dist/collections/user/index.d.ts +249 -67
- package/dist/collections/user/index.js +15 -14
- package/dist/collections/user/index.mjs +15 -14
- package/dist/functions/describe.d.ts +1 -1
- package/dist/index.d.ts +261 -95
- package/package.json +6 -6
|
@@ -11,10 +11,10 @@ export declare const user: {
|
|
|
11
11
|
readonly type: "string";
|
|
12
12
|
};
|
|
13
13
|
readonly given_name: {
|
|
14
|
-
readonly getter: (
|
|
14
|
+
readonly getter: (doc: object) => string | undefined;
|
|
15
15
|
};
|
|
16
16
|
readonly family_name: {
|
|
17
|
-
readonly getter: (
|
|
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: (
|
|
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
|
-
|
|
105
|
-
|
|
106
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
149
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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").
|
|
221
|
+
readonly details: import("@aeriajs/types").PropertyValidationError | import("@aeriajs/types").ValidationError;
|
|
226
222
|
} & {
|
|
227
223
|
httpStatus: import("@aeriajs/types").HTTPStatus.BadRequest;
|
|
228
|
-
}> | {
|
|
229
|
-
readonly
|
|
230
|
-
readonly
|
|
231
|
-
readonly
|
|
232
|
-
|
|
233
|
-
|
|
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
|
-
|
|
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: (
|
|
361
|
+
readonly getter: (doc: object) => string | undefined;
|
|
271
362
|
};
|
|
272
363
|
readonly family_name: {
|
|
273
|
-
readonly getter: (
|
|
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: (
|
|
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
|
-
|
|
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: (
|
|
489
|
+
readonly getter: (doc: object) => string | undefined;
|
|
399
490
|
};
|
|
400
491
|
readonly family_name: {
|
|
401
|
-
readonly getter: (
|
|
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: (
|
|
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: (
|
|
589
|
+
readonly getter: (doc: object) => string | undefined;
|
|
499
590
|
};
|
|
500
591
|
readonly family_name: {
|
|
501
|
-
readonly getter: (
|
|
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: (
|
|
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
|
-
|
|
589
|
-
|
|
590
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
633
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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").
|
|
796
|
+
readonly details: import("@aeriajs/types").PropertyValidationError | import("@aeriajs/types").ValidationError;
|
|
710
797
|
} & {
|
|
711
798
|
httpStatus: import("@aeriajs/types").HTTPStatus.BadRequest;
|
|
712
|
-
}> | {
|
|
713
|
-
readonly
|
|
714
|
-
readonly
|
|
715
|
-
readonly
|
|
716
|
-
|
|
717
|
-
|
|
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
|
-
|
|
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: (
|
|
936
|
+
readonly getter: (doc: object) => string | undefined;
|
|
755
937
|
};
|
|
756
938
|
readonly family_name: {
|
|
757
|
-
readonly getter: (
|
|
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: (
|
|
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
|
-
|
|
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").
|
|
59
|
+
readonly details: import("@aeriajs/types").PropertyValidationError | import("@aeriajs/types").ValidationError;
|
|
60
60
|
};
|
|
61
61
|
readonly result: undefined;
|
|
62
62
|
} | {
|