@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.
- package/dist/access-control/access-rule.d.ts +243 -0
- package/dist/access-control/access-rule.js +49 -0
- package/dist/access-control/credential.d.ts +14 -0
- package/dist/access-control/credential.js +12 -0
- package/dist/access-control/index.d.ts +7 -0
- package/dist/access-control/index.js +23 -0
- package/dist/access-control/person-presence.d.ts +249 -0
- package/dist/access-control/person-presence.js +61 -0
- package/dist/access-control/person.d.ts +209 -0
- package/dist/access-control/person.js +49 -0
- package/dist/access-control/schedule.d.ts +500 -0
- package/dist/access-control/schedule.js +65 -0
- package/dist/access-control/sync.d.ts +3 -0
- package/dist/access-control/sync.js +2 -0
- package/dist/access-control/zone.d.ts +65 -0
- package/dist/access-control/zone.js +28 -0
- package/dist/agent-communication/index.d.ts +1 -0
- package/dist/agent-communication/index.js +17 -0
- package/dist/agent-communication/protocol.d.ts +1692 -0
- package/dist/agent-communication/protocol.js +341 -0
- package/dist/api/alarm.d.ts +23 -0
- package/dist/api/alarm.js +2 -0
- package/dist/api/auth.d.ts +31 -0
- package/dist/api/auth.js +19 -0
- package/dist/api/index.d.ts +4 -0
- package/dist/api/index.js +20 -0
- package/dist/api/media.d.ts +187 -0
- package/dist/api/media.js +59 -0
- package/dist/api/query.d.ts +33 -0
- package/dist/api/query.js +41 -0
- package/dist/app.d.ts +12 -0
- package/dist/app.js +8 -0
- package/dist/automation.d.ts +334 -0
- package/dist/automation.js +49 -0
- package/dist/aware-config.d.ts +3 -0
- package/dist/aware-config.js +2 -0
- package/dist/custom-field.d.ts +52 -0
- package/dist/custom-field.js +19 -0
- package/dist/device/alarm.d.ts +265 -0
- package/dist/device/alarm.js +66 -0
- package/dist/device/any-device.d.ts +2376 -0
- package/dist/device/any-device.js +185 -0
- package/dist/device/camera-lift.d.ts +17 -0
- package/dist/device/camera-lift.js +7 -0
- package/dist/device/camera.d.ts +829 -0
- package/dist/device/camera.js +120 -0
- package/dist/device/device-gateway.d.ts +3 -0
- package/dist/device/device-gateway.js +4 -0
- package/dist/device/door.d.ts +217 -0
- package/dist/device/door.js +57 -0
- package/dist/device/index.d.ts +15 -0
- package/dist/device/index.js +31 -0
- package/dist/device/intercom-operator.d.ts +13 -0
- package/dist/device/intercom-operator.js +5 -0
- package/dist/device/intercom-terminal.d.ts +244 -0
- package/dist/device/intercom-terminal.js +48 -0
- package/dist/device/io-board.d.ts +55 -0
- package/dist/device/io-board.js +19 -0
- package/dist/device/motion-sensor.d.ts +8 -0
- package/dist/device/motion-sensor.js +8 -0
- package/dist/device/panic-button.d.ts +26 -0
- package/dist/device/panic-button.js +14 -0
- package/dist/device/pbx.d.ts +20 -0
- package/dist/device/pbx.js +11 -0
- package/dist/device/presence-tracker.d.ts +127 -0
- package/dist/device/presence-tracker.js +27 -0
- package/dist/device/reader/commands.d.ts +1 -0
- package/dist/device/reader/commands.js +2 -0
- package/dist/device/reader/events.d.ts +37 -0
- package/dist/device/reader/events.js +13 -0
- package/dist/device/reader/index.d.ts +3 -0
- package/dist/device/reader/index.js +19 -0
- package/dist/device/reader/specs.d.ts +2 -0
- package/dist/device/reader/specs.js +4 -0
- package/dist/device/server.d.ts +73 -0
- package/dist/device/server.js +33 -0
- package/dist/device-command.d.ts +23 -0
- package/dist/device-command.js +110 -0
- package/dist/device-event.d.ts +682 -0
- package/dist/device-event.js +87 -0
- package/dist/device-factory.d.ts +112 -0
- package/dist/device-factory.js +25 -0
- package/dist/device-group.d.ts +74 -0
- package/dist/device-group.js +31 -0
- package/dist/device-import.d.ts +1412 -0
- package/dist/device-import.js +33 -0
- package/dist/device-relation.d.ts +30 -0
- package/dist/device-relation.js +68 -0
- package/dist/device-state.d.ts +10 -0
- package/dist/device-state.js +2 -0
- package/dist/error.d.ts +13 -0
- package/dist/error.js +10 -0
- package/dist/file.d.ts +3 -0
- package/dist/file.js +2 -0
- package/dist/index.d.ts +28 -0
- package/dist/index.js +44 -0
- package/dist/layout.d.ts +188 -0
- package/dist/layout.js +40 -0
- package/dist/macros.d.ts +160 -0
- package/dist/macros.js +26 -0
- package/dist/messages/device-communication.d.ts +121 -0
- package/dist/messages/device-communication.js +63 -0
- package/dist/messages/index.d.ts +5 -0
- package/dist/messages/index.js +21 -0
- package/dist/messages/progress.d.ts +118 -0
- package/dist/messages/progress.js +51 -0
- package/dist/messages/provider-api/index.d.ts +1 -0
- package/dist/messages/provider-api/index.js +17 -0
- package/dist/messages/provider-api/sync-protocol.d.ts +83 -0
- package/dist/messages/provider-api/sync-protocol.js +2 -0
- package/dist/messages/web-rtc-signaling.d.ts +265 -0
- package/dist/messages/web-rtc-signaling.js +82 -0
- package/dist/messages/web-socket.d.ts +7 -0
- package/dist/messages/web-socket.js +5 -0
- package/dist/milestone.d.ts +5 -0
- package/dist/milestone.js +2 -0
- package/dist/module-config.d.ts +27 -0
- package/dist/module-config.js +2 -0
- package/dist/orchid.d.ts +19 -0
- package/dist/orchid.js +2 -0
- package/dist/package.json +40 -0
- package/dist/permissions.d.ts +6 -0
- package/dist/permissions.js +168 -0
- package/dist/template.d.ts +50 -0
- package/dist/template.js +21 -0
- package/dist/user.d.ts +184 -0
- package/dist/user.js +56 -0
- package/dist/view.d.ts +775 -0
- package/dist/view.js +74 -0
- package/dist/webrtc-playback.d.ts +20 -0
- package/dist/webrtc-playback.js +14 -0
- package/package.json +40 -0
|
@@ -0,0 +1,244 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const INTERCOM_TERMINAL: "intercom-terminal";
|
|
3
|
+
export declare const sIntercomTerminalSpecs: z.ZodObject<{
|
|
4
|
+
sipUri: z.ZodString;
|
|
5
|
+
sipUser: z.ZodString;
|
|
6
|
+
sipPassword: z.ZodString;
|
|
7
|
+
sipRealm: z.ZodString;
|
|
8
|
+
remoteExtension: z.ZodString;
|
|
9
|
+
}, "strip", z.ZodTypeAny, {
|
|
10
|
+
sipUri: string;
|
|
11
|
+
sipUser: string;
|
|
12
|
+
sipPassword: string;
|
|
13
|
+
sipRealm: string;
|
|
14
|
+
remoteExtension: string;
|
|
15
|
+
}, {
|
|
16
|
+
sipUri: string;
|
|
17
|
+
sipUser: string;
|
|
18
|
+
sipPassword: string;
|
|
19
|
+
sipRealm: string;
|
|
20
|
+
remoteExtension: string;
|
|
21
|
+
}>;
|
|
22
|
+
export declare const sAddIntercomTerminal: z.ZodObject<{
|
|
23
|
+
name: z.ZodString;
|
|
24
|
+
foreignRef: z.ZodString;
|
|
25
|
+
specs: z.ZodObject<{
|
|
26
|
+
sipUri: z.ZodString;
|
|
27
|
+
sipUser: z.ZodString;
|
|
28
|
+
sipPassword: z.ZodString;
|
|
29
|
+
sipRealm: z.ZodString;
|
|
30
|
+
remoteExtension: z.ZodString;
|
|
31
|
+
}, "strip", z.ZodTypeAny, {
|
|
32
|
+
sipUri: string;
|
|
33
|
+
sipUser: string;
|
|
34
|
+
sipPassword: string;
|
|
35
|
+
sipRealm: string;
|
|
36
|
+
remoteExtension: string;
|
|
37
|
+
}, {
|
|
38
|
+
sipUri: string;
|
|
39
|
+
sipUser: string;
|
|
40
|
+
sipPassword: string;
|
|
41
|
+
sipRealm: string;
|
|
42
|
+
remoteExtension: string;
|
|
43
|
+
}>;
|
|
44
|
+
}, "strip", z.ZodTypeAny, {
|
|
45
|
+
name: string;
|
|
46
|
+
foreignRef: string;
|
|
47
|
+
specs: {
|
|
48
|
+
sipUri: string;
|
|
49
|
+
sipUser: string;
|
|
50
|
+
sipPassword: string;
|
|
51
|
+
sipRealm: string;
|
|
52
|
+
remoteExtension: string;
|
|
53
|
+
};
|
|
54
|
+
}, {
|
|
55
|
+
name: string;
|
|
56
|
+
foreignRef: string;
|
|
57
|
+
specs: {
|
|
58
|
+
sipUri: string;
|
|
59
|
+
sipUser: string;
|
|
60
|
+
sipPassword: string;
|
|
61
|
+
sipRealm: string;
|
|
62
|
+
remoteExtension: string;
|
|
63
|
+
};
|
|
64
|
+
}>;
|
|
65
|
+
export type IntercomTerminalSpecs = z.infer<typeof sIntercomTerminalSpecs>;
|
|
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 interface IntercomTerminalStateDto {
|
|
108
|
+
connected: boolean;
|
|
109
|
+
clientId: number | null;
|
|
110
|
+
callId: string | null;
|
|
111
|
+
userAgentId: string | null;
|
|
112
|
+
offerSdp: string | null;
|
|
113
|
+
answerSdp: string | null;
|
|
114
|
+
callState: 'idle' | 'ringing' | 'active';
|
|
115
|
+
}
|
|
116
|
+
export declare const sIntercomCallEvent: z.ZodObject<{
|
|
117
|
+
kind: z.ZodLiteral<"intercom-call">;
|
|
118
|
+
userId: z.ZodOptional<z.ZodString>;
|
|
119
|
+
personId: z.ZodOptional<z.ZodString>;
|
|
120
|
+
callId: z.ZodString;
|
|
121
|
+
offerSdp: z.ZodString;
|
|
122
|
+
}, "strip", z.ZodTypeAny, {
|
|
123
|
+
kind: "intercom-call";
|
|
124
|
+
callId: string;
|
|
125
|
+
offerSdp: string;
|
|
126
|
+
personId?: string | undefined;
|
|
127
|
+
userId?: string | undefined;
|
|
128
|
+
}, {
|
|
129
|
+
kind: "intercom-call";
|
|
130
|
+
callId: string;
|
|
131
|
+
offerSdp: string;
|
|
132
|
+
personId?: string | undefined;
|
|
133
|
+
userId?: string | undefined;
|
|
134
|
+
}>;
|
|
135
|
+
export declare const sIntercomCallCancelledEvent: z.ZodObject<{
|
|
136
|
+
kind: z.ZodLiteral<"intercom-call-cancelled">;
|
|
137
|
+
userId: z.ZodOptional<z.ZodString>;
|
|
138
|
+
callId: z.ZodString;
|
|
139
|
+
}, "strip", z.ZodTypeAny, {
|
|
140
|
+
kind: "intercom-call-cancelled";
|
|
141
|
+
callId: string;
|
|
142
|
+
userId?: string | undefined;
|
|
143
|
+
}, {
|
|
144
|
+
kind: "intercom-call-cancelled";
|
|
145
|
+
callId: string;
|
|
146
|
+
userId?: string | undefined;
|
|
147
|
+
}>;
|
|
148
|
+
export declare const sIntercomCallAnsweredEvent: z.ZodObject<{
|
|
149
|
+
kind: z.ZodLiteral<"intercom-call-answered">;
|
|
150
|
+
userId: z.ZodOptional<z.ZodString>;
|
|
151
|
+
userAgentId: z.ZodString;
|
|
152
|
+
callId: z.ZodString;
|
|
153
|
+
answerSdp: z.ZodString;
|
|
154
|
+
}, "strip", z.ZodTypeAny, {
|
|
155
|
+
kind: "intercom-call-answered";
|
|
156
|
+
callId: string;
|
|
157
|
+
userAgentId: string;
|
|
158
|
+
answerSdp: string;
|
|
159
|
+
userId?: string | undefined;
|
|
160
|
+
}, {
|
|
161
|
+
kind: "intercom-call-answered";
|
|
162
|
+
callId: string;
|
|
163
|
+
userAgentId: string;
|
|
164
|
+
answerSdp: string;
|
|
165
|
+
userId?: string | undefined;
|
|
166
|
+
}>;
|
|
167
|
+
export declare const sIntercomCallEndedEvent: z.ZodObject<{
|
|
168
|
+
kind: z.ZodLiteral<"intercom-call-ended">;
|
|
169
|
+
callId: z.ZodString;
|
|
170
|
+
}, "strip", z.ZodTypeAny, {
|
|
171
|
+
kind: "intercom-call-ended";
|
|
172
|
+
callId: string;
|
|
173
|
+
}, {
|
|
174
|
+
kind: "intercom-call-ended";
|
|
175
|
+
callId: string;
|
|
176
|
+
}>;
|
|
177
|
+
export declare const intercomTerminalEventSchemaByKind: {
|
|
178
|
+
'intercom-call': z.ZodObject<{
|
|
179
|
+
kind: z.ZodLiteral<"intercom-call">;
|
|
180
|
+
userId: z.ZodOptional<z.ZodString>;
|
|
181
|
+
personId: z.ZodOptional<z.ZodString>;
|
|
182
|
+
callId: z.ZodString;
|
|
183
|
+
offerSdp: z.ZodString;
|
|
184
|
+
}, "strip", z.ZodTypeAny, {
|
|
185
|
+
kind: "intercom-call";
|
|
186
|
+
callId: string;
|
|
187
|
+
offerSdp: string;
|
|
188
|
+
personId?: string | undefined;
|
|
189
|
+
userId?: string | undefined;
|
|
190
|
+
}, {
|
|
191
|
+
kind: "intercom-call";
|
|
192
|
+
callId: string;
|
|
193
|
+
offerSdp: string;
|
|
194
|
+
personId?: string | undefined;
|
|
195
|
+
userId?: string | undefined;
|
|
196
|
+
}>;
|
|
197
|
+
'intercom-call-cancelled': z.ZodObject<{
|
|
198
|
+
kind: z.ZodLiteral<"intercom-call-cancelled">;
|
|
199
|
+
userId: z.ZodOptional<z.ZodString>;
|
|
200
|
+
callId: z.ZodString;
|
|
201
|
+
}, "strip", z.ZodTypeAny, {
|
|
202
|
+
kind: "intercom-call-cancelled";
|
|
203
|
+
callId: string;
|
|
204
|
+
userId?: string | undefined;
|
|
205
|
+
}, {
|
|
206
|
+
kind: "intercom-call-cancelled";
|
|
207
|
+
callId: string;
|
|
208
|
+
userId?: string | undefined;
|
|
209
|
+
}>;
|
|
210
|
+
'intercom-call-answered': z.ZodObject<{
|
|
211
|
+
kind: z.ZodLiteral<"intercom-call-answered">;
|
|
212
|
+
userId: z.ZodOptional<z.ZodString>;
|
|
213
|
+
userAgentId: z.ZodString;
|
|
214
|
+
callId: z.ZodString;
|
|
215
|
+
answerSdp: z.ZodString;
|
|
216
|
+
}, "strip", z.ZodTypeAny, {
|
|
217
|
+
kind: "intercom-call-answered";
|
|
218
|
+
callId: string;
|
|
219
|
+
userAgentId: string;
|
|
220
|
+
answerSdp: string;
|
|
221
|
+
userId?: string | undefined;
|
|
222
|
+
}, {
|
|
223
|
+
kind: "intercom-call-answered";
|
|
224
|
+
callId: string;
|
|
225
|
+
userAgentId: string;
|
|
226
|
+
answerSdp: string;
|
|
227
|
+
userId?: string | undefined;
|
|
228
|
+
}>;
|
|
229
|
+
'intercom-call-ended': z.ZodObject<{
|
|
230
|
+
kind: z.ZodLiteral<"intercom-call-ended">;
|
|
231
|
+
callId: z.ZodString;
|
|
232
|
+
}, "strip", z.ZodTypeAny, {
|
|
233
|
+
kind: "intercom-call-ended";
|
|
234
|
+
callId: string;
|
|
235
|
+
}, {
|
|
236
|
+
kind: "intercom-call-ended";
|
|
237
|
+
callId: string;
|
|
238
|
+
}>;
|
|
239
|
+
};
|
|
240
|
+
export type IntercomCallEvent = z.infer<typeof sIntercomCallEvent>;
|
|
241
|
+
export type IntercomCallCancelledEvent = z.infer<typeof sIntercomCallCancelledEvent>;
|
|
242
|
+
export type IntercomCallAnsweredEvent = z.infer<typeof sIntercomCallAnsweredEvent>;
|
|
243
|
+
export type IntercomCallEndedEvent = z.infer<typeof sIntercomCallEndedEvent>;
|
|
244
|
+
export type IntercomTerminalEvent = IntercomCallEvent | IntercomCallCancelledEvent | IntercomCallAnsweredEvent | IntercomCallEndedEvent;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.intercomTerminalEventSchemaByKind = exports.sIntercomCallEndedEvent = exports.sIntercomCallAnsweredEvent = exports.sIntercomCallCancelledEvent = exports.sIntercomCallEvent = exports.sAddIntercomTerminal = exports.sIntercomTerminalSpecs = exports.INTERCOM_TERMINAL = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
exports.INTERCOM_TERMINAL = 'intercom-terminal';
|
|
6
|
+
// SPECS
|
|
7
|
+
exports.sIntercomTerminalSpecs = zod_1.z.object({
|
|
8
|
+
sipUri: zod_1.z.string(),
|
|
9
|
+
sipUser: zod_1.z.string(),
|
|
10
|
+
sipPassword: zod_1.z.string(),
|
|
11
|
+
sipRealm: zod_1.z.string(),
|
|
12
|
+
remoteExtension: zod_1.z.string(),
|
|
13
|
+
});
|
|
14
|
+
exports.sAddIntercomTerminal = zod_1.z.object({
|
|
15
|
+
name: zod_1.z.string(),
|
|
16
|
+
foreignRef: zod_1.z.string(),
|
|
17
|
+
specs: exports.sIntercomTerminalSpecs,
|
|
18
|
+
});
|
|
19
|
+
// EVENTS
|
|
20
|
+
exports.sIntercomCallEvent = zod_1.z.object({
|
|
21
|
+
kind: zod_1.z.literal('intercom-call'),
|
|
22
|
+
userId: zod_1.z.string().optional(),
|
|
23
|
+
personId: zod_1.z.string().optional(),
|
|
24
|
+
callId: zod_1.z.string().nonempty(),
|
|
25
|
+
offerSdp: zod_1.z.string().nonempty(),
|
|
26
|
+
});
|
|
27
|
+
exports.sIntercomCallCancelledEvent = zod_1.z.object({
|
|
28
|
+
kind: zod_1.z.literal('intercom-call-cancelled'),
|
|
29
|
+
userId: zod_1.z.string().optional(),
|
|
30
|
+
callId: zod_1.z.string().nonempty(),
|
|
31
|
+
});
|
|
32
|
+
exports.sIntercomCallAnsweredEvent = zod_1.z.object({
|
|
33
|
+
kind: zod_1.z.literal('intercom-call-answered'),
|
|
34
|
+
userId: zod_1.z.string().optional(),
|
|
35
|
+
userAgentId: zod_1.z.string().nonempty(),
|
|
36
|
+
callId: zod_1.z.string().nonempty(),
|
|
37
|
+
answerSdp: zod_1.z.string().nonempty(),
|
|
38
|
+
});
|
|
39
|
+
exports.sIntercomCallEndedEvent = zod_1.z.object({
|
|
40
|
+
kind: zod_1.z.literal('intercom-call-ended'),
|
|
41
|
+
callId: zod_1.z.string().nonempty(),
|
|
42
|
+
});
|
|
43
|
+
exports.intercomTerminalEventSchemaByKind = {
|
|
44
|
+
'intercom-call': exports.sIntercomCallEvent,
|
|
45
|
+
'intercom-call-cancelled': exports.sIntercomCallCancelledEvent,
|
|
46
|
+
'intercom-call-answered': exports.sIntercomCallAnsweredEvent,
|
|
47
|
+
'intercom-call-ended': exports.sIntercomCallEndedEvent,
|
|
48
|
+
};
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const IO_BOARD: "io-board";
|
|
3
|
+
export declare const sIoBoardSpecs: z.ZodObject<{
|
|
4
|
+
inputs: z.ZodArray<z.ZodString, "many">;
|
|
5
|
+
outputs: z.ZodArray<z.ZodString, "many">;
|
|
6
|
+
}, "strip", z.ZodTypeAny, {
|
|
7
|
+
inputs: string[];
|
|
8
|
+
outputs: string[];
|
|
9
|
+
}, {
|
|
10
|
+
inputs: string[];
|
|
11
|
+
outputs: string[];
|
|
12
|
+
}>;
|
|
13
|
+
export type IoBoardSpecs = z.infer<typeof sIoBoardSpecs>;
|
|
14
|
+
export interface IoBoardSetOutputCommand {
|
|
15
|
+
command: 'io-board.set-output';
|
|
16
|
+
params: {
|
|
17
|
+
output: string;
|
|
18
|
+
value: boolean;
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
export type IoBoardCommand = IoBoardSetOutputCommand;
|
|
22
|
+
export interface IoBoardStateDto {
|
|
23
|
+
inputValues: Record<string, boolean>;
|
|
24
|
+
outputValues: Record<string, boolean>;
|
|
25
|
+
}
|
|
26
|
+
export declare const sIoBoardInputChangedEvent: z.ZodObject<{
|
|
27
|
+
kind: z.ZodLiteral<"io-board-input-changed">;
|
|
28
|
+
inputName: z.ZodString;
|
|
29
|
+
value: z.ZodBoolean;
|
|
30
|
+
}, "strip", z.ZodTypeAny, {
|
|
31
|
+
value: boolean;
|
|
32
|
+
kind: "io-board-input-changed";
|
|
33
|
+
inputName: string;
|
|
34
|
+
}, {
|
|
35
|
+
value: boolean;
|
|
36
|
+
kind: "io-board-input-changed";
|
|
37
|
+
inputName: string;
|
|
38
|
+
}>;
|
|
39
|
+
export declare const ioBoardEventSchemaByKind: {
|
|
40
|
+
readonly 'io-board-input-changed': z.ZodObject<{
|
|
41
|
+
kind: z.ZodLiteral<"io-board-input-changed">;
|
|
42
|
+
inputName: z.ZodString;
|
|
43
|
+
value: z.ZodBoolean;
|
|
44
|
+
}, "strip", z.ZodTypeAny, {
|
|
45
|
+
value: boolean;
|
|
46
|
+
kind: "io-board-input-changed";
|
|
47
|
+
inputName: string;
|
|
48
|
+
}, {
|
|
49
|
+
value: boolean;
|
|
50
|
+
kind: "io-board-input-changed";
|
|
51
|
+
inputName: string;
|
|
52
|
+
}>;
|
|
53
|
+
};
|
|
54
|
+
export type IoBoardInputChangedEvent = z.infer<typeof sIoBoardInputChangedEvent>;
|
|
55
|
+
export type IoBoardEvent = IoBoardInputChangedEvent;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ioBoardEventSchemaByKind = exports.sIoBoardInputChangedEvent = exports.sIoBoardSpecs = exports.IO_BOARD = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
exports.IO_BOARD = 'io-board';
|
|
6
|
+
// SPECS
|
|
7
|
+
exports.sIoBoardSpecs = zod_1.z.object({
|
|
8
|
+
inputs: zod_1.z.array(zod_1.z.string().nonempty()),
|
|
9
|
+
outputs: zod_1.z.array(zod_1.z.string().nonempty()),
|
|
10
|
+
});
|
|
11
|
+
// EVENTS
|
|
12
|
+
exports.sIoBoardInputChangedEvent = zod_1.z.object({
|
|
13
|
+
kind: zod_1.z.literal('io-board-input-changed'),
|
|
14
|
+
inputName: zod_1.z.string().nonempty(),
|
|
15
|
+
value: zod_1.z.boolean(),
|
|
16
|
+
});
|
|
17
|
+
exports.ioBoardEventSchemaByKind = {
|
|
18
|
+
'io-board-input-changed': exports.sIoBoardInputChangedEvent,
|
|
19
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const MOTION_SENSOR: "motion-sensor";
|
|
3
|
+
export declare const sMotionSensorSpecs: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
|
|
4
|
+
export type MotionSensorSpecs = z.infer<typeof sMotionSensorSpecs>;
|
|
5
|
+
export interface MotionSensorStateDto {
|
|
6
|
+
isMotionDetected: boolean;
|
|
7
|
+
connected: boolean;
|
|
8
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.sMotionSensorSpecs = exports.MOTION_SENSOR = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
exports.MOTION_SENSOR = 'motion-sensor';
|
|
6
|
+
// SPECS
|
|
7
|
+
exports.sMotionSensorSpecs = zod_1.z.object({});
|
|
8
|
+
// EVENTS
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const PANIC_BUTTON: "panic-button";
|
|
3
|
+
export declare const sPanicButtonSpecs: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
|
|
4
|
+
export type PanicButtonSpecs = z.infer<typeof sPanicButtonSpecs>;
|
|
5
|
+
export interface PanicButtonStateDto {
|
|
6
|
+
isPressed: boolean;
|
|
7
|
+
connected: boolean;
|
|
8
|
+
}
|
|
9
|
+
export declare const sPanicButtonPressedEvent: z.ZodObject<{
|
|
10
|
+
kind: z.ZodLiteral<"panic-button-pressed">;
|
|
11
|
+
}, "strip", z.ZodTypeAny, {
|
|
12
|
+
kind: "panic-button-pressed";
|
|
13
|
+
}, {
|
|
14
|
+
kind: "panic-button-pressed";
|
|
15
|
+
}>;
|
|
16
|
+
export declare const panicButtonEventSchemaByKind: {
|
|
17
|
+
readonly 'panic-button-pressed': z.ZodObject<{
|
|
18
|
+
kind: z.ZodLiteral<"panic-button-pressed">;
|
|
19
|
+
}, "strip", z.ZodTypeAny, {
|
|
20
|
+
kind: "panic-button-pressed";
|
|
21
|
+
}, {
|
|
22
|
+
kind: "panic-button-pressed";
|
|
23
|
+
}>;
|
|
24
|
+
};
|
|
25
|
+
export type PanicButtonPressedEvent = z.infer<typeof sPanicButtonPressedEvent>;
|
|
26
|
+
export type PanicButtonEvent = PanicButtonPressedEvent;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.panicButtonEventSchemaByKind = exports.sPanicButtonPressedEvent = exports.sPanicButtonSpecs = exports.PANIC_BUTTON = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
exports.PANIC_BUTTON = 'panic-button';
|
|
6
|
+
// SPECS
|
|
7
|
+
exports.sPanicButtonSpecs = zod_1.z.object({});
|
|
8
|
+
// EVENTS
|
|
9
|
+
exports.sPanicButtonPressedEvent = zod_1.z.object({
|
|
10
|
+
kind: zod_1.z.literal('panic-button-pressed'),
|
|
11
|
+
});
|
|
12
|
+
exports.panicButtonEventSchemaByKind = {
|
|
13
|
+
'panic-button-pressed': exports.sPanicButtonPressedEvent,
|
|
14
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const PBX: "pbx";
|
|
3
|
+
export declare const sPbxSpecs: z.ZodObject<{
|
|
4
|
+
sipWsUrl: z.ZodString;
|
|
5
|
+
}, "strip", z.ZodTypeAny, {
|
|
6
|
+
sipWsUrl: string;
|
|
7
|
+
}, {
|
|
8
|
+
sipWsUrl: string;
|
|
9
|
+
}>;
|
|
10
|
+
export type PbxSpecs = z.infer<typeof sPbxSpecs>;
|
|
11
|
+
export interface PbxCallCommand {
|
|
12
|
+
command: 'pbx.call';
|
|
13
|
+
params: {
|
|
14
|
+
endpoint: string;
|
|
15
|
+
soundFile: string;
|
|
16
|
+
context?: string;
|
|
17
|
+
callerId?: string;
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
export type PbxCommand = PbxCallCommand;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.sPbxSpecs = exports.PBX = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
exports.PBX = 'pbx';
|
|
6
|
+
// SPECS
|
|
7
|
+
exports.sPbxSpecs = zod_1.z.object({
|
|
8
|
+
sipWsUrl: zod_1.z.string(),
|
|
9
|
+
});
|
|
10
|
+
// STATE
|
|
11
|
+
// EVENTS
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const PRESENCE_TRACKER = "presence-tracker";
|
|
3
|
+
export interface PresenceTrackerState {
|
|
4
|
+
zonePeople: Record<string, string[]>;
|
|
5
|
+
}
|
|
6
|
+
export interface CheckInPerson {
|
|
7
|
+
command: 'presence-tracker.check-in';
|
|
8
|
+
params: {
|
|
9
|
+
personId: string;
|
|
10
|
+
zoneId: string | null;
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
export interface CheckOutPerson {
|
|
14
|
+
command: 'presence-tracker.check-out';
|
|
15
|
+
params: {
|
|
16
|
+
personId: string;
|
|
17
|
+
zoneId: string | null;
|
|
18
|
+
leave: boolean;
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
export interface TogglePresence {
|
|
22
|
+
command: 'presence-tracker.toggle-presence';
|
|
23
|
+
params: {
|
|
24
|
+
personId: string;
|
|
25
|
+
zoneId: string | null;
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
export type PresenceTrackerCommand = CheckInPerson | CheckOutPerson | TogglePresence;
|
|
29
|
+
export declare const sPersonIn: z.ZodObject<{
|
|
30
|
+
kind: z.ZodLiteral<"person-in">;
|
|
31
|
+
personId: z.ZodString;
|
|
32
|
+
personFirstName: z.ZodString;
|
|
33
|
+
personLastName: z.ZodString;
|
|
34
|
+
personAvatarId: z.ZodNullable<z.ZodString>;
|
|
35
|
+
zoneId: z.ZodNullable<z.ZodString>;
|
|
36
|
+
}, "strip", z.ZodTypeAny, {
|
|
37
|
+
kind: "person-in";
|
|
38
|
+
personId: string;
|
|
39
|
+
zoneId: string | null;
|
|
40
|
+
personFirstName: string;
|
|
41
|
+
personLastName: string;
|
|
42
|
+
personAvatarId: string | null;
|
|
43
|
+
}, {
|
|
44
|
+
kind: "person-in";
|
|
45
|
+
personId: string;
|
|
46
|
+
zoneId: string | null;
|
|
47
|
+
personFirstName: string;
|
|
48
|
+
personLastName: string;
|
|
49
|
+
personAvatarId: string | null;
|
|
50
|
+
}>;
|
|
51
|
+
export declare const sPersonOut: z.ZodObject<{
|
|
52
|
+
kind: z.ZodLiteral<"person-out">;
|
|
53
|
+
personId: z.ZodString;
|
|
54
|
+
personFirstName: z.ZodString;
|
|
55
|
+
personLastName: z.ZodString;
|
|
56
|
+
personAvatarId: z.ZodNullable<z.ZodString>;
|
|
57
|
+
isLeave: z.ZodBoolean;
|
|
58
|
+
zoneId: z.ZodNullable<z.ZodString>;
|
|
59
|
+
}, "strip", z.ZodTypeAny, {
|
|
60
|
+
kind: "person-out";
|
|
61
|
+
personId: string;
|
|
62
|
+
isLeave: boolean;
|
|
63
|
+
zoneId: string | null;
|
|
64
|
+
personFirstName: string;
|
|
65
|
+
personLastName: string;
|
|
66
|
+
personAvatarId: string | null;
|
|
67
|
+
}, {
|
|
68
|
+
kind: "person-out";
|
|
69
|
+
personId: string;
|
|
70
|
+
isLeave: boolean;
|
|
71
|
+
zoneId: string | null;
|
|
72
|
+
personFirstName: string;
|
|
73
|
+
personLastName: string;
|
|
74
|
+
personAvatarId: string | null;
|
|
75
|
+
}>;
|
|
76
|
+
export declare const presenceTrackerEventSchemaByKind: {
|
|
77
|
+
readonly 'person-in': z.ZodObject<{
|
|
78
|
+
kind: z.ZodLiteral<"person-in">;
|
|
79
|
+
personId: z.ZodString;
|
|
80
|
+
personFirstName: z.ZodString;
|
|
81
|
+
personLastName: z.ZodString;
|
|
82
|
+
personAvatarId: z.ZodNullable<z.ZodString>;
|
|
83
|
+
zoneId: z.ZodNullable<z.ZodString>;
|
|
84
|
+
}, "strip", z.ZodTypeAny, {
|
|
85
|
+
kind: "person-in";
|
|
86
|
+
personId: string;
|
|
87
|
+
zoneId: string | null;
|
|
88
|
+
personFirstName: string;
|
|
89
|
+
personLastName: string;
|
|
90
|
+
personAvatarId: string | null;
|
|
91
|
+
}, {
|
|
92
|
+
kind: "person-in";
|
|
93
|
+
personId: string;
|
|
94
|
+
zoneId: string | null;
|
|
95
|
+
personFirstName: string;
|
|
96
|
+
personLastName: string;
|
|
97
|
+
personAvatarId: string | null;
|
|
98
|
+
}>;
|
|
99
|
+
readonly 'person-out': z.ZodObject<{
|
|
100
|
+
kind: z.ZodLiteral<"person-out">;
|
|
101
|
+
personId: z.ZodString;
|
|
102
|
+
personFirstName: z.ZodString;
|
|
103
|
+
personLastName: z.ZodString;
|
|
104
|
+
personAvatarId: z.ZodNullable<z.ZodString>;
|
|
105
|
+
isLeave: z.ZodBoolean;
|
|
106
|
+
zoneId: z.ZodNullable<z.ZodString>;
|
|
107
|
+
}, "strip", z.ZodTypeAny, {
|
|
108
|
+
kind: "person-out";
|
|
109
|
+
personId: string;
|
|
110
|
+
isLeave: boolean;
|
|
111
|
+
zoneId: string | null;
|
|
112
|
+
personFirstName: string;
|
|
113
|
+
personLastName: string;
|
|
114
|
+
personAvatarId: string | null;
|
|
115
|
+
}, {
|
|
116
|
+
kind: "person-out";
|
|
117
|
+
personId: string;
|
|
118
|
+
isLeave: boolean;
|
|
119
|
+
zoneId: string | null;
|
|
120
|
+
personFirstName: string;
|
|
121
|
+
personLastName: string;
|
|
122
|
+
personAvatarId: string | null;
|
|
123
|
+
}>;
|
|
124
|
+
};
|
|
125
|
+
export type PersonIn = z.infer<typeof sPersonIn>;
|
|
126
|
+
export type PersonOut = z.infer<typeof sPersonOut>;
|
|
127
|
+
export type PresenceTrackerEvent = PersonIn | PersonOut;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.presenceTrackerEventSchemaByKind = exports.sPersonOut = exports.sPersonIn = exports.PRESENCE_TRACKER = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
exports.PRESENCE_TRACKER = 'presence-tracker';
|
|
6
|
+
// EVENTS
|
|
7
|
+
exports.sPersonIn = zod_1.z.object({
|
|
8
|
+
kind: zod_1.z.literal('person-in'),
|
|
9
|
+
personId: zod_1.z.string().nonempty(),
|
|
10
|
+
personFirstName: zod_1.z.string().nonempty(),
|
|
11
|
+
personLastName: zod_1.z.string().nonempty(),
|
|
12
|
+
personAvatarId: zod_1.z.string().nullable(),
|
|
13
|
+
zoneId: zod_1.z.string().nullable(),
|
|
14
|
+
});
|
|
15
|
+
exports.sPersonOut = zod_1.z.object({
|
|
16
|
+
kind: zod_1.z.literal('person-out'),
|
|
17
|
+
personId: zod_1.z.string().nonempty(),
|
|
18
|
+
personFirstName: zod_1.z.string().nonempty(),
|
|
19
|
+
personLastName: zod_1.z.string().nonempty(),
|
|
20
|
+
personAvatarId: zod_1.z.string().nullable(),
|
|
21
|
+
isLeave: zod_1.z.boolean(),
|
|
22
|
+
zoneId: zod_1.z.string().nullable(),
|
|
23
|
+
});
|
|
24
|
+
exports.presenceTrackerEventSchemaByKind = {
|
|
25
|
+
'person-in': exports.sPersonIn,
|
|
26
|
+
'person-out': exports.sPersonOut,
|
|
27
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type ReaderCommand = never;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const sTokenAuthorized: z.ZodObject<{
|
|
3
|
+
kind: z.ZodLiteral<"reader-auth">;
|
|
4
|
+
token: z.ZodNullable<z.ZodString>;
|
|
5
|
+
personId: z.ZodOptional<z.ZodString>;
|
|
6
|
+
allowed: z.ZodBoolean;
|
|
7
|
+
}, "strip", z.ZodTypeAny, {
|
|
8
|
+
kind: "reader-auth";
|
|
9
|
+
token: string | null;
|
|
10
|
+
allowed: boolean;
|
|
11
|
+
personId?: string | undefined;
|
|
12
|
+
}, {
|
|
13
|
+
kind: "reader-auth";
|
|
14
|
+
token: string | null;
|
|
15
|
+
allowed: boolean;
|
|
16
|
+
personId?: string | undefined;
|
|
17
|
+
}>;
|
|
18
|
+
export type TokenAuthorized = z.infer<typeof sTokenAuthorized>;
|
|
19
|
+
export declare const readerEventSchemaByKind: {
|
|
20
|
+
readonly 'reader-auth': z.ZodObject<{
|
|
21
|
+
kind: z.ZodLiteral<"reader-auth">;
|
|
22
|
+
token: z.ZodNullable<z.ZodString>;
|
|
23
|
+
personId: z.ZodOptional<z.ZodString>;
|
|
24
|
+
allowed: z.ZodBoolean;
|
|
25
|
+
}, "strip", z.ZodTypeAny, {
|
|
26
|
+
kind: "reader-auth";
|
|
27
|
+
token: string | null;
|
|
28
|
+
allowed: boolean;
|
|
29
|
+
personId?: string | undefined;
|
|
30
|
+
}, {
|
|
31
|
+
kind: "reader-auth";
|
|
32
|
+
token: string | null;
|
|
33
|
+
allowed: boolean;
|
|
34
|
+
personId?: string | undefined;
|
|
35
|
+
}>;
|
|
36
|
+
};
|
|
37
|
+
export type ReaderEvent = TokenAuthorized;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.readerEventSchemaByKind = exports.sTokenAuthorized = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
exports.sTokenAuthorized = zod_1.z.object({
|
|
6
|
+
kind: zod_1.z.literal('reader-auth'),
|
|
7
|
+
token: zod_1.z.string().nullable(),
|
|
8
|
+
personId: zod_1.z.string().optional(),
|
|
9
|
+
allowed: zod_1.z.boolean(),
|
|
10
|
+
});
|
|
11
|
+
exports.readerEventSchemaByKind = {
|
|
12
|
+
'reader-auth': exports.sTokenAuthorized,
|
|
13
|
+
};
|