vr-commons 1.0.169 → 1.0.172
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.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { User, SecurityClearance, UserRole, Permission } from "vr-models";
|
|
1
|
+
import { User, SecurityClearance, UserRole, Permission, Gender } from "vr-models";
|
|
2
2
|
import { Transaction, WhereOptions } from "sequelize";
|
|
3
3
|
export type UserType = "RIDER" | "PASSENGER" | "AGENT" | "ADMIN" | "SUPER_ADMIN";
|
|
4
4
|
export interface ProfileFormatOptions {
|
|
@@ -12,7 +12,7 @@ export interface BaseUserProfile {
|
|
|
12
12
|
firstName: string;
|
|
13
13
|
lastName: string;
|
|
14
14
|
primaryContact: string;
|
|
15
|
-
gender:
|
|
15
|
+
gender: Gender;
|
|
16
16
|
birthDate: number | null;
|
|
17
17
|
birthMonth: number | null;
|
|
18
18
|
birthYear: number | null;
|
|
@@ -8,6 +8,19 @@ export declare const createAppSpecsSchema: z.ZodObject<{
|
|
|
8
8
|
appSupportedLanguages: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
9
9
|
runtimeConfig: z.ZodOptional<z.ZodObject<{
|
|
10
10
|
apiBaseUrl: z.ZodOptional<z.ZodString>;
|
|
11
|
+
apiBaseUrls: z.ZodOptional<z.ZodObject<{
|
|
12
|
+
production: z.ZodOptional<z.ZodString>;
|
|
13
|
+
staging: z.ZodOptional<z.ZodString>;
|
|
14
|
+
develop: z.ZodOptional<z.ZodString>;
|
|
15
|
+
}, "strip", z.ZodTypeAny, {
|
|
16
|
+
production?: string | undefined;
|
|
17
|
+
staging?: string | undefined;
|
|
18
|
+
develop?: string | undefined;
|
|
19
|
+
}, {
|
|
20
|
+
production?: string | undefined;
|
|
21
|
+
staging?: string | undefined;
|
|
22
|
+
develop?: string | undefined;
|
|
23
|
+
}>>;
|
|
11
24
|
googleWebClientId: z.ZodOptional<z.ZodString>;
|
|
12
25
|
speedGovernor: z.ZodOptional<z.ZodObject<{
|
|
13
26
|
isActive: z.ZodBoolean;
|
|
@@ -25,11 +38,11 @@ export declare const createAppSpecsSchema: z.ZodObject<{
|
|
|
25
38
|
identifierPattern: z.ZodEffects<z.ZodString, string, string>;
|
|
26
39
|
}, "strip", z.ZodTypeAny, {
|
|
27
40
|
prefixes: string[];
|
|
28
|
-
roles: ("
|
|
41
|
+
roles: ("ADMIN" | "PASSENGER" | "RIDER" | "AGENT")[];
|
|
29
42
|
identifierPattern: string;
|
|
30
43
|
}, {
|
|
31
44
|
prefixes: string[];
|
|
32
|
-
roles: ("
|
|
45
|
+
roles: ("ADMIN" | "PASSENGER" | "RIDER" | "AGENT")[];
|
|
33
46
|
identifierPattern: string;
|
|
34
47
|
}>>;
|
|
35
48
|
bleBatches: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
@@ -94,6 +107,11 @@ export declare const createAppSpecsSchema: z.ZodObject<{
|
|
|
94
107
|
forceUpdateMessage: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
95
108
|
}, "strip", z.ZodTypeAny, {
|
|
96
109
|
apiBaseUrl?: string | undefined;
|
|
110
|
+
apiBaseUrls?: {
|
|
111
|
+
production?: string | undefined;
|
|
112
|
+
staging?: string | undefined;
|
|
113
|
+
develop?: string | undefined;
|
|
114
|
+
} | undefined;
|
|
97
115
|
googleWebClientId?: string | undefined;
|
|
98
116
|
speedGovernor?: {
|
|
99
117
|
isActive: boolean;
|
|
@@ -101,7 +119,7 @@ export declare const createAppSpecsSchema: z.ZodObject<{
|
|
|
101
119
|
} | undefined;
|
|
102
120
|
serialNumber?: {
|
|
103
121
|
prefixes: string[];
|
|
104
|
-
roles: ("
|
|
122
|
+
roles: ("ADMIN" | "PASSENGER" | "RIDER" | "AGENT")[];
|
|
105
123
|
identifierPattern: string;
|
|
106
124
|
} | undefined;
|
|
107
125
|
bleBatches?: {
|
|
@@ -130,6 +148,11 @@ export declare const createAppSpecsSchema: z.ZodObject<{
|
|
|
130
148
|
forceUpdateMessage?: string | null | undefined;
|
|
131
149
|
}, {
|
|
132
150
|
apiBaseUrl?: string | undefined;
|
|
151
|
+
apiBaseUrls?: {
|
|
152
|
+
production?: string | undefined;
|
|
153
|
+
staging?: string | undefined;
|
|
154
|
+
develop?: string | undefined;
|
|
155
|
+
} | undefined;
|
|
133
156
|
googleWebClientId?: string | undefined;
|
|
134
157
|
speedGovernor?: {
|
|
135
158
|
isActive: boolean;
|
|
@@ -137,7 +160,7 @@ export declare const createAppSpecsSchema: z.ZodObject<{
|
|
|
137
160
|
} | undefined;
|
|
138
161
|
serialNumber?: {
|
|
139
162
|
prefixes: string[];
|
|
140
|
-
roles: ("
|
|
163
|
+
roles: ("ADMIN" | "PASSENGER" | "RIDER" | "AGENT")[];
|
|
141
164
|
identifierPattern: string;
|
|
142
165
|
} | undefined;
|
|
143
166
|
bleBatches?: {
|
|
@@ -177,17 +200,17 @@ export declare const createAppSpecsSchema: z.ZodObject<{
|
|
|
177
200
|
enableCashPayment: z.ZodDefault<z.ZodBoolean>;
|
|
178
201
|
enableMomoPayPayment: z.ZodDefault<z.ZodBoolean>;
|
|
179
202
|
enableAirtelMoneyPayment: z.ZodDefault<z.ZodBoolean>;
|
|
180
|
-
facebookUrl: z.ZodOptional<z.ZodNullable<z.ZodString
|
|
181
|
-
twitterUrl: z.ZodOptional<z.ZodNullable<z.ZodString
|
|
182
|
-
instagramUrl: z.ZodOptional<z.ZodNullable<z.ZodString
|
|
183
|
-
linkedinUrl: z.ZodOptional<z.ZodNullable<z.ZodString
|
|
184
|
-
youtubeUrl: z.ZodOptional<z.ZodNullable<z.ZodString
|
|
185
|
-
websiteUrl: z.ZodOptional<z.ZodNullable<z.ZodString
|
|
186
|
-
supportEmail: z.ZodOptional<z.ZodNullable<z.ZodString
|
|
203
|
+
facebookUrl: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodString>>, string | null | undefined, unknown>;
|
|
204
|
+
twitterUrl: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodString>>, string | null | undefined, unknown>;
|
|
205
|
+
instagramUrl: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodString>>, string | null | undefined, unknown>;
|
|
206
|
+
linkedinUrl: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodString>>, string | null | undefined, unknown>;
|
|
207
|
+
youtubeUrl: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodString>>, string | null | undefined, unknown>;
|
|
208
|
+
websiteUrl: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodString>>, string | null | undefined, unknown>;
|
|
209
|
+
supportEmail: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodString>>, string | null | undefined, unknown>;
|
|
187
210
|
supportPhone: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
188
211
|
companyName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
189
212
|
companyAddress: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
190
|
-
companyEmail: z.ZodOptional<z.ZodNullable<z.ZodString
|
|
213
|
+
companyEmail: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodString>>, string | null | undefined, unknown>;
|
|
191
214
|
companyPhone: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
192
215
|
companyTaxId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
193
216
|
isUnderMaintenance: z.ZodDefault<z.ZodBoolean>;
|
|
@@ -210,6 +233,11 @@ export declare const createAppSpecsSchema: z.ZodObject<{
|
|
|
210
233
|
appDescription?: string | null | undefined;
|
|
211
234
|
runtimeConfig?: {
|
|
212
235
|
apiBaseUrl?: string | undefined;
|
|
236
|
+
apiBaseUrls?: {
|
|
237
|
+
production?: string | undefined;
|
|
238
|
+
staging?: string | undefined;
|
|
239
|
+
develop?: string | undefined;
|
|
240
|
+
} | undefined;
|
|
213
241
|
googleWebClientId?: string | undefined;
|
|
214
242
|
speedGovernor?: {
|
|
215
243
|
isActive: boolean;
|
|
@@ -217,7 +245,7 @@ export declare const createAppSpecsSchema: z.ZodObject<{
|
|
|
217
245
|
} | undefined;
|
|
218
246
|
serialNumber?: {
|
|
219
247
|
prefixes: string[];
|
|
220
|
-
roles: ("
|
|
248
|
+
roles: ("ADMIN" | "PASSENGER" | "RIDER" | "AGENT")[];
|
|
221
249
|
identifierPattern: string;
|
|
222
250
|
} | undefined;
|
|
223
251
|
bleBatches?: {
|
|
@@ -274,6 +302,11 @@ export declare const createAppSpecsSchema: z.ZodObject<{
|
|
|
274
302
|
appSupportedLanguages?: string[] | undefined;
|
|
275
303
|
runtimeConfig?: {
|
|
276
304
|
apiBaseUrl?: string | undefined;
|
|
305
|
+
apiBaseUrls?: {
|
|
306
|
+
production?: string | undefined;
|
|
307
|
+
staging?: string | undefined;
|
|
308
|
+
develop?: string | undefined;
|
|
309
|
+
} | undefined;
|
|
277
310
|
googleWebClientId?: string | undefined;
|
|
278
311
|
speedGovernor?: {
|
|
279
312
|
isActive: boolean;
|
|
@@ -281,7 +314,7 @@ export declare const createAppSpecsSchema: z.ZodObject<{
|
|
|
281
314
|
} | undefined;
|
|
282
315
|
serialNumber?: {
|
|
283
316
|
prefixes: string[];
|
|
284
|
-
roles: ("
|
|
317
|
+
roles: ("ADMIN" | "PASSENGER" | "RIDER" | "AGENT")[];
|
|
285
318
|
identifierPattern: string;
|
|
286
319
|
} | undefined;
|
|
287
320
|
bleBatches?: {
|
|
@@ -321,17 +354,17 @@ export declare const createAppSpecsSchema: z.ZodObject<{
|
|
|
321
354
|
enableCashPayment?: boolean | undefined;
|
|
322
355
|
enableMomoPayPayment?: boolean | undefined;
|
|
323
356
|
enableAirtelMoneyPayment?: boolean | undefined;
|
|
324
|
-
facebookUrl?:
|
|
325
|
-
twitterUrl?:
|
|
326
|
-
instagramUrl?:
|
|
327
|
-
linkedinUrl?:
|
|
328
|
-
youtubeUrl?:
|
|
329
|
-
websiteUrl?:
|
|
330
|
-
supportEmail?:
|
|
357
|
+
facebookUrl?: unknown;
|
|
358
|
+
twitterUrl?: unknown;
|
|
359
|
+
instagramUrl?: unknown;
|
|
360
|
+
linkedinUrl?: unknown;
|
|
361
|
+
youtubeUrl?: unknown;
|
|
362
|
+
websiteUrl?: unknown;
|
|
363
|
+
supportEmail?: unknown;
|
|
331
364
|
supportPhone?: string | null | undefined;
|
|
332
365
|
companyName?: string | null | undefined;
|
|
333
366
|
companyAddress?: string | null | undefined;
|
|
334
|
-
companyEmail?:
|
|
367
|
+
companyEmail?: unknown;
|
|
335
368
|
companyPhone?: string | null | undefined;
|
|
336
369
|
companyTaxId?: string | null | undefined;
|
|
337
370
|
isUnderMaintenance?: boolean | undefined;
|
|
@@ -356,6 +389,11 @@ export declare const createAppSpecsSchema: z.ZodObject<{
|
|
|
356
389
|
appDescription?: string | null | undefined;
|
|
357
390
|
runtimeConfig?: {
|
|
358
391
|
apiBaseUrl?: string | undefined;
|
|
392
|
+
apiBaseUrls?: {
|
|
393
|
+
production?: string | undefined;
|
|
394
|
+
staging?: string | undefined;
|
|
395
|
+
develop?: string | undefined;
|
|
396
|
+
} | undefined;
|
|
359
397
|
googleWebClientId?: string | undefined;
|
|
360
398
|
speedGovernor?: {
|
|
361
399
|
isActive: boolean;
|
|
@@ -363,7 +401,7 @@ export declare const createAppSpecsSchema: z.ZodObject<{
|
|
|
363
401
|
} | undefined;
|
|
364
402
|
serialNumber?: {
|
|
365
403
|
prefixes: string[];
|
|
366
|
-
roles: ("
|
|
404
|
+
roles: ("ADMIN" | "PASSENGER" | "RIDER" | "AGENT")[];
|
|
367
405
|
identifierPattern: string;
|
|
368
406
|
} | undefined;
|
|
369
407
|
bleBatches?: {
|
|
@@ -422,6 +460,11 @@ export declare const createAppSpecsSchema: z.ZodObject<{
|
|
|
422
460
|
appSupportedLanguages?: string[] | undefined;
|
|
423
461
|
runtimeConfig?: {
|
|
424
462
|
apiBaseUrl?: string | undefined;
|
|
463
|
+
apiBaseUrls?: {
|
|
464
|
+
production?: string | undefined;
|
|
465
|
+
staging?: string | undefined;
|
|
466
|
+
develop?: string | undefined;
|
|
467
|
+
} | undefined;
|
|
425
468
|
googleWebClientId?: string | undefined;
|
|
426
469
|
speedGovernor?: {
|
|
427
470
|
isActive: boolean;
|
|
@@ -429,7 +472,7 @@ export declare const createAppSpecsSchema: z.ZodObject<{
|
|
|
429
472
|
} | undefined;
|
|
430
473
|
serialNumber?: {
|
|
431
474
|
prefixes: string[];
|
|
432
|
-
roles: ("
|
|
475
|
+
roles: ("ADMIN" | "PASSENGER" | "RIDER" | "AGENT")[];
|
|
433
476
|
identifierPattern: string;
|
|
434
477
|
} | undefined;
|
|
435
478
|
bleBatches?: {
|
|
@@ -469,17 +512,17 @@ export declare const createAppSpecsSchema: z.ZodObject<{
|
|
|
469
512
|
enableCashPayment?: boolean | undefined;
|
|
470
513
|
enableMomoPayPayment?: boolean | undefined;
|
|
471
514
|
enableAirtelMoneyPayment?: boolean | undefined;
|
|
472
|
-
facebookUrl?:
|
|
473
|
-
twitterUrl?:
|
|
474
|
-
instagramUrl?:
|
|
475
|
-
linkedinUrl?:
|
|
476
|
-
youtubeUrl?:
|
|
477
|
-
websiteUrl?:
|
|
478
|
-
supportEmail?:
|
|
515
|
+
facebookUrl?: unknown;
|
|
516
|
+
twitterUrl?: unknown;
|
|
517
|
+
instagramUrl?: unknown;
|
|
518
|
+
linkedinUrl?: unknown;
|
|
519
|
+
youtubeUrl?: unknown;
|
|
520
|
+
websiteUrl?: unknown;
|
|
521
|
+
supportEmail?: unknown;
|
|
479
522
|
supportPhone?: string | null | undefined;
|
|
480
523
|
companyName?: string | null | undefined;
|
|
481
524
|
companyAddress?: string | null | undefined;
|
|
482
|
-
companyEmail?:
|
|
525
|
+
companyEmail?: unknown;
|
|
483
526
|
companyPhone?: string | null | undefined;
|
|
484
527
|
companyTaxId?: string | null | undefined;
|
|
485
528
|
isUnderMaintenance?: boolean | undefined;
|
|
@@ -503,6 +546,19 @@ export declare const updateAppSpecsSchema: z.ZodObject<{
|
|
|
503
546
|
appSupportedLanguages: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodString, "many">>>;
|
|
504
547
|
runtimeConfig: z.ZodOptional<z.ZodOptional<z.ZodObject<{
|
|
505
548
|
apiBaseUrl: z.ZodOptional<z.ZodString>;
|
|
549
|
+
apiBaseUrls: z.ZodOptional<z.ZodObject<{
|
|
550
|
+
production: z.ZodOptional<z.ZodString>;
|
|
551
|
+
staging: z.ZodOptional<z.ZodString>;
|
|
552
|
+
develop: z.ZodOptional<z.ZodString>;
|
|
553
|
+
}, "strip", z.ZodTypeAny, {
|
|
554
|
+
production?: string | undefined;
|
|
555
|
+
staging?: string | undefined;
|
|
556
|
+
develop?: string | undefined;
|
|
557
|
+
}, {
|
|
558
|
+
production?: string | undefined;
|
|
559
|
+
staging?: string | undefined;
|
|
560
|
+
develop?: string | undefined;
|
|
561
|
+
}>>;
|
|
506
562
|
googleWebClientId: z.ZodOptional<z.ZodString>;
|
|
507
563
|
speedGovernor: z.ZodOptional<z.ZodObject<{
|
|
508
564
|
isActive: z.ZodBoolean;
|
|
@@ -520,11 +576,11 @@ export declare const updateAppSpecsSchema: z.ZodObject<{
|
|
|
520
576
|
identifierPattern: z.ZodEffects<z.ZodString, string, string>;
|
|
521
577
|
}, "strip", z.ZodTypeAny, {
|
|
522
578
|
prefixes: string[];
|
|
523
|
-
roles: ("
|
|
579
|
+
roles: ("ADMIN" | "PASSENGER" | "RIDER" | "AGENT")[];
|
|
524
580
|
identifierPattern: string;
|
|
525
581
|
}, {
|
|
526
582
|
prefixes: string[];
|
|
527
|
-
roles: ("
|
|
583
|
+
roles: ("ADMIN" | "PASSENGER" | "RIDER" | "AGENT")[];
|
|
528
584
|
identifierPattern: string;
|
|
529
585
|
}>>;
|
|
530
586
|
bleBatches: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
@@ -589,6 +645,11 @@ export declare const updateAppSpecsSchema: z.ZodObject<{
|
|
|
589
645
|
forceUpdateMessage: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
590
646
|
}, "strip", z.ZodTypeAny, {
|
|
591
647
|
apiBaseUrl?: string | undefined;
|
|
648
|
+
apiBaseUrls?: {
|
|
649
|
+
production?: string | undefined;
|
|
650
|
+
staging?: string | undefined;
|
|
651
|
+
develop?: string | undefined;
|
|
652
|
+
} | undefined;
|
|
592
653
|
googleWebClientId?: string | undefined;
|
|
593
654
|
speedGovernor?: {
|
|
594
655
|
isActive: boolean;
|
|
@@ -596,7 +657,7 @@ export declare const updateAppSpecsSchema: z.ZodObject<{
|
|
|
596
657
|
} | undefined;
|
|
597
658
|
serialNumber?: {
|
|
598
659
|
prefixes: string[];
|
|
599
|
-
roles: ("
|
|
660
|
+
roles: ("ADMIN" | "PASSENGER" | "RIDER" | "AGENT")[];
|
|
600
661
|
identifierPattern: string;
|
|
601
662
|
} | undefined;
|
|
602
663
|
bleBatches?: {
|
|
@@ -625,6 +686,11 @@ export declare const updateAppSpecsSchema: z.ZodObject<{
|
|
|
625
686
|
forceUpdateMessage?: string | null | undefined;
|
|
626
687
|
}, {
|
|
627
688
|
apiBaseUrl?: string | undefined;
|
|
689
|
+
apiBaseUrls?: {
|
|
690
|
+
production?: string | undefined;
|
|
691
|
+
staging?: string | undefined;
|
|
692
|
+
develop?: string | undefined;
|
|
693
|
+
} | undefined;
|
|
628
694
|
googleWebClientId?: string | undefined;
|
|
629
695
|
speedGovernor?: {
|
|
630
696
|
isActive: boolean;
|
|
@@ -632,7 +698,7 @@ export declare const updateAppSpecsSchema: z.ZodObject<{
|
|
|
632
698
|
} | undefined;
|
|
633
699
|
serialNumber?: {
|
|
634
700
|
prefixes: string[];
|
|
635
|
-
roles: ("
|
|
701
|
+
roles: ("ADMIN" | "PASSENGER" | "RIDER" | "AGENT")[];
|
|
636
702
|
identifierPattern: string;
|
|
637
703
|
} | undefined;
|
|
638
704
|
bleBatches?: {
|
|
@@ -672,17 +738,17 @@ export declare const updateAppSpecsSchema: z.ZodObject<{
|
|
|
672
738
|
enableCashPayment: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
673
739
|
enableMomoPayPayment: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
674
740
|
enableAirtelMoneyPayment: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
675
|
-
facebookUrl: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString
|
|
676
|
-
twitterUrl: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString
|
|
677
|
-
instagramUrl: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString
|
|
678
|
-
linkedinUrl: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString
|
|
679
|
-
youtubeUrl: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString
|
|
680
|
-
websiteUrl: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString
|
|
681
|
-
supportEmail: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString
|
|
741
|
+
facebookUrl: z.ZodOptional<z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodString>>, string | null | undefined, unknown>>;
|
|
742
|
+
twitterUrl: z.ZodOptional<z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodString>>, string | null | undefined, unknown>>;
|
|
743
|
+
instagramUrl: z.ZodOptional<z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodString>>, string | null | undefined, unknown>>;
|
|
744
|
+
linkedinUrl: z.ZodOptional<z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodString>>, string | null | undefined, unknown>>;
|
|
745
|
+
youtubeUrl: z.ZodOptional<z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodString>>, string | null | undefined, unknown>>;
|
|
746
|
+
websiteUrl: z.ZodOptional<z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodString>>, string | null | undefined, unknown>>;
|
|
747
|
+
supportEmail: z.ZodOptional<z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodString>>, string | null | undefined, unknown>>;
|
|
682
748
|
supportPhone: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
683
749
|
companyName: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
684
750
|
companyAddress: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
685
|
-
companyEmail: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString
|
|
751
|
+
companyEmail: z.ZodOptional<z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodString>>, string | null | undefined, unknown>>;
|
|
686
752
|
companyPhone: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
687
753
|
companyTaxId: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
688
754
|
isUnderMaintenance: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
@@ -696,6 +762,11 @@ export declare const updateAppSpecsSchema: z.ZodObject<{
|
|
|
696
762
|
appSupportedLanguages?: string[] | undefined;
|
|
697
763
|
runtimeConfig?: {
|
|
698
764
|
apiBaseUrl?: string | undefined;
|
|
765
|
+
apiBaseUrls?: {
|
|
766
|
+
production?: string | undefined;
|
|
767
|
+
staging?: string | undefined;
|
|
768
|
+
develop?: string | undefined;
|
|
769
|
+
} | undefined;
|
|
699
770
|
googleWebClientId?: string | undefined;
|
|
700
771
|
speedGovernor?: {
|
|
701
772
|
isActive: boolean;
|
|
@@ -703,7 +774,7 @@ export declare const updateAppSpecsSchema: z.ZodObject<{
|
|
|
703
774
|
} | undefined;
|
|
704
775
|
serialNumber?: {
|
|
705
776
|
prefixes: string[];
|
|
706
|
-
roles: ("
|
|
777
|
+
roles: ("ADMIN" | "PASSENGER" | "RIDER" | "AGENT")[];
|
|
707
778
|
identifierPattern: string;
|
|
708
779
|
} | undefined;
|
|
709
780
|
bleBatches?: {
|
|
@@ -767,6 +838,11 @@ export declare const updateAppSpecsSchema: z.ZodObject<{
|
|
|
767
838
|
appSupportedLanguages?: string[] | undefined;
|
|
768
839
|
runtimeConfig?: {
|
|
769
840
|
apiBaseUrl?: string | undefined;
|
|
841
|
+
apiBaseUrls?: {
|
|
842
|
+
production?: string | undefined;
|
|
843
|
+
staging?: string | undefined;
|
|
844
|
+
develop?: string | undefined;
|
|
845
|
+
} | undefined;
|
|
770
846
|
googleWebClientId?: string | undefined;
|
|
771
847
|
speedGovernor?: {
|
|
772
848
|
isActive: boolean;
|
|
@@ -774,7 +850,7 @@ export declare const updateAppSpecsSchema: z.ZodObject<{
|
|
|
774
850
|
} | undefined;
|
|
775
851
|
serialNumber?: {
|
|
776
852
|
prefixes: string[];
|
|
777
|
-
roles: ("
|
|
853
|
+
roles: ("ADMIN" | "PASSENGER" | "RIDER" | "AGENT")[];
|
|
778
854
|
identifierPattern: string;
|
|
779
855
|
} | undefined;
|
|
780
856
|
bleBatches?: {
|
|
@@ -814,17 +890,17 @@ export declare const updateAppSpecsSchema: z.ZodObject<{
|
|
|
814
890
|
enableCashPayment?: boolean | undefined;
|
|
815
891
|
enableMomoPayPayment?: boolean | undefined;
|
|
816
892
|
enableAirtelMoneyPayment?: boolean | undefined;
|
|
817
|
-
facebookUrl?:
|
|
818
|
-
twitterUrl?:
|
|
819
|
-
instagramUrl?:
|
|
820
|
-
linkedinUrl?:
|
|
821
|
-
youtubeUrl?:
|
|
822
|
-
websiteUrl?:
|
|
823
|
-
supportEmail?:
|
|
893
|
+
facebookUrl?: unknown;
|
|
894
|
+
twitterUrl?: unknown;
|
|
895
|
+
instagramUrl?: unknown;
|
|
896
|
+
linkedinUrl?: unknown;
|
|
897
|
+
youtubeUrl?: unknown;
|
|
898
|
+
websiteUrl?: unknown;
|
|
899
|
+
supportEmail?: unknown;
|
|
824
900
|
supportPhone?: string | null | undefined;
|
|
825
901
|
companyName?: string | null | undefined;
|
|
826
902
|
companyAddress?: string | null | undefined;
|
|
827
|
-
companyEmail?:
|
|
903
|
+
companyEmail?: unknown;
|
|
828
904
|
companyPhone?: string | null | undefined;
|
|
829
905
|
companyTaxId?: string | null | undefined;
|
|
830
906
|
isUnderMaintenance?: boolean | undefined;
|
|
@@ -833,9 +909,6 @@ export declare const updateAppSpecsSchema: z.ZodObject<{
|
|
|
833
909
|
maintenanceEndAt?: string | null | undefined;
|
|
834
910
|
}>;
|
|
835
911
|
}, "strip", z.ZodTypeAny, {
|
|
836
|
-
params: {
|
|
837
|
-
id: string;
|
|
838
|
-
};
|
|
839
912
|
body: {
|
|
840
913
|
appShortName?: string | null | undefined;
|
|
841
914
|
appDescription?: string | null | undefined;
|
|
@@ -843,6 +916,11 @@ export declare const updateAppSpecsSchema: z.ZodObject<{
|
|
|
843
916
|
appSupportedLanguages?: string[] | undefined;
|
|
844
917
|
runtimeConfig?: {
|
|
845
918
|
apiBaseUrl?: string | undefined;
|
|
919
|
+
apiBaseUrls?: {
|
|
920
|
+
production?: string | undefined;
|
|
921
|
+
staging?: string | undefined;
|
|
922
|
+
develop?: string | undefined;
|
|
923
|
+
} | undefined;
|
|
846
924
|
googleWebClientId?: string | undefined;
|
|
847
925
|
speedGovernor?: {
|
|
848
926
|
isActive: boolean;
|
|
@@ -850,7 +928,7 @@ export declare const updateAppSpecsSchema: z.ZodObject<{
|
|
|
850
928
|
} | undefined;
|
|
851
929
|
serialNumber?: {
|
|
852
930
|
prefixes: string[];
|
|
853
|
-
roles: ("
|
|
931
|
+
roles: ("ADMIN" | "PASSENGER" | "RIDER" | "AGENT")[];
|
|
854
932
|
identifierPattern: string;
|
|
855
933
|
} | undefined;
|
|
856
934
|
bleBatches?: {
|
|
@@ -908,10 +986,10 @@ export declare const updateAppSpecsSchema: z.ZodObject<{
|
|
|
908
986
|
maintenanceStartAt?: string | null | undefined;
|
|
909
987
|
maintenanceEndAt?: string | null | undefined;
|
|
910
988
|
};
|
|
911
|
-
}, {
|
|
912
989
|
params: {
|
|
913
990
|
id: string;
|
|
914
991
|
};
|
|
992
|
+
}, {
|
|
915
993
|
body: {
|
|
916
994
|
appShortName?: string | null | undefined;
|
|
917
995
|
appDescription?: string | null | undefined;
|
|
@@ -919,6 +997,11 @@ export declare const updateAppSpecsSchema: z.ZodObject<{
|
|
|
919
997
|
appSupportedLanguages?: string[] | undefined;
|
|
920
998
|
runtimeConfig?: {
|
|
921
999
|
apiBaseUrl?: string | undefined;
|
|
1000
|
+
apiBaseUrls?: {
|
|
1001
|
+
production?: string | undefined;
|
|
1002
|
+
staging?: string | undefined;
|
|
1003
|
+
develop?: string | undefined;
|
|
1004
|
+
} | undefined;
|
|
922
1005
|
googleWebClientId?: string | undefined;
|
|
923
1006
|
speedGovernor?: {
|
|
924
1007
|
isActive: boolean;
|
|
@@ -926,7 +1009,7 @@ export declare const updateAppSpecsSchema: z.ZodObject<{
|
|
|
926
1009
|
} | undefined;
|
|
927
1010
|
serialNumber?: {
|
|
928
1011
|
prefixes: string[];
|
|
929
|
-
roles: ("
|
|
1012
|
+
roles: ("ADMIN" | "PASSENGER" | "RIDER" | "AGENT")[];
|
|
930
1013
|
identifierPattern: string;
|
|
931
1014
|
} | undefined;
|
|
932
1015
|
bleBatches?: {
|
|
@@ -966,17 +1049,17 @@ export declare const updateAppSpecsSchema: z.ZodObject<{
|
|
|
966
1049
|
enableCashPayment?: boolean | undefined;
|
|
967
1050
|
enableMomoPayPayment?: boolean | undefined;
|
|
968
1051
|
enableAirtelMoneyPayment?: boolean | undefined;
|
|
969
|
-
facebookUrl?:
|
|
970
|
-
twitterUrl?:
|
|
971
|
-
instagramUrl?:
|
|
972
|
-
linkedinUrl?:
|
|
973
|
-
youtubeUrl?:
|
|
974
|
-
websiteUrl?:
|
|
975
|
-
supportEmail?:
|
|
1052
|
+
facebookUrl?: unknown;
|
|
1053
|
+
twitterUrl?: unknown;
|
|
1054
|
+
instagramUrl?: unknown;
|
|
1055
|
+
linkedinUrl?: unknown;
|
|
1056
|
+
youtubeUrl?: unknown;
|
|
1057
|
+
websiteUrl?: unknown;
|
|
1058
|
+
supportEmail?: unknown;
|
|
976
1059
|
supportPhone?: string | null | undefined;
|
|
977
1060
|
companyName?: string | null | undefined;
|
|
978
1061
|
companyAddress?: string | null | undefined;
|
|
979
|
-
companyEmail?:
|
|
1062
|
+
companyEmail?: unknown;
|
|
980
1063
|
companyPhone?: string | null | undefined;
|
|
981
1064
|
companyTaxId?: string | null | undefined;
|
|
982
1065
|
isUnderMaintenance?: boolean | undefined;
|
|
@@ -984,6 +1067,9 @@ export declare const updateAppSpecsSchema: z.ZodObject<{
|
|
|
984
1067
|
maintenanceStartAt?: string | null | undefined;
|
|
985
1068
|
maintenanceEndAt?: string | null | undefined;
|
|
986
1069
|
};
|
|
1070
|
+
params: {
|
|
1071
|
+
id: string;
|
|
1072
|
+
};
|
|
987
1073
|
}>;
|
|
988
1074
|
export declare const listAppSpecsSchema: z.ZodObject<{
|
|
989
1075
|
query: z.ZodObject<{
|
|
@@ -993,33 +1079,33 @@ export declare const listAppSpecsSchema: z.ZodObject<{
|
|
|
993
1079
|
sortBy: z.ZodOptional<z.ZodEnum<["appName", "createdAt", "updatedAt"]>>;
|
|
994
1080
|
sortOrder: z.ZodOptional<z.ZodEnum<["ASC", "DESC"]>>;
|
|
995
1081
|
}, "strip", z.ZodTypeAny, {
|
|
996
|
-
page: number;
|
|
997
1082
|
limit: number;
|
|
1083
|
+
page: number;
|
|
998
1084
|
search?: string | undefined;
|
|
999
|
-
sortBy?: "
|
|
1000
|
-
sortOrder?: "
|
|
1085
|
+
sortBy?: "createdAt" | "updatedAt" | "appName" | undefined;
|
|
1086
|
+
sortOrder?: "DESC" | "ASC" | undefined;
|
|
1001
1087
|
}, {
|
|
1002
|
-
page?: string | undefined;
|
|
1003
|
-
limit?: string | undefined;
|
|
1004
1088
|
search?: string | undefined;
|
|
1005
|
-
|
|
1006
|
-
|
|
1089
|
+
limit?: string | undefined;
|
|
1090
|
+
page?: string | undefined;
|
|
1091
|
+
sortBy?: "createdAt" | "updatedAt" | "appName" | undefined;
|
|
1092
|
+
sortOrder?: "DESC" | "ASC" | undefined;
|
|
1007
1093
|
}>;
|
|
1008
1094
|
}, "strip", z.ZodTypeAny, {
|
|
1009
1095
|
query: {
|
|
1010
|
-
page: number;
|
|
1011
1096
|
limit: number;
|
|
1097
|
+
page: number;
|
|
1012
1098
|
search?: string | undefined;
|
|
1013
|
-
sortBy?: "
|
|
1014
|
-
sortOrder?: "
|
|
1099
|
+
sortBy?: "createdAt" | "updatedAt" | "appName" | undefined;
|
|
1100
|
+
sortOrder?: "DESC" | "ASC" | undefined;
|
|
1015
1101
|
};
|
|
1016
1102
|
}, {
|
|
1017
1103
|
query: {
|
|
1018
|
-
page?: string | undefined;
|
|
1019
|
-
limit?: string | undefined;
|
|
1020
1104
|
search?: string | undefined;
|
|
1021
|
-
|
|
1022
|
-
|
|
1105
|
+
limit?: string | undefined;
|
|
1106
|
+
page?: string | undefined;
|
|
1107
|
+
sortBy?: "createdAt" | "updatedAt" | "appName" | undefined;
|
|
1108
|
+
sortOrder?: "DESC" | "ASC" | undefined;
|
|
1023
1109
|
};
|
|
1024
1110
|
}>;
|
|
1025
1111
|
export declare const getAppSpecsSchema: z.ZodObject<{
|
|
@@ -4,6 +4,8 @@ exports.getAppSpecsByNameSchema = exports.getActiveAppSpecsSchema = exports.acti
|
|
|
4
4
|
// src/validations/appSpecs.validations.ts
|
|
5
5
|
const zod_1 = require("zod");
|
|
6
6
|
const urlRegex = /^(https?:\/\/)?([\da-z.-]+)\.([a-z.]{2,6})([/\w .-]*)*\/?$/;
|
|
7
|
+
const optionalUrl = zod_1.z.preprocess((value) => typeof value === "string" && value.trim() === "" ? null : value, zod_1.z.string().url().nullable().optional());
|
|
8
|
+
const optionalEmail = zod_1.z.preprocess((value) => typeof value === "string" && value.trim() === "" ? null : value, zod_1.z.string().email().nullable().optional());
|
|
7
9
|
const appSpecsBaseSchema = {
|
|
8
10
|
// App Identity
|
|
9
11
|
appName: zod_1.z.string().min(1).max(100),
|
|
@@ -15,6 +17,11 @@ const appSpecsBaseSchema = {
|
|
|
15
17
|
.default(["en", "fr"]),
|
|
16
18
|
runtimeConfig: zod_1.z.object({
|
|
17
19
|
apiBaseUrl: zod_1.z.string().url().optional(),
|
|
20
|
+
apiBaseUrls: zod_1.z.object({
|
|
21
|
+
production: zod_1.z.string().url().optional(),
|
|
22
|
+
staging: zod_1.z.string().url().optional(),
|
|
23
|
+
develop: zod_1.z.string().url().optional(),
|
|
24
|
+
}).optional(),
|
|
18
25
|
googleWebClientId: zod_1.z.string().max(255).optional(),
|
|
19
26
|
speedGovernor: zod_1.z.object({
|
|
20
27
|
isActive: zod_1.z.boolean(),
|
|
@@ -73,18 +80,18 @@ const appSpecsBaseSchema = {
|
|
|
73
80
|
enableMomoPayPayment: zod_1.z.boolean().default(true),
|
|
74
81
|
enableAirtelMoneyPayment: zod_1.z.boolean().default(true),
|
|
75
82
|
// Social Links
|
|
76
|
-
facebookUrl:
|
|
77
|
-
twitterUrl:
|
|
78
|
-
instagramUrl:
|
|
79
|
-
linkedinUrl:
|
|
80
|
-
youtubeUrl:
|
|
81
|
-
websiteUrl:
|
|
82
|
-
supportEmail:
|
|
83
|
+
facebookUrl: optionalUrl,
|
|
84
|
+
twitterUrl: optionalUrl,
|
|
85
|
+
instagramUrl: optionalUrl,
|
|
86
|
+
linkedinUrl: optionalUrl,
|
|
87
|
+
youtubeUrl: optionalUrl,
|
|
88
|
+
websiteUrl: optionalUrl,
|
|
89
|
+
supportEmail: optionalEmail,
|
|
83
90
|
supportPhone: zod_1.z.string().max(20).nullable().optional(),
|
|
84
91
|
// Contact Info
|
|
85
92
|
companyName: zod_1.z.string().max(200).nullable().optional(),
|
|
86
93
|
companyAddress: zod_1.z.string().nullable().optional(),
|
|
87
|
-
companyEmail:
|
|
94
|
+
companyEmail: optionalEmail,
|
|
88
95
|
companyPhone: zod_1.z.string().max(20).nullable().optional(),
|
|
89
96
|
companyTaxId: zod_1.z.string().max(50).nullable().optional(),
|
|
90
97
|
// Maintenance
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vr-commons",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.172",
|
|
4
4
|
"description": "Shared functions package",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -103,7 +103,7 @@
|
|
|
103
103
|
"rimraf": "^5.0.5",
|
|
104
104
|
"streamifier": "^0.1.1",
|
|
105
105
|
"typescript": "^5.3.3",
|
|
106
|
-
"vr-models": "^1.0.
|
|
106
|
+
"vr-models": "^1.0.95",
|
|
107
107
|
"zod": "^3.25.20"
|
|
108
108
|
},
|
|
109
109
|
"dependencies": {
|