camstreamerlib 4.0.0-beta.30 → 4.0.0-beta.32

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 (91) hide show
  1. package/cjs/CamOverlayAPI.d.ts +4 -15
  2. package/cjs/CamOverlayAPI.js +10 -21
  3. package/cjs/CamScripterAPI.d.ts +3 -2
  4. package/cjs/CamScripterAPI.js +5 -5
  5. package/cjs/CamStreamerAPI.d.ts +3 -2
  6. package/cjs/CamStreamerAPI.js +4 -4
  7. package/cjs/CamSwitcherAPI.d.ts +3 -2
  8. package/cjs/CamSwitcherAPI.js +7 -7
  9. package/cjs/PlaneTrackerAPI.d.ts +3 -2
  10. package/cjs/PlaneTrackerAPI.js +15 -15
  11. package/cjs/VapixAPI.d.ts +3 -2
  12. package/cjs/VapixAPI.js +13 -13
  13. package/cjs/events/AxisCameraStationEvents.d.ts +4 -2
  14. package/cjs/events/AxisCameraStationEvents.js +4 -4
  15. package/cjs/index.d.ts +0 -1
  16. package/cjs/index.js +0 -1
  17. package/cjs/types/CamOverlayAPI/CamOverlayAPI.d.ts +708 -521
  18. package/cjs/types/CamOverlayAPI/CamOverlayAPI.js +35 -82
  19. package/cjs/types/CamOverlayAPI/accuweatherSchema.d.ts +7 -37
  20. package/cjs/types/CamOverlayAPI/accuweatherSchema.js +8 -11
  21. package/cjs/types/CamOverlayAPI/customGraphicsSchema.d.ts +63 -146
  22. package/cjs/types/CamOverlayAPI/customGraphicsSchema.js +6 -9
  23. package/cjs/types/CamOverlayAPI/imagesSchema.d.ts +8 -35
  24. package/cjs/types/CamOverlayAPI/imagesSchema.js +5 -8
  25. package/cjs/types/CamOverlayAPI/index.d.ts +2 -0
  26. package/cjs/types/CamOverlayAPI/index.js +2 -0
  27. package/cjs/types/CamOverlayAPI/infotickerSchema.d.ts +9 -43
  28. package/cjs/types/CamOverlayAPI/infotickerSchema.js +7 -10
  29. package/cjs/types/CamOverlayAPI/pipSchema.d.ts +5 -46
  30. package/cjs/types/CamOverlayAPI/pipSchema.js +5 -8
  31. package/cjs/types/CamOverlayAPI/ptzCompassSchema.d.ts +7 -40
  32. package/cjs/types/CamOverlayAPI/ptzCompassSchema.js +5 -8
  33. package/cjs/types/CamOverlayAPI/ptzSchema.d.ts +10 -38
  34. package/cjs/types/CamOverlayAPI/ptzSchema.js +5 -8
  35. package/cjs/types/CamOverlayAPI/screenSharingSchema.d.ts +3 -24
  36. package/cjs/types/CamOverlayAPI/screenSharingSchema.js +4 -7
  37. package/cjs/types/CamOverlayAPI/webCameraSharingSchema.d.ts +3 -24
  38. package/cjs/types/CamOverlayAPI/webCameraSharingSchema.js +4 -7
  39. package/cjs/types/CamOverlayAPI/widgetCommonTypes.d.ts +141 -0
  40. package/cjs/types/CamOverlayAPI/widgetCommonTypes.js +87 -0
  41. package/cjs/types/CamStreamerAPI.d.ts +4 -4
  42. package/cjs/types/CamSwitcherAPI.d.ts +0 -2
  43. package/cjs/types/VapixAPI.d.ts +0 -2
  44. package/esm/CamOverlayAPI.d.ts +4 -15
  45. package/esm/CamOverlayAPI.js +9 -20
  46. package/esm/CamScripterAPI.d.ts +3 -2
  47. package/esm/CamScripterAPI.js +5 -5
  48. package/esm/CamStreamerAPI.d.ts +3 -2
  49. package/esm/CamStreamerAPI.js +4 -4
  50. package/esm/CamSwitcherAPI.d.ts +3 -2
  51. package/esm/CamSwitcherAPI.js +7 -7
  52. package/esm/PlaneTrackerAPI.d.ts +3 -2
  53. package/esm/PlaneTrackerAPI.js +15 -15
  54. package/esm/VapixAPI.d.ts +3 -2
  55. package/esm/VapixAPI.js +13 -13
  56. package/esm/events/AxisCameraStationEvents.d.ts +4 -2
  57. package/esm/events/AxisCameraStationEvents.js +4 -4
  58. package/esm/index.d.ts +0 -1
  59. package/esm/index.js +0 -1
  60. package/esm/types/CamOverlayAPI/CamOverlayAPI.d.ts +708 -521
  61. package/esm/types/CamOverlayAPI/CamOverlayAPI.js +17 -73
  62. package/esm/types/CamOverlayAPI/accuweatherSchema.d.ts +7 -37
  63. package/esm/types/CamOverlayAPI/accuweatherSchema.js +1 -3
  64. package/esm/types/CamOverlayAPI/customGraphicsSchema.d.ts +63 -146
  65. package/esm/types/CamOverlayAPI/customGraphicsSchema.js +1 -3
  66. package/esm/types/CamOverlayAPI/imagesSchema.d.ts +8 -35
  67. package/esm/types/CamOverlayAPI/imagesSchema.js +1 -3
  68. package/esm/types/CamOverlayAPI/index.d.ts +2 -0
  69. package/esm/types/CamOverlayAPI/index.js +2 -0
  70. package/esm/types/CamOverlayAPI/infotickerSchema.d.ts +9 -43
  71. package/esm/types/CamOverlayAPI/infotickerSchema.js +1 -3
  72. package/esm/types/CamOverlayAPI/pipSchema.d.ts +5 -46
  73. package/esm/types/CamOverlayAPI/pipSchema.js +1 -3
  74. package/esm/types/CamOverlayAPI/ptzCompassSchema.d.ts +7 -40
  75. package/esm/types/CamOverlayAPI/ptzCompassSchema.js +1 -3
  76. package/esm/types/CamOverlayAPI/ptzSchema.d.ts +10 -38
  77. package/esm/types/CamOverlayAPI/ptzSchema.js +1 -3
  78. package/esm/types/CamOverlayAPI/screenSharingSchema.d.ts +3 -24
  79. package/esm/types/CamOverlayAPI/screenSharingSchema.js +1 -3
  80. package/esm/types/CamOverlayAPI/webCameraSharingSchema.d.ts +3 -24
  81. package/esm/types/CamOverlayAPI/webCameraSharingSchema.js +1 -3
  82. package/esm/types/CamOverlayAPI/widgetCommonTypes.d.ts +141 -0
  83. package/esm/types/CamOverlayAPI/widgetCommonTypes.js +84 -0
  84. package/esm/types/CamStreamerAPI.d.ts +4 -4
  85. package/esm/types/CamSwitcherAPI.d.ts +0 -2
  86. package/esm/types/VapixAPI.d.ts +0 -2
  87. package/package.json +2 -2
  88. package/cjs/node/WsEventClient.d.ts +0 -13
  89. package/cjs/node/WsEventClient.js +0 -22
  90. package/esm/node/WsEventClient.d.ts +0 -13
  91. package/esm/node/WsEventClient.js +0 -18
@@ -1,100 +1,53 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.fileDataSchema = exports.fileListSchema = exports.fileSchema = exports.storageResponseSchema = exports.storageDataListSchema = exports.storageSchema = exports.ImageType = exports.overlaySchema = exports.sharingSchema = exports.widgetListSchema = exports.widgetsSchema = exports.widgetCommonSchema = exports.weatherUnitSchema = exports.fontSchema = exports.languageSchema = exports.coordinateSystemSchema = exports.WSResponseSchema = void 0;
3
+ exports.fileDataSchema = exports.fileListSchema = exports.fileSchema = exports.storageResponseSchema = exports.storageDataListSchema = exports.storageSchema = exports.ImageType = exports.isWebCameraSharing = exports.isScreenSharing = exports.isPtz = exports.isPtzCompass = exports.isPip = exports.isInfoticker = exports.isImages = exports.isCustomGraphics = exports.isAccuweather = exports.widgetListSchema = exports.widgetsSchema = exports.WSResponseSchema = void 0;
4
4
  const zod_1 = require("zod");
5
+ const infotickerSchema_1 = require("./infotickerSchema");
6
+ const accuweatherSchema_1 = require("./accuweatherSchema");
7
+ const ptzCompassSchema_1 = require("./ptzCompassSchema");
8
+ const imagesSchema_1 = require("./imagesSchema");
9
+ const ptzSchema_1 = require("./ptzSchema");
10
+ const pipSchema_1 = require("./pipSchema");
5
11
  const customGraphicsSchema_1 = require("./customGraphicsSchema");
6
- const index_1 = require("./index");
12
+ const screenSharingSchema_1 = require("./screenSharingSchema");
13
+ const webCameraSharingSchema_1 = require("./webCameraSharingSchema");
7
14
  exports.WSResponseSchema = zod_1.z.object({
8
15
  status: zod_1.z.number(),
9
16
  message: zod_1.z.string(),
10
17
  data: zod_1.z.string(),
11
18
  });
12
- exports.coordinateSystemSchema = zod_1.z.union([
13
- zod_1.z.literal('top_left'),
14
- zod_1.z.literal('top'),
15
- zod_1.z.literal('top_right'),
16
- zod_1.z.literal('left'),
17
- zod_1.z.literal('center'),
18
- zod_1.z.literal('right'),
19
- zod_1.z.literal('bottom_left'),
20
- zod_1.z.literal('bottom'),
21
- zod_1.z.literal('bottom_right'),
22
- ]);
23
- exports.languageSchema = zod_1.z.union([
24
- zod_1.z.literal('en-us'),
25
- zod_1.z.literal('fr-fr'),
26
- zod_1.z.literal('ja-jp'),
27
- zod_1.z.literal('pt-pt'),
28
- zod_1.z.literal('es-es'),
29
- zod_1.z.literal('de-de'),
30
- zod_1.z.literal('ko-kr'),
31
- zod_1.z.literal('zh-hk'),
32
- zod_1.z.literal('zh-cn'),
33
- zod_1.z.literal('nl-nl'),
34
- zod_1.z.literal('cs-cz'),
35
- zod_1.z.literal('ru-ru'),
36
- zod_1.z.literal('sv-se'),
37
- ]);
38
- exports.fontSchema = zod_1.z.union([
39
- zod_1.z.literal('classic'),
40
- zod_1.z.literal('digital'),
41
- zod_1.z.custom((val) => {
42
- return typeof val === 'string';
43
- }),
44
- ]);
45
- exports.weatherUnitSchema = zod_1.z.union([zod_1.z.literal('Metric'), zod_1.z.literal('Imperial')]);
46
- exports.widgetCommonSchema = zod_1.z.object({
47
- id: zod_1.z.number().nonnegative(),
48
- enabled: zod_1.z.union([zod_1.z.literal(0), zod_1.z.literal(1)]),
49
- automationType: zod_1.z.union([
50
- zod_1.z.literal('time'),
51
- zod_1.z.literal('manual'),
52
- zod_1.z.literal('schedule'),
53
- zod_1.z.custom((val) => {
54
- return typeof val === 'string' ? /^input\d+$/.test(val) : false;
55
- }),
56
- ]),
57
- invertInput: zod_1.z.boolean().optional(),
58
- cameraList: zod_1.z.array(zod_1.z.number()),
59
- camera: zod_1.z.number().nonnegative().optional(),
60
- schedule: zod_1.z.string().optional(),
61
- customName: zod_1.z.string(),
62
- zIndex: zod_1.z.number().optional(),
63
- width: zod_1.z.number().nonnegative(),
64
- height: zod_1.z.number().nonnegative(),
65
- });
66
19
  exports.widgetsSchema = zod_1.z.discriminatedUnion('name', [
67
- index_1.infoTickerSchema,
68
- index_1.accuweatherSchema,
69
- index_1.ptzCompassSchema,
70
- index_1.imagesSchema,
71
- index_1.ptzSchema,
72
- index_1.pipSchema,
20
+ infotickerSchema_1.infoTickerSchema,
21
+ accuweatherSchema_1.accuweatherSchema,
22
+ ptzCompassSchema_1.ptzCompassSchema,
23
+ imagesSchema_1.imagesSchema,
24
+ ptzSchema_1.ptzSchema,
25
+ pipSchema_1.pipSchema,
73
26
  customGraphicsSchema_1.customGraphicsSchema,
74
- index_1.screenSharingSchema,
75
- index_1.webCameraSharingSchema,
27
+ screenSharingSchema_1.screenSharingSchema,
28
+ webCameraSharingSchema_1.webCameraSharingSchema,
76
29
  ]);
77
30
  exports.widgetListSchema = zod_1.z.object({
78
31
  services: zod_1.z.array(exports.widgetsSchema),
79
32
  });
80
- exports.sharingSchema = exports.widgetCommonSchema.extend({
81
- pos_x: zod_1.z.number().nonnegative(),
82
- pos_y: zod_1.z.number().nonnegative(),
83
- coordSystem: exports.coordinateSystemSchema,
84
- screenSize: zod_1.z.number().positive(),
85
- fps: zod_1.z.number(),
86
- });
87
- exports.overlaySchema = zod_1.z.object({
88
- active: zod_1.z.boolean(),
89
- coordSystem: exports.coordinateSystemSchema,
90
- pos_x: zod_1.z.number(),
91
- pos_y: zod_1.z.number(),
92
- imgPath: zod_1.z.string(),
93
- imgName: zod_1.z.string(),
94
- duration: zod_1.z.number(),
95
- scale: zod_1.z.number(),
96
- fps: zod_1.z.number().optional(),
97
- });
33
+ const isAccuweather = (widget) => widget.name === 'accuweather';
34
+ exports.isAccuweather = isAccuweather;
35
+ const isCustomGraphics = (widget) => widget.name === 'customGraphics';
36
+ exports.isCustomGraphics = isCustomGraphics;
37
+ const isImages = (widget) => widget.name === 'images';
38
+ exports.isImages = isImages;
39
+ const isInfoticker = (widget) => widget.name === 'infoticker';
40
+ exports.isInfoticker = isInfoticker;
41
+ const isPip = (widget) => widget.name === 'pip';
42
+ exports.isPip = isPip;
43
+ const isPtzCompass = (widget) => widget.name === 'ptzCompass';
44
+ exports.isPtzCompass = isPtzCompass;
45
+ const isPtz = (widget) => widget.name === 'ptz';
46
+ exports.isPtz = isPtz;
47
+ const isScreenSharing = (widget) => widget.name === 'screenSharing';
48
+ exports.isScreenSharing = isScreenSharing;
49
+ const isWebCameraSharing = (widget) => widget.name === 'web_camera';
50
+ exports.isWebCameraSharing = isWebCameraSharing;
98
51
  var ImageType;
99
52
  (function (ImageType) {
100
53
  ImageType[ImageType["PNG"] = 0] = "PNG";
@@ -1,4 +1,3 @@
1
- import { TWidget } from './CamOverlayAPI';
2
1
  import { z } from 'zod';
3
2
  export declare const accuweatherSchema: z.ZodObject<{
4
3
  id: z.ZodNumber;
@@ -34,14 +33,15 @@ export declare const accuweatherSchema: z.ZodObject<{
34
33
  id: number;
35
34
  width: number;
36
35
  height: number;
37
- pos_x: number;
38
- pos_y: number;
39
- font: string;
40
36
  automationType: "time" | "manual" | "schedule" | `input${number}`;
41
37
  cameraList: number[];
42
38
  customName: string;
39
+ pos_x: number;
40
+ pos_y: number;
43
41
  coordSystem: "top_left" | "top" | "top_right" | "left" | "center" | "right" | "bottom_left" | "bottom" | "bottom_right";
42
+ scale: number;
44
43
  clockType: "12h" | "24h";
44
+ font: string;
45
45
  location: string;
46
46
  locationName: string;
47
47
  title: string;
@@ -50,7 +50,6 @@ export declare const accuweatherSchema: z.ZodObject<{
50
50
  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";
51
51
  units: "Metric" | "Imperial";
52
52
  layout: "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "10" | "11" | "12" | "13";
53
- scale: number;
54
53
  camera?: number | undefined;
55
54
  schedule?: string | undefined;
56
55
  invertInput?: boolean | undefined;
@@ -61,43 +60,15 @@ export declare const accuweatherSchema: z.ZodObject<{
61
60
  id: number;
62
61
  width: number;
63
62
  height: number;
64
- pos_x: number;
65
- pos_y: number;
66
- font: string;
67
63
  automationType: "time" | "manual" | "schedule" | `input${number}`;
68
64
  cameraList: number[];
69
65
  customName: string;
70
- coordSystem: "top_left" | "top" | "top_right" | "left" | "center" | "right" | "bottom_left" | "bottom" | "bottom_right";
71
- clockType: "12h" | "24h";
72
- location: string;
73
- locationName: string;
74
- title: string;
75
- bgStartColor: "237,143,73,0.93" | "0,0,0,0.75" | "31,32,73,0.9" | "76,94,127,0.95";
76
- bgEndColor: "0,0,0,0.75" | "234,181,89,0.93" | "73,96,213,0.9" | "140,150,168,0.95";
77
- 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";
78
- units: "Metric" | "Imperial";
79
- layout: "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "10" | "11" | "12" | "13";
80
- scale: number;
81
- camera?: number | undefined;
82
- schedule?: string | undefined;
83
- invertInput?: boolean | undefined;
84
- zIndex?: number | undefined;
85
- }>;
86
- export type TAccuweather = z.infer<typeof accuweatherSchema>;
87
- export declare const isAccuweather: (widget: TWidget) => widget is {
88
- name: "accuweather";
89
- enabled: 0 | 1;
90
- id: number;
91
- width: number;
92
- height: number;
93
66
  pos_x: number;
94
67
  pos_y: number;
95
- font: string;
96
- automationType: "time" | "manual" | "schedule" | `input${number}`;
97
- cameraList: number[];
98
- customName: string;
99
68
  coordSystem: "top_left" | "top" | "top_right" | "left" | "center" | "right" | "bottom_left" | "bottom" | "bottom_right";
69
+ scale: number;
100
70
  clockType: "12h" | "24h";
71
+ font: string;
101
72
  location: string;
102
73
  locationName: string;
103
74
  title: string;
@@ -106,9 +77,8 @@ export declare const isAccuweather: (widget: TWidget) => widget is {
106
77
  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";
107
78
  units: "Metric" | "Imperial";
108
79
  layout: "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "10" | "11" | "12" | "13";
109
- scale: number;
110
80
  camera?: number | undefined;
111
81
  schedule?: string | undefined;
112
82
  invertInput?: boolean | undefined;
113
83
  zIndex?: number | undefined;
114
- };
84
+ }>;
@@ -1,11 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isAccuweather = exports.accuweatherSchema = void 0;
4
- const CamOverlayAPI_1 = require("../../CamOverlayAPI");
5
- const CamOverlayAPI_2 = require("./CamOverlayAPI");
3
+ exports.accuweatherSchema = void 0;
6
4
  const zod_1 = require("zod");
7
- exports.accuweatherSchema = CamOverlayAPI_2.widgetCommonSchema.extend({
8
- name: zod_1.z.literal(CamOverlayAPI_1.allowedWidgetNames.accuweather),
5
+ const widgetCommonTypes_1 = require("./widgetCommonTypes");
6
+ exports.accuweatherSchema = widgetCommonTypes_1.widgetCommonSchema.extend({
7
+ name: zod_1.z.literal(widgetCommonTypes_1.allowedWidgetNames.accuweather),
9
8
  location: zod_1.z.string(),
10
9
  locationName: zod_1.z.string(),
11
10
  title: zod_1.z.string(),
@@ -22,12 +21,12 @@ exports.accuweatherSchema = CamOverlayAPI_2.widgetCommonSchema.extend({
22
21
  zod_1.z.literal('140,150,168,0.95'),
23
22
  ]),
24
23
  clockType: zod_1.z.union([zod_1.z.literal('12h'), zod_1.z.literal('24h')]),
25
- lang: CamOverlayAPI_2.languageSchema,
26
- font: CamOverlayAPI_2.fontSchema,
27
- units: CamOverlayAPI_2.weatherUnitSchema,
24
+ lang: widgetCommonTypes_1.languageSchema,
25
+ font: widgetCommonTypes_1.fontSchema,
26
+ units: widgetCommonTypes_1.weatherUnitSchema,
28
27
  pos_x: zod_1.z.number(),
29
28
  pos_y: zod_1.z.number(),
30
- coordSystem: CamOverlayAPI_2.coordinateSystemSchema,
29
+ coordSystem: widgetCommonTypes_1.coordinateSystemSchema,
31
30
  layout: zod_1.z.union([
32
31
  zod_1.z.literal('0'),
33
32
  zod_1.z.literal('1'),
@@ -46,5 +45,3 @@ exports.accuweatherSchema = CamOverlayAPI_2.widgetCommonSchema.extend({
46
45
  ]),
47
46
  scale: zod_1.z.number().nonnegative(),
48
47
  });
49
- const isAccuweather = (widget) => widget.name === 'accuweather';
50
- exports.isAccuweather = isAccuweather;