vr-commons 1.0.58 → 1.0.59

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,18 +1,40 @@
1
1
  import { z } from "zod";
2
2
  export declare const unlockDeviceSchema: z.ZodObject<{
3
- params: z.ZodObject<{
4
- serial: z.ZodString;
3
+ body: z.ZodObject<{
4
+ deviceSerialNumber: z.ZodString;
5
5
  }, "strip", z.ZodTypeAny, {
6
- serial: string;
6
+ deviceSerialNumber: string;
7
7
  }, {
8
- serial: string;
8
+ deviceSerialNumber: string;
9
9
  }>;
10
10
  }, "strip", z.ZodTypeAny, {
11
- params: {
12
- serial: string;
11
+ body: {
12
+ deviceSerialNumber: string;
13
13
  };
14
14
  }, {
15
- params: {
16
- serial: string;
15
+ body: {
16
+ deviceSerialNumber: string;
17
+ };
18
+ }>;
19
+ export declare const extendSessionSchema: z.ZodObject<{
20
+ body: z.ZodObject<{
21
+ deviceSerialNumber: z.ZodString;
22
+ sessionId: z.ZodString;
23
+ }, "strip", z.ZodTypeAny, {
24
+ deviceSerialNumber: string;
25
+ sessionId: string;
26
+ }, {
27
+ deviceSerialNumber: string;
28
+ sessionId: string;
29
+ }>;
30
+ }, "strip", z.ZodTypeAny, {
31
+ body: {
32
+ deviceSerialNumber: string;
33
+ sessionId: string;
34
+ };
35
+ }, {
36
+ body: {
37
+ deviceSerialNumber: string;
38
+ sessionId: string;
17
39
  };
18
40
  }>;
@@ -1,14 +1,22 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.unlockDeviceSchema = void 0;
3
+ exports.extendSessionSchema = exports.unlockDeviceSchema = void 0;
4
4
  const zod_1 = require("zod");
5
- const serialNumberRegex = /^[A-Z0-9]{8,32}$/i;
5
+ const serialRegex = /^[A-Z0-9]{8,32}$/i;
6
6
  exports.unlockDeviceSchema = zod_1.z.object({
7
- params: zod_1.z.object({
8
- serial: zod_1.z
7
+ body: zod_1.z.object({
8
+ deviceSerialNumber: zod_1.z
9
9
  .string()
10
- .regex(serialNumberRegex, "Invalid serial number format")
10
+ .regex(serialRegex, "Invalid serial number format")
11
11
  .min(8, "Serial number must be at least 8 characters")
12
12
  .max(32, "Serial number cannot exceed 32 characters"),
13
13
  }),
14
14
  });
15
+ exports.extendSessionSchema = zod_1.z.object({
16
+ body: zod_1.z.object({
17
+ deviceSerialNumber: zod_1.z
18
+ .string()
19
+ .regex(serialRegex, "Invalid serial number format"),
20
+ sessionId: zod_1.z.string().uuid("Invalid session ID format"),
21
+ }),
22
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vr-commons",
3
- "version": "1.0.58",
3
+ "version": "1.0.59",
4
4
  "description": "Shared functions package",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",