camstreamerlib 4.0.33-018c17e → 4.0.33-10a29ef
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/PlaneTrackerAPI.d.ts +42 -9
- package/cjs/VapixAPI.js +1 -1
- package/cjs/helpers.js +1 -1
- package/cjs/types/PlaneTrackerAPI.d.ts +205 -26
- package/cjs/types/PlaneTrackerAPI.js +59 -15
- package/cjs/types/PlaneTrackerAPI.test.d.ts +1 -0
- package/cjs/types/PlaneTrackerAPI.test.js +90 -0
- package/esm/VapixAPI.js +1 -1
- package/esm/helpers.js +1 -1
- package/esm/types/PlaneTrackerAPI.js +59 -15
- package/esm/types/PlaneTrackerAPI.test.js +88 -0
- package/package.json +12 -9
- package/types/PlaneTrackerAPI.d.ts +42 -9
- package/types/types/PlaneTrackerAPI.d.ts +205 -26
- package/types/types/PlaneTrackerAPI.test.d.ts +1 -0
package/cjs/PlaneTrackerAPI.d.ts
CHANGED
|
@@ -45,8 +45,23 @@ export declare class PlaneTrackerAPI<Client extends IClient<TResponse, any>> ext
|
|
|
45
45
|
focusCalibrationPoints: string;
|
|
46
46
|
};
|
|
47
47
|
cameraConfig: {
|
|
48
|
-
|
|
49
|
-
|
|
48
|
+
aircraft: {
|
|
49
|
+
defaultCaptureSizeMeters: number;
|
|
50
|
+
captureSizeExtensionMeters: number;
|
|
51
|
+
};
|
|
52
|
+
drone: {
|
|
53
|
+
defaultCaptureSizeMeters: number;
|
|
54
|
+
captureSizeExtensionMeters: number;
|
|
55
|
+
};
|
|
56
|
+
} | {
|
|
57
|
+
aircraft: {
|
|
58
|
+
defaultCaptureSizeMeters: number;
|
|
59
|
+
captureSizeExtensionMeters: number;
|
|
60
|
+
};
|
|
61
|
+
drone: {
|
|
62
|
+
defaultCaptureSizeMeters: number;
|
|
63
|
+
captureSizeExtensionMeters: number;
|
|
64
|
+
};
|
|
50
65
|
};
|
|
51
66
|
stream: {
|
|
52
67
|
width: number;
|
|
@@ -99,11 +114,29 @@ export declare class PlaneTrackerAPI<Client extends IClient<TResponse, any>> ext
|
|
|
99
114
|
priority: number;
|
|
100
115
|
};
|
|
101
116
|
identificationLabel: {
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
117
|
+
aircraft: {
|
|
118
|
+
firstRow: "blank" | "registration" | "call_sign" | "flight_number" | "icao";
|
|
119
|
+
secondRow: "blank" | "registration" | "call_sign" | "flight_number" | "icao";
|
|
120
|
+
thirdRow: "blank" | "registration" | "call_sign" | "flight_number" | "icao";
|
|
121
|
+
fourthRow: "blank" | "registration" | "call_sign" | "flight_number" | "icao";
|
|
122
|
+
opacity: number;
|
|
123
|
+
};
|
|
124
|
+
drone: {
|
|
125
|
+
firstRow: "blank" | "remote_id";
|
|
126
|
+
opacity: number;
|
|
127
|
+
};
|
|
128
|
+
} | {
|
|
129
|
+
aircraft: {
|
|
130
|
+
firstRow: "blank" | "registration" | "call_sign" | "flight_number" | "icao";
|
|
131
|
+
secondRow: "blank" | "registration" | "call_sign" | "flight_number" | "icao";
|
|
132
|
+
thirdRow: "blank" | "registration" | "call_sign" | "flight_number" | "icao";
|
|
133
|
+
fourthRow: "blank" | "registration" | "call_sign" | "flight_number" | "icao";
|
|
134
|
+
opacity: number;
|
|
135
|
+
};
|
|
136
|
+
drone: {
|
|
137
|
+
firstRow: "blank" | "remote_id";
|
|
138
|
+
opacity: number;
|
|
139
|
+
};
|
|
107
140
|
};
|
|
108
141
|
acs: {
|
|
109
142
|
ip: string;
|
|
@@ -181,11 +214,11 @@ export declare class PlaneTrackerAPI<Client extends IClient<TResponse, any>> ext
|
|
|
181
214
|
importAppSettings(dataType: TImportDataType, formData: Parameters<Client['post']>[0]['data'], options?: THttpRequestOptions): Promise<void>;
|
|
182
215
|
getDomainList(options?: THttpRequestOptions): Promise<Partial<Record<"adsb" | "remoteId", {
|
|
183
216
|
uiName: string;
|
|
184
|
-
icon: "unknown" | "small" | "
|
|
217
|
+
icon: "unknown" | "small" | "drone" | "large" | "heavy" | "helicopter" | "operator" | "vehicle";
|
|
185
218
|
categoryList: {
|
|
186
219
|
categoryId: string;
|
|
187
220
|
uiName: string;
|
|
188
|
-
icon: "unknown" | "small" | "
|
|
221
|
+
icon: "unknown" | "small" | "drone" | "large" | "heavy" | "helicopter" | "operator" | "vehicle";
|
|
189
222
|
}[];
|
|
190
223
|
}>>>;
|
|
191
224
|
fetchFlightInfo(targetId: string, options?: THttpRequestOptions): Promise<{
|
package/cjs/VapixAPI.js
CHANGED
|
@@ -93,7 +93,7 @@ class VapixAPI extends BasicAPI_1.BasicAPI {
|
|
|
93
93
|
};
|
|
94
94
|
await this._postJsonEncoded('/axis-cgi/opticscontrol.cgi', data, undefined, options);
|
|
95
95
|
}
|
|
96
|
-
catch
|
|
96
|
+
catch {
|
|
97
97
|
await this._postUrlEncoded('/axis-cgi/opticssetup.cgi', {
|
|
98
98
|
autofocus: 'perform',
|
|
99
99
|
source: '1',
|
package/cjs/helpers.js
CHANGED
|
@@ -69,6 +69,8 @@ export declare const widgetSchema: z.ZodObject<{
|
|
|
69
69
|
}>;
|
|
70
70
|
declare const labelOptionsSchema: z.ZodUnion<[z.ZodLiteral<"blank">, z.ZodLiteral<"registration">, z.ZodLiteral<"call_sign">, z.ZodLiteral<"flight_number">, z.ZodLiteral<"icao">]>;
|
|
71
71
|
export type TLabelOption = z.infer<typeof labelOptionsSchema>;
|
|
72
|
+
declare const droneLabelOptionsSchema: z.ZodUnion<[z.ZodLiteral<"blank">, z.ZodLiteral<"remote_id">]>;
|
|
73
|
+
export type TDroneLabelOption = z.infer<typeof droneLabelOptionsSchema>;
|
|
72
74
|
export declare const cameraSettingsSchema: z.ZodObject<{
|
|
73
75
|
units: z.ZodDefault<z.ZodUnion<[z.ZodLiteral<"metric">, z.ZodLiteral<"imperial">]>>;
|
|
74
76
|
adsbSource: z.ZodDefault<z.ZodObject<{
|
|
@@ -132,16 +134,67 @@ export declare const cameraSettingsSchema: z.ZodObject<{
|
|
|
132
134
|
nightSkyCalibrationFocusValue?: number | undefined;
|
|
133
135
|
focusCalibrationPoints?: string | undefined;
|
|
134
136
|
}>>;
|
|
135
|
-
cameraConfig: z.ZodDefault<z.ZodObject<{
|
|
137
|
+
cameraConfig: z.ZodDefault<z.ZodUnion<[z.ZodObject<{
|
|
138
|
+
aircraft: z.ZodObject<{
|
|
139
|
+
defaultCaptureSizeMeters: z.ZodNumber;
|
|
140
|
+
captureSizeExtensionMeters: z.ZodNumber;
|
|
141
|
+
}, "strip", z.ZodTypeAny, {
|
|
142
|
+
defaultCaptureSizeMeters: number;
|
|
143
|
+
captureSizeExtensionMeters: number;
|
|
144
|
+
}, {
|
|
145
|
+
defaultCaptureSizeMeters: number;
|
|
146
|
+
captureSizeExtensionMeters: number;
|
|
147
|
+
}>;
|
|
148
|
+
drone: z.ZodDefault<z.ZodObject<{
|
|
149
|
+
defaultCaptureSizeMeters: z.ZodNumber;
|
|
150
|
+
captureSizeExtensionMeters: z.ZodNumber;
|
|
151
|
+
}, "strip", z.ZodTypeAny, {
|
|
152
|
+
defaultCaptureSizeMeters: number;
|
|
153
|
+
captureSizeExtensionMeters: number;
|
|
154
|
+
}, {
|
|
155
|
+
defaultCaptureSizeMeters: number;
|
|
156
|
+
captureSizeExtensionMeters: number;
|
|
157
|
+
}>>;
|
|
158
|
+
}, "strip", z.ZodTypeAny, {
|
|
159
|
+
aircraft: {
|
|
160
|
+
defaultCaptureSizeMeters: number;
|
|
161
|
+
captureSizeExtensionMeters: number;
|
|
162
|
+
};
|
|
163
|
+
drone: {
|
|
164
|
+
defaultCaptureSizeMeters: number;
|
|
165
|
+
captureSizeExtensionMeters: number;
|
|
166
|
+
};
|
|
167
|
+
}, {
|
|
168
|
+
aircraft: {
|
|
169
|
+
defaultCaptureSizeMeters: number;
|
|
170
|
+
captureSizeExtensionMeters: number;
|
|
171
|
+
};
|
|
172
|
+
drone?: {
|
|
173
|
+
defaultCaptureSizeMeters: number;
|
|
174
|
+
captureSizeExtensionMeters: number;
|
|
175
|
+
} | undefined;
|
|
176
|
+
}>, z.ZodEffects<z.ZodObject<{
|
|
136
177
|
defaultCaptureSizeMeters: z.ZodDefault<z.ZodNumber>;
|
|
137
178
|
captureSizeExtensionMeters: z.ZodDefault<z.ZodNumber>;
|
|
138
|
-
}, "
|
|
179
|
+
}, "strict", z.ZodTypeAny, {
|
|
139
180
|
defaultCaptureSizeMeters: number;
|
|
140
181
|
captureSizeExtensionMeters: number;
|
|
141
182
|
}, {
|
|
142
183
|
defaultCaptureSizeMeters?: number | undefined;
|
|
143
184
|
captureSizeExtensionMeters?: number | undefined;
|
|
144
|
-
}
|
|
185
|
+
}>, {
|
|
186
|
+
aircraft: {
|
|
187
|
+
defaultCaptureSizeMeters: number;
|
|
188
|
+
captureSizeExtensionMeters: number;
|
|
189
|
+
};
|
|
190
|
+
drone: {
|
|
191
|
+
defaultCaptureSizeMeters: number;
|
|
192
|
+
captureSizeExtensionMeters: number;
|
|
193
|
+
};
|
|
194
|
+
}, {
|
|
195
|
+
defaultCaptureSizeMeters?: number | undefined;
|
|
196
|
+
captureSizeExtensionMeters?: number | undefined;
|
|
197
|
+
}>]>>;
|
|
145
198
|
stream: z.ZodDefault<z.ZodObject<{
|
|
146
199
|
width: z.ZodNumber;
|
|
147
200
|
height: z.ZodNumber;
|
|
@@ -347,7 +400,61 @@ export declare const cameraSettingsSchema: z.ZodObject<{
|
|
|
347
400
|
port?: number | undefined;
|
|
348
401
|
priority?: number | undefined;
|
|
349
402
|
}>>;
|
|
350
|
-
identificationLabel: z.ZodDefault<z.ZodObject<{
|
|
403
|
+
identificationLabel: z.ZodDefault<z.ZodUnion<[z.ZodObject<{
|
|
404
|
+
aircraft: z.ZodObject<{
|
|
405
|
+
firstRow: z.ZodUnion<[z.ZodLiteral<"blank">, z.ZodLiteral<"registration">, z.ZodLiteral<"call_sign">, z.ZodLiteral<"flight_number">, z.ZodLiteral<"icao">]>;
|
|
406
|
+
secondRow: z.ZodUnion<[z.ZodLiteral<"blank">, z.ZodLiteral<"registration">, z.ZodLiteral<"call_sign">, z.ZodLiteral<"flight_number">, z.ZodLiteral<"icao">]>;
|
|
407
|
+
thirdRow: z.ZodUnion<[z.ZodLiteral<"blank">, z.ZodLiteral<"registration">, z.ZodLiteral<"call_sign">, z.ZodLiteral<"flight_number">, z.ZodLiteral<"icao">]>;
|
|
408
|
+
fourthRow: z.ZodUnion<[z.ZodLiteral<"blank">, z.ZodLiteral<"registration">, z.ZodLiteral<"call_sign">, z.ZodLiteral<"flight_number">, z.ZodLiteral<"icao">]>;
|
|
409
|
+
opacity: z.ZodNumber;
|
|
410
|
+
}, "strip", z.ZodTypeAny, {
|
|
411
|
+
firstRow: "blank" | "registration" | "call_sign" | "flight_number" | "icao";
|
|
412
|
+
secondRow: "blank" | "registration" | "call_sign" | "flight_number" | "icao";
|
|
413
|
+
thirdRow: "blank" | "registration" | "call_sign" | "flight_number" | "icao";
|
|
414
|
+
fourthRow: "blank" | "registration" | "call_sign" | "flight_number" | "icao";
|
|
415
|
+
opacity: number;
|
|
416
|
+
}, {
|
|
417
|
+
firstRow: "blank" | "registration" | "call_sign" | "flight_number" | "icao";
|
|
418
|
+
secondRow: "blank" | "registration" | "call_sign" | "flight_number" | "icao";
|
|
419
|
+
thirdRow: "blank" | "registration" | "call_sign" | "flight_number" | "icao";
|
|
420
|
+
fourthRow: "blank" | "registration" | "call_sign" | "flight_number" | "icao";
|
|
421
|
+
opacity: number;
|
|
422
|
+
}>;
|
|
423
|
+
drone: z.ZodDefault<z.ZodObject<{
|
|
424
|
+
firstRow: z.ZodUnion<[z.ZodLiteral<"blank">, z.ZodLiteral<"remote_id">]>;
|
|
425
|
+
opacity: z.ZodNumber;
|
|
426
|
+
}, "strip", z.ZodTypeAny, {
|
|
427
|
+
firstRow: "blank" | "remote_id";
|
|
428
|
+
opacity: number;
|
|
429
|
+
}, {
|
|
430
|
+
firstRow: "blank" | "remote_id";
|
|
431
|
+
opacity: number;
|
|
432
|
+
}>>;
|
|
433
|
+
}, "strip", z.ZodTypeAny, {
|
|
434
|
+
aircraft: {
|
|
435
|
+
firstRow: "blank" | "registration" | "call_sign" | "flight_number" | "icao";
|
|
436
|
+
secondRow: "blank" | "registration" | "call_sign" | "flight_number" | "icao";
|
|
437
|
+
thirdRow: "blank" | "registration" | "call_sign" | "flight_number" | "icao";
|
|
438
|
+
fourthRow: "blank" | "registration" | "call_sign" | "flight_number" | "icao";
|
|
439
|
+
opacity: number;
|
|
440
|
+
};
|
|
441
|
+
drone: {
|
|
442
|
+
firstRow: "blank" | "remote_id";
|
|
443
|
+
opacity: number;
|
|
444
|
+
};
|
|
445
|
+
}, {
|
|
446
|
+
aircraft: {
|
|
447
|
+
firstRow: "blank" | "registration" | "call_sign" | "flight_number" | "icao";
|
|
448
|
+
secondRow: "blank" | "registration" | "call_sign" | "flight_number" | "icao";
|
|
449
|
+
thirdRow: "blank" | "registration" | "call_sign" | "flight_number" | "icao";
|
|
450
|
+
fourthRow: "blank" | "registration" | "call_sign" | "flight_number" | "icao";
|
|
451
|
+
opacity: number;
|
|
452
|
+
};
|
|
453
|
+
drone?: {
|
|
454
|
+
firstRow: "blank" | "remote_id";
|
|
455
|
+
opacity: number;
|
|
456
|
+
} | undefined;
|
|
457
|
+
}>, z.ZodEffects<z.ZodObject<{
|
|
351
458
|
firstRow: z.ZodUnion<[z.ZodLiteral<"blank">, z.ZodLiteral<"registration">, z.ZodLiteral<"call_sign">, z.ZodLiteral<"flight_number">, z.ZodLiteral<"icao">]>;
|
|
352
459
|
secondRow: z.ZodUnion<[z.ZodLiteral<"blank">, z.ZodLiteral<"registration">, z.ZodLiteral<"call_sign">, z.ZodLiteral<"flight_number">, z.ZodLiteral<"icao">]>;
|
|
353
460
|
thirdRow: z.ZodUnion<[z.ZodLiteral<"blank">, z.ZodLiteral<"registration">, z.ZodLiteral<"call_sign">, z.ZodLiteral<"flight_number">, z.ZodLiteral<"icao">]>;
|
|
@@ -365,7 +472,25 @@ export declare const cameraSettingsSchema: z.ZodObject<{
|
|
|
365
472
|
thirdRow: "blank" | "registration" | "call_sign" | "flight_number" | "icao";
|
|
366
473
|
fourthRow: "blank" | "registration" | "call_sign" | "flight_number" | "icao";
|
|
367
474
|
opacity: number;
|
|
368
|
-
}
|
|
475
|
+
}>, {
|
|
476
|
+
aircraft: {
|
|
477
|
+
firstRow: "blank" | "registration" | "call_sign" | "flight_number" | "icao";
|
|
478
|
+
secondRow: "blank" | "registration" | "call_sign" | "flight_number" | "icao";
|
|
479
|
+
thirdRow: "blank" | "registration" | "call_sign" | "flight_number" | "icao";
|
|
480
|
+
fourthRow: "blank" | "registration" | "call_sign" | "flight_number" | "icao";
|
|
481
|
+
opacity: number;
|
|
482
|
+
};
|
|
483
|
+
drone: {
|
|
484
|
+
firstRow: "blank" | "remote_id";
|
|
485
|
+
opacity: number;
|
|
486
|
+
};
|
|
487
|
+
}, {
|
|
488
|
+
firstRow: "blank" | "registration" | "call_sign" | "flight_number" | "icao";
|
|
489
|
+
secondRow: "blank" | "registration" | "call_sign" | "flight_number" | "icao";
|
|
490
|
+
thirdRow: "blank" | "registration" | "call_sign" | "flight_number" | "icao";
|
|
491
|
+
fourthRow: "blank" | "registration" | "call_sign" | "flight_number" | "icao";
|
|
492
|
+
opacity: number;
|
|
493
|
+
}>]>>;
|
|
369
494
|
acs: z.ZodDefault<z.ZodObject<{
|
|
370
495
|
protocol: z.ZodUnion<[z.ZodLiteral<"http">, z.ZodLiteral<"https">, z.ZodLiteral<"https_insecure">]>;
|
|
371
496
|
ip: z.ZodUnion<[z.ZodString, z.ZodLiteral<"">]>;
|
|
@@ -460,8 +585,23 @@ export declare const cameraSettingsSchema: z.ZodObject<{
|
|
|
460
585
|
focusCalibrationPoints: string;
|
|
461
586
|
};
|
|
462
587
|
cameraConfig: {
|
|
463
|
-
|
|
464
|
-
|
|
588
|
+
aircraft: {
|
|
589
|
+
defaultCaptureSizeMeters: number;
|
|
590
|
+
captureSizeExtensionMeters: number;
|
|
591
|
+
};
|
|
592
|
+
drone: {
|
|
593
|
+
defaultCaptureSizeMeters: number;
|
|
594
|
+
captureSizeExtensionMeters: number;
|
|
595
|
+
};
|
|
596
|
+
} | {
|
|
597
|
+
aircraft: {
|
|
598
|
+
defaultCaptureSizeMeters: number;
|
|
599
|
+
captureSizeExtensionMeters: number;
|
|
600
|
+
};
|
|
601
|
+
drone: {
|
|
602
|
+
defaultCaptureSizeMeters: number;
|
|
603
|
+
captureSizeExtensionMeters: number;
|
|
604
|
+
};
|
|
465
605
|
};
|
|
466
606
|
stream: {
|
|
467
607
|
width: number;
|
|
@@ -514,11 +654,29 @@ export declare const cameraSettingsSchema: z.ZodObject<{
|
|
|
514
654
|
priority: number;
|
|
515
655
|
};
|
|
516
656
|
identificationLabel: {
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
657
|
+
aircraft: {
|
|
658
|
+
firstRow: "blank" | "registration" | "call_sign" | "flight_number" | "icao";
|
|
659
|
+
secondRow: "blank" | "registration" | "call_sign" | "flight_number" | "icao";
|
|
660
|
+
thirdRow: "blank" | "registration" | "call_sign" | "flight_number" | "icao";
|
|
661
|
+
fourthRow: "blank" | "registration" | "call_sign" | "flight_number" | "icao";
|
|
662
|
+
opacity: number;
|
|
663
|
+
};
|
|
664
|
+
drone: {
|
|
665
|
+
firstRow: "blank" | "remote_id";
|
|
666
|
+
opacity: number;
|
|
667
|
+
};
|
|
668
|
+
} | {
|
|
669
|
+
aircraft: {
|
|
670
|
+
firstRow: "blank" | "registration" | "call_sign" | "flight_number" | "icao";
|
|
671
|
+
secondRow: "blank" | "registration" | "call_sign" | "flight_number" | "icao";
|
|
672
|
+
thirdRow: "blank" | "registration" | "call_sign" | "flight_number" | "icao";
|
|
673
|
+
fourthRow: "blank" | "registration" | "call_sign" | "flight_number" | "icao";
|
|
674
|
+
opacity: number;
|
|
675
|
+
};
|
|
676
|
+
drone: {
|
|
677
|
+
firstRow: "blank" | "remote_id";
|
|
678
|
+
opacity: number;
|
|
679
|
+
};
|
|
522
680
|
};
|
|
523
681
|
acs: {
|
|
524
682
|
ip: string;
|
|
@@ -594,6 +752,15 @@ export declare const cameraSettingsSchema: z.ZodObject<{
|
|
|
594
752
|
focusCalibrationPoints?: string | undefined;
|
|
595
753
|
} | undefined;
|
|
596
754
|
cameraConfig?: {
|
|
755
|
+
aircraft: {
|
|
756
|
+
defaultCaptureSizeMeters: number;
|
|
757
|
+
captureSizeExtensionMeters: number;
|
|
758
|
+
};
|
|
759
|
+
drone?: {
|
|
760
|
+
defaultCaptureSizeMeters: number;
|
|
761
|
+
captureSizeExtensionMeters: number;
|
|
762
|
+
} | undefined;
|
|
763
|
+
} | {
|
|
597
764
|
defaultCaptureSizeMeters?: number | undefined;
|
|
598
765
|
captureSizeExtensionMeters?: number | undefined;
|
|
599
766
|
} | undefined;
|
|
@@ -677,6 +844,18 @@ export declare const cameraSettingsSchema: z.ZodObject<{
|
|
|
677
844
|
thirdRow: "blank" | "registration" | "call_sign" | "flight_number" | "icao";
|
|
678
845
|
fourthRow: "blank" | "registration" | "call_sign" | "flight_number" | "icao";
|
|
679
846
|
opacity: number;
|
|
847
|
+
} | {
|
|
848
|
+
aircraft: {
|
|
849
|
+
firstRow: "blank" | "registration" | "call_sign" | "flight_number" | "icao";
|
|
850
|
+
secondRow: "blank" | "registration" | "call_sign" | "flight_number" | "icao";
|
|
851
|
+
thirdRow: "blank" | "registration" | "call_sign" | "flight_number" | "icao";
|
|
852
|
+
fourthRow: "blank" | "registration" | "call_sign" | "flight_number" | "icao";
|
|
853
|
+
opacity: number;
|
|
854
|
+
};
|
|
855
|
+
drone?: {
|
|
856
|
+
firstRow: "blank" | "remote_id";
|
|
857
|
+
opacity: number;
|
|
858
|
+
} | undefined;
|
|
680
859
|
} | undefined;
|
|
681
860
|
acs?: {
|
|
682
861
|
ip: string;
|
|
@@ -1209,11 +1388,11 @@ declare const categoryDescriptorSchema: z.ZodObject<{
|
|
|
1209
1388
|
}, "strip", z.ZodTypeAny, {
|
|
1210
1389
|
categoryId: string;
|
|
1211
1390
|
uiName: string;
|
|
1212
|
-
icon: "unknown" | "small" | "
|
|
1391
|
+
icon: "unknown" | "small" | "drone" | "large" | "heavy" | "helicopter" | "operator" | "vehicle";
|
|
1213
1392
|
}, {
|
|
1214
1393
|
categoryId: string;
|
|
1215
1394
|
uiName: string;
|
|
1216
|
-
icon: "unknown" | "small" | "
|
|
1395
|
+
icon: "unknown" | "small" | "drone" | "large" | "heavy" | "helicopter" | "operator" | "vehicle";
|
|
1217
1396
|
}>;
|
|
1218
1397
|
export type TCategoryDescriptor = z.infer<typeof categoryDescriptorSchema>;
|
|
1219
1398
|
declare const domainDescriptorSchema: z.ZodObject<{
|
|
@@ -1226,27 +1405,27 @@ declare const domainDescriptorSchema: z.ZodObject<{
|
|
|
1226
1405
|
}, "strip", z.ZodTypeAny, {
|
|
1227
1406
|
categoryId: string;
|
|
1228
1407
|
uiName: string;
|
|
1229
|
-
icon: "unknown" | "small" | "
|
|
1408
|
+
icon: "unknown" | "small" | "drone" | "large" | "heavy" | "helicopter" | "operator" | "vehicle";
|
|
1230
1409
|
}, {
|
|
1231
1410
|
categoryId: string;
|
|
1232
1411
|
uiName: string;
|
|
1233
|
-
icon: "unknown" | "small" | "
|
|
1412
|
+
icon: "unknown" | "small" | "drone" | "large" | "heavy" | "helicopter" | "operator" | "vehicle";
|
|
1234
1413
|
}>, "many">;
|
|
1235
1414
|
}, "strip", z.ZodTypeAny, {
|
|
1236
1415
|
uiName: string;
|
|
1237
|
-
icon: "unknown" | "small" | "
|
|
1416
|
+
icon: "unknown" | "small" | "drone" | "large" | "heavy" | "helicopter" | "operator" | "vehicle";
|
|
1238
1417
|
categoryList: {
|
|
1239
1418
|
categoryId: string;
|
|
1240
1419
|
uiName: string;
|
|
1241
|
-
icon: "unknown" | "small" | "
|
|
1420
|
+
icon: "unknown" | "small" | "drone" | "large" | "heavy" | "helicopter" | "operator" | "vehicle";
|
|
1242
1421
|
}[];
|
|
1243
1422
|
}, {
|
|
1244
1423
|
uiName: string;
|
|
1245
|
-
icon: "unknown" | "small" | "
|
|
1424
|
+
icon: "unknown" | "small" | "drone" | "large" | "heavy" | "helicopter" | "operator" | "vehicle";
|
|
1246
1425
|
categoryList: {
|
|
1247
1426
|
categoryId: string;
|
|
1248
1427
|
uiName: string;
|
|
1249
|
-
icon: "unknown" | "small" | "
|
|
1428
|
+
icon: "unknown" | "small" | "drone" | "large" | "heavy" | "helicopter" | "operator" | "vehicle";
|
|
1250
1429
|
}[];
|
|
1251
1430
|
}>;
|
|
1252
1431
|
export type TDomainDescriptor = z.infer<typeof domainDescriptorSchema>;
|
|
@@ -1260,27 +1439,27 @@ export declare const domainListSchema: z.ZodRecord<z.ZodEnum<["adsb", "remoteId"
|
|
|
1260
1439
|
}, "strip", z.ZodTypeAny, {
|
|
1261
1440
|
categoryId: string;
|
|
1262
1441
|
uiName: string;
|
|
1263
|
-
icon: "unknown" | "small" | "
|
|
1442
|
+
icon: "unknown" | "small" | "drone" | "large" | "heavy" | "helicopter" | "operator" | "vehicle";
|
|
1264
1443
|
}, {
|
|
1265
1444
|
categoryId: string;
|
|
1266
1445
|
uiName: string;
|
|
1267
|
-
icon: "unknown" | "small" | "
|
|
1446
|
+
icon: "unknown" | "small" | "drone" | "large" | "heavy" | "helicopter" | "operator" | "vehicle";
|
|
1268
1447
|
}>, "many">;
|
|
1269
1448
|
}, "strip", z.ZodTypeAny, {
|
|
1270
1449
|
uiName: string;
|
|
1271
|
-
icon: "unknown" | "small" | "
|
|
1450
|
+
icon: "unknown" | "small" | "drone" | "large" | "heavy" | "helicopter" | "operator" | "vehicle";
|
|
1272
1451
|
categoryList: {
|
|
1273
1452
|
categoryId: string;
|
|
1274
1453
|
uiName: string;
|
|
1275
|
-
icon: "unknown" | "small" | "
|
|
1454
|
+
icon: "unknown" | "small" | "drone" | "large" | "heavy" | "helicopter" | "operator" | "vehicle";
|
|
1276
1455
|
}[];
|
|
1277
1456
|
}, {
|
|
1278
1457
|
uiName: string;
|
|
1279
|
-
icon: "unknown" | "small" | "
|
|
1458
|
+
icon: "unknown" | "small" | "drone" | "large" | "heavy" | "helicopter" | "operator" | "vehicle";
|
|
1280
1459
|
categoryList: {
|
|
1281
1460
|
categoryId: string;
|
|
1282
1461
|
uiName: string;
|
|
1283
|
-
icon: "unknown" | "small" | "
|
|
1462
|
+
icon: "unknown" | "small" | "drone" | "large" | "heavy" | "helicopter" | "operator" | "vehicle";
|
|
1284
1463
|
}[];
|
|
1285
1464
|
}>>;
|
|
1286
1465
|
export type TDomainList = z.infer<typeof domainListSchema>;
|
|
@@ -40,13 +40,59 @@ const labelOptionsSchema = zod_1.z.union([
|
|
|
40
40
|
zod_1.z.literal('flight_number'),
|
|
41
41
|
zod_1.z.literal('icao'),
|
|
42
42
|
]);
|
|
43
|
-
const
|
|
43
|
+
const aircraftIdentificationLabelSchema = zod_1.z.object({
|
|
44
44
|
firstRow: labelOptionsSchema,
|
|
45
45
|
secondRow: labelOptionsSchema,
|
|
46
46
|
thirdRow: labelOptionsSchema,
|
|
47
47
|
fourthRow: labelOptionsSchema,
|
|
48
48
|
opacity: zod_1.z.number().positive(),
|
|
49
49
|
});
|
|
50
|
+
const droneLabelOptionsSchema = zod_1.z.union([zod_1.z.literal('blank'), zod_1.z.literal('remote_id')]);
|
|
51
|
+
const droneIdentificationLabelSchema = zod_1.z.object({
|
|
52
|
+
firstRow: droneLabelOptionsSchema,
|
|
53
|
+
opacity: zod_1.z.number().positive(),
|
|
54
|
+
});
|
|
55
|
+
const DEFAULT_DRONE_IDENTIFICATION_LABEL = {
|
|
56
|
+
firstRow: 'remote_id',
|
|
57
|
+
opacity: 30,
|
|
58
|
+
};
|
|
59
|
+
const identificationLabelSchema = zod_1.z.union([
|
|
60
|
+
zod_1.z.object({
|
|
61
|
+
aircraft: aircraftIdentificationLabelSchema,
|
|
62
|
+
drone: droneIdentificationLabelSchema.default(DEFAULT_DRONE_IDENTIFICATION_LABEL),
|
|
63
|
+
}),
|
|
64
|
+
aircraftIdentificationLabelSchema.transform((aircraft) => ({
|
|
65
|
+
aircraft,
|
|
66
|
+
drone: { ...DEFAULT_DRONE_IDENTIFICATION_LABEL },
|
|
67
|
+
})),
|
|
68
|
+
]);
|
|
69
|
+
const captureConfigSchema = zod_1.z.object({
|
|
70
|
+
defaultCaptureSizeMeters: zod_1.z.number().positive(),
|
|
71
|
+
captureSizeExtensionMeters: zod_1.z.number().positive(),
|
|
72
|
+
});
|
|
73
|
+
const DEFAULT_CAPTURE_CONFIG = {
|
|
74
|
+
defaultCaptureSizeMeters: 120,
|
|
75
|
+
captureSizeExtensionMeters: 80,
|
|
76
|
+
};
|
|
77
|
+
const cameraConfigSchema = zod_1.z.union([
|
|
78
|
+
zod_1.z.object({
|
|
79
|
+
aircraft: captureConfigSchema,
|
|
80
|
+
drone: captureConfigSchema.default(() => ({ ...DEFAULT_CAPTURE_CONFIG })),
|
|
81
|
+
}),
|
|
82
|
+
zod_1.z
|
|
83
|
+
.object({
|
|
84
|
+
defaultCaptureSizeMeters: zod_1.z.number().positive().default(DEFAULT_CAPTURE_CONFIG.defaultCaptureSizeMeters),
|
|
85
|
+
captureSizeExtensionMeters: zod_1.z
|
|
86
|
+
.number()
|
|
87
|
+
.positive()
|
|
88
|
+
.default(DEFAULT_CAPTURE_CONFIG.captureSizeExtensionMeters),
|
|
89
|
+
})
|
|
90
|
+
.strict()
|
|
91
|
+
.transform((captureConfig) => ({
|
|
92
|
+
aircraft: captureConfig,
|
|
93
|
+
drone: { ...captureConfig },
|
|
94
|
+
})),
|
|
95
|
+
]);
|
|
50
96
|
exports.cameraSettingsSchema = zod_1.z.object({
|
|
51
97
|
units: zod_1.z.union([zod_1.z.literal('metric'), zod_1.z.literal('imperial')]).default('imperial'),
|
|
52
98
|
adsbSource: zod_1.z
|
|
@@ -84,15 +130,10 @@ exports.cameraSettingsSchema = zod_1.z.object({
|
|
|
84
130
|
nightSkyCalibrationFocusValue: 9000,
|
|
85
131
|
focusCalibrationPoints: '',
|
|
86
132
|
}),
|
|
87
|
-
cameraConfig:
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
})
|
|
92
|
-
.default({
|
|
93
|
-
defaultCaptureSizeMeters: 120,
|
|
94
|
-
captureSizeExtensionMeters: 80,
|
|
95
|
-
}),
|
|
133
|
+
cameraConfig: cameraConfigSchema.default(() => ({
|
|
134
|
+
aircraft: { ...DEFAULT_CAPTURE_CONFIG },
|
|
135
|
+
drone: { ...DEFAULT_CAPTURE_CONFIG },
|
|
136
|
+
})),
|
|
96
137
|
stream: zod_1.z
|
|
97
138
|
.object({
|
|
98
139
|
width: zod_1.z.number().positive(),
|
|
@@ -203,11 +244,14 @@ exports.cameraSettingsSchema = zod_1.z.object({
|
|
|
203
244
|
port: 80,
|
|
204
245
|
}),
|
|
205
246
|
identificationLabel: identificationLabelSchema.default({
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
247
|
+
aircraft: {
|
|
248
|
+
firstRow: 'icao',
|
|
249
|
+
secondRow: 'call_sign',
|
|
250
|
+
thirdRow: 'blank',
|
|
251
|
+
fourthRow: 'blank',
|
|
252
|
+
opacity: 30,
|
|
253
|
+
},
|
|
254
|
+
drone: DEFAULT_DRONE_IDENTIFICATION_LABEL,
|
|
211
255
|
}),
|
|
212
256
|
acs: exports.connectionSchema
|
|
213
257
|
.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/esm/VapixAPI.js
CHANGED
|
@@ -90,7 +90,7 @@ export class VapixAPI extends BasicAPI {
|
|
|
90
90
|
};
|
|
91
91
|
await this._postJsonEncoded('/axis-cgi/opticscontrol.cgi', data, undefined, options);
|
|
92
92
|
}
|
|
93
|
-
catch
|
|
93
|
+
catch {
|
|
94
94
|
await this._postUrlEncoded('/axis-cgi/opticssetup.cgi', {
|
|
95
95
|
autofocus: 'perform',
|
|
96
96
|
source: '1',
|