@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.
- package/dist/access-control/access-rule.d.ts +6 -6
- package/dist/access-control/person.d.ts +6 -6
- package/dist/access-control/schedule.d.ts +2 -2
- package/dist/access-control/zone.d.ts +4 -4
- package/dist/agent-communication/index.d.ts +0 -1
- package/dist/agent-communication/index.js +0 -1
- package/dist/agent-communication/protocol.d.ts +170 -170
- package/dist/alarm-automation.d.ts +1 -1
- package/dist/api/alarm.d.ts +1 -1
- package/dist/api/media.d.ts +8 -8
- package/dist/bookmarks.d.ts +2 -2
- package/dist/cast.d.ts +2 -2
- package/dist/commands/alarm.d.ts +312 -0
- package/dist/commands/alarm.js +62 -0
- package/dist/{device-command.d.ts → commands/all.d.ts} +17 -19
- package/dist/{device-command.js → commands/all.js} +9 -9
- package/dist/commands/camera-lift.d.ts +46 -0
- package/dist/commands/camera-lift.js +17 -0
- package/dist/commands/camera.d.ts +478 -0
- package/dist/commands/camera.js +97 -0
- package/dist/commands/display.d.ts +431 -0
- package/dist/commands/display.js +37 -0
- package/dist/commands/door.d.ts +88 -0
- package/dist/commands/door.js +27 -0
- package/dist/commands/index.d.ts +12 -0
- package/dist/commands/index.js +28 -0
- package/dist/commands/intercom-terminal.d.ts +40 -0
- package/dist/{device/reader/commands.js → commands/intercom-terminal.js} +1 -0
- package/dist/commands/io-board.d.ts +55 -0
- package/dist/commands/io-board.js +15 -0
- package/dist/commands/nvr-exporter.d.ts +1262 -0
- package/dist/commands/nvr-exporter.js +26 -0
- package/dist/commands/pbx.d.ts +75 -0
- package/dist/commands/pbx.js +17 -0
- package/dist/commands/presence-tracker.d.ts +167 -0
- package/dist/commands/presence-tracker.js +33 -0
- package/dist/commands/server.d.ts +1272 -0
- package/dist/commands/server.js +27 -0
- package/dist/device/alarm.d.ts +0 -530
- package/dist/device/alarm.js +1 -110
- package/dist/device/any-device.d.ts +88 -88
- package/dist/device/camera-lift.d.ts +0 -45
- package/dist/device/camera-lift.js +1 -14
- package/dist/device/camera.d.ts +0 -1248
- package/dist/device/camera.js +1 -204
- package/dist/device/device-gateway.d.ts +0 -2
- package/dist/device/device-gateway.js +1 -0
- package/dist/device/display.d.ts +0 -438
- package/dist/device/display.js +1 -39
- package/dist/device/door.d.ts +0 -306
- package/dist/device/door.js +1 -82
- package/dist/device/index.d.ts +1 -1
- package/dist/device/index.js +1 -1
- package/dist/device/intercom-operator.js +0 -1
- package/dist/device/intercom-terminal.d.ts +0 -101
- package/dist/device/intercom-terminal.js +3 -55
- package/dist/device/io-board.d.ts +0 -84
- package/dist/device/io-board.js +1 -21
- package/dist/device/motion-sensor.js +0 -1
- package/dist/device/nvr-analytics-server.d.ts +0 -295
- package/dist/device/nvr-analytics-server.js +1 -65
- package/dist/device/nvr-exporter.d.ts +0 -1436
- package/dist/device/nvr-exporter.js +1 -72
- package/dist/device/nvr-recorder.d.ts +0 -2633
- package/dist/device/nvr-recorder.js +1 -39
- package/dist/device/panic-button.d.ts +0 -18
- package/dist/device/panic-button.js +1 -8
- package/dist/device/pbx.d.ts +0 -74
- package/dist/device/pbx.js +1 -16
- package/dist/device/presence-tracker.d.ts +0 -302
- package/dist/device/presence-tracker.js +1 -59
- package/dist/device/server.d.ts +0 -1336
- package/dist/device/server.js +1 -37
- package/dist/device/system.d.ts +0 -42
- package/dist/device/system.js +1 -13
- package/dist/device-event.d.ts +1 -721
- package/dist/device-event.js +0 -110
- package/dist/device-group.d.ts +2 -2
- package/dist/device-import.d.ts +8 -8
- package/dist/events/alarm.d.ts +220 -0
- package/dist/events/alarm.js +55 -0
- package/dist/events/all.d.ts +700 -0
- package/dist/events/all.js +109 -0
- package/dist/events/camera.d.ts +661 -0
- package/dist/events/camera.js +87 -0
- package/dist/events/display.d.ts +9 -0
- package/dist/events/display.js +9 -0
- package/dist/events/door.d.ts +220 -0
- package/dist/events/door.js +62 -0
- package/dist/events/index.d.ts +12 -0
- package/dist/events/index.js +28 -0
- package/dist/events/intercom-terminal.d.ts +61 -0
- package/dist/events/intercom-terminal.js +19 -0
- package/dist/events/io-board.d.ts +31 -0
- package/dist/events/io-board.js +13 -0
- package/dist/events/nvr-exporter.d.ts +52 -0
- package/dist/events/nvr-exporter.js +21 -0
- package/dist/events/panic-button.d.ts +19 -0
- package/dist/events/panic-button.js +11 -0
- package/dist/events/presence-tracker.d.ts +136 -0
- package/dist/events/presence-tracker.js +33 -0
- package/dist/events/server.d.ts +65 -0
- package/dist/events/server.js +15 -0
- package/dist/index.d.ts +4 -1
- package/dist/index.js +4 -1
- package/dist/layout.d.ts +8 -8
- package/dist/macros.d.ts +14 -14
- package/dist/messages/device-communication.d.ts +2 -2
- package/dist/messages/notifications.d.ts +2 -2
- package/dist/messages/web-rtc-signaling.d.ts +10 -10
- package/dist/notifications.d.ts +4 -4
- package/dist/package.json +1 -1
- package/dist/primitives.d.ts +16 -0
- package/dist/primitives.js +13 -1
- package/dist/{agent-communication/queries.d.ts → queries/all.d.ts} +12 -10
- package/dist/queries/all.js +21 -0
- package/dist/queries/camera.d.ts +98 -0
- package/dist/queries/camera.js +27 -0
- package/dist/queries/index.d.ts +5 -0
- package/dist/{device/reader → queries}/index.js +5 -3
- package/dist/queries/nvr-analytics-server.d.ts +296 -0
- package/dist/queries/nvr-analytics-server.js +68 -0
- package/dist/queries/nvr-exporter.d.ts +125 -0
- package/dist/queries/nvr-exporter.js +36 -0
- package/dist/queries/nvr-recorder.d.ts +2634 -0
- package/dist/queries/nvr-recorder.js +42 -0
- package/dist/user.d.ts +4 -4
- package/package.json +1 -1
- package/dist/agent-communication/queries.js +0 -19
- package/dist/device/reader/commands.d.ts +0 -1
- package/dist/device/reader/index.d.ts +0 -3
- /package/dist/device/{reader/specs.d.ts → reader.d.ts} +0 -0
- /package/dist/device/{reader/specs.js → reader.js} +0 -0
- /package/dist/{device/reader/events.d.ts → events/reader.d.ts} +0 -0
- /package/dist/{device/reader/events.js → events/reader.js} +0 -0
|
@@ -1,47 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
const api_1 = require("../api");
|
|
5
|
-
const primitives_1 = require("../primitives");
|
|
3
|
+
exports.sRecorderStateDto = exports.sRecorderSpecs = exports.NVR_RECORDER = void 0;
|
|
6
4
|
const zod_1 = require("zod");
|
|
7
5
|
exports.NVR_RECORDER = 'nvr-recorder';
|
|
8
6
|
exports.sRecorderSpecs = zod_1.z.object({});
|
|
9
7
|
exports.sRecorderStateDto = zod_1.z.object({
|
|
10
8
|
connected: zod_1.z.boolean(),
|
|
11
9
|
});
|
|
12
|
-
// QUERIES
|
|
13
|
-
// -- Recordings by Time Range
|
|
14
|
-
exports.QUERY_RECORDINGS_BY_TIME_RANGE = 'cctv:recordings-by-time-range';
|
|
15
|
-
exports.sRecordingsByTimeRangeArgs = zod_1.z.object({
|
|
16
|
-
device: primitives_1.sDeviceParam,
|
|
17
|
-
timeFrom: zod_1.z.number(),
|
|
18
|
-
timeTo: zod_1.z.number(),
|
|
19
|
-
});
|
|
20
|
-
exports.sRecordingsResponse = zod_1.z.array(api_1.sRecordingSequence);
|
|
21
|
-
// -- Preview Image
|
|
22
|
-
exports.QUERY_PREVIEW_IMAGE = 'cctv:preview-image';
|
|
23
|
-
exports.sPreviewImageArgs = zod_1.z.object({
|
|
24
|
-
device: primitives_1.sDeviceParam,
|
|
25
|
-
time: zod_1.z.number(),
|
|
26
|
-
height: zod_1.z.number(),
|
|
27
|
-
});
|
|
28
|
-
exports.sPreviewImageResponse = primitives_1.sFileResponse;
|
|
29
|
-
// -- Camera Latest Frame
|
|
30
|
-
exports.QUERY_CAMERA_LATEST_FRAME = 'cctv:latest-frame';
|
|
31
|
-
exports.sCameraLatestFrameArgs = zod_1.z.object({
|
|
32
|
-
device: primitives_1.sDeviceParam,
|
|
33
|
-
width: zod_1.z.number(),
|
|
34
|
-
height: zod_1.z.number(),
|
|
35
|
-
});
|
|
36
|
-
exports.sCameraLatestFrameResponse = primitives_1.sFileResponse;
|
|
37
|
-
exports.nvrRecorderRequestSchemas = {
|
|
38
|
-
[exports.QUERY_RECORDINGS_BY_TIME_RANGE]: exports.sRecordingsByTimeRangeArgs,
|
|
39
|
-
[exports.QUERY_PREVIEW_IMAGE]: exports.sPreviewImageArgs,
|
|
40
|
-
[exports.QUERY_CAMERA_LATEST_FRAME]: exports.sCameraLatestFrameArgs,
|
|
41
|
-
};
|
|
42
|
-
// Dictionary of response schemas by query type
|
|
43
|
-
exports.nvrRecorderResponseSchemas = {
|
|
44
|
-
[exports.QUERY_RECORDINGS_BY_TIME_RANGE]: exports.sRecordingsResponse,
|
|
45
|
-
[exports.QUERY_PREVIEW_IMAGE]: exports.sPreviewImageResponse,
|
|
46
|
-
[exports.QUERY_CAMERA_LATEST_FRAME]: exports.sCameraLatestFrameResponse,
|
|
47
|
-
};
|
|
@@ -6,21 +6,3 @@ export interface PanicButtonStateDto {
|
|
|
6
6
|
isPressed: boolean;
|
|
7
7
|
connected: boolean;
|
|
8
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;
|
|
@@ -1,14 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.sPanicButtonSpecs = exports.PANIC_BUTTON = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
exports.PANIC_BUTTON = 'panic-button';
|
|
6
6
|
// SPECS
|
|
7
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
|
-
};
|
package/dist/device/pbx.d.ts
CHANGED
|
@@ -8,77 +8,3 @@ export declare const sPbxSpecs: z.ZodObject<{
|
|
|
8
8
|
sipWsUrl: string;
|
|
9
9
|
}>;
|
|
10
10
|
export type PbxSpecs = z.infer<typeof sPbxSpecs>;
|
|
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, {
|
|
30
|
-
params: {
|
|
31
|
-
endpoint: string;
|
|
32
|
-
soundFile: string;
|
|
33
|
-
context?: string | undefined;
|
|
34
|
-
callerId?: string | undefined;
|
|
35
|
-
};
|
|
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>;
|
|
84
|
-
export type PbxCommand = PbxCallCommand;
|
package/dist/device/pbx.js
CHANGED
|
@@ -1,24 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
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
|
-
};
|
|
23
|
-
// STATE
|
|
24
|
-
// EVENTS
|
|
@@ -1,306 +1,4 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
1
|
export declare const PRESENCE_TRACKER = "presence-tracker";
|
|
3
2
|
export interface PresenceTrackerState {
|
|
4
3
|
zonePeople: Record<string, string[]>;
|
|
5
4
|
}
|
|
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, {
|
|
19
|
-
params: {
|
|
20
|
-
personId: string;
|
|
21
|
-
zoneId: string | null;
|
|
22
|
-
};
|
|
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, {
|
|
48
|
-
params: {
|
|
49
|
-
personId: string;
|
|
50
|
-
zoneId: string | null;
|
|
51
|
-
leave: boolean;
|
|
52
|
-
};
|
|
53
|
-
command: "presence-tracker.check-out";
|
|
54
|
-
}, {
|
|
55
|
-
params: {
|
|
56
|
-
personId: string;
|
|
57
|
-
zoneId: string | null;
|
|
58
|
-
leave: boolean;
|
|
59
|
-
};
|
|
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
|
-
};
|
|
171
|
-
export type PresenceTrackerCommand = CheckInPerson | CheckOutPerson | TogglePresence;
|
|
172
|
-
export declare const sPersonIn: z.ZodObject<{
|
|
173
|
-
kind: z.ZodLiteral<"person-in">;
|
|
174
|
-
personId: z.ZodString;
|
|
175
|
-
personFirstName: z.ZodString;
|
|
176
|
-
personLastName: z.ZodString;
|
|
177
|
-
personAvatarId: z.ZodNullable<z.ZodString>;
|
|
178
|
-
personType: z.ZodString;
|
|
179
|
-
personPosition: z.ZodNullable<z.ZodString>;
|
|
180
|
-
zoneId: z.ZodNullable<z.ZodString>;
|
|
181
|
-
securityChecked: z.ZodBoolean;
|
|
182
|
-
}, "strip", z.ZodTypeAny, {
|
|
183
|
-
kind: "person-in";
|
|
184
|
-
personId: string;
|
|
185
|
-
securityChecked: boolean;
|
|
186
|
-
zoneId: string | null;
|
|
187
|
-
personType: string;
|
|
188
|
-
personFirstName: string;
|
|
189
|
-
personLastName: string;
|
|
190
|
-
personAvatarId: string | null;
|
|
191
|
-
personPosition: string | null;
|
|
192
|
-
}, {
|
|
193
|
-
kind: "person-in";
|
|
194
|
-
personId: string;
|
|
195
|
-
securityChecked: boolean;
|
|
196
|
-
zoneId: string | null;
|
|
197
|
-
personType: string;
|
|
198
|
-
personFirstName: string;
|
|
199
|
-
personLastName: string;
|
|
200
|
-
personAvatarId: string | null;
|
|
201
|
-
personPosition: string | null;
|
|
202
|
-
}>;
|
|
203
|
-
export declare const sPersonOut: z.ZodObject<{
|
|
204
|
-
kind: z.ZodLiteral<"person-out">;
|
|
205
|
-
personId: z.ZodString;
|
|
206
|
-
personFirstName: z.ZodString;
|
|
207
|
-
personLastName: z.ZodString;
|
|
208
|
-
personAvatarId: z.ZodNullable<z.ZodString>;
|
|
209
|
-
personType: z.ZodString;
|
|
210
|
-
personPosition: z.ZodNullable<z.ZodString>;
|
|
211
|
-
isLeave: z.ZodBoolean;
|
|
212
|
-
zoneId: z.ZodNullable<z.ZodString>;
|
|
213
|
-
securityChecked: z.ZodBoolean;
|
|
214
|
-
}, "strip", z.ZodTypeAny, {
|
|
215
|
-
kind: "person-out";
|
|
216
|
-
personId: string;
|
|
217
|
-
securityChecked: boolean;
|
|
218
|
-
isLeave: boolean;
|
|
219
|
-
zoneId: string | null;
|
|
220
|
-
personType: string;
|
|
221
|
-
personFirstName: string;
|
|
222
|
-
personLastName: string;
|
|
223
|
-
personAvatarId: string | null;
|
|
224
|
-
personPosition: string | null;
|
|
225
|
-
}, {
|
|
226
|
-
kind: "person-out";
|
|
227
|
-
personId: string;
|
|
228
|
-
securityChecked: boolean;
|
|
229
|
-
isLeave: boolean;
|
|
230
|
-
zoneId: string | null;
|
|
231
|
-
personType: string;
|
|
232
|
-
personFirstName: string;
|
|
233
|
-
personLastName: string;
|
|
234
|
-
personAvatarId: string | null;
|
|
235
|
-
personPosition: string | null;
|
|
236
|
-
}>;
|
|
237
|
-
export declare const presenceTrackerEventSchemaByKind: {
|
|
238
|
-
readonly 'person-in': z.ZodObject<{
|
|
239
|
-
kind: z.ZodLiteral<"person-in">;
|
|
240
|
-
personId: z.ZodString;
|
|
241
|
-
personFirstName: z.ZodString;
|
|
242
|
-
personLastName: z.ZodString;
|
|
243
|
-
personAvatarId: z.ZodNullable<z.ZodString>;
|
|
244
|
-
personType: z.ZodString;
|
|
245
|
-
personPosition: z.ZodNullable<z.ZodString>;
|
|
246
|
-
zoneId: z.ZodNullable<z.ZodString>;
|
|
247
|
-
securityChecked: z.ZodBoolean;
|
|
248
|
-
}, "strip", z.ZodTypeAny, {
|
|
249
|
-
kind: "person-in";
|
|
250
|
-
personId: string;
|
|
251
|
-
securityChecked: boolean;
|
|
252
|
-
zoneId: string | null;
|
|
253
|
-
personType: string;
|
|
254
|
-
personFirstName: string;
|
|
255
|
-
personLastName: string;
|
|
256
|
-
personAvatarId: string | null;
|
|
257
|
-
personPosition: string | null;
|
|
258
|
-
}, {
|
|
259
|
-
kind: "person-in";
|
|
260
|
-
personId: string;
|
|
261
|
-
securityChecked: boolean;
|
|
262
|
-
zoneId: string | null;
|
|
263
|
-
personType: string;
|
|
264
|
-
personFirstName: string;
|
|
265
|
-
personLastName: string;
|
|
266
|
-
personAvatarId: string | null;
|
|
267
|
-
personPosition: string | null;
|
|
268
|
-
}>;
|
|
269
|
-
readonly 'person-out': z.ZodObject<{
|
|
270
|
-
kind: z.ZodLiteral<"person-out">;
|
|
271
|
-
personId: z.ZodString;
|
|
272
|
-
personFirstName: z.ZodString;
|
|
273
|
-
personLastName: z.ZodString;
|
|
274
|
-
personAvatarId: z.ZodNullable<z.ZodString>;
|
|
275
|
-
personType: z.ZodString;
|
|
276
|
-
personPosition: z.ZodNullable<z.ZodString>;
|
|
277
|
-
isLeave: z.ZodBoolean;
|
|
278
|
-
zoneId: z.ZodNullable<z.ZodString>;
|
|
279
|
-
securityChecked: z.ZodBoolean;
|
|
280
|
-
}, "strip", z.ZodTypeAny, {
|
|
281
|
-
kind: "person-out";
|
|
282
|
-
personId: string;
|
|
283
|
-
securityChecked: boolean;
|
|
284
|
-
isLeave: boolean;
|
|
285
|
-
zoneId: string | null;
|
|
286
|
-
personType: string;
|
|
287
|
-
personFirstName: string;
|
|
288
|
-
personLastName: string;
|
|
289
|
-
personAvatarId: string | null;
|
|
290
|
-
personPosition: string | null;
|
|
291
|
-
}, {
|
|
292
|
-
kind: "person-out";
|
|
293
|
-
personId: string;
|
|
294
|
-
securityChecked: boolean;
|
|
295
|
-
isLeave: boolean;
|
|
296
|
-
zoneId: string | null;
|
|
297
|
-
personType: string;
|
|
298
|
-
personFirstName: string;
|
|
299
|
-
personLastName: string;
|
|
300
|
-
personAvatarId: string | null;
|
|
301
|
-
personPosition: string | null;
|
|
302
|
-
}>;
|
|
303
|
-
};
|
|
304
|
-
export type PersonIn = z.infer<typeof sPersonIn>;
|
|
305
|
-
export type PersonOut = z.infer<typeof sPersonOut>;
|
|
306
|
-
export type PresenceTrackerEvent = PersonIn | PersonOut;
|
|
@@ -1,62 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
const primitives_1 = require("../primitives");
|
|
5
|
-
const zod_1 = require("zod");
|
|
3
|
+
exports.PRESENCE_TRACKER = void 0;
|
|
6
4
|
exports.PRESENCE_TRACKER = 'presence-tracker';
|
|
7
|
-
// COMMANDS
|
|
8
|
-
exports.sCheckInPersonCommand = zod_1.z.object({
|
|
9
|
-
command: zod_1.z.literal('presence-tracker.check-in'),
|
|
10
|
-
params: zod_1.z.object({
|
|
11
|
-
personId: primitives_1.sPersonId,
|
|
12
|
-
zoneId: primitives_1.sZoneId.nullable(),
|
|
13
|
-
}),
|
|
14
|
-
});
|
|
15
|
-
exports.sCheckOutPersonCommand = zod_1.z.object({
|
|
16
|
-
command: zod_1.z.literal('presence-tracker.check-out'),
|
|
17
|
-
params: zod_1.z.object({
|
|
18
|
-
personId: primitives_1.sPersonId,
|
|
19
|
-
zoneId: primitives_1.sZoneId.nullable(),
|
|
20
|
-
leave: zod_1.z.boolean(),
|
|
21
|
-
}),
|
|
22
|
-
});
|
|
23
|
-
exports.sTogglePresenceCommand = zod_1.z.object({
|
|
24
|
-
command: zod_1.z.literal('presence-tracker.toggle-presence'),
|
|
25
|
-
params: zod_1.z.object({
|
|
26
|
-
personId: primitives_1.sPersonId,
|
|
27
|
-
zoneId: primitives_1.sZoneId.nullable(),
|
|
28
|
-
}),
|
|
29
|
-
});
|
|
30
|
-
exports.presenceTrackerCommands = {
|
|
31
|
-
'presence-tracker.check-in': exports.sCheckInPersonCommand,
|
|
32
|
-
'presence-tracker.check-out': exports.sCheckOutPersonCommand,
|
|
33
|
-
'presence-tracker.toggle-presence': exports.sTogglePresenceCommand,
|
|
34
|
-
};
|
|
35
|
-
// EVENTS
|
|
36
|
-
exports.sPersonIn = zod_1.z.object({
|
|
37
|
-
kind: zod_1.z.literal('person-in'),
|
|
38
|
-
personId: primitives_1.sPersonId,
|
|
39
|
-
personFirstName: zod_1.z.string().nonempty(),
|
|
40
|
-
personLastName: zod_1.z.string().nonempty(),
|
|
41
|
-
personAvatarId: zod_1.z.string().nullable(),
|
|
42
|
-
personType: zod_1.z.string().nonempty(),
|
|
43
|
-
personPosition: zod_1.z.string().nullable(),
|
|
44
|
-
zoneId: zod_1.z.string().nullable(),
|
|
45
|
-
securityChecked: zod_1.z.boolean(),
|
|
46
|
-
});
|
|
47
|
-
exports.sPersonOut = zod_1.z.object({
|
|
48
|
-
kind: zod_1.z.literal('person-out'),
|
|
49
|
-
personId: primitives_1.sPersonId,
|
|
50
|
-
personFirstName: zod_1.z.string().nonempty(),
|
|
51
|
-
personLastName: zod_1.z.string().nonempty(),
|
|
52
|
-
personAvatarId: zod_1.z.string().nullable(),
|
|
53
|
-
personType: zod_1.z.string().nonempty(),
|
|
54
|
-
personPosition: zod_1.z.string().max(128).nullable(),
|
|
55
|
-
isLeave: zod_1.z.boolean(),
|
|
56
|
-
zoneId: zod_1.z.string().nullable(),
|
|
57
|
-
securityChecked: zod_1.z.boolean(),
|
|
58
|
-
});
|
|
59
|
-
exports.presenceTrackerEventSchemaByKind = {
|
|
60
|
-
'person-in': exports.sPersonIn,
|
|
61
|
-
'person-out': exports.sPersonOut,
|
|
62
|
-
};
|