vr-commons 1.0.160 → 1.0.161
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.
|
@@ -293,7 +293,7 @@ export declare const checkAvailabilitySchema: z.ZodObject<{
|
|
|
293
293
|
productId: string;
|
|
294
294
|
};
|
|
295
295
|
}>;
|
|
296
|
-
export declare const
|
|
296
|
+
export declare const triggerDeviceResetSchema: z.ZodObject<{
|
|
297
297
|
body: z.ZodOptional<z.ZodObject<{
|
|
298
298
|
batchSize: z.ZodOptional<z.ZodNumber>;
|
|
299
299
|
maxRetries: z.ZodOptional<z.ZodNumber>;
|
|
@@ -315,20 +315,147 @@ export declare const triggerDeviceLockSchema: z.ZodObject<{
|
|
|
315
315
|
maxRetries?: number | undefined;
|
|
316
316
|
} | undefined;
|
|
317
317
|
}>;
|
|
318
|
-
export declare const
|
|
318
|
+
export declare const customDeviceResetSchema: z.ZodObject<{
|
|
319
319
|
body: z.ZodObject<{
|
|
320
|
-
|
|
320
|
+
condition: z.ZodOptional<z.ZodObject<{
|
|
321
|
+
status: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
|
|
322
|
+
excludeStatus: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
|
|
323
|
+
isPermanentlyUnlocked: z.ZodOptional<z.ZodBoolean>;
|
|
324
|
+
pairId: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
|
|
325
|
+
excludePairIds: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
|
|
326
|
+
productId: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
|
|
327
|
+
dedicatedUser: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
|
|
328
|
+
createdBefore: z.ZodOptional<z.ZodString>;
|
|
329
|
+
createdAfter: z.ZodOptional<z.ZodString>;
|
|
330
|
+
}, "strip", z.ZodTypeAny, {
|
|
331
|
+
productId?: string | string[] | undefined;
|
|
332
|
+
status?: string | string[] | undefined;
|
|
333
|
+
dedicatedUser?: string | string[] | undefined;
|
|
334
|
+
isPermanentlyUnlocked?: boolean | undefined;
|
|
335
|
+
excludeStatus?: string | string[] | undefined;
|
|
336
|
+
pairId?: string | string[] | undefined;
|
|
337
|
+
excludePairIds?: string | string[] | undefined;
|
|
338
|
+
createdBefore?: string | undefined;
|
|
339
|
+
createdAfter?: string | undefined;
|
|
340
|
+
}, {
|
|
341
|
+
productId?: string | string[] | undefined;
|
|
342
|
+
status?: string | string[] | undefined;
|
|
343
|
+
dedicatedUser?: string | string[] | undefined;
|
|
344
|
+
isPermanentlyUnlocked?: boolean | undefined;
|
|
345
|
+
excludeStatus?: string | string[] | undefined;
|
|
346
|
+
pairId?: string | string[] | undefined;
|
|
347
|
+
excludePairIds?: string | string[] | undefined;
|
|
348
|
+
createdBefore?: string | undefined;
|
|
349
|
+
createdAfter?: string | undefined;
|
|
350
|
+
}>>;
|
|
351
|
+
update: z.ZodOptional<z.ZodObject<{
|
|
352
|
+
status: z.ZodOptional<z.ZodString>;
|
|
353
|
+
isPermanentlyUnlocked: z.ZodOptional<z.ZodBoolean>;
|
|
354
|
+
dedicatedUser: z.ZodOptional<z.ZodString>;
|
|
355
|
+
devicePaymentPlanId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
356
|
+
activatedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
357
|
+
}, "strip", z.ZodTypeAny, {
|
|
358
|
+
status?: string | undefined;
|
|
359
|
+
dedicatedUser?: string | undefined;
|
|
360
|
+
isPermanentlyUnlocked?: boolean | undefined;
|
|
361
|
+
devicePaymentPlanId?: string | null | undefined;
|
|
362
|
+
activatedAt?: string | null | undefined;
|
|
363
|
+
}, {
|
|
364
|
+
status?: string | undefined;
|
|
365
|
+
dedicatedUser?: string | undefined;
|
|
366
|
+
isPermanentlyUnlocked?: boolean | undefined;
|
|
367
|
+
devicePaymentPlanId?: string | null | undefined;
|
|
368
|
+
activatedAt?: string | null | undefined;
|
|
369
|
+
}>>;
|
|
370
|
+
batchSize: z.ZodOptional<z.ZodNumber>;
|
|
371
|
+
maxRetries: z.ZodOptional<z.ZodNumber>;
|
|
321
372
|
}, "strip", z.ZodTypeAny, {
|
|
322
|
-
|
|
373
|
+
batchSize?: number | undefined;
|
|
374
|
+
maxRetries?: number | undefined;
|
|
375
|
+
condition?: {
|
|
376
|
+
productId?: string | string[] | undefined;
|
|
377
|
+
status?: string | string[] | undefined;
|
|
378
|
+
dedicatedUser?: string | string[] | undefined;
|
|
379
|
+
isPermanentlyUnlocked?: boolean | undefined;
|
|
380
|
+
excludeStatus?: string | string[] | undefined;
|
|
381
|
+
pairId?: string | string[] | undefined;
|
|
382
|
+
excludePairIds?: string | string[] | undefined;
|
|
383
|
+
createdBefore?: string | undefined;
|
|
384
|
+
createdAfter?: string | undefined;
|
|
385
|
+
} | undefined;
|
|
386
|
+
update?: {
|
|
387
|
+
status?: string | undefined;
|
|
388
|
+
dedicatedUser?: string | undefined;
|
|
389
|
+
isPermanentlyUnlocked?: boolean | undefined;
|
|
390
|
+
devicePaymentPlanId?: string | null | undefined;
|
|
391
|
+
activatedAt?: string | null | undefined;
|
|
392
|
+
} | undefined;
|
|
323
393
|
}, {
|
|
324
|
-
|
|
394
|
+
batchSize?: number | undefined;
|
|
395
|
+
maxRetries?: number | undefined;
|
|
396
|
+
condition?: {
|
|
397
|
+
productId?: string | string[] | undefined;
|
|
398
|
+
status?: string | string[] | undefined;
|
|
399
|
+
dedicatedUser?: string | string[] | undefined;
|
|
400
|
+
isPermanentlyUnlocked?: boolean | undefined;
|
|
401
|
+
excludeStatus?: string | string[] | undefined;
|
|
402
|
+
pairId?: string | string[] | undefined;
|
|
403
|
+
excludePairIds?: string | string[] | undefined;
|
|
404
|
+
createdBefore?: string | undefined;
|
|
405
|
+
createdAfter?: string | undefined;
|
|
406
|
+
} | undefined;
|
|
407
|
+
update?: {
|
|
408
|
+
status?: string | undefined;
|
|
409
|
+
dedicatedUser?: string | undefined;
|
|
410
|
+
isPermanentlyUnlocked?: boolean | undefined;
|
|
411
|
+
devicePaymentPlanId?: string | null | undefined;
|
|
412
|
+
activatedAt?: string | null | undefined;
|
|
413
|
+
} | undefined;
|
|
325
414
|
}>;
|
|
326
415
|
}, "strip", z.ZodTypeAny, {
|
|
327
416
|
body: {
|
|
328
|
-
|
|
417
|
+
batchSize?: number | undefined;
|
|
418
|
+
maxRetries?: number | undefined;
|
|
419
|
+
condition?: {
|
|
420
|
+
productId?: string | string[] | undefined;
|
|
421
|
+
status?: string | string[] | undefined;
|
|
422
|
+
dedicatedUser?: string | string[] | undefined;
|
|
423
|
+
isPermanentlyUnlocked?: boolean | undefined;
|
|
424
|
+
excludeStatus?: string | string[] | undefined;
|
|
425
|
+
pairId?: string | string[] | undefined;
|
|
426
|
+
excludePairIds?: string | string[] | undefined;
|
|
427
|
+
createdBefore?: string | undefined;
|
|
428
|
+
createdAfter?: string | undefined;
|
|
429
|
+
} | undefined;
|
|
430
|
+
update?: {
|
|
431
|
+
status?: string | undefined;
|
|
432
|
+
dedicatedUser?: string | undefined;
|
|
433
|
+
isPermanentlyUnlocked?: boolean | undefined;
|
|
434
|
+
devicePaymentPlanId?: string | null | undefined;
|
|
435
|
+
activatedAt?: string | null | undefined;
|
|
436
|
+
} | undefined;
|
|
329
437
|
};
|
|
330
438
|
}, {
|
|
331
439
|
body: {
|
|
332
|
-
|
|
440
|
+
batchSize?: number | undefined;
|
|
441
|
+
maxRetries?: number | undefined;
|
|
442
|
+
condition?: {
|
|
443
|
+
productId?: string | string[] | undefined;
|
|
444
|
+
status?: string | string[] | undefined;
|
|
445
|
+
dedicatedUser?: string | string[] | undefined;
|
|
446
|
+
isPermanentlyUnlocked?: boolean | undefined;
|
|
447
|
+
excludeStatus?: string | string[] | undefined;
|
|
448
|
+
pairId?: string | string[] | undefined;
|
|
449
|
+
excludePairIds?: string | string[] | undefined;
|
|
450
|
+
createdBefore?: string | undefined;
|
|
451
|
+
createdAfter?: string | undefined;
|
|
452
|
+
} | undefined;
|
|
453
|
+
update?: {
|
|
454
|
+
status?: string | undefined;
|
|
455
|
+
dedicatedUser?: string | undefined;
|
|
456
|
+
isPermanentlyUnlocked?: boolean | undefined;
|
|
457
|
+
devicePaymentPlanId?: string | null | undefined;
|
|
458
|
+
activatedAt?: string | null | undefined;
|
|
459
|
+
} | undefined;
|
|
333
460
|
};
|
|
334
461
|
}>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.customDeviceResetSchema = exports.triggerDeviceResetSchema = exports.checkAvailabilitySchema = exports.makeDevicesPermanentSchema = exports.enableDevicesSchema = exports.disableDevicesSchema = exports.unlockDevicesSchema = exports.lockDevicesSchema = exports.permanentDeleteDevicesByPairsSchema = exports.deleteDevicesByPairsSchema = exports.getDevicesSchema = exports.getDeviceSchema = exports.createDevicePairsSchema = exports.deduplicatePairIds = exports.PAIR_ID_REGEX = void 0;
|
|
4
4
|
// src/validations/device.validations.ts
|
|
5
5
|
const zod_1 = require("zod");
|
|
6
6
|
const vr_models_1 = require("vr-models");
|
|
@@ -144,7 +144,7 @@ exports.checkAvailabilitySchema = zod_1.z.object({
|
|
|
144
144
|
}),
|
|
145
145
|
});
|
|
146
146
|
// ======================== CRON JOB RELATED VALIDATIONS ===========================
|
|
147
|
-
exports.
|
|
147
|
+
exports.triggerDeviceResetSchema = zod_1.z.object({
|
|
148
148
|
body: zod_1.z
|
|
149
149
|
.object({
|
|
150
150
|
batchSize: zod_1.z
|
|
@@ -162,11 +162,41 @@ exports.triggerDeviceLockSchema = zod_1.z.object({
|
|
|
162
162
|
})
|
|
163
163
|
.optional(),
|
|
164
164
|
});
|
|
165
|
-
exports.
|
|
165
|
+
exports.customDeviceResetSchema = zod_1.z.object({
|
|
166
166
|
body: zod_1.z.object({
|
|
167
|
-
|
|
168
|
-
.
|
|
169
|
-
.
|
|
170
|
-
.
|
|
167
|
+
condition: zod_1.z
|
|
168
|
+
.object({
|
|
169
|
+
status: zod_1.z.union([zod_1.z.string(), zod_1.z.array(zod_1.z.string())]).optional(),
|
|
170
|
+
excludeStatus: zod_1.z.union([zod_1.z.string(), zod_1.z.array(zod_1.z.string())]).optional(),
|
|
171
|
+
isPermanentlyUnlocked: zod_1.z.boolean().optional(),
|
|
172
|
+
pairId: zod_1.z.union([zod_1.z.string(), zod_1.z.array(zod_1.z.string())]).optional(),
|
|
173
|
+
excludePairIds: zod_1.z.union([zod_1.z.string(), zod_1.z.array(zod_1.z.string())]).optional(),
|
|
174
|
+
productId: zod_1.z.union([zod_1.z.string(), zod_1.z.array(zod_1.z.string())]).optional(),
|
|
175
|
+
dedicatedUser: zod_1.z.union([zod_1.z.string(), zod_1.z.array(zod_1.z.string())]).optional(),
|
|
176
|
+
createdBefore: zod_1.z.string().datetime().optional(),
|
|
177
|
+
createdAfter: zod_1.z.string().datetime().optional(),
|
|
178
|
+
})
|
|
179
|
+
.optional(),
|
|
180
|
+
update: zod_1.z
|
|
181
|
+
.object({
|
|
182
|
+
status: zod_1.z.string().optional(),
|
|
183
|
+
isPermanentlyUnlocked: zod_1.z.boolean().optional(),
|
|
184
|
+
dedicatedUser: zod_1.z.string().optional(),
|
|
185
|
+
devicePaymentPlanId: zod_1.z.string().nullable().optional(),
|
|
186
|
+
activatedAt: zod_1.z.string().datetime().nullable().optional(),
|
|
187
|
+
})
|
|
188
|
+
.optional(),
|
|
189
|
+
batchSize: zod_1.z
|
|
190
|
+
.number()
|
|
191
|
+
.int()
|
|
192
|
+
.min(1, "Batch size must be at least 1")
|
|
193
|
+
.max(500, "Batch size cannot exceed 500")
|
|
194
|
+
.optional(),
|
|
195
|
+
maxRetries: zod_1.z
|
|
196
|
+
.number()
|
|
197
|
+
.int()
|
|
198
|
+
.min(1, "Max retries must be at least 1")
|
|
199
|
+
.max(5, "Max retries cannot exceed 5")
|
|
200
|
+
.optional(),
|
|
171
201
|
}),
|
|
172
202
|
});
|
|
@@ -10,6 +10,6 @@ export { updateProfileSchema, requestPhoneChangeSchema, verifyPhoneChangeSchema,
|
|
|
10
10
|
export { updateAdminSchema, updateRiderSchema, deleteUserSchema, getUserSchema, getUsersSchema, hireAdminSchema, promoteAdminSchema, demoteAdminSchema, fireEmployeeSchema, upgradeToRiderSchema, resetPasswordSchema, } from "./users.admin.validations";
|
|
11
11
|
export { createProductSchema, updateProductSchema, getProductSchema, getProductsSchema, deactivateProductSchema, activateProductSchema, deleteProductSchema, updateStockSchema, } from "./product.validations";
|
|
12
12
|
export { createPricingSchema, updatePricingSchema, getPricingSchema, getPricingsSchema, deletePricingSchema, } from "./pricings.validations";
|
|
13
|
-
export { checkAvailabilitySchema, createDevicePairsSchema, lockDevicesSchema, unlockDevicesSchema, deleteDevicesByPairsSchema, makeDevicesPermanentSchema, permanentDeleteDevicesByPairsSchema, disableDevicesSchema, enableDevicesSchema, getDeviceSchema, getDevicesSchema,
|
|
13
|
+
export { checkAvailabilitySchema, createDevicePairsSchema, lockDevicesSchema, unlockDevicesSchema, deleteDevicesByPairsSchema, makeDevicesPermanentSchema, permanentDeleteDevicesByPairsSchema, disableDevicesSchema, enableDevicesSchema, getDeviceSchema, getDevicesSchema, triggerDeviceResetSchema, customDeviceResetSchema, } from "./admin.devices.validations";
|
|
14
14
|
export { createPlanSchema, limitedUpdateSchema, getDevicePlanSchema, getPlanSchema, getUserPlansSchema, listPlansSchema, recordPaymentSchema, deletePlanSchema, } from "./admin.devicePayment.validations";
|
|
15
15
|
export { listEventLogsSchema, getEventLogSchema, } from "./eventlogs.admin.validations";
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getAppSpecsSchema = exports.activateAppSpecsSchema = exports.getActiveAppSpecsSchema = exports.listAppSpecsSchema = exports.updateAppSpecsSchema = exports.createAppSpecsSchema = exports.exportBansSchema = exports.createSuspensionSchema = exports.createBanSchema = exports.extendSuspensionSchema = exports.revokeSuspensionSchema = exports.revokeBanSchema = exports.reviewAppealSchema = exports.listSuspensionsSchema = exports.listPendingAppealsSchema = exports.listBansSchema = exports.getUserBansSchema = exports.getUserSuspensionsSchema = exports.getSuspensionSchema = exports.getUserRestrictionsSchema = exports.getBanSchema = exports.submitSuspensionAppealSchema = exports.submitBanAppealSchema = exports.deactivateAccountSchema = exports.createRiderSchema = exports.updateRiderProfileSchema = exports.updatePassengerProfileSchema = exports.passengerSignupSchema = exports.viewProfileSchema = exports.getAllUsersSchema = exports.updateUserProfileSchema = exports.getUserByIdSchema = exports.createUserSchema = exports.googleLoginSchema = exports.completePassengerProfileSchema = exports.checkRiderAccountSchema = exports.setRiderPasswordSchema = exports.riderPasswordRegex = exports.passwordRegex = exports.emailRegex = exports.phoneRegex = exports.requestOtpSchema = exports.resendOtpSchema = exports.verifyOtpSchema = exports.registerSchema = exports.refreshTokenSchema = exports.userLoginSchema = exports.forgotPasswordSchema = exports.riderLoginSchema = exports.validate = void 0;
|
|
4
4
|
exports.getDeviceSchema = exports.enableDevicesSchema = exports.disableDevicesSchema = exports.permanentDeleteDevicesByPairsSchema = exports.makeDevicesPermanentSchema = exports.deleteDevicesByPairsSchema = exports.unlockDevicesSchema = exports.lockDevicesSchema = exports.createDevicePairsSchema = exports.checkAvailabilitySchema = exports.deletePricingSchema = exports.getPricingsSchema = exports.getPricingSchema = exports.updatePricingSchema = exports.createPricingSchema = exports.updateStockSchema = exports.deleteProductSchema = exports.activateProductSchema = exports.deactivateProductSchema = exports.getProductsSchema = exports.getProductSchema = exports.updateProductSchema = exports.createProductSchema = exports.resetPasswordSchema = exports.upgradeToRiderSchema = exports.fireEmployeeSchema = exports.demoteAdminSchema = exports.promoteAdminSchema = exports.hireAdminSchema = exports.getUsersSchema = exports.getUserSchema = exports.deleteUserSchema = exports.updateRiderSchema = exports.updateAdminSchema = exports.registerRiderSchema = exports.riderPasswordSchema = exports.changePasswordSchema = exports.strongPasswordRegex = exports.deleteAccountSchema = exports.verifyPhoneChangeSchema = exports.requestPhoneChangeSchema = exports.updateProfileSchema = exports.getInstallmentsSchema = exports.getInstallmentByIdSchema = exports.payInstallmentSchema = exports.serialRegex = exports.extendSessionSchema = exports.unlockDeviceSchema = exports.getUserPaymentPlanSchema = exports.listUserPaymentPlansSchema = void 0;
|
|
5
|
-
exports.getEventLogSchema = exports.listEventLogsSchema = exports.deletePlanSchema = exports.recordPaymentSchema = exports.listPlansSchema = exports.getUserPlansSchema = exports.getPlanSchema = exports.getDevicePlanSchema = exports.limitedUpdateSchema = exports.createPlanSchema = exports.
|
|
5
|
+
exports.getEventLogSchema = exports.listEventLogsSchema = exports.deletePlanSchema = exports.recordPaymentSchema = exports.listPlansSchema = exports.getUserPlansSchema = exports.getPlanSchema = exports.getDevicePlanSchema = exports.limitedUpdateSchema = exports.createPlanSchema = exports.customDeviceResetSchema = exports.triggerDeviceResetSchema = exports.getDevicesSchema = void 0;
|
|
6
6
|
var validate_validations_1 = require("./validate.validations");
|
|
7
7
|
Object.defineProperty(exports, "validate", { enumerable: true, get: function () { return validate_validations_1.validate; } });
|
|
8
8
|
var auth_validations_1 = require("./auth.validations");
|
|
@@ -125,8 +125,8 @@ Object.defineProperty(exports, "disableDevicesSchema", { enumerable: true, get:
|
|
|
125
125
|
Object.defineProperty(exports, "enableDevicesSchema", { enumerable: true, get: function () { return admin_devices_validations_1.enableDevicesSchema; } });
|
|
126
126
|
Object.defineProperty(exports, "getDeviceSchema", { enumerable: true, get: function () { return admin_devices_validations_1.getDeviceSchema; } });
|
|
127
127
|
Object.defineProperty(exports, "getDevicesSchema", { enumerable: true, get: function () { return admin_devices_validations_1.getDevicesSchema; } });
|
|
128
|
-
Object.defineProperty(exports, "
|
|
129
|
-
Object.defineProperty(exports, "
|
|
128
|
+
Object.defineProperty(exports, "triggerDeviceResetSchema", { enumerable: true, get: function () { return admin_devices_validations_1.triggerDeviceResetSchema; } });
|
|
129
|
+
Object.defineProperty(exports, "customDeviceResetSchema", { enumerable: true, get: function () { return admin_devices_validations_1.customDeviceResetSchema; } });
|
|
130
130
|
var admin_devicePayment_validations_1 = require("./admin.devicePayment.validations");
|
|
131
131
|
Object.defineProperty(exports, "createPlanSchema", { enumerable: true, get: function () { return admin_devicePayment_validations_1.createPlanSchema; } });
|
|
132
132
|
Object.defineProperty(exports, "limitedUpdateSchema", { enumerable: true, get: function () { return admin_devicePayment_validations_1.limitedUpdateSchema; } });
|