camstreamerlib 4.0.0-beta.37 → 4.0.0-beta.39

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 (79) hide show
  1. package/README.md +38 -27
  2. package/cjs/CamOverlayAPI.js +42 -75
  3. package/cjs/CamScripterAPI.js +30 -24
  4. package/cjs/CamStreamerAPI.js +30 -33
  5. package/cjs/CamSwitcherAPI.js +57 -52
  6. package/cjs/PlaneTrackerAPI.js +55 -66
  7. package/cjs/VapixAPI.js +23 -22
  8. package/cjs/{CamOverlayDrawingAPI.js → node/CamOverlayDrawingAPI.js} +1 -1
  9. package/cjs/{CamOverlayPainter → node/CamOverlayPainter}/Painter.js +4 -14
  10. package/cjs/{CamScripterAPICameraEventsGenerator.js → node/CamScripterAPICameraEventsGenerator.js} +1 -1
  11. package/cjs/{VapixEvents.js → node/VapixEvents.js} +1 -1
  12. package/cjs/node/events/GenetecAgent.js +5 -27
  13. package/cjs/node/index.js +17 -0
  14. package/cjs/types/CamOverlayAPI/CamOverlayAPI.js +2 -2
  15. package/cjs/types/CamOverlayAPI/scoreBoardSchema.js +6 -1
  16. package/cjs/types/CamOverlayPainter.js +12 -0
  17. package/cjs/types/CamScripterAPICameraEventsGenerator.js +2 -0
  18. package/cjs/types/CamSwitcherAPI.js +38 -1
  19. package/cjs/types/GenetecAgent.js +31 -0
  20. package/cjs/types/PlaneTrackerAPI.js +277 -0
  21. package/cjs/types/VapixAPI.js +20 -2
  22. package/cjs/types/VapixEvents.js +2 -0
  23. package/esm/CamOverlayAPI.js +43 -76
  24. package/esm/CamScripterAPI.js +30 -24
  25. package/esm/CamStreamerAPI.js +30 -30
  26. package/esm/CamSwitcherAPI.js +58 -53
  27. package/esm/PlaneTrackerAPI.js +56 -67
  28. package/esm/VapixAPI.js +24 -23
  29. package/esm/{CamOverlayDrawingAPI.js → node/CamOverlayDrawingAPI.js} +1 -1
  30. package/esm/{CamOverlayPainter → node/CamOverlayPainter}/Painter.js +1 -11
  31. package/esm/{CamScripterAPICameraEventsGenerator.js → node/CamScripterAPICameraEventsGenerator.js} +1 -1
  32. package/esm/{VapixEvents.js → node/VapixEvents.js} +1 -1
  33. package/esm/node/events/GenetecAgent.js +1 -23
  34. package/esm/node/index.js +10 -0
  35. package/esm/types/CamOverlayAPI/CamOverlayAPI.js +1 -1
  36. package/esm/types/CamOverlayAPI/scoreBoardSchema.js +6 -1
  37. package/esm/types/CamOverlayPainter.js +11 -1
  38. package/esm/types/CamSwitcherAPI.js +38 -1
  39. package/esm/types/GenetecAgent.js +28 -0
  40. package/esm/types/PlaneTrackerAPI.js +276 -1
  41. package/esm/types/VapixAPI.js +19 -1
  42. package/esm/types/VapixEvents.js +1 -0
  43. package/package.json +1 -1
  44. package/types/CamOverlayAPI.d.ts +24 -14
  45. package/types/CamScripterAPI.d.ts +34 -9
  46. package/types/CamStreamerAPI.d.ts +27 -5
  47. package/types/CamSwitcherAPI.d.ts +136 -23
  48. package/types/PlaneTrackerAPI.d.ts +201 -20
  49. package/types/VapixAPI.d.ts +46 -12
  50. package/types/bin/CreatePackage.d.ts +1 -0
  51. package/types/{CamOverlayDrawingAPI.d.ts → node/CamOverlayDrawingAPI.d.ts} +1 -1
  52. package/types/{CamOverlayPainter → node/CamOverlayPainter}/Frame.d.ts +2 -2
  53. package/types/{CamOverlayPainter → node/CamOverlayPainter}/Painter.d.ts +2 -13
  54. package/types/{CamOverlayPainter → node/CamOverlayPainter}/ResourceManager.d.ts +1 -1
  55. package/types/node/CamScripterAPICameraEventsGenerator.d.ts +31 -0
  56. package/types/node/VapixEvents.d.ts +16 -0
  57. package/types/node/events/GenetecAgent.d.ts +1 -144
  58. package/types/node/index.d.ts +10 -0
  59. package/types/types/CamOverlayAPI/CamOverlayAPI.d.ts +38 -38
  60. package/types/types/CamOverlayAPI/scoreBoardSchema.d.ts +13 -13
  61. package/types/types/CamOverlayDrawingAPI.d.ts +3 -13
  62. package/types/types/CamOverlayPainter.d.ts +12 -10
  63. package/types/types/CamScripterAPICameraEventsGenerator.d.ts +45 -0
  64. package/types/types/CamStreamerAPI.d.ts +2 -2
  65. package/types/types/CamSwitcherAPI.d.ts +111 -30
  66. package/types/types/GenetecAgent.d.ts +174 -0
  67. package/types/types/PlaneTrackerAPI.d.ts +859 -0
  68. package/types/types/VapixAPI.d.ts +54 -8
  69. package/types/types/VapixEvents.d.ts +15 -0
  70. package/types/types/common.d.ts +1 -0
  71. package/types/CamScripterAPICameraEventsGenerator.d.ts +0 -74
  72. package/types/VapixEvents.d.ts +0 -43
  73. /package/cjs/{CreatePackage.js → bin/CreatePackage.js} +0 -0
  74. /package/cjs/{CamOverlayPainter → node/CamOverlayPainter}/Frame.js +0 -0
  75. /package/cjs/{CamOverlayPainter → node/CamOverlayPainter}/ResourceManager.js +0 -0
  76. /package/esm/{CreatePackage.js → bin/CreatePackage.js} +0 -0
  77. /package/esm/{CamOverlayPainter → node/CamOverlayPainter}/Frame.js +0 -0
  78. /package/esm/{CamOverlayPainter → node/CamOverlayPainter}/ResourceManager.js +0 -0
  79. /package/{types/CreatePackage.d.ts → esm/types/CamScripterAPICameraEventsGenerator.js} +0 -0
@@ -1,30 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.GenetecAgent = void 0;
4
- const zod_1 = require("zod");
5
4
  const utils_1 = require("../../internal/utils");
6
- const successResponseSchema = zod_1.z.object({
7
- Rsp: zod_1.z.object({
8
- Status: zod_1.z.literal('Ok'),
9
- }),
10
- });
11
- const cameraGuidsResponseSchema = zod_1.z.object({
12
- Rsp: zod_1.z.object({
13
- Status: zod_1.z.literal('Ok'),
14
- Result: zod_1.z.array(zod_1.z.object({ Guid: zod_1.z.string() })),
15
- }),
16
- });
17
- const cameraDetailSchema = zod_1.z.object({
18
- Guid: zod_1.z.string().optional(),
19
- Name: zod_1.z.string().optional(),
20
- EntityType: zod_1.z.string().optional(),
21
- });
22
- const cameraDetailsResponseSchema = zod_1.z.object({
23
- Rsp: zod_1.z.object({
24
- Status: zod_1.z.literal('Ok'),
25
- Result: zod_1.z.union([zod_1.z.array(cameraDetailSchema), cameraDetailSchema]),
26
- }),
27
- });
5
+ const GenetecAgent_1 = require("../../types/GenetecAgent");
28
6
  class GenetecAgent {
29
7
  settings;
30
8
  baseUrl;
@@ -50,7 +28,7 @@ class GenetecAgent {
50
28
  throw new Error(await (0, utils_1.responseStringify)(res));
51
29
  }
52
30
  const responseBody = await res.text();
53
- const result = await successResponseSchema.safeParseAsync(JSON.parse(responseBody));
31
+ const result = await GenetecAgent_1.successResponseSchema.safeParseAsync(JSON.parse(responseBody));
54
32
  if (!result.success) {
55
33
  throw new Error('Genetec connection test failed: ' + JSON.stringify(result.error.issues) + '\n' + responseBody);
56
34
  }
@@ -64,7 +42,7 @@ class GenetecAgent {
64
42
  throw new Error(await (0, utils_1.responseStringify)(res));
65
43
  }
66
44
  const responseBody = await res.text();
67
- const result = await cameraGuidsResponseSchema.safeParseAsync(JSON.parse(responseBody));
45
+ const result = await GenetecAgent_1.cameraGuidsResponseSchema.safeParseAsync(JSON.parse(responseBody));
68
46
  if (!result.success) {
69
47
  throw new Error('Genetec get camera guids failed: ' + JSON.stringify(result.error.issues) + '\n' + responseBody);
70
48
  }
@@ -85,7 +63,7 @@ class GenetecAgent {
85
63
  throw new Error(await (0, utils_1.responseStringify)(res));
86
64
  }
87
65
  const responseBody = await res.text();
88
- const result = await cameraDetailsResponseSchema.safeParseAsync(JSON.parse(responseBody));
66
+ const result = await GenetecAgent_1.cameraDetailsResponseSchema.safeParseAsync(JSON.parse(responseBody));
89
67
  if (!result.success) {
90
68
  throw new Error('Genetec get camera details failed: ' + JSON.stringify(result.error.issues) + '\n' + responseBody);
91
69
  }
@@ -105,7 +83,7 @@ class GenetecAgent {
105
83
  throw new Error(await (0, utils_1.responseStringify)(res));
106
84
  }
107
85
  const responseBody = await res.text();
108
- const result = await successResponseSchema.safeParseAsync(JSON.parse(responseBody));
86
+ const result = await GenetecAgent_1.successResponseSchema.safeParseAsync(JSON.parse(responseBody));
109
87
  if (!result.success) {
110
88
  throw new Error('Genetec send bookmark failed: ' + JSON.stringify(result.error.issues) + '\n' + responseBody);
111
89
  }
package/cjs/node/index.js CHANGED
@@ -14,8 +14,25 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
+ exports.VapixEvents = exports.CamScripterAPICameraEventsGenerator = exports.CamOverlayDrawingAPI = exports.Frame = exports.Painter = exports.ResourceManager = void 0;
17
18
  __exportStar(require("./DefaultClient"), exports);
18
19
  __exportStar(require("./WsClient"), exports);
19
20
  __exportStar(require("./HttpServer"), exports);
20
21
  __exportStar(require("./events/AxisCameraStationEvents"), exports);
21
22
  __exportStar(require("./events/GenetecAgent"), exports);
23
+ var ResourceManager_1 = require("./CamOverlayPainter/ResourceManager");
24
+ Object.defineProperty(exports, "ResourceManager", { enumerable: true, get: function () { return ResourceManager_1.ResourceManager; } });
25
+ var Painter_1 = require("./CamOverlayPainter/Painter");
26
+ Object.defineProperty(exports, "Painter", { enumerable: true, get: function () { return Painter_1.Painter; } });
27
+ var Frame_1 = require("./CamOverlayPainter/Frame");
28
+ Object.defineProperty(exports, "Frame", { enumerable: true, get: function () { return Frame_1.Frame; } });
29
+ __exportStar(require("../types/CamOverlayPainter"), exports);
30
+ var CamOverlayDrawingAPI_1 = require("./CamOverlayDrawingAPI");
31
+ Object.defineProperty(exports, "CamOverlayDrawingAPI", { enumerable: true, get: function () { return CamOverlayDrawingAPI_1.CamOverlayDrawingAPI; } });
32
+ __exportStar(require("../types/CamOverlayDrawingAPI"), exports);
33
+ var CamScripterAPICameraEventsGenerator_1 = require("./CamScripterAPICameraEventsGenerator");
34
+ Object.defineProperty(exports, "CamScripterAPICameraEventsGenerator", { enumerable: true, get: function () { return CamScripterAPICameraEventsGenerator_1.CamScripterAPICameraEventsGenerator; } });
35
+ __exportStar(require("../types/CamScripterAPICameraEventsGenerator"), exports);
36
+ var VapixEvents_1 = require("./VapixEvents");
37
+ Object.defineProperty(exports, "VapixEvents", { enumerable: true, get: function () { return VapixEvents_1.VapixEvents; } });
38
+ __exportStar(require("../types/VapixEvents"), exports);
@@ -1,6 +1,6 @@
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.isScoreOverview = exports.isBaseballScoreBoardAutomatic = exports.isBaseballScoreBoard = exports.isScoreBoard = exports.isWebCameraSharing = exports.isScreenSharing = exports.isPtz = exports.isPtzCompass = exports.isPip = exports.isInfoticker = exports.isImages = exports.isCustomGraphics = exports.isAccuweather = exports.serviceListSchema = exports.servicesSchema = exports.WSResponseSchema = void 0;
3
+ exports.fileDataSchema = exports.fileListSchema = exports.fileSchema = exports.storageResponseSchema = exports.storageDataListSchema = exports.storageSchema = exports.ImageType = exports.isScoreOverview = exports.isBaseballScoreBoardAutomatic = exports.isBaseballScoreBoard = exports.isScoreBoard = exports.isWebCameraSharing = exports.isScreenSharing = exports.isPtz = exports.isPtzCompass = exports.isPip = exports.isInfoticker = exports.isImages = exports.isCustomGraphics = exports.isAccuweather = exports.serviceListSchema = exports.servicesSchema = exports.wsResponseSchema = void 0;
4
4
  const zod_1 = require("zod");
5
5
  const infotickerSchema_1 = require("./infotickerSchema");
6
6
  const accuweatherSchema_1 = require("./accuweatherSchema");
@@ -12,7 +12,7 @@ const customGraphicsSchema_1 = require("./customGraphicsSchema");
12
12
  const screenSharingSchema_1 = require("./screenSharingSchema");
13
13
  const webCameraSharingSchema_1 = require("./webCameraSharingSchema");
14
14
  const scoreBoardSchema_1 = require("./scoreBoardSchema");
15
- exports.WSResponseSchema = zod_1.z.object({
15
+ exports.wsResponseSchema = zod_1.z.object({
16
16
  status: zod_1.z.number(),
17
17
  message: zod_1.z.string(),
18
18
  });
@@ -3,7 +3,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.scoreOverviewSchema = exports.baseballScoreBoardAutomaticSchema = exports.baseballScoreBoardSchema = exports.scoreBoardSchema = exports.sportFontSchema = void 0;
4
4
  const zod_1 = require("zod");
5
5
  const serviceCommonTypes_1 = require("./serviceCommonTypes");
6
- exports.sportFontSchema = zod_1.z.union([zod_1.z.literal('classic'), zod_1.z.intersection(zod_1.z.string(), zod_1.z.object({}))]);
6
+ exports.sportFontSchema = zod_1.z.union([
7
+ zod_1.z.literal('classic'),
8
+ zod_1.z.custom((val) => {
9
+ return typeof val === 'string';
10
+ }),
11
+ ]);
7
12
  exports.scoreBoardSchema = zod_1.z.object({
8
13
  id: zod_1.z.number().nonnegative(),
9
14
  enabled: zod_1.z.union([zod_1.z.literal(0), zod_1.z.literal(1)]),
@@ -1,2 +1,14 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.COORD = void 0;
4
+ exports.COORD = {
5
+ top_left: [-1, -1],
6
+ center_left: [-1, 0],
7
+ bottom_left: [-1, 1],
8
+ top_center: [0, -1],
9
+ center: [0, 0],
10
+ bottom_center: [0, 1],
11
+ top_right: [1, -1],
12
+ center_right: [1, 0],
13
+ bottom_right: [1, 1],
14
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
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;
3
+ exports.secondaryAudioSettingsSchema = exports.globalAudioSettingsSchema = exports.globalAudioSettingsTypeSchema = exports.cameraOptionsSchema = exports.bitrateVapixParamsSchema = exports.bitrateModeSchema = 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
4
  const zod_1 = require("zod");
5
5
  const transformers_1 = require("../internal/transformers");
6
6
  const common_1 = require("./common");
@@ -135,3 +135,40 @@ exports.clipListSchema = zod_1.z.object({
135
135
  ])),
136
136
  })),
137
137
  });
138
+ exports.bitrateModeSchema = zod_1.z.union([zod_1.z.literal('VBR'), zod_1.z.literal('MBR'), zod_1.z.literal('ABR')]);
139
+ exports.bitrateVapixParamsSchema = zod_1.z.object({
140
+ bitrateMode: exports.bitrateModeSchema,
141
+ maximumBitRate: zod_1.z.number(),
142
+ retentionTime: zod_1.z.number(),
143
+ bitRateLimit: zod_1.z.number(),
144
+ });
145
+ exports.cameraOptionsSchema = exports.bitrateVapixParamsSchema
146
+ .extend({
147
+ resolution: zod_1.z.string(),
148
+ h264Profile: common_1.h264ProfileSchema,
149
+ fps: zod_1.z.number(),
150
+ compression: zod_1.z.number().min(0).max(100),
151
+ govLength: zod_1.z.number(),
152
+ bitrateVapixParams: zod_1.z.string().nullable(),
153
+ audioSampleRate: zod_1.z.number(),
154
+ audioChannelCount: common_1.audioChannelCountSchema,
155
+ keyboard: zod_1.z.object({
156
+ fromSource: common_1.keyboardShortcutSchema,
157
+ none: common_1.keyboardShortcutSchema,
158
+ }),
159
+ })
160
+ .partial();
161
+ exports.globalAudioSettingsTypeSchema = zod_1.z.union([zod_1.z.literal('fromSource'), zod_1.z.literal('source')]);
162
+ exports.globalAudioSettingsSchema = zod_1.z.object({
163
+ type: exports.globalAudioSettingsTypeSchema,
164
+ source: zod_1.z.string(),
165
+ storage: zod_1.z.string().optional(),
166
+ });
167
+ exports.secondaryAudioSettingsSchema = zod_1.z.object({
168
+ type: zod_1.z.union([zod_1.z.literal('CLIP'), zod_1.z.literal('STREAM'), zod_1.z.literal('NONE')]),
169
+ streamName: zod_1.z.string().optional(),
170
+ clipName: zod_1.z.string().optional(),
171
+ storage: common_1.storageTypeSchema,
172
+ secondaryAudioLevel: zod_1.z.number(),
173
+ masterAudioLevel: zod_1.z.number(),
174
+ });
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.cameraListSchema = exports.cameraDetailsResponseSchema = exports.cameraDetailSchema = exports.cameraGuidsResponseSchema = exports.successResponseSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ exports.successResponseSchema = zod_1.z.object({
6
+ Rsp: zod_1.z.object({
7
+ Status: zod_1.z.literal('Ok'),
8
+ }),
9
+ });
10
+ exports.cameraGuidsResponseSchema = zod_1.z.object({
11
+ Rsp: zod_1.z.object({
12
+ Status: zod_1.z.literal('Ok'),
13
+ Result: zod_1.z.array(zod_1.z.object({ Guid: zod_1.z.string() })),
14
+ }),
15
+ });
16
+ exports.cameraDetailSchema = zod_1.z.object({
17
+ Guid: zod_1.z.string().optional(),
18
+ Name: zod_1.z.string().optional(),
19
+ EntityType: zod_1.z.string().optional(),
20
+ });
21
+ exports.cameraDetailsResponseSchema = zod_1.z.object({
22
+ Rsp: zod_1.z.object({
23
+ Status: zod_1.z.literal('Ok'),
24
+ Result: zod_1.z.union([zod_1.z.array(exports.cameraDetailSchema), exports.cameraDetailSchema]),
25
+ }),
26
+ });
27
+ exports.cameraListSchema = zod_1.z.array(zod_1.z.object({
28
+ index: zod_1.z.number(),
29
+ value: zod_1.z.string(),
30
+ label: zod_1.z.string(),
31
+ }));
@@ -1,2 +1,279 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.zonesSchema = exports.mapInfoSchema = exports.mapTypeSchema = exports.blackListSchema = exports.whiteListSchema = exports.priorityListSchema = exports.flightInfoSchema = exports.trackingModeSchema = exports.serverSettingsSchema = exports.cameraSettingsSchema = exports.widgetSchema = exports.connectionSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ exports.connectionSchema = zod_1.z.object({
6
+ protocol: zod_1.z.union([zod_1.z.literal('http'), zod_1.z.literal('https'), zod_1.z.literal('https_insecure')]),
7
+ ip: zod_1.z.union([zod_1.z.string().ip(), zod_1.z.literal('')]),
8
+ port: zod_1.z.number().positive().lt(65535),
9
+ user: zod_1.z.string(),
10
+ pass: zod_1.z.string(),
11
+ });
12
+ exports.widgetSchema = zod_1.z.object({
13
+ enabled: zod_1.z.boolean().default(true),
14
+ coord: zod_1.z.union([
15
+ zod_1.z.literal('top_left'),
16
+ zod_1.z.literal('top_right'),
17
+ zod_1.z.literal('bottom_left'),
18
+ zod_1.z.literal('bottom_right'),
19
+ ]),
20
+ posX: zod_1.z.number().nonnegative(),
21
+ posY: zod_1.z.number().nonnegative(),
22
+ scale: zod_1.z.number().positive(),
23
+ });
24
+ const labelOptionsSchema = zod_1.z.union([
25
+ zod_1.z.literal('blank'),
26
+ zod_1.z.literal('registration'),
27
+ zod_1.z.literal('call_sign'),
28
+ zod_1.z.literal('flight_number'),
29
+ zod_1.z.literal('icao'),
30
+ ]);
31
+ const identificationLabelSchema = zod_1.z.object({
32
+ firstRow: labelOptionsSchema,
33
+ secondRow: labelOptionsSchema,
34
+ thirdRow: labelOptionsSchema,
35
+ fourthRow: labelOptionsSchema,
36
+ opacity: zod_1.z.number().positive(),
37
+ });
38
+ exports.cameraSettingsSchema = zod_1.z.object({
39
+ units: zod_1.z.union([zod_1.z.literal('metric'), zod_1.z.literal('imperial')]).default('imperial'),
40
+ adsbSource: zod_1.z
41
+ .object({
42
+ ip: zod_1.z.union([zod_1.z.string().ip(), zod_1.z.literal('')]),
43
+ port: zod_1.z.number().positive().lt(65535),
44
+ })
45
+ .default({ ip: '', port: 30334 }),
46
+ camera: exports.connectionSchema.default({
47
+ protocol: 'http',
48
+ ip: '127.0.0.1',
49
+ port: 80,
50
+ user: 'root',
51
+ pass: '',
52
+ }),
53
+ cameraCalibrationProcessConfig: zod_1.z
54
+ .object({
55
+ nightSkyCalibrationEnabled: zod_1.z.boolean(),
56
+ scheduleNightSkyCalibrationTimestamp: zod_1.z.number(),
57
+ })
58
+ .default({ nightSkyCalibrationEnabled: false, scheduleNightSkyCalibrationTimestamp: 0 }),
59
+ cameraConfig: zod_1.z
60
+ .object({
61
+ maxZoomLevel: zod_1.z.number().optional(),
62
+ defaultCaptureSizeMeters: zod_1.z.number().positive().default(120),
63
+ captureSizeExtensionMeters: zod_1.z.number().positive().default(80),
64
+ })
65
+ .default({
66
+ maxZoomLevel: 30,
67
+ defaultCaptureSizeMeters: 120,
68
+ captureSizeExtensionMeters: 80,
69
+ }),
70
+ stream: zod_1.z
71
+ .object({
72
+ width: zod_1.z.number().positive(),
73
+ height: zod_1.z.number().positive(),
74
+ })
75
+ .default({ width: 1920, height: 1080 }),
76
+ imageConfig: zod_1.z
77
+ .object({
78
+ dayAperture: zod_1.z.number().nonnegative().min(0).max(100),
79
+ nightAperture: zod_1.z.number().nonnegative().min(0).max(100),
80
+ })
81
+ .default({ dayAperture: 50, nightAperture: 0 }),
82
+ airportConfig: zod_1.z
83
+ .object({
84
+ icao: zod_1.z.string().default(''),
85
+ centerLat: zod_1.z.number(),
86
+ centerLon: zod_1.z.number(),
87
+ radius: zod_1.z.number().nonnegative().default(10000),
88
+ })
89
+ .default({
90
+ icao: '',
91
+ centerLat: 0,
92
+ centerLon: 0,
93
+ radius: 10000,
94
+ }),
95
+ trackingConfig: zod_1.z
96
+ .object({
97
+ prioritizeEmergency: zod_1.z.boolean(),
98
+ })
99
+ .default({ prioritizeEmergency: true }),
100
+ overlayText: zod_1.z
101
+ .object({
102
+ displayIcao: zod_1.z.boolean().optional(),
103
+ displayRegistration: zod_1.z.boolean().optional(),
104
+ displayFlightNumber: zod_1.z.boolean().optional(),
105
+ displayAltitude: zod_1.z.boolean().optional(),
106
+ displayVelocity: zod_1.z.boolean().optional(),
107
+ displayDistance: zod_1.z.boolean().optional(),
108
+ displayFOV: zod_1.z.boolean().optional(),
109
+ displayPTError: zod_1.z.boolean().optional(),
110
+ displayPTZSpeed: zod_1.z.boolean().optional(),
111
+ displayVelocityData: zod_1.z.boolean().optional(),
112
+ displaySignalQuality: zod_1.z.boolean().optional(),
113
+ displayAutoTrackingInfo: zod_1.z.boolean().optional(),
114
+ displayGPSCoords: zod_1.z.boolean().optional(),
115
+ displayVapixQuery: zod_1.z.boolean().optional(),
116
+ displayFocus: zod_1.z.boolean().optional(),
117
+ displayAperture: zod_1.z.boolean().optional(),
118
+ displaySunDistance: zod_1.z.boolean().optional(),
119
+ displayTickTime: zod_1.z.boolean().optional(),
120
+ displayAircraftInfo: zod_1.z.boolean().optional(),
121
+ })
122
+ .optional(),
123
+ widget: exports.widgetSchema.default({
124
+ enabled: true,
125
+ coord: 'top_right',
126
+ posX: 10,
127
+ posY: 10,
128
+ scale: 100,
129
+ }),
130
+ airportWidget: exports.widgetSchema.default({
131
+ enabled: true,
132
+ coord: 'top_left',
133
+ posX: 10,
134
+ posY: 10,
135
+ scale: 100,
136
+ }),
137
+ fr24FlightInfoSource: zod_1.z
138
+ .object({
139
+ enabled: zod_1.z.boolean().default(false),
140
+ priority: zod_1.z.number().int().positive().default(1),
141
+ apiToken: zod_1.z.string().default(''),
142
+ validateFlights: zod_1.z.boolean().default(true),
143
+ })
144
+ .default({
145
+ enabled: false,
146
+ priority: 1,
147
+ apiToken: '',
148
+ validateFlights: true,
149
+ }),
150
+ radarcapeFlightInfoSource: zod_1.z
151
+ .object({
152
+ enabled: zod_1.z.boolean().default(false),
153
+ priority: zod_1.z.number().int().positive().default(2),
154
+ ip: zod_1.z.union([zod_1.z.string().ip(), zod_1.z.literal('')]).default(''),
155
+ port: zod_1.z.number().positive().lt(65535).default(80),
156
+ })
157
+ .default({
158
+ enabled: false,
159
+ priority: 2,
160
+ ip: '',
161
+ port: 80,
162
+ }),
163
+ identificationLabel: identificationLabelSchema.default({
164
+ firstRow: 'registration',
165
+ secondRow: 'blank',
166
+ thirdRow: 'blank',
167
+ fourthRow: 'blank',
168
+ opacity: 30,
169
+ }),
170
+ acs: exports.connectionSchema
171
+ .extend({
172
+ enabled: zod_1.z.boolean(),
173
+ sourceKey: zod_1.z.string(),
174
+ })
175
+ .default({
176
+ enabled: false,
177
+ protocol: 'https_insecure',
178
+ ip: '',
179
+ port: 29204,
180
+ user: '',
181
+ pass: '',
182
+ sourceKey: '',
183
+ }),
184
+ genetec: exports.connectionSchema
185
+ .extend({
186
+ enabled: zod_1.z.boolean(),
187
+ baseUri: zod_1.z.string().default(''),
188
+ appId: zod_1.z.string().default(''),
189
+ cameraList: zod_1.z.string().array().default([]),
190
+ })
191
+ .default({
192
+ enabled: false,
193
+ protocol: 'http',
194
+ ip: '',
195
+ port: 4590,
196
+ user: '',
197
+ pass: '',
198
+ baseUri: 'WebSdk',
199
+ appId: '',
200
+ cameraList: [],
201
+ }),
202
+ });
203
+ exports.serverSettingsSchema = zod_1.z.object({
204
+ cameraCalibration: zod_1.z.object({
205
+ posLat: zod_1.z.number(),
206
+ posLon: zod_1.z.number(),
207
+ geoidHN: zod_1.z.number(),
208
+ altitudeAmsl: zod_1.z.number(),
209
+ rotationEast: zod_1.z.number(),
210
+ rotationNorth: zod_1.z.number(),
211
+ rotationUp: zod_1.z.number(),
212
+ tiltTransformationCoefA: zod_1.z.number(),
213
+ tiltCameraKnownPoint: zod_1.z.number(),
214
+ tiltRealKnownPoint: zod_1.z.number(),
215
+ }),
216
+ });
217
+ exports.trackingModeSchema = zod_1.z.object({
218
+ mode: zod_1.z.union([zod_1.z.literal('MANUAL'), zod_1.z.literal('AUTOMATIC')]),
219
+ });
220
+ exports.flightInfoSchema = zod_1.z.object({
221
+ callsign: zod_1.z.string().optional(),
222
+ flightNumber: zod_1.z.string().optional(),
223
+ registration: zod_1.z.string().optional(),
224
+ aircraftType: zod_1.z.string().optional(),
225
+ airlines: zod_1.z.string().optional(),
226
+ originAirport: zod_1.z
227
+ .object({
228
+ icao: zod_1.z.string().optional(),
229
+ iata: zod_1.z.string().optional(),
230
+ city: zod_1.z.string().optional(),
231
+ })
232
+ .optional(),
233
+ destinationAirport: zod_1.z.object({
234
+ icao: zod_1.z.string().optional(),
235
+ iata: zod_1.z.string().optional(),
236
+ city: zod_1.z.string().optional(),
237
+ }),
238
+ flightImages: zod_1.z
239
+ .array(zod_1.z.object({
240
+ src: zod_1.z.string().optional(),
241
+ photographer: zod_1.z.string().optional(),
242
+ }))
243
+ .optional(),
244
+ });
245
+ exports.priorityListSchema = zod_1.z.object({
246
+ priorityList: zod_1.z.array(zod_1.z.string()).default([]),
247
+ });
248
+ exports.whiteListSchema = zod_1.z.object({
249
+ whiteList: zod_1.z.array(zod_1.z.string()).default([]),
250
+ });
251
+ exports.blackListSchema = zod_1.z.object({
252
+ blackList: zod_1.z.array(zod_1.z.string()).default([]),
253
+ });
254
+ exports.mapTypeSchema = zod_1.z.enum(['roadmap', 'satellite']);
255
+ exports.mapInfoSchema = zod_1.z.object({
256
+ minZoom: zod_1.z.number().nonnegative(),
257
+ maxZoom: zod_1.z.number().nonnegative(),
258
+ mapTypes: zod_1.z.array(exports.mapTypeSchema),
259
+ tileSize: zod_1.z.number().nonnegative(),
260
+ });
261
+ exports.zonesSchema = zod_1.z.object({
262
+ zones: zod_1.z
263
+ .array(zod_1.z.object({
264
+ enabled: zod_1.z.boolean().default(true),
265
+ name: zod_1.z.string().optional(),
266
+ area: zod_1.z
267
+ .array(zod_1.z.object({
268
+ lat: zod_1.z.number(),
269
+ lon: zod_1.z.number(),
270
+ }))
271
+ .nonempty(),
272
+ minAltitudeAmsl: zod_1.z.number().optional(),
273
+ maxAltitudeAmsl: zod_1.z.number().optional(),
274
+ minSpeedKmph: zod_1.z.number().optional(),
275
+ maxSpeedKmph: zod_1.z.number().optional(),
276
+ weight: zod_1.z.number(),
277
+ }))
278
+ .default([]),
279
+ });
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.portSequenceStateSchema = exports.portSetSchema = exports.getPortsResponseSchema = exports.portStatusSchema = exports.audioSampleRatesResponseSchema = exports.timeZoneSchema = exports.dateTimeinfoSchema = exports.maxFpsResponseSchema = exports.audioDeviceRequestSchema = exports.audioDeviceSchema = exports.audioDeviceInputOutputSchema = exports.audioDeviceConnectionTypeSchema = exports.audioDeviceSignalingTypeSchema = exports.audioDeviceSignalingChannelTypeSchema = exports.cameraPTZItemSchema = exports.cameraPTZItemDataSchema = exports.PtzOverviewSchema = exports.sdCardWatchedStatuses = exports.guardTourSchema = exports.APP_IDS = exports.applicationSchema = void 0;
3
+ exports.portSequenceStateSchema = exports.portSetSchema = exports.getPortsResponseSchema = exports.portStatusSchema = exports.audioSampleRatesResponseSchema = exports.timeZoneSchema = exports.dateTimeinfoSchema = exports.maxFpsResponseSchema = exports.audioDeviceRequestSchema = exports.audioDeviceSchema = exports.audioDeviceInputOutputSchema = exports.audioDeviceConnectionTypeSchema = exports.audioDeviceSignalingTypeSchema = exports.audioDeviceSignalingChannelTypeSchema = exports.cameraPTZItemSchema = exports.cameraPTZItemDataSchema = exports.ptzOverviewSchema = exports.sdCardInfoSchema = exports.sdCardWatchedStatuses = exports.guardTourSchema = exports.APP_IDS = exports.applicationListSchema = exports.applicationSchema = void 0;
4
4
  const zod_1 = require("zod");
5
5
  const transformers_1 = require("../internal/transformers");
6
6
  exports.applicationSchema = zod_1.z.object({
@@ -15,6 +15,19 @@ exports.applicationSchema = zod_1.z.object({
15
15
  VendorHomePage: zod_1.z.string().optional(),
16
16
  LicenseName: zod_1.z.string().optional(),
17
17
  });
18
+ exports.applicationListSchema = zod_1.z.array(exports.applicationSchema.extend({
19
+ appId: zod_1.z
20
+ .union([
21
+ zod_1.z.literal('CamStreamer'),
22
+ zod_1.z.literal('CamSwitcher'),
23
+ zod_1.z.literal('CamOverlay'),
24
+ zod_1.z.literal('CamScripter'),
25
+ zod_1.z.literal('PlaneTracker'),
26
+ zod_1.z.literal('Ndihxplugin'),
27
+ zod_1.z.literal('SportTracker'),
28
+ ])
29
+ .nullable(),
30
+ }));
18
31
  exports.APP_IDS = [
19
32
  'CamStreamer',
20
33
  'CamSwitcher',
@@ -45,7 +58,12 @@ const audioSampleRatesSchema = zod_1.z.object({
45
58
  });
46
59
  const audioSampleRatesOutSchema = audioSampleRatesSchema.transform(transformers_1.toCamelCaseDeep);
47
60
  exports.sdCardWatchedStatuses = ['OK', 'connected', 'disconnected'];
48
- exports.PtzOverviewSchema = zod_1.z.record(zod_1.z.number(), zod_1.z.array(zod_1.z.object({ id: zod_1.z.number(), name: zod_1.z.string() })));
61
+ exports.sdCardInfoSchema = zod_1.z.object({
62
+ status: zod_1.z.enum(exports.sdCardWatchedStatuses),
63
+ totalSize: zod_1.z.number(),
64
+ freeSize: zod_1.z.number(),
65
+ });
66
+ exports.ptzOverviewSchema = zod_1.z.record(zod_1.z.number(), zod_1.z.array(zod_1.z.object({ id: zod_1.z.number(), name: zod_1.z.string() })));
49
67
  exports.cameraPTZItemDataSchema = zod_1.z.object({
50
68
  pan: zod_1.z.number().optional(),
51
69
  tilt: zod_1.z.number().optional(),
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });