camstreamerlib 4.0.36-c07c9c1 → 4.0.37
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/CamSwitcherAPI.d.ts +0 -1
- package/cjs/CamSwitcherAPI.js +0 -2
- package/cjs/PlaneTrackerAPI.d.ts +3 -0
- package/cjs/errors/errors.d.ts +1 -1
- package/cjs/errors/errors.js +2 -2
- package/cjs/node/events/AxisCameraStationEvents.js +2 -1
- package/cjs/types/CamSwitcherAPI.d.ts +0 -3
- package/cjs/types/CamSwitcherAPI.js +0 -1
- package/cjs/types/PlaneTrackerAPI.d.ts +18 -0
- package/cjs/types/PlaneTrackerAPI.js +11 -1
- package/cjs/types/PlaneTrackerAPI.test.js +27 -0
- package/esm/CamSwitcherAPI.js +0 -2
- package/esm/errors/errors.js +2 -2
- package/esm/node/events/AxisCameraStationEvents.js +2 -1
- package/esm/types/CamSwitcherAPI.js +0 -1
- package/esm/types/PlaneTrackerAPI.js +11 -1
- package/esm/types/PlaneTrackerAPI.test.js +27 -0
- package/package.json +107 -107
- package/types/CamSwitcherAPI.d.ts +0 -1
- package/types/PlaneTrackerAPI.d.ts +3 -0
- package/types/errors/errors.d.ts +1 -1
- package/types/types/CamSwitcherAPI.d.ts +0 -3
- package/types/types/PlaneTrackerAPI.d.ts +18 -0
package/cjs/CamSwitcherAPI.d.ts
CHANGED
|
@@ -161,7 +161,6 @@ export declare class CamSwitcherAPI<Client extends IClient<TResponse, any>> exte
|
|
|
161
161
|
bitrateVapixParams?: string | null | undefined;
|
|
162
162
|
audioSampleRate?: number | undefined;
|
|
163
163
|
audioChannelCount?: 1 | 2 | undefined;
|
|
164
|
-
audioBitrate?: number | undefined;
|
|
165
164
|
} | undefined>;
|
|
166
165
|
getGlobalAudioSettings(options?: THttpRequestOptions): Promise<{
|
|
167
166
|
type: "source" | "fromSource";
|
package/cjs/CamSwitcherAPI.js
CHANGED
|
@@ -156,7 +156,6 @@ class CamSwitcherAPI extends BasicAPI_1.BasicAPI {
|
|
|
156
156
|
audio: {
|
|
157
157
|
sampleRate: data.audioSampleRate,
|
|
158
158
|
channelCount: data.audioChannelCount,
|
|
159
|
-
bitrate: data.audioBitrate,
|
|
160
159
|
},
|
|
161
160
|
keyboard: data.keyboard,
|
|
162
161
|
};
|
|
@@ -208,7 +207,6 @@ class CamSwitcherAPI extends BasicAPI_1.BasicAPI {
|
|
|
208
207
|
const settings = {
|
|
209
208
|
audioSampleRate: saveData.audio?.sampleRate,
|
|
210
209
|
audioChannelCount: saveData.audio?.channelCount,
|
|
211
|
-
audioBitrate: saveData.audio?.bitrate,
|
|
212
210
|
keyboard: saveData.keyboard,
|
|
213
211
|
fps: saveData.video.fps,
|
|
214
212
|
resolution: saveData.video.resolution,
|
package/cjs/PlaneTrackerAPI.d.ts
CHANGED
|
@@ -87,6 +87,7 @@ export declare class PlaneTrackerAPI<Client extends IClient<TResponse, any>> ext
|
|
|
87
87
|
widget: {
|
|
88
88
|
enabled: boolean;
|
|
89
89
|
scale: number;
|
|
90
|
+
units: "rotate" | "metric" | "imperial";
|
|
90
91
|
coord: "top_left" | "top_right" | "bottom_left" | "bottom_right";
|
|
91
92
|
posX: number;
|
|
92
93
|
posY: number;
|
|
@@ -100,6 +101,8 @@ export declare class PlaneTrackerAPI<Client extends IClient<TResponse, any>> ext
|
|
|
100
101
|
posY: number;
|
|
101
102
|
showWeather: boolean;
|
|
102
103
|
weatherLocationKey: string;
|
|
104
|
+
windSpeedUnits: "rotate" | "metric" | "imperial";
|
|
105
|
+
temperatureUnits: "rotate" | "metric" | "imperial";
|
|
103
106
|
};
|
|
104
107
|
fr24FlightInfoSource: {
|
|
105
108
|
enabled: boolean;
|
package/cjs/errors/errors.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { TStream } from '../types/CamStreamerAPI';
|
|
|
3
3
|
import { TOldStream } from '../types/CamStreamerAPI/oldStreamSchema';
|
|
4
4
|
export declare class ErrorWithResponse<T extends TResponse> extends Error {
|
|
5
5
|
res: T;
|
|
6
|
-
constructor(res: T);
|
|
6
|
+
constructor(res: T, message?: string);
|
|
7
7
|
}
|
|
8
8
|
export declare class ServiceUnavailableError extends Error {
|
|
9
9
|
constructor();
|
package/cjs/errors/errors.js
CHANGED
|
@@ -3,8 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.MigrationError = exports.BadRequestError = exports.ServerError = exports.InvalidAltitudeError = exports.InvalidLatLngError = exports.CannotSetCoordsInAutoModeError = exports.ImportSettingsError = exports.ResetCalibrationError = exports.TimezoneFetchError = exports.TimezoneNotSetupError = exports.UtcTimeFetchError = exports.WsAuthorizationError = exports.StorageDataFetchError = exports.PtzNotSupportedError = exports.GenerateSilenceError = exports.AddNewClipError = exports.FetchDeviceInfoError = exports.NoDeviceInfoError = exports.MaxFPSError = exports.SDCardJobError = exports.SDCardActionError = exports.ApplicationAPIError = exports.SettingParameterError = exports.ParameterNotFoundError = exports.JsonParseError = exports.ParsingBlobError = exports.ServiceNotFoundError = exports.ServiceUnavailableError = exports.ErrorWithResponse = void 0;
|
|
4
4
|
class ErrorWithResponse extends Error {
|
|
5
5
|
res;
|
|
6
|
-
constructor(res) {
|
|
7
|
-
super(res.statusText);
|
|
6
|
+
constructor(res, message) {
|
|
7
|
+
super(message ?? res.statusText);
|
|
8
8
|
this.res = res;
|
|
9
9
|
this.name = 'ErrorWithResponse';
|
|
10
10
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.AxisCameraStationEvents = void 0;
|
|
4
|
+
const errors_1 = require("../../errors/errors");
|
|
4
5
|
const utils_1 = require("../../internal/utils");
|
|
5
6
|
const ProxyClient_1 = require("../../internal/ProxyClient");
|
|
6
7
|
const DefaultClient_1 = require("../DefaultClient");
|
|
@@ -36,7 +37,7 @@ class AxisCameraStationEvents {
|
|
|
36
37
|
timeout: options?.timeout,
|
|
37
38
|
});
|
|
38
39
|
if (!res.ok) {
|
|
39
|
-
throw new
|
|
40
|
+
throw new errors_1.ErrorWithResponse(res, `ACS status code: ${res.status}`);
|
|
40
41
|
}
|
|
41
42
|
}
|
|
42
43
|
getDate() {
|
|
@@ -785,7 +785,6 @@ export declare const cameraOptionsSchema: z.ZodObject<{
|
|
|
785
785
|
bitrateVapixParams: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
786
786
|
audioSampleRate: z.ZodOptional<z.ZodNumber>;
|
|
787
787
|
audioChannelCount: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<1>, z.ZodLiteral<2>]>>;
|
|
788
|
-
audioBitrate: z.ZodOptional<z.ZodNumber>;
|
|
789
788
|
keyboard: z.ZodOptional<z.ZodObject<{
|
|
790
789
|
fromSource: z.ZodNullable<z.ZodString>;
|
|
791
790
|
none: z.ZodNullable<z.ZodString>;
|
|
@@ -813,7 +812,6 @@ export declare const cameraOptionsSchema: z.ZodObject<{
|
|
|
813
812
|
bitrateVapixParams?: string | null | undefined;
|
|
814
813
|
audioSampleRate?: number | undefined;
|
|
815
814
|
audioChannelCount?: 1 | 2 | undefined;
|
|
816
|
-
audioBitrate?: number | undefined;
|
|
817
815
|
}, {
|
|
818
816
|
resolution?: string | undefined;
|
|
819
817
|
compression?: number | undefined;
|
|
@@ -831,7 +829,6 @@ export declare const cameraOptionsSchema: z.ZodObject<{
|
|
|
831
829
|
bitrateVapixParams?: string | null | undefined;
|
|
832
830
|
audioSampleRate?: number | undefined;
|
|
833
831
|
audioChannelCount?: 1 | 2 | undefined;
|
|
834
|
-
audioBitrate?: number | undefined;
|
|
835
832
|
}>;
|
|
836
833
|
export type TCameraOptions = z.infer<typeof cameraOptionsSchema>;
|
|
837
834
|
export declare const globalAudioSettingsTypeSchema: z.ZodUnion<[z.ZodLiteral<"fromSource">, z.ZodLiteral<"source">]>;
|
|
@@ -145,7 +145,6 @@ exports.cameraOptionsSchema = common_1.bitrateVapixParamsSchema
|
|
|
145
145
|
bitrateVapixParams: zod_1.z.string().nullable(),
|
|
146
146
|
audioSampleRate: zod_1.z.number(),
|
|
147
147
|
audioChannelCount: common_1.audioChannelCountSchema,
|
|
148
|
-
audioBitrate: zod_1.z.number().int().nonnegative(),
|
|
149
148
|
keyboard: zod_1.z.object({
|
|
150
149
|
fromSource: common_1.keyboardShortcutSchema,
|
|
151
150
|
none: common_1.keyboardShortcutSchema,
|
|
@@ -54,6 +54,8 @@ export declare const widgetSchema: z.ZodObject<{
|
|
|
54
54
|
posY: number;
|
|
55
55
|
enabled?: boolean | undefined;
|
|
56
56
|
}>;
|
|
57
|
+
declare const widgetUnitsSchema: z.ZodUnion<[z.ZodLiteral<"metric">, z.ZodLiteral<"imperial">, z.ZodLiteral<"rotate">]>;
|
|
58
|
+
export type TWidgetUnits = z.infer<typeof widgetUnitsSchema>;
|
|
57
59
|
declare const labelOptionsSchema: z.ZodUnion<[z.ZodLiteral<"blank">, z.ZodLiteral<"registration">, z.ZodLiteral<"call_sign">, z.ZodLiteral<"flight_number">, z.ZodLiteral<"icao">]>;
|
|
58
60
|
export type TLabelOption = z.infer<typeof labelOptionsSchema>;
|
|
59
61
|
declare const droneLabelOptionsSchema: z.ZodUnion<[z.ZodLiteral<"blank">, z.ZodLiteral<"remote_id">]>;
|
|
@@ -313,9 +315,12 @@ export declare const cameraSettingsSchema: z.ZodObject<{
|
|
|
313
315
|
posX: z.ZodNumber;
|
|
314
316
|
posY: z.ZodNumber;
|
|
315
317
|
scale: z.ZodNumber;
|
|
318
|
+
} & {
|
|
319
|
+
units: z.ZodDefault<z.ZodUnion<[z.ZodLiteral<"metric">, z.ZodLiteral<"imperial">, z.ZodLiteral<"rotate">]>>;
|
|
316
320
|
}, "strip", z.ZodTypeAny, {
|
|
317
321
|
enabled: boolean;
|
|
318
322
|
scale: number;
|
|
323
|
+
units: "rotate" | "metric" | "imperial";
|
|
319
324
|
coord: "top_left" | "top_right" | "bottom_left" | "bottom_right";
|
|
320
325
|
posX: number;
|
|
321
326
|
posY: number;
|
|
@@ -325,6 +330,7 @@ export declare const cameraSettingsSchema: z.ZodObject<{
|
|
|
325
330
|
posX: number;
|
|
326
331
|
posY: number;
|
|
327
332
|
enabled?: boolean | undefined;
|
|
333
|
+
units?: "rotate" | "metric" | "imperial" | undefined;
|
|
328
334
|
}>>;
|
|
329
335
|
airportWidget: z.ZodDefault<z.ZodObject<{
|
|
330
336
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
@@ -336,6 +342,8 @@ export declare const cameraSettingsSchema: z.ZodObject<{
|
|
|
336
342
|
showWeather: z.ZodDefault<z.ZodBoolean>;
|
|
337
343
|
weatherLocationKey: z.ZodDefault<z.ZodString>;
|
|
338
344
|
weatherLocationName: z.ZodDefault<z.ZodString>;
|
|
345
|
+
windSpeedUnits: z.ZodDefault<z.ZodUnion<[z.ZodLiteral<"metric">, z.ZodLiteral<"imperial">, z.ZodLiteral<"rotate">]>>;
|
|
346
|
+
temperatureUnits: z.ZodDefault<z.ZodUnion<[z.ZodLiteral<"metric">, z.ZodLiteral<"imperial">, z.ZodLiteral<"rotate">]>>;
|
|
339
347
|
}, "strip", z.ZodTypeAny, {
|
|
340
348
|
enabled: boolean;
|
|
341
349
|
scale: number;
|
|
@@ -345,6 +353,8 @@ export declare const cameraSettingsSchema: z.ZodObject<{
|
|
|
345
353
|
posY: number;
|
|
346
354
|
showWeather: boolean;
|
|
347
355
|
weatherLocationKey: string;
|
|
356
|
+
windSpeedUnits: "rotate" | "metric" | "imperial";
|
|
357
|
+
temperatureUnits: "rotate" | "metric" | "imperial";
|
|
348
358
|
}, {
|
|
349
359
|
scale: number;
|
|
350
360
|
coord: "top_left" | "top_right" | "bottom_left" | "bottom_right";
|
|
@@ -354,6 +364,8 @@ export declare const cameraSettingsSchema: z.ZodObject<{
|
|
|
354
364
|
weatherLocationName?: string | undefined;
|
|
355
365
|
showWeather?: boolean | undefined;
|
|
356
366
|
weatherLocationKey?: string | undefined;
|
|
367
|
+
windSpeedUnits?: "rotate" | "metric" | "imperial" | undefined;
|
|
368
|
+
temperatureUnits?: "rotate" | "metric" | "imperial" | undefined;
|
|
357
369
|
}>>;
|
|
358
370
|
fr24FlightInfoSource: z.ZodDefault<z.ZodObject<{
|
|
359
371
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
@@ -614,6 +626,7 @@ export declare const cameraSettingsSchema: z.ZodObject<{
|
|
|
614
626
|
widget: {
|
|
615
627
|
enabled: boolean;
|
|
616
628
|
scale: number;
|
|
629
|
+
units: "rotate" | "metric" | "imperial";
|
|
617
630
|
coord: "top_left" | "top_right" | "bottom_left" | "bottom_right";
|
|
618
631
|
posX: number;
|
|
619
632
|
posY: number;
|
|
@@ -627,6 +640,8 @@ export declare const cameraSettingsSchema: z.ZodObject<{
|
|
|
627
640
|
posY: number;
|
|
628
641
|
showWeather: boolean;
|
|
629
642
|
weatherLocationKey: string;
|
|
643
|
+
windSpeedUnits: "rotate" | "metric" | "imperial";
|
|
644
|
+
temperatureUnits: "rotate" | "metric" | "imperial";
|
|
630
645
|
};
|
|
631
646
|
fr24FlightInfoSource: {
|
|
632
647
|
enabled: boolean;
|
|
@@ -802,6 +817,7 @@ export declare const cameraSettingsSchema: z.ZodObject<{
|
|
|
802
817
|
posX: number;
|
|
803
818
|
posY: number;
|
|
804
819
|
enabled?: boolean | undefined;
|
|
820
|
+
units?: "rotate" | "metric" | "imperial" | undefined;
|
|
805
821
|
} | undefined;
|
|
806
822
|
airportWidget?: {
|
|
807
823
|
scale: number;
|
|
@@ -812,6 +828,8 @@ export declare const cameraSettingsSchema: z.ZodObject<{
|
|
|
812
828
|
weatherLocationName?: string | undefined;
|
|
813
829
|
showWeather?: boolean | undefined;
|
|
814
830
|
weatherLocationKey?: string | undefined;
|
|
831
|
+
windSpeedUnits?: "rotate" | "metric" | "imperial" | undefined;
|
|
832
|
+
temperatureUnits?: "rotate" | "metric" | "imperial" | undefined;
|
|
815
833
|
} | undefined;
|
|
816
834
|
fr24FlightInfoSource?: {
|
|
817
835
|
enabled?: boolean | undefined;
|
|
@@ -28,6 +28,7 @@ exports.widgetSchema = zod_1.z.object({
|
|
|
28
28
|
posY: zod_1.z.number().nonnegative(),
|
|
29
29
|
scale: zod_1.z.number().positive(),
|
|
30
30
|
});
|
|
31
|
+
const widgetUnitsSchema = zod_1.z.union([zod_1.z.literal('metric'), zod_1.z.literal('imperial'), zod_1.z.literal('rotate')]);
|
|
31
32
|
const labelOptionsSchema = zod_1.z.union([
|
|
32
33
|
zod_1.z.literal('blank'),
|
|
33
34
|
zod_1.z.literal('registration'),
|
|
@@ -189,18 +190,25 @@ exports.cameraSettingsSchema = zod_1.z.object({
|
|
|
189
190
|
displaySystemInfo: zod_1.z.boolean().optional(),
|
|
190
191
|
})
|
|
191
192
|
.optional(),
|
|
192
|
-
widget: exports.widgetSchema
|
|
193
|
+
widget: exports.widgetSchema
|
|
194
|
+
.extend({
|
|
195
|
+
units: widgetUnitsSchema.default('rotate'),
|
|
196
|
+
})
|
|
197
|
+
.default({
|
|
193
198
|
enabled: true,
|
|
194
199
|
coord: 'top_right',
|
|
195
200
|
posX: 10,
|
|
196
201
|
posY: 10,
|
|
197
202
|
scale: 100,
|
|
203
|
+
units: 'rotate',
|
|
198
204
|
}),
|
|
199
205
|
airportWidget: exports.widgetSchema
|
|
200
206
|
.extend({
|
|
201
207
|
showWeather: zod_1.z.boolean().default(false),
|
|
202
208
|
weatherLocationKey: zod_1.z.string().default(''),
|
|
203
209
|
weatherLocationName: zod_1.z.string().default(''),
|
|
210
|
+
windSpeedUnits: widgetUnitsSchema.default('rotate'),
|
|
211
|
+
temperatureUnits: widgetUnitsSchema.default('rotate'),
|
|
204
212
|
})
|
|
205
213
|
.default({
|
|
206
214
|
enabled: true,
|
|
@@ -211,6 +219,8 @@ exports.cameraSettingsSchema = zod_1.z.object({
|
|
|
211
219
|
showWeather: false,
|
|
212
220
|
weatherLocationKey: '',
|
|
213
221
|
weatherLocationName: '',
|
|
222
|
+
windSpeedUnits: 'rotate',
|
|
223
|
+
temperatureUnits: 'rotate',
|
|
214
224
|
}),
|
|
215
225
|
fr24FlightInfoSource: zod_1.z
|
|
216
226
|
.object({
|
|
@@ -88,3 +88,30 @@ const DEFAULT_CAPTURE_CONFIG = { defaultCaptureSizeMeters: 120, captureSizeExten
|
|
|
88
88
|
(0, globals_1.expect)(PlaneTrackerAPI_1.cameraSettingsSchema.safeParse({ cameraConfig }).success).toBe(false);
|
|
89
89
|
});
|
|
90
90
|
});
|
|
91
|
+
(0, globals_1.describe)('cameraSettingsSchema widget units', () => {
|
|
92
|
+
const WIDGET = { coord: 'top_left', posX: 10, posY: 10, scale: 100 };
|
|
93
|
+
(0, globals_1.test)('defaults all widget units to rotate', () => {
|
|
94
|
+
const settings = PlaneTrackerAPI_1.cameraSettingsSchema.parse({});
|
|
95
|
+
(0, globals_1.expect)(settings.widget.units).toBe('rotate');
|
|
96
|
+
(0, globals_1.expect)(settings.airportWidget.windSpeedUnits).toBe('rotate');
|
|
97
|
+
(0, globals_1.expect)(settings.airportWidget.temperatureUnits).toBe('rotate');
|
|
98
|
+
});
|
|
99
|
+
(0, globals_1.test)('defaults missing units of saved widgets to rotate', () => {
|
|
100
|
+
const settings = PlaneTrackerAPI_1.cameraSettingsSchema.parse({ widget: WIDGET, airportWidget: WIDGET });
|
|
101
|
+
(0, globals_1.expect)(settings.widget.units).toBe('rotate');
|
|
102
|
+
(0, globals_1.expect)(settings.airportWidget.windSpeedUnits).toBe('rotate');
|
|
103
|
+
(0, globals_1.expect)(settings.airportWidget.temperatureUnits).toBe('rotate');
|
|
104
|
+
});
|
|
105
|
+
(0, globals_1.test)('parses independent widget units', () => {
|
|
106
|
+
const settings = PlaneTrackerAPI_1.cameraSettingsSchema.parse({
|
|
107
|
+
widget: { ...WIDGET, units: 'imperial' },
|
|
108
|
+
airportWidget: { ...WIDGET, windSpeedUnits: 'rotate', temperatureUnits: 'metric' },
|
|
109
|
+
});
|
|
110
|
+
(0, globals_1.expect)(settings.widget.units).toBe('imperial');
|
|
111
|
+
(0, globals_1.expect)(settings.airportWidget.windSpeedUnits).toBe('rotate');
|
|
112
|
+
(0, globals_1.expect)(settings.airportWidget.temperatureUnits).toBe('metric');
|
|
113
|
+
});
|
|
114
|
+
(0, globals_1.test)('rejects an unknown widget unit', () => {
|
|
115
|
+
(0, globals_1.expect)(PlaneTrackerAPI_1.cameraSettingsSchema.safeParse({ widget: { ...WIDGET, units: 'kelvin' } }).success).toBe(false);
|
|
116
|
+
});
|
|
117
|
+
});
|
package/esm/CamSwitcherAPI.js
CHANGED
|
@@ -153,7 +153,6 @@ export class CamSwitcherAPI extends BasicAPI {
|
|
|
153
153
|
audio: {
|
|
154
154
|
sampleRate: data.audioSampleRate,
|
|
155
155
|
channelCount: data.audioChannelCount,
|
|
156
|
-
bitrate: data.audioBitrate,
|
|
157
156
|
},
|
|
158
157
|
keyboard: data.keyboard,
|
|
159
158
|
};
|
|
@@ -205,7 +204,6 @@ export class CamSwitcherAPI extends BasicAPI {
|
|
|
205
204
|
const settings = {
|
|
206
205
|
audioSampleRate: saveData.audio?.sampleRate,
|
|
207
206
|
audioChannelCount: saveData.audio?.channelCount,
|
|
208
|
-
audioBitrate: saveData.audio?.bitrate,
|
|
209
207
|
keyboard: saveData.keyboard,
|
|
210
208
|
fps: saveData.video.fps,
|
|
211
209
|
resolution: saveData.video.resolution,
|
package/esm/errors/errors.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ErrorWithResponse } from '../../errors/errors';
|
|
1
2
|
import { pad } from '../../internal/utils';
|
|
2
3
|
import { ProxyClient } from '../../internal/ProxyClient';
|
|
3
4
|
import { DefaultClient } from '../DefaultClient';
|
|
@@ -33,7 +34,7 @@ export class AxisCameraStationEvents {
|
|
|
33
34
|
timeout: options?.timeout,
|
|
34
35
|
});
|
|
35
36
|
if (!res.ok) {
|
|
36
|
-
throw new
|
|
37
|
+
throw new ErrorWithResponse(res, `ACS status code: ${res.status}`);
|
|
37
38
|
}
|
|
38
39
|
}
|
|
39
40
|
getDate() {
|
|
@@ -142,7 +142,6 @@ export const cameraOptionsSchema = bitrateVapixParamsSchema
|
|
|
142
142
|
bitrateVapixParams: z.string().nullable(),
|
|
143
143
|
audioSampleRate: z.number(),
|
|
144
144
|
audioChannelCount: audioChannelCountSchema,
|
|
145
|
-
audioBitrate: z.number().int().nonnegative(),
|
|
146
145
|
keyboard: z.object({
|
|
147
146
|
fromSource: keyboardShortcutSchema,
|
|
148
147
|
none: keyboardShortcutSchema,
|
|
@@ -25,6 +25,7 @@ export const widgetSchema = z.object({
|
|
|
25
25
|
posY: z.number().nonnegative(),
|
|
26
26
|
scale: z.number().positive(),
|
|
27
27
|
});
|
|
28
|
+
const widgetUnitsSchema = z.union([z.literal('metric'), z.literal('imperial'), z.literal('rotate')]);
|
|
28
29
|
const labelOptionsSchema = z.union([
|
|
29
30
|
z.literal('blank'),
|
|
30
31
|
z.literal('registration'),
|
|
@@ -186,18 +187,25 @@ export const cameraSettingsSchema = z.object({
|
|
|
186
187
|
displaySystemInfo: z.boolean().optional(),
|
|
187
188
|
})
|
|
188
189
|
.optional(),
|
|
189
|
-
widget: widgetSchema
|
|
190
|
+
widget: widgetSchema
|
|
191
|
+
.extend({
|
|
192
|
+
units: widgetUnitsSchema.default('rotate'),
|
|
193
|
+
})
|
|
194
|
+
.default({
|
|
190
195
|
enabled: true,
|
|
191
196
|
coord: 'top_right',
|
|
192
197
|
posX: 10,
|
|
193
198
|
posY: 10,
|
|
194
199
|
scale: 100,
|
|
200
|
+
units: 'rotate',
|
|
195
201
|
}),
|
|
196
202
|
airportWidget: widgetSchema
|
|
197
203
|
.extend({
|
|
198
204
|
showWeather: z.boolean().default(false),
|
|
199
205
|
weatherLocationKey: z.string().default(''),
|
|
200
206
|
weatherLocationName: z.string().default(''),
|
|
207
|
+
windSpeedUnits: widgetUnitsSchema.default('rotate'),
|
|
208
|
+
temperatureUnits: widgetUnitsSchema.default('rotate'),
|
|
201
209
|
})
|
|
202
210
|
.default({
|
|
203
211
|
enabled: true,
|
|
@@ -208,6 +216,8 @@ export const cameraSettingsSchema = z.object({
|
|
|
208
216
|
showWeather: false,
|
|
209
217
|
weatherLocationKey: '',
|
|
210
218
|
weatherLocationName: '',
|
|
219
|
+
windSpeedUnits: 'rotate',
|
|
220
|
+
temperatureUnits: 'rotate',
|
|
211
221
|
}),
|
|
212
222
|
fr24FlightInfoSource: z
|
|
213
223
|
.object({
|
|
@@ -86,3 +86,30 @@ describe('cameraSettingsSchema cameraConfig', () => {
|
|
|
86
86
|
expect(cameraSettingsSchema.safeParse({ cameraConfig }).success).toBe(false);
|
|
87
87
|
});
|
|
88
88
|
});
|
|
89
|
+
describe('cameraSettingsSchema widget units', () => {
|
|
90
|
+
const WIDGET = { coord: 'top_left', posX: 10, posY: 10, scale: 100 };
|
|
91
|
+
test('defaults all widget units to rotate', () => {
|
|
92
|
+
const settings = cameraSettingsSchema.parse({});
|
|
93
|
+
expect(settings.widget.units).toBe('rotate');
|
|
94
|
+
expect(settings.airportWidget.windSpeedUnits).toBe('rotate');
|
|
95
|
+
expect(settings.airportWidget.temperatureUnits).toBe('rotate');
|
|
96
|
+
});
|
|
97
|
+
test('defaults missing units of saved widgets to rotate', () => {
|
|
98
|
+
const settings = cameraSettingsSchema.parse({ widget: WIDGET, airportWidget: WIDGET });
|
|
99
|
+
expect(settings.widget.units).toBe('rotate');
|
|
100
|
+
expect(settings.airportWidget.windSpeedUnits).toBe('rotate');
|
|
101
|
+
expect(settings.airportWidget.temperatureUnits).toBe('rotate');
|
|
102
|
+
});
|
|
103
|
+
test('parses independent widget units', () => {
|
|
104
|
+
const settings = cameraSettingsSchema.parse({
|
|
105
|
+
widget: { ...WIDGET, units: 'imperial' },
|
|
106
|
+
airportWidget: { ...WIDGET, windSpeedUnits: 'rotate', temperatureUnits: 'metric' },
|
|
107
|
+
});
|
|
108
|
+
expect(settings.widget.units).toBe('imperial');
|
|
109
|
+
expect(settings.airportWidget.windSpeedUnits).toBe('rotate');
|
|
110
|
+
expect(settings.airportWidget.temperatureUnits).toBe('metric');
|
|
111
|
+
});
|
|
112
|
+
test('rejects an unknown widget unit', () => {
|
|
113
|
+
expect(cameraSettingsSchema.safeParse({ widget: { ...WIDGET, units: 'kelvin' } }).success).toBe(false);
|
|
114
|
+
});
|
|
115
|
+
});
|
package/package.json
CHANGED
|
@@ -1,114 +1,114 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
},
|
|
9
|
-
"dependencies": {
|
|
10
|
-
"adm-zip": "^0.6.0",
|
|
11
|
-
"eventemitter2": "^5.0.1",
|
|
12
|
-
"fast-xml-parser": "^5.3.6",
|
|
13
|
-
"type-fest": "^4.41.0",
|
|
14
|
-
"undici": "^6.28.1",
|
|
15
|
-
"ws": "^8.18.0",
|
|
16
|
-
"zod": "^3.25.76"
|
|
17
|
-
},
|
|
18
|
-
"devDependencies": {
|
|
19
|
-
"@camstreamer/eslint-config": "^1.0.10",
|
|
20
|
-
"@camstreamer/prettier-config": "^2.0.4",
|
|
21
|
-
"@eslint/js": "^10.0.1",
|
|
22
|
-
"@types/adm-zip": "^0.5.5",
|
|
23
|
-
"@types/jest": "^30.0.0",
|
|
24
|
-
"@types/node": "^18.19.127",
|
|
25
|
-
"@types/ws": "^8.5.10",
|
|
26
|
-
"esbuild": "^0.28.2",
|
|
27
|
-
"eslint": "^10.12.0",
|
|
28
|
-
"eslint-plugin-unused-imports": "^4.4.1",
|
|
29
|
-
"globals": "^17.13.0",
|
|
30
|
-
"jest": "^30.5.2",
|
|
31
|
-
"npm-run-all": "^4.1.5",
|
|
32
|
-
"prettier": "^2.7.1",
|
|
33
|
-
"ts-jest": "^29.4.14",
|
|
34
|
-
"ts-node": "^10.7.0",
|
|
35
|
-
"typescript": "5.3.3",
|
|
36
|
-
"typescript-eslint": "^8.71.2"
|
|
37
|
-
},
|
|
38
|
-
"overrides": {
|
|
39
|
-
"js-yaml": "^4.3.2",
|
|
40
|
-
"browserslist": "^4.28.7"
|
|
41
|
-
},
|
|
42
|
-
"scripts": {
|
|
43
|
-
"clean": "node -e \"require('fs').rmSync('dist', { recursive: true, force: true })\"",
|
|
44
|
-
"build": "npm-run-all clean build:cjs build:esm copyPackage",
|
|
45
|
-
"build:cjs": "tsc --project tsconfig.cjs.json",
|
|
46
|
-
"build:esm": "tsc --project tsconfig.esm.json",
|
|
47
|
-
"build:browser": "esbuild src/browser.index.ts --bundle --format=esm --platform=browser --target=es2022 --outfile=examples/camstreamerlib.js",
|
|
48
|
-
"copyPackage": "cp -f LICENSE dist/ && cp -f README.md dist/ && cp -f package.json dist/ && cp -r -f examples dist/",
|
|
49
|
-
"publishPackage": "./publish.sh",
|
|
50
|
-
"lint": "eslint \"src/**/*.ts\"",
|
|
51
|
-
"lint:fix": "eslint \"src/**/*.ts\" --fix",
|
|
52
|
-
"pretty": "prettier --write \"./{{src,doc}/**/*.{ts,tsx,md},README.md}\"",
|
|
53
|
-
"pretty:check": "prettier --check \"./{{src,doc}/**/*.{ts,tsx,md},README.md}\"",
|
|
54
|
-
"test": "node --experimental-vm-modules node_modules/jest/bin/jest.js",
|
|
55
|
-
"audit": "npm audit --audit-level=high"
|
|
56
|
-
},
|
|
57
|
-
"files": [
|
|
58
|
-
"/**/*.js",
|
|
59
|
-
"/**/*.ts",
|
|
60
|
-
"/examples/**/*"
|
|
61
|
-
],
|
|
62
|
-
"main": "./cjs/index.js",
|
|
63
|
-
"module": "./esm/index.js",
|
|
64
|
-
"types": "types/index.d.ts",
|
|
65
|
-
"exports": {
|
|
66
|
-
".": {
|
|
67
|
-
"import": "./esm/index.js",
|
|
68
|
-
"require": "./cjs/index.js",
|
|
69
|
-
"types": "./types/index.d.ts"
|
|
2
|
+
"name": "camstreamerlib",
|
|
3
|
+
"version": "4.0.37",
|
|
4
|
+
"description": "Helper library for CamStreamer ACAP applications.",
|
|
5
|
+
"prettier": "@camstreamer/prettier-config",
|
|
6
|
+
"engine": {
|
|
7
|
+
"node": ">=18.0.0"
|
|
70
8
|
},
|
|
71
|
-
"
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
9
|
+
"dependencies": {
|
|
10
|
+
"adm-zip": "^0.6.0",
|
|
11
|
+
"eventemitter2": "^5.0.1",
|
|
12
|
+
"fast-xml-parser": "^5.3.6",
|
|
13
|
+
"type-fest": "^4.41.0",
|
|
14
|
+
"undici": "^6.28.1",
|
|
15
|
+
"ws": "^8.18.0",
|
|
16
|
+
"zod": "^3.25.76"
|
|
75
17
|
},
|
|
76
|
-
"
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
18
|
+
"devDependencies": {
|
|
19
|
+
"@camstreamer/eslint-config": "^1.0.10",
|
|
20
|
+
"@camstreamer/prettier-config": "^2.0.4",
|
|
21
|
+
"@eslint/js": "^10.0.1",
|
|
22
|
+
"@types/adm-zip": "^0.5.5",
|
|
23
|
+
"@types/jest": "^30.0.0",
|
|
24
|
+
"@types/node": "^18.19.127",
|
|
25
|
+
"@types/ws": "^8.5.10",
|
|
26
|
+
"esbuild": "^0.28.2",
|
|
27
|
+
"eslint": "^10.12.0",
|
|
28
|
+
"eslint-plugin-unused-imports": "^4.4.1",
|
|
29
|
+
"globals": "^17.13.0",
|
|
30
|
+
"jest": "^30.5.2",
|
|
31
|
+
"npm-run-all": "^4.1.5",
|
|
32
|
+
"prettier": "^2.7.1",
|
|
33
|
+
"ts-jest": "^29.4.14",
|
|
34
|
+
"ts-node": "^10.7.0",
|
|
35
|
+
"typescript": "5.3.3",
|
|
36
|
+
"typescript-eslint": "^8.71.2"
|
|
80
37
|
},
|
|
81
|
-
"
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
"types": "./types/index.d.ts"
|
|
38
|
+
"overrides": {
|
|
39
|
+
"js-yaml": "^4.3.2",
|
|
40
|
+
"browserslist": "^4.28.7"
|
|
85
41
|
},
|
|
86
|
-
"
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
42
|
+
"scripts": {
|
|
43
|
+
"clean": "node -e \"require('fs').rmSync('dist', { recursive: true, force: true })\"",
|
|
44
|
+
"build": "npm-run-all clean build:cjs build:esm copyPackage",
|
|
45
|
+
"build:cjs": "tsc --project tsconfig.cjs.json",
|
|
46
|
+
"build:esm": "tsc --project tsconfig.esm.json",
|
|
47
|
+
"build:browser": "esbuild src/browser.index.ts --bundle --format=esm --platform=browser --target=es2022 --outfile=examples/camstreamerlib.js",
|
|
48
|
+
"copyPackage": "cp -f LICENSE dist/ && cp -f README.md dist/ && cp -f package.json dist/ && cp -r -f examples dist/",
|
|
49
|
+
"publishPackage": "./publish.sh",
|
|
50
|
+
"lint": "eslint \"src/**/*.ts\"",
|
|
51
|
+
"lint:fix": "eslint \"src/**/*.ts\" --fix",
|
|
52
|
+
"pretty": "prettier --write \"./{{src,doc}/**/*.{ts,tsx,md},README.md}\"",
|
|
53
|
+
"pretty:check": "prettier --check \"./{{src,doc}/**/*.{ts,tsx,md},README.md}\"",
|
|
54
|
+
"test": "node --experimental-vm-modules node_modules/jest/bin/jest.js",
|
|
55
|
+
"audit": "npm audit --audit-level=high"
|
|
90
56
|
},
|
|
91
|
-
"
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
"
|
|
99
|
-
"
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
57
|
+
"files": [
|
|
58
|
+
"/**/*.js",
|
|
59
|
+
"/**/*.ts",
|
|
60
|
+
"/examples/**/*"
|
|
61
|
+
],
|
|
62
|
+
"main": "./cjs/index.js",
|
|
63
|
+
"module": "./esm/index.js",
|
|
64
|
+
"types": "types/index.d.ts",
|
|
65
|
+
"exports": {
|
|
66
|
+
".": {
|
|
67
|
+
"import": "./esm/index.js",
|
|
68
|
+
"require": "./cjs/index.js",
|
|
69
|
+
"types": "./types/index.d.ts"
|
|
70
|
+
},
|
|
71
|
+
"./web": {
|
|
72
|
+
"import": "./esm/web/index.js",
|
|
73
|
+
"require": "./cjs/web/index.js",
|
|
74
|
+
"types": "./types/web/index.d.ts"
|
|
75
|
+
},
|
|
76
|
+
"./node": {
|
|
77
|
+
"import": "./esm/node/index.js",
|
|
78
|
+
"require": "./cjs/node/index.js",
|
|
79
|
+
"types": "./types/node/index.d.ts"
|
|
80
|
+
},
|
|
81
|
+
"./cjs/index": {
|
|
82
|
+
"import": "./esm/index.js",
|
|
83
|
+
"require": "./cjs/index.js",
|
|
84
|
+
"types": "./types/index.d.ts"
|
|
85
|
+
},
|
|
86
|
+
"./cjs/node": {
|
|
87
|
+
"import": "./esm/node/index.js",
|
|
88
|
+
"require": "./cjs/node/index.js",
|
|
89
|
+
"types": "./types/node/index.js"
|
|
90
|
+
},
|
|
91
|
+
"./cjs/node/index": {
|
|
92
|
+
"import": "./esm/node/index.js",
|
|
93
|
+
"require": "./cjs/node/index.js",
|
|
94
|
+
"types": "./types/node/index.js"
|
|
95
|
+
}
|
|
96
|
+
},
|
|
97
|
+
"repository": {
|
|
98
|
+
"type": "git",
|
|
99
|
+
"url": "git+https://github.com/CamStreamer/CamStreamerLib.git"
|
|
100
|
+
},
|
|
101
|
+
"keywords": [
|
|
102
|
+
"CamStreamer",
|
|
103
|
+
"CamOverlay",
|
|
104
|
+
"CamScripter",
|
|
105
|
+
"Camera",
|
|
106
|
+
"Axis"
|
|
107
|
+
],
|
|
108
|
+
"author": "CamStreamer s.r.o",
|
|
109
|
+
"license": "ISC",
|
|
110
|
+
"bugs": {
|
|
111
|
+
"url": "https://github.com/CamStreamer/CamStreamerLib/issues"
|
|
112
|
+
},
|
|
113
|
+
"homepage": "https://github.com/CamStreamer/CamStreamerLib#readme"
|
|
114
114
|
}
|
|
@@ -161,7 +161,6 @@ export declare class CamSwitcherAPI<Client extends IClient<TResponse, any>> exte
|
|
|
161
161
|
bitrateVapixParams?: string | null | undefined;
|
|
162
162
|
audioSampleRate?: number | undefined;
|
|
163
163
|
audioChannelCount?: 1 | 2 | undefined;
|
|
164
|
-
audioBitrate?: number | undefined;
|
|
165
164
|
} | undefined>;
|
|
166
165
|
getGlobalAudioSettings(options?: THttpRequestOptions): Promise<{
|
|
167
166
|
type: "source" | "fromSource";
|
|
@@ -87,6 +87,7 @@ export declare class PlaneTrackerAPI<Client extends IClient<TResponse, any>> ext
|
|
|
87
87
|
widget: {
|
|
88
88
|
enabled: boolean;
|
|
89
89
|
scale: number;
|
|
90
|
+
units: "rotate" | "metric" | "imperial";
|
|
90
91
|
coord: "top_left" | "top_right" | "bottom_left" | "bottom_right";
|
|
91
92
|
posX: number;
|
|
92
93
|
posY: number;
|
|
@@ -100,6 +101,8 @@ export declare class PlaneTrackerAPI<Client extends IClient<TResponse, any>> ext
|
|
|
100
101
|
posY: number;
|
|
101
102
|
showWeather: boolean;
|
|
102
103
|
weatherLocationKey: string;
|
|
104
|
+
windSpeedUnits: "rotate" | "metric" | "imperial";
|
|
105
|
+
temperatureUnits: "rotate" | "metric" | "imperial";
|
|
103
106
|
};
|
|
104
107
|
fr24FlightInfoSource: {
|
|
105
108
|
enabled: boolean;
|
package/types/errors/errors.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { TStream } from '../types/CamStreamerAPI';
|
|
|
3
3
|
import { TOldStream } from '../types/CamStreamerAPI/oldStreamSchema';
|
|
4
4
|
export declare class ErrorWithResponse<T extends TResponse> extends Error {
|
|
5
5
|
res: T;
|
|
6
|
-
constructor(res: T);
|
|
6
|
+
constructor(res: T, message?: string);
|
|
7
7
|
}
|
|
8
8
|
export declare class ServiceUnavailableError extends Error {
|
|
9
9
|
constructor();
|
|
@@ -785,7 +785,6 @@ export declare const cameraOptionsSchema: z.ZodObject<{
|
|
|
785
785
|
bitrateVapixParams: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
786
786
|
audioSampleRate: z.ZodOptional<z.ZodNumber>;
|
|
787
787
|
audioChannelCount: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<1>, z.ZodLiteral<2>]>>;
|
|
788
|
-
audioBitrate: z.ZodOptional<z.ZodNumber>;
|
|
789
788
|
keyboard: z.ZodOptional<z.ZodObject<{
|
|
790
789
|
fromSource: z.ZodNullable<z.ZodString>;
|
|
791
790
|
none: z.ZodNullable<z.ZodString>;
|
|
@@ -813,7 +812,6 @@ export declare const cameraOptionsSchema: z.ZodObject<{
|
|
|
813
812
|
bitrateVapixParams?: string | null | undefined;
|
|
814
813
|
audioSampleRate?: number | undefined;
|
|
815
814
|
audioChannelCount?: 1 | 2 | undefined;
|
|
816
|
-
audioBitrate?: number | undefined;
|
|
817
815
|
}, {
|
|
818
816
|
resolution?: string | undefined;
|
|
819
817
|
compression?: number | undefined;
|
|
@@ -831,7 +829,6 @@ export declare const cameraOptionsSchema: z.ZodObject<{
|
|
|
831
829
|
bitrateVapixParams?: string | null | undefined;
|
|
832
830
|
audioSampleRate?: number | undefined;
|
|
833
831
|
audioChannelCount?: 1 | 2 | undefined;
|
|
834
|
-
audioBitrate?: number | undefined;
|
|
835
832
|
}>;
|
|
836
833
|
export type TCameraOptions = z.infer<typeof cameraOptionsSchema>;
|
|
837
834
|
export declare const globalAudioSettingsTypeSchema: z.ZodUnion<[z.ZodLiteral<"fromSource">, z.ZodLiteral<"source">]>;
|
|
@@ -54,6 +54,8 @@ export declare const widgetSchema: z.ZodObject<{
|
|
|
54
54
|
posY: number;
|
|
55
55
|
enabled?: boolean | undefined;
|
|
56
56
|
}>;
|
|
57
|
+
declare const widgetUnitsSchema: z.ZodUnion<[z.ZodLiteral<"metric">, z.ZodLiteral<"imperial">, z.ZodLiteral<"rotate">]>;
|
|
58
|
+
export type TWidgetUnits = z.infer<typeof widgetUnitsSchema>;
|
|
57
59
|
declare const labelOptionsSchema: z.ZodUnion<[z.ZodLiteral<"blank">, z.ZodLiteral<"registration">, z.ZodLiteral<"call_sign">, z.ZodLiteral<"flight_number">, z.ZodLiteral<"icao">]>;
|
|
58
60
|
export type TLabelOption = z.infer<typeof labelOptionsSchema>;
|
|
59
61
|
declare const droneLabelOptionsSchema: z.ZodUnion<[z.ZodLiteral<"blank">, z.ZodLiteral<"remote_id">]>;
|
|
@@ -313,9 +315,12 @@ export declare const cameraSettingsSchema: z.ZodObject<{
|
|
|
313
315
|
posX: z.ZodNumber;
|
|
314
316
|
posY: z.ZodNumber;
|
|
315
317
|
scale: z.ZodNumber;
|
|
318
|
+
} & {
|
|
319
|
+
units: z.ZodDefault<z.ZodUnion<[z.ZodLiteral<"metric">, z.ZodLiteral<"imperial">, z.ZodLiteral<"rotate">]>>;
|
|
316
320
|
}, "strip", z.ZodTypeAny, {
|
|
317
321
|
enabled: boolean;
|
|
318
322
|
scale: number;
|
|
323
|
+
units: "rotate" | "metric" | "imperial";
|
|
319
324
|
coord: "top_left" | "top_right" | "bottom_left" | "bottom_right";
|
|
320
325
|
posX: number;
|
|
321
326
|
posY: number;
|
|
@@ -325,6 +330,7 @@ export declare const cameraSettingsSchema: z.ZodObject<{
|
|
|
325
330
|
posX: number;
|
|
326
331
|
posY: number;
|
|
327
332
|
enabled?: boolean | undefined;
|
|
333
|
+
units?: "rotate" | "metric" | "imperial" | undefined;
|
|
328
334
|
}>>;
|
|
329
335
|
airportWidget: z.ZodDefault<z.ZodObject<{
|
|
330
336
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
@@ -336,6 +342,8 @@ export declare const cameraSettingsSchema: z.ZodObject<{
|
|
|
336
342
|
showWeather: z.ZodDefault<z.ZodBoolean>;
|
|
337
343
|
weatherLocationKey: z.ZodDefault<z.ZodString>;
|
|
338
344
|
weatherLocationName: z.ZodDefault<z.ZodString>;
|
|
345
|
+
windSpeedUnits: z.ZodDefault<z.ZodUnion<[z.ZodLiteral<"metric">, z.ZodLiteral<"imperial">, z.ZodLiteral<"rotate">]>>;
|
|
346
|
+
temperatureUnits: z.ZodDefault<z.ZodUnion<[z.ZodLiteral<"metric">, z.ZodLiteral<"imperial">, z.ZodLiteral<"rotate">]>>;
|
|
339
347
|
}, "strip", z.ZodTypeAny, {
|
|
340
348
|
enabled: boolean;
|
|
341
349
|
scale: number;
|
|
@@ -345,6 +353,8 @@ export declare const cameraSettingsSchema: z.ZodObject<{
|
|
|
345
353
|
posY: number;
|
|
346
354
|
showWeather: boolean;
|
|
347
355
|
weatherLocationKey: string;
|
|
356
|
+
windSpeedUnits: "rotate" | "metric" | "imperial";
|
|
357
|
+
temperatureUnits: "rotate" | "metric" | "imperial";
|
|
348
358
|
}, {
|
|
349
359
|
scale: number;
|
|
350
360
|
coord: "top_left" | "top_right" | "bottom_left" | "bottom_right";
|
|
@@ -354,6 +364,8 @@ export declare const cameraSettingsSchema: z.ZodObject<{
|
|
|
354
364
|
weatherLocationName?: string | undefined;
|
|
355
365
|
showWeather?: boolean | undefined;
|
|
356
366
|
weatherLocationKey?: string | undefined;
|
|
367
|
+
windSpeedUnits?: "rotate" | "metric" | "imperial" | undefined;
|
|
368
|
+
temperatureUnits?: "rotate" | "metric" | "imperial" | undefined;
|
|
357
369
|
}>>;
|
|
358
370
|
fr24FlightInfoSource: z.ZodDefault<z.ZodObject<{
|
|
359
371
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
@@ -614,6 +626,7 @@ export declare const cameraSettingsSchema: z.ZodObject<{
|
|
|
614
626
|
widget: {
|
|
615
627
|
enabled: boolean;
|
|
616
628
|
scale: number;
|
|
629
|
+
units: "rotate" | "metric" | "imperial";
|
|
617
630
|
coord: "top_left" | "top_right" | "bottom_left" | "bottom_right";
|
|
618
631
|
posX: number;
|
|
619
632
|
posY: number;
|
|
@@ -627,6 +640,8 @@ export declare const cameraSettingsSchema: z.ZodObject<{
|
|
|
627
640
|
posY: number;
|
|
628
641
|
showWeather: boolean;
|
|
629
642
|
weatherLocationKey: string;
|
|
643
|
+
windSpeedUnits: "rotate" | "metric" | "imperial";
|
|
644
|
+
temperatureUnits: "rotate" | "metric" | "imperial";
|
|
630
645
|
};
|
|
631
646
|
fr24FlightInfoSource: {
|
|
632
647
|
enabled: boolean;
|
|
@@ -802,6 +817,7 @@ export declare const cameraSettingsSchema: z.ZodObject<{
|
|
|
802
817
|
posX: number;
|
|
803
818
|
posY: number;
|
|
804
819
|
enabled?: boolean | undefined;
|
|
820
|
+
units?: "rotate" | "metric" | "imperial" | undefined;
|
|
805
821
|
} | undefined;
|
|
806
822
|
airportWidget?: {
|
|
807
823
|
scale: number;
|
|
@@ -812,6 +828,8 @@ export declare const cameraSettingsSchema: z.ZodObject<{
|
|
|
812
828
|
weatherLocationName?: string | undefined;
|
|
813
829
|
showWeather?: boolean | undefined;
|
|
814
830
|
weatherLocationKey?: string | undefined;
|
|
831
|
+
windSpeedUnits?: "rotate" | "metric" | "imperial" | undefined;
|
|
832
|
+
temperatureUnits?: "rotate" | "metric" | "imperial" | undefined;
|
|
815
833
|
} | undefined;
|
|
816
834
|
fr24FlightInfoSource?: {
|
|
817
835
|
enabled?: boolean | undefined;
|