@awarevue/api-types 1.0.1

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 (132) hide show
  1. package/dist/access-control/access-rule.d.ts +243 -0
  2. package/dist/access-control/access-rule.js +49 -0
  3. package/dist/access-control/credential.d.ts +14 -0
  4. package/dist/access-control/credential.js +12 -0
  5. package/dist/access-control/index.d.ts +7 -0
  6. package/dist/access-control/index.js +23 -0
  7. package/dist/access-control/person-presence.d.ts +249 -0
  8. package/dist/access-control/person-presence.js +61 -0
  9. package/dist/access-control/person.d.ts +209 -0
  10. package/dist/access-control/person.js +49 -0
  11. package/dist/access-control/schedule.d.ts +500 -0
  12. package/dist/access-control/schedule.js +65 -0
  13. package/dist/access-control/sync.d.ts +3 -0
  14. package/dist/access-control/sync.js +2 -0
  15. package/dist/access-control/zone.d.ts +65 -0
  16. package/dist/access-control/zone.js +28 -0
  17. package/dist/agent-communication/index.d.ts +1 -0
  18. package/dist/agent-communication/index.js +17 -0
  19. package/dist/agent-communication/protocol.d.ts +1692 -0
  20. package/dist/agent-communication/protocol.js +341 -0
  21. package/dist/api/alarm.d.ts +23 -0
  22. package/dist/api/alarm.js +2 -0
  23. package/dist/api/auth.d.ts +31 -0
  24. package/dist/api/auth.js +19 -0
  25. package/dist/api/index.d.ts +4 -0
  26. package/dist/api/index.js +20 -0
  27. package/dist/api/media.d.ts +187 -0
  28. package/dist/api/media.js +59 -0
  29. package/dist/api/query.d.ts +33 -0
  30. package/dist/api/query.js +41 -0
  31. package/dist/app.d.ts +12 -0
  32. package/dist/app.js +8 -0
  33. package/dist/automation.d.ts +334 -0
  34. package/dist/automation.js +49 -0
  35. package/dist/aware-config.d.ts +3 -0
  36. package/dist/aware-config.js +2 -0
  37. package/dist/custom-field.d.ts +52 -0
  38. package/dist/custom-field.js +19 -0
  39. package/dist/device/alarm.d.ts +265 -0
  40. package/dist/device/alarm.js +66 -0
  41. package/dist/device/any-device.d.ts +2376 -0
  42. package/dist/device/any-device.js +185 -0
  43. package/dist/device/camera-lift.d.ts +17 -0
  44. package/dist/device/camera-lift.js +7 -0
  45. package/dist/device/camera.d.ts +829 -0
  46. package/dist/device/camera.js +120 -0
  47. package/dist/device/device-gateway.d.ts +3 -0
  48. package/dist/device/device-gateway.js +4 -0
  49. package/dist/device/door.d.ts +217 -0
  50. package/dist/device/door.js +57 -0
  51. package/dist/device/index.d.ts +15 -0
  52. package/dist/device/index.js +31 -0
  53. package/dist/device/intercom-operator.d.ts +13 -0
  54. package/dist/device/intercom-operator.js +5 -0
  55. package/dist/device/intercom-terminal.d.ts +244 -0
  56. package/dist/device/intercom-terminal.js +48 -0
  57. package/dist/device/io-board.d.ts +55 -0
  58. package/dist/device/io-board.js +19 -0
  59. package/dist/device/motion-sensor.d.ts +8 -0
  60. package/dist/device/motion-sensor.js +8 -0
  61. package/dist/device/panic-button.d.ts +26 -0
  62. package/dist/device/panic-button.js +14 -0
  63. package/dist/device/pbx.d.ts +20 -0
  64. package/dist/device/pbx.js +11 -0
  65. package/dist/device/presence-tracker.d.ts +127 -0
  66. package/dist/device/presence-tracker.js +27 -0
  67. package/dist/device/reader/commands.d.ts +1 -0
  68. package/dist/device/reader/commands.js +2 -0
  69. package/dist/device/reader/events.d.ts +37 -0
  70. package/dist/device/reader/events.js +13 -0
  71. package/dist/device/reader/index.d.ts +3 -0
  72. package/dist/device/reader/index.js +19 -0
  73. package/dist/device/reader/specs.d.ts +2 -0
  74. package/dist/device/reader/specs.js +4 -0
  75. package/dist/device/server.d.ts +73 -0
  76. package/dist/device/server.js +33 -0
  77. package/dist/device-command.d.ts +23 -0
  78. package/dist/device-command.js +110 -0
  79. package/dist/device-event.d.ts +682 -0
  80. package/dist/device-event.js +87 -0
  81. package/dist/device-factory.d.ts +112 -0
  82. package/dist/device-factory.js +25 -0
  83. package/dist/device-group.d.ts +74 -0
  84. package/dist/device-group.js +31 -0
  85. package/dist/device-import.d.ts +1412 -0
  86. package/dist/device-import.js +33 -0
  87. package/dist/device-relation.d.ts +30 -0
  88. package/dist/device-relation.js +68 -0
  89. package/dist/device-state.d.ts +10 -0
  90. package/dist/device-state.js +2 -0
  91. package/dist/error.d.ts +13 -0
  92. package/dist/error.js +10 -0
  93. package/dist/file.d.ts +3 -0
  94. package/dist/file.js +2 -0
  95. package/dist/index.d.ts +28 -0
  96. package/dist/index.js +44 -0
  97. package/dist/layout.d.ts +188 -0
  98. package/dist/layout.js +40 -0
  99. package/dist/macros.d.ts +160 -0
  100. package/dist/macros.js +26 -0
  101. package/dist/messages/device-communication.d.ts +121 -0
  102. package/dist/messages/device-communication.js +63 -0
  103. package/dist/messages/index.d.ts +5 -0
  104. package/dist/messages/index.js +21 -0
  105. package/dist/messages/progress.d.ts +118 -0
  106. package/dist/messages/progress.js +51 -0
  107. package/dist/messages/provider-api/index.d.ts +1 -0
  108. package/dist/messages/provider-api/index.js +17 -0
  109. package/dist/messages/provider-api/sync-protocol.d.ts +83 -0
  110. package/dist/messages/provider-api/sync-protocol.js +2 -0
  111. package/dist/messages/web-rtc-signaling.d.ts +265 -0
  112. package/dist/messages/web-rtc-signaling.js +82 -0
  113. package/dist/messages/web-socket.d.ts +7 -0
  114. package/dist/messages/web-socket.js +5 -0
  115. package/dist/milestone.d.ts +5 -0
  116. package/dist/milestone.js +2 -0
  117. package/dist/module-config.d.ts +27 -0
  118. package/dist/module-config.js +2 -0
  119. package/dist/orchid.d.ts +19 -0
  120. package/dist/orchid.js +2 -0
  121. package/dist/package.json +40 -0
  122. package/dist/permissions.d.ts +6 -0
  123. package/dist/permissions.js +168 -0
  124. package/dist/template.d.ts +50 -0
  125. package/dist/template.js +21 -0
  126. package/dist/user.d.ts +184 -0
  127. package/dist/user.js +56 -0
  128. package/dist/view.d.ts +775 -0
  129. package/dist/view.js +74 -0
  130. package/dist/webrtc-playback.d.ts +20 -0
  131. package/dist/webrtc-playback.js +14 -0
  132. package/package.json +40 -0
@@ -0,0 +1,87 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.isDeviceEvent = exports.eventSchemaByKind = exports.eventKindLabels = exports.sEventHeader = void 0;
4
+ const zod_1 = require("zod");
5
+ const alarm_1 = require("./device/alarm");
6
+ const camera_1 = require("./device/camera");
7
+ const door_1 = require("./device/door");
8
+ const intercom_terminal_1 = require("./device/intercom-terminal");
9
+ const io_board_1 = require("./device/io-board");
10
+ const panic_button_1 = require("./device/panic-button");
11
+ const presence_tracker_1 = require("./device/presence-tracker");
12
+ const index_1 = require("./device/reader/index");
13
+ exports.sEventHeader = zod_1.z.object({
14
+ id: zod_1.z.string().nonempty(),
15
+ timestamp: zod_1.z.number().int().positive(),
16
+ deviceId: zod_1.z.string().nonempty(),
17
+ observedBy: zod_1.z.string().optional(),
18
+ });
19
+ exports.eventKindLabels = {
20
+ 'door-access': 'Door Access',
21
+ 'door-force': 'Force-Opened',
22
+ 'door-tamper': 'Tampered',
23
+ 'door-left-open': 'Left Open',
24
+ 'alarm-triggered': 'Alarm Triggered',
25
+ 'alarm-acknowledged': 'Alarm Acknowledged',
26
+ 'door-relock': 'Relocked',
27
+ 'door-mains-failed': 'Mains Failed',
28
+ 'door-acu-not-responding': 'ACU Not Responding',
29
+ 'door-acu-online': 'ACU Online',
30
+ 'door-mains-restored': 'Mains Restored',
31
+ 'door-tamper-restored': 'Tamper Restored',
32
+ 'motion-detected': 'Motion Detected',
33
+ 'device-command': 'Device Command',
34
+ 'reader-auth': 'Reader Authorized',
35
+ 'alarm-arm-released': 'Alarm Arm Released',
36
+ 'alarm-rearmed': 'Alarm Rearmed',
37
+ 'alarm-armed': 'Alarm Armed',
38
+ 'alarm-disarmed': 'Alarm Disarmed',
39
+ 'alarm-armed-all': 'Alarm Armed All',
40
+ 'alarm-disarmed-all': 'Alarm Disarmed All',
41
+ 'panic-button-pressed': 'Panic Button Pressed',
42
+ 'device-connected': 'Device Connected',
43
+ 'device-disconnected': 'Device Disconnected',
44
+ 'intercom-call': 'Intercom Call',
45
+ 'intercom-call-answered': 'Intercom Call Answered',
46
+ 'intercom-call-ended': 'Intercom Call Ended',
47
+ 'intercom-call-cancelled': 'Intercom Call Cancelled',
48
+ 'object-created': 'Object Created',
49
+ 'object-updated': 'Object Updated',
50
+ 'object-deleted': 'Object Deleted',
51
+ 'ptz-preset-saved': 'PTZ Preset Saved on Device',
52
+ 'person-in': 'Person Checked In',
53
+ 'person-out': 'Person Checked Out',
54
+ 'object-detection-started': 'Object Detection Started',
55
+ 'object-detection-updated': 'Object Detection Updated',
56
+ 'object-detection-ended': 'Object Detection Ended',
57
+ 'scene-created': 'Scene Created',
58
+ 'scene-updated': 'Scene Updated',
59
+ 'scene-ended': 'Scene Ended',
60
+ 'io-board-input-changed': 'IO Board Input Changed',
61
+ };
62
+ exports.eventSchemaByKind = {
63
+ ...alarm_1.alarmEventSchemasByKind,
64
+ ...camera_1.cameraEventSchemasByKind,
65
+ ...door_1.doorEventSchemaByKind,
66
+ ...intercom_terminal_1.intercomTerminalEventSchemaByKind,
67
+ ...io_board_1.ioBoardEventSchemaByKind,
68
+ ...panic_button_1.panicButtonEventSchemaByKind,
69
+ ...presence_tracker_1.presenceTrackerEventSchemaByKind,
70
+ ...index_1.readerEventSchemaByKind,
71
+ };
72
+ const isDeviceEvent = (event) => {
73
+ if (typeof event !== 'object' || event === null)
74
+ return false;
75
+ if (!('kind' in event))
76
+ return false;
77
+ if (typeof event.kind !== 'string')
78
+ return false;
79
+ const schema = exports.eventSchemaByKind[event.kind];
80
+ if (!schema)
81
+ return false;
82
+ const result = schema.safeParse(event);
83
+ if (!result.success)
84
+ return false;
85
+ return true;
86
+ };
87
+ exports.isDeviceEvent = isDeviceEvent;
@@ -0,0 +1,112 @@
1
+ import z from 'zod';
2
+ import { DeviceType } from './device/any-device';
3
+ export declare const sIoSlot: z.ZodObject<{
4
+ deviceId: z.ZodString;
5
+ slot: z.ZodString;
6
+ }, "strip", z.ZodTypeAny, {
7
+ slot: string;
8
+ deviceId: string;
9
+ }, {
10
+ slot: string;
11
+ deviceId: string;
12
+ }>;
13
+ export type IoSlot = z.infer<typeof sIoSlot>;
14
+ export declare const sInputBindings: z.ZodRecord<z.ZodString, z.ZodObject<{
15
+ deviceId: z.ZodString;
16
+ slot: z.ZodString;
17
+ }, "strip", z.ZodTypeAny, {
18
+ slot: string;
19
+ deviceId: string;
20
+ }, {
21
+ slot: string;
22
+ deviceId: string;
23
+ }>>;
24
+ export type InputBindings = z.infer<typeof sInputBindings>;
25
+ export declare const sOutputBindings: z.ZodRecord<z.ZodString, z.ZodObject<{
26
+ deviceId: z.ZodString;
27
+ slot: z.ZodString;
28
+ }, "strip", z.ZodTypeAny, {
29
+ slot: string;
30
+ deviceId: string;
31
+ }, {
32
+ slot: string;
33
+ deviceId: string;
34
+ }>>;
35
+ export type OutputBindings = z.infer<typeof sOutputBindings>;
36
+ export interface DeviceFactoryProviderMetadata {
37
+ templateName: string;
38
+ }
39
+ export declare const isDeviceFactoryProviderMetadata: (obj: any) => obj is DeviceFactoryProviderMetadata;
40
+ export interface DeviceIo {
41
+ name: string;
42
+ displayName: string;
43
+ dataType: 'boolean';
44
+ }
45
+ export interface DeviceTemplate {
46
+ deviceType: DeviceType;
47
+ displayName: string;
48
+ description: string;
49
+ inputs: DeviceIo[];
50
+ outputs: DeviceIo[];
51
+ }
52
+ export declare const sAddCustomDeviceRequest: z.ZodObject<{
53
+ name: z.ZodString;
54
+ templateName: z.ZodString;
55
+ }, "strip", z.ZodTypeAny, {
56
+ name: string;
57
+ templateName: string;
58
+ }, {
59
+ name: string;
60
+ templateName: string;
61
+ }>;
62
+ export type AddCustomDeviceRequest = z.infer<typeof sAddCustomDeviceRequest>;
63
+ export declare const sUpdateCustomDeviceRequest: z.ZodObject<{
64
+ inputBindings: z.ZodRecord<z.ZodString, z.ZodObject<{
65
+ deviceId: z.ZodString;
66
+ slot: z.ZodString;
67
+ }, "strip", z.ZodTypeAny, {
68
+ slot: string;
69
+ deviceId: string;
70
+ }, {
71
+ slot: string;
72
+ deviceId: string;
73
+ }>>;
74
+ outputBindings: z.ZodRecord<z.ZodString, z.ZodObject<{
75
+ deviceId: z.ZodString;
76
+ slot: z.ZodString;
77
+ }, "strip", z.ZodTypeAny, {
78
+ slot: string;
79
+ deviceId: string;
80
+ }, {
81
+ slot: string;
82
+ deviceId: string;
83
+ }>>;
84
+ }, "strip", z.ZodTypeAny, {
85
+ inputBindings: Record<string, {
86
+ slot: string;
87
+ deviceId: string;
88
+ }>;
89
+ outputBindings: Record<string, {
90
+ slot: string;
91
+ deviceId: string;
92
+ }>;
93
+ }, {
94
+ inputBindings: Record<string, {
95
+ slot: string;
96
+ deviceId: string;
97
+ }>;
98
+ outputBindings: Record<string, {
99
+ slot: string;
100
+ deviceId: string;
101
+ }>;
102
+ }>;
103
+ export type UpdateCustomDeviceRequest = {
104
+ id: string;
105
+ } & z.infer<typeof sUpdateCustomDeviceRequest>;
106
+ export type CustomDeviceInfo = {
107
+ id: string;
108
+ name: string;
109
+ templateName: string;
110
+ inputBindings: Record<string, IoSlot>;
111
+ outputBindings: Record<string, IoSlot>;
112
+ };
@@ -0,0 +1,25 @@
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.sUpdateCustomDeviceRequest = exports.sAddCustomDeviceRequest = exports.isDeviceFactoryProviderMetadata = exports.sOutputBindings = exports.sInputBindings = exports.sIoSlot = void 0;
7
+ const zod_1 = __importDefault(require("zod"));
8
+ exports.sIoSlot = zod_1.default.object({
9
+ deviceId: zod_1.default.string().nonempty(),
10
+ slot: zod_1.default.string().nonempty(),
11
+ });
12
+ exports.sInputBindings = zod_1.default.record(exports.sIoSlot);
13
+ exports.sOutputBindings = zod_1.default.record(exports.sIoSlot);
14
+ const isDeviceFactoryProviderMetadata = (obj) => {
15
+ return obj && obj.templateName && typeof obj.templateName === 'string';
16
+ };
17
+ exports.isDeviceFactoryProviderMetadata = isDeviceFactoryProviderMetadata;
18
+ exports.sAddCustomDeviceRequest = zod_1.default.object({
19
+ name: zod_1.default.string().nonempty(),
20
+ templateName: zod_1.default.string().nonempty(),
21
+ });
22
+ exports.sUpdateCustomDeviceRequest = zod_1.default.object({
23
+ inputBindings: exports.sInputBindings,
24
+ outputBindings: exports.sOutputBindings,
25
+ });
@@ -0,0 +1,74 @@
1
+ import z from 'zod';
2
+ export declare const sDeviceGroup: z.ZodObject<{
3
+ id: z.ZodString;
4
+ code: z.ZodNullable<z.ZodString>;
5
+ displayName: z.ZodString;
6
+ createdOn: z.ZodString;
7
+ lastModifiedOn: z.ZodString;
8
+ devices: z.ZodArray<z.ZodString, "many">;
9
+ }, "strip", z.ZodTypeAny, {
10
+ code: string | null;
11
+ id: string;
12
+ displayName: string;
13
+ createdOn: string;
14
+ lastModifiedOn: string;
15
+ devices: string[];
16
+ }, {
17
+ code: string | null;
18
+ id: string;
19
+ displayName: string;
20
+ createdOn: string;
21
+ lastModifiedOn: string;
22
+ devices: string[];
23
+ }>;
24
+ export type DeviceGroupDto = z.infer<typeof sDeviceGroup>;
25
+ export declare const sAddGroupRequest: z.ZodObject<{
26
+ code: z.ZodNullable<z.ZodString>;
27
+ displayName: z.ZodString;
28
+ devices: z.ZodArray<z.ZodString, "many">;
29
+ }, "strip", z.ZodTypeAny, {
30
+ code: string | null;
31
+ displayName: string;
32
+ devices: string[];
33
+ }, {
34
+ code: string | null;
35
+ displayName: string;
36
+ devices: string[];
37
+ }>;
38
+ export declare const sUpdateGroupRequest: z.ZodObject<{
39
+ code: z.ZodOptional<z.ZodNullable<z.ZodString>>;
40
+ displayName: z.ZodOptional<z.ZodString>;
41
+ devices: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
42
+ }, "strip", z.ZodTypeAny, {
43
+ code?: string | null | undefined;
44
+ displayName?: string | undefined;
45
+ devices?: string[] | undefined;
46
+ }, {
47
+ code?: string | null | undefined;
48
+ displayName?: string | undefined;
49
+ devices?: string[] | undefined;
50
+ }>;
51
+ export declare const sAddDevicesToGroupRequest: z.ZodObject<{
52
+ devices: z.ZodArray<z.ZodString, "many">;
53
+ }, "strip", z.ZodTypeAny, {
54
+ devices: string[];
55
+ }, {
56
+ devices: string[];
57
+ }>;
58
+ export declare const sRemoveDevicesFromGroupRequest: z.ZodObject<{
59
+ devices: z.ZodArray<z.ZodString, "many">;
60
+ }, "strip", z.ZodTypeAny, {
61
+ devices: string[];
62
+ }, {
63
+ devices: string[];
64
+ }>;
65
+ export type AddGroupRequest = z.infer<typeof sAddGroupRequest>;
66
+ export type UpdateGroupRequest = {
67
+ id: string;
68
+ } & z.infer<typeof sUpdateGroupRequest>;
69
+ export type AddDevicesToGroupRequest = {
70
+ id: string;
71
+ } & z.infer<typeof sAddDevicesToGroupRequest>;
72
+ export type RemoveDevicesFromGroupRequest = {
73
+ id: string;
74
+ } & z.infer<typeof sRemoveDevicesFromGroupRequest>;
@@ -0,0 +1,31 @@
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.sRemoveDevicesFromGroupRequest = exports.sAddDevicesToGroupRequest = exports.sUpdateGroupRequest = exports.sAddGroupRequest = exports.sDeviceGroup = void 0;
7
+ const zod_1 = __importDefault(require("zod"));
8
+ exports.sDeviceGroup = zod_1.default.object({
9
+ id: zod_1.default.string(),
10
+ code: zod_1.default.string().nullable(),
11
+ displayName: zod_1.default.string(),
12
+ createdOn: zod_1.default.string(),
13
+ lastModifiedOn: zod_1.default.string(),
14
+ devices: zod_1.default.array(zod_1.default.string().nonempty()),
15
+ });
16
+ exports.sAddGroupRequest = zod_1.default.object({
17
+ code: zod_1.default.string().nullable(),
18
+ displayName: zod_1.default.string().nonempty(),
19
+ devices: zod_1.default.array(zod_1.default.string().nonempty()),
20
+ });
21
+ exports.sUpdateGroupRequest = zod_1.default.object({
22
+ code: zod_1.default.string().nullable().optional(),
23
+ displayName: zod_1.default.string().optional(),
24
+ devices: zod_1.default.array(zod_1.default.string().nonempty()).optional(),
25
+ });
26
+ exports.sAddDevicesToGroupRequest = zod_1.default.object({
27
+ devices: zod_1.default.array(zod_1.default.string().nonempty()),
28
+ });
29
+ exports.sRemoveDevicesFromGroupRequest = zod_1.default.object({
30
+ devices: zod_1.default.array(zod_1.default.string().nonempty()),
31
+ });