@temboplus/afloat 0.1.38 → 0.1.40
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/esm/src/features/admin/contract.d.ts +126 -132
- package/esm/src/features/admin/contract.d.ts.map +1 -1
- package/esm/src/features/admin/contract.js +56 -28
- package/esm/src/features/admin/repository.d.ts +17 -3
- package/esm/src/features/admin/repository.d.ts.map +1 -1
- package/esm/src/features/admin/repository.js +23 -9
- package/esm/src/models/permission.d.ts +1 -0
- package/esm/src/models/permission.d.ts.map +1 -1
- package/esm/src/models/permission.js +1 -0
- package/package.json +1 -1
- package/script/src/features/admin/contract.d.ts +126 -132
- package/script/src/features/admin/contract.d.ts.map +1 -1
- package/script/src/features/admin/contract.js +56 -28
- package/script/src/features/admin/repository.d.ts +17 -3
- package/script/src/features/admin/repository.d.ts.map +1 -1
- package/script/src/features/admin/repository.js +23 -9
- package/script/src/models/permission.d.ts +1 -0
- package/script/src/models/permission.d.ts.map +1 -1
- package/script/src/models/permission.js +1 -0
|
@@ -72,18 +72,18 @@ export declare const userManagementContract: {
|
|
|
72
72
|
};
|
|
73
73
|
}>, "many">;
|
|
74
74
|
401: z.ZodObject<{
|
|
75
|
-
message: z.ZodString
|
|
75
|
+
message: z.ZodOptional<z.ZodString>;
|
|
76
76
|
}, "strip", z.ZodTypeAny, {
|
|
77
|
-
message
|
|
77
|
+
message?: string | undefined;
|
|
78
78
|
}, {
|
|
79
|
-
message
|
|
79
|
+
message?: string | undefined;
|
|
80
80
|
}>;
|
|
81
81
|
403: z.ZodObject<{
|
|
82
|
-
message: z.ZodString
|
|
82
|
+
message: z.ZodOptional<z.ZodString>;
|
|
83
83
|
}, "strip", z.ZodTypeAny, {
|
|
84
|
-
message
|
|
84
|
+
message?: string | undefined;
|
|
85
85
|
}, {
|
|
86
|
-
message
|
|
86
|
+
message?: string | undefined;
|
|
87
87
|
}>;
|
|
88
88
|
};
|
|
89
89
|
};
|
|
@@ -166,25 +166,25 @@ export declare const userManagementContract: {
|
|
|
166
166
|
};
|
|
167
167
|
}>;
|
|
168
168
|
401: z.ZodObject<{
|
|
169
|
-
message: z.ZodString
|
|
169
|
+
message: z.ZodOptional<z.ZodString>;
|
|
170
170
|
}, "strip", z.ZodTypeAny, {
|
|
171
|
-
message
|
|
171
|
+
message?: string | undefined;
|
|
172
172
|
}, {
|
|
173
|
-
message
|
|
173
|
+
message?: string | undefined;
|
|
174
174
|
}>;
|
|
175
175
|
403: z.ZodObject<{
|
|
176
|
-
message: z.ZodString
|
|
176
|
+
message: z.ZodOptional<z.ZodString>;
|
|
177
177
|
}, "strip", z.ZodTypeAny, {
|
|
178
|
-
message
|
|
178
|
+
message?: string | undefined;
|
|
179
179
|
}, {
|
|
180
|
-
message
|
|
180
|
+
message?: string | undefined;
|
|
181
181
|
}>;
|
|
182
182
|
404: z.ZodObject<{
|
|
183
|
-
message: z.ZodString
|
|
183
|
+
message: z.ZodOptional<z.ZodString>;
|
|
184
184
|
}, "strip", z.ZodTypeAny, {
|
|
185
|
-
message
|
|
185
|
+
message?: string | undefined;
|
|
186
186
|
}, {
|
|
187
|
-
message
|
|
187
|
+
message?: string | undefined;
|
|
188
188
|
}>;
|
|
189
189
|
};
|
|
190
190
|
};
|
|
@@ -242,35 +242,35 @@ export declare const userManagementContract: {
|
|
|
242
242
|
isActive: boolean;
|
|
243
243
|
}>;
|
|
244
244
|
400: z.ZodObject<{
|
|
245
|
-
message: z.ZodString
|
|
245
|
+
message: z.ZodOptional<z.ZodString>;
|
|
246
246
|
errors: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
247
247
|
}, "strip", z.ZodTypeAny, {
|
|
248
|
-
message
|
|
248
|
+
message?: string | undefined;
|
|
249
249
|
errors?: string[] | undefined;
|
|
250
250
|
}, {
|
|
251
|
-
message
|
|
251
|
+
message?: string | undefined;
|
|
252
252
|
errors?: string[] | undefined;
|
|
253
253
|
}>;
|
|
254
254
|
401: z.ZodObject<{
|
|
255
|
-
message: z.ZodString
|
|
255
|
+
message: z.ZodOptional<z.ZodString>;
|
|
256
256
|
}, "strip", z.ZodTypeAny, {
|
|
257
|
-
message
|
|
257
|
+
message?: string | undefined;
|
|
258
258
|
}, {
|
|
259
|
-
message
|
|
259
|
+
message?: string | undefined;
|
|
260
260
|
}>;
|
|
261
261
|
403: z.ZodObject<{
|
|
262
|
-
message: z.ZodString
|
|
262
|
+
message: z.ZodOptional<z.ZodString>;
|
|
263
263
|
}, "strip", z.ZodTypeAny, {
|
|
264
|
-
message
|
|
264
|
+
message?: string | undefined;
|
|
265
265
|
}, {
|
|
266
|
-
message
|
|
266
|
+
message?: string | undefined;
|
|
267
267
|
}>;
|
|
268
268
|
409: z.ZodObject<{
|
|
269
|
-
message: z.ZodString
|
|
269
|
+
message: z.ZodOptional<z.ZodString>;
|
|
270
270
|
}, "strip", z.ZodTypeAny, {
|
|
271
|
-
message
|
|
271
|
+
message?: string | undefined;
|
|
272
272
|
}, {
|
|
273
|
-
message
|
|
273
|
+
message?: string | undefined;
|
|
274
274
|
}>;
|
|
275
275
|
};
|
|
276
276
|
};
|
|
@@ -365,35 +365,35 @@ export declare const userManagementContract: {
|
|
|
365
365
|
};
|
|
366
366
|
}>;
|
|
367
367
|
400: z.ZodObject<{
|
|
368
|
-
message: z.ZodString
|
|
368
|
+
message: z.ZodOptional<z.ZodString>;
|
|
369
369
|
errors: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
370
370
|
}, "strip", z.ZodTypeAny, {
|
|
371
|
-
message
|
|
371
|
+
message?: string | undefined;
|
|
372
372
|
errors?: string[] | undefined;
|
|
373
373
|
}, {
|
|
374
|
-
message
|
|
374
|
+
message?: string | undefined;
|
|
375
375
|
errors?: string[] | undefined;
|
|
376
376
|
}>;
|
|
377
377
|
401: z.ZodObject<{
|
|
378
|
-
message: z.ZodString
|
|
378
|
+
message: z.ZodOptional<z.ZodString>;
|
|
379
379
|
}, "strip", z.ZodTypeAny, {
|
|
380
|
-
message
|
|
380
|
+
message?: string | undefined;
|
|
381
381
|
}, {
|
|
382
|
-
message
|
|
382
|
+
message?: string | undefined;
|
|
383
383
|
}>;
|
|
384
384
|
403: z.ZodObject<{
|
|
385
|
-
message: z.ZodString
|
|
385
|
+
message: z.ZodOptional<z.ZodString>;
|
|
386
386
|
}, "strip", z.ZodTypeAny, {
|
|
387
|
-
message
|
|
387
|
+
message?: string | undefined;
|
|
388
388
|
}, {
|
|
389
|
-
message
|
|
389
|
+
message?: string | undefined;
|
|
390
390
|
}>;
|
|
391
391
|
404: z.ZodObject<{
|
|
392
|
-
message: z.ZodString
|
|
392
|
+
message: z.ZodOptional<z.ZodString>;
|
|
393
393
|
}, "strip", z.ZodTypeAny, {
|
|
394
|
-
message
|
|
394
|
+
message?: string | undefined;
|
|
395
395
|
}, {
|
|
396
|
-
message
|
|
396
|
+
message?: string | undefined;
|
|
397
397
|
}>;
|
|
398
398
|
};
|
|
399
399
|
};
|
|
@@ -407,87 +407,81 @@ export declare const userManagementContract: {
|
|
|
407
407
|
id: string;
|
|
408
408
|
}>;
|
|
409
409
|
summary: "Archive user account";
|
|
410
|
-
method: "
|
|
411
|
-
|
|
410
|
+
method: "POST";
|
|
411
|
+
body: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
|
|
412
|
+
path: "/login/:id/archive";
|
|
412
413
|
responses: {
|
|
413
414
|
200: z.ZodObject<{
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
type: z.ZodString;
|
|
418
|
-
profileId: z.ZodString;
|
|
419
|
-
roleId: z.ZodString;
|
|
420
|
-
resetPassword: z.ZodBoolean;
|
|
421
|
-
isActive: z.ZodBoolean;
|
|
422
|
-
role: z.ZodType<{
|
|
423
|
-
id: string;
|
|
424
|
-
access: string[];
|
|
425
|
-
name: string;
|
|
426
|
-
createdAt: string;
|
|
427
|
-
updatedAt: string;
|
|
428
|
-
description?: string | undefined;
|
|
429
|
-
}>;
|
|
430
|
-
createdAt: z.ZodString;
|
|
431
|
-
updatedAt: z.ZodString;
|
|
432
|
-
}, z.UnknownKeysParam, z.ZodTypeAny, {
|
|
433
|
-
type: string;
|
|
434
|
-
id: string;
|
|
435
|
-
resetPassword: boolean;
|
|
436
|
-
name: string;
|
|
437
|
-
identity: string;
|
|
438
|
-
profileId: string;
|
|
439
|
-
createdAt: string;
|
|
440
|
-
updatedAt: string;
|
|
441
|
-
roleId: string;
|
|
442
|
-
isActive: boolean;
|
|
443
|
-
role: {
|
|
444
|
-
id: string;
|
|
445
|
-
access: string[];
|
|
446
|
-
name: string;
|
|
447
|
-
createdAt: string;
|
|
448
|
-
updatedAt: string;
|
|
449
|
-
description?: string | undefined;
|
|
450
|
-
};
|
|
415
|
+
isArchived: z.ZodBoolean;
|
|
416
|
+
}, "strip", z.ZodTypeAny, {
|
|
417
|
+
isArchived: boolean;
|
|
451
418
|
}, {
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
419
|
+
isArchived: boolean;
|
|
420
|
+
}>;
|
|
421
|
+
401: z.ZodObject<{
|
|
422
|
+
message: z.ZodOptional<z.ZodString>;
|
|
423
|
+
}, "strip", z.ZodTypeAny, {
|
|
424
|
+
message?: string | undefined;
|
|
425
|
+
}, {
|
|
426
|
+
message?: string | undefined;
|
|
427
|
+
}>;
|
|
428
|
+
403: z.ZodObject<{
|
|
429
|
+
message: z.ZodOptional<z.ZodString>;
|
|
430
|
+
}, "strip", z.ZodTypeAny, {
|
|
431
|
+
message?: string | undefined;
|
|
432
|
+
}, {
|
|
433
|
+
message?: string | undefined;
|
|
434
|
+
}>;
|
|
435
|
+
404: z.ZodObject<{
|
|
436
|
+
message: z.ZodOptional<z.ZodString>;
|
|
437
|
+
}, "strip", z.ZodTypeAny, {
|
|
438
|
+
message?: string | undefined;
|
|
439
|
+
}, {
|
|
440
|
+
message?: string | undefined;
|
|
441
|
+
}>;
|
|
442
|
+
};
|
|
443
|
+
};
|
|
444
|
+
unarchiveUser: {
|
|
445
|
+
description: "Un-archive (soft delete) a user account";
|
|
446
|
+
pathParams: z.ZodObject<{
|
|
447
|
+
id: z.ZodString;
|
|
448
|
+
}, "strip", z.ZodTypeAny, {
|
|
449
|
+
id: string;
|
|
450
|
+
}, {
|
|
451
|
+
id: string;
|
|
452
|
+
}>;
|
|
453
|
+
summary: "Un-archive user account";
|
|
454
|
+
method: "POST";
|
|
455
|
+
body: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
|
|
456
|
+
path: "/login/:id/unarchive";
|
|
457
|
+
responses: {
|
|
458
|
+
200: z.ZodObject<{
|
|
459
|
+
isArchived: z.ZodBoolean;
|
|
460
|
+
}, "strip", z.ZodTypeAny, {
|
|
461
|
+
isArchived: boolean;
|
|
462
|
+
}, {
|
|
463
|
+
isArchived: boolean;
|
|
470
464
|
}>;
|
|
471
465
|
401: z.ZodObject<{
|
|
472
|
-
message: z.ZodString
|
|
466
|
+
message: z.ZodOptional<z.ZodString>;
|
|
473
467
|
}, "strip", z.ZodTypeAny, {
|
|
474
|
-
message
|
|
468
|
+
message?: string | undefined;
|
|
475
469
|
}, {
|
|
476
|
-
message
|
|
470
|
+
message?: string | undefined;
|
|
477
471
|
}>;
|
|
478
472
|
403: z.ZodObject<{
|
|
479
|
-
message: z.ZodString
|
|
473
|
+
message: z.ZodOptional<z.ZodString>;
|
|
480
474
|
}, "strip", z.ZodTypeAny, {
|
|
481
|
-
message
|
|
475
|
+
message?: string | undefined;
|
|
482
476
|
}, {
|
|
483
|
-
message
|
|
477
|
+
message?: string | undefined;
|
|
484
478
|
}>;
|
|
485
479
|
404: z.ZodObject<{
|
|
486
|
-
message: z.ZodString
|
|
480
|
+
message: z.ZodOptional<z.ZodString>;
|
|
487
481
|
}, "strip", z.ZodTypeAny, {
|
|
488
|
-
message
|
|
482
|
+
message?: string | undefined;
|
|
489
483
|
}, {
|
|
490
|
-
message
|
|
484
|
+
message?: string | undefined;
|
|
491
485
|
}>;
|
|
492
486
|
};
|
|
493
487
|
};
|
|
@@ -522,32 +516,32 @@ export declare const userManagementContract: {
|
|
|
522
516
|
success: boolean;
|
|
523
517
|
}>;
|
|
524
518
|
400: z.ZodObject<{
|
|
525
|
-
message: z.ZodString
|
|
519
|
+
message: z.ZodOptional<z.ZodString>;
|
|
526
520
|
}, "strip", z.ZodTypeAny, {
|
|
527
|
-
message
|
|
521
|
+
message?: string | undefined;
|
|
528
522
|
}, {
|
|
529
|
-
message
|
|
523
|
+
message?: string | undefined;
|
|
530
524
|
}>;
|
|
531
525
|
401: z.ZodObject<{
|
|
532
|
-
message: z.ZodString
|
|
526
|
+
message: z.ZodOptional<z.ZodString>;
|
|
533
527
|
}, "strip", z.ZodTypeAny, {
|
|
534
|
-
message
|
|
528
|
+
message?: string | undefined;
|
|
535
529
|
}, {
|
|
536
|
-
message
|
|
530
|
+
message?: string | undefined;
|
|
537
531
|
}>;
|
|
538
532
|
403: z.ZodObject<{
|
|
539
|
-
message: z.ZodString
|
|
533
|
+
message: z.ZodOptional<z.ZodString>;
|
|
540
534
|
}, "strip", z.ZodTypeAny, {
|
|
541
|
-
message
|
|
535
|
+
message?: string | undefined;
|
|
542
536
|
}, {
|
|
543
|
-
message
|
|
537
|
+
message?: string | undefined;
|
|
544
538
|
}>;
|
|
545
539
|
404: z.ZodObject<{
|
|
546
|
-
message: z.ZodString
|
|
540
|
+
message: z.ZodOptional<z.ZodString>;
|
|
547
541
|
}, "strip", z.ZodTypeAny, {
|
|
548
|
-
message
|
|
542
|
+
message?: string | undefined;
|
|
549
543
|
}, {
|
|
550
|
-
message
|
|
544
|
+
message?: string | undefined;
|
|
551
545
|
}>;
|
|
552
546
|
};
|
|
553
547
|
};
|
|
@@ -580,18 +574,18 @@ export declare const userManagementContract: {
|
|
|
580
574
|
description?: string | undefined;
|
|
581
575
|
}>, "many">;
|
|
582
576
|
401: z.ZodObject<{
|
|
583
|
-
message: z.ZodString
|
|
577
|
+
message: z.ZodOptional<z.ZodString>;
|
|
584
578
|
}, "strip", z.ZodTypeAny, {
|
|
585
|
-
message
|
|
579
|
+
message?: string | undefined;
|
|
586
580
|
}, {
|
|
587
|
-
message
|
|
581
|
+
message?: string | undefined;
|
|
588
582
|
}>;
|
|
589
583
|
403: z.ZodObject<{
|
|
590
|
-
message: z.ZodString
|
|
584
|
+
message: z.ZodOptional<z.ZodString>;
|
|
591
585
|
}, "strip", z.ZodTypeAny, {
|
|
592
|
-
message
|
|
586
|
+
message?: string | undefined;
|
|
593
587
|
}, {
|
|
594
|
-
message
|
|
588
|
+
message?: string | undefined;
|
|
595
589
|
}>;
|
|
596
590
|
};
|
|
597
591
|
};
|
|
@@ -631,25 +625,25 @@ export declare const userManagementContract: {
|
|
|
631
625
|
description?: string | undefined;
|
|
632
626
|
}>;
|
|
633
627
|
401: z.ZodObject<{
|
|
634
|
-
message: z.ZodString
|
|
628
|
+
message: z.ZodOptional<z.ZodString>;
|
|
635
629
|
}, "strip", z.ZodTypeAny, {
|
|
636
|
-
message
|
|
630
|
+
message?: string | undefined;
|
|
637
631
|
}, {
|
|
638
|
-
message
|
|
632
|
+
message?: string | undefined;
|
|
639
633
|
}>;
|
|
640
634
|
403: z.ZodObject<{
|
|
641
|
-
message: z.ZodString
|
|
635
|
+
message: z.ZodOptional<z.ZodString>;
|
|
642
636
|
}, "strip", z.ZodTypeAny, {
|
|
643
|
-
message
|
|
637
|
+
message?: string | undefined;
|
|
644
638
|
}, {
|
|
645
|
-
message
|
|
639
|
+
message?: string | undefined;
|
|
646
640
|
}>;
|
|
647
641
|
404: z.ZodObject<{
|
|
648
|
-
message: z.ZodString
|
|
642
|
+
message: z.ZodOptional<z.ZodString>;
|
|
649
643
|
}, "strip", z.ZodTypeAny, {
|
|
650
|
-
message
|
|
644
|
+
message?: string | undefined;
|
|
651
645
|
}, {
|
|
652
|
-
message
|
|
646
|
+
message?: string | undefined;
|
|
653
647
|
}>;
|
|
654
648
|
};
|
|
655
649
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contract.d.ts","sourceRoot":"","sources":["../../../../src/src/features/admin/contract.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,eAAO,MAAM,sBAAsB
|
|
1
|
+
{"version":3,"file":"contract.d.ts","sourceRoot":"","sources":["../../../../src/src/features/admin/contract.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8NjC,CAAC;AAEH;;;GAGG;AACH,MAAM,MAAM,sBAAsB,GAAG,OAAO,sBAAsB,CAAC"}
|
|
@@ -14,10 +14,10 @@ export const userManagementContract = c.router({
|
|
|
14
14
|
responses: {
|
|
15
15
|
200: z.array(UserManagementSchemas.managedUser),
|
|
16
16
|
401: z.object({
|
|
17
|
-
message: z.string(),
|
|
17
|
+
message: z.string().optional(),
|
|
18
18
|
}),
|
|
19
19
|
403: z.object({
|
|
20
|
-
message: z.string(),
|
|
20
|
+
message: z.string().optional(),
|
|
21
21
|
}),
|
|
22
22
|
},
|
|
23
23
|
summary: "List all user accounts",
|
|
@@ -36,13 +36,13 @@ export const userManagementContract = c.router({
|
|
|
36
36
|
responses: {
|
|
37
37
|
200: UserManagementSchemas.managedUser,
|
|
38
38
|
401: z.object({
|
|
39
|
-
message: z.string(),
|
|
39
|
+
message: z.string().optional(),
|
|
40
40
|
}),
|
|
41
41
|
403: z.object({
|
|
42
|
-
message: z.string(),
|
|
42
|
+
message: z.string().optional(),
|
|
43
43
|
}),
|
|
44
44
|
404: z.object({
|
|
45
|
-
message: z.string(),
|
|
45
|
+
message: z.string().optional(),
|
|
46
46
|
}),
|
|
47
47
|
},
|
|
48
48
|
summary: "Get user account details",
|
|
@@ -56,17 +56,17 @@ export const userManagementContract = c.router({
|
|
|
56
56
|
responses: {
|
|
57
57
|
201: UserManagementSchemas.createUserResponse,
|
|
58
58
|
400: z.object({
|
|
59
|
-
message: z.string(),
|
|
59
|
+
message: z.string().optional(),
|
|
60
60
|
errors: z.array(z.string()).optional(),
|
|
61
61
|
}),
|
|
62
62
|
401: z.object({
|
|
63
|
-
message: z.string(),
|
|
63
|
+
message: z.string().optional(),
|
|
64
64
|
}),
|
|
65
65
|
403: z.object({
|
|
66
|
-
message: z.string(),
|
|
66
|
+
message: z.string().optional(),
|
|
67
67
|
}),
|
|
68
68
|
409: z.object({
|
|
69
|
-
message: z.string(),
|
|
69
|
+
message: z.string().optional(),
|
|
70
70
|
}),
|
|
71
71
|
},
|
|
72
72
|
summary: "Create new user account",
|
|
@@ -83,17 +83,17 @@ export const userManagementContract = c.router({
|
|
|
83
83
|
responses: {
|
|
84
84
|
200: UserManagementSchemas.managedUser,
|
|
85
85
|
400: z.object({
|
|
86
|
-
message: z.string(),
|
|
86
|
+
message: z.string().optional(),
|
|
87
87
|
errors: z.array(z.string()).optional(),
|
|
88
88
|
}),
|
|
89
89
|
401: z.object({
|
|
90
|
-
message: z.string(),
|
|
90
|
+
message: z.string().optional(),
|
|
91
91
|
}),
|
|
92
92
|
403: z.object({
|
|
93
|
-
message: z.string(),
|
|
93
|
+
message: z.string().optional(),
|
|
94
94
|
}),
|
|
95
95
|
404: z.object({
|
|
96
|
-
message: z.string(),
|
|
96
|
+
message: z.string().optional(),
|
|
97
97
|
}),
|
|
98
98
|
},
|
|
99
99
|
summary: "Update user account",
|
|
@@ -101,26 +101,54 @@ export const userManagementContract = c.router({
|
|
|
101
101
|
},
|
|
102
102
|
// Archive user (soft delete)
|
|
103
103
|
archiveUser: {
|
|
104
|
-
method: "
|
|
105
|
-
path: "/login/:id",
|
|
104
|
+
method: "POST",
|
|
105
|
+
path: "/login/:id/archive",
|
|
106
106
|
pathParams: z.object({
|
|
107
107
|
id: z.string(),
|
|
108
108
|
}),
|
|
109
|
+
body: z.object({}),
|
|
109
110
|
responses: {
|
|
110
|
-
200:
|
|
111
|
+
200: z.object({
|
|
112
|
+
isArchived: z.boolean(),
|
|
113
|
+
}),
|
|
111
114
|
401: z.object({
|
|
112
|
-
message: z.string(),
|
|
115
|
+
message: z.string().optional(),
|
|
113
116
|
}),
|
|
114
117
|
403: z.object({
|
|
115
|
-
message: z.string(),
|
|
118
|
+
message: z.string().optional(),
|
|
116
119
|
}),
|
|
117
120
|
404: z.object({
|
|
118
|
-
message: z.string(),
|
|
121
|
+
message: z.string().optional(),
|
|
119
122
|
}),
|
|
120
123
|
},
|
|
121
124
|
summary: "Archive user account",
|
|
122
125
|
description: "Archive (soft delete) a user account",
|
|
123
126
|
},
|
|
127
|
+
// Archive user (soft delete)
|
|
128
|
+
unarchiveUser: {
|
|
129
|
+
method: "POST",
|
|
130
|
+
path: "/login/:id/unarchive",
|
|
131
|
+
pathParams: z.object({
|
|
132
|
+
id: z.string(),
|
|
133
|
+
}),
|
|
134
|
+
body: z.object({}),
|
|
135
|
+
responses: {
|
|
136
|
+
200: z.object({
|
|
137
|
+
isArchived: z.boolean(),
|
|
138
|
+
}),
|
|
139
|
+
401: z.object({
|
|
140
|
+
message: z.string().optional(),
|
|
141
|
+
}),
|
|
142
|
+
403: z.object({
|
|
143
|
+
message: z.string().optional(),
|
|
144
|
+
}),
|
|
145
|
+
404: z.object({
|
|
146
|
+
message: z.string().optional(),
|
|
147
|
+
}),
|
|
148
|
+
},
|
|
149
|
+
summary: "Un-archive user account",
|
|
150
|
+
description: "Un-archive (soft delete) a user account",
|
|
151
|
+
},
|
|
124
152
|
// Reset user password
|
|
125
153
|
resetPassword: {
|
|
126
154
|
method: "POST",
|
|
@@ -134,16 +162,16 @@ export const userManagementContract = c.router({
|
|
|
134
162
|
success: z.boolean(),
|
|
135
163
|
}),
|
|
136
164
|
400: z.object({
|
|
137
|
-
message: z.string(),
|
|
165
|
+
message: z.string().optional(),
|
|
138
166
|
}),
|
|
139
167
|
401: z.object({
|
|
140
|
-
message: z.string(),
|
|
168
|
+
message: z.string().optional(),
|
|
141
169
|
}),
|
|
142
170
|
403: z.object({
|
|
143
|
-
message: z.string(),
|
|
171
|
+
message: z.string().optional(),
|
|
144
172
|
}),
|
|
145
173
|
404: z.object({
|
|
146
|
-
message: z.string(),
|
|
174
|
+
message: z.string().optional(),
|
|
147
175
|
}),
|
|
148
176
|
},
|
|
149
177
|
summary: "Reset user password",
|
|
@@ -156,10 +184,10 @@ export const userManagementContract = c.router({
|
|
|
156
184
|
responses: {
|
|
157
185
|
200: z.array(UserManagementSchemas.role),
|
|
158
186
|
401: z.object({
|
|
159
|
-
message: z.string(),
|
|
187
|
+
message: z.string().optional(),
|
|
160
188
|
}),
|
|
161
189
|
403: z.object({
|
|
162
|
-
message: z.string(),
|
|
190
|
+
message: z.string().optional(),
|
|
163
191
|
}),
|
|
164
192
|
},
|
|
165
193
|
summary: "List all roles",
|
|
@@ -175,13 +203,13 @@ export const userManagementContract = c.router({
|
|
|
175
203
|
responses: {
|
|
176
204
|
200: UserManagementSchemas.role,
|
|
177
205
|
401: z.object({
|
|
178
|
-
message: z.string(),
|
|
206
|
+
message: z.string().optional(),
|
|
179
207
|
}),
|
|
180
208
|
403: z.object({
|
|
181
|
-
message: z.string(),
|
|
209
|
+
message: z.string().optional(),
|
|
182
210
|
}),
|
|
183
211
|
404: z.object({
|
|
184
|
-
message: z.string(),
|
|
212
|
+
message: z.string().optional(),
|
|
185
213
|
}),
|
|
186
214
|
},
|
|
187
215
|
summary: "Get role details",
|
|
@@ -39,11 +39,23 @@ export declare class UserManagementRepository extends BaseRepository<typeof user
|
|
|
39
39
|
/**
|
|
40
40
|
* Archives (soft deletes) a user account by ID.
|
|
41
41
|
* @param {string} id - The unique identifier of the user account to archive.
|
|
42
|
-
* @returns {Promise<
|
|
42
|
+
* @returns {Promise<{ isArchived: boolean }>} A promise that resolves to whether isArchived.
|
|
43
43
|
* @throws {PermissionError} If the user lacks required permissions
|
|
44
44
|
* @throws {APIError} If the response status code is not 200.
|
|
45
45
|
*/
|
|
46
|
-
archiveUser(id: string): Promise<
|
|
46
|
+
archiveUser(id: string): Promise<{
|
|
47
|
+
isArchived: boolean;
|
|
48
|
+
}>;
|
|
49
|
+
/**
|
|
50
|
+
* Archives (soft deletes) a user account by ID.
|
|
51
|
+
* @param {string} id - The unique identifier of the user account to archive.
|
|
52
|
+
* @returns {Promise<{ isArchived: boolean }>} A promise that resolves to whether isArchived.
|
|
53
|
+
* @throws {PermissionError} If the user lacks required permissions
|
|
54
|
+
* @throws {APIError} If the response status code is not 200.
|
|
55
|
+
*/
|
|
56
|
+
unArchiveUser(id: string): Promise<{
|
|
57
|
+
isArchived: boolean;
|
|
58
|
+
}>;
|
|
47
59
|
/**
|
|
48
60
|
* Resets a user's password.
|
|
49
61
|
* @param {string} id - The unique identifier of the user account.
|
|
@@ -52,7 +64,9 @@ export declare class UserManagementRepository extends BaseRepository<typeof user
|
|
|
52
64
|
* @throws {PermissionError} If the user lacks required permissions
|
|
53
65
|
* @throws {APIError} If the response status code is not 200.
|
|
54
66
|
*/
|
|
55
|
-
resetUserPassword(id: string, input?: ResetPasswordRequest): Promise<
|
|
67
|
+
resetUserPassword(id: string, input?: ResetPasswordRequest): Promise<{
|
|
68
|
+
success: boolean;
|
|
69
|
+
}>;
|
|
56
70
|
/**
|
|
57
71
|
* Retrieves all user accounts.
|
|
58
72
|
* Results are ordered in descending order by creation date by default.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"repository.d.ts","sourceRoot":"","sources":["../../../../src/src/features/admin/repository.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AACjE,OAAO,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,KAAK,EACV,iBAAiB,EACjB,kBAAkB,EAClB,oBAAoB,EACpB,iBAAiB,EAClB,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EACL,WAAW,EAGZ,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EAAE,IAAI,EAAiB,MAAM,sBAAsB,CAAC;AAE3D;;;GAGG;AACH,qBAAa,wBACX,SAAQ,cAAc,CAAC,OAAO,sBAAsB,CAAC;IACrD;;;;;OAKG;gBACS,KAAK,CAAC,EAAE;QAAE,IAAI,CAAC,EAAE,UAAU,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE;IAIxD;;;;;;OAMG;IACG,UAAU,CAAC,KAAK,EAAE,iBAAiB,GAAG,OAAO,CAAC,kBAAkB,CAAC;IAgBvE;;;;;;;OAOG;IACG,UAAU,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,iBAAiB,GAAG,OAAO,CAAC,WAAW,CAAC;IAuB5E;;;;;;OAMG;IACG,WAAW,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,
|
|
1
|
+
{"version":3,"file":"repository.d.ts","sourceRoot":"","sources":["../../../../src/src/features/admin/repository.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AACjE,OAAO,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,KAAK,EACV,iBAAiB,EACjB,kBAAkB,EAClB,oBAAoB,EACpB,iBAAiB,EAClB,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EACL,WAAW,EAGZ,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EAAE,IAAI,EAAiB,MAAM,sBAAsB,CAAC;AAE3D;;;GAGG;AACH,qBAAa,wBACX,SAAQ,cAAc,CAAC,OAAO,sBAAsB,CAAC;IACrD;;;;;OAKG;gBACS,KAAK,CAAC,EAAE;QAAE,IAAI,CAAC,EAAE,UAAU,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE;IAIxD;;;;;;OAMG;IACG,UAAU,CAAC,KAAK,EAAE,iBAAiB,GAAG,OAAO,CAAC,kBAAkB,CAAC;IAgBvE;;;;;;;OAOG;IACG,UAAU,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,iBAAiB,GAAG,OAAO,CAAC,WAAW,CAAC;IAuB5E;;;;;;OAMG;IACG,WAAW,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC;QAAE,UAAU,EAAE,OAAO,CAAA;KAAE,CAAC;IAe/D;;;;;;OAMG;IACG,aAAa,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC;QAAE,UAAU,EAAE,OAAO,CAAA;KAAE,CAAC;IAejE;;;;;;;OAOG;IACG,iBAAiB,CACrB,EAAE,EAAE,MAAM,EACV,KAAK,GAAE,oBAAyB,GAC/B,OAAO,CAAC;QAAE,OAAO,EAAE,OAAO,CAAA;KAAE,CAAC;IAkBhC;;;;;;;;;;OAUG;IACG,WAAW,IAAI,OAAO,CAAC,WAAW,EAAE,CAAC;IAgB3C;;;;;;;;;;OAUG;IACG,OAAO,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC;IAuB/C;;;;;;;;;OASG;IACG,WAAW,IAAI,OAAO,CAAC,IAAI,EAAE,CAAC;IAsBpC;;;;;;;;;;OAUG;IACG,OAAO,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAmBzC"}
|