@awarevue/api-types 2.0.24 → 2.0.26

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.
Files changed (139) hide show
  1. package/dist/_legacy/index.js +18 -2
  2. package/dist/_legacy/milestone.js +2 -1
  3. package/dist/_legacy/orchid.js +2 -1
  4. package/dist/alarm-automation.js +37 -26
  5. package/dist/api/agent-protocol/index.js +17 -1
  6. package/dist/api/agent-protocol/protocol.js +219 -212
  7. package/dist/api/commands/alarm.js +46 -43
  8. package/dist/api/commands/all.js +25 -22
  9. package/dist/api/commands/camera-lift.js +13 -10
  10. package/dist/api/commands/camera.js +65 -61
  11. package/dist/api/commands/display.js +27 -24
  12. package/dist/api/commands/door.js +21 -18
  13. package/dist/api/commands/index.js +28 -12
  14. package/dist/api/commands/intercom-terminal.js +2 -1
  15. package/dist/api/commands/io-board.js +11 -8
  16. package/dist/api/commands/nvr-exporter.js +20 -17
  17. package/dist/api/commands/pbx.js +13 -10
  18. package/dist/api/commands/presence-tracker.js +25 -22
  19. package/dist/api/commands/server.js +21 -18
  20. package/dist/api/error.js +93 -89
  21. package/dist/api/events/alarm.js +53 -50
  22. package/dist/api/events/all.js +57 -53
  23. package/dist/api/events/camera.js +68 -65
  24. package/dist/api/events/display.js +6 -3
  25. package/dist/api/events/door.js +60 -57
  26. package/dist/api/events/index.js +28 -12
  27. package/dist/api/events/intercom-terminal.js +16 -13
  28. package/dist/api/events/io-board.js +10 -7
  29. package/dist/api/events/nvr-exporter.js +14 -11
  30. package/dist/api/events/panic-button.js +8 -5
  31. package/dist/api/events/presence-tracker.js +29 -26
  32. package/dist/api/events/reader.js +11 -8
  33. package/dist/api/events/server.js +12 -9
  34. package/dist/api/index.js +25 -9
  35. package/dist/api/mqtt/index.js +17 -1
  36. package/dist/api/mqtt/payloads.js +15 -12
  37. package/dist/api/queries/all.js +23 -20
  38. package/dist/api/queries/camera.js +19 -16
  39. package/dist/api/queries/index.js +21 -5
  40. package/dist/api/queries/nvr-analytics-server.js +57 -54
  41. package/dist/api/queries/nvr-exporter.js +26 -23
  42. package/dist/api/queries/nvr-recorder.js +32 -29
  43. package/dist/api/rest/access-rule.js +14 -8
  44. package/dist/api/rest/agreement.js +6 -3
  45. package/dist/api/rest/alarm.js +2 -1
  46. package/dist/api/rest/api-keys.js +11 -8
  47. package/dist/api/rest/app.js +11 -8
  48. package/dist/api/rest/auth.js +12 -9
  49. package/dist/api/rest/automation.js +13 -10
  50. package/dist/api/rest/aware-config.js +2 -1
  51. package/dist/api/rest/bookmarks.js +17 -14
  52. package/dist/api/rest/cast.js +11 -5
  53. package/dist/api/rest/custom-field.js +6 -3
  54. package/dist/api/rest/device-event.js +2 -1
  55. package/dist/api/rest/device-group.js +19 -13
  56. package/dist/api/rest/file.js +2 -1
  57. package/dist/api/rest/index.js +50 -34
  58. package/dist/api/rest/io-device.js +21 -14
  59. package/dist/api/rest/layout.js +23 -17
  60. package/dist/api/rest/macros.js +6 -3
  61. package/dist/api/rest/media.js +55 -52
  62. package/dist/api/rest/module-config.js +2 -1
  63. package/dist/api/rest/notifications.js +11 -8
  64. package/dist/api/rest/person-agreement.js +11 -5
  65. package/dist/api/rest/person-presence.js +26 -23
  66. package/dist/api/rest/person-type.js +6 -3
  67. package/dist/api/rest/person.js +11 -5
  68. package/dist/api/rest/query.js +13 -8
  69. package/dist/api/rest/schedule.js +11 -8
  70. package/dist/api/rest/security-level.js +6 -3
  71. package/dist/api/rest/template.js +13 -10
  72. package/dist/api/rest/token-conversion.js +6 -3
  73. package/dist/api/rest/user.js +31 -28
  74. package/dist/api/rest/view.js +20 -14
  75. package/dist/api/rest/webrtc-playback.js +12 -6
  76. package/dist/api/rest/zone.js +14 -8
  77. package/dist/api/state/index.js +2 -1
  78. package/dist/api/ws/device-communication.js +46 -38
  79. package/dist/api/ws/index.js +21 -5
  80. package/dist/api/ws/notifications.js +17 -10
  81. package/dist/api/ws/progress.js +37 -30
  82. package/dist/api/ws/web-rtc-signaling.js +72 -65
  83. package/dist/api/ws/web-socket.js +5 -2
  84. package/dist/index.js +22 -6
  85. package/dist/objects/access-rule.js +32 -29
  86. package/dist/objects/agent-metadata.js +33 -30
  87. package/dist/objects/agreement.js +10 -7
  88. package/dist/objects/all.js +7 -4
  89. package/dist/objects/api-key.js +10 -7
  90. package/dist/objects/automation-rule.js +28 -25
  91. package/dist/objects/bookmark.js +14 -11
  92. package/dist/objects/credential.js +15 -9
  93. package/dist/objects/custom-field.js +11 -8
  94. package/dist/objects/device/alarm.js +6 -3
  95. package/dist/objects/device/any-device.js +206 -203
  96. package/dist/objects/device/camera-lift.js +6 -3
  97. package/dist/objects/device/camera.js +30 -27
  98. package/dist/objects/device/device-gateway.js +4 -1
  99. package/dist/objects/device/device-import.js +26 -23
  100. package/dist/objects/device/device-relation.js +16 -13
  101. package/dist/objects/device/display.js +6 -3
  102. package/dist/objects/device/door.js +10 -7
  103. package/dist/objects/device/index.js +38 -22
  104. package/dist/objects/device/intercom-operator.js +4 -1
  105. package/dist/objects/device/intercom-terminal.js +20 -17
  106. package/dist/objects/device/io-board.js +8 -5
  107. package/dist/objects/device/motion-sensor.js +6 -3
  108. package/dist/objects/device/nvr-analytics-server.js +8 -5
  109. package/dist/objects/device/nvr-exporter.js +9 -6
  110. package/dist/objects/device/nvr-recorder.js +8 -5
  111. package/dist/objects/device/panic-button.js +6 -3
  112. package/dist/objects/device/pbx.js +7 -4
  113. package/dist/objects/device/presence-tracker.js +4 -1
  114. package/dist/objects/device/reader.js +4 -1
  115. package/dist/objects/device/server.js +4 -1
  116. package/dist/objects/device/system.js +7 -4
  117. package/dist/objects/device-group.js +11 -8
  118. package/dist/objects/index.js +44 -28
  119. package/dist/objects/layout.js +23 -20
  120. package/dist/objects/macro.js +20 -17
  121. package/dist/objects/module-config.js +2 -1
  122. package/dist/objects/notification.js +15 -12
  123. package/dist/objects/person-agreement.js +10 -7
  124. package/dist/objects/person-presence.js +32 -29
  125. package/dist/objects/person-type.js +17 -11
  126. package/dist/objects/person.js +42 -39
  127. package/dist/objects/role.js +11 -8
  128. package/dist/objects/schedule.js +45 -39
  129. package/dist/objects/security-level.js +13 -10
  130. package/dist/objects/template.js +10 -7
  131. package/dist/objects/token-conversion.js +10 -7
  132. package/dist/objects/user.js +14 -11
  133. package/dist/objects/view.js +53 -50
  134. package/dist/objects/world-object.js +8 -5
  135. package/dist/objects/zone.js +16 -13
  136. package/dist/package.json +1 -1
  137. package/dist/permissions.js +149 -146
  138. package/dist/primitives.js +30 -27
  139. package/package.json +1 -1
@@ -1,16 +1,22 @@
1
- import z from 'zod';
2
- export const sPersonTypeDto = z.object({
3
- id: z
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.sPersonTypeDto = void 0;
7
+ const zod_1 = __importDefault(require("zod"));
8
+ exports.sPersonTypeDto = zod_1.default.object({
9
+ id: zod_1.default
4
10
  .string()
5
11
  .min(1)
6
12
  .max(16)
7
13
  .regex(/^[a-z-]+$/, 'Type must contain only lowercase letters (a-z) and hyphens'),
8
- displayName: z.string().min(1).max(64),
9
- accessControlUser: z.boolean(),
10
- systemUser: z.boolean(),
11
- agreements: z.array(z.string().uuid()),
12
- securityCheck: z.boolean(),
13
- inOnCreation: z.boolean(),
14
- createdOn: z.string().date(),
15
- lastModifiedOn: z.string().date(),
14
+ displayName: zod_1.default.string().min(1).max(64),
15
+ accessControlUser: zod_1.default.boolean(),
16
+ systemUser: zod_1.default.boolean(),
17
+ agreements: zod_1.default.array(zod_1.default.string().uuid()),
18
+ securityCheck: zod_1.default.boolean(),
19
+ inOnCreation: zod_1.default.boolean(),
20
+ createdOn: zod_1.default.string().date(),
21
+ lastModifiedOn: zod_1.default.string().date(),
16
22
  });
@@ -1,42 +1,45 @@
1
- import { z } from 'zod';
2
- import { sPersonAgeementDto } from './person-agreement';
3
- import { sAssignedCredential } from './credential';
4
- export const sPersonAccessRule = z.object({
5
- id: z.string(),
6
- displayName: z.string(),
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.sPersonDto = exports.sPersonProps = exports.sPersonAccessRule = void 0;
4
+ const zod_1 = require("zod");
5
+ const person_agreement_1 = require("./person-agreement");
6
+ const credential_1 = require("./credential");
7
+ exports.sPersonAccessRule = zod_1.z.object({
8
+ id: zod_1.z.string(),
9
+ displayName: zod_1.z.string(),
7
10
  });
8
- export const sPersonProps = z.object({
9
- firstName: z.string().min(1).max(64),
10
- lastName: z.string().min(1).max(64),
11
- position: z.string().nullable(),
12
- accessSuspended: z.boolean(),
13
- staffMember: z.boolean(),
14
- validFrom: z.string().date().nullable(),
15
- validTo: z.string().date().nullable(),
16
- avatarId: z.string().nullable(),
17
- credentials: z.array(sAssignedCredential),
18
- accessRules: z.array(z.string().nonempty()),
19
- customFields: z.record(z.string()).nullable(),
20
- type: z.string().min(1).max(16),
11
+ exports.sPersonProps = zod_1.z.object({
12
+ firstName: zod_1.z.string().min(1).max(64),
13
+ lastName: zod_1.z.string().min(1).max(64),
14
+ position: zod_1.z.string().nullable(),
15
+ accessSuspended: zod_1.z.boolean(),
16
+ staffMember: zod_1.z.boolean(),
17
+ validFrom: zod_1.z.string().date().nullable(),
18
+ validTo: zod_1.z.string().date().nullable(),
19
+ avatarId: zod_1.z.string().nullable(),
20
+ credentials: zod_1.z.array(credential_1.sAssignedCredential),
21
+ accessRules: zod_1.z.array(zod_1.z.string().nonempty()),
22
+ customFields: zod_1.z.record(zod_1.z.string()).nullable(),
23
+ type: zod_1.z.string().min(1).max(16),
21
24
  });
22
- export const sPersonDto = z.object({
23
- id: z.string(),
24
- firstName: z.string().min(1).max(64),
25
- lastName: z.string().min(1).max(64),
26
- position: z.string().max(128).nullable(),
27
- validFrom: z.string().date().nullable(),
28
- validTo: z.string().date().nullable(),
29
- accessSuspended: z.boolean(),
30
- archived: z.boolean(),
31
- staffMember: z.boolean(),
32
- createdOn: z.string(),
33
- lastModifiedOn: z.string(),
34
- avatarId: z.string().nullable(),
35
- credentials: z.array(sAssignedCredential),
36
- accessRules: z.array(sPersonAccessRule),
37
- customFields: z.record(z.string()).nullable(),
38
- refs: z.record(z.union([z.string(), z.array(z.string())])),
39
- version: z.number(),
40
- type: z.string().min(1).max(64),
41
- agreements: z.array(sPersonAgeementDto),
25
+ exports.sPersonDto = zod_1.z.object({
26
+ id: zod_1.z.string(),
27
+ firstName: zod_1.z.string().min(1).max(64),
28
+ lastName: zod_1.z.string().min(1).max(64),
29
+ position: zod_1.z.string().max(128).nullable(),
30
+ validFrom: zod_1.z.string().date().nullable(),
31
+ validTo: zod_1.z.string().date().nullable(),
32
+ accessSuspended: zod_1.z.boolean(),
33
+ archived: zod_1.z.boolean(),
34
+ staffMember: zod_1.z.boolean(),
35
+ createdOn: zod_1.z.string(),
36
+ lastModifiedOn: zod_1.z.string(),
37
+ avatarId: zod_1.z.string().nullable(),
38
+ credentials: zod_1.z.array(credential_1.sAssignedCredential),
39
+ accessRules: zod_1.z.array(exports.sPersonAccessRule),
40
+ customFields: zod_1.z.record(zod_1.z.string()).nullable(),
41
+ refs: zod_1.z.record(zod_1.z.union([zod_1.z.string(), zod_1.z.array(zod_1.z.string())])),
42
+ version: zod_1.z.number(),
43
+ type: zod_1.z.string().min(1).max(64),
44
+ agreements: zod_1.z.array(person_agreement_1.sPersonAgeementDto),
42
45
  });
@@ -1,15 +1,18 @@
1
- import { sPermissionId } from '../permissions';
2
- import { z } from 'zod';
3
- export const sRoleDto = z.object({
4
- id: z.string().uuid(),
5
- displayName: z.string().nonempty().max(100),
6
- systemName: z
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.sRoleDto = void 0;
4
+ const permissions_1 = require("../permissions");
5
+ const zod_1 = require("zod");
6
+ exports.sRoleDto = zod_1.z.object({
7
+ id: zod_1.z.string().uuid(),
8
+ displayName: zod_1.z.string().nonempty().max(100),
9
+ systemName: zod_1.z
7
10
  .string()
8
11
  .nonempty()
9
12
  .max(64)
10
13
  .refine((value) => !/\s/.test(value), {
11
14
  message: 'System name must not contain spaces',
12
15
  }),
13
- description: z.string().nonempty(),
14
- permissions: z.array(sPermissionId),
16
+ description: zod_1.z.string().nonempty(),
17
+ permissions: zod_1.z.array(permissions_1.sPermissionId),
15
18
  });
@@ -1,5 +1,11 @@
1
- import z from 'zod';
2
- export const sWeekDay = z.enum([
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.sScheduleProps = exports.sScheduleDetailsRequest = exports.sTimeInterval = exports.sScheduleDto = exports.sScheduleDetailsDto = exports.sTimeIntervalDto = exports.sFlagType = exports.sRepeatType = exports.sWeekDay = void 0;
7
+ const zod_1 = __importDefault(require("zod"));
8
+ exports.sWeekDay = zod_1.default.enum([
3
9
  'mon',
4
10
  'tue',
5
11
  'wed',
@@ -8,46 +14,46 @@ export const sWeekDay = z.enum([
8
14
  'sat',
9
15
  'sun',
10
16
  ]);
11
- export const sRepeatType = z.enum(['daily', 'weekly', 'monthly', 'yearly']);
12
- export const sFlagType = z.enum(['always', 'never']);
13
- export const sTimeIntervalDto = z.object({
14
- weekDay: sWeekDay,
15
- from: z.number(),
16
- to: z.number(),
17
+ exports.sRepeatType = zod_1.default.enum(['daily', 'weekly', 'monthly', 'yearly']);
18
+ exports.sFlagType = zod_1.default.enum(['always', 'never']);
19
+ exports.sTimeIntervalDto = zod_1.default.object({
20
+ weekDay: exports.sWeekDay,
21
+ from: zod_1.default.number(),
22
+ to: zod_1.default.number(),
17
23
  });
18
- export const sScheduleDetailsDto = z.object({
19
- startDate: z.string().nullable(),
20
- endDate: z.string().nullable(),
21
- timeIntervals: z.array(sTimeIntervalDto),
22
- repeat: sRepeatType.nullable(),
24
+ exports.sScheduleDetailsDto = zod_1.default.object({
25
+ startDate: zod_1.default.string().nullable(),
26
+ endDate: zod_1.default.string().nullable(),
27
+ timeIntervals: zod_1.default.array(exports.sTimeIntervalDto),
28
+ repeat: exports.sRepeatType.nullable(),
23
29
  });
24
- export const sScheduleDto = z.object({
25
- id: z.string(),
26
- displayName: z.string(),
27
- include: sScheduleDetailsDto.nullable(),
28
- exclude: sScheduleDetailsDto.nullable(),
29
- editable: z.boolean(),
30
- deletable: z.boolean(),
31
- createdOn: z.string(),
32
- lastModifiedOn: z.string(),
33
- refs: z.record(z.union([z.string(), z.array(z.string())])),
34
- version: z.number(),
35
- flag: sFlagType.nullable(),
30
+ exports.sScheduleDto = zod_1.default.object({
31
+ id: zod_1.default.string(),
32
+ displayName: zod_1.default.string(),
33
+ include: exports.sScheduleDetailsDto.nullable(),
34
+ exclude: exports.sScheduleDetailsDto.nullable(),
35
+ editable: zod_1.default.boolean(),
36
+ deletable: zod_1.default.boolean(),
37
+ createdOn: zod_1.default.string(),
38
+ lastModifiedOn: zod_1.default.string(),
39
+ refs: zod_1.default.record(zod_1.default.union([zod_1.default.string(), zod_1.default.array(zod_1.default.string())])),
40
+ version: zod_1.default.number(),
41
+ flag: exports.sFlagType.nullable(),
36
42
  });
37
- export const sTimeInterval = z.object({
38
- weekDay: sWeekDay,
39
- from: z.number().max(240000).min(0),
40
- to: z.number().max(240000).min(0),
43
+ exports.sTimeInterval = zod_1.default.object({
44
+ weekDay: exports.sWeekDay,
45
+ from: zod_1.default.number().max(240000).min(0),
46
+ to: zod_1.default.number().max(240000).min(0),
41
47
  });
42
- export const sScheduleDetailsRequest = z.object({
43
- startDate: z.string().nullable(),
44
- endDate: z.string().nullable(),
45
- timeIntervals: z.array(sTimeInterval),
46
- repeat: sRepeatType.nullable(),
48
+ exports.sScheduleDetailsRequest = zod_1.default.object({
49
+ startDate: zod_1.default.string().nullable(),
50
+ endDate: zod_1.default.string().nullable(),
51
+ timeIntervals: zod_1.default.array(exports.sTimeInterval),
52
+ repeat: exports.sRepeatType.nullable(),
47
53
  });
48
- export const sScheduleProps = z.object({
49
- displayName: z.string().nonempty(),
50
- flag: sFlagType.nullable(),
51
- include: sScheduleDetailsRequest.nullable(),
52
- exclude: sScheduleDetailsRequest.nullable(),
54
+ exports.sScheduleProps = zod_1.default.object({
55
+ displayName: zod_1.default.string().nonempty(),
56
+ flag: exports.sFlagType.nullable(),
57
+ include: exports.sScheduleDetailsRequest.nullable(),
58
+ exclude: exports.sScheduleDetailsRequest.nullable(),
53
59
  });
@@ -1,11 +1,14 @@
1
- import { z } from 'zod';
2
- export const sSecurityLevelDto = z.object({
3
- id: z.string().uuid(),
4
- order: z.number().int().min(0),
5
- name: z.string().max(64),
6
- active: z.boolean(),
7
- color: z.string().length(6),
8
- checkFrequency: z.number().int().min(0).max(100),
9
- checkOnExit: z.boolean(),
10
- default: z.boolean(),
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.sSecurityLevelDto = void 0;
4
+ const zod_1 = require("zod");
5
+ exports.sSecurityLevelDto = zod_1.z.object({
6
+ id: zod_1.z.string().uuid(),
7
+ order: zod_1.z.number().int().min(0),
8
+ name: zod_1.z.string().max(64),
9
+ active: zod_1.z.boolean(),
10
+ color: zod_1.z.string().length(6),
11
+ checkFrequency: zod_1.z.number().int().min(0).max(100),
12
+ checkOnExit: zod_1.z.boolean(),
13
+ default: zod_1.z.boolean(),
11
14
  });
@@ -1,8 +1,11 @@
1
- import { z } from 'zod';
2
- export const sTemplateTypeEnum = z.enum(['id', 'report']);
3
- export const sTemplateDto = z.object({
4
- id: z.string().uuid(),
5
- name: z.string(),
6
- type: sTemplateTypeEnum,
7
- templateHtmlId: z.string().uuid(),
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.sTemplateDto = exports.sTemplateTypeEnum = void 0;
4
+ const zod_1 = require("zod");
5
+ exports.sTemplateTypeEnum = zod_1.z.enum(['id', 'report']);
6
+ exports.sTemplateDto = zod_1.z.object({
7
+ id: zod_1.z.string().uuid(),
8
+ name: zod_1.z.string(),
9
+ type: exports.sTemplateTypeEnum,
10
+ templateHtmlId: zod_1.z.string().uuid(),
8
11
  });
@@ -1,8 +1,11 @@
1
- import { z } from 'zod';
2
- export const sConversionTypeEnum = z.enum(['hex-to-decimal']);
3
- export const sTokenConversionDto = z.object({
4
- id: z.string().uuid(),
5
- name: z.string().min(1).max(64),
6
- type: sConversionTypeEnum,
7
- jsonData: z.object({}).passthrough(), // Allows any JSON object structure
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.sTokenConversionDto = exports.sConversionTypeEnum = void 0;
4
+ const zod_1 = require("zod");
5
+ exports.sConversionTypeEnum = zod_1.z.enum(['hex-to-decimal']);
6
+ exports.sTokenConversionDto = zod_1.z.object({
7
+ id: zod_1.z.string().uuid(),
8
+ name: zod_1.z.string().min(1).max(64),
9
+ type: exports.sConversionTypeEnum,
10
+ jsonData: zod_1.z.object({}).passthrough(), // Allows any JSON object structure
8
11
  });
@@ -1,12 +1,15 @@
1
- import { z } from 'zod';
2
- export const sUserPassword = z.string().min(4).max(64);
3
- export const sUserDto = z.object({
4
- id: z.string(),
5
- firstName: z.string(),
6
- lastName: z.string(),
7
- email: z.string().nullable(),
8
- username: z.string(),
9
- isActive: z.boolean(),
10
- isRoot: z.boolean(),
11
- roles: z.array(z.string()),
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.sUserDto = exports.sUserPassword = void 0;
4
+ const zod_1 = require("zod");
5
+ exports.sUserPassword = zod_1.z.string().min(4).max(64);
6
+ exports.sUserDto = zod_1.z.object({
7
+ id: zod_1.z.string(),
8
+ firstName: zod_1.z.string(),
9
+ lastName: zod_1.z.string(),
10
+ email: zod_1.z.string().nullable(),
11
+ username: zod_1.z.string(),
12
+ isActive: zod_1.z.boolean(),
13
+ isRoot: zod_1.z.boolean(),
14
+ roles: zod_1.z.array(zod_1.z.string()),
12
15
  });
@@ -1,64 +1,67 @@
1
- import { z } from 'zod';
2
- export const sLayoutArea = z.object({
3
- area: z.string().nonempty(),
4
- type: z.literal('layout'),
5
- layoutId: z.string().nonempty(),
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.sViewDto = exports.sViewInfo = exports.sViewConfig = exports.sViewAreaContents = exports.sPlaybackTrackArea = exports.sDeviceCarouselArea = exports.sDeviceArea = exports.sLayoutSelectorArea = exports.sLayoutArea = void 0;
4
+ const zod_1 = require("zod");
5
+ exports.sLayoutArea = zod_1.z.object({
6
+ area: zod_1.z.string().nonempty(),
7
+ type: zod_1.z.literal('layout'),
8
+ layoutId: zod_1.z.string().nonempty(),
6
9
  });
7
- export const sLayoutSelectorArea = z.object({
8
- area: z.string().nonempty(),
9
- type: z.literal('layoutSelector'),
10
+ exports.sLayoutSelectorArea = zod_1.z.object({
11
+ area: zod_1.z.string().nonempty(),
12
+ type: zod_1.z.literal('layoutSelector'),
10
13
  });
11
- export const sDeviceArea = z.object({
12
- area: z.string().nonempty(),
13
- type: z.literal('device'),
14
- deviceId: z.string().nonempty(),
14
+ exports.sDeviceArea = zod_1.z.object({
15
+ area: zod_1.z.string().nonempty(),
16
+ type: zod_1.z.literal('device'),
17
+ deviceId: zod_1.z.string().nonempty(),
15
18
  });
16
- export const sDeviceCarouselArea = z.object({
17
- area: z.string().nonempty(),
18
- type: z.literal('deviceCarousel'),
19
- deviceIds: z.array(z.string().nonempty()),
20
- timeIntervalMs: z.number().nonnegative(),
19
+ exports.sDeviceCarouselArea = zod_1.z.object({
20
+ area: zod_1.z.string().nonempty(),
21
+ type: zod_1.z.literal('deviceCarousel'),
22
+ deviceIds: zod_1.z.array(zod_1.z.string().nonempty()),
23
+ timeIntervalMs: zod_1.z.number().nonnegative(),
21
24
  });
22
- export const sPlaybackTrackArea = z.object({
23
- area: z.string().nonempty(),
24
- type: z.literal('playbackTrack'),
25
- controllerId: z.string().nonempty(),
26
- source: z
25
+ exports.sPlaybackTrackArea = zod_1.z.object({
26
+ area: zod_1.z.string().nonempty(),
27
+ type: zod_1.z.literal('playbackTrack'),
28
+ controllerId: zod_1.z.string().nonempty(),
29
+ source: zod_1.z
27
30
  .string()
28
31
  .nonempty()
29
32
  .describe('The track within the controller. It is the device ID for the camera in the track.'),
30
33
  });
31
- export const sViewAreaContents = z.union([
32
- sLayoutArea,
33
- sLayoutSelectorArea,
34
- sDeviceArea,
35
- sDeviceCarouselArea,
36
- sPlaybackTrackArea,
34
+ exports.sViewAreaContents = zod_1.z.union([
35
+ exports.sLayoutArea,
36
+ exports.sLayoutSelectorArea,
37
+ exports.sDeviceArea,
38
+ exports.sDeviceCarouselArea,
39
+ exports.sPlaybackTrackArea,
37
40
  ]);
38
- export const sViewConfig = z.object({
39
- rows: z.number(),
40
- columns: z.number(),
41
- areas: z.array(z.array(z.string().nonempty())),
42
- hotspotArea: z.string().optional(),
43
- contents: z.array(sViewAreaContents),
41
+ exports.sViewConfig = zod_1.z.object({
42
+ rows: zod_1.z.number(),
43
+ columns: zod_1.z.number(),
44
+ areas: zod_1.z.array(zod_1.z.array(zod_1.z.string().nonempty())),
45
+ hotspotArea: zod_1.z.string().optional(),
46
+ contents: zod_1.z.array(exports.sViewAreaContents),
44
47
  });
45
- export const sViewInfo = z
48
+ exports.sViewInfo = zod_1.z
46
49
  .object({
47
- name: z.string(),
48
- order: z.number(),
49
- isPublic: z.boolean(),
50
- isDefault: z.boolean(),
50
+ name: zod_1.z.string(),
51
+ order: zod_1.z.number(),
52
+ isPublic: zod_1.z.boolean(),
53
+ isDefault: zod_1.z.boolean(),
51
54
  })
52
- .and(sViewConfig);
53
- export const sViewDto = z
55
+ .and(exports.sViewConfig);
56
+ exports.sViewDto = zod_1.z
54
57
  .object({
55
- id: z.string(),
56
- name: z.string(),
57
- order: z.number(),
58
- isPublic: z.boolean(),
59
- isDefault: z.boolean(),
60
- createdBy: z.string(),
61
- createdOn: z.string(),
62
- lastModifiedOn: z.string(),
58
+ id: zod_1.z.string(),
59
+ name: zod_1.z.string(),
60
+ order: zod_1.z.number(),
61
+ isPublic: zod_1.z.boolean(),
62
+ isDefault: zod_1.z.boolean(),
63
+ createdBy: zod_1.z.string(),
64
+ createdOn: zod_1.z.string(),
65
+ lastModifiedOn: zod_1.z.string(),
63
66
  })
64
- .and(sViewConfig);
67
+ .and(exports.sViewConfig);
@@ -1,9 +1,12 @@
1
- import { z } from 'zod';
2
- export const sWorldObject = z.object({
3
- id: z.string().describe('The unique identifier of the world object'),
4
- label: z.string().describe('The label of the world object'),
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.worldObjects = exports.sWorldObject = void 0;
4
+ const zod_1 = require("zod");
5
+ exports.sWorldObject = zod_1.z.object({
6
+ id: zod_1.z.string().describe('The unique identifier of the world object'),
7
+ label: zod_1.z.string().describe('The label of the world object'),
5
8
  });
6
- export const worldObjects = [
9
+ exports.worldObjects = [
7
10
  {
8
11
  id: 'person',
9
12
  label: 'Person',
@@ -1,15 +1,18 @@
1
- import { z } from 'zod';
2
- export const sZoneProps = z.object({
3
- displayName: z.string().nonempty(),
4
- devices: z.array(z.string().nonempty()),
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.sZoneDto = exports.sZoneProps = void 0;
4
+ const zod_1 = require("zod");
5
+ exports.sZoneProps = zod_1.z.object({
6
+ displayName: zod_1.z.string().nonempty(),
7
+ devices: zod_1.z.array(zod_1.z.string().nonempty()),
5
8
  });
6
- export const sZoneDto = z.object({
7
- id: z.string(),
8
- displayName: z.string(),
9
- createdOn: z.string(),
10
- lastModifiedOn: z.string(),
11
- devices: z.array(z.string()),
12
- isGlobal: z.boolean(),
13
- refs: z.record(z.union([z.string(), z.array(z.string())])),
14
- version: z.number(),
9
+ exports.sZoneDto = zod_1.z.object({
10
+ id: zod_1.z.string(),
11
+ displayName: zod_1.z.string(),
12
+ createdOn: zod_1.z.string(),
13
+ lastModifiedOn: zod_1.z.string(),
14
+ devices: zod_1.z.array(zod_1.z.string()),
15
+ isGlobal: zod_1.z.boolean(),
16
+ refs: zod_1.z.record(zod_1.z.union([zod_1.z.string(), zod_1.z.array(zod_1.z.string())])),
17
+ version: zod_1.z.number(),
15
18
  });
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@awarevue/api-types",
3
- "version": "2.0.24",
3
+ "version": "2.0.26",
4
4
  "description": "Common types between backend, agent(s) and frontend(s)",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",