camstreamerlib 4.0.0-beta.4 → 4.0.0-beta.41
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 +112 -0
- package/cjs/CamOverlayAPI.js +135 -92
- package/cjs/CamScripterAPI.js +52 -42
- package/cjs/CamStreamerAPI.js +83 -39
- package/cjs/CamSwitcherAPI.js +141 -123
- package/cjs/CamSwitcherEvents.js +4 -60
- package/cjs/PlaneTrackerAPI.js +210 -0
- package/cjs/VapixAPI.js +323 -233
- package/cjs/{CreatePackage.js → bin/CreatePackage.js} +22 -19
- package/cjs/errors/errors.js +78 -1
- package/cjs/index.js +17 -4
- package/cjs/internal/ProxyClient.js +28 -32
- package/cjs/internal/WsEvents.js +72 -0
- package/cjs/internal/types.js +2 -0
- package/cjs/internal/utils.js +22 -3
- package/cjs/{CamOverlayDrawingAPI.js → node/CamOverlayDrawingAPI.js} +7 -4
- package/cjs/{CamOverlayPainter → node/CamOverlayPainter}/Frame.js +33 -0
- package/cjs/{CamOverlayPainter → node/CamOverlayPainter}/Painter.js +5 -17
- package/cjs/node/CamOverlayPainter/ResourceManager.js +72 -0
- package/cjs/{CamScripterAPICameraEventsGenerator.js → node/CamScripterAPICameraEventsGenerator.js} +7 -4
- package/cjs/node/DefaultClient.js +10 -12
- package/cjs/{internal → node}/Digest.js +8 -5
- package/cjs/node/HttpRequestSender.js +14 -4
- package/cjs/node/HttpServer.js +15 -12
- package/cjs/{VapixEvents.js → node/VapixEvents.js} +1 -1
- package/cjs/node/WsClient.js +12 -9
- package/cjs/node/events/AxisCameraStationEvents.js +53 -0
- package/cjs/node/events/GenetecAgent.js +123 -0
- package/cjs/node/index.js +38 -5
- package/cjs/types/CamOverlayAPI/CamOverlayAPI.js +92 -0
- package/cjs/types/CamOverlayAPI/accuweatherSchema.js +47 -0
- package/cjs/types/CamOverlayAPI/customGraphicsSchema.js +72 -0
- package/cjs/types/CamOverlayAPI/imagesSchema.js +9 -0
- package/cjs/types/CamOverlayAPI/index.js +27 -0
- package/cjs/types/CamOverlayAPI/infotickerSchema.js +26 -0
- package/cjs/types/CamOverlayAPI/pipSchema.js +39 -0
- package/cjs/types/CamOverlayAPI/ptzCompassSchema.js +25 -0
- package/cjs/types/CamOverlayAPI/ptzSchema.js +12 -0
- package/cjs/types/CamOverlayAPI/scoreBoardSchema.js +132 -0
- package/cjs/types/CamOverlayAPI/screenSharingSchema.js +8 -0
- package/cjs/types/CamOverlayAPI/serviceCommonTypes.js +91 -0
- package/cjs/types/CamOverlayAPI/webCameraSharingSchema.js +8 -0
- package/cjs/types/CamOverlayDrawingAPI.js +2 -0
- package/cjs/types/CamOverlayPainter.js +14 -0
- package/cjs/types/CamScripterAPI.js +22 -7
- package/cjs/types/CamScripterAPICameraEventsGenerator.js +2 -0
- package/cjs/types/CamStreamerAPI.js +34 -3
- package/cjs/types/CamSwitcherAPI.js +38 -1
- package/cjs/types/CamSwitcherEvents.js +8 -0
- package/cjs/types/GenetecAgent.js +31 -0
- package/cjs/types/PlaneTrackerAPI.js +286 -0
- package/cjs/types/VapixAPI.js +71 -13
- package/cjs/types/VapixEvents.js +2 -0
- package/cjs/web/DefaultClient.js +22 -10
- package/cjs/web/WsClient.js +3 -3
- package/esm/CamOverlayAPI.js +131 -88
- package/esm/CamScripterAPI.js +48 -38
- package/esm/CamStreamerAPI.js +81 -38
- package/esm/CamSwitcherAPI.js +137 -119
- package/esm/CamSwitcherEvents.js +5 -61
- package/esm/PlaneTrackerAPI.js +206 -0
- package/esm/VapixAPI.js +315 -225
- package/esm/{CreatePackage.js → bin/CreatePackage.js} +3 -3
- package/esm/errors/errors.js +66 -0
- package/esm/index.js +12 -3
- package/esm/internal/ProxyClient.js +28 -32
- package/esm/internal/WsEvents.js +68 -0
- package/esm/internal/utils.js +17 -1
- package/esm/{CamOverlayDrawingAPI.js → node/CamOverlayDrawingAPI.js} +2 -2
- package/esm/{CamOverlayPainter → node/CamOverlayPainter}/Frame.js +33 -0
- package/esm/{CamOverlayPainter → node/CamOverlayPainter}/Painter.js +2 -13
- package/esm/{CamOverlayPainter → node/CamOverlayPainter}/ResourceManager.js +7 -5
- package/esm/{CamScripterAPICameraEventsGenerator.js → node/CamScripterAPICameraEventsGenerator.js} +2 -2
- package/esm/node/DefaultClient.js +10 -12
- package/esm/{internal → node}/Digest.js +1 -1
- package/esm/node/HttpRequestSender.js +14 -4
- package/esm/node/HttpServer.js +5 -5
- package/esm/{VapixEvents.js → node/VapixEvents.js} +1 -1
- package/esm/node/WsClient.js +3 -3
- package/esm/{events → node/events}/AxisCameraStationEvents.js +18 -13
- package/esm/node/events/GenetecAgent.js +119 -0
- package/esm/node/index.js +17 -2
- package/esm/types/CamOverlayAPI/CamOverlayAPI.js +76 -0
- package/esm/types/CamOverlayAPI/accuweatherSchema.js +44 -0
- package/esm/types/CamOverlayAPI/customGraphicsSchema.js +69 -0
- package/esm/types/CamOverlayAPI/imagesSchema.js +6 -0
- package/esm/types/CamOverlayAPI/index.js +11 -0
- package/esm/types/CamOverlayAPI/infotickerSchema.js +23 -0
- package/esm/types/CamOverlayAPI/pipSchema.js +36 -0
- package/esm/types/CamOverlayAPI/ptzCompassSchema.js +22 -0
- package/esm/types/CamOverlayAPI/ptzSchema.js +9 -0
- package/esm/types/CamOverlayAPI/scoreBoardSchema.js +129 -0
- package/esm/types/CamOverlayAPI/screenSharingSchema.js +5 -0
- package/esm/types/CamOverlayAPI/serviceCommonTypes.js +88 -0
- package/esm/types/CamOverlayAPI/webCameraSharingSchema.js +5 -0
- package/esm/types/CamOverlayPainter.js +11 -0
- package/esm/types/CamScripterAPI.js +21 -6
- package/esm/types/CamScripterAPICameraEventsGenerator.js +1 -0
- package/esm/types/CamStreamerAPI.js +33 -2
- package/esm/types/CamSwitcherAPI.js +38 -1
- package/esm/types/CamSwitcherEvents.js +8 -0
- package/esm/types/GenetecAgent.js +28 -0
- package/esm/types/PlaneTrackerAPI.js +283 -0
- package/esm/types/VapixAPI.js +70 -12
- package/esm/types/VapixEvents.js +1 -0
- package/esm/web/DefaultClient.js +22 -10
- package/esm/web/WsClient.js +3 -3
- package/package.json +30 -12
- package/types/CamOverlayAPI.d.ts +865 -0
- package/types/CamScripterAPI.d.ts +47 -0
- package/types/CamStreamerAPI.d.ts +64 -0
- package/types/CamSwitcherAPI.d.ts +167 -0
- package/types/CamSwitcherEvents.d.ts +8 -0
- package/types/PlaneTrackerAPI.d.ts +230 -0
- package/types/VapixAPI.d.ts +118 -0
- package/types/bin/CreatePackage.d.ts +1 -0
- package/types/errors/errors.d.ts +68 -0
- package/types/index.d.ts +20 -0
- package/types/internal/ProxyClient.d.ts +10 -0
- package/types/internal/WsEvents.d.ts +41 -0
- package/types/internal/types.d.ts +45 -0
- package/{cjs → types}/internal/utils.d.ts +4 -1
- package/{cjs → types}/internal/versionCompare.d.ts +2 -2
- package/types/node/CamOverlayDrawingAPI.d.ts +41 -0
- package/{esm → types/node}/CamOverlayPainter/Frame.d.ts +8 -37
- package/{cjs → types/node}/CamOverlayPainter/Painter.d.ts +5 -21
- package/types/node/CamOverlayPainter/ResourceManager.d.ts +15 -0
- package/types/node/CamScripterAPICameraEventsGenerator.d.ts +31 -0
- package/types/node/DefaultClient.d.ts +16 -0
- package/{esm → types}/node/HttpRequestSender.d.ts +1 -0
- package/{cjs → types}/node/HttpServer.d.ts +2 -2
- package/types/node/VapixEvents.d.ts +16 -0
- package/{cjs → types}/node/WsClient.d.ts +3 -2
- package/types/node/events/AxisCameraStationEvents.d.ts +12 -0
- package/types/node/events/GenetecAgent.d.ts +16 -0
- package/types/node/index.d.ts +17 -0
- package/types/types/CamOverlayAPI/CamOverlayAPI.d.ts +4321 -0
- package/types/types/CamOverlayAPI/accuweatherSchema.d.ts +84 -0
- package/types/types/CamOverlayAPI/customGraphicsSchema.d.ts +700 -0
- package/types/types/CamOverlayAPI/imagesSchema.d.ts +95 -0
- package/types/types/CamOverlayAPI/index.d.ts +11 -0
- package/types/types/CamOverlayAPI/infotickerSchema.d.ts +96 -0
- package/types/types/CamOverlayAPI/pipSchema.d.ts +125 -0
- package/types/types/CamOverlayAPI/ptzCompassSchema.d.ts +93 -0
- package/types/types/CamOverlayAPI/ptzSchema.d.ts +118 -0
- package/types/types/CamOverlayAPI/scoreBoardSchema.d.ts +357 -0
- package/types/types/CamOverlayAPI/screenSharingSchema.d.ts +58 -0
- package/types/types/CamOverlayAPI/serviceCommonTypes.d.ts +145 -0
- package/types/types/CamOverlayAPI/webCameraSharingSchema.d.ts +58 -0
- package/types/types/CamOverlayDrawingAPI.d.ts +48 -0
- package/types/types/CamOverlayPainter.d.ts +76 -0
- package/types/types/CamScripterAPI.d.ts +130 -0
- package/types/types/CamScripterAPICameraEventsGenerator.d.ts +45 -0
- package/types/types/CamStreamerAPI.d.ts +272 -0
- package/{esm → types}/types/CamSwitcherAPI.d.ts +115 -36
- package/{cjs → types}/types/CamSwitcherEvents.d.ts +77 -0
- package/{esm/events → types/types}/GenetecAgent.d.ts +47 -47
- package/types/types/PlaneTrackerAPI.d.ts +890 -0
- package/{cjs → types}/types/VapixAPI.d.ts +647 -465
- package/types/types/VapixEvents.d.ts +15 -0
- package/{esm → types}/types/common.d.ts +15 -5
- package/types/web/DefaultClient.d.ts +6 -0
- package/cjs/CamOverlayAPI.d.ts +0 -31
- package/cjs/CamOverlayDrawingAPI.d.ts +0 -86
- package/cjs/CamOverlayPainter/Frame.d.ts +0 -96
- package/cjs/CamOverlayPainter/ResourceManager.d.ts +0 -14
- package/cjs/CamOverlayPainter/ResourceManager.js +0 -46
- package/cjs/CamScripterAPI.d.ts +0 -19
- package/cjs/CamScripterAPICameraEventsGenerator.d.ts +0 -74
- package/cjs/CamStreamerAPI.d.ts +0 -16
- package/cjs/CamSwitcherAPI.d.ts +0 -48
- package/cjs/CamSwitcherEvents.d.ts +0 -18
- package/cjs/VapixAPI.d.ts +0 -66
- package/cjs/VapixEvents.d.ts +0 -43
- package/cjs/errors/errors.d.ts +0 -34
- package/cjs/events/AxisCameraStationEvents.d.ts +0 -9
- package/cjs/events/AxisCameraStationEvents.js +0 -48
- package/cjs/events/GenetecAgent.d.ts +0 -174
- package/cjs/events/GenetecAgent.js +0 -123
- package/cjs/index.d.ts +0 -11
- package/cjs/internal/ProxyClient.d.ts +0 -11
- package/cjs/internal/common.d.ts +0 -39
- package/cjs/internal/common.js +0 -27
- package/cjs/node/DefaultClient.d.ts +0 -15
- package/cjs/node/HttpRequestSender.d.ts +0 -28
- package/cjs/node/WsEventClient.d.ts +0 -13
- package/cjs/node/WsEventClient.js +0 -22
- package/cjs/types/CamOverlayAPI.d.ts +0 -188
- package/cjs/types/CamOverlayAPI.js +0 -47
- package/cjs/types/CamScripterAPI.d.ts +0 -67
- package/cjs/types/CamStreamerAPI.d.ts +0 -139
- package/cjs/types/CamSwitcherAPI.d.ts +0 -814
- package/cjs/types/common.d.ts +0 -37
- package/cjs/web/DefaultClient.d.ts +0 -6
- package/cjs/web/index.d.ts +0 -2
- package/esm/CamOverlayAPI.d.ts +0 -31
- package/esm/CamOverlayDrawingAPI.d.ts +0 -86
- package/esm/CamOverlayPainter/Painter.d.ts +0 -48
- package/esm/CamOverlayPainter/ResourceManager.d.ts +0 -14
- package/esm/CamScripterAPI.d.ts +0 -19
- package/esm/CamScripterAPICameraEventsGenerator.d.ts +0 -74
- package/esm/CamStreamerAPI.d.ts +0 -16
- package/esm/CamSwitcherAPI.d.ts +0 -48
- package/esm/CamSwitcherEvents.d.ts +0 -18
- package/esm/VapixAPI.d.ts +0 -66
- package/esm/VapixEvents.d.ts +0 -43
- package/esm/errors/errors.d.ts +0 -34
- package/esm/events/AxisCameraStationEvents.d.ts +0 -9
- package/esm/events/GenetecAgent.js +0 -119
- package/esm/index.d.ts +0 -11
- package/esm/internal/Digest.d.ts +0 -4
- package/esm/internal/ProxyClient.d.ts +0 -11
- package/esm/internal/common.d.ts +0 -39
- package/esm/internal/common.js +0 -20
- package/esm/internal/constants.d.ts +0 -1
- package/esm/internal/transformers.d.ts +0 -5
- package/esm/internal/utils.d.ts +0 -11
- package/esm/internal/versionCompare.d.ts +0 -6
- package/esm/node/DefaultClient.d.ts +0 -15
- package/esm/node/HttpServer.d.ts +0 -21
- package/esm/node/WsClient.d.ts +0 -39
- package/esm/node/WsEventClient.d.ts +0 -13
- package/esm/node/WsEventClient.js +0 -18
- package/esm/node/index.d.ts +0 -2
- package/esm/types/CamOverlayAPI.d.ts +0 -188
- package/esm/types/CamOverlayAPI.js +0 -44
- package/esm/types/CamScripterAPI.d.ts +0 -67
- package/esm/types/CamStreamerAPI.d.ts +0 -139
- package/esm/types/CamSwitcherEvents.d.ts +0 -491
- package/esm/types/VapixAPI.d.ts +0 -1683
- package/esm/web/DefaultClient.d.ts +0 -6
- package/esm/web/WsClient.d.ts +0 -13
- package/esm/web/index.d.ts +0 -2
- /package/{cjs/CreatePackage.d.ts → esm/internal/types.js} +0 -0
- /package/esm/{CreatePackage.d.ts → types/CamOverlayDrawingAPI.js} +0 -0
- /package/{cjs → types}/internal/constants.d.ts +0 -0
- /package/{cjs → types}/internal/transformers.d.ts +0 -0
- /package/{cjs/internal → types/node}/Digest.d.ts +0 -0
- /package/{cjs → types}/web/WsClient.d.ts +0 -0
- /package/{cjs/node → types/web}/index.d.ts +0 -0
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { CamOverlayDrawingAPI } from '../node/CamOverlayDrawingAPI';
|
|
2
|
+
import { TAlign, TCairoCreateResponse, TUploadImageResponse } from './CamOverlayDrawingAPI';
|
|
3
|
+
export declare const COORD: {
|
|
4
|
+
readonly top_left: readonly [-1, -1];
|
|
5
|
+
readonly center_left: readonly [-1, 0];
|
|
6
|
+
readonly bottom_left: readonly [-1, 1];
|
|
7
|
+
readonly top_center: readonly [0, -1];
|
|
8
|
+
readonly center: readonly [0, 0];
|
|
9
|
+
readonly bottom_center: readonly [0, 1];
|
|
10
|
+
readonly top_right: readonly [1, -1];
|
|
11
|
+
readonly center_right: readonly [1, 0];
|
|
12
|
+
readonly bottom_right: readonly [1, 1];
|
|
13
|
+
};
|
|
14
|
+
export type TRgb = [number, number, number];
|
|
15
|
+
export type TRgba = [number, number, number, number];
|
|
16
|
+
export type TTmf = 'TFM_OVERFLOW' | 'TFM_SCALE' | 'TFM_TRUNCATE';
|
|
17
|
+
export type TObjectFitType = 'fill' | 'fit' | 'none';
|
|
18
|
+
export type TFrameOptions = {
|
|
19
|
+
enabled?: boolean;
|
|
20
|
+
x: number;
|
|
21
|
+
y: number;
|
|
22
|
+
width: number;
|
|
23
|
+
height: number;
|
|
24
|
+
text?: string;
|
|
25
|
+
fontColor?: TRgb;
|
|
26
|
+
font?: string;
|
|
27
|
+
bgColor?: TRgba;
|
|
28
|
+
bgImage?: string;
|
|
29
|
+
bgType?: TObjectFitType;
|
|
30
|
+
borderRadius?: number;
|
|
31
|
+
borderWidth?: number;
|
|
32
|
+
borderColor?: TRgba;
|
|
33
|
+
customDraw?: TDrawingCallback;
|
|
34
|
+
layer?: number;
|
|
35
|
+
};
|
|
36
|
+
export type TFrameInfo = {
|
|
37
|
+
width: number;
|
|
38
|
+
height: number;
|
|
39
|
+
};
|
|
40
|
+
export type TDrawingCallback = (cod: CamOverlayDrawingAPI, cairo: string, info: TFrameInfo) => Promise<void>;
|
|
41
|
+
export type TFrame = {
|
|
42
|
+
x: number;
|
|
43
|
+
y: number;
|
|
44
|
+
width: number;
|
|
45
|
+
height: number;
|
|
46
|
+
};
|
|
47
|
+
export type TText = {
|
|
48
|
+
text: string;
|
|
49
|
+
textAlign: TAlign;
|
|
50
|
+
textType: TTmf;
|
|
51
|
+
fontColor: TRgb;
|
|
52
|
+
font: TCairoCreateResponse | undefined;
|
|
53
|
+
fontName: string | undefined;
|
|
54
|
+
};
|
|
55
|
+
export type TBg = {
|
|
56
|
+
bgColor: TRgba | undefined;
|
|
57
|
+
bgImage: TUploadImageResponse | undefined;
|
|
58
|
+
bgImageName: string | undefined;
|
|
59
|
+
bgType: TObjectFitType | undefined;
|
|
60
|
+
};
|
|
61
|
+
export type TBorder = {
|
|
62
|
+
borderRadius: number;
|
|
63
|
+
borderWidth: number;
|
|
64
|
+
borderColor: TRgba;
|
|
65
|
+
};
|
|
66
|
+
export type TCoAlignment = keyof typeof COORD;
|
|
67
|
+
export type TPainterOptions = TFrameOptions & {
|
|
68
|
+
screenWidth: number;
|
|
69
|
+
screenHeight: number;
|
|
70
|
+
coAlignment: TCoAlignment;
|
|
71
|
+
};
|
|
72
|
+
export type TLayer = {
|
|
73
|
+
layer: number;
|
|
74
|
+
surfaceCache?: string;
|
|
75
|
+
cairoCache?: string;
|
|
76
|
+
};
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export type TCameraStorageType = 'INTERNAL' | 'SD_CARD';
|
|
3
|
+
export declare const nodeStateSchema: z.ZodObject<{
|
|
4
|
+
node_state: z.ZodUnion<[z.ZodLiteral<"OK">, z.ZodLiteral<"NOT_INSTALLED">, z.ZodLiteral<"NOT_FOUND">]>;
|
|
5
|
+
}, "strip", z.ZodTypeAny, {
|
|
6
|
+
node_state: "OK" | "NOT_INSTALLED" | "NOT_FOUND";
|
|
7
|
+
}, {
|
|
8
|
+
node_state: "OK" | "NOT_INSTALLED" | "NOT_FOUND";
|
|
9
|
+
}>;
|
|
10
|
+
export type TNodeState = z.infer<typeof nodeStateSchema>;
|
|
11
|
+
export declare const packageInfoListSchema: z.ZodArray<z.ZodObject<{
|
|
12
|
+
storage: z.ZodUnion<[z.ZodLiteral<"SD_CARD">, z.ZodLiteral<"INTERNAL">]>;
|
|
13
|
+
manifest: z.ZodObject<{
|
|
14
|
+
package_name: z.ZodString;
|
|
15
|
+
package_menu_name: z.ZodString;
|
|
16
|
+
package_version: z.ZodString;
|
|
17
|
+
vendor: z.ZodString;
|
|
18
|
+
required_camscripter_version: z.ZodOptional<z.ZodString>;
|
|
19
|
+
required_camscripter_rbi_version: z.ZodOptional<z.ZodString>;
|
|
20
|
+
ui_link: z.ZodString;
|
|
21
|
+
}, "strip", z.ZodTypeAny, {
|
|
22
|
+
package_name: string;
|
|
23
|
+
package_menu_name: string;
|
|
24
|
+
package_version: string;
|
|
25
|
+
vendor: string;
|
|
26
|
+
ui_link: string;
|
|
27
|
+
required_camscripter_version?: string | undefined;
|
|
28
|
+
required_camscripter_rbi_version?: string | undefined;
|
|
29
|
+
}, {
|
|
30
|
+
package_name: string;
|
|
31
|
+
package_menu_name: string;
|
|
32
|
+
package_version: string;
|
|
33
|
+
vendor: string;
|
|
34
|
+
ui_link: string;
|
|
35
|
+
required_camscripter_version?: string | undefined;
|
|
36
|
+
required_camscripter_rbi_version?: string | undefined;
|
|
37
|
+
}>;
|
|
38
|
+
}, "strip", z.ZodTypeAny, {
|
|
39
|
+
storage: "INTERNAL" | "SD_CARD";
|
|
40
|
+
manifest: {
|
|
41
|
+
package_name: string;
|
|
42
|
+
package_menu_name: string;
|
|
43
|
+
package_version: string;
|
|
44
|
+
vendor: string;
|
|
45
|
+
ui_link: string;
|
|
46
|
+
required_camscripter_version?: string | undefined;
|
|
47
|
+
required_camscripter_rbi_version?: string | undefined;
|
|
48
|
+
};
|
|
49
|
+
}, {
|
|
50
|
+
storage: "INTERNAL" | "SD_CARD";
|
|
51
|
+
manifest: {
|
|
52
|
+
package_name: string;
|
|
53
|
+
package_menu_name: string;
|
|
54
|
+
package_version: string;
|
|
55
|
+
vendor: string;
|
|
56
|
+
ui_link: string;
|
|
57
|
+
required_camscripter_version?: string | undefined;
|
|
58
|
+
required_camscripter_rbi_version?: string | undefined;
|
|
59
|
+
};
|
|
60
|
+
}>, "many">;
|
|
61
|
+
export type TPackageInfoList = z.infer<typeof packageInfoListSchema>;
|
|
62
|
+
export declare const packageConfigSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
63
|
+
enabled: z.ZodBoolean;
|
|
64
|
+
}, "strip", z.ZodTypeAny, {
|
|
65
|
+
enabled: boolean;
|
|
66
|
+
}, {
|
|
67
|
+
enabled: boolean;
|
|
68
|
+
}>>;
|
|
69
|
+
export type TPackageConfig = z.infer<typeof packageConfigSchema>;
|
|
70
|
+
export type TServerPackageData = {
|
|
71
|
+
name: string;
|
|
72
|
+
package_menu_name: string;
|
|
73
|
+
version: string;
|
|
74
|
+
vendor: string;
|
|
75
|
+
};
|
|
76
|
+
export declare const cameraStorageSchema: z.ZodUnion<[z.ZodTuple<[z.ZodObject<{
|
|
77
|
+
type: z.ZodLiteral<"INTERNAL">;
|
|
78
|
+
capacity_mb: z.ZodNumber;
|
|
79
|
+
}, "strip", z.ZodTypeAny, {
|
|
80
|
+
type: "INTERNAL";
|
|
81
|
+
capacity_mb: number;
|
|
82
|
+
}, {
|
|
83
|
+
type: "INTERNAL";
|
|
84
|
+
capacity_mb: number;
|
|
85
|
+
}>, z.ZodObject<{
|
|
86
|
+
type: z.ZodLiteral<"SD_CARD">;
|
|
87
|
+
capacity_mb: z.ZodNumber;
|
|
88
|
+
}, "strip", z.ZodTypeAny, {
|
|
89
|
+
type: "SD_CARD";
|
|
90
|
+
capacity_mb: number;
|
|
91
|
+
}, {
|
|
92
|
+
type: "SD_CARD";
|
|
93
|
+
capacity_mb: number;
|
|
94
|
+
}>], null>, z.ZodTuple<[z.ZodObject<{
|
|
95
|
+
type: z.ZodLiteral<"INTERNAL">;
|
|
96
|
+
capacity_mb: z.ZodNumber;
|
|
97
|
+
}, "strip", z.ZodTypeAny, {
|
|
98
|
+
type: "INTERNAL";
|
|
99
|
+
capacity_mb: number;
|
|
100
|
+
}, {
|
|
101
|
+
type: "INTERNAL";
|
|
102
|
+
capacity_mb: number;
|
|
103
|
+
}>], null>]>;
|
|
104
|
+
export type TCameraStorage = z.infer<typeof cameraStorageSchema>;
|
|
105
|
+
export type TStorageParsedData = {
|
|
106
|
+
size: number;
|
|
107
|
+
storageType: TCameraStorageType;
|
|
108
|
+
}[];
|
|
109
|
+
export declare const camscripterApiResponseSchema: z.ZodObject<{
|
|
110
|
+
status: z.ZodNumber;
|
|
111
|
+
message: z.ZodString;
|
|
112
|
+
}, "strip", z.ZodTypeAny, {
|
|
113
|
+
status: number;
|
|
114
|
+
message: string;
|
|
115
|
+
}, {
|
|
116
|
+
status: number;
|
|
117
|
+
message: string;
|
|
118
|
+
}>;
|
|
119
|
+
export type TCamscripterApiResponse = z.infer<typeof camscripterApiResponseSchema>;
|
|
120
|
+
export declare const cameraTimeResponseSchema: z.ZodObject<{
|
|
121
|
+
state: z.ZodBoolean;
|
|
122
|
+
code: z.ZodNumber;
|
|
123
|
+
}, "strip", z.ZodTypeAny, {
|
|
124
|
+
code: number;
|
|
125
|
+
state: boolean;
|
|
126
|
+
}, {
|
|
127
|
+
code: number;
|
|
128
|
+
state: boolean;
|
|
129
|
+
}>;
|
|
130
|
+
export type TCameraTimeResponse = z.infer<typeof cameraTimeResponseSchema>;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
export type TDeclaration = {
|
|
2
|
+
type?: '' | 'SOURCE' | 'DATA';
|
|
3
|
+
namespace: string;
|
|
4
|
+
key: string;
|
|
5
|
+
value: string | boolean | number;
|
|
6
|
+
value_type: 'STRING' | 'INT' | 'BOOL' | 'DOUBLE';
|
|
7
|
+
key_nice_name?: string;
|
|
8
|
+
value_nice_name?: string;
|
|
9
|
+
};
|
|
10
|
+
export type TEventDeclaration = {
|
|
11
|
+
declaration_id: string;
|
|
12
|
+
stateless: boolean;
|
|
13
|
+
declaration: TDeclaration[];
|
|
14
|
+
};
|
|
15
|
+
export type TEventUndeclaration = {
|
|
16
|
+
declaration_id: string;
|
|
17
|
+
};
|
|
18
|
+
export type TEventData = {
|
|
19
|
+
namespace: string;
|
|
20
|
+
key: string;
|
|
21
|
+
value: string | boolean | number;
|
|
22
|
+
value_type: 'STRING' | 'INT' | 'BOOL' | 'DOUBLE';
|
|
23
|
+
};
|
|
24
|
+
export type TCamScripterEvent = {
|
|
25
|
+
declaration_id: string;
|
|
26
|
+
event_data: TEventData[];
|
|
27
|
+
};
|
|
28
|
+
export type TCamScripterResponse = {
|
|
29
|
+
call_id: number;
|
|
30
|
+
message: string;
|
|
31
|
+
};
|
|
32
|
+
export type TCamScripterErrorResponse = {
|
|
33
|
+
error: string;
|
|
34
|
+
call_id?: number;
|
|
35
|
+
};
|
|
36
|
+
export type TCamScripterMessage = {
|
|
37
|
+
call_id: number;
|
|
38
|
+
command: string;
|
|
39
|
+
data: unknown;
|
|
40
|
+
};
|
|
41
|
+
export type TAsyncMessage = {
|
|
42
|
+
resolve: (value: TCamScripterResponse) => void;
|
|
43
|
+
reject: (reason?: any) => void;
|
|
44
|
+
sentTimestamp: number;
|
|
45
|
+
};
|
|
@@ -0,0 +1,272 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const cameraStreamSchema: z.ZodObject<{
|
|
3
|
+
enabled: z.ZodString;
|
|
4
|
+
active: z.ZodString;
|
|
5
|
+
audioSource: z.ZodString;
|
|
6
|
+
avSyncMsec: z.ZodString;
|
|
7
|
+
internalVapixParameters: z.ZodString;
|
|
8
|
+
userVapixParameters: z.ZodString;
|
|
9
|
+
outputParameters: z.ZodString;
|
|
10
|
+
outputType: z.ZodString;
|
|
11
|
+
mediaServerUrl: z.ZodString;
|
|
12
|
+
inputType: z.ZodString;
|
|
13
|
+
inputUrl: z.ZodString;
|
|
14
|
+
forceStereo: z.ZodString;
|
|
15
|
+
streamDelay: z.ZodString;
|
|
16
|
+
statusLed: z.ZodString;
|
|
17
|
+
statusPort: z.ZodString;
|
|
18
|
+
callApi: z.ZodString;
|
|
19
|
+
trigger: z.ZodString;
|
|
20
|
+
schedule: z.ZodString;
|
|
21
|
+
prepareAhead: z.ZodString;
|
|
22
|
+
startTime: z.ZodString;
|
|
23
|
+
stopTime: z.ZodString;
|
|
24
|
+
}, "strip", z.ZodTypeAny, {
|
|
25
|
+
enabled: string;
|
|
26
|
+
schedule: string;
|
|
27
|
+
active: string;
|
|
28
|
+
audioSource: string;
|
|
29
|
+
avSyncMsec: string;
|
|
30
|
+
internalVapixParameters: string;
|
|
31
|
+
userVapixParameters: string;
|
|
32
|
+
outputParameters: string;
|
|
33
|
+
outputType: string;
|
|
34
|
+
mediaServerUrl: string;
|
|
35
|
+
inputType: string;
|
|
36
|
+
inputUrl: string;
|
|
37
|
+
forceStereo: string;
|
|
38
|
+
streamDelay: string;
|
|
39
|
+
statusLed: string;
|
|
40
|
+
statusPort: string;
|
|
41
|
+
callApi: string;
|
|
42
|
+
trigger: string;
|
|
43
|
+
prepareAhead: string;
|
|
44
|
+
startTime: string;
|
|
45
|
+
stopTime: string;
|
|
46
|
+
}, {
|
|
47
|
+
enabled: string;
|
|
48
|
+
schedule: string;
|
|
49
|
+
active: string;
|
|
50
|
+
audioSource: string;
|
|
51
|
+
avSyncMsec: string;
|
|
52
|
+
internalVapixParameters: string;
|
|
53
|
+
userVapixParameters: string;
|
|
54
|
+
outputParameters: string;
|
|
55
|
+
outputType: string;
|
|
56
|
+
mediaServerUrl: string;
|
|
57
|
+
inputType: string;
|
|
58
|
+
inputUrl: string;
|
|
59
|
+
forceStereo: string;
|
|
60
|
+
streamDelay: string;
|
|
61
|
+
statusLed: string;
|
|
62
|
+
statusPort: string;
|
|
63
|
+
callApi: string;
|
|
64
|
+
trigger: string;
|
|
65
|
+
prepareAhead: string;
|
|
66
|
+
startTime: string;
|
|
67
|
+
stopTime: string;
|
|
68
|
+
}>;
|
|
69
|
+
export type TCameraStream = z.infer<typeof cameraStreamSchema>;
|
|
70
|
+
export declare const streamSchema: z.ZodObject<{
|
|
71
|
+
enabled: z.ZodUnion<[z.ZodLiteral<0>, z.ZodLiteral<1>]>;
|
|
72
|
+
active: z.ZodUnion<[z.ZodLiteral<0>, z.ZodLiteral<1>]>;
|
|
73
|
+
audioSource: z.ZodString;
|
|
74
|
+
avSyncMsec: z.ZodNumber;
|
|
75
|
+
internalVapixParameters: z.ZodString;
|
|
76
|
+
userVapixParameters: z.ZodString;
|
|
77
|
+
outputParameters: z.ZodString;
|
|
78
|
+
outputType: z.ZodUnion<[z.ZodLiteral<"video">, z.ZodLiteral<"images">, z.ZodLiteral<"none">]>;
|
|
79
|
+
mediaServerUrl: z.ZodString;
|
|
80
|
+
inputType: z.ZodUnion<[z.ZodLiteral<"CSw">, z.ZodLiteral<"CRS">, z.ZodLiteral<"RTSP_URL">]>;
|
|
81
|
+
inputUrl: z.ZodString;
|
|
82
|
+
forceStereo: z.ZodUnion<[z.ZodLiteral<0>, z.ZodLiteral<1>]>;
|
|
83
|
+
streamDelay: z.ZodNullable<z.ZodNumber>;
|
|
84
|
+
statusLed: z.ZodNumber;
|
|
85
|
+
statusPort: z.ZodString;
|
|
86
|
+
callApi: z.ZodNumber;
|
|
87
|
+
trigger: z.ZodString;
|
|
88
|
+
schedule: z.ZodString;
|
|
89
|
+
prepareAhead: z.ZodNumber;
|
|
90
|
+
startTime: z.ZodNullable<z.ZodNumber>;
|
|
91
|
+
stopTime: z.ZodNullable<z.ZodNumber>;
|
|
92
|
+
}, "strip", z.ZodTypeAny, {
|
|
93
|
+
enabled: 0 | 1;
|
|
94
|
+
schedule: string;
|
|
95
|
+
active: 0 | 1;
|
|
96
|
+
audioSource: string;
|
|
97
|
+
avSyncMsec: number;
|
|
98
|
+
internalVapixParameters: string;
|
|
99
|
+
userVapixParameters: string;
|
|
100
|
+
outputParameters: string;
|
|
101
|
+
outputType: "video" | "none" | "images";
|
|
102
|
+
mediaServerUrl: string;
|
|
103
|
+
inputType: "RTSP_URL" | "CSw" | "CRS";
|
|
104
|
+
inputUrl: string;
|
|
105
|
+
forceStereo: 0 | 1;
|
|
106
|
+
streamDelay: number | null;
|
|
107
|
+
statusLed: number;
|
|
108
|
+
statusPort: string;
|
|
109
|
+
callApi: number;
|
|
110
|
+
trigger: string;
|
|
111
|
+
prepareAhead: number;
|
|
112
|
+
startTime: number | null;
|
|
113
|
+
stopTime: number | null;
|
|
114
|
+
}, {
|
|
115
|
+
enabled: 0 | 1;
|
|
116
|
+
schedule: string;
|
|
117
|
+
active: 0 | 1;
|
|
118
|
+
audioSource: string;
|
|
119
|
+
avSyncMsec: number;
|
|
120
|
+
internalVapixParameters: string;
|
|
121
|
+
userVapixParameters: string;
|
|
122
|
+
outputParameters: string;
|
|
123
|
+
outputType: "video" | "none" | "images";
|
|
124
|
+
mediaServerUrl: string;
|
|
125
|
+
inputType: "RTSP_URL" | "CSw" | "CRS";
|
|
126
|
+
inputUrl: string;
|
|
127
|
+
forceStereo: 0 | 1;
|
|
128
|
+
streamDelay: number | null;
|
|
129
|
+
statusLed: number;
|
|
130
|
+
statusPort: string;
|
|
131
|
+
callApi: number;
|
|
132
|
+
trigger: string;
|
|
133
|
+
prepareAhead: number;
|
|
134
|
+
startTime: number | null;
|
|
135
|
+
stopTime: number | null;
|
|
136
|
+
}>;
|
|
137
|
+
export type TStream = z.infer<typeof streamSchema>;
|
|
138
|
+
export declare const cameraStreamResponseSchema: z.ZodObject<{
|
|
139
|
+
data: z.ZodObject<{
|
|
140
|
+
enabled: z.ZodString;
|
|
141
|
+
active: z.ZodString;
|
|
142
|
+
audioSource: z.ZodString;
|
|
143
|
+
avSyncMsec: z.ZodString;
|
|
144
|
+
internalVapixParameters: z.ZodString;
|
|
145
|
+
userVapixParameters: z.ZodString;
|
|
146
|
+
outputParameters: z.ZodString;
|
|
147
|
+
outputType: z.ZodString;
|
|
148
|
+
mediaServerUrl: z.ZodString;
|
|
149
|
+
inputType: z.ZodString;
|
|
150
|
+
inputUrl: z.ZodString;
|
|
151
|
+
forceStereo: z.ZodString;
|
|
152
|
+
streamDelay: z.ZodString;
|
|
153
|
+
statusLed: z.ZodString;
|
|
154
|
+
statusPort: z.ZodString;
|
|
155
|
+
callApi: z.ZodString;
|
|
156
|
+
trigger: z.ZodString;
|
|
157
|
+
schedule: z.ZodString;
|
|
158
|
+
prepareAhead: z.ZodString;
|
|
159
|
+
startTime: z.ZodString;
|
|
160
|
+
stopTime: z.ZodString;
|
|
161
|
+
}, "strip", z.ZodTypeAny, {
|
|
162
|
+
enabled: string;
|
|
163
|
+
schedule: string;
|
|
164
|
+
active: string;
|
|
165
|
+
audioSource: string;
|
|
166
|
+
avSyncMsec: string;
|
|
167
|
+
internalVapixParameters: string;
|
|
168
|
+
userVapixParameters: string;
|
|
169
|
+
outputParameters: string;
|
|
170
|
+
outputType: string;
|
|
171
|
+
mediaServerUrl: string;
|
|
172
|
+
inputType: string;
|
|
173
|
+
inputUrl: string;
|
|
174
|
+
forceStereo: string;
|
|
175
|
+
streamDelay: string;
|
|
176
|
+
statusLed: string;
|
|
177
|
+
statusPort: string;
|
|
178
|
+
callApi: string;
|
|
179
|
+
trigger: string;
|
|
180
|
+
prepareAhead: string;
|
|
181
|
+
startTime: string;
|
|
182
|
+
stopTime: string;
|
|
183
|
+
}, {
|
|
184
|
+
enabled: string;
|
|
185
|
+
schedule: string;
|
|
186
|
+
active: string;
|
|
187
|
+
audioSource: string;
|
|
188
|
+
avSyncMsec: string;
|
|
189
|
+
internalVapixParameters: string;
|
|
190
|
+
userVapixParameters: string;
|
|
191
|
+
outputParameters: string;
|
|
192
|
+
outputType: string;
|
|
193
|
+
mediaServerUrl: string;
|
|
194
|
+
inputType: string;
|
|
195
|
+
inputUrl: string;
|
|
196
|
+
forceStereo: string;
|
|
197
|
+
streamDelay: string;
|
|
198
|
+
statusLed: string;
|
|
199
|
+
statusPort: string;
|
|
200
|
+
callApi: string;
|
|
201
|
+
trigger: string;
|
|
202
|
+
prepareAhead: string;
|
|
203
|
+
startTime: string;
|
|
204
|
+
stopTime: string;
|
|
205
|
+
}>;
|
|
206
|
+
code: z.ZodNumber;
|
|
207
|
+
message: z.ZodString;
|
|
208
|
+
}, "strip", z.ZodTypeAny, {
|
|
209
|
+
code: number;
|
|
210
|
+
message: string;
|
|
211
|
+
data: {
|
|
212
|
+
enabled: string;
|
|
213
|
+
schedule: string;
|
|
214
|
+
active: string;
|
|
215
|
+
audioSource: string;
|
|
216
|
+
avSyncMsec: string;
|
|
217
|
+
internalVapixParameters: string;
|
|
218
|
+
userVapixParameters: string;
|
|
219
|
+
outputParameters: string;
|
|
220
|
+
outputType: string;
|
|
221
|
+
mediaServerUrl: string;
|
|
222
|
+
inputType: string;
|
|
223
|
+
inputUrl: string;
|
|
224
|
+
forceStereo: string;
|
|
225
|
+
streamDelay: string;
|
|
226
|
+
statusLed: string;
|
|
227
|
+
statusPort: string;
|
|
228
|
+
callApi: string;
|
|
229
|
+
trigger: string;
|
|
230
|
+
prepareAhead: string;
|
|
231
|
+
startTime: string;
|
|
232
|
+
stopTime: string;
|
|
233
|
+
};
|
|
234
|
+
}, {
|
|
235
|
+
code: number;
|
|
236
|
+
message: string;
|
|
237
|
+
data: {
|
|
238
|
+
enabled: string;
|
|
239
|
+
schedule: string;
|
|
240
|
+
active: string;
|
|
241
|
+
audioSource: string;
|
|
242
|
+
avSyncMsec: string;
|
|
243
|
+
internalVapixParameters: string;
|
|
244
|
+
userVapixParameters: string;
|
|
245
|
+
outputParameters: string;
|
|
246
|
+
outputType: string;
|
|
247
|
+
mediaServerUrl: string;
|
|
248
|
+
inputType: string;
|
|
249
|
+
inputUrl: string;
|
|
250
|
+
forceStereo: string;
|
|
251
|
+
streamDelay: string;
|
|
252
|
+
statusLed: string;
|
|
253
|
+
statusPort: string;
|
|
254
|
+
callApi: string;
|
|
255
|
+
trigger: string;
|
|
256
|
+
prepareAhead: string;
|
|
257
|
+
startTime: string;
|
|
258
|
+
stopTime: string;
|
|
259
|
+
};
|
|
260
|
+
}>;
|
|
261
|
+
export type TStreamCameraDataResponse = z.infer<typeof cameraStreamResponseSchema>;
|
|
262
|
+
export declare const camstreamerServerResponseSchema: z.ZodObject<{
|
|
263
|
+
code: z.ZodNumber;
|
|
264
|
+
message: z.ZodString;
|
|
265
|
+
}, "strip", z.ZodTypeAny, {
|
|
266
|
+
code: number;
|
|
267
|
+
message: string;
|
|
268
|
+
}, {
|
|
269
|
+
code: number;
|
|
270
|
+
message: string;
|
|
271
|
+
}>;
|
|
272
|
+
export type TCamstreamerServerResponse = z.infer<typeof camstreamerServerResponseSchema>;
|