camstreamerlib 5.0.0-5bbcf7f → 5.0.1-5fad3e0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (62) hide show
  1. package/README.md +18 -0
  2. package/cjs/CamOverlayAPI.d.ts +4 -19
  3. package/cjs/CamStreamerAPI.d.ts +2 -21
  4. package/cjs/CamSwitcherAPI.d.ts +2 -1
  5. package/cjs/CamSwitcherAPI.js +2 -0
  6. package/cjs/PlaneTrackerAPI.d.ts +13 -76
  7. package/cjs/VapixAPI.d.ts +5 -19
  8. package/cjs/VapixAPI.js +7 -6
  9. package/cjs/bin/CreatePackage.js +17 -7
  10. package/cjs/internal/posixTimeZone.d.ts +1 -0
  11. package/cjs/internal/posixTimeZone.js +6 -0
  12. package/cjs/internal/posixTimeZone.test.d.ts +1 -0
  13. package/cjs/internal/posixTimeZone.test.js +23 -0
  14. package/cjs/internal/transformers.d.ts +4 -4
  15. package/cjs/internal/utils.js +3 -3
  16. package/cjs/node/CamOverlayDrawingAPI.d.ts +0 -3
  17. package/cjs/node/CamOverlayPainter/Frame.d.ts +0 -1
  18. package/cjs/node/CamOverlayPainter/ResourceManager.d.ts +2 -2
  19. package/cjs/node/CamOverlayPainter/ResourceManager.js +17 -7
  20. package/cjs/node/CamScripterAPICameraEventsGenerator.d.ts +0 -1
  21. package/cjs/node/DefaultClient.d.ts +0 -2
  22. package/cjs/node/Digest.js +17 -7
  23. package/cjs/node/HttpRequestSender.d.ts +0 -2
  24. package/cjs/node/HttpRequestSender.test.js +17 -7
  25. package/cjs/node/HttpServer.d.ts +0 -2
  26. package/cjs/node/HttpServer.js +17 -7
  27. package/cjs/node/TimeZoneDaemon.js +1 -2
  28. package/cjs/node/VapixEvents.js +1 -1
  29. package/cjs/node/WsClient.js +1 -1
  30. package/cjs/types/CamOverlayAPI/CamOverlayAPI.d.ts +14 -456
  31. package/cjs/types/CamStreamerAPI/CamStreamerAPI.d.ts +20 -1818
  32. package/cjs/types/CamSwitcherAPI.d.ts +1 -0
  33. package/cjs/types/CamSwitcherAPI.js +1 -0
  34. package/cjs/web/WsClient.js +1 -1
  35. package/esm/CamSwitcherAPI.js +2 -0
  36. package/esm/VapixAPI.js +7 -6
  37. package/esm/internal/posixTimeZone.js +2 -0
  38. package/esm/internal/posixTimeZone.test.js +21 -0
  39. package/esm/node/TimeZoneDaemon.js +1 -2
  40. package/esm/node/VapixEvents.js +1 -1
  41. package/esm/node/WsClient.js +1 -1
  42. package/esm/types/CamSwitcherAPI.js +1 -0
  43. package/esm/web/WsClient.js +1 -1
  44. package/package.json +6 -7
  45. package/types/CamOverlayAPI.d.ts +4 -19
  46. package/types/CamStreamerAPI.d.ts +2 -21
  47. package/types/CamSwitcherAPI.d.ts +2 -1
  48. package/types/PlaneTrackerAPI.d.ts +13 -76
  49. package/types/VapixAPI.d.ts +5 -19
  50. package/types/internal/posixTimeZone.d.ts +1 -0
  51. package/types/internal/posixTimeZone.test.d.ts +1 -0
  52. package/types/internal/transformers.d.ts +4 -4
  53. package/types/node/CamOverlayDrawingAPI.d.ts +0 -3
  54. package/types/node/CamOverlayPainter/Frame.d.ts +0 -1
  55. package/types/node/CamOverlayPainter/ResourceManager.d.ts +2 -2
  56. package/types/node/CamScripterAPICameraEventsGenerator.d.ts +0 -1
  57. package/types/node/DefaultClient.d.ts +0 -2
  58. package/types/node/HttpRequestSender.d.ts +0 -2
  59. package/types/node/HttpServer.d.ts +0 -2
  60. package/types/types/CamOverlayAPI/CamOverlayAPI.d.ts +14 -456
  61. package/types/types/CamStreamerAPI/CamStreamerAPI.d.ts +20 -1818
  62. 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,
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.WsClient = void 0;
4
- const REFRESH_TIMEOUT = 5000;
4
+ const REFRESH_TIMEOUT = 5_000;
5
5
  class WsClient {
6
6
  getUrl;
7
7
  isDestroyed = false;
@@ -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
@@ -1,4 +1,5 @@
1
1
  import { arrayToUrl, isNullish, paramToUrl } from './internal/utils';
2
+ import { stripPosixDst } from './internal/posixTimeZone';
2
3
  import { sdCardWatchedStatuses, maxFpsResponseSchema, dateTimeinfoSchema, audioDeviceRequestSchema, audioSampleRatesResponseSchema, applicationSchema, timeZoneSchema, getPortsResponseSchema, guardTourSchema, ptzOverviewSchema, cameraPTZItemDataSchema, sdCardInfoSchema, ALL_APP_IDS, allDateTimeInfoSchema, } from './types/VapixAPI';
3
4
  import { ApplicationAPIError, MaxFPSError, NoDeviceInfoError, PtzNotSupportedError, ErrorWithResponse, SDCardActionError, SDCardJobError, SettingParameterError, TimezoneFetchError, } from './errors/errors';
4
5
  import { z } from 'zod';
@@ -156,13 +157,13 @@ export class VapixAPI extends BasicAPI {
156
157
  }
157
158
  catch (error) {
158
159
  console.warn('Could not retreive timezone from either API endpoints, reading param.cgi');
159
- const posixTimezone = (await this.getParameter('Time.POSIXTimeZone', options))['Time.POSIXTimeZone'];
160
- if (posixTimezone !== undefined) {
161
- return z.string().parse(posixTimezone);
162
- }
163
- else {
160
+ const params = await this.getParameter(['Time.POSIXTimeZone', 'Time.DST.Enabled'], options);
161
+ const posixTimezone = params['Time.POSIXTimeZone'];
162
+ if (posixTimezone === undefined) {
164
163
  throw error;
165
164
  }
165
+ const posix = z.string().parse(posixTimezone);
166
+ return params['Time.DST.Enabled'] === 'no' ? stripPosixDst(posix) : posix;
166
167
  }
167
168
  }
168
169
  async getAllDateTimeInfo(options) {
@@ -633,7 +634,7 @@ export class VapixAPI extends BasicAPI {
633
634
  headers: {
634
635
  contentType: 'application/octet-stream',
635
636
  },
636
- timeout: options?.timeout ?? 300000,
637
+ timeout: options?.timeout ?? 300_000,
637
638
  });
638
639
  if (!res.ok) {
639
640
  throw new ErrorWithResponse(res);
@@ -0,0 +1,2 @@
1
+ const POSIX_STANDARD_PART_REGEX = /^(<[^>]+>|[A-Za-z]{3,})[+-]?\d{1,2}(?::\d{2}){0,2}/;
2
+ export const stripPosixDst = (posix) => posix.match(POSIX_STANDARD_PART_REGEX)?.[0] ?? posix;
@@ -0,0 +1,21 @@
1
+ import { stripPosixDst } from './posixTimeZone';
2
+ import { describe, test, expect } from '@jest/globals';
3
+ describe('posixTimeZone', () => {
4
+ describe('stripPosixDst', () => {
5
+ test.each([
6
+ { name: 'Sydney', input: 'EST-10EST,M10.1.0,M4.1.0/3', expected: 'EST-10' },
7
+ { name: 'Honolulu', input: 'HAST10HADT,M3.2.0,M11.1.0', expected: 'HAST10' },
8
+ { name: 'Denver', input: 'MST7MDT,M3.2.0,M11.1.0', expected: 'MST7' },
9
+ { name: 'bracketed names', input: '<+10>-10<+11>,M10.1.0,M4.1.0/3', expected: '<+10>-10' },
10
+ { name: 'half-hour offset', input: 'CST-9:30CST,M10.1.0,M4.1.0/3', expected: 'CST-9:30' },
11
+ ])('removes the DST part for $name', ({ input, expected }) => {
12
+ expect(stripPosixDst(input)).toBe(expected);
13
+ });
14
+ test.each(['EST-10', 'HAST10', '<+10>-10', 'CST-9:30', 'UTC0'])('keeps DST-free input %s unchanged', (input) => {
15
+ expect(stripPosixDst(input)).toBe(input);
16
+ });
17
+ test('returns unparseable input unchanged', () => {
18
+ expect(stripPosixDst('garbage')).toBe('garbage');
19
+ });
20
+ });
21
+ });
@@ -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
- const nodeTimezone = Intl.DateTimeFormat().resolvedOptions().timeZone;
17
- if (systemTimezone !== nodeTimezone) {
16
+ if (systemTimezone !== '' && systemTimezone !== process.env.TZ) {
18
17
  process.env.TZ = systemTimezone;
19
18
  }
20
19
  }
@@ -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
  };
@@ -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 ?? 30000;
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,
@@ -1,4 +1,4 @@
1
- const REFRESH_TIMEOUT = 5000;
1
+ const REFRESH_TIMEOUT = 5_000;
2
2
  export class WsClient {
3
3
  getUrl;
4
4
  isDestroyed = false;
package/package.json CHANGED
@@ -1,16 +1,16 @@
1
1
  {
2
2
  "name": "camstreamerlib",
3
- "version": "5.0.0-5bbcf7f",
3
+ "version": "5.0.1-5fad3e0",
4
4
  "description": "Helper library for CamStreamer ACAP applications.",
5
5
  "prettier": "@camstreamer/prettier-config",
6
- "engine": {
7
- "node": ">=18.0.0"
6
+ "engines": {
7
+ "node": ">=18"
8
8
  },
9
9
  "dependencies": {
10
10
  "adm-zip": "^0.6.0",
11
- "eventemitter2": "^5.0.1",
11
+ "eventemitter2": "^6.4.9",
12
12
  "fast-xml-parser": "^5.3.6",
13
- "type-fest": "^4.41.0",
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.3.3",
34
+ "typescript": "^5.9.3",
36
35
  "typescript-eslint": "^8.71.2"
37
36
  },
38
37
  "overrides": {
@@ -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: z.core.$InferEnumOutput<{
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: z.core.$InferEnumOutput<{
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: z.core.$InferEnumOutput<{
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: z.core.$InferEnumOutput<{
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: z.core.$InferEnumOutput<{
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: z.core.$InferEnumOutput<{
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 | undefined, submitter?: HTMLElement | null | undefined): FormData;
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<z.core.$InferEnumOutput<{
220
- adsb: "adsb";
221
- remoteId: "remoteId";
222
- }>, {
218
+ getDomainList(options?: THttpRequestOptions): Promise<Partial<Record<"adsb" | "remoteId", {
223
219
  uiName: string;
224
- icon: z.core.$InferEnumOutput<{
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: z.core.$InferEnumOutput<{
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: z.core.$InferEnumOutput<{
282
- adsb: "adsb";
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: z.core.$InferEnumOutput<{
300
- adsb: "adsb";
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: z.core.$InferEnumOutput<{
317
- adsb: "adsb";
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: z.core.$InferEnumOutput<{
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: z.core.$InferEnumOutput<{
348
- all: "all";
349
- arrival: "arrival";
350
- departure: "departure";
351
- }>;
295
+ flightDirection: "all" | "arrival" | "departure";
352
296
  weight: number;
353
- perimeter: z.core.$InferEnumOutput<{
354
- none: "none";
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;
@@ -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 | undefined, submitter?: HTMLElement | null | undefined): FormData;
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: z.core.$InferEnumOutput<{
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: z.core.$InferEnumOutput<{
103
- open: "open";
104
- closed: "closed";
105
- }>;
97
+ state: "open" | "closed";
106
98
  configurable: boolean;
107
99
  usage: string;
108
- direction: z.core.$InferEnumOutput<{
109
- output: "output";
110
- input: "input";
111
- }>;
100
+ direction: "output" | "input";
112
101
  name: string;
113
- normalState: z.core.$InferEnumOutput<{
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>;
@@ -0,0 +1 @@
1
+ export declare const stripPosixDst: (posix: string) => string;
@@ -0,0 +1 @@
1
+ export {};
@@ -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<T>;
3
- export declare const toCamelCaseDeep: <T extends object>(o: T) => CamelCasedPropertiesDeep<T>;
4
- export declare const toSnakeCase: <T extends object>(o: T) => SnakeCasedProperties<T>;
5
- export declare const toSnakeCaseDeep: <T extends object>(o: T) => SnakeCasedPropertiesDeep<T>;
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 {
@@ -1,4 +1,3 @@
1
- /// <reference types="node" />
2
1
  import { EventEmitter } from 'events';
3
2
  import { CamOverlayDrawingAPI } from '../CamOverlayDrawingAPI';
4
3
  import { TAlign, TCairoCreateResponse, TUploadImageResponse } from '../../types/CamOverlayDrawingAPI';
@@ -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 | undefined>;
13
- font(moniker: string): Promise<TCairoCreateResponse | undefined>;
12
+ image(moniker: string): Promise<TUploadImageResponse>;
13
+ font(moniker: string): Promise<TCairoCreateResponse>;
14
14
  clear(): void;
15
15
  }
@@ -1,4 +1,3 @@
1
- /// <reference types="node" />
2
1
  import { EventEmitter } from 'events';
3
2
  import { Options } from '../internal/types';
4
3
  import { TCamScripterEvent, TEventDeclaration, TEventUndeclaration, TCamScripterResponse } from '../types/CamScripterAPICameraEventsGenerator';
@@ -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> {
@@ -1,5 +1,3 @@
1
- /// <reference types="node" />
2
- /// <reference types="node" />
3
1
  import { FormData as UndiciFormData, Response as UndiciResponse } from 'undici';
4
2
  export type HttpRequestOptions = {
5
3
  method?: string;
@@ -1,5 +1,3 @@
1
- /// <reference types="node" />
2
- /// <reference types="node" />
3
1
  import * as http from 'http';
4
2
  import { EventEmitter } from 'events';
5
3
  export type HttpServerOptions = {