camstreamerlib 4.0.0-beta.2 → 4.0.0-beta.21
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/README.md +5 -1
- package/cjs/CamOverlayAPI.d.ts +629 -0
- package/cjs/CamOverlayAPI.js +255 -0
- package/{CamOverlayDrawingAPI.d.ts → cjs/CamOverlayDrawingAPI.d.ts} +1 -1
- package/cjs/CamOverlayDrawingAPI.js +235 -0
- package/cjs/CamOverlayPainter/Frame.js +301 -0
- package/{CamOverlayPainter → cjs/CamOverlayPainter}/Painter.d.ts +14 -3
- package/cjs/CamOverlayPainter/Painter.js +171 -0
- package/cjs/CamOverlayPainter/ResourceManager.js +46 -0
- package/cjs/CamScripterAPI.d.ts +36 -0
- package/cjs/CamScripterAPI.js +73 -0
- package/{CamScripterAPICameraEventsGenerator.d.ts → cjs/CamScripterAPICameraEventsGenerator.d.ts} +1 -1
- package/cjs/CamScripterAPICameraEventsGenerator.js +162 -0
- package/{CamStreamerAPI.d.ts → cjs/CamStreamerAPI.d.ts} +5 -5
- package/cjs/CamStreamerAPI.js +59 -0
- package/{CamSwitcherAPI.d.ts → cjs/CamSwitcherAPI.d.ts} +10 -6
- package/cjs/CamSwitcherAPI.js +351 -0
- package/{CamSwitcherEvents.d.ts → cjs/CamSwitcherEvents.d.ts} +2 -2
- package/cjs/CamSwitcherEvents.js +67 -0
- package/cjs/CreatePackage.js +106 -0
- package/cjs/PlaneTrackerAPI.d.ts +47 -0
- package/cjs/PlaneTrackerAPI.js +176 -0
- package/{VapixAPI.d.ts → cjs/VapixAPI.d.ts} +19 -7
- package/cjs/VapixAPI.js +491 -0
- package/{VapixEvents.d.ts → cjs/VapixEvents.d.ts} +1 -1
- package/cjs/VapixEvents.js +88 -0
- package/{errors → cjs/errors}/errors.d.ts +3 -0
- package/cjs/errors/errors.js +86 -0
- package/{events → cjs/events}/AxisCameraStationEvents.d.ts +3 -2
- package/cjs/events/AxisCameraStationEvents.js +48 -0
- package/{events → cjs/events}/GenetecAgent.d.ts +4 -3
- package/cjs/events/GenetecAgent.js +123 -0
- package/cjs/index.d.ts +18 -0
- package/cjs/index.js +42 -0
- package/cjs/internal/Digest.js +42 -0
- package/cjs/internal/ProxyClient.d.ts +11 -0
- package/cjs/internal/ProxyClient.js +46 -0
- package/cjs/internal/constants.js +4 -0
- package/cjs/internal/transformers.js +32 -0
- package/cjs/internal/types.d.ts +35 -0
- package/cjs/internal/types.js +2 -0
- package/{internal → cjs/internal}/utils.d.ts +5 -1
- package/cjs/internal/utils.js +69 -0
- package/{internal → cjs/internal}/versionCompare.d.ts +2 -2
- package/cjs/internal/versionCompare.js +53 -0
- package/cjs/models/CamOverlayAPI/accuweatherSchema.d.ts +84 -0
- package/cjs/models/CamOverlayAPI/accuweatherSchema.js +48 -0
- package/cjs/models/CamOverlayAPI/constants.d.ts +11 -0
- package/cjs/models/CamOverlayAPI/constants.js +14 -0
- package/cjs/models/CamOverlayAPI/customGraphicsSchema.d.ts +699 -0
- package/cjs/models/CamOverlayAPI/customGraphicsSchema.js +73 -0
- package/cjs/models/CamOverlayAPI/fileSchema.d.ts +28 -0
- package/cjs/models/CamOverlayAPI/fileSchema.js +17 -0
- package/cjs/models/CamOverlayAPI/imagesSchema.d.ts +95 -0
- package/cjs/models/CamOverlayAPI/imagesSchema.js +10 -0
- package/cjs/models/CamOverlayAPI/index.d.ts +13 -0
- package/cjs/models/CamOverlayAPI/index.js +29 -0
- package/cjs/models/CamOverlayAPI/infotickerSchema.d.ts +96 -0
- package/cjs/models/CamOverlayAPI/infotickerSchema.js +27 -0
- package/cjs/models/CamOverlayAPI/pipSchema.d.ts +125 -0
- package/cjs/models/CamOverlayAPI/pipSchema.js +40 -0
- package/cjs/models/CamOverlayAPI/ptzCompassSchema.d.ts +93 -0
- package/cjs/models/CamOverlayAPI/ptzCompassSchema.js +26 -0
- package/cjs/models/CamOverlayAPI/ptzSchema.d.ts +118 -0
- package/cjs/models/CamOverlayAPI/ptzSchema.js +13 -0
- package/cjs/models/CamOverlayAPI/screenSharingSchema.d.ts +58 -0
- package/cjs/models/CamOverlayAPI/screenSharingSchema.js +9 -0
- package/cjs/models/CamOverlayAPI/webCameraSharingSchema.d.ts +58 -0
- package/cjs/models/CamOverlayAPI/webCameraSharingSchema.js +9 -0
- package/cjs/models/CamOverlayAPI/widgetCommonSchema.d.ts +126 -0
- package/cjs/models/CamOverlayAPI/widgetCommonSchema.js +76 -0
- package/cjs/models/CamOverlayAPI/widgetsSchema.d.ts +2823 -0
- package/cjs/models/CamOverlayAPI/widgetsSchema.js +27 -0
- package/cjs/node/DefaultClient.d.ts +16 -0
- package/cjs/node/DefaultClient.js +56 -0
- package/cjs/node/HttpRequestSender.js +89 -0
- package/cjs/node/HttpServer.js +96 -0
- package/{node → cjs/node}/WsClient.d.ts +1 -1
- package/cjs/node/WsClient.js +149 -0
- package/{node → cjs/node}/WsEventClient.d.ts +1 -1
- package/cjs/node/WsEventClient.js +22 -0
- package/cjs/node/index.d.ts +2 -0
- package/cjs/node/index.js +7 -0
- package/cjs/types/CamOverlayAPI.d.ts +328 -0
- package/cjs/types/CamOverlayAPI.js +26 -0
- package/{types → cjs/types}/CamScripterAPI.d.ts +66 -7
- package/cjs/types/CamScripterAPI.js +35 -0
- package/{types → cjs/types}/CamStreamerAPI.d.ts +16 -5
- package/cjs/types/CamStreamerAPI.js +32 -0
- package/{types → cjs/types}/CamSwitcherAPI.d.ts +5 -5
- package/cjs/types/CamSwitcherAPI.js +137 -0
- package/{types/CamswitcherEvents.d.ts → cjs/types/CamSwitcherEvents.d.ts} +77 -0
- package/cjs/types/CamSwitcherEvents.js +70 -0
- package/cjs/types/PlaneTrackerAPI.d.ts +2 -0
- package/cjs/types/PlaneTrackerAPI.js +2 -0
- package/{types → cjs/types}/VapixAPI.d.ts +479 -519
- package/cjs/types/VapixAPI.js +139 -0
- package/cjs/types/common.js +14 -0
- package/cjs/web/DefaultClient.d.ts +6 -0
- package/cjs/web/DefaultClient.js +22 -0
- package/cjs/web/WsClient.js +62 -0
- package/cjs/web/index.d.ts +2 -0
- package/cjs/web/index.js +7 -0
- package/esm/CamOverlayAPI.d.ts +629 -0
- package/esm/CamOverlayAPI.js +251 -0
- package/esm/CamOverlayDrawingAPI.d.ts +86 -0
- package/{CamOverlayDrawingAPI.js → esm/CamOverlayDrawingAPI.js} +6 -3
- package/esm/CamOverlayPainter/Frame.d.ts +96 -0
- package/esm/CamOverlayPainter/Painter.d.ts +48 -0
- package/{CamOverlayPainter → esm/CamOverlayPainter}/Painter.js +4 -1
- package/esm/CamOverlayPainter/ResourceManager.d.ts +14 -0
- package/{CamOverlayPainter → esm/CamOverlayPainter}/ResourceManager.js +6 -10
- package/esm/CamScripterAPI.d.ts +36 -0
- package/esm/CamScripterAPI.js +69 -0
- package/esm/CamScripterAPICameraEventsGenerator.d.ts +74 -0
- package/{CamScripterAPICameraEventsGenerator.js → esm/CamScripterAPICameraEventsGenerator.js} +6 -3
- package/esm/CamStreamerAPI.d.ts +16 -0
- package/{CamStreamerAPI.js → esm/CamStreamerAPI.js} +4 -10
- package/esm/CamSwitcherAPI.d.ts +52 -0
- package/{CamSwitcherAPI.js → esm/CamSwitcherAPI.js} +24 -27
- package/esm/CamSwitcherEvents.d.ts +18 -0
- package/{CamSwitcherEvents.js → esm/CamSwitcherEvents.js} +1 -1
- package/esm/CreatePackage.d.ts +1 -0
- package/esm/PlaneTrackerAPI.d.ts +47 -0
- package/esm/PlaneTrackerAPI.js +172 -0
- package/esm/VapixAPI.d.ts +78 -0
- package/{VapixAPI.js → esm/VapixAPI.js} +93 -60
- package/esm/VapixEvents.d.ts +43 -0
- package/{VapixEvents.js → esm/VapixEvents.js} +3 -3
- package/esm/errors/errors.d.ts +37 -0
- package/{errors → esm/errors}/errors.js +6 -0
- package/esm/events/AxisCameraStationEvents.d.ts +10 -0
- package/{events → esm/events}/AxisCameraStationEvents.js +1 -1
- package/esm/events/GenetecAgent.d.ts +175 -0
- package/{events → esm/events}/GenetecAgent.js +5 -5
- package/esm/index.d.ts +18 -0
- package/esm/index.js +18 -0
- package/esm/internal/Digest.d.ts +4 -0
- package/{internal → esm/internal}/Digest.js +6 -6
- package/esm/internal/ProxyClient.d.ts +11 -0
- package/{internal → esm/internal}/ProxyClient.js +6 -4
- package/esm/internal/constants.d.ts +1 -0
- package/esm/internal/transformers.d.ts +5 -0
- package/esm/internal/types.d.ts +35 -0
- package/esm/internal/types.js +1 -0
- package/esm/internal/utils.d.ts +15 -0
- package/{internal → esm/internal}/utils.js +20 -1
- package/esm/internal/versionCompare.d.ts +6 -0
- package/esm/models/CamOverlayAPI/accuweatherSchema.d.ts +84 -0
- package/esm/models/CamOverlayAPI/accuweatherSchema.js +45 -0
- package/esm/models/CamOverlayAPI/constants.d.ts +11 -0
- package/esm/models/CamOverlayAPI/constants.js +11 -0
- package/esm/models/CamOverlayAPI/customGraphicsSchema.d.ts +699 -0
- package/esm/models/CamOverlayAPI/customGraphicsSchema.js +70 -0
- package/esm/models/CamOverlayAPI/fileSchema.d.ts +28 -0
- package/esm/models/CamOverlayAPI/fileSchema.js +14 -0
- package/esm/models/CamOverlayAPI/imagesSchema.d.ts +95 -0
- package/esm/models/CamOverlayAPI/imagesSchema.js +7 -0
- package/esm/models/CamOverlayAPI/index.d.ts +13 -0
- package/esm/models/CamOverlayAPI/index.js +13 -0
- package/esm/models/CamOverlayAPI/infotickerSchema.d.ts +96 -0
- package/esm/models/CamOverlayAPI/infotickerSchema.js +24 -0
- package/esm/models/CamOverlayAPI/pipSchema.d.ts +125 -0
- package/esm/models/CamOverlayAPI/pipSchema.js +37 -0
- package/esm/models/CamOverlayAPI/ptzCompassSchema.d.ts +93 -0
- package/esm/models/CamOverlayAPI/ptzCompassSchema.js +23 -0
- package/esm/models/CamOverlayAPI/ptzSchema.d.ts +118 -0
- package/esm/models/CamOverlayAPI/ptzSchema.js +10 -0
- package/esm/models/CamOverlayAPI/screenSharingSchema.d.ts +58 -0
- package/esm/models/CamOverlayAPI/screenSharingSchema.js +6 -0
- package/esm/models/CamOverlayAPI/webCameraSharingSchema.d.ts +58 -0
- package/esm/models/CamOverlayAPI/webCameraSharingSchema.js +6 -0
- package/esm/models/CamOverlayAPI/widgetCommonSchema.d.ts +126 -0
- package/esm/models/CamOverlayAPI/widgetCommonSchema.js +73 -0
- package/esm/models/CamOverlayAPI/widgetsSchema.d.ts +2823 -0
- package/esm/models/CamOverlayAPI/widgetsSchema.js +24 -0
- package/esm/node/DefaultClient.d.ts +16 -0
- package/{node → esm/node}/DefaultClient.js +9 -7
- package/esm/node/HttpRequestSender.d.ts +28 -0
- package/esm/node/HttpServer.d.ts +21 -0
- package/{node → esm/node}/HttpServer.js +1 -1
- package/esm/node/WsClient.d.ts +39 -0
- package/esm/node/WsEventClient.d.ts +13 -0
- package/esm/node/index.d.ts +2 -0
- package/esm/node/index.js +2 -0
- package/esm/types/CamOverlayAPI.d.ts +328 -0
- package/esm/types/CamOverlayAPI.js +14 -0
- package/esm/types/CamScripterAPI.d.ts +126 -0
- package/esm/types/CamScripterAPI.js +32 -0
- package/esm/types/CamStreamerAPI.d.ts +150 -0
- package/{types → esm/types}/CamStreamerAPI.js +4 -0
- package/esm/types/CamSwitcherAPI.d.ts +814 -0
- package/esm/types/CamSwitcherEvents.d.ts +568 -0
- package/{types/CamswitcherEvents.js → esm/types/CamSwitcherEvents.js} +8 -0
- package/esm/types/PlaneTrackerAPI.d.ts +2 -0
- package/esm/types/PlaneTrackerAPI.js +1 -0
- package/esm/types/VapixAPI.d.ts +1664 -0
- package/{types → esm/types}/VapixAPI.js +30 -23
- package/esm/types/common.d.ts +37 -0
- package/esm/web/DefaultClient.d.ts +6 -0
- package/{web → esm/web}/DefaultClient.js +6 -4
- package/esm/web/WsClient.d.ts +13 -0
- package/{web → esm/web}/WsClient.js +2 -2
- package/esm/web/index.d.ts +2 -0
- package/esm/web/index.js +2 -0
- package/package.json +6 -6
- package/CamOverlayAPI.d.ts +0 -31
- package/CamOverlayAPI.js +0 -172
- package/CamScripterAPI.d.ts +0 -19
- package/CamScripterAPI.js +0 -66
- package/internal/ProxyClient.d.ts +0 -11
- package/internal/common.d.ts +0 -40
- package/internal/common.js +0 -23
- package/node/DefaultClient.d.ts +0 -15
- package/types/CamOverlayAPI.d.ts +0 -188
- package/types/CamOverlayAPI.js +0 -44
- package/types/CamScripterAPI.js +0 -17
- package/web/DefaultClient.d.ts +0 -6
- package/{CamOverlayPainter → cjs/CamOverlayPainter}/Frame.d.ts +0 -0
- package/{CamOverlayPainter → cjs/CamOverlayPainter}/ResourceManager.d.ts +0 -0
- package/{CreatePackage.d.ts → cjs/CreatePackage.d.ts} +0 -0
- package/{internal → cjs/internal}/Digest.d.ts +0 -0
- package/{internal → cjs/internal}/constants.d.ts +0 -0
- package/{internal → cjs/internal}/transformers.d.ts +0 -0
- package/{node → cjs/node}/HttpRequestSender.d.ts +0 -0
- package/{node → cjs/node}/HttpServer.d.ts +0 -0
- package/{types → cjs/types}/common.d.ts +2 -2
- /package/{web → cjs/web}/WsClient.d.ts +0 -0
- /package/{CamOverlayPainter → esm/CamOverlayPainter}/Frame.js +0 -0
- /package/{CreatePackage.js → esm/CreatePackage.js} +0 -0
- /package/{internal → esm/internal}/constants.js +0 -0
- /package/{internal → esm/internal}/transformers.js +0 -0
- /package/{internal → esm/internal}/versionCompare.js +0 -0
- /package/{node → esm/node}/HttpRequestSender.js +0 -0
- /package/{node → esm/node}/WsClient.js +0 -0
- /package/{node → esm/node}/WsEventClient.js +0 -0
- /package/{types → esm/types}/CamSwitcherAPI.js +0 -0
- /package/{types → esm/types}/common.js +0 -0
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.clipListSchema = exports.playlistQueueSchema = exports.trackerSaveLoadSchema = exports.trackerSaveSchema = exports.playlistSaveLoadSchema = exports.clipSaveLoadSchema = exports.clipSaveSchema = exports.streamSaveLoadSchema = exports.audioPushInfoSchema = exports.outputInfoSchema = exports.storageInfoListSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const transformers_1 = require("../internal/transformers");
|
|
6
|
+
const common_1 = require("./common");
|
|
7
|
+
const channelTypeSchema = zod_1.z.union([zod_1.z.literal('audio'), zod_1.z.literal('video'), zod_1.z.literal('av')]);
|
|
8
|
+
const playlistPlayTypeSchema = zod_1.z.union([
|
|
9
|
+
zod_1.z.literal('PLAY_ALL'),
|
|
10
|
+
zod_1.z.literal('PLAY_ALL_LOOP'),
|
|
11
|
+
zod_1.z.literal('PLAY_ALL_SHUFFLED'),
|
|
12
|
+
zod_1.z.literal('PLAY_ALL_LOOP_SHUFFLED'),
|
|
13
|
+
zod_1.z.literal('PLAY_ONE_RANDOM'),
|
|
14
|
+
]);
|
|
15
|
+
exports.storageInfoListSchema = zod_1.z.array(zod_1.z.object({
|
|
16
|
+
storage: common_1.storageTypeSchema,
|
|
17
|
+
writable: zod_1.z.boolean(),
|
|
18
|
+
size: zod_1.z.number(),
|
|
19
|
+
available: zod_1.z.number(),
|
|
20
|
+
}));
|
|
21
|
+
exports.outputInfoSchema = zod_1.z
|
|
22
|
+
.object({
|
|
23
|
+
rtsp_url: zod_1.z.string(),
|
|
24
|
+
ws: zod_1.z.string(),
|
|
25
|
+
ws_initial_message: zod_1.z.string(),
|
|
26
|
+
})
|
|
27
|
+
.transform(transformers_1.toCamelCase);
|
|
28
|
+
exports.audioPushInfoSchema = zod_1.z
|
|
29
|
+
.object({
|
|
30
|
+
ws: zod_1.z.string(),
|
|
31
|
+
ws_initial_message: zod_1.z.string(),
|
|
32
|
+
})
|
|
33
|
+
.transform(transformers_1.toCamelCase);
|
|
34
|
+
const streamSaveSchema = zod_1.z.object({
|
|
35
|
+
niceName: zod_1.z.string(),
|
|
36
|
+
ip: zod_1.z.string(),
|
|
37
|
+
mdnsName: zod_1.z.string(),
|
|
38
|
+
port: zod_1.z.number(),
|
|
39
|
+
enabled: zod_1.z.boolean(),
|
|
40
|
+
auth: zod_1.z.string(),
|
|
41
|
+
query: zod_1.z.string(),
|
|
42
|
+
channel: channelTypeSchema,
|
|
43
|
+
keyboard: common_1.keyboardShortcutsSchema,
|
|
44
|
+
sortIndexOverview: zod_1.z.number().optional(),
|
|
45
|
+
viewNumber: zod_1.z.number(),
|
|
46
|
+
});
|
|
47
|
+
exports.streamSaveLoadSchema = zod_1.z.record(zod_1.z.string(), streamSaveSchema.partial());
|
|
48
|
+
exports.clipSaveSchema = zod_1.z.object({
|
|
49
|
+
niceName: zod_1.z.string(),
|
|
50
|
+
channel: channelTypeSchema,
|
|
51
|
+
keyboard: common_1.keyboardShortcutsSchema,
|
|
52
|
+
sortIndexOverview: zod_1.z.number(),
|
|
53
|
+
});
|
|
54
|
+
exports.clipSaveLoadSchema = zod_1.z.record(zod_1.z.string(), exports.clipSaveSchema.partial());
|
|
55
|
+
const playlistStreamSaveSchema = zod_1.z
|
|
56
|
+
.object({
|
|
57
|
+
stream_name: zod_1.z.string(),
|
|
58
|
+
clip_name: zod_1.z.string(),
|
|
59
|
+
tracker_name: zod_1.z.string(),
|
|
60
|
+
storage: common_1.storageTypeSchema,
|
|
61
|
+
})
|
|
62
|
+
.partial();
|
|
63
|
+
const playlistSaveSchema = zod_1.z.object({
|
|
64
|
+
channel: channelTypeSchema,
|
|
65
|
+
isFavourite: zod_1.z.boolean(),
|
|
66
|
+
keyboard: common_1.keyboardShortcutsSchema,
|
|
67
|
+
niceName: zod_1.z.string(),
|
|
68
|
+
sortIndexFavourite: zod_1.z.number().optional(),
|
|
69
|
+
sortIndexOverview: zod_1.z.number().optional(),
|
|
70
|
+
play_type: playlistPlayTypeSchema,
|
|
71
|
+
default: zod_1.z.boolean().optional(),
|
|
72
|
+
stream_list: zod_1.z.array(zod_1.z.object({
|
|
73
|
+
id: zod_1.z.string(),
|
|
74
|
+
isTimeoutCustom: zod_1.z.boolean(),
|
|
75
|
+
ptz_preset_pos_name: zod_1.z.string(),
|
|
76
|
+
repeat: zod_1.z.number(),
|
|
77
|
+
timeout: zod_1.z.number(),
|
|
78
|
+
video: playlistStreamSaveSchema,
|
|
79
|
+
audio: playlistStreamSaveSchema.optional(),
|
|
80
|
+
})),
|
|
81
|
+
});
|
|
82
|
+
exports.playlistSaveLoadSchema = zod_1.z.record(zod_1.z.string(), playlistSaveSchema.partial());
|
|
83
|
+
exports.trackerSaveSchema = zod_1.z.object({
|
|
84
|
+
id: zod_1.z.string(),
|
|
85
|
+
name: zod_1.z.string(),
|
|
86
|
+
previewId: zod_1.z.string(),
|
|
87
|
+
duration: zod_1.z.number(),
|
|
88
|
+
keyboard: common_1.keyboardShortcutsSchema,
|
|
89
|
+
channel: channelTypeSchema,
|
|
90
|
+
sortIndexOverview: zod_1.z.number(),
|
|
91
|
+
width: zod_1.z.number(),
|
|
92
|
+
height: zod_1.z.number(),
|
|
93
|
+
fps: zod_1.z.number(),
|
|
94
|
+
motion_history_frames: zod_1.z.number(),
|
|
95
|
+
include_zone: zod_1.z.array(zod_1.z.array(zod_1.z.number()).length(2)),
|
|
96
|
+
include_node_ids: zod_1.z.array(zod_1.z.string()),
|
|
97
|
+
camera_list: zod_1.z.array(zod_1.z.object({
|
|
98
|
+
id: zod_1.z.string(),
|
|
99
|
+
name: zod_1.z.string(),
|
|
100
|
+
overview: zod_1.z.boolean(),
|
|
101
|
+
zone: zod_1.z.array(zod_1.z.number()).length(4),
|
|
102
|
+
playlist_name: zod_1.z.string(),
|
|
103
|
+
ptz_preset_pos_no: zod_1.z.number(),
|
|
104
|
+
})),
|
|
105
|
+
viewNumber: zod_1.z.number(),
|
|
106
|
+
camera_view_number: zod_1.z.number(),
|
|
107
|
+
});
|
|
108
|
+
exports.trackerSaveLoadSchema = zod_1.z.record(zod_1.z.string(), exports.trackerSaveSchema.partial());
|
|
109
|
+
exports.playlistQueueSchema = zod_1.z
|
|
110
|
+
.object({
|
|
111
|
+
playlist_queue_list: zod_1.z.array(zod_1.z.string()),
|
|
112
|
+
})
|
|
113
|
+
.transform(transformers_1.toCamelCaseDeep);
|
|
114
|
+
exports.clipListSchema = zod_1.z.object({
|
|
115
|
+
clip_list: zod_1.z.record(zod_1.z.string(), zod_1.z.object({
|
|
116
|
+
storage: common_1.storageTypeSchema,
|
|
117
|
+
duration: zod_1.z.number(),
|
|
118
|
+
stream_list: zod_1.z.array(zod_1.z.union([
|
|
119
|
+
zod_1.z.object({
|
|
120
|
+
type: zod_1.z.literal('video'),
|
|
121
|
+
width: zod_1.z.number(),
|
|
122
|
+
height: zod_1.z.number(),
|
|
123
|
+
sample_rate: zod_1.z.number(),
|
|
124
|
+
h264_profile: common_1.h264ProfileSchema,
|
|
125
|
+
h264_level: zod_1.z.literal('4.1'),
|
|
126
|
+
gop: zod_1.z.number(),
|
|
127
|
+
fps: zod_1.z.number(),
|
|
128
|
+
bitrate: zod_1.z.number(),
|
|
129
|
+
}),
|
|
130
|
+
zod_1.z.object({
|
|
131
|
+
type: zod_1.z.literal('audio'),
|
|
132
|
+
sample_rate: zod_1.z.number(),
|
|
133
|
+
channel_count: common_1.audioChannelCountSchema,
|
|
134
|
+
}),
|
|
135
|
+
])),
|
|
136
|
+
})),
|
|
137
|
+
});
|
|
@@ -44,6 +44,27 @@ declare const cswEventsDataSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<
|
|
|
44
44
|
master_audio: boolean;
|
|
45
45
|
stream_name?: string | undefined;
|
|
46
46
|
clip_name?: string | undefined;
|
|
47
|
+
}>, z.ZodObject<{
|
|
48
|
+
type: z.ZodLiteral<"StreamSwitchVideoError">;
|
|
49
|
+
playlist_name: z.ZodString;
|
|
50
|
+
playlist_active_stream: z.ZodNumber;
|
|
51
|
+
stream_name: z.ZodOptional<z.ZodString>;
|
|
52
|
+
clip_name: z.ZodOptional<z.ZodString>;
|
|
53
|
+
info: z.ZodString;
|
|
54
|
+
}, "strip", z.ZodTypeAny, {
|
|
55
|
+
type: "StreamSwitchVideoError";
|
|
56
|
+
playlist_name: string;
|
|
57
|
+
playlist_active_stream: number;
|
|
58
|
+
info: string;
|
|
59
|
+
stream_name?: string | undefined;
|
|
60
|
+
clip_name?: string | undefined;
|
|
61
|
+
}, {
|
|
62
|
+
type: "StreamSwitchVideoError";
|
|
63
|
+
playlist_name: string;
|
|
64
|
+
playlist_active_stream: number;
|
|
65
|
+
info: string;
|
|
66
|
+
stream_name?: string | undefined;
|
|
67
|
+
clip_name?: string | undefined;
|
|
47
68
|
}>, z.ZodObject<{
|
|
48
69
|
type: z.ZodLiteral<"StreamSwitchAudioError">;
|
|
49
70
|
stream_name: z.ZodOptional<z.ZodString>;
|
|
@@ -176,6 +197,27 @@ export declare const cswEventsSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObje
|
|
|
176
197
|
master_audio: boolean;
|
|
177
198
|
stream_name?: string | undefined;
|
|
178
199
|
clip_name?: string | undefined;
|
|
200
|
+
}>, z.ZodObject<{
|
|
201
|
+
type: z.ZodLiteral<"StreamSwitchVideoError">;
|
|
202
|
+
playlist_name: z.ZodString;
|
|
203
|
+
playlist_active_stream: z.ZodNumber;
|
|
204
|
+
stream_name: z.ZodOptional<z.ZodString>;
|
|
205
|
+
clip_name: z.ZodOptional<z.ZodString>;
|
|
206
|
+
info: z.ZodString;
|
|
207
|
+
}, "strip", z.ZodTypeAny, {
|
|
208
|
+
type: "StreamSwitchVideoError";
|
|
209
|
+
playlist_name: string;
|
|
210
|
+
playlist_active_stream: number;
|
|
211
|
+
info: string;
|
|
212
|
+
stream_name?: string | undefined;
|
|
213
|
+
clip_name?: string | undefined;
|
|
214
|
+
}, {
|
|
215
|
+
type: "StreamSwitchVideoError";
|
|
216
|
+
playlist_name: string;
|
|
217
|
+
playlist_active_stream: number;
|
|
218
|
+
info: string;
|
|
219
|
+
stream_name?: string | undefined;
|
|
220
|
+
clip_name?: string | undefined;
|
|
179
221
|
}>, z.ZodObject<{
|
|
180
222
|
type: z.ZodLiteral<"StreamSwitchAudioError">;
|
|
181
223
|
stream_name: z.ZodOptional<z.ZodString>;
|
|
@@ -278,6 +320,13 @@ export declare const cswEventsSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObje
|
|
|
278
320
|
master_audio: boolean;
|
|
279
321
|
stream_name?: string | undefined;
|
|
280
322
|
clip_name?: string | undefined;
|
|
323
|
+
} | {
|
|
324
|
+
type: "StreamSwitchVideoError";
|
|
325
|
+
playlist_name: string;
|
|
326
|
+
playlist_active_stream: number;
|
|
327
|
+
info: string;
|
|
328
|
+
stream_name?: string | undefined;
|
|
329
|
+
clip_name?: string | undefined;
|
|
281
330
|
} | {
|
|
282
331
|
type: "StreamSwitchAudioError";
|
|
283
332
|
master_audio: boolean;
|
|
@@ -324,6 +373,13 @@ export declare const cswEventsSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObje
|
|
|
324
373
|
master_audio: boolean;
|
|
325
374
|
stream_name?: string | undefined;
|
|
326
375
|
clip_name?: string | undefined;
|
|
376
|
+
} | {
|
|
377
|
+
type: "StreamSwitchVideoError";
|
|
378
|
+
playlist_name: string;
|
|
379
|
+
playlist_active_stream: number;
|
|
380
|
+
info: string;
|
|
381
|
+
stream_name?: string | undefined;
|
|
382
|
+
clip_name?: string | undefined;
|
|
327
383
|
} | {
|
|
328
384
|
type: "StreamSwitchAudioError";
|
|
329
385
|
master_audio: boolean;
|
|
@@ -398,6 +454,27 @@ export declare const cswEventsSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObje
|
|
|
398
454
|
master_audio: boolean;
|
|
399
455
|
stream_name?: string | undefined;
|
|
400
456
|
clip_name?: string | undefined;
|
|
457
|
+
}>, z.ZodObject<{
|
|
458
|
+
type: z.ZodLiteral<"StreamSwitchVideoError">;
|
|
459
|
+
playlist_name: z.ZodString;
|
|
460
|
+
playlist_active_stream: z.ZodNumber;
|
|
461
|
+
stream_name: z.ZodOptional<z.ZodString>;
|
|
462
|
+
clip_name: z.ZodOptional<z.ZodString>;
|
|
463
|
+
info: z.ZodString;
|
|
464
|
+
}, "strip", z.ZodTypeAny, {
|
|
465
|
+
type: "StreamSwitchVideoError";
|
|
466
|
+
playlist_name: string;
|
|
467
|
+
playlist_active_stream: number;
|
|
468
|
+
info: string;
|
|
469
|
+
stream_name?: string | undefined;
|
|
470
|
+
clip_name?: string | undefined;
|
|
471
|
+
}, {
|
|
472
|
+
type: "StreamSwitchVideoError";
|
|
473
|
+
playlist_name: string;
|
|
474
|
+
playlist_active_stream: number;
|
|
475
|
+
info: string;
|
|
476
|
+
stream_name?: string | undefined;
|
|
477
|
+
clip_name?: string | undefined;
|
|
401
478
|
}>, z.ZodObject<{
|
|
402
479
|
type: z.ZodLiteral<"StreamSwitchAudioError">;
|
|
403
480
|
stream_name: z.ZodOptional<z.ZodString>;
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.cswEventsSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const cswEventsDataSchema = zod_1.z.discriminatedUnion('type', [
|
|
6
|
+
zod_1.z.object({ type: zod_1.z.literal('authorization'), state: zod_1.z.string() }),
|
|
7
|
+
zod_1.z.object({
|
|
8
|
+
type: zod_1.z.literal('PlaylistSwitch'),
|
|
9
|
+
playlist_name: zod_1.z.string(),
|
|
10
|
+
}),
|
|
11
|
+
zod_1.z.object({
|
|
12
|
+
type: zod_1.z.literal('StreamAvailable'),
|
|
13
|
+
stream_name: zod_1.z.string(),
|
|
14
|
+
state: zod_1.z.boolean(),
|
|
15
|
+
}),
|
|
16
|
+
zod_1.z.object({
|
|
17
|
+
type: zod_1.z.literal('StreamSwitchAudio'),
|
|
18
|
+
stream_name: zod_1.z.string().optional(),
|
|
19
|
+
clip_name: zod_1.z.string().optional(),
|
|
20
|
+
master_audio: zod_1.z.boolean(),
|
|
21
|
+
}),
|
|
22
|
+
zod_1.z.object({
|
|
23
|
+
type: zod_1.z.literal('StreamSwitchVideoError'),
|
|
24
|
+
playlist_name: zod_1.z.string(),
|
|
25
|
+
playlist_active_stream: zod_1.z.number(),
|
|
26
|
+
stream_name: zod_1.z.string().optional(),
|
|
27
|
+
clip_name: zod_1.z.string().optional(),
|
|
28
|
+
info: zod_1.z.string(),
|
|
29
|
+
}),
|
|
30
|
+
zod_1.z.object({
|
|
31
|
+
type: zod_1.z.literal('StreamSwitchAudioError'),
|
|
32
|
+
stream_name: zod_1.z.string().optional(),
|
|
33
|
+
clip_name: zod_1.z.string().optional(),
|
|
34
|
+
master_audio: zod_1.z.boolean(),
|
|
35
|
+
}),
|
|
36
|
+
zod_1.z.object({
|
|
37
|
+
type: zod_1.z.literal('StreamSwitchVideo'),
|
|
38
|
+
playlist_active_stream: zod_1.z.number(),
|
|
39
|
+
stream_name: zod_1.z.string().optional(),
|
|
40
|
+
playlist_name: zod_1.z.string().optional(),
|
|
41
|
+
clip_name: zod_1.z.string().optional(),
|
|
42
|
+
}),
|
|
43
|
+
zod_1.z.object({
|
|
44
|
+
type: zod_1.z.literal('PlaylistQueueChange'),
|
|
45
|
+
queue: zod_1.z.array(zod_1.z.string()),
|
|
46
|
+
}),
|
|
47
|
+
zod_1.z.object({
|
|
48
|
+
type: zod_1.z.literal('ClipUpload'),
|
|
49
|
+
clip_name: zod_1.z.string().optional(),
|
|
50
|
+
}),
|
|
51
|
+
zod_1.z.object({
|
|
52
|
+
type: zod_1.z.literal('SwitcherStop'),
|
|
53
|
+
default_playlist_id: zod_1.z.string().optional(),
|
|
54
|
+
}),
|
|
55
|
+
zod_1.z.object({
|
|
56
|
+
type: zod_1.z.literal('SwitcherStart'),
|
|
57
|
+
default_playlist_id: zod_1.z.string().optional(),
|
|
58
|
+
}),
|
|
59
|
+
zod_1.z.object({
|
|
60
|
+
type: zod_1.z.literal('MediaServerStarted'),
|
|
61
|
+
}),
|
|
62
|
+
zod_1.z.object({
|
|
63
|
+
type: zod_1.z.literal('ClipRemove'),
|
|
64
|
+
clip_name: zod_1.z.string(),
|
|
65
|
+
}),
|
|
66
|
+
]);
|
|
67
|
+
exports.cswEventsSchema = zod_1.z.discriminatedUnion('type', [
|
|
68
|
+
zod_1.z.object({ type: zod_1.z.literal('init'), data: cswEventsDataSchema }),
|
|
69
|
+
...cswEventsDataSchema.options,
|
|
70
|
+
]);
|