camstreamerlib 4.0.0-beta.7 → 4.0.0-beta.9

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.
Files changed (97) hide show
  1. package/cjs/CamOverlayAPI.d.ts +614 -17
  2. package/cjs/CamOverlayAPI.js +124 -51
  3. package/cjs/CamScripterAPI.d.ts +4 -4
  4. package/cjs/CamScripterAPI.js +2 -8
  5. package/cjs/VapixAPI.d.ts +1 -1
  6. package/cjs/VapixAPI.js +13 -5
  7. package/cjs/errors/errors.d.ts +3 -0
  8. package/cjs/errors/errors.js +8 -1
  9. package/cjs/index.d.ts +3 -0
  10. package/cjs/index.js +5 -1
  11. package/cjs/internal/ProxyClient.d.ts +3 -3
  12. package/cjs/internal/ProxyClient.js +4 -2
  13. package/cjs/internal/common.d.ts +2 -2
  14. package/cjs/models/CamOverlayAPI/accuweatherSchema.d.ts +84 -0
  15. package/cjs/models/CamOverlayAPI/accuweatherSchema.js +48 -0
  16. package/cjs/models/CamOverlayAPI/constants.d.ts +11 -0
  17. package/cjs/models/CamOverlayAPI/constants.js +14 -0
  18. package/cjs/models/CamOverlayAPI/customGraphicsSchema.d.ts +699 -0
  19. package/cjs/models/CamOverlayAPI/customGraphicsSchema.js +73 -0
  20. package/cjs/models/CamOverlayAPI/fileSchema.d.ts +28 -0
  21. package/cjs/models/CamOverlayAPI/fileSchema.js +17 -0
  22. package/cjs/models/CamOverlayAPI/imagesSchema.d.ts +95 -0
  23. package/cjs/models/CamOverlayAPI/imagesSchema.js +10 -0
  24. package/cjs/models/CamOverlayAPI/index.d.ts +13 -0
  25. package/cjs/models/CamOverlayAPI/index.js +29 -0
  26. package/cjs/models/CamOverlayAPI/infotickerSchema.d.ts +96 -0
  27. package/cjs/models/CamOverlayAPI/infotickerSchema.js +27 -0
  28. package/cjs/models/CamOverlayAPI/pipSchema.d.ts +125 -0
  29. package/cjs/models/CamOverlayAPI/pipSchema.js +40 -0
  30. package/cjs/models/CamOverlayAPI/ptzCompassSchema.d.ts +93 -0
  31. package/cjs/models/CamOverlayAPI/ptzCompassSchema.js +26 -0
  32. package/cjs/models/CamOverlayAPI/ptzSchema.d.ts +118 -0
  33. package/cjs/models/CamOverlayAPI/ptzSchema.js +13 -0
  34. package/cjs/models/CamOverlayAPI/screenSharingSchema.d.ts +58 -0
  35. package/cjs/models/CamOverlayAPI/screenSharingSchema.js +9 -0
  36. package/cjs/models/CamOverlayAPI/webCameraSharingSchema.d.ts +58 -0
  37. package/cjs/models/CamOverlayAPI/webCameraSharingSchema.js +9 -0
  38. package/cjs/models/CamOverlayAPI/widgetCommonSchema.d.ts +126 -0
  39. package/cjs/models/CamOverlayAPI/widgetCommonSchema.js +76 -0
  40. package/cjs/models/CamOverlayAPI/widgetsSchema.d.ts +2823 -0
  41. package/cjs/models/CamOverlayAPI/widgetsSchema.js +27 -0
  42. package/cjs/types/CamOverlayAPI.d.ts +315 -175
  43. package/cjs/types/CamOverlayAPI.js +19 -40
  44. package/cjs/types/CamStreamerAPI.d.ts +4 -4
  45. package/cjs/types/CamSwitcherAPI.d.ts +44 -44
  46. package/cjs/types/VapixAPI.d.ts +84 -84
  47. package/cjs/web/DefaultClient.d.ts +7 -4
  48. package/cjs/web/DefaultClient.js +4 -4
  49. package/esm/CamOverlayAPI.d.ts +614 -17
  50. package/esm/CamOverlayAPI.js +124 -51
  51. package/esm/CamScripterAPI.d.ts +4 -4
  52. package/esm/CamScripterAPI.js +3 -9
  53. package/esm/VapixAPI.d.ts +1 -1
  54. package/esm/VapixAPI.js +14 -6
  55. package/esm/errors/errors.d.ts +3 -0
  56. package/esm/errors/errors.js +6 -0
  57. package/esm/index.d.ts +3 -0
  58. package/esm/index.js +3 -0
  59. package/esm/internal/ProxyClient.d.ts +3 -3
  60. package/esm/internal/ProxyClient.js +4 -2
  61. package/esm/internal/common.d.ts +2 -2
  62. package/esm/models/CamOverlayAPI/accuweatherSchema.d.ts +84 -0
  63. package/esm/models/CamOverlayAPI/accuweatherSchema.js +45 -0
  64. package/esm/models/CamOverlayAPI/constants.d.ts +11 -0
  65. package/esm/models/CamOverlayAPI/constants.js +11 -0
  66. package/esm/models/CamOverlayAPI/customGraphicsSchema.d.ts +699 -0
  67. package/esm/models/CamOverlayAPI/customGraphicsSchema.js +70 -0
  68. package/esm/models/CamOverlayAPI/fileSchema.d.ts +28 -0
  69. package/esm/models/CamOverlayAPI/fileSchema.js +14 -0
  70. package/esm/models/CamOverlayAPI/imagesSchema.d.ts +95 -0
  71. package/esm/models/CamOverlayAPI/imagesSchema.js +7 -0
  72. package/esm/models/CamOverlayAPI/index.d.ts +13 -0
  73. package/esm/models/CamOverlayAPI/index.js +13 -0
  74. package/esm/models/CamOverlayAPI/infotickerSchema.d.ts +96 -0
  75. package/esm/models/CamOverlayAPI/infotickerSchema.js +24 -0
  76. package/esm/models/CamOverlayAPI/pipSchema.d.ts +125 -0
  77. package/esm/models/CamOverlayAPI/pipSchema.js +37 -0
  78. package/esm/models/CamOverlayAPI/ptzCompassSchema.d.ts +93 -0
  79. package/esm/models/CamOverlayAPI/ptzCompassSchema.js +23 -0
  80. package/esm/models/CamOverlayAPI/ptzSchema.d.ts +118 -0
  81. package/esm/models/CamOverlayAPI/ptzSchema.js +10 -0
  82. package/esm/models/CamOverlayAPI/screenSharingSchema.d.ts +58 -0
  83. package/esm/models/CamOverlayAPI/screenSharingSchema.js +6 -0
  84. package/esm/models/CamOverlayAPI/webCameraSharingSchema.d.ts +58 -0
  85. package/esm/models/CamOverlayAPI/webCameraSharingSchema.js +6 -0
  86. package/esm/models/CamOverlayAPI/widgetCommonSchema.d.ts +126 -0
  87. package/esm/models/CamOverlayAPI/widgetCommonSchema.js +73 -0
  88. package/esm/models/CamOverlayAPI/widgetsSchema.d.ts +2823 -0
  89. package/esm/models/CamOverlayAPI/widgetsSchema.js +24 -0
  90. package/esm/types/CamOverlayAPI.d.ts +315 -175
  91. package/esm/types/CamOverlayAPI.js +9 -39
  92. package/esm/types/CamStreamerAPI.d.ts +4 -4
  93. package/esm/types/CamSwitcherAPI.d.ts +44 -44
  94. package/esm/types/VapixAPI.d.ts +84 -84
  95. package/esm/web/DefaultClient.d.ts +7 -4
  96. package/esm/web/DefaultClient.js +4 -4
  97. package/package.json +1 -1
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.widgetListSchema = exports.widgetsSchema = void 0;
4
+ const customGraphicsSchema_1 = require("./customGraphicsSchema");
5
+ const imagesSchema_1 = require("./imagesSchema");
6
+ const accuweatherSchema_1 = require("./accuweatherSchema");
7
+ const infotickerSchema_1 = require("./infotickerSchema");
8
+ const pipSchema_1 = require("./pipSchema");
9
+ const ptzCompassSchema_1 = require("./ptzCompassSchema");
10
+ const ptzSchema_1 = require("./ptzSchema");
11
+ const screenSharingSchema_1 = require("./screenSharingSchema");
12
+ const webCameraSharingSchema_1 = require("./webCameraSharingSchema");
13
+ const zod_1 = require("zod");
14
+ exports.widgetsSchema = zod_1.z.discriminatedUnion('name', [
15
+ infotickerSchema_1.infoTickerSchema,
16
+ accuweatherSchema_1.accuweatherSchema,
17
+ ptzCompassSchema_1.ptzCompassSchema,
18
+ imagesSchema_1.imagesSchema,
19
+ ptzSchema_1.ptzSchema,
20
+ pipSchema_1.pipSchema,
21
+ customGraphicsSchema_1.customGraphicsSchema,
22
+ screenSharingSchema_1.screenSharingSchema,
23
+ webCameraSharingSchema_1.webCameraSharingSchema,
24
+ ]);
25
+ exports.widgetListSchema = zod_1.z.object({
26
+ services: zod_1.z.array(exports.widgetsSchema),
27
+ });
@@ -1,188 +1,328 @@
1
1
  import { HttpOptions } from '../internal/common';
2
2
  import { z } from 'zod';
3
+ import { widgetListSchema, widgetsSchema } from '../models/CamOverlayAPI/widgetsSchema';
4
+ import { fileListSchema, fileSchema, storageSchema } from '../models/CamOverlayAPI/fileSchema';
5
+ import { customGraphicsSchema, fieldSchema } from '../models/CamOverlayAPI/customGraphicsSchema';
6
+ import { infoTickerSchema, accuweatherSchema, ptzCompassSchema, imagesSchema, ptzSchema, pipSchema, screenSharingSchema, webCameraSharingSchema } from '../models/CamOverlayAPI';
3
7
  export type CamOverlayOptions = HttpOptions;
4
8
  export type TFileType = 'image' | 'font';
5
9
  export type TCoordinates = 'top_left' | 'top_right' | 'top' | 'bottom_left' | 'bottom_right' | 'bottom' | 'left' | 'right' | 'center' | '';
6
- export declare const serviceSchema: z.ZodRecord<z.ZodString, z.ZodAny>;
7
- export type TService = z.infer<typeof serviceSchema>;
8
- export type TServiceList = {
9
- services: TService[];
10
- };
11
- export declare const fieldSchema: z.ZodObject<{
12
- field_name: z.ZodString;
13
- text: z.ZodString;
14
- color: z.ZodOptional<z.ZodString>;
15
- }, "strip", z.ZodTypeAny, {
16
- field_name: string;
17
- text: string;
18
- color?: string | undefined;
19
- }, {
20
- field_name: string;
21
- text: string;
22
- color?: string | undefined;
23
- }>;
10
+ export type TWidget = z.infer<typeof widgetsSchema>;
11
+ export type TWidgetList = z.infer<typeof widgetListSchema>;
24
12
  export type TField = z.infer<typeof fieldSchema>;
25
- export declare const fileSchema: z.ZodObject<{
26
- name: z.ZodString;
27
- path: z.ZodString;
28
- storage: z.ZodString;
29
- }, "strip", z.ZodTypeAny, {
30
- path: string;
31
- name: string;
32
- storage: string;
33
- }, {
34
- path: string;
35
- name: string;
36
- storage: string;
37
- }>;
38
13
  export type TFile = z.infer<typeof fileSchema>;
39
- export declare const fileListSchema: z.ZodArray<z.ZodObject<{
40
- name: z.ZodString;
41
- path: z.ZodString;
42
- storage: z.ZodString;
43
- }, "strip", z.ZodTypeAny, {
44
- path: string;
45
- name: string;
46
- storage: string;
47
- }, {
48
- path: string;
49
- name: string;
50
- storage: string;
51
- }>, "many">;
52
14
  export type TFileList = z.infer<typeof fileListSchema>;
53
15
  export declare enum ImageType {
54
16
  PNG = 0,
55
17
  JPEG = 1
56
18
  }
57
- export declare const fontStorageSchema: z.ZodTuple<[z.ZodObject<{
58
- type: z.ZodLiteral<"SD0">;
59
- state: z.ZodLiteral<"SD Card">;
60
- }, "strip", z.ZodTypeAny, {
61
- type: "SD0";
62
- state: "SD Card";
63
- }, {
64
- type: "SD0";
65
- state: "SD Card";
66
- }>, z.ZodObject<{
67
- type: z.ZodLiteral<"flash">;
68
- state: z.ZodString;
69
- }, "strip", z.ZodTypeAny, {
70
- type: "flash";
71
- state: string;
72
- }, {
73
- type: "flash";
74
- state: string;
75
- }>], null>;
76
- export type TFontStorage = z.infer<typeof fontStorageSchema>;
77
- export declare const imageStorageSchema: z.ZodTuple<[z.ZodObject<{
78
- type: z.ZodLiteral<"SD0">;
79
- state: z.ZodLiteral<"SD Card">;
80
- }, "strip", z.ZodTypeAny, {
81
- type: "SD0";
82
- state: "SD Card";
83
- }, {
84
- type: "SD0";
85
- state: "SD Card";
86
- }>, z.ZodObject<{
87
- type: z.ZodLiteral<"flash">;
88
- state: z.ZodString;
89
- }, "strip", z.ZodTypeAny, {
90
- type: "flash";
91
- state: string;
92
- }, {
93
- type: "flash";
94
- state: string;
95
- }>, z.ZodObject<{
96
- type: z.ZodLiteral<"samba">;
97
- state: z.ZodLiteral<"Microsoft Network Share">;
98
- }, "strip", z.ZodTypeAny, {
99
- type: "samba";
100
- state: "Microsoft Network Share";
101
- }, {
102
- type: "samba";
103
- state: "Microsoft Network Share";
104
- }>, z.ZodObject<{
105
- type: z.ZodLiteral<"url">;
106
- state: z.ZodLiteral<"URL">;
107
- }, "strip", z.ZodTypeAny, {
108
- type: "url";
109
- state: "URL";
110
- }, {
111
- type: "url";
112
- state: "URL";
113
- }>, z.ZodObject<{
114
- type: z.ZodLiteral<"ftp">;
115
- state: z.ZodLiteral<"FTP">;
116
- }, "strip", z.ZodTypeAny, {
117
- type: "ftp";
118
- state: "FTP";
119
- }, {
120
- type: "ftp";
121
- state: "FTP";
122
- }>], null>;
123
- export type TImageStorage = z.infer<typeof imageStorageSchema>;
124
- export declare const storageSchema: z.ZodUnion<[z.ZodTuple<[z.ZodObject<{
125
- type: z.ZodLiteral<"SD0">;
126
- state: z.ZodLiteral<"SD Card">;
127
- }, "strip", z.ZodTypeAny, {
128
- type: "SD0";
129
- state: "SD Card";
130
- }, {
131
- type: "SD0";
132
- state: "SD Card";
133
- }>, z.ZodObject<{
134
- type: z.ZodLiteral<"flash">;
135
- state: z.ZodString;
136
- }, "strip", z.ZodTypeAny, {
137
- type: "flash";
138
- state: string;
139
- }, {
140
- type: "flash";
141
- state: string;
142
- }>], null>, z.ZodTuple<[z.ZodObject<{
143
- type: z.ZodLiteral<"SD0">;
144
- state: z.ZodLiteral<"SD Card">;
145
- }, "strip", z.ZodTypeAny, {
146
- type: "SD0";
147
- state: "SD Card";
148
- }, {
149
- type: "SD0";
150
- state: "SD Card";
151
- }>, z.ZodObject<{
152
- type: z.ZodLiteral<"flash">;
153
- state: z.ZodString;
154
- }, "strip", z.ZodTypeAny, {
155
- type: "flash";
156
- state: string;
157
- }, {
158
- type: "flash";
159
- state: string;
160
- }>, z.ZodObject<{
161
- type: z.ZodLiteral<"samba">;
162
- state: z.ZodLiteral<"Microsoft Network Share">;
163
- }, "strip", z.ZodTypeAny, {
164
- type: "samba";
165
- state: "Microsoft Network Share";
166
- }, {
167
- type: "samba";
168
- state: "Microsoft Network Share";
169
- }>, z.ZodObject<{
170
- type: z.ZodLiteral<"url">;
171
- state: z.ZodLiteral<"URL">;
172
- }, "strip", z.ZodTypeAny, {
173
- type: "url";
174
- state: "URL";
175
- }, {
176
- type: "url";
177
- state: "URL";
178
- }>, z.ZodObject<{
179
- type: z.ZodLiteral<"ftp">;
180
- state: z.ZodLiteral<"FTP">;
181
- }, "strip", z.ZodTypeAny, {
182
- type: "ftp";
183
- state: "FTP";
184
- }, {
185
- type: "ftp";
186
- state: "FTP";
187
- }>], null>]>;
188
19
  export type TStorage = z.infer<typeof storageSchema>;
20
+ export type TInfoticker = z.infer<typeof infoTickerSchema>;
21
+ export type TAccuweather = z.infer<typeof accuweatherSchema>;
22
+ export type TPtzCompass = z.infer<typeof ptzCompassSchema>;
23
+ export type TImages = z.infer<typeof imagesSchema>;
24
+ export type TPtz = z.infer<typeof ptzSchema>;
25
+ export type TPip = z.infer<typeof pipSchema>;
26
+ export type TCustomGraphics = z.infer<typeof customGraphicsSchema>;
27
+ export type TScreenSharing = z.infer<typeof screenSharingSchema>;
28
+ export type TWebCameraSharing = z.infer<typeof webCameraSharingSchema>;
29
+ export declare const isInfoticker: (widget: TWidget) => widget is {
30
+ id: number;
31
+ enabled: 0 | 1;
32
+ automationType: "time" | "manual" | "schedule" | `input${number}`;
33
+ cameraList: number[];
34
+ customName: string;
35
+ width: number;
36
+ height: number;
37
+ coordSystem: "top" | "bottom";
38
+ pos_y: number;
39
+ name: "infoticker";
40
+ source: string;
41
+ textColor: string;
42
+ font: string;
43
+ fontSize: number;
44
+ switchingTime: number;
45
+ clockType: "12h" | "24h";
46
+ showClock: 0 | 1;
47
+ bgColor: string;
48
+ weatherLocation: string;
49
+ weatherLocationName: string;
50
+ weatherLang: "en-us" | "fr-fr" | "ja-jp" | "pt-pt" | "es-es" | "de-de" | "ko-kr" | "zh-hk" | "zh-cn" | "nl-nl" | "cs-cz" | "ru-ru" | "sv-se";
51
+ weatherUnits: "Metric" | "Imperial";
52
+ numberOfLines: number;
53
+ crawlLeft: boolean;
54
+ crawlSpeed: number;
55
+ sourceType: "text" | "url";
56
+ schedule?: string | undefined;
57
+ invertInput?: boolean | undefined;
58
+ camera?: number | undefined;
59
+ zIndex?: number | undefined;
60
+ };
61
+ export declare const isAccuweather: (widget: TWidget) => widget is {
62
+ id: number;
63
+ enabled: 0 | 1;
64
+ automationType: "time" | "manual" | "schedule" | `input${number}`;
65
+ cameraList: number[];
66
+ customName: string;
67
+ width: number;
68
+ height: number;
69
+ coordSystem: "top_left" | "top" | "top_right" | "left" | "center" | "right" | "bottom_left" | "bottom" | "bottom_right";
70
+ pos_x: number;
71
+ pos_y: number;
72
+ scale: number;
73
+ name: "accuweather";
74
+ font: string;
75
+ location: string;
76
+ locationName: string;
77
+ title: string;
78
+ bgStartColor: "237,143,73,0.93" | "0,0,0,0.75" | "31,32,73,0.9" | "76,94,127,0.95";
79
+ bgEndColor: "0,0,0,0.75" | "234,181,89,0.93" | "73,96,213,0.9" | "140,150,168,0.95";
80
+ clockType: "12h" | "24h";
81
+ lang: "en-us" | "fr-fr" | "ja-jp" | "pt-pt" | "es-es" | "de-de" | "ko-kr" | "zh-hk" | "zh-cn" | "nl-nl" | "cs-cz" | "ru-ru" | "sv-se";
82
+ units: "Metric" | "Imperial";
83
+ layout: "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "10" | "11" | "12" | "13";
84
+ schedule?: string | undefined;
85
+ invertInput?: boolean | undefined;
86
+ camera?: number | undefined;
87
+ zIndex?: number | undefined;
88
+ };
89
+ export declare const isPtzCompass: (widget: TWidget) => widget is {
90
+ type: "map" | "image" | "compass";
91
+ id: number;
92
+ enabled: 0 | 1;
93
+ automationType: "time" | "manual" | "schedule" | `input${number}`;
94
+ cameraList: number[];
95
+ customName: string;
96
+ width: number;
97
+ height: number;
98
+ coordSystem: "top_left" | "top" | "top_right" | "left" | "center" | "right" | "bottom_left" | "bottom" | "bottom_right";
99
+ pos_x: number;
100
+ pos_y: number;
101
+ scale: number;
102
+ name: "ptzCompass";
103
+ image: string;
104
+ northPan: number;
105
+ cameraPosX: number;
106
+ cameraPosY: number;
107
+ colorScheme: "black" | "white" | "orange";
108
+ schedule?: string | undefined;
109
+ invertInput?: boolean | undefined;
110
+ camera?: number | undefined;
111
+ zIndex?: number | undefined;
112
+ generalLng?: number | undefined;
113
+ generalLat?: number | undefined;
114
+ generalZoom?: number | undefined;
115
+ generalMapType?: string | undefined;
116
+ generalIframeWidth?: number | undefined;
117
+ generalIframeHeight?: number | undefined;
118
+ generalAddress?: string | undefined;
119
+ };
120
+ export declare const isImages: (widget: TWidget) => widget is {
121
+ id: number;
122
+ enabled: 0 | 1;
123
+ automationType: "time" | "manual" | "schedule" | `input${number}`;
124
+ cameraList: number[];
125
+ customName: string;
126
+ width: number;
127
+ height: number;
128
+ name: "images";
129
+ overlayList: {
130
+ active: boolean;
131
+ coordSystem: "top_left" | "top" | "top_right" | "left" | "center" | "right" | "bottom_left" | "bottom" | "bottom_right";
132
+ pos_x: number;
133
+ pos_y: number;
134
+ imgPath: string;
135
+ imgName: string;
136
+ duration: number;
137
+ scale: number;
138
+ fps?: number | undefined;
139
+ }[];
140
+ schedule?: string | undefined;
141
+ invertInput?: boolean | undefined;
142
+ camera?: number | undefined;
143
+ zIndex?: number | undefined;
144
+ };
145
+ export declare const isPtz: (widget: TWidget) => widget is {
146
+ id: number;
147
+ enabled: 0 | 1;
148
+ automationType: "time" | "manual" | "schedule" | `input${number}`;
149
+ cameraList: number[];
150
+ customName: string;
151
+ width: number;
152
+ height: number;
153
+ name: "ptz";
154
+ ptz_positions: Record<string, {
155
+ loop: boolean;
156
+ overlayList: {
157
+ coordSystem: "top_left" | "top" | "top_right" | "left" | "center" | "right" | "bottom_left" | "bottom" | "bottom_right";
158
+ pos_x: number;
159
+ pos_y: number;
160
+ imgPath: string;
161
+ imgName: string;
162
+ duration: number;
163
+ scale: number;
164
+ }[];
165
+ }>;
166
+ schedule?: string | undefined;
167
+ invertInput?: boolean | undefined;
168
+ camera?: number | undefined;
169
+ zIndex?: number | undefined;
170
+ };
171
+ export declare const isPip: (widget: TWidget) => widget is {
172
+ id: number;
173
+ enabled: 0 | 1;
174
+ automationType: "time" | "manual" | "schedule" | `input${number}`;
175
+ cameraList: number[];
176
+ customName: string;
177
+ width: number;
178
+ height: number;
179
+ coordSystem: "top_left" | "top" | "top_right" | "left" | "center" | "right" | "bottom_left" | "bottom" | "bottom_right";
180
+ pos_x: number;
181
+ pos_y: number;
182
+ scale: number;
183
+ fps: number;
184
+ screenSize: number;
185
+ name: "pip";
186
+ compression: number;
187
+ source_type: "axis_camera" | "mjpeg_url";
188
+ mjpeg_url: string;
189
+ camera_ip: string;
190
+ camera_port: number;
191
+ camera_user: string;
192
+ camera_pass: string;
193
+ camera_width: number;
194
+ camera_height: number;
195
+ camera_view_area: string;
196
+ camera_overlay_params: "overlays=off" | "overlays=all" | "overlays=text" | "overlays=image" | "overlays=application";
197
+ rotate: 0 | 90 | 180 | 270;
198
+ dewarping: {
199
+ enabled: boolean;
200
+ rectangle: [number, number][];
201
+ aspectRatioCorrection: number;
202
+ };
203
+ borderColor: string;
204
+ borderWidth: number;
205
+ schedule?: string | undefined;
206
+ invertInput?: boolean | undefined;
207
+ camera?: number | undefined;
208
+ zIndex?: number | undefined;
209
+ };
210
+ export declare const isCustomGraphics: (widget: TWidget) => widget is {
211
+ id: number;
212
+ enabled: 0 | 1;
213
+ automationType: "time" | "manual" | "schedule" | `input${number}`;
214
+ cameraList: number[];
215
+ customName: string;
216
+ width: number;
217
+ height: number;
218
+ coordSystem: "top_left" | "top" | "top_right" | "left" | "center" | "right" | "bottom_left" | "bottom" | "bottom_right";
219
+ pos_x: number;
220
+ pos_y: number;
221
+ name: "customGraphics";
222
+ clockFormat: "12h" | "24h";
223
+ background: "custom" | "image";
224
+ image: string;
225
+ customAreaColor: string;
226
+ customAreaWidth: number;
227
+ customAreaHeight: number;
228
+ customAreaCorners: "sharp" | "rounded";
229
+ mappingZones: ({
230
+ type: "plain";
231
+ pos_x: number;
232
+ pos_y: number;
233
+ name: string;
234
+ wrapText: boolean;
235
+ textLines: number;
236
+ textWidth: number;
237
+ textAlign: "A_LEFT" | "A_CENTER" | "A_RIGHT";
238
+ textVerticalAlign: "VA_TOP" | "VA_CENTER" | "VA_BOTTOM";
239
+ textColor: string;
240
+ font: string;
241
+ fontSize: number;
242
+ switchingTime: number;
243
+ text?: {
244
+ active: boolean;
245
+ source: string;
246
+ }[] | undefined;
247
+ } | {
248
+ type: "countdown";
249
+ pos_x: number;
250
+ pos_y: number;
251
+ name: string;
252
+ wrapText: boolean;
253
+ textLines: number;
254
+ textWidth: number;
255
+ textAlign: "A_LEFT" | "A_CENTER" | "A_RIGHT";
256
+ textVerticalAlign: "VA_TOP" | "VA_CENTER" | "VA_BOTTOM";
257
+ textColor: string;
258
+ font: string;
259
+ fontSize: number;
260
+ switchingTime: number;
261
+ settings: {
262
+ startDate: number;
263
+ targetDate: number;
264
+ countdown: boolean;
265
+ countup: boolean;
266
+ displayDay: boolean;
267
+ displayHour: boolean;
268
+ displayMinute: boolean;
269
+ displaySeconds: boolean;
270
+ idleText: string;
271
+ hideZeros: boolean;
272
+ delimiter: "colon" | "letters";
273
+ suffixSeconds: string;
274
+ suffixMinute: string;
275
+ suffixHour: string;
276
+ suffixDay: string;
277
+ loop: boolean;
278
+ loopPeriod: number;
279
+ waitingPeriod: number;
280
+ };
281
+ text?: {
282
+ active: boolean;
283
+ source: string;
284
+ }[] | undefined;
285
+ })[];
286
+ schedule?: string | undefined;
287
+ invertInput?: boolean | undefined;
288
+ camera?: number | undefined;
289
+ zIndex?: number | undefined;
290
+ };
291
+ export declare const isScreenSharing: (widget: TWidget) => widget is {
292
+ id: number;
293
+ enabled: 0 | 1;
294
+ automationType: "time" | "manual" | "schedule" | `input${number}`;
295
+ cameraList: number[];
296
+ customName: string;
297
+ width: number;
298
+ height: number;
299
+ coordSystem: "top_left" | "top" | "top_right" | "left" | "center" | "right" | "bottom_left" | "bottom" | "bottom_right";
300
+ pos_x: number;
301
+ pos_y: number;
302
+ fps: number;
303
+ screenSize: number;
304
+ name: "screenSharing";
305
+ schedule?: string | undefined;
306
+ invertInput?: boolean | undefined;
307
+ camera?: number | undefined;
308
+ zIndex?: number | undefined;
309
+ };
310
+ export declare const isWebCameraSharing: (widget: TWidget) => widget is {
311
+ id: number;
312
+ enabled: 0 | 1;
313
+ automationType: "time" | "manual" | "schedule" | `input${number}`;
314
+ cameraList: number[];
315
+ customName: string;
316
+ width: number;
317
+ height: number;
318
+ coordSystem: "top_left" | "top" | "top_right" | "left" | "center" | "right" | "bottom_left" | "bottom" | "bottom_right";
319
+ pos_x: number;
320
+ pos_y: number;
321
+ fps: number;
322
+ screenSize: number;
323
+ name: "web_camera";
324
+ schedule?: string | undefined;
325
+ invertInput?: boolean | undefined;
326
+ camera?: number | undefined;
327
+ zIndex?: number | undefined;
328
+ };
@@ -1,47 +1,26 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.storageSchema = exports.imageStorageSchema = exports.fontStorageSchema = exports.ImageType = exports.fileListSchema = exports.fileSchema = exports.fieldSchema = exports.serviceSchema = void 0;
4
- const zod_1 = require("zod");
5
- exports.serviceSchema = zod_1.z.record(zod_1.z.string(), zod_1.z.any());
6
- exports.fieldSchema = zod_1.z.object({
7
- field_name: zod_1.z.string(),
8
- text: zod_1.z.string(),
9
- color: zod_1.z.string().optional(),
10
- });
11
- exports.fileSchema = zod_1.z.object({
12
- name: zod_1.z.string(),
13
- path: zod_1.z.string(),
14
- storage: zod_1.z.string(),
15
- });
16
- exports.fileListSchema = zod_1.z.array(exports.fileSchema);
3
+ exports.isWebCameraSharing = exports.isScreenSharing = exports.isCustomGraphics = exports.isPip = exports.isPtz = exports.isImages = exports.isPtzCompass = exports.isAccuweather = exports.isInfoticker = exports.ImageType = void 0;
17
4
  var ImageType;
18
5
  (function (ImageType) {
19
6
  ImageType[ImageType["PNG"] = 0] = "PNG";
20
7
  ImageType[ImageType["JPEG"] = 1] = "JPEG";
21
8
  })(ImageType || (exports.ImageType = ImageType = {}));
22
- exports.fontStorageSchema = zod_1.z.tuple([
23
- zod_1.z.object({
24
- type: zod_1.z.literal('SD0'),
25
- state: zod_1.z.literal('SD Card'),
26
- }),
27
- zod_1.z.object({
28
- type: zod_1.z.literal('flash'),
29
- state: zod_1.z.string(),
30
- }),
31
- ]);
32
- exports.imageStorageSchema = zod_1.z.tuple([
33
- ...exports.fontStorageSchema.items,
34
- zod_1.z.object({
35
- type: zod_1.z.literal('samba'),
36
- state: zod_1.z.literal('Microsoft Network Share'),
37
- }),
38
- zod_1.z.object({
39
- type: zod_1.z.literal('url'),
40
- state: zod_1.z.literal('URL'),
41
- }),
42
- zod_1.z.object({
43
- type: zod_1.z.literal('ftp'),
44
- state: zod_1.z.literal('FTP'),
45
- }),
46
- ]);
47
- exports.storageSchema = zod_1.z.union([exports.fontStorageSchema, exports.imageStorageSchema]);
9
+ const isInfoticker = (widget) => widget.name === 'infoticker';
10
+ exports.isInfoticker = isInfoticker;
11
+ const isAccuweather = (widget) => widget.name === 'accuweather';
12
+ exports.isAccuweather = isAccuweather;
13
+ const isPtzCompass = (widget) => widget.name === 'ptzCompass';
14
+ exports.isPtzCompass = isPtzCompass;
15
+ const isImages = (widget) => widget.name === 'images';
16
+ exports.isImages = isImages;
17
+ const isPtz = (widget) => widget.name === 'ptz';
18
+ exports.isPtz = isPtz;
19
+ const isPip = (widget) => widget.name === 'pip';
20
+ exports.isPip = isPip;
21
+ const isCustomGraphics = (widget) => widget.name === 'customGraphics';
22
+ exports.isCustomGraphics = isCustomGraphics;
23
+ const isScreenSharing = (widget) => widget.name === 'screenSharing';
24
+ exports.isScreenSharing = isScreenSharing;
25
+ const isWebCameraSharing = (widget) => widget.name === 'web_camera';
26
+ exports.isWebCameraSharing = isWebCameraSharing;
@@ -25,6 +25,7 @@ export declare const streamAttributesSchema: z.ZodObject<{
25
25
  stopTime: z.ZodString;
26
26
  }, "strip", z.ZodTypeAny, {
27
27
  enabled: string;
28
+ schedule: string;
28
29
  active: string;
29
30
  audioSource: string;
30
31
  avSyncMsec: string;
@@ -41,12 +42,12 @@ export declare const streamAttributesSchema: z.ZodObject<{
41
42
  statusPort: string;
42
43
  callApi: string;
43
44
  trigger: string;
44
- schedule: string;
45
45
  prepareAhead: string;
46
46
  startTime: string;
47
47
  stopTime: string;
48
48
  }, {
49
49
  enabled: string;
50
+ schedule: string;
50
51
  active: string;
51
52
  audioSource: string;
52
53
  avSyncMsec: string;
@@ -63,7 +64,6 @@ export declare const streamAttributesSchema: z.ZodObject<{
63
64
  statusPort: string;
64
65
  callApi: string;
65
66
  trigger: string;
66
- schedule: string;
67
67
  prepareAhead: string;
68
68
  startTime: string;
69
69
  stopTime: string;
@@ -93,6 +93,7 @@ export declare const streamListSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
93
93
  stopTime: z.ZodString;
94
94
  }, "strip", z.ZodTypeAny, {
95
95
  enabled: string;
96
+ schedule: string;
96
97
  active: string;
97
98
  audioSource: string;
98
99
  avSyncMsec: string;
@@ -109,12 +110,12 @@ export declare const streamListSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
109
110
  statusPort: string;
110
111
  callApi: string;
111
112
  trigger: string;
112
- schedule: string;
113
113
  prepareAhead: string;
114
114
  startTime: string;
115
115
  stopTime: string;
116
116
  }, {
117
117
  enabled: string;
118
+ schedule: string;
118
119
  active: string;
119
120
  audioSource: string;
120
121
  avSyncMsec: string;
@@ -131,7 +132,6 @@ export declare const streamListSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
131
132
  statusPort: string;
132
133
  callApi: string;
133
134
  trigger: string;
134
- schedule: string;
135
135
  prepareAhead: string;
136
136
  startTime: string;
137
137
  stopTime: string;