@awarevue/api-types 1.0.108 → 1.0.109
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/person-presence.d.ts +4 -4
- package/dist/agent-communication/protocol.d.ts +49 -28
- package/dist/agent-communication/queries.d.ts +6 -6
- package/dist/bookmarks.d.ts +10 -10
- package/dist/device/alarm.d.ts +317 -54
- package/dist/device/alarm.js +59 -1
- package/dist/device/any-device.d.ts +39 -0
- package/dist/device/camera-lift.d.ts +44 -8
- package/dist/device/camera-lift.js +14 -1
- package/dist/device/camera.d.ts +449 -40
- package/dist/device/camera.js +89 -1
- package/dist/device/display.d.ts +416 -9
- package/dist/device/display.js +34 -1
- package/dist/device/door.d.ts +102 -17
- package/dist/device/door.js +30 -2
- package/dist/device/intercom-terminal.d.ts +2 -2
- package/dist/device/io-board.d.ts +49 -3
- package/dist/device/io-board.js +12 -1
- package/dist/device/pbx.d.ts +69 -5
- package/dist/device/pbx.js +14 -1
- package/dist/device/presence-tracker.d.ts +164 -21
- package/dist/device/presence-tracker.js +32 -3
- package/dist/device/server.d.ts +44 -7
- package/dist/device/server.js +13 -1
- package/dist/device-command.d.ts +741 -0
- package/dist/device-command.js +19 -1
- package/dist/device-event.d.ts +20 -20
- package/dist/device-import.d.ts +76 -0
- package/dist/macros.d.ts +14 -14
- package/dist/messages/device-communication.d.ts +10 -10
- package/dist/package.json +1 -1
- package/dist/primitives.d.ts +9 -0
- package/dist/primitives.js +13 -0
- package/package.json +1 -1
package/dist/device/door.d.ts
CHANGED
|
@@ -1,23 +1,108 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
export declare const DOOR: "door";
|
|
3
|
-
export declare const sDoorSpecs: z.ZodObject<{
|
|
3
|
+
export declare const sDoorSpecs: z.ZodObject<{
|
|
4
|
+
canReportOpenState: z.ZodBoolean;
|
|
5
|
+
canReportLockState: z.ZodBoolean;
|
|
6
|
+
canControlLock: z.ZodBoolean;
|
|
7
|
+
canRelease: z.ZodBoolean;
|
|
8
|
+
}, "strip", z.ZodTypeAny, {
|
|
9
|
+
canReportOpenState: boolean;
|
|
10
|
+
canReportLockState: boolean;
|
|
11
|
+
canControlLock: boolean;
|
|
12
|
+
canRelease: boolean;
|
|
13
|
+
}, {
|
|
14
|
+
canReportOpenState: boolean;
|
|
15
|
+
canReportLockState: boolean;
|
|
16
|
+
canControlLock: boolean;
|
|
17
|
+
canRelease: boolean;
|
|
18
|
+
}>;
|
|
4
19
|
export type DoorSpecs = z.infer<typeof sDoorSpecs>;
|
|
5
|
-
export
|
|
6
|
-
command:
|
|
7
|
-
params:
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
command:
|
|
11
|
-
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
}
|
|
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
|
+
};
|
|
21
106
|
export type DoorCommand = DoorUnlockCommand | DoorLockCommand | DoorReleaseCommand | DoorAlarmAckCommand;
|
|
22
107
|
export interface DoorStateDto {
|
|
23
108
|
locked: boolean;
|
package/dist/device/door.js
CHANGED
|
@@ -1,11 +1,39 @@
|
|
|
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.sDoorSpecs = exports.DOOR = void 0;
|
|
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
4
|
const access_control_1 = require("../access-control");
|
|
5
5
|
const zod_1 = require("zod");
|
|
6
6
|
exports.DOOR = 'door';
|
|
7
7
|
// SPECS
|
|
8
|
-
exports.sDoorSpecs = zod_1.z.object({
|
|
8
|
+
exports.sDoorSpecs = zod_1.z.object({
|
|
9
|
+
canReportOpenState: zod_1.z.boolean(),
|
|
10
|
+
canReportLockState: zod_1.z.boolean(),
|
|
11
|
+
canControlLock: zod_1.z.boolean(),
|
|
12
|
+
canRelease: zod_1.z.boolean(),
|
|
13
|
+
});
|
|
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
|
+
};
|
|
9
37
|
// EVENTS
|
|
10
38
|
exports.sDoorAccessEvent = zod_1.z.object({
|
|
11
39
|
kind: zod_1.z.literal('door-access'),
|
|
@@ -112,14 +112,14 @@ export declare const sIntercomTerminalState: z.ZodObject<{
|
|
|
112
112
|
peer: z.ZodNullable<z.ZodString>;
|
|
113
113
|
}, "strip", z.ZodTypeAny, {
|
|
114
114
|
connected: boolean;
|
|
115
|
+
callState: "connected" | "connecting" | "ringing" | "terminated" | null;
|
|
115
116
|
callId: string | null;
|
|
116
117
|
peer: string | null;
|
|
117
|
-
callState: "connected" | "connecting" | "ringing" | "terminated" | null;
|
|
118
118
|
}, {
|
|
119
119
|
connected: boolean;
|
|
120
|
+
callState: "connected" | "connecting" | "ringing" | "terminated" | null;
|
|
120
121
|
callId: string | null;
|
|
121
122
|
peer: string | null;
|
|
122
|
-
callState: "connected" | "connecting" | "ringing" | "terminated" | null;
|
|
123
123
|
}>;
|
|
124
124
|
export type IntercomTerminalStateDto = z.infer<typeof sIntercomTerminalState>;
|
|
125
125
|
export declare const sCallStateChanged: z.ZodObject<{
|
|
@@ -11,13 +11,59 @@ export declare const sIoBoardSpecs: z.ZodObject<{
|
|
|
11
11
|
outputs: string[];
|
|
12
12
|
}>;
|
|
13
13
|
export type IoBoardSpecs = z.infer<typeof sIoBoardSpecs>;
|
|
14
|
-
export
|
|
15
|
-
command:
|
|
14
|
+
export declare const sIoBoardSetOutputCommand: z.ZodObject<{
|
|
15
|
+
command: z.ZodLiteral<"io-board.set-output">;
|
|
16
|
+
params: z.ZodObject<{
|
|
17
|
+
output: z.ZodString;
|
|
18
|
+
value: z.ZodBoolean;
|
|
19
|
+
}, "strip", z.ZodTypeAny, {
|
|
20
|
+
value: boolean;
|
|
21
|
+
output: string;
|
|
22
|
+
}, {
|
|
23
|
+
value: boolean;
|
|
24
|
+
output: string;
|
|
25
|
+
}>;
|
|
26
|
+
}, "strip", z.ZodTypeAny, {
|
|
16
27
|
params: {
|
|
28
|
+
value: boolean;
|
|
17
29
|
output: string;
|
|
30
|
+
};
|
|
31
|
+
command: "io-board.set-output";
|
|
32
|
+
}, {
|
|
33
|
+
params: {
|
|
18
34
|
value: boolean;
|
|
35
|
+
output: string;
|
|
19
36
|
};
|
|
20
|
-
|
|
37
|
+
command: "io-board.set-output";
|
|
38
|
+
}>;
|
|
39
|
+
export declare const ioBoardCommands: {
|
|
40
|
+
readonly 'io-board.set-output': z.ZodObject<{
|
|
41
|
+
command: z.ZodLiteral<"io-board.set-output">;
|
|
42
|
+
params: z.ZodObject<{
|
|
43
|
+
output: z.ZodString;
|
|
44
|
+
value: z.ZodBoolean;
|
|
45
|
+
}, "strip", z.ZodTypeAny, {
|
|
46
|
+
value: boolean;
|
|
47
|
+
output: string;
|
|
48
|
+
}, {
|
|
49
|
+
value: boolean;
|
|
50
|
+
output: string;
|
|
51
|
+
}>;
|
|
52
|
+
}, "strip", z.ZodTypeAny, {
|
|
53
|
+
params: {
|
|
54
|
+
value: boolean;
|
|
55
|
+
output: string;
|
|
56
|
+
};
|
|
57
|
+
command: "io-board.set-output";
|
|
58
|
+
}, {
|
|
59
|
+
params: {
|
|
60
|
+
value: boolean;
|
|
61
|
+
output: string;
|
|
62
|
+
};
|
|
63
|
+
command: "io-board.set-output";
|
|
64
|
+
}>;
|
|
65
|
+
};
|
|
66
|
+
export type IoBoardSetOutputCommand = z.infer<typeof sIoBoardSetOutputCommand>;
|
|
21
67
|
export type IoBoardCommand = IoBoardSetOutputCommand;
|
|
22
68
|
export interface IoBoardStateDto {
|
|
23
69
|
connected: boolean;
|
package/dist/device/io-board.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ioBoardEventSchemaByKind = exports.sIoBoardInputChangedEvent = exports.sIoBoardSpecs = exports.IO_BOARD = void 0;
|
|
3
|
+
exports.ioBoardEventSchemaByKind = exports.sIoBoardInputChangedEvent = exports.ioBoardCommands = exports.sIoBoardSetOutputCommand = exports.sIoBoardSpecs = exports.IO_BOARD = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
exports.IO_BOARD = 'io-board';
|
|
6
6
|
// SPECS
|
|
@@ -8,6 +8,17 @@ exports.sIoBoardSpecs = zod_1.z.object({
|
|
|
8
8
|
inputs: zod_1.z.array(zod_1.z.string().nonempty()),
|
|
9
9
|
outputs: zod_1.z.array(zod_1.z.string().nonempty()),
|
|
10
10
|
});
|
|
11
|
+
// COMMANDS
|
|
12
|
+
exports.sIoBoardSetOutputCommand = zod_1.z.object({
|
|
13
|
+
command: zod_1.z.literal('io-board.set-output'),
|
|
14
|
+
params: zod_1.z.object({
|
|
15
|
+
output: zod_1.z.string().nonempty(),
|
|
16
|
+
value: zod_1.z.boolean(),
|
|
17
|
+
}),
|
|
18
|
+
});
|
|
19
|
+
exports.ioBoardCommands = {
|
|
20
|
+
'io-board.set-output': exports.sIoBoardSetOutputCommand,
|
|
21
|
+
};
|
|
11
22
|
// EVENTS
|
|
12
23
|
exports.sIoBoardInputChangedEvent = zod_1.z.object({
|
|
13
24
|
kind: zod_1.z.literal('io-board-input-changed'),
|
package/dist/device/pbx.d.ts
CHANGED
|
@@ -8,13 +8,77 @@ export declare const sPbxSpecs: z.ZodObject<{
|
|
|
8
8
|
sipWsUrl: string;
|
|
9
9
|
}>;
|
|
10
10
|
export type PbxSpecs = z.infer<typeof sPbxSpecs>;
|
|
11
|
-
export
|
|
12
|
-
command:
|
|
11
|
+
export declare const sPbxCallCommand: z.ZodObject<{
|
|
12
|
+
command: z.ZodLiteral<"pbx.call">;
|
|
13
|
+
params: z.ZodObject<{
|
|
14
|
+
endpoint: z.ZodString;
|
|
15
|
+
soundFile: z.ZodString;
|
|
16
|
+
context: z.ZodOptional<z.ZodString>;
|
|
17
|
+
callerId: z.ZodOptional<z.ZodString>;
|
|
18
|
+
}, "strip", z.ZodTypeAny, {
|
|
19
|
+
endpoint: string;
|
|
20
|
+
soundFile: string;
|
|
21
|
+
context?: string | undefined;
|
|
22
|
+
callerId?: string | undefined;
|
|
23
|
+
}, {
|
|
24
|
+
endpoint: string;
|
|
25
|
+
soundFile: string;
|
|
26
|
+
context?: string | undefined;
|
|
27
|
+
callerId?: string | undefined;
|
|
28
|
+
}>;
|
|
29
|
+
}, "strip", z.ZodTypeAny, {
|
|
13
30
|
params: {
|
|
14
31
|
endpoint: string;
|
|
15
32
|
soundFile: string;
|
|
16
|
-
context?: string;
|
|
17
|
-
callerId?: string;
|
|
33
|
+
context?: string | undefined;
|
|
34
|
+
callerId?: string | undefined;
|
|
18
35
|
};
|
|
19
|
-
|
|
36
|
+
command: "pbx.call";
|
|
37
|
+
}, {
|
|
38
|
+
params: {
|
|
39
|
+
endpoint: string;
|
|
40
|
+
soundFile: string;
|
|
41
|
+
context?: string | undefined;
|
|
42
|
+
callerId?: string | undefined;
|
|
43
|
+
};
|
|
44
|
+
command: "pbx.call";
|
|
45
|
+
}>;
|
|
46
|
+
export declare const pbxCommands: {
|
|
47
|
+
readonly 'pbx.call': z.ZodObject<{
|
|
48
|
+
command: z.ZodLiteral<"pbx.call">;
|
|
49
|
+
params: z.ZodObject<{
|
|
50
|
+
endpoint: z.ZodString;
|
|
51
|
+
soundFile: z.ZodString;
|
|
52
|
+
context: z.ZodOptional<z.ZodString>;
|
|
53
|
+
callerId: z.ZodOptional<z.ZodString>;
|
|
54
|
+
}, "strip", z.ZodTypeAny, {
|
|
55
|
+
endpoint: string;
|
|
56
|
+
soundFile: string;
|
|
57
|
+
context?: string | undefined;
|
|
58
|
+
callerId?: string | undefined;
|
|
59
|
+
}, {
|
|
60
|
+
endpoint: string;
|
|
61
|
+
soundFile: string;
|
|
62
|
+
context?: string | undefined;
|
|
63
|
+
callerId?: string | undefined;
|
|
64
|
+
}>;
|
|
65
|
+
}, "strip", z.ZodTypeAny, {
|
|
66
|
+
params: {
|
|
67
|
+
endpoint: string;
|
|
68
|
+
soundFile: string;
|
|
69
|
+
context?: string | undefined;
|
|
70
|
+
callerId?: string | undefined;
|
|
71
|
+
};
|
|
72
|
+
command: "pbx.call";
|
|
73
|
+
}, {
|
|
74
|
+
params: {
|
|
75
|
+
endpoint: string;
|
|
76
|
+
soundFile: string;
|
|
77
|
+
context?: string | undefined;
|
|
78
|
+
callerId?: string | undefined;
|
|
79
|
+
};
|
|
80
|
+
command: "pbx.call";
|
|
81
|
+
}>;
|
|
82
|
+
};
|
|
83
|
+
export type PbxCallCommand = z.infer<typeof sPbxCallCommand>;
|
|
20
84
|
export type PbxCommand = PbxCallCommand;
|
package/dist/device/pbx.js
CHANGED
|
@@ -1,11 +1,24 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.sPbxSpecs = exports.PBX = void 0;
|
|
3
|
+
exports.pbxCommands = exports.sPbxCallCommand = exports.sPbxSpecs = exports.PBX = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
exports.PBX = 'pbx';
|
|
6
6
|
// SPECS
|
|
7
7
|
exports.sPbxSpecs = zod_1.z.object({
|
|
8
8
|
sipWsUrl: zod_1.z.string(),
|
|
9
9
|
});
|
|
10
|
+
// COMMANDS
|
|
11
|
+
exports.sPbxCallCommand = zod_1.z.object({
|
|
12
|
+
command: zod_1.z.literal('pbx.call'),
|
|
13
|
+
params: zod_1.z.object({
|
|
14
|
+
endpoint: zod_1.z.string().nonempty(),
|
|
15
|
+
soundFile: zod_1.z.string().nonempty(),
|
|
16
|
+
context: zod_1.z.string().optional(),
|
|
17
|
+
callerId: zod_1.z.string().optional(),
|
|
18
|
+
}),
|
|
19
|
+
});
|
|
20
|
+
exports.pbxCommands = {
|
|
21
|
+
'pbx.call': exports.sPbxCallCommand,
|
|
22
|
+
};
|
|
10
23
|
// STATE
|
|
11
24
|
// EVENTS
|
|
@@ -3,28 +3,171 @@ export declare const PRESENCE_TRACKER = "presence-tracker";
|
|
|
3
3
|
export interface PresenceTrackerState {
|
|
4
4
|
zonePeople: Record<string, string[]>;
|
|
5
5
|
}
|
|
6
|
-
export
|
|
7
|
-
command:
|
|
6
|
+
export declare const sCheckInPersonCommand: z.ZodObject<{
|
|
7
|
+
command: z.ZodLiteral<"presence-tracker.check-in">;
|
|
8
|
+
params: z.ZodObject<{
|
|
9
|
+
personId: z.ZodString;
|
|
10
|
+
zoneId: z.ZodNullable<z.ZodString>;
|
|
11
|
+
}, "strip", z.ZodTypeAny, {
|
|
12
|
+
personId: string;
|
|
13
|
+
zoneId: string | null;
|
|
14
|
+
}, {
|
|
15
|
+
personId: string;
|
|
16
|
+
zoneId: string | null;
|
|
17
|
+
}>;
|
|
18
|
+
}, "strip", z.ZodTypeAny, {
|
|
8
19
|
params: {
|
|
9
20
|
personId: string;
|
|
10
21
|
zoneId: string | null;
|
|
11
22
|
};
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
23
|
+
command: "presence-tracker.check-in";
|
|
24
|
+
}, {
|
|
25
|
+
params: {
|
|
26
|
+
personId: string;
|
|
27
|
+
zoneId: string | null;
|
|
28
|
+
};
|
|
29
|
+
command: "presence-tracker.check-in";
|
|
30
|
+
}>;
|
|
31
|
+
export type CheckInPerson = z.infer<typeof sCheckInPersonCommand>;
|
|
32
|
+
export declare const sCheckOutPersonCommand: z.ZodObject<{
|
|
33
|
+
command: z.ZodLiteral<"presence-tracker.check-out">;
|
|
34
|
+
params: z.ZodObject<{
|
|
35
|
+
personId: z.ZodString;
|
|
36
|
+
zoneId: z.ZodNullable<z.ZodString>;
|
|
37
|
+
leave: z.ZodBoolean;
|
|
38
|
+
}, "strip", z.ZodTypeAny, {
|
|
39
|
+
personId: string;
|
|
40
|
+
zoneId: string | null;
|
|
41
|
+
leave: boolean;
|
|
42
|
+
}, {
|
|
43
|
+
personId: string;
|
|
44
|
+
zoneId: string | null;
|
|
45
|
+
leave: boolean;
|
|
46
|
+
}>;
|
|
47
|
+
}, "strip", z.ZodTypeAny, {
|
|
15
48
|
params: {
|
|
16
49
|
personId: string;
|
|
17
50
|
zoneId: string | null;
|
|
18
51
|
leave: boolean;
|
|
19
52
|
};
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
command: 'presence-tracker.toggle-presence';
|
|
53
|
+
command: "presence-tracker.check-out";
|
|
54
|
+
}, {
|
|
23
55
|
params: {
|
|
24
56
|
personId: string;
|
|
25
57
|
zoneId: string | null;
|
|
58
|
+
leave: boolean;
|
|
26
59
|
};
|
|
27
|
-
|
|
60
|
+
command: "presence-tracker.check-out";
|
|
61
|
+
}>;
|
|
62
|
+
export type CheckOutPerson = z.infer<typeof sCheckOutPersonCommand>;
|
|
63
|
+
export declare const sTogglePresenceCommand: z.ZodObject<{
|
|
64
|
+
command: z.ZodLiteral<"presence-tracker.toggle-presence">;
|
|
65
|
+
params: z.ZodObject<{
|
|
66
|
+
personId: z.ZodString;
|
|
67
|
+
zoneId: z.ZodNullable<z.ZodString>;
|
|
68
|
+
}, "strip", z.ZodTypeAny, {
|
|
69
|
+
personId: string;
|
|
70
|
+
zoneId: string | null;
|
|
71
|
+
}, {
|
|
72
|
+
personId: string;
|
|
73
|
+
zoneId: string | null;
|
|
74
|
+
}>;
|
|
75
|
+
}, "strip", z.ZodTypeAny, {
|
|
76
|
+
params: {
|
|
77
|
+
personId: string;
|
|
78
|
+
zoneId: string | null;
|
|
79
|
+
};
|
|
80
|
+
command: "presence-tracker.toggle-presence";
|
|
81
|
+
}, {
|
|
82
|
+
params: {
|
|
83
|
+
personId: string;
|
|
84
|
+
zoneId: string | null;
|
|
85
|
+
};
|
|
86
|
+
command: "presence-tracker.toggle-presence";
|
|
87
|
+
}>;
|
|
88
|
+
export type TogglePresence = z.infer<typeof sTogglePresenceCommand>;
|
|
89
|
+
export declare const presenceTrackerCommands: {
|
|
90
|
+
readonly 'presence-tracker.check-in': z.ZodObject<{
|
|
91
|
+
command: z.ZodLiteral<"presence-tracker.check-in">;
|
|
92
|
+
params: z.ZodObject<{
|
|
93
|
+
personId: z.ZodString;
|
|
94
|
+
zoneId: z.ZodNullable<z.ZodString>;
|
|
95
|
+
}, "strip", z.ZodTypeAny, {
|
|
96
|
+
personId: string;
|
|
97
|
+
zoneId: string | null;
|
|
98
|
+
}, {
|
|
99
|
+
personId: string;
|
|
100
|
+
zoneId: string | null;
|
|
101
|
+
}>;
|
|
102
|
+
}, "strip", z.ZodTypeAny, {
|
|
103
|
+
params: {
|
|
104
|
+
personId: string;
|
|
105
|
+
zoneId: string | null;
|
|
106
|
+
};
|
|
107
|
+
command: "presence-tracker.check-in";
|
|
108
|
+
}, {
|
|
109
|
+
params: {
|
|
110
|
+
personId: string;
|
|
111
|
+
zoneId: string | null;
|
|
112
|
+
};
|
|
113
|
+
command: "presence-tracker.check-in";
|
|
114
|
+
}>;
|
|
115
|
+
readonly 'presence-tracker.check-out': z.ZodObject<{
|
|
116
|
+
command: z.ZodLiteral<"presence-tracker.check-out">;
|
|
117
|
+
params: z.ZodObject<{
|
|
118
|
+
personId: z.ZodString;
|
|
119
|
+
zoneId: z.ZodNullable<z.ZodString>;
|
|
120
|
+
leave: z.ZodBoolean;
|
|
121
|
+
}, "strip", z.ZodTypeAny, {
|
|
122
|
+
personId: string;
|
|
123
|
+
zoneId: string | null;
|
|
124
|
+
leave: boolean;
|
|
125
|
+
}, {
|
|
126
|
+
personId: string;
|
|
127
|
+
zoneId: string | null;
|
|
128
|
+
leave: boolean;
|
|
129
|
+
}>;
|
|
130
|
+
}, "strip", z.ZodTypeAny, {
|
|
131
|
+
params: {
|
|
132
|
+
personId: string;
|
|
133
|
+
zoneId: string | null;
|
|
134
|
+
leave: boolean;
|
|
135
|
+
};
|
|
136
|
+
command: "presence-tracker.check-out";
|
|
137
|
+
}, {
|
|
138
|
+
params: {
|
|
139
|
+
personId: string;
|
|
140
|
+
zoneId: string | null;
|
|
141
|
+
leave: boolean;
|
|
142
|
+
};
|
|
143
|
+
command: "presence-tracker.check-out";
|
|
144
|
+
}>;
|
|
145
|
+
readonly 'presence-tracker.toggle-presence': z.ZodObject<{
|
|
146
|
+
command: z.ZodLiteral<"presence-tracker.toggle-presence">;
|
|
147
|
+
params: z.ZodObject<{
|
|
148
|
+
personId: z.ZodString;
|
|
149
|
+
zoneId: z.ZodNullable<z.ZodString>;
|
|
150
|
+
}, "strip", z.ZodTypeAny, {
|
|
151
|
+
personId: string;
|
|
152
|
+
zoneId: string | null;
|
|
153
|
+
}, {
|
|
154
|
+
personId: string;
|
|
155
|
+
zoneId: string | null;
|
|
156
|
+
}>;
|
|
157
|
+
}, "strip", z.ZodTypeAny, {
|
|
158
|
+
params: {
|
|
159
|
+
personId: string;
|
|
160
|
+
zoneId: string | null;
|
|
161
|
+
};
|
|
162
|
+
command: "presence-tracker.toggle-presence";
|
|
163
|
+
}, {
|
|
164
|
+
params: {
|
|
165
|
+
personId: string;
|
|
166
|
+
zoneId: string | null;
|
|
167
|
+
};
|
|
168
|
+
command: "presence-tracker.toggle-presence";
|
|
169
|
+
}>;
|
|
170
|
+
};
|
|
28
171
|
export type PresenceTrackerCommand = CheckInPerson | CheckOutPerson | TogglePresence;
|
|
29
172
|
export declare const sPersonIn: z.ZodObject<{
|
|
30
173
|
kind: z.ZodLiteral<"person-in">;
|
|
@@ -36,17 +179,17 @@ export declare const sPersonIn: z.ZodObject<{
|
|
|
36
179
|
}, "strip", z.ZodTypeAny, {
|
|
37
180
|
kind: "person-in";
|
|
38
181
|
personId: string;
|
|
182
|
+
zoneId: string | null;
|
|
39
183
|
personFirstName: string;
|
|
40
184
|
personLastName: string;
|
|
41
185
|
personAvatarId: string | null;
|
|
42
|
-
zoneId: string | null;
|
|
43
186
|
}, {
|
|
44
187
|
kind: "person-in";
|
|
45
188
|
personId: string;
|
|
189
|
+
zoneId: string | null;
|
|
46
190
|
personFirstName: string;
|
|
47
191
|
personLastName: string;
|
|
48
192
|
personAvatarId: string | null;
|
|
49
|
-
zoneId: string | null;
|
|
50
193
|
}>;
|
|
51
194
|
export declare const sPersonOut: z.ZodObject<{
|
|
52
195
|
kind: z.ZodLiteral<"person-out">;
|
|
@@ -59,19 +202,19 @@ export declare const sPersonOut: z.ZodObject<{
|
|
|
59
202
|
}, "strip", z.ZodTypeAny, {
|
|
60
203
|
kind: "person-out";
|
|
61
204
|
personId: string;
|
|
205
|
+
isLeave: boolean;
|
|
206
|
+
zoneId: string | null;
|
|
62
207
|
personFirstName: string;
|
|
63
208
|
personLastName: string;
|
|
64
209
|
personAvatarId: string | null;
|
|
65
|
-
zoneId: string | null;
|
|
66
|
-
isLeave: boolean;
|
|
67
210
|
}, {
|
|
68
211
|
kind: "person-out";
|
|
69
212
|
personId: string;
|
|
213
|
+
isLeave: boolean;
|
|
214
|
+
zoneId: string | null;
|
|
70
215
|
personFirstName: string;
|
|
71
216
|
personLastName: string;
|
|
72
217
|
personAvatarId: string | null;
|
|
73
|
-
zoneId: string | null;
|
|
74
|
-
isLeave: boolean;
|
|
75
218
|
}>;
|
|
76
219
|
export declare const presenceTrackerEventSchemaByKind: {
|
|
77
220
|
readonly 'person-in': z.ZodObject<{
|
|
@@ -84,17 +227,17 @@ export declare const presenceTrackerEventSchemaByKind: {
|
|
|
84
227
|
}, "strip", z.ZodTypeAny, {
|
|
85
228
|
kind: "person-in";
|
|
86
229
|
personId: string;
|
|
230
|
+
zoneId: string | null;
|
|
87
231
|
personFirstName: string;
|
|
88
232
|
personLastName: string;
|
|
89
233
|
personAvatarId: string | null;
|
|
90
|
-
zoneId: string | null;
|
|
91
234
|
}, {
|
|
92
235
|
kind: "person-in";
|
|
93
236
|
personId: string;
|
|
237
|
+
zoneId: string | null;
|
|
94
238
|
personFirstName: string;
|
|
95
239
|
personLastName: string;
|
|
96
240
|
personAvatarId: string | null;
|
|
97
|
-
zoneId: string | null;
|
|
98
241
|
}>;
|
|
99
242
|
readonly 'person-out': z.ZodObject<{
|
|
100
243
|
kind: z.ZodLiteral<"person-out">;
|
|
@@ -107,19 +250,19 @@ export declare const presenceTrackerEventSchemaByKind: {
|
|
|
107
250
|
}, "strip", z.ZodTypeAny, {
|
|
108
251
|
kind: "person-out";
|
|
109
252
|
personId: string;
|
|
253
|
+
isLeave: boolean;
|
|
254
|
+
zoneId: string | null;
|
|
110
255
|
personFirstName: string;
|
|
111
256
|
personLastName: string;
|
|
112
257
|
personAvatarId: string | null;
|
|
113
|
-
zoneId: string | null;
|
|
114
|
-
isLeave: boolean;
|
|
115
258
|
}, {
|
|
116
259
|
kind: "person-out";
|
|
117
260
|
personId: string;
|
|
261
|
+
isLeave: boolean;
|
|
262
|
+
zoneId: string | null;
|
|
118
263
|
personFirstName: string;
|
|
119
264
|
personLastName: string;
|
|
120
265
|
personAvatarId: string | null;
|
|
121
|
-
zoneId: string | null;
|
|
122
|
-
isLeave: boolean;
|
|
123
266
|
}>;
|
|
124
267
|
};
|
|
125
268
|
export type PersonIn = z.infer<typeof sPersonIn>;
|