camstreamerlib 5.0.0-5bbcf7f → 5.0.0-9647f54
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/README.md +18 -0
- package/cjs/CamOverlayAPI.d.ts +4 -19
- package/cjs/CamStreamerAPI.d.ts +2 -21
- package/cjs/CamSwitcherAPI.d.ts +2 -1
- package/cjs/CamSwitcherAPI.js +2 -0
- package/cjs/PlaneTrackerAPI.d.ts +13 -76
- package/cjs/VapixAPI.d.ts +5 -19
- package/cjs/VapixAPI.js +1 -1
- package/cjs/bin/CreatePackage.js +17 -7
- package/cjs/internal/transformers.d.ts +4 -4
- package/cjs/internal/utils.js +3 -3
- package/cjs/node/CamOverlayDrawingAPI.d.ts +0 -3
- package/cjs/node/CamOverlayPainter/Frame.d.ts +0 -1
- package/cjs/node/CamOverlayPainter/ResourceManager.d.ts +2 -2
- package/cjs/node/CamOverlayPainter/ResourceManager.js +17 -7
- package/cjs/node/CamScripterAPICameraEventsGenerator.d.ts +0 -1
- package/cjs/node/DefaultClient.d.ts +0 -2
- package/cjs/node/Digest.js +17 -7
- package/cjs/node/HttpRequestSender.d.ts +0 -2
- package/cjs/node/HttpRequestSender.test.js +17 -7
- package/cjs/node/HttpServer.d.ts +0 -2
- package/cjs/node/HttpServer.js +17 -7
- package/cjs/node/TimeZoneDaemon.js +1 -2
- package/cjs/node/VapixEvents.js +1 -1
- package/cjs/node/WsClient.js +1 -1
- package/cjs/types/CamOverlayAPI/CamOverlayAPI.d.ts +14 -456
- package/cjs/types/CamStreamerAPI/CamStreamerAPI.d.ts +20 -1818
- package/cjs/types/CamSwitcherAPI.d.ts +1 -0
- package/cjs/types/CamSwitcherAPI.js +1 -0
- package/cjs/web/WsClient.js +1 -1
- package/esm/CamSwitcherAPI.js +2 -0
- package/esm/VapixAPI.js +1 -1
- package/esm/node/TimeZoneDaemon.js +1 -2
- package/esm/node/VapixEvents.js +1 -1
- package/esm/node/WsClient.js +1 -1
- package/esm/types/CamSwitcherAPI.js +1 -0
- package/esm/web/WsClient.js +1 -1
- package/package.json +6 -7
- package/types/CamOverlayAPI.d.ts +4 -19
- package/types/CamStreamerAPI.d.ts +2 -21
- package/types/CamSwitcherAPI.d.ts +2 -1
- package/types/PlaneTrackerAPI.d.ts +13 -76
- package/types/VapixAPI.d.ts +5 -19
- package/types/internal/transformers.d.ts +4 -4
- package/types/node/CamOverlayDrawingAPI.d.ts +0 -3
- package/types/node/CamOverlayPainter/Frame.d.ts +0 -1
- package/types/node/CamOverlayPainter/ResourceManager.d.ts +2 -2
- package/types/node/CamScripterAPICameraEventsGenerator.d.ts +0 -1
- package/types/node/DefaultClient.d.ts +0 -2
- package/types/node/HttpRequestSender.d.ts +0 -2
- package/types/node/HttpServer.d.ts +0 -2
- package/types/types/CamOverlayAPI/CamOverlayAPI.d.ts +14 -456
- package/types/types/CamStreamerAPI/CamStreamerAPI.d.ts +20 -1818
- package/types/types/CamSwitcherAPI.d.ts +1 -0
|
@@ -237,6 +237,7 @@ export declare const cameraOptionsSchema: z.ZodObject<{
|
|
|
237
237
|
bitrateVapixParams: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
238
238
|
audioSampleRate: z.ZodOptional<z.ZodNumber>;
|
|
239
239
|
audioChannelCount: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>]>>;
|
|
240
|
+
audioBitrate: z.ZodOptional<z.ZodNumber>;
|
|
240
241
|
keyboard: z.ZodOptional<z.ZodObject<{
|
|
241
242
|
fromSource: z.ZodNullable<z.ZodString>;
|
|
242
243
|
none: z.ZodNullable<z.ZodString>;
|
|
@@ -145,6 +145,7 @@ 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(),
|
|
148
149
|
keyboard: zod_1.z.object({
|
|
149
150
|
fromSource: common_1.keyboardShortcutSchema,
|
|
150
151
|
none: common_1.keyboardShortcutSchema,
|
package/cjs/web/WsClient.js
CHANGED
package/esm/CamSwitcherAPI.js
CHANGED
|
@@ -153,6 +153,7 @@ export class CamSwitcherAPI extends BasicAPI {
|
|
|
153
153
|
audio: {
|
|
154
154
|
sampleRate: data.audioSampleRate,
|
|
155
155
|
channelCount: data.audioChannelCount,
|
|
156
|
+
bitrate: data.audioBitrate,
|
|
156
157
|
},
|
|
157
158
|
keyboard: data.keyboard,
|
|
158
159
|
};
|
|
@@ -204,6 +205,7 @@ export class CamSwitcherAPI extends BasicAPI {
|
|
|
204
205
|
const settings = {
|
|
205
206
|
audioSampleRate: saveData.audio?.sampleRate,
|
|
206
207
|
audioChannelCount: saveData.audio?.channelCount,
|
|
208
|
+
audioBitrate: saveData.audio?.bitrate,
|
|
207
209
|
keyboard: saveData.keyboard,
|
|
208
210
|
fps: saveData.video.fps,
|
|
209
211
|
resolution: saveData.video.resolution,
|
package/esm/VapixAPI.js
CHANGED
|
@@ -633,7 +633,7 @@ export class VapixAPI extends BasicAPI {
|
|
|
633
633
|
headers: {
|
|
634
634
|
contentType: 'application/octet-stream',
|
|
635
635
|
},
|
|
636
|
-
timeout: options?.timeout ??
|
|
636
|
+
timeout: options?.timeout ?? 300_000,
|
|
637
637
|
});
|
|
638
638
|
if (!res.ok) {
|
|
639
639
|
throw new ErrorWithResponse(res);
|
|
@@ -13,8 +13,7 @@ export class TimeZoneDaemon {
|
|
|
13
13
|
try {
|
|
14
14
|
const { stdout } = await execPromise('timedatectl show -p Timezone --value');
|
|
15
15
|
const systemTimezone = stdout.toString().trim();
|
|
16
|
-
|
|
17
|
-
if (systemTimezone !== nodeTimezone) {
|
|
16
|
+
if (systemTimezone !== '' && systemTimezone !== process.env.TZ) {
|
|
18
17
|
process.env.TZ = systemTimezone;
|
|
19
18
|
}
|
|
20
19
|
}
|
package/esm/node/VapixEvents.js
CHANGED
|
@@ -43,7 +43,7 @@ export class VapixEvents extends EventEmitter {
|
|
|
43
43
|
const topics = [];
|
|
44
44
|
const eventNames = this.eventNames();
|
|
45
45
|
for (const eventName of eventNames) {
|
|
46
|
-
if (!this.isReservedEventName(eventName)) {
|
|
46
|
+
if (typeof eventName === 'string' && !this.isReservedEventName(eventName)) {
|
|
47
47
|
const topic = {
|
|
48
48
|
topicFilter: eventName,
|
|
49
49
|
};
|
package/esm/node/WsClient.js
CHANGED
|
@@ -22,7 +22,7 @@ export class WsClient {
|
|
|
22
22
|
const protocol = tls ? 'wss' : 'ws';
|
|
23
23
|
this.address = `${protocol}://${host}:${port}${options.address}`;
|
|
24
24
|
this.digestAddress = options.address;
|
|
25
|
-
this.pingInterval = options.pingInterval ??
|
|
25
|
+
this.pingInterval = options.pingInterval ?? 30_000;
|
|
26
26
|
this.protocol = options.protocol;
|
|
27
27
|
this.wsOptions = {
|
|
28
28
|
auth: `${this.user}:${this.pass}`,
|
|
@@ -142,6 +142,7 @@ 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(),
|
|
145
146
|
keyboard: z.object({
|
|
146
147
|
fromSource: keyboardShortcutSchema,
|
|
147
148
|
none: keyboardShortcutSchema,
|
package/esm/web/WsClient.js
CHANGED
package/package.json
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "camstreamerlib",
|
|
3
|
-
"version": "5.0.0-
|
|
3
|
+
"version": "5.0.0-9647f54",
|
|
4
4
|
"description": "Helper library for CamStreamer ACAP applications.",
|
|
5
5
|
"prettier": "@camstreamer/prettier-config",
|
|
6
|
-
"
|
|
7
|
-
"node": ">=18
|
|
6
|
+
"engines": {
|
|
7
|
+
"node": ">=18"
|
|
8
8
|
},
|
|
9
9
|
"dependencies": {
|
|
10
10
|
"adm-zip": "^0.6.0",
|
|
11
|
-
"eventemitter2": "^
|
|
11
|
+
"eventemitter2": "^6.4.9",
|
|
12
12
|
"fast-xml-parser": "^5.3.6",
|
|
13
|
-
"type-fest": "^
|
|
13
|
+
"type-fest": "^5.10.0",
|
|
14
14
|
"undici": "^6.28.1",
|
|
15
15
|
"ws": "^8.18.0",
|
|
16
16
|
"zod": "^4.6.7"
|
|
@@ -19,7 +19,6 @@
|
|
|
19
19
|
"@camstreamer/eslint-config": "^1.0.10",
|
|
20
20
|
"@camstreamer/prettier-config": "^2.0.4",
|
|
21
21
|
"@eslint/js": "^10.0.1",
|
|
22
|
-
"@types/adm-zip": "^0.5.5",
|
|
23
22
|
"@types/jest": "^30.0.0",
|
|
24
23
|
"@types/node": "^18.19.127",
|
|
25
24
|
"@types/ws": "^8.5.10",
|
|
@@ -32,7 +31,7 @@
|
|
|
32
31
|
"prettier": "^2.7.1",
|
|
33
32
|
"ts-jest": "^29.4.14",
|
|
34
33
|
"ts-node": "^10.7.0",
|
|
35
|
-
"typescript": "5.
|
|
34
|
+
"typescript": "^5.9.3",
|
|
36
35
|
"typescript-eslint": "^8.71.2"
|
|
37
36
|
},
|
|
38
37
|
"overrides": {
|
package/types/CamOverlayAPI.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { IClient, TResponse } from './internal/types';
|
|
2
2
|
import { THttpRequestOptions } from './types/common';
|
|
3
|
-
import { z } from 'zod';
|
|
4
3
|
import { ImageType, TCoordinates, TField, TFile, TFileType, TFileStorageType, TService, TFileList, TStorageDataList } from './types/CamOverlayAPI';
|
|
5
4
|
import { BasicAPI } from './internal/BasicAPI';
|
|
6
5
|
export declare class CamOverlayAPI<Client extends IClient<TResponse, any>> extends BasicAPI<Client> {
|
|
@@ -105,11 +104,7 @@ export declare class CamOverlayAPI<Client extends IClient<TResponse, any>> exten
|
|
|
105
104
|
northPan: number;
|
|
106
105
|
cameraPosX: number;
|
|
107
106
|
cameraPosY: number;
|
|
108
|
-
colorScheme:
|
|
109
|
-
black: "black";
|
|
110
|
-
white: "white";
|
|
111
|
-
orange: "orange";
|
|
112
|
-
}>;
|
|
107
|
+
colorScheme: "black" | "white" | "orange";
|
|
113
108
|
showDegrees: boolean;
|
|
114
109
|
invertInput?: boolean | undefined;
|
|
115
110
|
camera?: number | undefined;
|
|
@@ -222,10 +217,7 @@ export declare class CamOverlayAPI<Client extends IClient<TResponse, any>> exten
|
|
|
222
217
|
pos_y: number;
|
|
223
218
|
coordSystem: "top_left" | "top" | "top_right" | "left" | "center" | "right" | "bottom_left" | "bottom" | "bottom_right";
|
|
224
219
|
clockFormat: "12h" | "24h";
|
|
225
|
-
background:
|
|
226
|
-
custom: "custom";
|
|
227
|
-
image: "image";
|
|
228
|
-
}>;
|
|
220
|
+
background: "custom" | "image";
|
|
229
221
|
image: string;
|
|
230
222
|
customAreaColor: string;
|
|
231
223
|
customAreaWidth: number;
|
|
@@ -548,11 +540,7 @@ export declare class CamOverlayAPI<Client extends IClient<TResponse, any>> exten
|
|
|
548
540
|
northPan: number;
|
|
549
541
|
cameraPosX: number;
|
|
550
542
|
cameraPosY: number;
|
|
551
|
-
colorScheme:
|
|
552
|
-
black: "black";
|
|
553
|
-
white: "white";
|
|
554
|
-
orange: "orange";
|
|
555
|
-
}>;
|
|
543
|
+
colorScheme: "black" | "white" | "orange";
|
|
556
544
|
showDegrees: boolean;
|
|
557
545
|
invertInput?: boolean | undefined;
|
|
558
546
|
camera?: number | undefined;
|
|
@@ -665,10 +653,7 @@ export declare class CamOverlayAPI<Client extends IClient<TResponse, any>> exten
|
|
|
665
653
|
pos_y: number;
|
|
666
654
|
coordSystem: "top_left" | "top" | "top_right" | "left" | "center" | "right" | "bottom_left" | "bottom" | "bottom_right";
|
|
667
655
|
clockFormat: "12h" | "24h";
|
|
668
|
-
background:
|
|
669
|
-
custom: "custom";
|
|
670
|
-
image: "image";
|
|
671
|
-
}>;
|
|
656
|
+
background: "custom" | "image";
|
|
672
657
|
image: string;
|
|
673
658
|
customAreaColor: string;
|
|
674
659
|
customAreaWidth: number;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
1
|
import { IClient, TResponse } from './internal/types';
|
|
3
2
|
import { TAudioFile, TAudioFileStorageType, TDiagnosticsParams, TStream } from './types/CamStreamerAPI/CamStreamerAPI';
|
|
4
3
|
import { THttpRequestOptions } from './types/common';
|
|
@@ -109,16 +108,7 @@ export declare class CamStreamerAPI<Client extends IClient<TResponse, any>> exte
|
|
|
109
108
|
locationName: string;
|
|
110
109
|
locationAddress: string;
|
|
111
110
|
mapZoom: number;
|
|
112
|
-
direction:
|
|
113
|
-
N: "N";
|
|
114
|
-
NE: "NE";
|
|
115
|
-
E: "E";
|
|
116
|
-
SE: "SE";
|
|
117
|
-
S: "S";
|
|
118
|
-
SW: "SW";
|
|
119
|
-
W: "W";
|
|
120
|
-
NW: "NW";
|
|
121
|
-
}> | null;
|
|
111
|
+
direction: "N" | "NE" | "E" | "SE" | "S" | "SW" | "W" | "NW" | null;
|
|
122
112
|
position: "fix" | "rotating" | "controllable";
|
|
123
113
|
webPageUrl: string;
|
|
124
114
|
} | {
|
|
@@ -1911,16 +1901,7 @@ export declare class CamStreamerAPI<Client extends IClient<TResponse, any>> exte
|
|
|
1911
1901
|
locationName: string;
|
|
1912
1902
|
locationAddress: string;
|
|
1913
1903
|
mapZoom: number;
|
|
1914
|
-
direction:
|
|
1915
|
-
N: "N";
|
|
1916
|
-
NE: "NE";
|
|
1917
|
-
E: "E";
|
|
1918
|
-
SE: "SE";
|
|
1919
|
-
S: "S";
|
|
1920
|
-
SW: "SW";
|
|
1921
|
-
W: "W";
|
|
1922
|
-
NW: "NW";
|
|
1923
|
-
}> | null;
|
|
1904
|
+
direction: "N" | "NE" | "E" | "SE" | "S" | "SW" | "W" | "NW" | null;
|
|
1924
1905
|
position: "fix" | "rotating" | "controllable";
|
|
1925
1906
|
webPageUrl: string;
|
|
1926
1907
|
} | {
|
|
@@ -6,7 +6,7 @@ export declare class CamSwitcherAPI<Client extends IClient<TResponse, any>> exte
|
|
|
6
6
|
private CustomFormData;
|
|
7
7
|
private vapixAgent;
|
|
8
8
|
constructor(client: Client, CustomFormData?: {
|
|
9
|
-
new (form?: HTMLFormElement
|
|
9
|
+
new (form?: HTMLFormElement, submitter?: HTMLElement | null): FormData;
|
|
10
10
|
prototype: FormData;
|
|
11
11
|
});
|
|
12
12
|
static getProxyPath: () => string;
|
|
@@ -157,6 +157,7 @@ export declare class CamSwitcherAPI<Client extends IClient<TResponse, any>> exte
|
|
|
157
157
|
bitrateVapixParams?: string | null | undefined;
|
|
158
158
|
audioSampleRate?: number | undefined;
|
|
159
159
|
audioChannelCount?: 1 | 2 | undefined;
|
|
160
|
+
audioBitrate?: number | undefined;
|
|
160
161
|
keyboard?: {
|
|
161
162
|
fromSource: string | null;
|
|
162
163
|
none: string | null;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
1
|
import { IClient, TResponse } from './internal/types';
|
|
3
2
|
import { ICAO, TBlackList, TCameraSettings, TConnection, TExportDataType, TGetIcaoByOption, TImportDataType, TMilestoneCameraOption, TPriorityList, TTrackingMode, TWhiteList, TZones } from './types/PlaneTrackerAPI';
|
|
4
3
|
import { THttpRequestOptions } from './types/common';
|
|
@@ -216,34 +215,13 @@ export declare class PlaneTrackerAPI<Client extends IClient<TResponse, any>> ext
|
|
|
216
215
|
}>;
|
|
217
216
|
exportAppSettings(dataType: TExportDataType, options?: THttpRequestOptions): Promise<ReturnType<Awaited<ReturnType<Client["get"]>>["blob"]>>;
|
|
218
217
|
importAppSettings(dataType: TImportDataType, formData: Parameters<Client['post']>[0]['data'], options?: THttpRequestOptions): Promise<void>;
|
|
219
|
-
getDomainList(options?: THttpRequestOptions): Promise<Partial<Record<
|
|
220
|
-
adsb: "adsb";
|
|
221
|
-
remoteId: "remoteId";
|
|
222
|
-
}>, {
|
|
218
|
+
getDomainList(options?: THttpRequestOptions): Promise<Partial<Record<"adsb" | "remoteId", {
|
|
223
219
|
uiName: string;
|
|
224
|
-
icon:
|
|
225
|
-
unknown: "unknown";
|
|
226
|
-
small: "small";
|
|
227
|
-
drone: "drone";
|
|
228
|
-
large: "large";
|
|
229
|
-
heavy: "heavy";
|
|
230
|
-
helicopter: "helicopter";
|
|
231
|
-
operator: "operator";
|
|
232
|
-
vehicle: "vehicle";
|
|
233
|
-
}>;
|
|
220
|
+
icon: "unknown" | "small" | "drone" | "large" | "heavy" | "helicopter" | "operator" | "vehicle";
|
|
234
221
|
categoryList: {
|
|
235
222
|
categoryId: string;
|
|
236
223
|
uiName: string;
|
|
237
|
-
icon:
|
|
238
|
-
unknown: "unknown";
|
|
239
|
-
small: "small";
|
|
240
|
-
drone: "drone";
|
|
241
|
-
large: "large";
|
|
242
|
-
heavy: "heavy";
|
|
243
|
-
helicopter: "helicopter";
|
|
244
|
-
operator: "operator";
|
|
245
|
-
vehicle: "vehicle";
|
|
246
|
-
}>;
|
|
224
|
+
icon: "unknown" | "small" | "drone" | "large" | "heavy" | "helicopter" | "operator" | "vehicle";
|
|
247
225
|
}[];
|
|
248
226
|
}>>>;
|
|
249
227
|
fetchFlightInfo(targetId: string, options?: THttpRequestOptions): Promise<{
|
|
@@ -278,17 +256,8 @@ export declare class PlaneTrackerAPI<Client extends IClient<TResponse, any>> ext
|
|
|
278
256
|
getIcao(by: TGetIcaoByOption, value: string, options?: THttpRequestOptions): Promise<string>;
|
|
279
257
|
getPriorityList(options?: THttpRequestOptions): Promise<{
|
|
280
258
|
list: {
|
|
281
|
-
domain:
|
|
282
|
-
|
|
283
|
-
remoteId: "remoteId";
|
|
284
|
-
}>;
|
|
285
|
-
idType: z.core.$InferEnumOutput<{
|
|
286
|
-
icao: "icao";
|
|
287
|
-
type_icao: "type_icao";
|
|
288
|
-
drone_mac: "drone_mac";
|
|
289
|
-
operator_mac: "operator_mac";
|
|
290
|
-
category: "category";
|
|
291
|
-
}>;
|
|
259
|
+
domain: "adsb" | "remoteId";
|
|
260
|
+
idType: "icao" | "type_icao" | "drone_mac" | "operator_mac" | "category";
|
|
292
261
|
idValue: string;
|
|
293
262
|
priority: number;
|
|
294
263
|
}[];
|
|
@@ -296,34 +265,16 @@ export declare class PlaneTrackerAPI<Client extends IClient<TResponse, any>> ext
|
|
|
296
265
|
setPriorityList(priorityList: TPriorityList, options?: THttpRequestOptions): Promise<void>;
|
|
297
266
|
getWhiteList(options?: THttpRequestOptions): Promise<{
|
|
298
267
|
list: {
|
|
299
|
-
domain:
|
|
300
|
-
|
|
301
|
-
remoteId: "remoteId";
|
|
302
|
-
}>;
|
|
303
|
-
idType: z.core.$InferEnumOutput<{
|
|
304
|
-
icao: "icao";
|
|
305
|
-
type_icao: "type_icao";
|
|
306
|
-
drone_mac: "drone_mac";
|
|
307
|
-
operator_mac: "operator_mac";
|
|
308
|
-
category: "category";
|
|
309
|
-
}>;
|
|
268
|
+
domain: "adsb" | "remoteId";
|
|
269
|
+
idType: "icao" | "type_icao" | "drone_mac" | "operator_mac" | "category";
|
|
310
270
|
idValue: string;
|
|
311
271
|
}[];
|
|
312
272
|
}>;
|
|
313
273
|
setWhiteList(whiteList: TWhiteList, options?: THttpRequestOptions): Promise<void>;
|
|
314
274
|
getBlackList(options?: THttpRequestOptions): Promise<{
|
|
315
275
|
list: {
|
|
316
|
-
domain:
|
|
317
|
-
|
|
318
|
-
remoteId: "remoteId";
|
|
319
|
-
}>;
|
|
320
|
-
idType: z.core.$InferEnumOutput<{
|
|
321
|
-
icao: "icao";
|
|
322
|
-
type_icao: "type_icao";
|
|
323
|
-
drone_mac: "drone_mac";
|
|
324
|
-
operator_mac: "operator_mac";
|
|
325
|
-
category: "category";
|
|
326
|
-
}>;
|
|
276
|
+
domain: "adsb" | "remoteId";
|
|
277
|
+
idType: "icao" | "type_icao" | "drone_mac" | "operator_mac" | "category";
|
|
327
278
|
idValue: string;
|
|
328
279
|
}[];
|
|
329
280
|
}>;
|
|
@@ -331,10 +282,7 @@ export declare class PlaneTrackerAPI<Client extends IClient<TResponse, any>> ext
|
|
|
331
282
|
fetchMapInfo(options?: THttpRequestOptions): Promise<{
|
|
332
283
|
minZoom: number;
|
|
333
284
|
maxZoom: number;
|
|
334
|
-
mapTypes:
|
|
335
|
-
roadmap: "roadmap";
|
|
336
|
-
satellite: "satellite";
|
|
337
|
-
}>[];
|
|
285
|
+
mapTypes: ("roadmap" | "satellite")[];
|
|
338
286
|
tileSize: number;
|
|
339
287
|
}>;
|
|
340
288
|
getZones(options?: THttpRequestOptions): Promise<{
|
|
@@ -344,21 +292,10 @@ export declare class PlaneTrackerAPI<Client extends IClient<TResponse, any>> ext
|
|
|
344
292
|
lat: number;
|
|
345
293
|
lon: number;
|
|
346
294
|
}[];
|
|
347
|
-
flightDirection:
|
|
348
|
-
all: "all";
|
|
349
|
-
arrival: "arrival";
|
|
350
|
-
departure: "departure";
|
|
351
|
-
}>;
|
|
295
|
+
flightDirection: "all" | "arrival" | "departure";
|
|
352
296
|
weight: number;
|
|
353
|
-
perimeter:
|
|
354
|
-
|
|
355
|
-
outer: "outer";
|
|
356
|
-
inner: "inner";
|
|
357
|
-
}>;
|
|
358
|
-
trackingDomains: z.core.$InferEnumOutput<{
|
|
359
|
-
adsb: "adsb";
|
|
360
|
-
remoteId: "remoteId";
|
|
361
|
-
}>[];
|
|
297
|
+
perimeter: "none" | "outer" | "inner";
|
|
298
|
+
trackingDomains: ("adsb" | "remoteId")[];
|
|
362
299
|
name?: string | undefined;
|
|
363
300
|
minAltitudeAmsl?: number | undefined;
|
|
364
301
|
maxAltitudeAmsl?: number | undefined;
|
package/types/VapixAPI.d.ts
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { IClient, TParameters, TResponse } from './internal/types';
|
|
2
2
|
import { TAudioDevice, TPortSetSchema, TPortSequenceStateSchema } from './types/VapixAPI';
|
|
3
3
|
import { TCameraImageConfig, THttpRequestOptions } from './types/common';
|
|
4
|
-
import { z } from 'zod';
|
|
5
4
|
import { BasicAPI } from './internal/BasicAPI';
|
|
6
5
|
export declare class VapixAPI<Client extends IClient<TResponse, any>> extends BasicAPI<Client> {
|
|
7
6
|
private CustomFormData;
|
|
8
7
|
constructor(client: Client, CustomFormData?: {
|
|
9
|
-
new (form?: HTMLFormElement
|
|
8
|
+
new (form?: HTMLFormElement, submitter?: HTMLElement | null): FormData;
|
|
10
9
|
prototype: FormData;
|
|
11
10
|
});
|
|
12
11
|
postUrlEncoded(path: string, parameters?: TParameters, headers?: Record<string, string>, options?: THttpRequestOptions): Promise<TResponse>;
|
|
@@ -47,11 +46,7 @@ export declare class VapixAPI<Client extends IClient<TResponse, any>> extends Ba
|
|
|
47
46
|
getHeaders(options?: THttpRequestOptions): Promise<Record<string, string>>;
|
|
48
47
|
setHeaders(headers: Record<string, string>, options?: THttpRequestOptions): Promise<void>;
|
|
49
48
|
checkSDCard(options?: THttpRequestOptions): Promise<{
|
|
50
|
-
status:
|
|
51
|
-
OK: "OK";
|
|
52
|
-
connected: "connected";
|
|
53
|
-
disconnected: "disconnected";
|
|
54
|
-
}>;
|
|
49
|
+
status: "OK" | "connected" | "disconnected";
|
|
55
50
|
totalSize: number;
|
|
56
51
|
freeSize: number;
|
|
57
52
|
}>;
|
|
@@ -99,21 +94,12 @@ export declare class VapixAPI<Client extends IClient<TResponse, any>> extends Ba
|
|
|
99
94
|
}>;
|
|
100
95
|
getPorts(options?: THttpRequestOptions): Promise<{
|
|
101
96
|
port: string;
|
|
102
|
-
state:
|
|
103
|
-
open: "open";
|
|
104
|
-
closed: "closed";
|
|
105
|
-
}>;
|
|
97
|
+
state: "open" | "closed";
|
|
106
98
|
configurable: boolean;
|
|
107
99
|
usage: string;
|
|
108
|
-
direction:
|
|
109
|
-
output: "output";
|
|
110
|
-
input: "input";
|
|
111
|
-
}>;
|
|
100
|
+
direction: "output" | "input";
|
|
112
101
|
name: string;
|
|
113
|
-
normalState:
|
|
114
|
-
open: "open";
|
|
115
|
-
closed: "closed";
|
|
116
|
-
}>;
|
|
102
|
+
normalState: "open" | "closed";
|
|
117
103
|
readonly?: boolean | undefined;
|
|
118
104
|
}[]>;
|
|
119
105
|
setPorts(ports: TPortSetSchema[], options?: THttpRequestOptions): Promise<void>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { CamelCasedProperties, CamelCasedPropertiesDeep, SnakeCasedProperties, SnakeCasedPropertiesDeep } from 'type-fest';
|
|
2
|
-
export declare const toCamelCase: <T extends object>(o: T) => CamelCasedProperties<
|
|
3
|
-
export declare const toCamelCaseDeep: <T extends object>(o: T) => CamelCasedPropertiesDeep<
|
|
4
|
-
export declare const toSnakeCase: <T extends object>(o: T) => SnakeCasedProperties<
|
|
5
|
-
export declare const toSnakeCaseDeep: <T extends object>(o: T) => SnakeCasedPropertiesDeep<
|
|
2
|
+
export declare const toCamelCase: <T extends object>(o: T) => CamelCasedProperties<typeof o>;
|
|
3
|
+
export declare const toCamelCaseDeep: <T extends object>(o: T) => CamelCasedPropertiesDeep<typeof o>;
|
|
4
|
+
export declare const toSnakeCase: <T extends object>(o: T) => SnakeCasedProperties<typeof o>;
|
|
5
|
+
export declare const toSnakeCaseDeep: <T extends object>(o: T) => SnakeCasedPropertiesDeep<typeof o>;
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
/// <reference types="node" />
|
|
3
|
-
/// <reference types="node" />
|
|
4
1
|
import { EventEmitter } from 'events';
|
|
5
2
|
import { CamOverlayDrawingOptions, TCairoCreateResponse, TCairoResponse, TUploadImageResponse, TWriteTextParams } from '../types/CamOverlayDrawingAPI';
|
|
6
3
|
export declare class CamOverlayDrawingAPI extends EventEmitter {
|
|
@@ -9,7 +9,7 @@ export declare class ResourceManager {
|
|
|
9
9
|
constructor(co: CamOverlayDrawingAPI);
|
|
10
10
|
registerImage(moniker: string, fileName: string): void;
|
|
11
11
|
registerFont(moniker: string, fileName: string): void;
|
|
12
|
-
image(moniker: string): Promise<TUploadImageResponse
|
|
13
|
-
font(moniker: string): Promise<TCairoCreateResponse
|
|
12
|
+
image(moniker: string): Promise<TUploadImageResponse>;
|
|
13
|
+
font(moniker: string): Promise<TCairoCreateResponse>;
|
|
14
14
|
clear(): void;
|
|
15
15
|
}
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
/// <reference types="node" />
|
|
3
1
|
import { IClient, HttpOptions, TGetParams, TPostParams } from '../internal/types';
|
|
4
2
|
import { FormData as UndiciFormData, Response as UndiciResponse } from 'undici';
|
|
5
3
|
export declare class DefaultClient implements IClient<UndiciResponse, UndiciFormData | Buffer> {
|