vr-commons 1.0.55 → 1.0.57
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/validations/appSpecs.validations.d.ts +18 -18
- package/dist/validations/appeals.validations.d.ts +8 -8
- package/dist/validations/auth.validations.d.ts +8 -8
- package/dist/validations/bans.validations.d.ts +8 -8
- package/dist/validations/devicePaymentPlan.validations.d.ts +55 -0
- package/dist/validations/devicePaymentPlan.validations.js +30 -0
- package/dist/validations/index.d.ts +2 -1
- package/dist/validations/index.js +5 -1
- package/dist/validations/moderation.validations.d.ts +77 -77
- package/dist/validations/profiles.validations.d.ts +71 -30
- package/dist/validations/profiles.validations.js +32 -17
- package/dist/validations/suspensions.validations.d.ts +8 -8
- package/package.json +2 -2
|
@@ -616,6 +616,9 @@ export declare const updateAppSpecsSchema: z.ZodObject<{
|
|
|
616
616
|
sentryDsn?: string | null | undefined;
|
|
617
617
|
}>;
|
|
618
618
|
}, "strip", z.ZodTypeAny, {
|
|
619
|
+
params: {
|
|
620
|
+
id: string;
|
|
621
|
+
};
|
|
619
622
|
body: {
|
|
620
623
|
appName?: string | undefined;
|
|
621
624
|
appShortName?: string | null | undefined;
|
|
@@ -692,10 +695,10 @@ export declare const updateAppSpecsSchema: z.ZodObject<{
|
|
|
692
695
|
facebookPixelId?: string | null | undefined;
|
|
693
696
|
sentryDsn?: string | null | undefined;
|
|
694
697
|
};
|
|
698
|
+
}, {
|
|
695
699
|
params: {
|
|
696
700
|
id: string;
|
|
697
701
|
};
|
|
698
|
-
}, {
|
|
699
702
|
body: {
|
|
700
703
|
appName?: string | undefined;
|
|
701
704
|
appShortName?: string | null | undefined;
|
|
@@ -772,9 +775,6 @@ export declare const updateAppSpecsSchema: z.ZodObject<{
|
|
|
772
775
|
facebookPixelId?: string | null | undefined;
|
|
773
776
|
sentryDsn?: string | null | undefined;
|
|
774
777
|
};
|
|
775
|
-
params: {
|
|
776
|
-
id: string;
|
|
777
|
-
};
|
|
778
778
|
}>;
|
|
779
779
|
export declare const listAppSpecsSchema: z.ZodObject<{
|
|
780
780
|
query: z.ZodObject<{
|
|
@@ -785,37 +785,37 @@ export declare const listAppSpecsSchema: z.ZodObject<{
|
|
|
785
785
|
sortBy: z.ZodOptional<z.ZodEnum<["version", "createdAt", "updatedAt"]>>;
|
|
786
786
|
sortOrder: z.ZodOptional<z.ZodEnum<["ASC", "DESC"]>>;
|
|
787
787
|
}, "strip", z.ZodTypeAny, {
|
|
788
|
-
limit: number;
|
|
789
788
|
page: number;
|
|
790
|
-
|
|
791
|
-
isActive?: "true" | "false" | undefined;
|
|
789
|
+
limit: number;
|
|
792
790
|
sortBy?: "createdAt" | "updatedAt" | "version" | undefined;
|
|
793
|
-
sortOrder?: "
|
|
794
|
-
}, {
|
|
791
|
+
sortOrder?: "ASC" | "DESC" | undefined;
|
|
795
792
|
search?: string | undefined;
|
|
796
|
-
limit?: string | undefined;
|
|
797
793
|
isActive?: "true" | "false" | undefined;
|
|
794
|
+
}, {
|
|
798
795
|
page?: string | undefined;
|
|
796
|
+
limit?: string | undefined;
|
|
799
797
|
sortBy?: "createdAt" | "updatedAt" | "version" | undefined;
|
|
800
|
-
sortOrder?: "
|
|
798
|
+
sortOrder?: "ASC" | "DESC" | undefined;
|
|
799
|
+
search?: string | undefined;
|
|
800
|
+
isActive?: "true" | "false" | undefined;
|
|
801
801
|
}>;
|
|
802
802
|
}, "strip", z.ZodTypeAny, {
|
|
803
803
|
query: {
|
|
804
|
-
limit: number;
|
|
805
804
|
page: number;
|
|
805
|
+
limit: number;
|
|
806
|
+
sortBy?: "createdAt" | "updatedAt" | "version" | undefined;
|
|
807
|
+
sortOrder?: "ASC" | "DESC" | undefined;
|
|
806
808
|
search?: string | undefined;
|
|
807
809
|
isActive?: "true" | "false" | undefined;
|
|
808
|
-
sortBy?: "createdAt" | "updatedAt" | "version" | undefined;
|
|
809
|
-
sortOrder?: "DESC" | "ASC" | undefined;
|
|
810
810
|
};
|
|
811
811
|
}, {
|
|
812
812
|
query: {
|
|
813
|
-
search?: string | undefined;
|
|
814
|
-
limit?: string | undefined;
|
|
815
|
-
isActive?: "true" | "false" | undefined;
|
|
816
813
|
page?: string | undefined;
|
|
814
|
+
limit?: string | undefined;
|
|
817
815
|
sortBy?: "createdAt" | "updatedAt" | "version" | undefined;
|
|
818
|
-
sortOrder?: "
|
|
816
|
+
sortOrder?: "ASC" | "DESC" | undefined;
|
|
817
|
+
search?: string | undefined;
|
|
818
|
+
isActive?: "true" | "false" | undefined;
|
|
819
819
|
};
|
|
820
820
|
}>;
|
|
821
821
|
export declare const getAppSpecsSchema: z.ZodObject<{
|
|
@@ -15,19 +15,19 @@ export declare const submitBanAppealSchema: z.ZodObject<{
|
|
|
15
15
|
appealReason: string;
|
|
16
16
|
}>;
|
|
17
17
|
}, "strip", z.ZodTypeAny, {
|
|
18
|
-
body: {
|
|
19
|
-
appealReason: string;
|
|
20
|
-
};
|
|
21
18
|
params: {
|
|
22
19
|
banId: string;
|
|
23
20
|
};
|
|
24
|
-
}, {
|
|
25
21
|
body: {
|
|
26
22
|
appealReason: string;
|
|
27
23
|
};
|
|
24
|
+
}, {
|
|
28
25
|
params: {
|
|
29
26
|
banId: string;
|
|
30
27
|
};
|
|
28
|
+
body: {
|
|
29
|
+
appealReason: string;
|
|
30
|
+
};
|
|
31
31
|
}>;
|
|
32
32
|
export declare const submitSuspensionAppealSchema: z.ZodObject<{
|
|
33
33
|
params: z.ZodObject<{
|
|
@@ -45,17 +45,17 @@ export declare const submitSuspensionAppealSchema: z.ZodObject<{
|
|
|
45
45
|
appealReason: string;
|
|
46
46
|
}>;
|
|
47
47
|
}, "strip", z.ZodTypeAny, {
|
|
48
|
-
body: {
|
|
49
|
-
appealReason: string;
|
|
50
|
-
};
|
|
51
48
|
params: {
|
|
52
49
|
suspensionId: string;
|
|
53
50
|
};
|
|
54
|
-
}, {
|
|
55
51
|
body: {
|
|
56
52
|
appealReason: string;
|
|
57
53
|
};
|
|
54
|
+
}, {
|
|
58
55
|
params: {
|
|
59
56
|
suspensionId: string;
|
|
60
57
|
};
|
|
58
|
+
body: {
|
|
59
|
+
appealReason: string;
|
|
60
|
+
};
|
|
61
61
|
}>;
|
|
@@ -96,32 +96,32 @@ export declare const registerSchema: z.ZodObject<{
|
|
|
96
96
|
email: z.ZodOptional<z.ZodString>;
|
|
97
97
|
password: z.ZodString;
|
|
98
98
|
}, "strict", z.ZodTypeAny, {
|
|
99
|
-
phoneNumber: string;
|
|
100
|
-
password: string;
|
|
101
99
|
firstName: string;
|
|
102
100
|
lastName: string;
|
|
103
|
-
email?: string | undefined;
|
|
104
|
-
}, {
|
|
105
101
|
phoneNumber: string;
|
|
106
102
|
password: string;
|
|
103
|
+
email?: string | undefined;
|
|
104
|
+
}, {
|
|
107
105
|
firstName: string;
|
|
108
106
|
lastName: string;
|
|
107
|
+
phoneNumber: string;
|
|
108
|
+
password: string;
|
|
109
109
|
email?: string | undefined;
|
|
110
110
|
}>;
|
|
111
111
|
}, "strip", z.ZodTypeAny, {
|
|
112
112
|
body: {
|
|
113
|
-
phoneNumber: string;
|
|
114
|
-
password: string;
|
|
115
113
|
firstName: string;
|
|
116
114
|
lastName: string;
|
|
115
|
+
phoneNumber: string;
|
|
116
|
+
password: string;
|
|
117
117
|
email?: string | undefined;
|
|
118
118
|
};
|
|
119
119
|
}, {
|
|
120
120
|
body: {
|
|
121
|
-
phoneNumber: string;
|
|
122
|
-
password: string;
|
|
123
121
|
firstName: string;
|
|
124
122
|
lastName: string;
|
|
123
|
+
phoneNumber: string;
|
|
124
|
+
password: string;
|
|
125
125
|
email?: string | undefined;
|
|
126
126
|
};
|
|
127
127
|
}>;
|
|
@@ -32,19 +32,19 @@ export declare const getUserRestrictionsSchema: z.ZodObject<{
|
|
|
32
32
|
includeResolved?: "true" | "false" | undefined;
|
|
33
33
|
}>;
|
|
34
34
|
}, "strip", z.ZodTypeAny, {
|
|
35
|
-
query: {
|
|
36
|
-
includeResolved?: "true" | "false" | undefined;
|
|
37
|
-
};
|
|
38
35
|
params: {
|
|
39
36
|
userId: string;
|
|
40
37
|
};
|
|
41
|
-
}, {
|
|
42
38
|
query: {
|
|
43
39
|
includeResolved?: "true" | "false" | undefined;
|
|
44
40
|
};
|
|
41
|
+
}, {
|
|
45
42
|
params: {
|
|
46
43
|
userId: string;
|
|
47
44
|
};
|
|
45
|
+
query: {
|
|
46
|
+
includeResolved?: "true" | "false" | undefined;
|
|
47
|
+
};
|
|
48
48
|
}>;
|
|
49
49
|
export declare const createBanSchema: z.ZodObject<{
|
|
50
50
|
params: z.ZodObject<{
|
|
@@ -65,19 +65,19 @@ export declare const createBanSchema: z.ZodObject<{
|
|
|
65
65
|
isPermanent?: boolean | undefined;
|
|
66
66
|
}>;
|
|
67
67
|
}, "strip", z.ZodTypeAny, {
|
|
68
|
+
params: {
|
|
69
|
+
userId: string;
|
|
70
|
+
};
|
|
68
71
|
body: {
|
|
69
72
|
reason: string;
|
|
70
73
|
isPermanent: boolean;
|
|
71
74
|
};
|
|
75
|
+
}, {
|
|
72
76
|
params: {
|
|
73
77
|
userId: string;
|
|
74
78
|
};
|
|
75
|
-
}, {
|
|
76
79
|
body: {
|
|
77
80
|
reason: string;
|
|
78
81
|
isPermanent?: boolean | undefined;
|
|
79
82
|
};
|
|
80
|
-
params: {
|
|
81
|
-
userId: string;
|
|
82
|
-
};
|
|
83
83
|
}>;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const listUserPaymentPlansSchema: z.ZodObject<{
|
|
3
|
+
query: z.ZodObject<{
|
|
4
|
+
status: z.ZodOptional<z.ZodEnum<["ACTIVE", "COMPLETED", "DEFAULTED", "CANCELLED"]>>;
|
|
5
|
+
page: z.ZodPipeline<z.ZodEffects<z.ZodOptional<z.ZodString>, number, string | undefined>, z.ZodNumber>;
|
|
6
|
+
limit: z.ZodPipeline<z.ZodEffects<z.ZodOptional<z.ZodString>, number, string | undefined>, z.ZodNumber>;
|
|
7
|
+
sortBy: z.ZodOptional<z.ZodEnum<["createdAt", "updatedAt", "nextInstallmentDueAt", "status"]>>;
|
|
8
|
+
sortOrder: z.ZodOptional<z.ZodEnum<["ASC", "DESC"]>>;
|
|
9
|
+
}, "strip", z.ZodTypeAny, {
|
|
10
|
+
page: number;
|
|
11
|
+
limit: number;
|
|
12
|
+
status?: "ACTIVE" | "COMPLETED" | "DEFAULTED" | "CANCELLED" | undefined;
|
|
13
|
+
sortBy?: "status" | "createdAt" | "updatedAt" | "nextInstallmentDueAt" | undefined;
|
|
14
|
+
sortOrder?: "ASC" | "DESC" | undefined;
|
|
15
|
+
}, {
|
|
16
|
+
status?: "ACTIVE" | "COMPLETED" | "DEFAULTED" | "CANCELLED" | undefined;
|
|
17
|
+
page?: string | undefined;
|
|
18
|
+
limit?: string | undefined;
|
|
19
|
+
sortBy?: "status" | "createdAt" | "updatedAt" | "nextInstallmentDueAt" | undefined;
|
|
20
|
+
sortOrder?: "ASC" | "DESC" | undefined;
|
|
21
|
+
}>;
|
|
22
|
+
}, "strip", z.ZodTypeAny, {
|
|
23
|
+
query: {
|
|
24
|
+
page: number;
|
|
25
|
+
limit: number;
|
|
26
|
+
status?: "ACTIVE" | "COMPLETED" | "DEFAULTED" | "CANCELLED" | undefined;
|
|
27
|
+
sortBy?: "status" | "createdAt" | "updatedAt" | "nextInstallmentDueAt" | undefined;
|
|
28
|
+
sortOrder?: "ASC" | "DESC" | undefined;
|
|
29
|
+
};
|
|
30
|
+
}, {
|
|
31
|
+
query: {
|
|
32
|
+
status?: "ACTIVE" | "COMPLETED" | "DEFAULTED" | "CANCELLED" | undefined;
|
|
33
|
+
page?: string | undefined;
|
|
34
|
+
limit?: string | undefined;
|
|
35
|
+
sortBy?: "status" | "createdAt" | "updatedAt" | "nextInstallmentDueAt" | undefined;
|
|
36
|
+
sortOrder?: "ASC" | "DESC" | undefined;
|
|
37
|
+
};
|
|
38
|
+
}>;
|
|
39
|
+
export declare const getUserPaymentPlanSchema: z.ZodObject<{
|
|
40
|
+
params: z.ZodObject<{
|
|
41
|
+
planId: z.ZodString;
|
|
42
|
+
}, "strip", z.ZodTypeAny, {
|
|
43
|
+
planId: string;
|
|
44
|
+
}, {
|
|
45
|
+
planId: string;
|
|
46
|
+
}>;
|
|
47
|
+
}, "strip", z.ZodTypeAny, {
|
|
48
|
+
params: {
|
|
49
|
+
planId: string;
|
|
50
|
+
};
|
|
51
|
+
}, {
|
|
52
|
+
params: {
|
|
53
|
+
planId: string;
|
|
54
|
+
};
|
|
55
|
+
}>;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getUserPaymentPlanSchema = exports.listUserPaymentPlansSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const vr_models_1 = require("vr-models");
|
|
6
|
+
const uuidSchema = zod_1.z.string().uuid("Invalid ID format");
|
|
7
|
+
exports.listUserPaymentPlansSchema = zod_1.z.object({
|
|
8
|
+
query: zod_1.z.object({
|
|
9
|
+
status: zod_1.z.enum(vr_models_1.PAYMENT_STATUS).optional(),
|
|
10
|
+
page: zod_1.z
|
|
11
|
+
.string()
|
|
12
|
+
.optional()
|
|
13
|
+
.transform((val) => (val ? parseInt(val) : 1))
|
|
14
|
+
.pipe(zod_1.z.number().min(1, "Page must be at least 1")),
|
|
15
|
+
limit: zod_1.z
|
|
16
|
+
.string()
|
|
17
|
+
.optional()
|
|
18
|
+
.transform((val) => (val ? parseInt(val) : 10))
|
|
19
|
+
.pipe(zod_1.z.number().min(1).max(50, "Limit cannot exceed 50")),
|
|
20
|
+
sortBy: zod_1.z
|
|
21
|
+
.enum(["createdAt", "updatedAt", "nextInstallmentDueAt", "status"])
|
|
22
|
+
.optional(),
|
|
23
|
+
sortOrder: zod_1.z.enum(["ASC", "DESC"]).optional(),
|
|
24
|
+
}),
|
|
25
|
+
});
|
|
26
|
+
exports.getUserPaymentPlanSchema = zod_1.z.object({
|
|
27
|
+
params: zod_1.z.object({
|
|
28
|
+
planId: uuidSchema,
|
|
29
|
+
}),
|
|
30
|
+
});
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
export { validate } from "./validate.validations";
|
|
2
2
|
export { riderLoginSchema, forgotPasswordSchema, userLoginSchema, refreshTokenSchema, registerSchema, confirmSchema, verifySchema, resendOtpSchema, } from "./auth.validations";
|
|
3
|
-
export { createUserSchema, getUserByIdSchema, updateUserProfileSchema, getAllUsersSchema, viewProfileSchema, passengerSignupSchema, updatePassengerProfileSchema, updateRiderProfileSchema, createRiderSchema, changePasswordSchema, deactivateAccountSchema, deleteAccountSchema, } from "./profiles.validations";
|
|
3
|
+
export { createUserSchema, getUserByIdSchema, updateUserProfileSchema, getAllUsersSchema, viewProfileSchema, passengerSignupSchema, updatePassengerProfileSchema, updateRiderProfileSchema, createRiderSchema, changePasswordSchema, deactivateAccountSchema, deleteAccountSchema, updateProfileSchema, } from "./profiles.validations";
|
|
4
4
|
export { listBansSchema, listPendingAppealsSchema, listSuspensionsSchema, reviewAppealSchema, revokeBanSchema, revokeSuspensionSchema, extendSuspensionSchema, exportBansSchema, } from "./moderation.validations";
|
|
5
5
|
export { submitBanAppealSchema, submitSuspensionAppealSchema, } from "./appeals.validations";
|
|
6
6
|
export { getBanSchema, getUserRestrictionsSchema, createBanSchema, } from "./bans.validations";
|
|
7
7
|
export { getSuspensionSchema, getUserSuspensionsSchema, createSuspensionSchema, } from "./suspensions.validations";
|
|
8
8
|
export { createAppSpecsSchema, updateAppSpecsSchema, listAppSpecsSchema, getActiveAppSpecsSchema, activateAppSpecsSchema, getAppSpecsSchema, } from "./appSpecs.validations";
|
|
9
|
+
export { listUserPaymentPlansSchema, getUserPaymentPlanSchema, } from "./devicePaymentPlan.validations";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getAppSpecsSchema = exports.activateAppSpecsSchema = exports.getActiveAppSpecsSchema = exports.listAppSpecsSchema = exports.updateAppSpecsSchema = exports.createAppSpecsSchema = exports.createSuspensionSchema = exports.getUserSuspensionsSchema = exports.getSuspensionSchema = exports.createBanSchema = exports.getUserRestrictionsSchema = exports.getBanSchema = exports.submitSuspensionAppealSchema = exports.submitBanAppealSchema = exports.exportBansSchema = exports.extendSuspensionSchema = exports.revokeSuspensionSchema = exports.revokeBanSchema = exports.reviewAppealSchema = exports.listSuspensionsSchema = exports.listPendingAppealsSchema = exports.listBansSchema = exports.deleteAccountSchema = exports.deactivateAccountSchema = exports.changePasswordSchema = exports.createRiderSchema = exports.updateRiderProfileSchema = exports.updatePassengerProfileSchema = exports.passengerSignupSchema = exports.viewProfileSchema = exports.getAllUsersSchema = exports.updateUserProfileSchema = exports.getUserByIdSchema = exports.createUserSchema = exports.resendOtpSchema = exports.verifySchema = exports.confirmSchema = exports.registerSchema = exports.refreshTokenSchema = exports.userLoginSchema = exports.forgotPasswordSchema = exports.riderLoginSchema = exports.validate = void 0;
|
|
3
|
+
exports.getUserPaymentPlanSchema = exports.listUserPaymentPlansSchema = exports.getAppSpecsSchema = exports.activateAppSpecsSchema = exports.getActiveAppSpecsSchema = exports.listAppSpecsSchema = exports.updateAppSpecsSchema = exports.createAppSpecsSchema = exports.createSuspensionSchema = exports.getUserSuspensionsSchema = exports.getSuspensionSchema = exports.createBanSchema = exports.getUserRestrictionsSchema = exports.getBanSchema = exports.submitSuspensionAppealSchema = exports.submitBanAppealSchema = exports.exportBansSchema = exports.extendSuspensionSchema = exports.revokeSuspensionSchema = exports.revokeBanSchema = exports.reviewAppealSchema = exports.listSuspensionsSchema = exports.listPendingAppealsSchema = exports.listBansSchema = exports.updateProfileSchema = exports.deleteAccountSchema = exports.deactivateAccountSchema = exports.changePasswordSchema = exports.createRiderSchema = exports.updateRiderProfileSchema = exports.updatePassengerProfileSchema = exports.passengerSignupSchema = exports.viewProfileSchema = exports.getAllUsersSchema = exports.updateUserProfileSchema = exports.getUserByIdSchema = exports.createUserSchema = exports.resendOtpSchema = exports.verifySchema = exports.confirmSchema = exports.registerSchema = exports.refreshTokenSchema = exports.userLoginSchema = exports.forgotPasswordSchema = exports.riderLoginSchema = exports.validate = void 0;
|
|
4
4
|
var validate_validations_1 = require("./validate.validations");
|
|
5
5
|
Object.defineProperty(exports, "validate", { enumerable: true, get: function () { return validate_validations_1.validate; } });
|
|
6
6
|
var auth_validations_1 = require("./auth.validations");
|
|
@@ -30,6 +30,7 @@ Object.defineProperty(exports, "createRiderSchema", { enumerable: true, get: fun
|
|
|
30
30
|
Object.defineProperty(exports, "changePasswordSchema", { enumerable: true, get: function () { return profiles_validations_1.changePasswordSchema; } });
|
|
31
31
|
Object.defineProperty(exports, "deactivateAccountSchema", { enumerable: true, get: function () { return profiles_validations_1.deactivateAccountSchema; } });
|
|
32
32
|
Object.defineProperty(exports, "deleteAccountSchema", { enumerable: true, get: function () { return profiles_validations_1.deleteAccountSchema; } });
|
|
33
|
+
Object.defineProperty(exports, "updateProfileSchema", { enumerable: true, get: function () { return profiles_validations_1.updateProfileSchema; } });
|
|
33
34
|
var moderation_validations_1 = require("./moderation.validations");
|
|
34
35
|
Object.defineProperty(exports, "listBansSchema", { enumerable: true, get: function () { return moderation_validations_1.listBansSchema; } });
|
|
35
36
|
Object.defineProperty(exports, "listPendingAppealsSchema", { enumerable: true, get: function () { return moderation_validations_1.listPendingAppealsSchema; } });
|
|
@@ -57,3 +58,6 @@ Object.defineProperty(exports, "listAppSpecsSchema", { enumerable: true, get: fu
|
|
|
57
58
|
Object.defineProperty(exports, "getActiveAppSpecsSchema", { enumerable: true, get: function () { return appSpecs_validations_1.getActiveAppSpecsSchema; } });
|
|
58
59
|
Object.defineProperty(exports, "activateAppSpecsSchema", { enumerable: true, get: function () { return appSpecs_validations_1.activateAppSpecsSchema; } });
|
|
59
60
|
Object.defineProperty(exports, "getAppSpecsSchema", { enumerable: true, get: function () { return appSpecs_validations_1.getAppSpecsSchema; } });
|
|
61
|
+
var devicePaymentPlan_validations_1 = require("./devicePaymentPlan.validations");
|
|
62
|
+
Object.defineProperty(exports, "listUserPaymentPlansSchema", { enumerable: true, get: function () { return devicePaymentPlan_validations_1.listUserPaymentPlansSchema; } });
|
|
63
|
+
Object.defineProperty(exports, "getUserPaymentPlanSchema", { enumerable: true, get: function () { return devicePaymentPlan_validations_1.getUserPaymentPlanSchema; } });
|
|
@@ -14,81 +14,81 @@ export declare const listBansSchema: z.ZodObject<{
|
|
|
14
14
|
sortBy: z.ZodOptional<z.ZodEnum<["bannedAt", "createdAt", "reason"]>>;
|
|
15
15
|
sortOrder: z.ZodOptional<z.ZodEnum<["ASC", "DESC"]>>;
|
|
16
16
|
}, "strip", z.ZodTypeAny, {
|
|
17
|
-
limit: number;
|
|
18
17
|
page: number;
|
|
18
|
+
limit: number;
|
|
19
|
+
status?: "active" | "revoked" | undefined;
|
|
20
|
+
sortBy?: "createdAt" | "reason" | "bannedAt" | undefined;
|
|
21
|
+
sortOrder?: "ASC" | "DESC" | undefined;
|
|
19
22
|
search?: string | undefined;
|
|
20
23
|
userId?: string | undefined;
|
|
21
24
|
isPermanent?: "true" | "false" | undefined;
|
|
22
25
|
appealStatus?: "pending" | "approved" | "rejected" | undefined;
|
|
23
|
-
status?: "active" | "revoked" | undefined;
|
|
24
|
-
sortBy?: "createdAt" | "reason" | "bannedAt" | undefined;
|
|
25
26
|
fromDate?: string | undefined;
|
|
26
27
|
toDate?: string | undefined;
|
|
27
|
-
sortOrder?: "DESC" | "ASC" | undefined;
|
|
28
28
|
}, {
|
|
29
|
-
|
|
29
|
+
status?: "active" | "revoked" | undefined;
|
|
30
|
+
page?: string | undefined;
|
|
30
31
|
limit?: string | undefined;
|
|
32
|
+
sortBy?: "createdAt" | "reason" | "bannedAt" | undefined;
|
|
33
|
+
sortOrder?: "ASC" | "DESC" | undefined;
|
|
34
|
+
search?: string | undefined;
|
|
31
35
|
userId?: string | undefined;
|
|
32
36
|
isPermanent?: "true" | "false" | undefined;
|
|
33
37
|
appealStatus?: "pending" | "approved" | "rejected" | undefined;
|
|
34
|
-
status?: "active" | "revoked" | undefined;
|
|
35
|
-
page?: string | undefined;
|
|
36
|
-
sortBy?: "createdAt" | "reason" | "bannedAt" | undefined;
|
|
37
38
|
fromDate?: string | undefined;
|
|
38
39
|
toDate?: string | undefined;
|
|
39
|
-
sortOrder?: "DESC" | "ASC" | undefined;
|
|
40
40
|
}>, {
|
|
41
|
-
limit: number;
|
|
42
41
|
page: number;
|
|
42
|
+
limit: number;
|
|
43
|
+
status?: "active" | "revoked" | undefined;
|
|
44
|
+
sortBy?: "createdAt" | "reason" | "bannedAt" | undefined;
|
|
45
|
+
sortOrder?: "ASC" | "DESC" | undefined;
|
|
43
46
|
search?: string | undefined;
|
|
44
47
|
userId?: string | undefined;
|
|
45
48
|
isPermanent?: "true" | "false" | undefined;
|
|
46
49
|
appealStatus?: "pending" | "approved" | "rejected" | undefined;
|
|
47
|
-
status?: "active" | "revoked" | undefined;
|
|
48
|
-
sortBy?: "createdAt" | "reason" | "bannedAt" | undefined;
|
|
49
50
|
fromDate?: string | undefined;
|
|
50
51
|
toDate?: string | undefined;
|
|
51
|
-
sortOrder?: "DESC" | "ASC" | undefined;
|
|
52
52
|
}, {
|
|
53
|
-
|
|
53
|
+
status?: "active" | "revoked" | undefined;
|
|
54
|
+
page?: string | undefined;
|
|
54
55
|
limit?: string | undefined;
|
|
56
|
+
sortBy?: "createdAt" | "reason" | "bannedAt" | undefined;
|
|
57
|
+
sortOrder?: "ASC" | "DESC" | undefined;
|
|
58
|
+
search?: string | undefined;
|
|
55
59
|
userId?: string | undefined;
|
|
56
60
|
isPermanent?: "true" | "false" | undefined;
|
|
57
61
|
appealStatus?: "pending" | "approved" | "rejected" | undefined;
|
|
58
|
-
status?: "active" | "revoked" | undefined;
|
|
59
|
-
page?: string | undefined;
|
|
60
|
-
sortBy?: "createdAt" | "reason" | "bannedAt" | undefined;
|
|
61
62
|
fromDate?: string | undefined;
|
|
62
63
|
toDate?: string | undefined;
|
|
63
|
-
sortOrder?: "DESC" | "ASC" | undefined;
|
|
64
64
|
}>;
|
|
65
65
|
}, "strip", z.ZodTypeAny, {
|
|
66
66
|
query: {
|
|
67
|
-
limit: number;
|
|
68
67
|
page: number;
|
|
68
|
+
limit: number;
|
|
69
|
+
status?: "active" | "revoked" | undefined;
|
|
70
|
+
sortBy?: "createdAt" | "reason" | "bannedAt" | undefined;
|
|
71
|
+
sortOrder?: "ASC" | "DESC" | undefined;
|
|
69
72
|
search?: string | undefined;
|
|
70
73
|
userId?: string | undefined;
|
|
71
74
|
isPermanent?: "true" | "false" | undefined;
|
|
72
75
|
appealStatus?: "pending" | "approved" | "rejected" | undefined;
|
|
73
|
-
status?: "active" | "revoked" | undefined;
|
|
74
|
-
sortBy?: "createdAt" | "reason" | "bannedAt" | undefined;
|
|
75
76
|
fromDate?: string | undefined;
|
|
76
77
|
toDate?: string | undefined;
|
|
77
|
-
sortOrder?: "DESC" | "ASC" | undefined;
|
|
78
78
|
};
|
|
79
79
|
}, {
|
|
80
80
|
query: {
|
|
81
|
-
|
|
81
|
+
status?: "active" | "revoked" | undefined;
|
|
82
|
+
page?: string | undefined;
|
|
82
83
|
limit?: string | undefined;
|
|
84
|
+
sortBy?: "createdAt" | "reason" | "bannedAt" | undefined;
|
|
85
|
+
sortOrder?: "ASC" | "DESC" | undefined;
|
|
86
|
+
search?: string | undefined;
|
|
83
87
|
userId?: string | undefined;
|
|
84
88
|
isPermanent?: "true" | "false" | undefined;
|
|
85
89
|
appealStatus?: "pending" | "approved" | "rejected" | undefined;
|
|
86
|
-
status?: "active" | "revoked" | undefined;
|
|
87
|
-
page?: string | undefined;
|
|
88
|
-
sortBy?: "createdAt" | "reason" | "bannedAt" | undefined;
|
|
89
90
|
fromDate?: string | undefined;
|
|
90
91
|
toDate?: string | undefined;
|
|
91
|
-
sortOrder?: "DESC" | "ASC" | undefined;
|
|
92
92
|
};
|
|
93
93
|
}>;
|
|
94
94
|
export declare const listSuspensionsSchema: z.ZodObject<{
|
|
@@ -105,75 +105,75 @@ export declare const listSuspensionsSchema: z.ZodObject<{
|
|
|
105
105
|
sortBy: z.ZodOptional<z.ZodEnum<["startedAt", "endsAt", "createdAt", "reason"]>>;
|
|
106
106
|
sortOrder: z.ZodOptional<z.ZodEnum<["ASC", "DESC"]>>;
|
|
107
107
|
}, "strip", z.ZodTypeAny, {
|
|
108
|
-
limit: number;
|
|
109
108
|
page: number;
|
|
109
|
+
limit: number;
|
|
110
|
+
status?: "active" | "revoked" | "expired" | undefined;
|
|
111
|
+
sortBy?: "createdAt" | "reason" | "endsAt" | "startedAt" | undefined;
|
|
112
|
+
sortOrder?: "ASC" | "DESC" | undefined;
|
|
110
113
|
search?: string | undefined;
|
|
111
114
|
userId?: string | undefined;
|
|
112
115
|
appealStatus?: "pending" | "approved" | "rejected" | undefined;
|
|
113
|
-
status?: "active" | "revoked" | "expired" | undefined;
|
|
114
|
-
sortBy?: "createdAt" | "reason" | "endsAt" | "startedAt" | undefined;
|
|
115
116
|
fromDate?: string | undefined;
|
|
116
117
|
toDate?: string | undefined;
|
|
117
|
-
sortOrder?: "DESC" | "ASC" | undefined;
|
|
118
118
|
}, {
|
|
119
|
-
search?: string | undefined;
|
|
120
|
-
limit?: string | undefined;
|
|
121
|
-
userId?: string | undefined;
|
|
122
|
-
appealStatus?: "pending" | "approved" | "rejected" | undefined;
|
|
123
119
|
status?: "active" | "revoked" | "expired" | undefined;
|
|
124
120
|
page?: string | undefined;
|
|
121
|
+
limit?: string | undefined;
|
|
125
122
|
sortBy?: "createdAt" | "reason" | "endsAt" | "startedAt" | undefined;
|
|
123
|
+
sortOrder?: "ASC" | "DESC" | undefined;
|
|
124
|
+
search?: string | undefined;
|
|
125
|
+
userId?: string | undefined;
|
|
126
|
+
appealStatus?: "pending" | "approved" | "rejected" | undefined;
|
|
126
127
|
fromDate?: string | undefined;
|
|
127
128
|
toDate?: string | undefined;
|
|
128
|
-
sortOrder?: "DESC" | "ASC" | undefined;
|
|
129
129
|
}>, {
|
|
130
|
-
limit: number;
|
|
131
130
|
page: number;
|
|
131
|
+
limit: number;
|
|
132
|
+
status?: "active" | "revoked" | "expired" | undefined;
|
|
133
|
+
sortBy?: "createdAt" | "reason" | "endsAt" | "startedAt" | undefined;
|
|
134
|
+
sortOrder?: "ASC" | "DESC" | undefined;
|
|
132
135
|
search?: string | undefined;
|
|
133
136
|
userId?: string | undefined;
|
|
134
137
|
appealStatus?: "pending" | "approved" | "rejected" | undefined;
|
|
135
|
-
status?: "active" | "revoked" | "expired" | undefined;
|
|
136
|
-
sortBy?: "createdAt" | "reason" | "endsAt" | "startedAt" | undefined;
|
|
137
138
|
fromDate?: string | undefined;
|
|
138
139
|
toDate?: string | undefined;
|
|
139
|
-
sortOrder?: "DESC" | "ASC" | undefined;
|
|
140
140
|
}, {
|
|
141
|
-
search?: string | undefined;
|
|
142
|
-
limit?: string | undefined;
|
|
143
|
-
userId?: string | undefined;
|
|
144
|
-
appealStatus?: "pending" | "approved" | "rejected" | undefined;
|
|
145
141
|
status?: "active" | "revoked" | "expired" | undefined;
|
|
146
142
|
page?: string | undefined;
|
|
143
|
+
limit?: string | undefined;
|
|
147
144
|
sortBy?: "createdAt" | "reason" | "endsAt" | "startedAt" | undefined;
|
|
145
|
+
sortOrder?: "ASC" | "DESC" | undefined;
|
|
146
|
+
search?: string | undefined;
|
|
147
|
+
userId?: string | undefined;
|
|
148
|
+
appealStatus?: "pending" | "approved" | "rejected" | undefined;
|
|
148
149
|
fromDate?: string | undefined;
|
|
149
150
|
toDate?: string | undefined;
|
|
150
|
-
sortOrder?: "DESC" | "ASC" | undefined;
|
|
151
151
|
}>;
|
|
152
152
|
}, "strip", z.ZodTypeAny, {
|
|
153
153
|
query: {
|
|
154
|
-
limit: number;
|
|
155
154
|
page: number;
|
|
155
|
+
limit: number;
|
|
156
|
+
status?: "active" | "revoked" | "expired" | undefined;
|
|
157
|
+
sortBy?: "createdAt" | "reason" | "endsAt" | "startedAt" | undefined;
|
|
158
|
+
sortOrder?: "ASC" | "DESC" | undefined;
|
|
156
159
|
search?: string | undefined;
|
|
157
160
|
userId?: string | undefined;
|
|
158
161
|
appealStatus?: "pending" | "approved" | "rejected" | undefined;
|
|
159
|
-
status?: "active" | "revoked" | "expired" | undefined;
|
|
160
|
-
sortBy?: "createdAt" | "reason" | "endsAt" | "startedAt" | undefined;
|
|
161
162
|
fromDate?: string | undefined;
|
|
162
163
|
toDate?: string | undefined;
|
|
163
|
-
sortOrder?: "DESC" | "ASC" | undefined;
|
|
164
164
|
};
|
|
165
165
|
}, {
|
|
166
166
|
query: {
|
|
167
|
-
search?: string | undefined;
|
|
168
|
-
limit?: string | undefined;
|
|
169
|
-
userId?: string | undefined;
|
|
170
|
-
appealStatus?: "pending" | "approved" | "rejected" | undefined;
|
|
171
167
|
status?: "active" | "revoked" | "expired" | undefined;
|
|
172
168
|
page?: string | undefined;
|
|
169
|
+
limit?: string | undefined;
|
|
173
170
|
sortBy?: "createdAt" | "reason" | "endsAt" | "startedAt" | undefined;
|
|
171
|
+
sortOrder?: "ASC" | "DESC" | undefined;
|
|
172
|
+
search?: string | undefined;
|
|
173
|
+
userId?: string | undefined;
|
|
174
|
+
appealStatus?: "pending" | "approved" | "rejected" | undefined;
|
|
174
175
|
fromDate?: string | undefined;
|
|
175
176
|
toDate?: string | undefined;
|
|
176
|
-
sortOrder?: "DESC" | "ASC" | undefined;
|
|
177
177
|
};
|
|
178
178
|
}>;
|
|
179
179
|
export declare const revokeBanSchema: z.ZodObject<{
|
|
@@ -192,19 +192,19 @@ export declare const revokeBanSchema: z.ZodObject<{
|
|
|
192
192
|
revocationReason?: string | undefined;
|
|
193
193
|
}>;
|
|
194
194
|
}, "strip", z.ZodTypeAny, {
|
|
195
|
-
body: {
|
|
196
|
-
revocationReason?: string | undefined;
|
|
197
|
-
};
|
|
198
195
|
params: {
|
|
199
196
|
banId: string;
|
|
200
197
|
};
|
|
201
|
-
}, {
|
|
202
198
|
body: {
|
|
203
199
|
revocationReason?: string | undefined;
|
|
204
200
|
};
|
|
201
|
+
}, {
|
|
205
202
|
params: {
|
|
206
203
|
banId: string;
|
|
207
204
|
};
|
|
205
|
+
body: {
|
|
206
|
+
revocationReason?: string | undefined;
|
|
207
|
+
};
|
|
208
208
|
}>;
|
|
209
209
|
export declare const revokeSuspensionSchema: z.ZodObject<{
|
|
210
210
|
params: z.ZodObject<{
|
|
@@ -222,19 +222,19 @@ export declare const revokeSuspensionSchema: z.ZodObject<{
|
|
|
222
222
|
revocationReason?: string | undefined;
|
|
223
223
|
}>;
|
|
224
224
|
}, "strip", z.ZodTypeAny, {
|
|
225
|
-
body: {
|
|
226
|
-
revocationReason?: string | undefined;
|
|
227
|
-
};
|
|
228
225
|
params: {
|
|
229
226
|
suspensionId: string;
|
|
230
227
|
};
|
|
231
|
-
}, {
|
|
232
228
|
body: {
|
|
233
229
|
revocationReason?: string | undefined;
|
|
234
230
|
};
|
|
231
|
+
}, {
|
|
235
232
|
params: {
|
|
236
233
|
suspensionId: string;
|
|
237
234
|
};
|
|
235
|
+
body: {
|
|
236
|
+
revocationReason?: string | undefined;
|
|
237
|
+
};
|
|
238
238
|
}>;
|
|
239
239
|
export declare const extendSuspensionSchema: z.ZodObject<{
|
|
240
240
|
params: z.ZodObject<{
|
|
@@ -261,21 +261,21 @@ export declare const extendSuspensionSchema: z.ZodObject<{
|
|
|
261
261
|
extensionReason?: string | undefined;
|
|
262
262
|
}>;
|
|
263
263
|
}, "strip", z.ZodTypeAny, {
|
|
264
|
+
params: {
|
|
265
|
+
suspensionId: string;
|
|
266
|
+
};
|
|
264
267
|
body: {
|
|
265
268
|
newEndDate: string;
|
|
266
269
|
extensionReason?: string | undefined;
|
|
267
270
|
};
|
|
271
|
+
}, {
|
|
268
272
|
params: {
|
|
269
273
|
suspensionId: string;
|
|
270
274
|
};
|
|
271
|
-
}, {
|
|
272
275
|
body: {
|
|
273
276
|
newEndDate: string;
|
|
274
277
|
extensionReason?: string | undefined;
|
|
275
278
|
};
|
|
276
|
-
params: {
|
|
277
|
-
suspensionId: string;
|
|
278
|
-
};
|
|
279
279
|
}>;
|
|
280
280
|
export declare const listPendingAppealsSchema: z.ZodObject<{
|
|
281
281
|
query: z.ZodEffects<z.ZodObject<{
|
|
@@ -286,34 +286,34 @@ export declare const listPendingAppealsSchema: z.ZodObject<{
|
|
|
286
286
|
fromDate: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
|
|
287
287
|
toDate: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
|
|
288
288
|
}, "strip", z.ZodTypeAny, {
|
|
289
|
-
limit: number;
|
|
290
289
|
page: number;
|
|
290
|
+
limit: number;
|
|
291
291
|
type?: "ban" | "suspension" | undefined;
|
|
292
292
|
fromDate?: string | undefined;
|
|
293
293
|
toDate?: string | undefined;
|
|
294
294
|
}, {
|
|
295
295
|
type?: "ban" | "suspension" | undefined;
|
|
296
|
-
limit?: string | undefined;
|
|
297
296
|
page?: string | undefined;
|
|
297
|
+
limit?: string | undefined;
|
|
298
298
|
fromDate?: string | undefined;
|
|
299
299
|
toDate?: string | undefined;
|
|
300
300
|
}>, {
|
|
301
|
-
limit: number;
|
|
302
301
|
page: number;
|
|
302
|
+
limit: number;
|
|
303
303
|
type?: "ban" | "suspension" | undefined;
|
|
304
304
|
fromDate?: string | undefined;
|
|
305
305
|
toDate?: string | undefined;
|
|
306
306
|
}, {
|
|
307
307
|
type?: "ban" | "suspension" | undefined;
|
|
308
|
-
limit?: string | undefined;
|
|
309
308
|
page?: string | undefined;
|
|
309
|
+
limit?: string | undefined;
|
|
310
310
|
fromDate?: string | undefined;
|
|
311
311
|
toDate?: string | undefined;
|
|
312
312
|
}>;
|
|
313
313
|
}, "strip", z.ZodTypeAny, {
|
|
314
314
|
query: {
|
|
315
|
-
limit: number;
|
|
316
315
|
page: number;
|
|
316
|
+
limit: number;
|
|
317
317
|
type?: "ban" | "suspension" | undefined;
|
|
318
318
|
fromDate?: string | undefined;
|
|
319
319
|
toDate?: string | undefined;
|
|
@@ -321,8 +321,8 @@ export declare const listPendingAppealsSchema: z.ZodObject<{
|
|
|
321
321
|
}, {
|
|
322
322
|
query: {
|
|
323
323
|
type?: "ban" | "suspension" | undefined;
|
|
324
|
-
limit?: string | undefined;
|
|
325
324
|
page?: string | undefined;
|
|
325
|
+
limit?: string | undefined;
|
|
326
326
|
fromDate?: string | undefined;
|
|
327
327
|
toDate?: string | undefined;
|
|
328
328
|
};
|
|
@@ -349,23 +349,23 @@ export declare const reviewAppealSchema: z.ZodObject<{
|
|
|
349
349
|
adminNotes?: string | undefined;
|
|
350
350
|
}>;
|
|
351
351
|
}, "strip", z.ZodTypeAny, {
|
|
352
|
-
body: {
|
|
353
|
-
appealStatus: "approved" | "rejected";
|
|
354
|
-
adminNotes?: string | undefined;
|
|
355
|
-
};
|
|
356
352
|
params: {
|
|
357
353
|
banId?: string | undefined;
|
|
358
354
|
suspensionId?: string | undefined;
|
|
359
355
|
};
|
|
360
|
-
}, {
|
|
361
356
|
body: {
|
|
362
357
|
appealStatus: "approved" | "rejected";
|
|
363
358
|
adminNotes?: string | undefined;
|
|
364
359
|
};
|
|
360
|
+
}, {
|
|
365
361
|
params: {
|
|
366
362
|
banId?: string | undefined;
|
|
367
363
|
suspensionId?: string | undefined;
|
|
368
364
|
};
|
|
365
|
+
body: {
|
|
366
|
+
appealStatus: "approved" | "rejected";
|
|
367
|
+
adminNotes?: string | undefined;
|
|
368
|
+
};
|
|
369
369
|
}>;
|
|
370
370
|
export declare const exportBansSchema: z.ZodObject<{
|
|
371
371
|
query: z.ZodEffects<z.ZodObject<{
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
+
export declare const phoneNumberRegex: RegExp;
|
|
3
|
+
export declare const nationalIdRegex: RegExp;
|
|
4
|
+
export declare const jacketIdRegex: RegExp;
|
|
5
|
+
export declare const phoneRegex: RegExp;
|
|
2
6
|
export declare const createUserSchema: z.ZodObject<{
|
|
3
7
|
body: z.ZodObject<{
|
|
4
8
|
firstName: z.ZodString;
|
|
@@ -166,6 +170,9 @@ export declare const updateUserProfileSchema: z.ZodObject<{
|
|
|
166
170
|
authorization: string;
|
|
167
171
|
}>;
|
|
168
172
|
}, "strip", z.ZodTypeAny, {
|
|
173
|
+
params: {
|
|
174
|
+
userId: string;
|
|
175
|
+
};
|
|
169
176
|
body: {
|
|
170
177
|
firstName?: string | undefined;
|
|
171
178
|
lastName?: string | undefined;
|
|
@@ -177,13 +184,13 @@ export declare const updateUserProfileSchema: z.ZodObject<{
|
|
|
177
184
|
isDeactivated?: boolean | undefined;
|
|
178
185
|
isSuspended?: boolean | undefined;
|
|
179
186
|
};
|
|
180
|
-
params: {
|
|
181
|
-
userId: string;
|
|
182
|
-
};
|
|
183
187
|
headers: {
|
|
184
188
|
authorization: string;
|
|
185
189
|
};
|
|
186
190
|
}, {
|
|
191
|
+
params: {
|
|
192
|
+
userId: string;
|
|
193
|
+
};
|
|
187
194
|
body: {
|
|
188
195
|
firstName?: string | undefined;
|
|
189
196
|
lastName?: string | undefined;
|
|
@@ -195,9 +202,6 @@ export declare const updateUserProfileSchema: z.ZodObject<{
|
|
|
195
202
|
isDeactivated?: boolean | undefined;
|
|
196
203
|
isSuspended?: boolean | undefined;
|
|
197
204
|
};
|
|
198
|
-
params: {
|
|
199
|
-
userId: string;
|
|
200
|
-
};
|
|
201
205
|
headers: {
|
|
202
206
|
authorization: string;
|
|
203
207
|
};
|
|
@@ -216,29 +220,29 @@ export declare const getAllUsersSchema: z.ZodObject<{
|
|
|
216
220
|
sortBy: z.ZodDefault<z.ZodEnum<["firstName", "lastLoginAt", "createdAt"]>>;
|
|
217
221
|
order: z.ZodDefault<z.ZodEnum<["asc", "desc"]>>;
|
|
218
222
|
}, "strip", z.ZodTypeAny, {
|
|
223
|
+
sortBy: "createdAt" | "firstName" | "lastLoginAt";
|
|
219
224
|
order: "asc" | "desc";
|
|
220
|
-
|
|
221
|
-
search?: string | undefined;
|
|
225
|
+
page?: number | undefined;
|
|
222
226
|
limit?: number | undefined;
|
|
227
|
+
search?: string | undefined;
|
|
223
228
|
isActive?: boolean | undefined;
|
|
224
229
|
role?: "ADMIN" | "PASSENGER" | "RIDER" | "AGENT" | "SUPER_ADMIN" | undefined;
|
|
225
230
|
isBanned?: boolean | undefined;
|
|
226
231
|
isSuspended?: boolean | undefined;
|
|
227
|
-
page?: number | undefined;
|
|
228
232
|
startDate?: string | undefined;
|
|
229
233
|
endDate?: string | undefined;
|
|
230
234
|
}, {
|
|
235
|
+
page?: string | undefined;
|
|
236
|
+
limit?: string | undefined;
|
|
237
|
+
sortBy?: "createdAt" | "firstName" | "lastLoginAt" | undefined;
|
|
231
238
|
search?: string | undefined;
|
|
232
239
|
order?: "asc" | "desc" | undefined;
|
|
233
|
-
limit?: string | undefined;
|
|
234
240
|
isActive?: "true" | "false" | undefined;
|
|
235
241
|
role?: "ADMIN" | "PASSENGER" | "RIDER" | "AGENT" | "SUPER_ADMIN" | undefined;
|
|
236
242
|
isBanned?: "true" | "false" | undefined;
|
|
237
243
|
isSuspended?: "true" | "false" | undefined;
|
|
238
|
-
page?: string | undefined;
|
|
239
244
|
startDate?: string | undefined;
|
|
240
245
|
endDate?: string | undefined;
|
|
241
|
-
sortBy?: "firstName" | "lastLoginAt" | "createdAt" | undefined;
|
|
242
246
|
}>;
|
|
243
247
|
headers: z.ZodObject<{
|
|
244
248
|
authorization: z.ZodString;
|
|
@@ -249,15 +253,15 @@ export declare const getAllUsersSchema: z.ZodObject<{
|
|
|
249
253
|
}>;
|
|
250
254
|
}, "strip", z.ZodTypeAny, {
|
|
251
255
|
query: {
|
|
256
|
+
sortBy: "createdAt" | "firstName" | "lastLoginAt";
|
|
252
257
|
order: "asc" | "desc";
|
|
253
|
-
|
|
254
|
-
search?: string | undefined;
|
|
258
|
+
page?: number | undefined;
|
|
255
259
|
limit?: number | undefined;
|
|
260
|
+
search?: string | undefined;
|
|
256
261
|
isActive?: boolean | undefined;
|
|
257
262
|
role?: "ADMIN" | "PASSENGER" | "RIDER" | "AGENT" | "SUPER_ADMIN" | undefined;
|
|
258
263
|
isBanned?: boolean | undefined;
|
|
259
264
|
isSuspended?: boolean | undefined;
|
|
260
|
-
page?: number | undefined;
|
|
261
265
|
startDate?: string | undefined;
|
|
262
266
|
endDate?: string | undefined;
|
|
263
267
|
};
|
|
@@ -266,17 +270,17 @@ export declare const getAllUsersSchema: z.ZodObject<{
|
|
|
266
270
|
};
|
|
267
271
|
}, {
|
|
268
272
|
query: {
|
|
273
|
+
page?: string | undefined;
|
|
274
|
+
limit?: string | undefined;
|
|
275
|
+
sortBy?: "createdAt" | "firstName" | "lastLoginAt" | undefined;
|
|
269
276
|
search?: string | undefined;
|
|
270
277
|
order?: "asc" | "desc" | undefined;
|
|
271
|
-
limit?: string | undefined;
|
|
272
278
|
isActive?: "true" | "false" | undefined;
|
|
273
279
|
role?: "ADMIN" | "PASSENGER" | "RIDER" | "AGENT" | "SUPER_ADMIN" | undefined;
|
|
274
280
|
isBanned?: "true" | "false" | undefined;
|
|
275
281
|
isSuspended?: "true" | "false" | undefined;
|
|
276
|
-
page?: string | undefined;
|
|
277
282
|
startDate?: string | undefined;
|
|
278
283
|
endDate?: string | undefined;
|
|
279
|
-
sortBy?: "firstName" | "lastLoginAt" | "createdAt" | undefined;
|
|
280
284
|
};
|
|
281
285
|
headers: {
|
|
282
286
|
authorization: string;
|
|
@@ -297,16 +301,16 @@ export declare const viewProfileSchema: z.ZodObject<{
|
|
|
297
301
|
headers: {
|
|
298
302
|
authorization: string;
|
|
299
303
|
};
|
|
300
|
-
body?: {} | undefined;
|
|
301
|
-
query?: {} | undefined;
|
|
302
304
|
params?: {} | undefined;
|
|
305
|
+
query?: {} | undefined;
|
|
306
|
+
body?: {} | undefined;
|
|
303
307
|
}, {
|
|
304
308
|
headers: {
|
|
305
309
|
authorization: string;
|
|
306
310
|
};
|
|
307
|
-
body?: {} | undefined;
|
|
308
|
-
query?: {} | undefined;
|
|
309
311
|
params?: {} | undefined;
|
|
312
|
+
query?: {} | undefined;
|
|
313
|
+
body?: {} | undefined;
|
|
310
314
|
}>;
|
|
311
315
|
export declare const passengerSignupSchema: z.ZodObject<{
|
|
312
316
|
body: z.ZodObject<{
|
|
@@ -441,8 +445,8 @@ export declare const createRiderSchema: z.ZodObject<{
|
|
|
441
445
|
plateNumber: string;
|
|
442
446
|
nationalId: string;
|
|
443
447
|
};
|
|
444
|
-
query?: {} | undefined;
|
|
445
448
|
params?: {} | undefined;
|
|
449
|
+
query?: {} | undefined;
|
|
446
450
|
}, {
|
|
447
451
|
body: {
|
|
448
452
|
firstName: string;
|
|
@@ -452,8 +456,8 @@ export declare const createRiderSchema: z.ZodObject<{
|
|
|
452
456
|
plateNumber: string;
|
|
453
457
|
nationalId: string;
|
|
454
458
|
};
|
|
455
|
-
query?: {} | undefined;
|
|
456
459
|
params?: {} | undefined;
|
|
460
|
+
query?: {} | undefined;
|
|
457
461
|
}>;
|
|
458
462
|
export declare const updateRiderProfileSchema: z.ZodObject<{
|
|
459
463
|
params: z.ZodObject<{
|
|
@@ -508,6 +512,9 @@ export declare const updateRiderProfileSchema: z.ZodObject<{
|
|
|
508
512
|
authorization: string;
|
|
509
513
|
}>;
|
|
510
514
|
}, "strip", z.ZodTypeAny, {
|
|
515
|
+
params: {
|
|
516
|
+
id: string;
|
|
517
|
+
};
|
|
511
518
|
body: {
|
|
512
519
|
firstName: string;
|
|
513
520
|
lastName: string;
|
|
@@ -516,14 +523,14 @@ export declare const updateRiderProfileSchema: z.ZodObject<{
|
|
|
516
523
|
plateNumber: string;
|
|
517
524
|
nationalId: string;
|
|
518
525
|
};
|
|
519
|
-
params: {
|
|
520
|
-
id: string;
|
|
521
|
-
};
|
|
522
526
|
headers: {
|
|
523
527
|
authorization: string;
|
|
524
528
|
};
|
|
525
529
|
query?: {} | undefined;
|
|
526
530
|
}, {
|
|
531
|
+
params: {
|
|
532
|
+
id: string;
|
|
533
|
+
};
|
|
527
534
|
body: {
|
|
528
535
|
firstName: string;
|
|
529
536
|
lastName: string;
|
|
@@ -532,9 +539,6 @@ export declare const updateRiderProfileSchema: z.ZodObject<{
|
|
|
532
539
|
plateNumber: string;
|
|
533
540
|
nationalId: string;
|
|
534
541
|
};
|
|
535
|
-
params: {
|
|
536
|
-
id: string;
|
|
537
|
-
};
|
|
538
542
|
headers: {
|
|
539
543
|
authorization: string;
|
|
540
544
|
};
|
|
@@ -654,6 +658,43 @@ export declare const deleteAccountSchema: z.ZodObject<{
|
|
|
654
658
|
};
|
|
655
659
|
params?: {} | undefined;
|
|
656
660
|
}>;
|
|
661
|
+
export declare const updateProfileSchema: z.ZodObject<{
|
|
662
|
+
body: z.ZodObject<{
|
|
663
|
+
firstName: z.ZodOptional<z.ZodString>;
|
|
664
|
+
lastName: z.ZodOptional<z.ZodString>;
|
|
665
|
+
phoneNumber: z.ZodOptional<z.ZodString>;
|
|
666
|
+
email: z.ZodOptional<z.ZodString>;
|
|
667
|
+
nationalId: z.ZodOptional<z.ZodString>;
|
|
668
|
+
}, "strict", z.ZodTypeAny, {
|
|
669
|
+
firstName?: string | undefined;
|
|
670
|
+
lastName?: string | undefined;
|
|
671
|
+
phoneNumber?: string | undefined;
|
|
672
|
+
email?: string | undefined;
|
|
673
|
+
nationalId?: string | undefined;
|
|
674
|
+
}, {
|
|
675
|
+
firstName?: string | undefined;
|
|
676
|
+
lastName?: string | undefined;
|
|
677
|
+
phoneNumber?: string | undefined;
|
|
678
|
+
email?: string | undefined;
|
|
679
|
+
nationalId?: string | undefined;
|
|
680
|
+
}>;
|
|
681
|
+
}, "strip", z.ZodTypeAny, {
|
|
682
|
+
body: {
|
|
683
|
+
firstName?: string | undefined;
|
|
684
|
+
lastName?: string | undefined;
|
|
685
|
+
phoneNumber?: string | undefined;
|
|
686
|
+
email?: string | undefined;
|
|
687
|
+
nationalId?: string | undefined;
|
|
688
|
+
};
|
|
689
|
+
}, {
|
|
690
|
+
body: {
|
|
691
|
+
firstName?: string | undefined;
|
|
692
|
+
lastName?: string | undefined;
|
|
693
|
+
phoneNumber?: string | undefined;
|
|
694
|
+
email?: string | undefined;
|
|
695
|
+
nationalId?: string | undefined;
|
|
696
|
+
};
|
|
697
|
+
}>;
|
|
657
698
|
export type CreateUserInput = z.infer<typeof createUserSchema>;
|
|
658
699
|
export type GetUserByIdInput = z.infer<typeof getUserByIdSchema>;
|
|
659
700
|
export type UpdateUserProfileInput = z.infer<typeof updateUserProfileSchema>;
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.deleteAccountSchema = exports.deactivateAccountSchema = exports.changePasswordSchema = exports.updateRiderProfileSchema = exports.createRiderSchema = exports.updatePassengerProfileSchema = exports.passengerSignupSchema = exports.viewProfileSchema = exports.getAllUsersSchema = exports.updateUserProfileSchema = exports.getUserByIdSchema = exports.createUserSchema = void 0;
|
|
3
|
+
exports.updateProfileSchema = exports.deleteAccountSchema = exports.deactivateAccountSchema = exports.changePasswordSchema = exports.updateRiderProfileSchema = exports.createRiderSchema = exports.updatePassengerProfileSchema = exports.passengerSignupSchema = exports.viewProfileSchema = exports.getAllUsersSchema = exports.updateUserProfileSchema = exports.getUserByIdSchema = exports.createUserSchema = exports.phoneRegex = exports.jacketIdRegex = exports.nationalIdRegex = exports.phoneNumberRegex = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
// ============================================================================
|
|
6
6
|
// COMMON VALIDATIONS
|
|
7
7
|
// ============================================================================
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
exports.phoneNumberRegex = /^(078|079|072|073)\d{7}$/;
|
|
9
|
+
exports.nationalIdRegex = /^\d{16}$/;
|
|
10
|
+
exports.jacketIdRegex = /^JKT-\d{9}$/;
|
|
11
|
+
exports.phoneRegex = /^[0-9]{10,15}$/;
|
|
11
12
|
// ============================================================================
|
|
12
13
|
// ADMIN/SUPER ADMIN SCHEMAS
|
|
13
14
|
// ============================================================================
|
|
@@ -24,10 +25,10 @@ exports.createUserSchema = zod_1.z.object({
|
|
|
24
25
|
.max(100, "Last name cannot exceed 100 characters"),
|
|
25
26
|
phoneNumber: zod_1.z
|
|
26
27
|
.string()
|
|
27
|
-
.regex(phoneNumberRegex, "Phone number must be a valid Rwandan number (078/079/072/073) followed by 7 digits"),
|
|
28
|
+
.regex(exports.phoneNumberRegex, "Phone number must be a valid Rwandan number (078/079/072/073) followed by 7 digits"),
|
|
28
29
|
nationalId: zod_1.z
|
|
29
30
|
.string()
|
|
30
|
-
.regex(nationalIdRegex, "National ID must be 16 digits"),
|
|
31
|
+
.regex(exports.nationalIdRegex, "National ID must be 16 digits"),
|
|
31
32
|
email: zod_1.z
|
|
32
33
|
.string()
|
|
33
34
|
.email("Invalid email address")
|
|
@@ -48,7 +49,7 @@ exports.createUserSchema = zod_1.z.object({
|
|
|
48
49
|
.nullable(),
|
|
49
50
|
jacketId: zod_1.z
|
|
50
51
|
.string()
|
|
51
|
-
.regex(jacketIdRegex, "Jacket ID must be in format JKT-000000000")
|
|
52
|
+
.regex(exports.jacketIdRegex, "Jacket ID must be in format JKT-000000000")
|
|
52
53
|
.optional()
|
|
53
54
|
.nullable(),
|
|
54
55
|
}),
|
|
@@ -94,7 +95,7 @@ exports.updateUserProfileSchema = zod_1.z.object({
|
|
|
94
95
|
.or(zod_1.z.literal("")),
|
|
95
96
|
phoneNumber: zod_1.z
|
|
96
97
|
.string()
|
|
97
|
-
.regex(phoneNumberRegex, "Invalid phone number format")
|
|
98
|
+
.regex(exports.phoneNumberRegex, "Invalid phone number format")
|
|
98
99
|
.optional(),
|
|
99
100
|
plateNumber: zod_1.z
|
|
100
101
|
.string()
|
|
@@ -183,13 +184,13 @@ exports.passengerSignupSchema = zod_1.z.object({
|
|
|
183
184
|
.max(100, "Last name cannot exceed 100 characters"),
|
|
184
185
|
phoneNumber: zod_1.z
|
|
185
186
|
.string()
|
|
186
|
-
.regex(phoneNumberRegex, "Phone number must be a valid Rwandan number (078/079/072/073) followed by 7 digits"),
|
|
187
|
+
.regex(exports.phoneNumberRegex, "Phone number must be a valid Rwandan number (078/079/072/073) followed by 7 digits"),
|
|
187
188
|
nationalId: zod_1.z
|
|
188
189
|
.string()
|
|
189
|
-
.regex(nationalIdRegex, "National ID must be 16 digits"),
|
|
190
|
+
.regex(exports.nationalIdRegex, "National ID must be 16 digits"),
|
|
190
191
|
jacketId: zod_1.z
|
|
191
192
|
.string()
|
|
192
|
-
.regex(jacketIdRegex, "Jacket ID must be in format JKT-000000000")
|
|
193
|
+
.regex(exports.jacketIdRegex, "Jacket ID must be in format JKT-000000000")
|
|
193
194
|
.optional(),
|
|
194
195
|
email: zod_1.z
|
|
195
196
|
.string()
|
|
@@ -251,14 +252,14 @@ exports.createRiderSchema = zod_1.z.object({
|
|
|
251
252
|
.max(100, "Last name cannot exceed 100 characters"),
|
|
252
253
|
phoneNumber: zod_1.z
|
|
253
254
|
.string()
|
|
254
|
-
.regex(phoneNumberRegex, "Phone number must be a valid Rwandan number (078/079/072/073) followed by 7 digits"),
|
|
255
|
+
.regex(exports.phoneNumberRegex, "Phone number must be a valid Rwandan number (078/079/072/073) followed by 7 digits"),
|
|
255
256
|
nationalId: zod_1.z
|
|
256
257
|
.string()
|
|
257
|
-
.regex(nationalIdRegex, "National ID must be 16 digits"),
|
|
258
|
+
.regex(exports.nationalIdRegex, "National ID must be 16 digits"),
|
|
258
259
|
plateNumber: zod_1.z.string().max(20, "Plate number cannot exceed 20 characters"),
|
|
259
260
|
jacketId: zod_1.z
|
|
260
261
|
.string()
|
|
261
|
-
.regex(jacketIdRegex, "jacketId required and must be of format JKT-"),
|
|
262
|
+
.regex(exports.jacketIdRegex, "jacketId required and must be of format JKT-"),
|
|
262
263
|
}),
|
|
263
264
|
params: zod_1.z.object({}).optional(),
|
|
264
265
|
query: zod_1.z.object({}).optional(),
|
|
@@ -280,16 +281,16 @@ exports.updateRiderProfileSchema = zod_1.z.object({
|
|
|
280
281
|
.max(100, "Last name cannot exceed 100 characters"),
|
|
281
282
|
phoneNumber: zod_1.z
|
|
282
283
|
.string()
|
|
283
|
-
.regex(phoneNumberRegex, "Phone number must be a valid Rwandan number (078/079/072/073) followed by 7 digits"),
|
|
284
|
+
.regex(exports.phoneNumberRegex, "Phone number must be a valid Rwandan number (078/079/072/073) followed by 7 digits"),
|
|
284
285
|
nationalId: zod_1.z
|
|
285
286
|
.string()
|
|
286
|
-
.regex(nationalIdRegex, "National ID must be 16 digits"),
|
|
287
|
+
.regex(exports.nationalIdRegex, "National ID must be 16 digits"),
|
|
287
288
|
plateNumber: zod_1.z
|
|
288
289
|
.string()
|
|
289
290
|
.max(20, "Plate number cannot exceed 20 characters"),
|
|
290
291
|
jacketId: zod_1.z
|
|
291
292
|
.string()
|
|
292
|
-
.regex(jacketIdRegex, "jacketId required and must be of format JKT-"),
|
|
293
|
+
.regex(exports.jacketIdRegex, "jacketId required and must be of format JKT-"),
|
|
293
294
|
})
|
|
294
295
|
.refine((data) => Object.keys(data).length > 0, {
|
|
295
296
|
message: "At least one field must be provided for update",
|
|
@@ -356,3 +357,17 @@ exports.deleteAccountSchema = zod_1.z.object({
|
|
|
356
357
|
}),
|
|
357
358
|
}),
|
|
358
359
|
});
|
|
360
|
+
exports.updateProfileSchema = zod_1.z.object({
|
|
361
|
+
body: zod_1.z
|
|
362
|
+
.object({
|
|
363
|
+
firstName: zod_1.z.string().min(2).max(50).optional(),
|
|
364
|
+
lastName: zod_1.z.string().min(2).max(50).optional(),
|
|
365
|
+
phoneNumber: zod_1.z
|
|
366
|
+
.string()
|
|
367
|
+
.regex(exports.phoneRegex, "Invalid phone number")
|
|
368
|
+
.optional(),
|
|
369
|
+
email: zod_1.z.string().email("Invalid email").optional(),
|
|
370
|
+
nationalId: zod_1.z.string().min(5).max(20).optional(),
|
|
371
|
+
})
|
|
372
|
+
.strict(),
|
|
373
|
+
});
|
|
@@ -35,21 +35,21 @@ export declare const getUserSuspensionsSchema: z.ZodObject<{
|
|
|
35
35
|
includeResolved?: "true" | "false" | undefined;
|
|
36
36
|
}>;
|
|
37
37
|
}, "strip", z.ZodTypeAny, {
|
|
38
|
+
params: {
|
|
39
|
+
userId: string;
|
|
40
|
+
};
|
|
38
41
|
query: {
|
|
39
42
|
status?: "active" | "revoked" | "expired" | undefined;
|
|
40
43
|
includeResolved?: "true" | "false" | undefined;
|
|
41
44
|
};
|
|
45
|
+
}, {
|
|
42
46
|
params: {
|
|
43
47
|
userId: string;
|
|
44
48
|
};
|
|
45
|
-
}, {
|
|
46
49
|
query: {
|
|
47
50
|
status?: "active" | "revoked" | "expired" | undefined;
|
|
48
51
|
includeResolved?: "true" | "false" | undefined;
|
|
49
52
|
};
|
|
50
|
-
params: {
|
|
51
|
-
userId: string;
|
|
52
|
-
};
|
|
53
53
|
}>;
|
|
54
54
|
export declare const createSuspensionSchema: z.ZodObject<{
|
|
55
55
|
params: z.ZodObject<{
|
|
@@ -70,19 +70,19 @@ export declare const createSuspensionSchema: z.ZodObject<{
|
|
|
70
70
|
endsAt: string;
|
|
71
71
|
}>;
|
|
72
72
|
}, "strip", z.ZodTypeAny, {
|
|
73
|
+
params: {
|
|
74
|
+
userId: string;
|
|
75
|
+
};
|
|
73
76
|
body: {
|
|
74
77
|
reason: string;
|
|
75
78
|
endsAt: string;
|
|
76
79
|
};
|
|
80
|
+
}, {
|
|
77
81
|
params: {
|
|
78
82
|
userId: string;
|
|
79
83
|
};
|
|
80
|
-
}, {
|
|
81
84
|
body: {
|
|
82
85
|
reason: string;
|
|
83
86
|
endsAt: string;
|
|
84
87
|
};
|
|
85
|
-
params: {
|
|
86
|
-
userId: string;
|
|
87
|
-
};
|
|
88
88
|
}>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vr-commons",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.57",
|
|
4
4
|
"description": "Shared functions package",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -100,7 +100,7 @@
|
|
|
100
100
|
"date-fns": "^4.1.0",
|
|
101
101
|
"rimraf": "^5.0.5",
|
|
102
102
|
"typescript": "^5.3.3",
|
|
103
|
-
"vr-models": "^1.0.
|
|
103
|
+
"vr-models": "^1.0.39",
|
|
104
104
|
"zod": "^3.25.20"
|
|
105
105
|
},
|
|
106
106
|
"dependencies": {
|