camstreamerlib 4.0.34 → 4.0.35-64a81fd
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/cjs/CamOverlayAPI.d.ts +6 -0
- package/cjs/CamOverlayAPI.js +16 -0
- package/cjs/CamSwitcherAPI.d.ts +1 -1
- package/cjs/PlaneTrackerAPI.d.ts +43 -10
- package/cjs/PlaneTrackerAPI.js +2 -1
- package/cjs/VapixAPI.js +19 -13
- package/cjs/VapixAPI.test.d.ts +1 -0
- package/cjs/VapixAPI.test.js +146 -0
- package/cjs/errors/errors.js +4 -4
- package/cjs/types/CamSwitcherAPI.d.ts +4 -4
- package/cjs/types/PlaneTrackerAPI.d.ts +205 -39
- package/cjs/types/PlaneTrackerAPI.js +61 -22
- package/cjs/types/PlaneTrackerAPI.test.d.ts +1 -0
- package/cjs/types/PlaneTrackerAPI.test.js +90 -0
- package/cjs/types/common.d.ts +13 -0
- package/cjs/types/common.js +6 -1
- package/cjs/types/ws/CamSwitcherEvents.d.ts +8 -8
- package/esm/CamOverlayAPI.js +17 -1
- package/esm/PlaneTrackerAPI.js +2 -1
- package/esm/VapixAPI.js +20 -14
- package/esm/VapixAPI.test.js +144 -0
- package/esm/errors/errors.js +4 -4
- package/esm/types/PlaneTrackerAPI.js +60 -21
- package/esm/types/PlaneTrackerAPI.test.js +88 -0
- package/esm/types/common.js +5 -0
- package/package.json +107 -110
- package/types/CamOverlayAPI.d.ts +6 -0
- package/types/CamSwitcherAPI.d.ts +1 -1
- package/types/PlaneTrackerAPI.d.ts +43 -10
- package/types/VapixAPI.test.d.ts +1 -0
- package/types/types/CamSwitcherAPI.d.ts +4 -4
- package/types/types/PlaneTrackerAPI.d.ts +205 -39
- package/types/types/PlaneTrackerAPI.test.d.ts +1 -0
- package/types/types/common.d.ts +13 -0
- package/types/types/ws/CamSwitcherEvents.d.ts +8 -8
|
@@ -1,19 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
export type TImportDataType = 'MAP_DATA' | 'SERVER_DATA' | 'ALL';
|
|
3
3
|
export type TExportDataType = 'NIGHT_SKY_CALIBRATION_DATA' | 'ALL';
|
|
4
|
-
export declare const wsAliasResponseSchema: z.ZodObject<{
|
|
5
|
-
alias: z.ZodString;
|
|
6
|
-
ws: z.ZodString;
|
|
7
|
-
ws_initial_message: z.ZodString;
|
|
8
|
-
}, "strip", z.ZodTypeAny, {
|
|
9
|
-
ws: string;
|
|
10
|
-
ws_initial_message: string;
|
|
11
|
-
alias: string;
|
|
12
|
-
}, {
|
|
13
|
-
ws: string;
|
|
14
|
-
ws_initial_message: string;
|
|
15
|
-
alias: string;
|
|
16
|
-
}>;
|
|
17
4
|
export declare const connectionSchema: z.ZodObject<{
|
|
18
5
|
protocol: z.ZodUnion<[z.ZodLiteral<"http">, z.ZodLiteral<"https">, z.ZodLiteral<"https_insecure">]>;
|
|
19
6
|
ip: z.ZodUnion<[z.ZodString, z.ZodLiteral<"">]>;
|
|
@@ -69,6 +56,8 @@ export declare const widgetSchema: z.ZodObject<{
|
|
|
69
56
|
}>;
|
|
70
57
|
declare const labelOptionsSchema: z.ZodUnion<[z.ZodLiteral<"blank">, z.ZodLiteral<"registration">, z.ZodLiteral<"call_sign">, z.ZodLiteral<"flight_number">, z.ZodLiteral<"icao">]>;
|
|
71
58
|
export type TLabelOption = z.infer<typeof labelOptionsSchema>;
|
|
59
|
+
declare const droneLabelOptionsSchema: z.ZodUnion<[z.ZodLiteral<"blank">, z.ZodLiteral<"remote_id">]>;
|
|
60
|
+
export type TDroneLabelOption = z.infer<typeof droneLabelOptionsSchema>;
|
|
72
61
|
export declare const cameraSettingsSchema: z.ZodObject<{
|
|
73
62
|
units: z.ZodDefault<z.ZodUnion<[z.ZodLiteral<"metric">, z.ZodLiteral<"imperial">]>>;
|
|
74
63
|
adsbSource: z.ZodDefault<z.ZodObject<{
|
|
@@ -132,16 +121,67 @@ export declare const cameraSettingsSchema: z.ZodObject<{
|
|
|
132
121
|
nightSkyCalibrationFocusValue?: number | undefined;
|
|
133
122
|
focusCalibrationPoints?: string | undefined;
|
|
134
123
|
}>>;
|
|
135
|
-
cameraConfig: z.ZodDefault<z.ZodObject<{
|
|
124
|
+
cameraConfig: z.ZodDefault<z.ZodUnion<[z.ZodObject<{
|
|
125
|
+
aircraft: z.ZodObject<{
|
|
126
|
+
defaultCaptureSizeMeters: z.ZodNumber;
|
|
127
|
+
captureSizeExtensionMeters: z.ZodNumber;
|
|
128
|
+
}, "strip", z.ZodTypeAny, {
|
|
129
|
+
defaultCaptureSizeMeters: number;
|
|
130
|
+
captureSizeExtensionMeters: number;
|
|
131
|
+
}, {
|
|
132
|
+
defaultCaptureSizeMeters: number;
|
|
133
|
+
captureSizeExtensionMeters: number;
|
|
134
|
+
}>;
|
|
135
|
+
drone: z.ZodDefault<z.ZodObject<{
|
|
136
|
+
defaultCaptureSizeMeters: z.ZodNumber;
|
|
137
|
+
captureSizeExtensionMeters: z.ZodNumber;
|
|
138
|
+
}, "strip", z.ZodTypeAny, {
|
|
139
|
+
defaultCaptureSizeMeters: number;
|
|
140
|
+
captureSizeExtensionMeters: number;
|
|
141
|
+
}, {
|
|
142
|
+
defaultCaptureSizeMeters: number;
|
|
143
|
+
captureSizeExtensionMeters: number;
|
|
144
|
+
}>>;
|
|
145
|
+
}, "strip", z.ZodTypeAny, {
|
|
146
|
+
aircraft: {
|
|
147
|
+
defaultCaptureSizeMeters: number;
|
|
148
|
+
captureSizeExtensionMeters: number;
|
|
149
|
+
};
|
|
150
|
+
drone: {
|
|
151
|
+
defaultCaptureSizeMeters: number;
|
|
152
|
+
captureSizeExtensionMeters: number;
|
|
153
|
+
};
|
|
154
|
+
}, {
|
|
155
|
+
aircraft: {
|
|
156
|
+
defaultCaptureSizeMeters: number;
|
|
157
|
+
captureSizeExtensionMeters: number;
|
|
158
|
+
};
|
|
159
|
+
drone?: {
|
|
160
|
+
defaultCaptureSizeMeters: number;
|
|
161
|
+
captureSizeExtensionMeters: number;
|
|
162
|
+
} | undefined;
|
|
163
|
+
}>, z.ZodEffects<z.ZodObject<{
|
|
136
164
|
defaultCaptureSizeMeters: z.ZodDefault<z.ZodNumber>;
|
|
137
165
|
captureSizeExtensionMeters: z.ZodDefault<z.ZodNumber>;
|
|
138
|
-
}, "
|
|
166
|
+
}, "strict", z.ZodTypeAny, {
|
|
139
167
|
defaultCaptureSizeMeters: number;
|
|
140
168
|
captureSizeExtensionMeters: number;
|
|
141
169
|
}, {
|
|
142
170
|
defaultCaptureSizeMeters?: number | undefined;
|
|
143
171
|
captureSizeExtensionMeters?: number | undefined;
|
|
144
|
-
}
|
|
172
|
+
}>, {
|
|
173
|
+
aircraft: {
|
|
174
|
+
defaultCaptureSizeMeters: number;
|
|
175
|
+
captureSizeExtensionMeters: number;
|
|
176
|
+
};
|
|
177
|
+
drone: {
|
|
178
|
+
defaultCaptureSizeMeters: number;
|
|
179
|
+
captureSizeExtensionMeters: number;
|
|
180
|
+
};
|
|
181
|
+
}, {
|
|
182
|
+
defaultCaptureSizeMeters?: number | undefined;
|
|
183
|
+
captureSizeExtensionMeters?: number | undefined;
|
|
184
|
+
}>]>>;
|
|
145
185
|
stream: z.ZodDefault<z.ZodObject<{
|
|
146
186
|
width: z.ZodNumber;
|
|
147
187
|
height: z.ZodNumber;
|
|
@@ -347,7 +387,61 @@ export declare const cameraSettingsSchema: z.ZodObject<{
|
|
|
347
387
|
port?: number | undefined;
|
|
348
388
|
priority?: number | undefined;
|
|
349
389
|
}>>;
|
|
350
|
-
identificationLabel: z.ZodDefault<z.ZodObject<{
|
|
390
|
+
identificationLabel: z.ZodDefault<z.ZodUnion<[z.ZodObject<{
|
|
391
|
+
aircraft: z.ZodObject<{
|
|
392
|
+
firstRow: z.ZodUnion<[z.ZodLiteral<"blank">, z.ZodLiteral<"registration">, z.ZodLiteral<"call_sign">, z.ZodLiteral<"flight_number">, z.ZodLiteral<"icao">]>;
|
|
393
|
+
secondRow: z.ZodUnion<[z.ZodLiteral<"blank">, z.ZodLiteral<"registration">, z.ZodLiteral<"call_sign">, z.ZodLiteral<"flight_number">, z.ZodLiteral<"icao">]>;
|
|
394
|
+
thirdRow: z.ZodUnion<[z.ZodLiteral<"blank">, z.ZodLiteral<"registration">, z.ZodLiteral<"call_sign">, z.ZodLiteral<"flight_number">, z.ZodLiteral<"icao">]>;
|
|
395
|
+
fourthRow: z.ZodUnion<[z.ZodLiteral<"blank">, z.ZodLiteral<"registration">, z.ZodLiteral<"call_sign">, z.ZodLiteral<"flight_number">, z.ZodLiteral<"icao">]>;
|
|
396
|
+
opacity: z.ZodNumber;
|
|
397
|
+
}, "strip", z.ZodTypeAny, {
|
|
398
|
+
firstRow: "blank" | "registration" | "call_sign" | "flight_number" | "icao";
|
|
399
|
+
secondRow: "blank" | "registration" | "call_sign" | "flight_number" | "icao";
|
|
400
|
+
thirdRow: "blank" | "registration" | "call_sign" | "flight_number" | "icao";
|
|
401
|
+
fourthRow: "blank" | "registration" | "call_sign" | "flight_number" | "icao";
|
|
402
|
+
opacity: number;
|
|
403
|
+
}, {
|
|
404
|
+
firstRow: "blank" | "registration" | "call_sign" | "flight_number" | "icao";
|
|
405
|
+
secondRow: "blank" | "registration" | "call_sign" | "flight_number" | "icao";
|
|
406
|
+
thirdRow: "blank" | "registration" | "call_sign" | "flight_number" | "icao";
|
|
407
|
+
fourthRow: "blank" | "registration" | "call_sign" | "flight_number" | "icao";
|
|
408
|
+
opacity: number;
|
|
409
|
+
}>;
|
|
410
|
+
drone: z.ZodDefault<z.ZodObject<{
|
|
411
|
+
firstRow: z.ZodUnion<[z.ZodLiteral<"blank">, z.ZodLiteral<"remote_id">]>;
|
|
412
|
+
opacity: z.ZodNumber;
|
|
413
|
+
}, "strip", z.ZodTypeAny, {
|
|
414
|
+
firstRow: "blank" | "remote_id";
|
|
415
|
+
opacity: number;
|
|
416
|
+
}, {
|
|
417
|
+
firstRow: "blank" | "remote_id";
|
|
418
|
+
opacity: number;
|
|
419
|
+
}>>;
|
|
420
|
+
}, "strip", z.ZodTypeAny, {
|
|
421
|
+
aircraft: {
|
|
422
|
+
firstRow: "blank" | "registration" | "call_sign" | "flight_number" | "icao";
|
|
423
|
+
secondRow: "blank" | "registration" | "call_sign" | "flight_number" | "icao";
|
|
424
|
+
thirdRow: "blank" | "registration" | "call_sign" | "flight_number" | "icao";
|
|
425
|
+
fourthRow: "blank" | "registration" | "call_sign" | "flight_number" | "icao";
|
|
426
|
+
opacity: number;
|
|
427
|
+
};
|
|
428
|
+
drone: {
|
|
429
|
+
firstRow: "blank" | "remote_id";
|
|
430
|
+
opacity: number;
|
|
431
|
+
};
|
|
432
|
+
}, {
|
|
433
|
+
aircraft: {
|
|
434
|
+
firstRow: "blank" | "registration" | "call_sign" | "flight_number" | "icao";
|
|
435
|
+
secondRow: "blank" | "registration" | "call_sign" | "flight_number" | "icao";
|
|
436
|
+
thirdRow: "blank" | "registration" | "call_sign" | "flight_number" | "icao";
|
|
437
|
+
fourthRow: "blank" | "registration" | "call_sign" | "flight_number" | "icao";
|
|
438
|
+
opacity: number;
|
|
439
|
+
};
|
|
440
|
+
drone?: {
|
|
441
|
+
firstRow: "blank" | "remote_id";
|
|
442
|
+
opacity: number;
|
|
443
|
+
} | undefined;
|
|
444
|
+
}>, z.ZodEffects<z.ZodObject<{
|
|
351
445
|
firstRow: z.ZodUnion<[z.ZodLiteral<"blank">, z.ZodLiteral<"registration">, z.ZodLiteral<"call_sign">, z.ZodLiteral<"flight_number">, z.ZodLiteral<"icao">]>;
|
|
352
446
|
secondRow: z.ZodUnion<[z.ZodLiteral<"blank">, z.ZodLiteral<"registration">, z.ZodLiteral<"call_sign">, z.ZodLiteral<"flight_number">, z.ZodLiteral<"icao">]>;
|
|
353
447
|
thirdRow: z.ZodUnion<[z.ZodLiteral<"blank">, z.ZodLiteral<"registration">, z.ZodLiteral<"call_sign">, z.ZodLiteral<"flight_number">, z.ZodLiteral<"icao">]>;
|
|
@@ -365,7 +459,25 @@ export declare const cameraSettingsSchema: z.ZodObject<{
|
|
|
365
459
|
thirdRow: "blank" | "registration" | "call_sign" | "flight_number" | "icao";
|
|
366
460
|
fourthRow: "blank" | "registration" | "call_sign" | "flight_number" | "icao";
|
|
367
461
|
opacity: number;
|
|
368
|
-
}
|
|
462
|
+
}>, {
|
|
463
|
+
aircraft: {
|
|
464
|
+
firstRow: "blank" | "registration" | "call_sign" | "flight_number" | "icao";
|
|
465
|
+
secondRow: "blank" | "registration" | "call_sign" | "flight_number" | "icao";
|
|
466
|
+
thirdRow: "blank" | "registration" | "call_sign" | "flight_number" | "icao";
|
|
467
|
+
fourthRow: "blank" | "registration" | "call_sign" | "flight_number" | "icao";
|
|
468
|
+
opacity: number;
|
|
469
|
+
};
|
|
470
|
+
drone: {
|
|
471
|
+
firstRow: "blank" | "remote_id";
|
|
472
|
+
opacity: number;
|
|
473
|
+
};
|
|
474
|
+
}, {
|
|
475
|
+
firstRow: "blank" | "registration" | "call_sign" | "flight_number" | "icao";
|
|
476
|
+
secondRow: "blank" | "registration" | "call_sign" | "flight_number" | "icao";
|
|
477
|
+
thirdRow: "blank" | "registration" | "call_sign" | "flight_number" | "icao";
|
|
478
|
+
fourthRow: "blank" | "registration" | "call_sign" | "flight_number" | "icao";
|
|
479
|
+
opacity: number;
|
|
480
|
+
}>]>>;
|
|
369
481
|
acs: z.ZodDefault<z.ZodObject<{
|
|
370
482
|
protocol: z.ZodUnion<[z.ZodLiteral<"http">, z.ZodLiteral<"https">, z.ZodLiteral<"https_insecure">]>;
|
|
371
483
|
ip: z.ZodUnion<[z.ZodString, z.ZodLiteral<"">]>;
|
|
@@ -460,8 +572,23 @@ export declare const cameraSettingsSchema: z.ZodObject<{
|
|
|
460
572
|
focusCalibrationPoints: string;
|
|
461
573
|
};
|
|
462
574
|
cameraConfig: {
|
|
463
|
-
|
|
464
|
-
|
|
575
|
+
aircraft: {
|
|
576
|
+
defaultCaptureSizeMeters: number;
|
|
577
|
+
captureSizeExtensionMeters: number;
|
|
578
|
+
};
|
|
579
|
+
drone: {
|
|
580
|
+
defaultCaptureSizeMeters: number;
|
|
581
|
+
captureSizeExtensionMeters: number;
|
|
582
|
+
};
|
|
583
|
+
} | {
|
|
584
|
+
aircraft: {
|
|
585
|
+
defaultCaptureSizeMeters: number;
|
|
586
|
+
captureSizeExtensionMeters: number;
|
|
587
|
+
};
|
|
588
|
+
drone: {
|
|
589
|
+
defaultCaptureSizeMeters: number;
|
|
590
|
+
captureSizeExtensionMeters: number;
|
|
591
|
+
};
|
|
465
592
|
};
|
|
466
593
|
stream: {
|
|
467
594
|
width: number;
|
|
@@ -514,11 +641,29 @@ export declare const cameraSettingsSchema: z.ZodObject<{
|
|
|
514
641
|
priority: number;
|
|
515
642
|
};
|
|
516
643
|
identificationLabel: {
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
644
|
+
aircraft: {
|
|
645
|
+
firstRow: "blank" | "registration" | "call_sign" | "flight_number" | "icao";
|
|
646
|
+
secondRow: "blank" | "registration" | "call_sign" | "flight_number" | "icao";
|
|
647
|
+
thirdRow: "blank" | "registration" | "call_sign" | "flight_number" | "icao";
|
|
648
|
+
fourthRow: "blank" | "registration" | "call_sign" | "flight_number" | "icao";
|
|
649
|
+
opacity: number;
|
|
650
|
+
};
|
|
651
|
+
drone: {
|
|
652
|
+
firstRow: "blank" | "remote_id";
|
|
653
|
+
opacity: number;
|
|
654
|
+
};
|
|
655
|
+
} | {
|
|
656
|
+
aircraft: {
|
|
657
|
+
firstRow: "blank" | "registration" | "call_sign" | "flight_number" | "icao";
|
|
658
|
+
secondRow: "blank" | "registration" | "call_sign" | "flight_number" | "icao";
|
|
659
|
+
thirdRow: "blank" | "registration" | "call_sign" | "flight_number" | "icao";
|
|
660
|
+
fourthRow: "blank" | "registration" | "call_sign" | "flight_number" | "icao";
|
|
661
|
+
opacity: number;
|
|
662
|
+
};
|
|
663
|
+
drone: {
|
|
664
|
+
firstRow: "blank" | "remote_id";
|
|
665
|
+
opacity: number;
|
|
666
|
+
};
|
|
522
667
|
};
|
|
523
668
|
acs: {
|
|
524
669
|
ip: string;
|
|
@@ -594,6 +739,15 @@ export declare const cameraSettingsSchema: z.ZodObject<{
|
|
|
594
739
|
focusCalibrationPoints?: string | undefined;
|
|
595
740
|
} | undefined;
|
|
596
741
|
cameraConfig?: {
|
|
742
|
+
aircraft: {
|
|
743
|
+
defaultCaptureSizeMeters: number;
|
|
744
|
+
captureSizeExtensionMeters: number;
|
|
745
|
+
};
|
|
746
|
+
drone?: {
|
|
747
|
+
defaultCaptureSizeMeters: number;
|
|
748
|
+
captureSizeExtensionMeters: number;
|
|
749
|
+
} | undefined;
|
|
750
|
+
} | {
|
|
597
751
|
defaultCaptureSizeMeters?: number | undefined;
|
|
598
752
|
captureSizeExtensionMeters?: number | undefined;
|
|
599
753
|
} | undefined;
|
|
@@ -677,6 +831,18 @@ export declare const cameraSettingsSchema: z.ZodObject<{
|
|
|
677
831
|
thirdRow: "blank" | "registration" | "call_sign" | "flight_number" | "icao";
|
|
678
832
|
fourthRow: "blank" | "registration" | "call_sign" | "flight_number" | "icao";
|
|
679
833
|
opacity: number;
|
|
834
|
+
} | {
|
|
835
|
+
aircraft: {
|
|
836
|
+
firstRow: "blank" | "registration" | "call_sign" | "flight_number" | "icao";
|
|
837
|
+
secondRow: "blank" | "registration" | "call_sign" | "flight_number" | "icao";
|
|
838
|
+
thirdRow: "blank" | "registration" | "call_sign" | "flight_number" | "icao";
|
|
839
|
+
fourthRow: "blank" | "registration" | "call_sign" | "flight_number" | "icao";
|
|
840
|
+
opacity: number;
|
|
841
|
+
};
|
|
842
|
+
drone?: {
|
|
843
|
+
firstRow: "blank" | "remote_id";
|
|
844
|
+
opacity: number;
|
|
845
|
+
} | undefined;
|
|
680
846
|
} | undefined;
|
|
681
847
|
acs?: {
|
|
682
848
|
ip: string;
|
|
@@ -1209,11 +1375,11 @@ declare const categoryDescriptorSchema: z.ZodObject<{
|
|
|
1209
1375
|
}, "strip", z.ZodTypeAny, {
|
|
1210
1376
|
categoryId: string;
|
|
1211
1377
|
uiName: string;
|
|
1212
|
-
icon: "unknown" | "small" | "
|
|
1378
|
+
icon: "unknown" | "small" | "drone" | "large" | "heavy" | "helicopter" | "operator" | "vehicle";
|
|
1213
1379
|
}, {
|
|
1214
1380
|
categoryId: string;
|
|
1215
1381
|
uiName: string;
|
|
1216
|
-
icon: "unknown" | "small" | "
|
|
1382
|
+
icon: "unknown" | "small" | "drone" | "large" | "heavy" | "helicopter" | "operator" | "vehicle";
|
|
1217
1383
|
}>;
|
|
1218
1384
|
export type TCategoryDescriptor = z.infer<typeof categoryDescriptorSchema>;
|
|
1219
1385
|
declare const domainDescriptorSchema: z.ZodObject<{
|
|
@@ -1226,27 +1392,27 @@ declare const domainDescriptorSchema: z.ZodObject<{
|
|
|
1226
1392
|
}, "strip", z.ZodTypeAny, {
|
|
1227
1393
|
categoryId: string;
|
|
1228
1394
|
uiName: string;
|
|
1229
|
-
icon: "unknown" | "small" | "
|
|
1395
|
+
icon: "unknown" | "small" | "drone" | "large" | "heavy" | "helicopter" | "operator" | "vehicle";
|
|
1230
1396
|
}, {
|
|
1231
1397
|
categoryId: string;
|
|
1232
1398
|
uiName: string;
|
|
1233
|
-
icon: "unknown" | "small" | "
|
|
1399
|
+
icon: "unknown" | "small" | "drone" | "large" | "heavy" | "helicopter" | "operator" | "vehicle";
|
|
1234
1400
|
}>, "many">;
|
|
1235
1401
|
}, "strip", z.ZodTypeAny, {
|
|
1236
1402
|
uiName: string;
|
|
1237
|
-
icon: "unknown" | "small" | "
|
|
1403
|
+
icon: "unknown" | "small" | "drone" | "large" | "heavy" | "helicopter" | "operator" | "vehicle";
|
|
1238
1404
|
categoryList: {
|
|
1239
1405
|
categoryId: string;
|
|
1240
1406
|
uiName: string;
|
|
1241
|
-
icon: "unknown" | "small" | "
|
|
1407
|
+
icon: "unknown" | "small" | "drone" | "large" | "heavy" | "helicopter" | "operator" | "vehicle";
|
|
1242
1408
|
}[];
|
|
1243
1409
|
}, {
|
|
1244
1410
|
uiName: string;
|
|
1245
|
-
icon: "unknown" | "small" | "
|
|
1411
|
+
icon: "unknown" | "small" | "drone" | "large" | "heavy" | "helicopter" | "operator" | "vehicle";
|
|
1246
1412
|
categoryList: {
|
|
1247
1413
|
categoryId: string;
|
|
1248
1414
|
uiName: string;
|
|
1249
|
-
icon: "unknown" | "small" | "
|
|
1415
|
+
icon: "unknown" | "small" | "drone" | "large" | "heavy" | "helicopter" | "operator" | "vehicle";
|
|
1250
1416
|
}[];
|
|
1251
1417
|
}>;
|
|
1252
1418
|
export type TDomainDescriptor = z.infer<typeof domainDescriptorSchema>;
|
|
@@ -1260,27 +1426,27 @@ export declare const domainListSchema: z.ZodRecord<z.ZodEnum<["adsb", "remoteId"
|
|
|
1260
1426
|
}, "strip", z.ZodTypeAny, {
|
|
1261
1427
|
categoryId: string;
|
|
1262
1428
|
uiName: string;
|
|
1263
|
-
icon: "unknown" | "small" | "
|
|
1429
|
+
icon: "unknown" | "small" | "drone" | "large" | "heavy" | "helicopter" | "operator" | "vehicle";
|
|
1264
1430
|
}, {
|
|
1265
1431
|
categoryId: string;
|
|
1266
1432
|
uiName: string;
|
|
1267
|
-
icon: "unknown" | "small" | "
|
|
1433
|
+
icon: "unknown" | "small" | "drone" | "large" | "heavy" | "helicopter" | "operator" | "vehicle";
|
|
1268
1434
|
}>, "many">;
|
|
1269
1435
|
}, "strip", z.ZodTypeAny, {
|
|
1270
1436
|
uiName: string;
|
|
1271
|
-
icon: "unknown" | "small" | "
|
|
1437
|
+
icon: "unknown" | "small" | "drone" | "large" | "heavy" | "helicopter" | "operator" | "vehicle";
|
|
1272
1438
|
categoryList: {
|
|
1273
1439
|
categoryId: string;
|
|
1274
1440
|
uiName: string;
|
|
1275
|
-
icon: "unknown" | "small" | "
|
|
1441
|
+
icon: "unknown" | "small" | "drone" | "large" | "heavy" | "helicopter" | "operator" | "vehicle";
|
|
1276
1442
|
}[];
|
|
1277
1443
|
}, {
|
|
1278
1444
|
uiName: string;
|
|
1279
|
-
icon: "unknown" | "small" | "
|
|
1445
|
+
icon: "unknown" | "small" | "drone" | "large" | "heavy" | "helicopter" | "operator" | "vehicle";
|
|
1280
1446
|
categoryList: {
|
|
1281
1447
|
categoryId: string;
|
|
1282
1448
|
uiName: string;
|
|
1283
|
-
icon: "unknown" | "small" | "
|
|
1449
|
+
icon: "unknown" | "small" | "drone" | "large" | "heavy" | "helicopter" | "operator" | "vehicle";
|
|
1284
1450
|
}[];
|
|
1285
1451
|
}>>;
|
|
1286
1452
|
export type TDomainList = z.infer<typeof domainListSchema>;
|
|
@@ -1,12 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.REMOTE_ID_CATEGORY_IDS = exports.ADSB_CATEGORY_IDS = exports.domainListSchema = exports.zonesSchema = exports.zonePerimeterSchema = exports.domainIdSchema = exports.mapInfoSchema = exports.mapTypeSchema = exports.friendlyListSchema = exports.priorityListSchema = exports.blackListSchema = exports.whiteListSchema = exports.priorityListEntrySchema = exports.listEntrySchema = exports.listEntryIdTypeSchema = exports.listEntryDomainSchema = exports.flightInfoSchema = exports.trackingModeSchema = exports.getIcaoSchema = exports.serverSettingsSchema = exports.cameraSettingsSchema = exports.widgetSchema = exports.milestoneCameraListSchema = exports.connectionSchema =
|
|
3
|
+
exports.REMOTE_ID_CATEGORY_IDS = exports.ADSB_CATEGORY_IDS = exports.domainListSchema = exports.zonesSchema = exports.zonePerimeterSchema = exports.domainIdSchema = exports.mapInfoSchema = exports.mapTypeSchema = exports.friendlyListSchema = exports.priorityListSchema = exports.blackListSchema = exports.whiteListSchema = exports.priorityListEntrySchema = exports.listEntrySchema = exports.listEntryIdTypeSchema = exports.listEntryDomainSchema = exports.flightInfoSchema = exports.trackingModeSchema = exports.getIcaoSchema = exports.serverSettingsSchema = exports.cameraSettingsSchema = exports.widgetSchema = exports.milestoneCameraListSchema = exports.connectionSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
|
-
exports.wsAliasResponseSchema = zod_1.z.object({
|
|
6
|
-
alias: zod_1.z.string(),
|
|
7
|
-
ws: zod_1.z.string(),
|
|
8
|
-
ws_initial_message: zod_1.z.string(),
|
|
9
|
-
});
|
|
10
5
|
exports.connectionSchema = zod_1.z.object({
|
|
11
6
|
protocol: zod_1.z.union([zod_1.z.literal('http'), zod_1.z.literal('https'), zod_1.z.literal('https_insecure')]),
|
|
12
7
|
ip: zod_1.z.union([zod_1.z.string().ip(), zod_1.z.literal('')]),
|
|
@@ -40,13 +35,59 @@ const labelOptionsSchema = zod_1.z.union([
|
|
|
40
35
|
zod_1.z.literal('flight_number'),
|
|
41
36
|
zod_1.z.literal('icao'),
|
|
42
37
|
]);
|
|
43
|
-
const
|
|
38
|
+
const aircraftIdentificationLabelSchema = zod_1.z.object({
|
|
44
39
|
firstRow: labelOptionsSchema,
|
|
45
40
|
secondRow: labelOptionsSchema,
|
|
46
41
|
thirdRow: labelOptionsSchema,
|
|
47
42
|
fourthRow: labelOptionsSchema,
|
|
48
|
-
opacity: zod_1.z.number().
|
|
43
|
+
opacity: zod_1.z.number().nonnegative(),
|
|
44
|
+
});
|
|
45
|
+
const droneLabelOptionsSchema = zod_1.z.union([zod_1.z.literal('blank'), zod_1.z.literal('remote_id')]);
|
|
46
|
+
const droneIdentificationLabelSchema = zod_1.z.object({
|
|
47
|
+
firstRow: droneLabelOptionsSchema,
|
|
48
|
+
opacity: zod_1.z.number().nonnegative(),
|
|
49
|
+
});
|
|
50
|
+
const DEFAULT_DRONE_IDENTIFICATION_LABEL = {
|
|
51
|
+
firstRow: 'remote_id',
|
|
52
|
+
opacity: 30,
|
|
53
|
+
};
|
|
54
|
+
const identificationLabelSchema = zod_1.z.union([
|
|
55
|
+
zod_1.z.object({
|
|
56
|
+
aircraft: aircraftIdentificationLabelSchema,
|
|
57
|
+
drone: droneIdentificationLabelSchema.default(DEFAULT_DRONE_IDENTIFICATION_LABEL),
|
|
58
|
+
}),
|
|
59
|
+
aircraftIdentificationLabelSchema.transform((aircraft) => ({
|
|
60
|
+
aircraft,
|
|
61
|
+
drone: { ...DEFAULT_DRONE_IDENTIFICATION_LABEL },
|
|
62
|
+
})),
|
|
63
|
+
]);
|
|
64
|
+
const captureConfigSchema = zod_1.z.object({
|
|
65
|
+
defaultCaptureSizeMeters: zod_1.z.number().positive(),
|
|
66
|
+
captureSizeExtensionMeters: zod_1.z.number().positive(),
|
|
49
67
|
});
|
|
68
|
+
const DEFAULT_CAPTURE_CONFIG = {
|
|
69
|
+
defaultCaptureSizeMeters: 120,
|
|
70
|
+
captureSizeExtensionMeters: 80,
|
|
71
|
+
};
|
|
72
|
+
const cameraConfigSchema = zod_1.z.union([
|
|
73
|
+
zod_1.z.object({
|
|
74
|
+
aircraft: captureConfigSchema,
|
|
75
|
+
drone: captureConfigSchema.default(() => ({ ...DEFAULT_CAPTURE_CONFIG })),
|
|
76
|
+
}),
|
|
77
|
+
zod_1.z
|
|
78
|
+
.object({
|
|
79
|
+
defaultCaptureSizeMeters: zod_1.z.number().positive().default(DEFAULT_CAPTURE_CONFIG.defaultCaptureSizeMeters),
|
|
80
|
+
captureSizeExtensionMeters: zod_1.z
|
|
81
|
+
.number()
|
|
82
|
+
.positive()
|
|
83
|
+
.default(DEFAULT_CAPTURE_CONFIG.captureSizeExtensionMeters),
|
|
84
|
+
})
|
|
85
|
+
.strict()
|
|
86
|
+
.transform((captureConfig) => ({
|
|
87
|
+
aircraft: captureConfig,
|
|
88
|
+
drone: { ...captureConfig },
|
|
89
|
+
})),
|
|
90
|
+
]);
|
|
50
91
|
exports.cameraSettingsSchema = zod_1.z.object({
|
|
51
92
|
units: zod_1.z.union([zod_1.z.literal('metric'), zod_1.z.literal('imperial')]).default('imperial'),
|
|
52
93
|
adsbSource: zod_1.z
|
|
@@ -84,15 +125,10 @@ exports.cameraSettingsSchema = zod_1.z.object({
|
|
|
84
125
|
nightSkyCalibrationFocusValue: 9000,
|
|
85
126
|
focusCalibrationPoints: '',
|
|
86
127
|
}),
|
|
87
|
-
cameraConfig:
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
})
|
|
92
|
-
.default({
|
|
93
|
-
defaultCaptureSizeMeters: 120,
|
|
94
|
-
captureSizeExtensionMeters: 80,
|
|
95
|
-
}),
|
|
128
|
+
cameraConfig: cameraConfigSchema.default(() => ({
|
|
129
|
+
aircraft: { ...DEFAULT_CAPTURE_CONFIG },
|
|
130
|
+
drone: { ...DEFAULT_CAPTURE_CONFIG },
|
|
131
|
+
})),
|
|
96
132
|
stream: zod_1.z
|
|
97
133
|
.object({
|
|
98
134
|
width: zod_1.z.number().positive(),
|
|
@@ -203,11 +239,14 @@ exports.cameraSettingsSchema = zod_1.z.object({
|
|
|
203
239
|
port: 80,
|
|
204
240
|
}),
|
|
205
241
|
identificationLabel: identificationLabelSchema.default({
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
242
|
+
aircraft: {
|
|
243
|
+
firstRow: 'icao',
|
|
244
|
+
secondRow: 'call_sign',
|
|
245
|
+
thirdRow: 'blank',
|
|
246
|
+
fourthRow: 'blank',
|
|
247
|
+
opacity: 30,
|
|
248
|
+
},
|
|
249
|
+
drone: DEFAULT_DRONE_IDENTIFICATION_LABEL,
|
|
211
250
|
}),
|
|
212
251
|
acs: exports.connectionSchema
|
|
213
252
|
.extend({
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const PlaneTrackerAPI_1 = require("./PlaneTrackerAPI");
|
|
4
|
+
const globals_1 = require("@jest/globals");
|
|
5
|
+
const AIRCRAFT_LABEL = {
|
|
6
|
+
firstRow: 'icao',
|
|
7
|
+
secondRow: 'call_sign',
|
|
8
|
+
thirdRow: 'blank',
|
|
9
|
+
fourthRow: 'registration',
|
|
10
|
+
opacity: 50,
|
|
11
|
+
};
|
|
12
|
+
const DEFAULT_DRONE_LABEL = { firstRow: 'remote_id', opacity: 30 };
|
|
13
|
+
(0, globals_1.describe)('cameraSettingsSchema identificationLabel', () => {
|
|
14
|
+
(0, globals_1.test)('defaults both aircraft and drone labels', () => {
|
|
15
|
+
(0, globals_1.expect)(PlaneTrackerAPI_1.cameraSettingsSchema.parse({}).identificationLabel).toEqual({
|
|
16
|
+
aircraft: {
|
|
17
|
+
firstRow: 'icao',
|
|
18
|
+
secondRow: 'call_sign',
|
|
19
|
+
thirdRow: 'blank',
|
|
20
|
+
fourthRow: 'blank',
|
|
21
|
+
opacity: 30,
|
|
22
|
+
},
|
|
23
|
+
drone: DEFAULT_DRONE_LABEL,
|
|
24
|
+
});
|
|
25
|
+
});
|
|
26
|
+
(0, globals_1.test)('parses the aircraft and drone label', () => {
|
|
27
|
+
const identificationLabel = { aircraft: AIRCRAFT_LABEL, drone: { firstRow: 'blank', opacity: 70 } };
|
|
28
|
+
(0, globals_1.expect)(PlaneTrackerAPI_1.cameraSettingsSchema.parse({ identificationLabel }).identificationLabel).toEqual(identificationLabel);
|
|
29
|
+
});
|
|
30
|
+
(0, globals_1.test)('defaults a missing drone label', () => {
|
|
31
|
+
(0, globals_1.expect)(PlaneTrackerAPI_1.cameraSettingsSchema.parse({ identificationLabel: { aircraft: AIRCRAFT_LABEL } }).identificationLabel).toEqual({ aircraft: AIRCRAFT_LABEL, drone: DEFAULT_DRONE_LABEL });
|
|
32
|
+
});
|
|
33
|
+
(0, globals_1.test)('converts the legacy flat label to the aircraft label', () => {
|
|
34
|
+
(0, globals_1.expect)(PlaneTrackerAPI_1.cameraSettingsSchema.parse({ identificationLabel: AIRCRAFT_LABEL }).identificationLabel).toEqual({
|
|
35
|
+
aircraft: AIRCRAFT_LABEL,
|
|
36
|
+
drone: DEFAULT_DRONE_LABEL,
|
|
37
|
+
});
|
|
38
|
+
});
|
|
39
|
+
(0, globals_1.test)('returns an independent drone label for each legacy parse', () => {
|
|
40
|
+
const first = PlaneTrackerAPI_1.cameraSettingsSchema.parse({ identificationLabel: AIRCRAFT_LABEL });
|
|
41
|
+
first.identificationLabel.drone.opacity = 90;
|
|
42
|
+
const second = PlaneTrackerAPI_1.cameraSettingsSchema.parse({ identificationLabel: AIRCRAFT_LABEL });
|
|
43
|
+
(0, globals_1.expect)(second.identificationLabel.drone).toEqual(DEFAULT_DRONE_LABEL);
|
|
44
|
+
});
|
|
45
|
+
(0, globals_1.test)('rejects an unknown drone label row', () => {
|
|
46
|
+
const identificationLabel = { aircraft: AIRCRAFT_LABEL, drone: { firstRow: 'icao', opacity: 30 } };
|
|
47
|
+
(0, globals_1.expect)(PlaneTrackerAPI_1.cameraSettingsSchema.safeParse({ identificationLabel }).success).toBe(false);
|
|
48
|
+
});
|
|
49
|
+
});
|
|
50
|
+
const CAPTURE_CONFIG = { defaultCaptureSizeMeters: 50, captureSizeExtensionMeters: 20 };
|
|
51
|
+
const DEFAULT_CAPTURE_CONFIG = { defaultCaptureSizeMeters: 120, captureSizeExtensionMeters: 80 };
|
|
52
|
+
(0, globals_1.describe)('cameraSettingsSchema cameraConfig', () => {
|
|
53
|
+
(0, globals_1.test)('defaults both aircraft and drone capture config', () => {
|
|
54
|
+
(0, globals_1.expect)(PlaneTrackerAPI_1.cameraSettingsSchema.parse({}).cameraConfig).toEqual({
|
|
55
|
+
aircraft: DEFAULT_CAPTURE_CONFIG,
|
|
56
|
+
drone: DEFAULT_CAPTURE_CONFIG,
|
|
57
|
+
});
|
|
58
|
+
});
|
|
59
|
+
(0, globals_1.test)('parses independent aircraft and drone capture config', () => {
|
|
60
|
+
const cameraConfig = {
|
|
61
|
+
aircraft: CAPTURE_CONFIG,
|
|
62
|
+
drone: { defaultCaptureSizeMeters: 5, captureSizeExtensionMeters: 3 },
|
|
63
|
+
};
|
|
64
|
+
(0, globals_1.expect)(PlaneTrackerAPI_1.cameraSettingsSchema.parse({ cameraConfig }).cameraConfig).toEqual(cameraConfig);
|
|
65
|
+
});
|
|
66
|
+
(0, globals_1.test)('defaults a missing drone capture config', () => {
|
|
67
|
+
(0, globals_1.expect)(PlaneTrackerAPI_1.cameraSettingsSchema.parse({ cameraConfig: { aircraft: CAPTURE_CONFIG } }).cameraConfig).toEqual({
|
|
68
|
+
aircraft: CAPTURE_CONFIG,
|
|
69
|
+
drone: DEFAULT_CAPTURE_CONFIG,
|
|
70
|
+
});
|
|
71
|
+
});
|
|
72
|
+
(0, globals_1.test)('copies the legacy flat capture config to both aircraft and drone', () => {
|
|
73
|
+
(0, globals_1.expect)(PlaneTrackerAPI_1.cameraSettingsSchema.parse({ cameraConfig: CAPTURE_CONFIG }).cameraConfig).toEqual({
|
|
74
|
+
aircraft: CAPTURE_CONFIG,
|
|
75
|
+
drone: CAPTURE_CONFIG,
|
|
76
|
+
});
|
|
77
|
+
});
|
|
78
|
+
(0, globals_1.test)('returns independent aircraft and drone objects', () => {
|
|
79
|
+
const legacy = PlaneTrackerAPI_1.cameraSettingsSchema.parse({ cameraConfig: CAPTURE_CONFIG }).cameraConfig;
|
|
80
|
+
legacy.drone.defaultCaptureSizeMeters = 1;
|
|
81
|
+
(0, globals_1.expect)(legacy.aircraft).toEqual(CAPTURE_CONFIG);
|
|
82
|
+
const first = PlaneTrackerAPI_1.cameraSettingsSchema.parse({}).cameraConfig;
|
|
83
|
+
first.drone.defaultCaptureSizeMeters = 1;
|
|
84
|
+
(0, globals_1.expect)(PlaneTrackerAPI_1.cameraSettingsSchema.parse({}).cameraConfig.drone).toEqual(DEFAULT_CAPTURE_CONFIG);
|
|
85
|
+
});
|
|
86
|
+
(0, globals_1.test)('rejects a non-positive drone capture size', () => {
|
|
87
|
+
const cameraConfig = { aircraft: CAPTURE_CONFIG, drone: { ...CAPTURE_CONFIG, defaultCaptureSizeMeters: 0 } };
|
|
88
|
+
(0, globals_1.expect)(PlaneTrackerAPI_1.cameraSettingsSchema.safeParse({ cameraConfig }).success).toBe(false);
|
|
89
|
+
});
|
|
90
|
+
});
|
package/cjs/types/common.d.ts
CHANGED
|
@@ -26,6 +26,19 @@ export declare const keyboardShortcutSchema: z.ZodNullable<z.ZodString>;
|
|
|
26
26
|
export declare const keyboardShortcutsSchema: z.ZodRecord<z.ZodString, z.ZodNullable<z.ZodString>>;
|
|
27
27
|
export type TKeyboardShortcut = z.infer<typeof keyboardShortcutSchema>;
|
|
28
28
|
export type TKeyboardShortcuts = z.infer<typeof keyboardShortcutsSchema>;
|
|
29
|
+
export declare const wsAliasResponseSchema: z.ZodObject<{
|
|
30
|
+
alias: z.ZodString;
|
|
31
|
+
ws: z.ZodString;
|
|
32
|
+
ws_initial_message: z.ZodString;
|
|
33
|
+
}, "strip", z.ZodTypeAny, {
|
|
34
|
+
alias: string;
|
|
35
|
+
ws: string;
|
|
36
|
+
ws_initial_message: string;
|
|
37
|
+
}, {
|
|
38
|
+
alias: string;
|
|
39
|
+
ws: string;
|
|
40
|
+
ws_initial_message: string;
|
|
41
|
+
}>;
|
|
29
42
|
export type TProxyTarget = {
|
|
30
43
|
ip: string;
|
|
31
44
|
mdnsName: string;
|
package/cjs/types/common.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.fileSchema = exports.bitrateVapixParamsSchema = exports.bitrateModeSchema = exports.keyboardShortcutsSchema = exports.keyboardShortcutSchema = exports.networkCameraListSchema = exports.storageTypeSchema = exports.sdCardStorageTypeSchema = exports.flashStorageTypeSchema = exports.h264ProfileSchema = exports.audioChannelCountSchema = exports.audioChannelSchema = exports.booleanSchema = void 0;
|
|
3
|
+
exports.fileSchema = exports.bitrateVapixParamsSchema = exports.bitrateModeSchema = exports.wsAliasResponseSchema = exports.keyboardShortcutsSchema = exports.keyboardShortcutSchema = exports.networkCameraListSchema = exports.storageTypeSchema = exports.sdCardStorageTypeSchema = exports.flashStorageTypeSchema = exports.h264ProfileSchema = exports.audioChannelCountSchema = exports.audioChannelSchema = exports.booleanSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
exports.booleanSchema = zod_1.z.union([zod_1.z.literal(0), zod_1.z.literal(1)]);
|
|
6
6
|
exports.audioChannelSchema = zod_1.z.union([zod_1.z.literal('mono'), zod_1.z.literal('stereo')]);
|
|
@@ -15,6 +15,11 @@ exports.networkCameraListSchema = zod_1.z.array(zod_1.z.object({
|
|
|
15
15
|
}));
|
|
16
16
|
exports.keyboardShortcutSchema = zod_1.z.string().nullable();
|
|
17
17
|
exports.keyboardShortcutsSchema = zod_1.z.record(exports.keyboardShortcutSchema);
|
|
18
|
+
exports.wsAliasResponseSchema = zod_1.z.object({
|
|
19
|
+
alias: zod_1.z.string(),
|
|
20
|
+
ws: zod_1.z.string(),
|
|
21
|
+
ws_initial_message: zod_1.z.string(),
|
|
22
|
+
});
|
|
18
23
|
exports.bitrateModeSchema = zod_1.z.union([zod_1.z.literal('VBR'), zod_1.z.literal('MBR'), zod_1.z.literal('ABR')]);
|
|
19
24
|
exports.bitrateVapixParamsSchema = zod_1.z.object({
|
|
20
25
|
bitrateMode: exports.bitrateModeSchema,
|