@awarevue/api-types 2.0.13 → 2.0.14

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 (135) hide show
  1. package/dist/access-control/access-rule.d.ts +6 -6
  2. package/dist/access-control/person.d.ts +6 -6
  3. package/dist/access-control/schedule.d.ts +2 -2
  4. package/dist/access-control/zone.d.ts +4 -4
  5. package/dist/agent-communication/index.d.ts +0 -1
  6. package/dist/agent-communication/index.js +0 -1
  7. package/dist/agent-communication/protocol.d.ts +170 -170
  8. package/dist/alarm-automation.d.ts +1 -1
  9. package/dist/api/alarm.d.ts +1 -1
  10. package/dist/api/media.d.ts +8 -8
  11. package/dist/bookmarks.d.ts +2 -2
  12. package/dist/cast.d.ts +2 -2
  13. package/dist/commands/alarm.d.ts +312 -0
  14. package/dist/commands/alarm.js +62 -0
  15. package/dist/{device-command.d.ts → commands/all.d.ts} +17 -19
  16. package/dist/{device-command.js → commands/all.js} +9 -9
  17. package/dist/commands/camera-lift.d.ts +46 -0
  18. package/dist/commands/camera-lift.js +17 -0
  19. package/dist/commands/camera.d.ts +478 -0
  20. package/dist/commands/camera.js +97 -0
  21. package/dist/commands/display.d.ts +431 -0
  22. package/dist/commands/display.js +37 -0
  23. package/dist/commands/door.d.ts +88 -0
  24. package/dist/commands/door.js +27 -0
  25. package/dist/commands/index.d.ts +12 -0
  26. package/dist/commands/index.js +28 -0
  27. package/dist/commands/intercom-terminal.d.ts +40 -0
  28. package/dist/{device/reader/commands.js → commands/intercom-terminal.js} +1 -0
  29. package/dist/commands/io-board.d.ts +55 -0
  30. package/dist/commands/io-board.js +15 -0
  31. package/dist/commands/nvr-exporter.d.ts +1262 -0
  32. package/dist/commands/nvr-exporter.js +26 -0
  33. package/dist/commands/pbx.d.ts +75 -0
  34. package/dist/commands/pbx.js +17 -0
  35. package/dist/commands/presence-tracker.d.ts +167 -0
  36. package/dist/commands/presence-tracker.js +33 -0
  37. package/dist/commands/server.d.ts +1272 -0
  38. package/dist/commands/server.js +27 -0
  39. package/dist/device/alarm.d.ts +0 -530
  40. package/dist/device/alarm.js +1 -110
  41. package/dist/device/any-device.d.ts +88 -88
  42. package/dist/device/camera-lift.d.ts +0 -45
  43. package/dist/device/camera-lift.js +1 -14
  44. package/dist/device/camera.d.ts +0 -1248
  45. package/dist/device/camera.js +1 -204
  46. package/dist/device/device-gateway.d.ts +0 -2
  47. package/dist/device/device-gateway.js +1 -0
  48. package/dist/device/display.d.ts +0 -438
  49. package/dist/device/display.js +1 -39
  50. package/dist/device/door.d.ts +0 -306
  51. package/dist/device/door.js +1 -82
  52. package/dist/device/index.d.ts +1 -1
  53. package/dist/device/index.js +1 -1
  54. package/dist/device/intercom-operator.js +0 -1
  55. package/dist/device/intercom-terminal.d.ts +0 -101
  56. package/dist/device/intercom-terminal.js +3 -55
  57. package/dist/device/io-board.d.ts +0 -84
  58. package/dist/device/io-board.js +1 -21
  59. package/dist/device/motion-sensor.js +0 -1
  60. package/dist/device/nvr-analytics-server.d.ts +0 -295
  61. package/dist/device/nvr-analytics-server.js +1 -65
  62. package/dist/device/nvr-exporter.d.ts +0 -1436
  63. package/dist/device/nvr-exporter.js +1 -72
  64. package/dist/device/nvr-recorder.d.ts +0 -2633
  65. package/dist/device/nvr-recorder.js +1 -39
  66. package/dist/device/panic-button.d.ts +0 -18
  67. package/dist/device/panic-button.js +1 -8
  68. package/dist/device/pbx.d.ts +0 -74
  69. package/dist/device/pbx.js +1 -16
  70. package/dist/device/presence-tracker.d.ts +0 -302
  71. package/dist/device/presence-tracker.js +1 -59
  72. package/dist/device/server.d.ts +0 -1336
  73. package/dist/device/server.js +1 -37
  74. package/dist/device/system.d.ts +0 -42
  75. package/dist/device/system.js +1 -13
  76. package/dist/device-event.d.ts +1 -721
  77. package/dist/device-event.js +0 -110
  78. package/dist/device-group.d.ts +2 -2
  79. package/dist/device-import.d.ts +8 -8
  80. package/dist/events/alarm.d.ts +220 -0
  81. package/dist/events/alarm.js +55 -0
  82. package/dist/events/all.d.ts +700 -0
  83. package/dist/events/all.js +109 -0
  84. package/dist/events/camera.d.ts +661 -0
  85. package/dist/events/camera.js +87 -0
  86. package/dist/events/display.d.ts +9 -0
  87. package/dist/events/display.js +9 -0
  88. package/dist/events/door.d.ts +220 -0
  89. package/dist/events/door.js +62 -0
  90. package/dist/events/index.d.ts +12 -0
  91. package/dist/events/index.js +28 -0
  92. package/dist/events/intercom-terminal.d.ts +61 -0
  93. package/dist/events/intercom-terminal.js +19 -0
  94. package/dist/events/io-board.d.ts +31 -0
  95. package/dist/events/io-board.js +13 -0
  96. package/dist/events/nvr-exporter.d.ts +52 -0
  97. package/dist/events/nvr-exporter.js +21 -0
  98. package/dist/events/panic-button.d.ts +19 -0
  99. package/dist/events/panic-button.js +11 -0
  100. package/dist/events/presence-tracker.d.ts +136 -0
  101. package/dist/events/presence-tracker.js +33 -0
  102. package/dist/events/server.d.ts +65 -0
  103. package/dist/events/server.js +15 -0
  104. package/dist/index.d.ts +4 -1
  105. package/dist/index.js +4 -1
  106. package/dist/layout.d.ts +8 -8
  107. package/dist/macros.d.ts +14 -14
  108. package/dist/messages/device-communication.d.ts +2 -2
  109. package/dist/messages/notifications.d.ts +2 -2
  110. package/dist/messages/web-rtc-signaling.d.ts +10 -10
  111. package/dist/notifications.d.ts +4 -4
  112. package/dist/package.json +1 -1
  113. package/dist/primitives.d.ts +16 -0
  114. package/dist/primitives.js +13 -1
  115. package/dist/{agent-communication/queries.d.ts → queries/all.d.ts} +12 -10
  116. package/dist/queries/all.js +21 -0
  117. package/dist/queries/camera.d.ts +98 -0
  118. package/dist/queries/camera.js +27 -0
  119. package/dist/queries/index.d.ts +5 -0
  120. package/dist/{device/reader → queries}/index.js +5 -3
  121. package/dist/queries/nvr-analytics-server.d.ts +296 -0
  122. package/dist/queries/nvr-analytics-server.js +68 -0
  123. package/dist/queries/nvr-exporter.d.ts +125 -0
  124. package/dist/queries/nvr-exporter.js +36 -0
  125. package/dist/queries/nvr-recorder.d.ts +2634 -0
  126. package/dist/queries/nvr-recorder.js +42 -0
  127. package/dist/user.d.ts +4 -4
  128. package/package.json +1 -1
  129. package/dist/agent-communication/queries.js +0 -19
  130. package/dist/device/reader/commands.d.ts +0 -1
  131. package/dist/device/reader/index.d.ts +0 -3
  132. /package/dist/device/{reader/specs.d.ts → reader.d.ts} +0 -0
  133. /package/dist/device/{reader/specs.js → reader.js} +0 -0
  134. /package/dist/{device/reader/events.d.ts → events/reader.d.ts} +0 -0
  135. /package/dist/{device/reader/events.js → events/reader.js} +0 -0
@@ -1,45 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.sDisplayUnitOfflineEvent = exports.displayCommands = exports.sDisplaySetViewCommand = exports.sDisplayTileItem = exports.sDisplayTileItemEmpty = exports.sDisplayTileItemCamera = exports.sDisplaySpecs = exports.DISPLAY = void 0;
3
+ exports.sDisplaySpecs = exports.DISPLAY = void 0;
4
4
  const zod_1 = require("zod");
5
5
  exports.DISPLAY = 'display';
6
6
  // SPECS
7
7
  exports.sDisplaySpecs = zod_1.z.object({});
8
- // COMMANDS
9
- exports.sDisplayTileItemCamera = zod_1.z.object({
10
- type: zod_1.z.literal('camera'),
11
- name: zod_1.z.string().nonempty(),
12
- username: zod_1.z.string().nonempty(),
13
- password: zod_1.z.string().nonempty(),
14
- streams: zod_1.z
15
- .array(zod_1.z.object({
16
- streamId: zod_1.z.string().nonempty(),
17
- displayName: zod_1.z.string().nonempty(),
18
- resolution: zod_1.z.string().nullable(),
19
- rtspUrl: zod_1.z.string().nonempty(),
20
- }))
21
- .min(1),
22
- });
23
- exports.sDisplayTileItemEmpty = zod_1.z.object({
24
- type: zod_1.z.literal('empty'),
25
- });
26
- exports.sDisplayTileItem = zod_1.z.union([
27
- exports.sDisplayTileItemCamera,
28
- exports.sDisplayTileItemEmpty,
29
- ]);
30
- exports.sDisplaySetViewCommand = zod_1.z.object({
31
- command: zod_1.z.literal('display.set-view'),
32
- params: zod_1.z.object({
33
- tiles: zod_1.z.array(zod_1.z.object({
34
- items: zod_1.z.array(exports.sDisplayTileItem),
35
- })),
36
- }),
37
- });
38
- exports.displayCommands = {
39
- 'display.set-view': exports.sDisplaySetViewCommand,
40
- };
41
- // EVENTS
42
- exports.sDisplayUnitOfflineEvent = zod_1.z.object({
43
- kind: zod_1.z.literal('display-unit-offline'),
44
- });
45
- //Could report on other events in the future like bad streams, high cpu usage, etc.
@@ -17,93 +17,6 @@ export declare const sDoorSpecs: z.ZodObject<{
17
17
  canRelease: boolean;
18
18
  }>;
19
19
  export type DoorSpecs = z.infer<typeof sDoorSpecs>;
20
- export declare const sDoorUnlockCommand: z.ZodObject<{
21
- command: z.ZodLiteral<"door.unlock">;
22
- params: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
23
- }, "strip", z.ZodTypeAny, {
24
- params: {};
25
- command: "door.unlock";
26
- }, {
27
- params: {};
28
- command: "door.unlock";
29
- }>;
30
- export type DoorUnlockCommand = z.infer<typeof sDoorUnlockCommand>;
31
- export declare const sDoorLockCommand: z.ZodObject<{
32
- command: z.ZodLiteral<"door.lock">;
33
- params: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
34
- }, "strip", z.ZodTypeAny, {
35
- params: {};
36
- command: "door.lock";
37
- }, {
38
- params: {};
39
- command: "door.lock";
40
- }>;
41
- export type DoorLockCommand = z.infer<typeof sDoorLockCommand>;
42
- export declare const sDoorReleaseCommand: z.ZodObject<{
43
- command: z.ZodLiteral<"door.release">;
44
- params: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
45
- }, "strip", z.ZodTypeAny, {
46
- params: {};
47
- command: "door.release";
48
- }, {
49
- params: {};
50
- command: "door.release";
51
- }>;
52
- export type DoorReleaseCommand = z.infer<typeof sDoorReleaseCommand>;
53
- export declare const sDoorAlarmAckCommand: z.ZodObject<{
54
- command: z.ZodLiteral<"door.alarm-ack">;
55
- params: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
56
- }, "strip", z.ZodTypeAny, {
57
- params: {};
58
- command: "door.alarm-ack";
59
- }, {
60
- params: {};
61
- command: "door.alarm-ack";
62
- }>;
63
- export type DoorAlarmAckCommand = z.infer<typeof sDoorAlarmAckCommand>;
64
- export declare const doorCommands: {
65
- readonly 'door.unlock': z.ZodObject<{
66
- command: z.ZodLiteral<"door.unlock">;
67
- params: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
68
- }, "strip", z.ZodTypeAny, {
69
- params: {};
70
- command: "door.unlock";
71
- }, {
72
- params: {};
73
- command: "door.unlock";
74
- }>;
75
- readonly 'door.lock': z.ZodObject<{
76
- command: z.ZodLiteral<"door.lock">;
77
- params: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
78
- }, "strip", z.ZodTypeAny, {
79
- params: {};
80
- command: "door.lock";
81
- }, {
82
- params: {};
83
- command: "door.lock";
84
- }>;
85
- readonly 'door.release': z.ZodObject<{
86
- command: z.ZodLiteral<"door.release">;
87
- params: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
88
- }, "strip", z.ZodTypeAny, {
89
- params: {};
90
- command: "door.release";
91
- }, {
92
- params: {};
93
- command: "door.release";
94
- }>;
95
- readonly 'door.alarm-ack': z.ZodObject<{
96
- command: z.ZodLiteral<"door.alarm-ack">;
97
- params: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
98
- }, "strip", z.ZodTypeAny, {
99
- params: {};
100
- command: "door.alarm-ack";
101
- }, {
102
- params: {};
103
- command: "door.alarm-ack";
104
- }>;
105
- };
106
- export type DoorCommand = DoorUnlockCommand | DoorLockCommand | DoorReleaseCommand | DoorAlarmAckCommand;
107
20
  export interface DoorStateDto {
108
21
  locked: boolean;
109
22
  open: boolean;
@@ -111,222 +24,3 @@ export interface DoorStateDto {
111
24
  lastAlarmTimestamp: number;
112
25
  connected: boolean;
113
26
  }
114
- export declare const sDoorAccessEvent: z.ZodObject<{
115
- kind: z.ZodLiteral<"door-access">;
116
- personId: z.ZodOptional<z.ZodString>;
117
- token: z.ZodNullable<z.ZodString>;
118
- tokenType: z.ZodNullable<z.ZodEnum<["card", "pin", "fingerprint"]>>;
119
- allowed: z.ZodBoolean;
120
- doorExit: z.ZodBoolean;
121
- description: z.ZodString;
122
- }, "strip", z.ZodTypeAny, {
123
- description: string;
124
- kind: "door-access";
125
- token: string | null;
126
- tokenType: "card" | "pin" | "fingerprint" | null;
127
- allowed: boolean;
128
- doorExit: boolean;
129
- personId?: string | undefined;
130
- }, {
131
- description: string;
132
- kind: "door-access";
133
- token: string | null;
134
- tokenType: "card" | "pin" | "fingerprint" | null;
135
- allowed: boolean;
136
- doorExit: boolean;
137
- personId?: string | undefined;
138
- }>;
139
- export declare const sDoorOpened: z.ZodObject<{
140
- kind: z.ZodLiteral<"door-opened">;
141
- }, "strip", z.ZodTypeAny, {
142
- kind: "door-opened";
143
- }, {
144
- kind: "door-opened";
145
- }>;
146
- export declare const sDoorClosed: z.ZodObject<{
147
- kind: z.ZodLiteral<"door-closed">;
148
- }, "strip", z.ZodTypeAny, {
149
- kind: "door-closed";
150
- }, {
151
- kind: "door-closed";
152
- }>;
153
- export declare const sDoorForceEvent: z.ZodObject<{
154
- kind: z.ZodLiteral<"door-force">;
155
- }, "strip", z.ZodTypeAny, {
156
- kind: "door-force";
157
- }, {
158
- kind: "door-force";
159
- }>;
160
- export declare const sDoorTamperEvent: z.ZodObject<{
161
- kind: z.ZodLiteral<"door-tamper">;
162
- }, "strip", z.ZodTypeAny, {
163
- kind: "door-tamper";
164
- }, {
165
- kind: "door-tamper";
166
- }>;
167
- export declare const sDoorLeftOpenEvent: z.ZodObject<{
168
- kind: z.ZodLiteral<"door-left-open">;
169
- }, "strip", z.ZodTypeAny, {
170
- kind: "door-left-open";
171
- }, {
172
- kind: "door-left-open";
173
- }>;
174
- export declare const sDoorRelockEvent: z.ZodObject<{
175
- kind: z.ZodLiteral<"door-relock">;
176
- }, "strip", z.ZodTypeAny, {
177
- kind: "door-relock";
178
- }, {
179
- kind: "door-relock";
180
- }>;
181
- export declare const sDoorMainsFailedEvent: z.ZodObject<{
182
- kind: z.ZodLiteral<"door-mains-failed">;
183
- }, "strip", z.ZodTypeAny, {
184
- kind: "door-mains-failed";
185
- }, {
186
- kind: "door-mains-failed";
187
- }>;
188
- export declare const sDoorAcuNotRespondingEvent: z.ZodObject<{
189
- kind: z.ZodLiteral<"door-acu-not-responding">;
190
- }, "strip", z.ZodTypeAny, {
191
- kind: "door-acu-not-responding";
192
- }, {
193
- kind: "door-acu-not-responding";
194
- }>;
195
- export declare const sDoorMainsRestoredEvent: z.ZodObject<{
196
- kind: z.ZodLiteral<"door-mains-restored">;
197
- }, "strip", z.ZodTypeAny, {
198
- kind: "door-mains-restored";
199
- }, {
200
- kind: "door-mains-restored";
201
- }>;
202
- export declare const sDoorAcuOnlineEvent: z.ZodObject<{
203
- kind: z.ZodLiteral<"door-acu-online">;
204
- }, "strip", z.ZodTypeAny, {
205
- kind: "door-acu-online";
206
- }, {
207
- kind: "door-acu-online";
208
- }>;
209
- export declare const sDoorTamperRestoredEvent: z.ZodObject<{
210
- kind: z.ZodLiteral<"door-tamper-restored">;
211
- }, "strip", z.ZodTypeAny, {
212
- kind: "door-tamper-restored";
213
- }, {
214
- kind: "door-tamper-restored";
215
- }>;
216
- export declare const doorEventSchemaByKind: {
217
- readonly 'door-access': z.ZodObject<{
218
- kind: z.ZodLiteral<"door-access">;
219
- personId: z.ZodOptional<z.ZodString>;
220
- token: z.ZodNullable<z.ZodString>;
221
- tokenType: z.ZodNullable<z.ZodEnum<["card", "pin", "fingerprint"]>>;
222
- allowed: z.ZodBoolean;
223
- doorExit: z.ZodBoolean;
224
- description: z.ZodString;
225
- }, "strip", z.ZodTypeAny, {
226
- description: string;
227
- kind: "door-access";
228
- token: string | null;
229
- tokenType: "card" | "pin" | "fingerprint" | null;
230
- allowed: boolean;
231
- doorExit: boolean;
232
- personId?: string | undefined;
233
- }, {
234
- description: string;
235
- kind: "door-access";
236
- token: string | null;
237
- tokenType: "card" | "pin" | "fingerprint" | null;
238
- allowed: boolean;
239
- doorExit: boolean;
240
- personId?: string | undefined;
241
- }>;
242
- readonly 'door-opened': z.ZodObject<{
243
- kind: z.ZodLiteral<"door-opened">;
244
- }, "strip", z.ZodTypeAny, {
245
- kind: "door-opened";
246
- }, {
247
- kind: "door-opened";
248
- }>;
249
- readonly 'door-closed': z.ZodObject<{
250
- kind: z.ZodLiteral<"door-closed">;
251
- }, "strip", z.ZodTypeAny, {
252
- kind: "door-closed";
253
- }, {
254
- kind: "door-closed";
255
- }>;
256
- readonly 'door-force': z.ZodObject<{
257
- kind: z.ZodLiteral<"door-force">;
258
- }, "strip", z.ZodTypeAny, {
259
- kind: "door-force";
260
- }, {
261
- kind: "door-force";
262
- }>;
263
- readonly 'door-tamper': z.ZodObject<{
264
- kind: z.ZodLiteral<"door-tamper">;
265
- }, "strip", z.ZodTypeAny, {
266
- kind: "door-tamper";
267
- }, {
268
- kind: "door-tamper";
269
- }>;
270
- readonly 'door-left-open': z.ZodObject<{
271
- kind: z.ZodLiteral<"door-left-open">;
272
- }, "strip", z.ZodTypeAny, {
273
- kind: "door-left-open";
274
- }, {
275
- kind: "door-left-open";
276
- }>;
277
- readonly 'door-relock': z.ZodObject<{
278
- kind: z.ZodLiteral<"door-relock">;
279
- }, "strip", z.ZodTypeAny, {
280
- kind: "door-relock";
281
- }, {
282
- kind: "door-relock";
283
- }>;
284
- readonly 'door-mains-failed': z.ZodObject<{
285
- kind: z.ZodLiteral<"door-mains-failed">;
286
- }, "strip", z.ZodTypeAny, {
287
- kind: "door-mains-failed";
288
- }, {
289
- kind: "door-mains-failed";
290
- }>;
291
- readonly 'door-acu-not-responding': z.ZodObject<{
292
- kind: z.ZodLiteral<"door-acu-not-responding">;
293
- }, "strip", z.ZodTypeAny, {
294
- kind: "door-acu-not-responding";
295
- }, {
296
- kind: "door-acu-not-responding";
297
- }>;
298
- readonly 'door-mains-restored': z.ZodObject<{
299
- kind: z.ZodLiteral<"door-mains-restored">;
300
- }, "strip", z.ZodTypeAny, {
301
- kind: "door-mains-restored";
302
- }, {
303
- kind: "door-mains-restored";
304
- }>;
305
- readonly 'door-acu-online': z.ZodObject<{
306
- kind: z.ZodLiteral<"door-acu-online">;
307
- }, "strip", z.ZodTypeAny, {
308
- kind: "door-acu-online";
309
- }, {
310
- kind: "door-acu-online";
311
- }>;
312
- readonly 'door-tamper-restored': z.ZodObject<{
313
- kind: z.ZodLiteral<"door-tamper-restored">;
314
- }, "strip", z.ZodTypeAny, {
315
- kind: "door-tamper-restored";
316
- }, {
317
- kind: "door-tamper-restored";
318
- }>;
319
- };
320
- export type DoorAccessEvent = z.infer<typeof sDoorAccessEvent>;
321
- export type DoorOpenedEvent = z.infer<typeof sDoorOpened>;
322
- export type DoorClosedEvent = z.infer<typeof sDoorClosed>;
323
- export type DoorForceEvent = z.infer<typeof sDoorForceEvent>;
324
- export type DoorTamperEvent = z.infer<typeof sDoorTamperEvent>;
325
- export type DoorLeftOpenEvent = z.infer<typeof sDoorLeftOpenEvent>;
326
- export type DoorRelockEvent = z.infer<typeof sDoorRelockEvent>;
327
- export type DoorMainsFailedEvent = z.infer<typeof sDoorMainsFailedEvent>;
328
- export type DoorAcuNotRespondingEvent = z.infer<typeof sDoorAcuNotRespondingEvent>;
329
- export type DoorMainsRestoredEvent = z.infer<typeof sDoorMainsRestoredEvent>;
330
- export type DoorAcuOnlineEvent = z.infer<typeof sDoorAcuOnlineEvent>;
331
- export type DoorTamperRestoredEvent = z.infer<typeof sDoorTamperRestoredEvent>;
332
- export type DoorEvent = DoorAccessEvent | DoorOpenedEvent | DoorClosedEvent | DoorForceEvent | DoorTamperEvent | DoorLeftOpenEvent | DoorRelockEvent | DoorMainsFailedEvent | DoorAcuNotRespondingEvent | DoorMainsRestoredEvent | DoorAcuOnlineEvent | DoorTamperRestoredEvent;
@@ -1,7 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.doorEventSchemaByKind = exports.sDoorTamperRestoredEvent = exports.sDoorAcuOnlineEvent = exports.sDoorMainsRestoredEvent = exports.sDoorAcuNotRespondingEvent = exports.sDoorMainsFailedEvent = exports.sDoorRelockEvent = exports.sDoorLeftOpenEvent = exports.sDoorTamperEvent = exports.sDoorForceEvent = exports.sDoorClosed = exports.sDoorOpened = exports.sDoorAccessEvent = exports.doorCommands = exports.sDoorAlarmAckCommand = exports.sDoorReleaseCommand = exports.sDoorLockCommand = exports.sDoorUnlockCommand = exports.sDoorSpecs = exports.DOOR = void 0;
4
- const access_control_1 = require("../access-control");
3
+ exports.sDoorSpecs = exports.DOOR = void 0;
5
4
  const zod_1 = require("zod");
6
5
  exports.DOOR = 'door';
7
6
  // SPECS
@@ -11,83 +10,3 @@ exports.sDoorSpecs = zod_1.z.object({
11
10
  canControlLock: zod_1.z.boolean(),
12
11
  canRelease: zod_1.z.boolean(),
13
12
  });
14
- // COMMANDS
15
- exports.sDoorUnlockCommand = zod_1.z.object({
16
- command: zod_1.z.literal('door.unlock'),
17
- params: zod_1.z.object({}),
18
- });
19
- exports.sDoorLockCommand = zod_1.z.object({
20
- command: zod_1.z.literal('door.lock'),
21
- params: zod_1.z.object({}),
22
- });
23
- exports.sDoorReleaseCommand = zod_1.z.object({
24
- command: zod_1.z.literal('door.release'),
25
- params: zod_1.z.object({}),
26
- });
27
- exports.sDoorAlarmAckCommand = zod_1.z.object({
28
- command: zod_1.z.literal('door.alarm-ack'),
29
- params: zod_1.z.object({}),
30
- });
31
- exports.doorCommands = {
32
- 'door.unlock': exports.sDoorUnlockCommand,
33
- 'door.lock': exports.sDoorLockCommand,
34
- 'door.release': exports.sDoorReleaseCommand,
35
- 'door.alarm-ack': exports.sDoorAlarmAckCommand,
36
- };
37
- // EVENTS
38
- exports.sDoorAccessEvent = zod_1.z.object({
39
- kind: zod_1.z.literal('door-access'),
40
- personId: zod_1.z.string().optional(),
41
- token: zod_1.z.string().nullable(),
42
- tokenType: access_control_1.sCredentialType.nullable(),
43
- allowed: zod_1.z.boolean(),
44
- doorExit: zod_1.z.boolean(),
45
- description: zod_1.z.string(),
46
- });
47
- exports.sDoorOpened = zod_1.z.object({
48
- kind: zod_1.z.literal('door-opened'),
49
- });
50
- exports.sDoorClosed = zod_1.z.object({
51
- kind: zod_1.z.literal('door-closed'),
52
- });
53
- exports.sDoorForceEvent = zod_1.z.object({
54
- kind: zod_1.z.literal('door-force'),
55
- });
56
- exports.sDoorTamperEvent = zod_1.z.object({
57
- kind: zod_1.z.literal('door-tamper'),
58
- });
59
- exports.sDoorLeftOpenEvent = zod_1.z.object({
60
- kind: zod_1.z.literal('door-left-open'),
61
- });
62
- exports.sDoorRelockEvent = zod_1.z.object({
63
- kind: zod_1.z.literal('door-relock'),
64
- });
65
- exports.sDoorMainsFailedEvent = zod_1.z.object({
66
- kind: zod_1.z.literal('door-mains-failed'),
67
- });
68
- exports.sDoorAcuNotRespondingEvent = zod_1.z.object({
69
- kind: zod_1.z.literal('door-acu-not-responding'),
70
- });
71
- exports.sDoorMainsRestoredEvent = zod_1.z.object({
72
- kind: zod_1.z.literal('door-mains-restored'),
73
- });
74
- exports.sDoorAcuOnlineEvent = zod_1.z.object({
75
- kind: zod_1.z.literal('door-acu-online'),
76
- });
77
- exports.sDoorTamperRestoredEvent = zod_1.z.object({
78
- kind: zod_1.z.literal('door-tamper-restored'),
79
- });
80
- exports.doorEventSchemaByKind = {
81
- 'door-access': exports.sDoorAccessEvent,
82
- 'door-opened': exports.sDoorOpened,
83
- 'door-closed': exports.sDoorClosed,
84
- 'door-force': exports.sDoorForceEvent,
85
- 'door-tamper': exports.sDoorTamperEvent,
86
- 'door-left-open': exports.sDoorLeftOpenEvent,
87
- 'door-relock': exports.sDoorRelockEvent,
88
- 'door-mains-failed': exports.sDoorMainsFailedEvent,
89
- 'door-acu-not-responding': exports.sDoorAcuNotRespondingEvent,
90
- 'door-mains-restored': exports.sDoorMainsRestoredEvent,
91
- 'door-acu-online': exports.sDoorAcuOnlineEvent,
92
- 'door-tamper-restored': exports.sDoorTamperRestoredEvent,
93
- };
@@ -1,7 +1,7 @@
1
1
  export * from './camera';
2
2
  export * from './door';
3
3
  export * from './any-device';
4
- export * from './reader/index';
4
+ export * from './reader';
5
5
  export * from './io-board';
6
6
  export * from './camera-lift';
7
7
  export * from './motion-sensor';
@@ -17,7 +17,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./camera"), exports);
18
18
  __exportStar(require("./door"), exports);
19
19
  __exportStar(require("./any-device"), exports);
20
- __exportStar(require("./reader/index"), exports);
20
+ __exportStar(require("./reader"), exports);
21
21
  __exportStar(require("./io-board"), exports);
22
22
  __exportStar(require("./camera-lift"), exports);
23
23
  __exportStar(require("./motion-sensor"), exports);
@@ -2,4 +2,3 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.INTERCOM_OPERATOR = void 0;
4
4
  exports.INTERCOM_OPERATOR = 'intercom-operator';
5
- // EVENTS
@@ -64,47 +64,6 @@ export declare const sAddIntercomTerminal: z.ZodObject<{
64
64
  }>;
65
65
  export type IntercomTerminalSpecs = z.infer<typeof sIntercomTerminalSpecs>;
66
66
  export type AddIntercomTerminalRequest = z.infer<typeof sAddIntercomTerminal>;
67
- export interface IntercomConnectCommand {
68
- command: 'intercom-terminal.connect';
69
- params: {
70
- clientId: number;
71
- };
72
- }
73
- export interface IntercomDisconnectCommand {
74
- command: 'intercom-terminal.disconnect';
75
- params: {
76
- clientId: number;
77
- };
78
- }
79
- export interface IntercomDialCommand {
80
- command: 'intercom-terminal.dial';
81
- params: {
82
- callId: string;
83
- offerSdp: string;
84
- };
85
- }
86
- export interface IntercomCancelCallCommand {
87
- command: 'intercom-terminal.cancel-call';
88
- params: {
89
- callId: string;
90
- };
91
- }
92
- export interface IntercomAnswerCallCommand {
93
- command: 'intercom-terminal.answer';
94
- params: {
95
- callId: string;
96
- userAgentId: string;
97
- answerSdp: string;
98
- };
99
- }
100
- export interface IntercomHangUpCommand {
101
- command: 'intercom-terminal.hang-up';
102
- params: {
103
- callId: string;
104
- };
105
- }
106
- export type IntercomTerminalCommand = IntercomConnectCommand | IntercomDisconnectCommand | IntercomDialCommand | IntercomCancelCallCommand | IntercomAnswerCallCommand | IntercomHangUpCommand;
107
- export declare const sCallState: z.ZodEnum<["connecting", "connected", "ringing", "terminated"]>;
108
67
  export declare const sIntercomTerminalState: z.ZodObject<{
109
68
  callState: z.ZodNullable<z.ZodEnum<["connecting", "connected", "ringing", "terminated"]>>;
110
69
  connected: z.ZodBoolean;
@@ -122,63 +81,3 @@ export declare const sIntercomTerminalState: z.ZodObject<{
122
81
  peer: string | null;
123
82
  }>;
124
83
  export type IntercomTerminalStateDto = z.infer<typeof sIntercomTerminalState>;
125
- export declare const sCallStateChanged: z.ZodObject<{
126
- kind: z.ZodLiteral<"call-state-changed">;
127
- userId: z.ZodOptional<z.ZodString>;
128
- callId: z.ZodString;
129
- state: z.ZodEnum<["connecting", "connected", "ringing", "terminated"]>;
130
- peer: z.ZodOptional<z.ZodString>;
131
- sipAccount: z.ZodOptional<z.ZodString>;
132
- sipCallId: z.ZodOptional<z.ZodString>;
133
- direction: z.ZodEnum<["incoming", "outgoing"]>;
134
- }, "strip", z.ZodTypeAny, {
135
- state: "connected" | "connecting" | "ringing" | "terminated";
136
- direction: "incoming" | "outgoing";
137
- kind: "call-state-changed";
138
- callId: string;
139
- peer?: string | undefined;
140
- userId?: string | undefined;
141
- sipAccount?: string | undefined;
142
- sipCallId?: string | undefined;
143
- }, {
144
- state: "connected" | "connecting" | "ringing" | "terminated";
145
- direction: "incoming" | "outgoing";
146
- kind: "call-state-changed";
147
- callId: string;
148
- peer?: string | undefined;
149
- userId?: string | undefined;
150
- sipAccount?: string | undefined;
151
- sipCallId?: string | undefined;
152
- }>;
153
- export declare const intercomTerminalEventSchemaByKind: {
154
- 'call-state-changed': z.ZodObject<{
155
- kind: z.ZodLiteral<"call-state-changed">;
156
- userId: z.ZodOptional<z.ZodString>;
157
- callId: z.ZodString;
158
- state: z.ZodEnum<["connecting", "connected", "ringing", "terminated"]>;
159
- peer: z.ZodOptional<z.ZodString>;
160
- sipAccount: z.ZodOptional<z.ZodString>;
161
- sipCallId: z.ZodOptional<z.ZodString>;
162
- direction: z.ZodEnum<["incoming", "outgoing"]>;
163
- }, "strip", z.ZodTypeAny, {
164
- state: "connected" | "connecting" | "ringing" | "terminated";
165
- direction: "incoming" | "outgoing";
166
- kind: "call-state-changed";
167
- callId: string;
168
- peer?: string | undefined;
169
- userId?: string | undefined;
170
- sipAccount?: string | undefined;
171
- sipCallId?: string | undefined;
172
- }, {
173
- state: "connected" | "connecting" | "ringing" | "terminated";
174
- direction: "incoming" | "outgoing";
175
- kind: "call-state-changed";
176
- callId: string;
177
- peer?: string | undefined;
178
- userId?: string | undefined;
179
- sipAccount?: string | undefined;
180
- sipCallId?: string | undefined;
181
- }>;
182
- };
183
- export type CallStateChangedEvent = z.infer<typeof sCallStateChanged>;
184
- export type IntercomTerminalEvent = CallStateChangedEvent;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.intercomTerminalEventSchemaByKind = exports.sCallStateChanged = exports.sIntercomTerminalState = exports.sCallState = exports.sAddIntercomTerminal = exports.sIntercomTerminalSpecs = exports.INTERCOM_TERMINAL = void 0;
3
+ exports.sIntercomTerminalState = exports.sAddIntercomTerminal = exports.sIntercomTerminalSpecs = exports.INTERCOM_TERMINAL = void 0;
4
4
  const zod_1 = require("zod");
5
5
  exports.INTERCOM_TERMINAL = 'intercom-terminal';
6
6
  // SPECS
@@ -17,62 +17,10 @@ exports.sAddIntercomTerminal = zod_1.z.object({
17
17
  specs: exports.sIntercomTerminalSpecs,
18
18
  });
19
19
  // STATE
20
- exports.sCallState = zod_1.z.enum([
21
- 'connecting',
22
- 'connected',
23
- 'ringing',
24
- 'terminated',
25
- ]);
26
- const sCallDirection = zod_1.z.enum(['incoming', 'outgoing']);
20
+ const sCallState = zod_1.z.enum(['connecting', 'connected', 'ringing', 'terminated']);
27
21
  exports.sIntercomTerminalState = zod_1.z.object({
28
- callState: exports.sCallState.nullable(),
22
+ callState: sCallState.nullable(),
29
23
  connected: zod_1.z.boolean(),
30
24
  callId: zod_1.z.string().nullable(),
31
25
  peer: zod_1.z.string().nullable(),
32
26
  });
33
- // export interface IntercomTerminalStateDto {
34
- // connected: boolean;
35
- // clientId: number | null;
36
- // callId: string | null;
37
- // userAgentId: string | null;
38
- // offerSdp: string | null;
39
- // answerSdp: string | null;
40
- // callState: 'idle' | 'ringing' | 'active';
41
- // }
42
- // EVENTS
43
- exports.sCallStateChanged = zod_1.z.object({
44
- kind: zod_1.z.literal('call-state-changed'),
45
- userId: zod_1.z.string().optional(),
46
- callId: zod_1.z.string().nonempty(),
47
- state: exports.sCallState,
48
- peer: zod_1.z.string().optional(),
49
- sipAccount: zod_1.z.string().optional(),
50
- sipCallId: zod_1.z.string().optional(),
51
- direction: sCallDirection,
52
- });
53
- // export const sIntercomCallEvent = z.object({
54
- // kind: z.literal('intercom-call'),
55
- // userId: z.string().optional(),
56
- // personId: z.string().optional(),
57
- // callId: z.string().nonempty(),
58
- // offerSdp: z.string().nonempty(),
59
- // });
60
- // export const sIntercomCallCancelledEvent = z.object({
61
- // kind: z.literal('intercom-call-cancelled'),
62
- // userId: z.string().optional(),
63
- // callId: z.string().nonempty(),
64
- // });
65
- // export const sIntercomCallAnsweredEvent = z.object({
66
- // kind: z.literal('intercom-call-answered'),
67
- // userId: z.string().optional(),
68
- // userAgentId: z.string().nonempty(),
69
- // callId: z.string().nonempty(),
70
- // answerSdp: z.string().nonempty(),
71
- // });
72
- // export const sIntercomCallEndedEvent = z.object({
73
- // kind: z.literal('intercom-call-ended'),
74
- // callId: z.string().nonempty(),
75
- // });
76
- exports.intercomTerminalEventSchemaByKind = {
77
- 'call-state-changed': exports.sCallStateChanged,
78
- };