camstreamerlib 4.0.37 → 5.0.0-20ab5c4

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 (130) hide show
  1. package/README.md +39 -2
  2. package/cjs/CamOverlayAPI.d.ts +204 -204
  3. package/cjs/CamStreamerAPI.d.ts +311 -311
  4. package/cjs/CamStreamerAPI.js +1 -1
  5. package/cjs/CamSwitcherAPI.d.ts +32 -31
  6. package/cjs/CamSwitcherAPI.js +2 -0
  7. package/cjs/PlaneTrackerAPI.d.ts +25 -28
  8. package/cjs/VapixAPI.d.ts +15 -15
  9. package/cjs/VapixAPI.js +2 -2
  10. package/cjs/bin/CreatePackage.js +17 -7
  11. package/cjs/internal/transformers.d.ts +4 -4
  12. package/cjs/internal/utils.js +3 -3
  13. package/cjs/internal/versionCompare.d.ts +2 -2
  14. package/cjs/node/CamOverlayDrawingAPI.d.ts +0 -3
  15. package/cjs/node/CamOverlayPainter/Frame.d.ts +0 -1
  16. package/cjs/node/CamOverlayPainter/ResourceManager.d.ts +2 -2
  17. package/cjs/node/CamOverlayPainter/ResourceManager.js +17 -7
  18. package/cjs/node/CamScripterAPICameraEventsGenerator.d.ts +0 -1
  19. package/cjs/node/DefaultClient.d.ts +0 -2
  20. package/cjs/node/Digest.js +17 -7
  21. package/cjs/node/HttpRequestSender.d.ts +0 -2
  22. package/cjs/node/HttpRequestSender.test.js +17 -7
  23. package/cjs/node/HttpServer.d.ts +0 -2
  24. package/cjs/node/HttpServer.js +17 -7
  25. package/cjs/node/VapixEvents.js +1 -1
  26. package/cjs/node/WsClient.js +1 -1
  27. package/cjs/types/CamOverlayAPI/CamOverlayAPI.d.ts +320 -4097
  28. package/cjs/types/CamOverlayAPI/CamOverlayAPI.js +2 -2
  29. package/cjs/types/CamOverlayAPI/accuweatherSchema.d.ts +12 -67
  30. package/cjs/types/CamOverlayAPI/customGraphicsSchema.d.ts +40 -572
  31. package/cjs/types/CamOverlayAPI/htmlOverlaySchema.d.ts +6 -59
  32. package/cjs/types/CamOverlayAPI/htmlOverlaySchema.js +1 -1
  33. package/cjs/types/CamOverlayAPI/imagesSchema.d.ts +6 -75
  34. package/cjs/types/CamOverlayAPI/infotickerSchema.d.ts +11 -74
  35. package/cjs/types/CamOverlayAPI/pipSchema.d.ts +12 -97
  36. package/cjs/types/CamOverlayAPI/pipSchema.js +2 -2
  37. package/cjs/types/CamOverlayAPI/ptzCompassSchema.d.ts +12 -71
  38. package/cjs/types/CamOverlayAPI/ptzCompassSchema.js +1 -1
  39. package/cjs/types/CamOverlayAPI/ptzSchema.d.ts +8 -99
  40. package/cjs/types/CamOverlayAPI/scoreBoardSchema.d.ts +20 -254
  41. package/cjs/types/CamOverlayAPI/screenSharingSchema.d.ts +5 -43
  42. package/cjs/types/CamOverlayAPI/serviceCommonTypes.d.ts +15 -94
  43. package/cjs/types/CamOverlayAPI/webCameraSharingSchema.d.ts +5 -43
  44. package/cjs/types/CamScripterAPI.d.ts +11 -81
  45. package/cjs/types/CamStreamerAPI/CamStreamerAPI.d.ts +1095 -24193
  46. package/cjs/types/CamStreamerAPI/facebookSchema.d.ts +32 -509
  47. package/cjs/types/CamStreamerAPI/oldStreamSchema.d.ts +8 -143
  48. package/cjs/types/CamStreamerAPI/streamCommonTypes.d.ts +32 -493
  49. package/cjs/types/CamStreamerAPI/streamsSchema.d.ts +425 -7786
  50. package/cjs/types/CamStreamerAPI/windySchema.d.ts +36 -476
  51. package/cjs/types/CamStreamerAPI/youtubeSchema.d.ts +32 -487
  52. package/cjs/types/CamStreamerAPI/youtubeSchema.js +1 -1
  53. package/cjs/types/CamSwitcherAPI.d.ts +75 -700
  54. package/cjs/types/CamSwitcherAPI.js +1 -0
  55. package/cjs/types/GenetecAgent.d.ts +12 -132
  56. package/cjs/types/MilestoneAgent.d.ts +4 -46
  57. package/cjs/types/PlaneTrackerAPI.d.ts +265 -1205
  58. package/cjs/types/PlaneTrackerAPI.js +5 -5
  59. package/cjs/types/VapixAPI.d.ts +129 -1653
  60. package/cjs/types/VapixAPI.js +1 -1
  61. package/cjs/types/common.d.ts +11 -35
  62. package/cjs/types/common.js +1 -1
  63. package/cjs/types/ws/CamOverlayEvents.d.ts +9 -69
  64. package/cjs/types/ws/CamStreamerEvents.d.ts +19 -217
  65. package/cjs/types/ws/CamSwitcherEvents.d.ts +46 -452
  66. package/cjs/types/ws/PlaneTrackerEvents.d.ts +361 -3522
  67. package/cjs/types/ws/PlaneTrackerEvents.js +1 -1
  68. package/cjs/web/WsClient.js +1 -1
  69. package/esm/CamStreamerAPI.js +1 -1
  70. package/esm/CamSwitcherAPI.js +2 -0
  71. package/esm/VapixAPI.js +2 -2
  72. package/esm/node/VapixEvents.js +1 -1
  73. package/esm/node/WsClient.js +1 -1
  74. package/esm/types/CamOverlayAPI/CamOverlayAPI.js +2 -2
  75. package/esm/types/CamOverlayAPI/htmlOverlaySchema.js +1 -1
  76. package/esm/types/CamOverlayAPI/pipSchema.js +2 -2
  77. package/esm/types/CamOverlayAPI/ptzCompassSchema.js +1 -1
  78. package/esm/types/CamStreamerAPI/youtubeSchema.js +1 -1
  79. package/esm/types/CamSwitcherAPI.js +1 -0
  80. package/esm/types/PlaneTrackerAPI.js +5 -5
  81. package/esm/types/VapixAPI.js +1 -1
  82. package/esm/types/common.js +1 -1
  83. package/esm/types/ws/PlaneTrackerEvents.js +1 -1
  84. package/esm/web/WsClient.js +1 -1
  85. package/package.json +106 -107
  86. package/types/CamOverlayAPI.d.ts +204 -204
  87. package/types/CamStreamerAPI.d.ts +311 -311
  88. package/types/CamSwitcherAPI.d.ts +32 -31
  89. package/types/PlaneTrackerAPI.d.ts +25 -28
  90. package/types/VapixAPI.d.ts +15 -15
  91. package/types/internal/transformers.d.ts +4 -4
  92. package/types/internal/versionCompare.d.ts +2 -2
  93. package/types/node/CamOverlayDrawingAPI.d.ts +0 -3
  94. package/types/node/CamOverlayPainter/Frame.d.ts +0 -1
  95. package/types/node/CamOverlayPainter/ResourceManager.d.ts +2 -2
  96. package/types/node/CamScripterAPICameraEventsGenerator.d.ts +0 -1
  97. package/types/node/DefaultClient.d.ts +0 -2
  98. package/types/node/HttpRequestSender.d.ts +0 -2
  99. package/types/node/HttpServer.d.ts +0 -2
  100. package/types/types/CamOverlayAPI/CamOverlayAPI.d.ts +320 -4097
  101. package/types/types/CamOverlayAPI/accuweatherSchema.d.ts +12 -67
  102. package/types/types/CamOverlayAPI/customGraphicsSchema.d.ts +40 -572
  103. package/types/types/CamOverlayAPI/htmlOverlaySchema.d.ts +6 -59
  104. package/types/types/CamOverlayAPI/imagesSchema.d.ts +6 -75
  105. package/types/types/CamOverlayAPI/infotickerSchema.d.ts +11 -74
  106. package/types/types/CamOverlayAPI/pipSchema.d.ts +12 -97
  107. package/types/types/CamOverlayAPI/ptzCompassSchema.d.ts +12 -71
  108. package/types/types/CamOverlayAPI/ptzSchema.d.ts +8 -99
  109. package/types/types/CamOverlayAPI/scoreBoardSchema.d.ts +20 -254
  110. package/types/types/CamOverlayAPI/screenSharingSchema.d.ts +5 -43
  111. package/types/types/CamOverlayAPI/serviceCommonTypes.d.ts +15 -94
  112. package/types/types/CamOverlayAPI/webCameraSharingSchema.d.ts +5 -43
  113. package/types/types/CamScripterAPI.d.ts +11 -81
  114. package/types/types/CamStreamerAPI/CamStreamerAPI.d.ts +1095 -24193
  115. package/types/types/CamStreamerAPI/facebookSchema.d.ts +32 -509
  116. package/types/types/CamStreamerAPI/oldStreamSchema.d.ts +8 -143
  117. package/types/types/CamStreamerAPI/streamCommonTypes.d.ts +32 -493
  118. package/types/types/CamStreamerAPI/streamsSchema.d.ts +425 -7786
  119. package/types/types/CamStreamerAPI/windySchema.d.ts +36 -476
  120. package/types/types/CamStreamerAPI/youtubeSchema.d.ts +32 -487
  121. package/types/types/CamSwitcherAPI.d.ts +75 -700
  122. package/types/types/GenetecAgent.d.ts +12 -132
  123. package/types/types/MilestoneAgent.d.ts +4 -46
  124. package/types/types/PlaneTrackerAPI.d.ts +265 -1205
  125. package/types/types/VapixAPI.d.ts +129 -1653
  126. package/types/types/common.d.ts +11 -35
  127. package/types/types/ws/CamOverlayEvents.d.ts +9 -69
  128. package/types/types/ws/CamStreamerEvents.d.ts +19 -217
  129. package/types/types/ws/CamSwitcherEvents.d.ts +46 -452
  130. package/types/types/ws/PlaneTrackerEvents.d.ts +361 -3522
@@ -101,7 +101,7 @@ class CamStreamerAPI extends BasicAPI_1.BasicAPI {
101
101
  if (newStream.success) {
102
102
  return newStream.data;
103
103
  }
104
- const oldStream = oldStreamSchema_1.oldStringStreamSchema.passthrough().parse(res.data);
104
+ const oldStream = oldStreamSchema_1.oldStringStreamSchema.loose().parse(res.data);
105
105
  throw new errors_1.MigrationError([], [{ streamId, ...(0, exports.parseCameraStreamResponse)(oldStream) }], [], []);
106
106
  }
107
107
  async setStream(streamId, streamData, options) {
@@ -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;
@@ -21,27 +21,27 @@ export declare class CamSwitcherAPI<Client extends IClient<TResponse, any>> exte
21
21
  generateSilence(sampleRate: number, channels: TAudioChannel, options?: THttpRequestOptions): Promise<void>;
22
22
  getMaxFps(source: number, options?: THttpRequestOptions): Promise<number>;
23
23
  getStorageInfo(options?: THttpRequestOptions): Promise<{
24
- size: number;
25
24
  storage: "FLASH" | "SD_DISK";
26
25
  writable: boolean;
26
+ size: number;
27
27
  available: number;
28
28
  }[]>;
29
29
  wsAuthorization(options?: THttpRequestOptions): Promise<string>;
30
30
  getOutputInfo(options?: THttpRequestOptions): Promise<{
31
+ rtspUrl: string;
31
32
  ws: string;
32
33
  wsInitialMessage: string;
33
- rtspUrl: string;
34
34
  }>;
35
35
  getAudioPushInfo(options?: THttpRequestOptions): Promise<{
36
36
  ws: string;
37
37
  wsInitialMessage: string;
38
38
  }>;
39
39
  getStreamSaveList(options?: THttpRequestOptions): Promise<Record<string, {
40
- ip?: string | undefined;
41
- enabled?: boolean | undefined;
42
- port?: number | undefined;
43
40
  niceName?: string | undefined;
41
+ ip?: string | undefined;
44
42
  mdnsName?: string | undefined;
43
+ port?: number | undefined;
44
+ enabled?: boolean | undefined;
45
45
  auth?: string | undefined;
46
46
  query?: string | undefined;
47
47
  channel?: "video" | "audio" | "av" | undefined;
@@ -56,57 +56,57 @@ export declare class CamSwitcherAPI<Client extends IClient<TResponse, any>> exte
56
56
  sortIndexOverview?: number | undefined;
57
57
  }>>;
58
58
  getPlaylistSaveList(options?: THttpRequestOptions): Promise<Record<string, {
59
- niceName?: string | undefined;
60
59
  channel?: "video" | "audio" | "av" | undefined;
61
- keyboard?: Record<string, string | null> | undefined;
62
- sortIndexOverview?: number | undefined;
63
60
  isFavourite?: boolean | undefined;
61
+ keyboard?: Record<string, string | null> | undefined;
62
+ niceName?: string | undefined;
64
63
  sortIndexFavourite?: number | undefined;
64
+ sortIndexOverview?: number | undefined;
65
65
  play_type?: "PLAY_ALL" | "PLAY_ALL_LOOP" | "PLAY_ALL_SHUFFLED" | "PLAY_ALL_LOOP_SHUFFLED" | "PLAY_ONE_RANDOM" | undefined;
66
66
  default?: boolean | undefined;
67
67
  stream_list?: {
68
+ id: string;
69
+ isTimeoutCustom: boolean;
70
+ ptz_preset_pos_name: string;
68
71
  repeat: number;
72
+ timeout: number;
69
73
  video: {
70
- storage?: "FLASH" | "SD_DISK" | undefined;
71
74
  stream_name?: string | undefined;
72
75
  clip_name?: string | undefined;
73
76
  tracker_name?: string | undefined;
77
+ storage?: "FLASH" | "SD_DISK" | undefined;
74
78
  };
75
- id: string;
76
- isTimeoutCustom: boolean;
77
- ptz_preset_pos_name: string;
78
- timeout: number;
79
79
  audio?: {
80
- storage?: "FLASH" | "SD_DISK" | undefined;
81
80
  stream_name?: string | undefined;
82
81
  clip_name?: string | undefined;
83
82
  tracker_name?: string | undefined;
83
+ storage?: "FLASH" | "SD_DISK" | undefined;
84
84
  } | undefined;
85
85
  }[] | undefined;
86
86
  }>>;
87
87
  getTrackerSaveList(options?: THttpRequestOptions): Promise<Record<string, {
88
- name?: string | undefined;
89
- fps?: number | undefined;
90
88
  id?: string | undefined;
91
- width?: number | undefined;
92
- height?: number | undefined;
89
+ name?: string | undefined;
90
+ previewId?: string | undefined;
93
91
  duration?: number | undefined;
94
- channel?: "video" | "audio" | "av" | undefined;
95
92
  keyboard?: Record<string, string | null> | undefined;
93
+ channel?: "video" | "audio" | "av" | undefined;
96
94
  sortIndexOverview?: number | undefined;
97
- viewNumber?: number | undefined;
98
- previewId?: string | undefined;
95
+ width?: number | undefined;
96
+ height?: number | undefined;
97
+ fps?: number | undefined;
99
98
  motion_history_frames?: number | undefined;
100
99
  include_zone?: number[][] | undefined;
101
100
  include_node_ids?: string[] | undefined;
102
101
  camera_list?: {
103
- name: string;
104
102
  id: string;
103
+ name: string;
105
104
  overview: boolean;
106
105
  zone: number[];
107
106
  playlist_name: string;
108
107
  ptz_preset_pos_no: number;
109
108
  }[] | undefined;
109
+ viewNumber?: number | undefined;
110
110
  camera_view_number?: number | undefined;
111
111
  }>>;
112
112
  setStreamSaveList(data: TStreamSaveList, options?: THttpRequestOptions): Promise<void>;
@@ -125,13 +125,13 @@ export declare class CamSwitcherAPI<Client extends IClient<TResponse, any>> exte
125
125
  duration: number;
126
126
  stream_list: ({
127
127
  type: "video";
128
- fps: number;
129
128
  width: number;
130
129
  height: number;
131
130
  sample_rate: number;
132
131
  h264_profile: "high" | "main" | "baseline";
133
132
  h264_level: "4.1";
134
133
  gop: number;
134
+ fps: number;
135
135
  bitrate: number;
136
136
  } | {
137
137
  type: "audio";
@@ -145,22 +145,23 @@ export declare class CamSwitcherAPI<Client extends IClient<TResponse, any>> exte
145
145
  setDefaultPlaylist(playlistId: string, options?: THttpRequestOptions): Promise<void>;
146
146
  setPermanentRtspUrlToken(token: string, options?: THttpRequestOptions): Promise<void>;
147
147
  getCamSwitchOptions(options?: THttpRequestOptions): Promise<{
148
- resolution?: string | undefined;
149
- compression?: number | undefined;
150
148
  bitrateMode?: "VBR" | "MBR" | "ABR" | undefined;
151
149
  maximumBitRate?: number | undefined;
152
150
  retentionTime?: number | undefined;
153
151
  bitRateLimit?: number | undefined;
152
+ resolution?: string | undefined;
153
+ h264Profile?: "high" | "main" | "baseline" | undefined;
154
154
  fps?: number | undefined;
155
+ compression?: number | undefined;
155
156
  govLength?: number | undefined;
156
- h264Profile?: "high" | "main" | "baseline" | undefined;
157
- keyboard?: {
158
- none: string | null;
159
- fromSource: string | null;
160
- } | undefined;
161
157
  bitrateVapixParams?: string | null | undefined;
162
158
  audioSampleRate?: number | undefined;
163
159
  audioChannelCount?: 1 | 2 | undefined;
160
+ audioBitrate?: number | undefined;
161
+ keyboard?: {
162
+ fromSource: string | null;
163
+ none: string | null;
164
+ } | undefined;
164
165
  } | undefined>;
165
166
  getGlobalAudioSettings(options?: THttpRequestOptions): Promise<{
166
167
  type: "source" | "fromSource";
@@ -156,6 +156,7 @@ class CamSwitcherAPI extends BasicAPI_1.BasicAPI {
156
156
  audio: {
157
157
  sampleRate: data.audioSampleRate,
158
158
  channelCount: data.audioChannelCount,
159
+ bitrate: data.audioBitrate,
159
160
  },
160
161
  keyboard: data.keyboard,
161
162
  };
@@ -207,6 +208,7 @@ class CamSwitcherAPI extends BasicAPI_1.BasicAPI {
207
208
  const settings = {
208
209
  audioSampleRate: saveData.audio?.sampleRate,
209
210
  audioChannelCount: saveData.audio?.channelCount,
211
+ audioBitrate: saveData.audio?.bitrate,
210
212
  keyboard: saveData.keyboard,
211
213
  fps: saveData.video.fps,
212
214
  resolution: saveData.video.resolution,
@@ -20,23 +20,23 @@ export declare class PlaneTrackerAPI<Client extends IClient<TResponse, any>> ext
20
20
  resetFocusCalibration(options?: THttpRequestOptions): Promise<void>;
21
21
  triggerFocusReview(options?: THttpRequestOptions): Promise<void>;
22
22
  fetchCameraSettings(options?: THttpRequestOptions): Promise<{
23
- camera: {
24
- ip: string;
25
- port: number;
26
- pass: string;
27
- user: string;
28
- protocol: "https" | "http" | "https_insecure";
29
- };
30
23
  units: "metric" | "imperial";
31
24
  adsbSource: {
32
- ip: string;
33
25
  enabled: boolean;
26
+ ip: string;
34
27
  port: number;
35
28
  useSystemTime: boolean;
36
29
  };
37
30
  dronetagSource: {
38
31
  enabled: boolean;
39
32
  };
33
+ camera: {
34
+ protocol: "https" | "http" | "https_insecure";
35
+ ip: string;
36
+ port: number;
37
+ user: string;
38
+ pass: string;
39
+ };
40
40
  cameraCalibrationProcessConfig: {
41
41
  nightSkyCalibrationEnabled: boolean;
42
42
  scheduleNightSkyCalibrationTimestamp: number;
@@ -86,21 +86,21 @@ export declare class PlaneTrackerAPI<Client extends IClient<TResponse, any>> ext
86
86
  };
87
87
  widget: {
88
88
  enabled: boolean;
89
- scale: number;
90
- units: "rotate" | "metric" | "imperial";
91
89
  coord: "top_left" | "top_right" | "bottom_left" | "bottom_right";
92
90
  posX: number;
93
91
  posY: number;
92
+ scale: number;
93
+ units: "rotate" | "metric" | "imperial";
94
94
  };
95
95
  airportWidget: {
96
96
  enabled: boolean;
97
- scale: number;
98
- weatherLocationName: string;
99
97
  coord: "top_left" | "top_right" | "bottom_left" | "bottom_right";
100
98
  posX: number;
101
99
  posY: number;
100
+ scale: number;
102
101
  showWeather: boolean;
103
102
  weatherLocationKey: string;
103
+ weatherLocationName: string;
104
104
  windSpeedUnits: "rotate" | "metric" | "imperial";
105
105
  temperatureUnits: "rotate" | "metric" | "imperial";
106
106
  };
@@ -111,10 +111,10 @@ export declare class PlaneTrackerAPI<Client extends IClient<TResponse, any>> ext
111
111
  validateFlights: boolean;
112
112
  };
113
113
  radarcapeFlightInfoSource: {
114
- ip: string;
115
114
  enabled: boolean;
116
- port: number;
117
115
  priority: number;
116
+ ip: string;
117
+ port: number;
118
118
  };
119
119
  identificationLabel: {
120
120
  aircraft: {
@@ -142,22 +142,22 @@ export declare class PlaneTrackerAPI<Client extends IClient<TResponse, any>> ext
142
142
  };
143
143
  };
144
144
  acs: {
145
+ protocol: "https" | "http" | "https_insecure";
145
146
  ip: string;
146
- enabled: boolean;
147
147
  port: number;
148
- pass: string;
149
148
  user: string;
150
- protocol: "https" | "http" | "https_insecure";
149
+ pass: string;
150
+ enabled: boolean;
151
151
  sourceKey: string;
152
152
  };
153
153
  milestone: {
154
+ protocol: "https" | "http" | "https_insecure";
154
155
  ip: string;
155
- enabled: boolean;
156
156
  port: number;
157
- cameraList: string[];
158
- pass: string;
159
157
  user: string;
160
- protocol: "https" | "http" | "https_insecure";
158
+ pass: string;
159
+ enabled: boolean;
160
+ cameraList: string[];
161
161
  };
162
162
  camstreamerIntegration: {
163
163
  adPlacementEnabled: boolean;
@@ -230,9 +230,9 @@ export declare class PlaneTrackerAPI<Client extends IClient<TResponse, any>> ext
230
230
  iata?: string | undefined;
231
231
  city?: string | undefined;
232
232
  };
233
- registration?: string | undefined;
234
233
  callsign?: string | undefined;
235
234
  flightNumber?: string | undefined;
235
+ registration?: string | undefined;
236
236
  aircraftType?: string | undefined;
237
237
  airlines?: string | undefined;
238
238
  originAirport?: {
@@ -256,10 +256,10 @@ export declare class PlaneTrackerAPI<Client extends IClient<TResponse, any>> ext
256
256
  getIcao(by: TGetIcaoByOption, value: string, options?: THttpRequestOptions): Promise<string>;
257
257
  getPriorityList(options?: THttpRequestOptions): Promise<{
258
258
  list: {
259
- priority: number;
260
259
  domain: "adsb" | "remoteId";
261
260
  idType: "icao" | "type_icao" | "drone_mac" | "operator_mac" | "category";
262
261
  idValue: string;
262
+ priority: number;
263
263
  }[];
264
264
  }>;
265
265
  setPriorityList(priorityList: TPriorityList, options?: THttpRequestOptions): Promise<void>;
@@ -288,13 +288,10 @@ export declare class PlaneTrackerAPI<Client extends IClient<TResponse, any>> ext
288
288
  getZones(options?: THttpRequestOptions): Promise<{
289
289
  zones: {
290
290
  enabled: boolean;
291
- area: [{
291
+ area: {
292
292
  lat: number;
293
293
  lon: number;
294
- }, ...{
295
- lat: number;
296
- lon: number;
297
- }[]];
294
+ }[];
298
295
  flightDirection: "all" | "arrival" | "departure";
299
296
  weight: number;
300
297
  perimeter: "none" | "outer" | "inner";
package/cjs/VapixAPI.d.ts CHANGED
@@ -5,7 +5,7 @@ import { BasicAPI } from './internal/BasicAPI';
5
5
  export declare class VapixAPI<Client extends IClient<TResponse, any>> extends BasicAPI<Client> {
6
6
  private CustomFormData;
7
7
  constructor(client: Client, CustomFormData?: {
8
- new (form?: HTMLFormElement | undefined, submitter?: HTMLElement | null | undefined): FormData;
8
+ new (form?: HTMLFormElement, submitter?: HTMLElement | null): FormData;
9
9
  prototype: FormData;
10
10
  });
11
11
  postUrlEncoded(path: string, parameters?: TParameters, headers?: Record<string, string>, options?: THttpRequestOptions): Promise<TResponse>;
@@ -57,34 +57,34 @@ export declare class VapixAPI<Client extends IClient<TResponse, any>> extends Ba
57
57
  getParameter(paramNames: string | string[], options?: THttpRequestOptions): Promise<Record<string, string>>;
58
58
  setParameter(params: Record<string, string | number | boolean>, options?: THttpRequestOptions): Promise<void>;
59
59
  getGuardTourList(options?: THttpRequestOptions): Promise<{
60
- name: string;
61
60
  id: string;
61
+ camNbr: unknown;
62
+ name: string;
63
+ randomEnabled: unknown;
62
64
  running: string;
65
+ timeBetweenSequences: unknown;
63
66
  tour: {
64
- position?: unknown;
65
- moveSpeed?: unknown;
66
- presetNbr?: unknown;
67
- waitTime?: unknown;
68
- waitTimeViewType?: unknown;
67
+ moveSpeed: unknown;
68
+ position: unknown;
69
+ presetNbr: unknown;
70
+ waitTime: unknown;
71
+ waitTimeViewType: unknown;
69
72
  }[];
70
- camNbr?: unknown;
71
- randomEnabled?: unknown;
72
- timeBetweenSequences?: unknown;
73
73
  }>;
74
74
  setGuardTourEnabled(guardTourId: string, enable: boolean, options?: THttpRequestOptions): Promise<void>;
75
75
  getPTZPresetList(channel: number, options?: THttpRequestOptions): Promise<string[]>;
76
76
  listPTZ(camera: number, options?: THttpRequestOptions): Promise<{
77
77
  name: string;
78
+ id: number;
78
79
  data: {
79
80
  pan?: number | undefined;
80
81
  tilt?: number | undefined;
81
82
  zoom?: number | undefined;
82
83
  };
83
- id: number;
84
84
  }[]>;
85
85
  listPtzVideoSourceOverview(options?: THttpRequestOptions): Promise<Record<number, {
86
- name: string;
87
86
  id: number;
87
+ name: string;
88
88
  }[]>>;
89
89
  goToPreset(channel: number, presetName: string, options?: THttpRequestOptions): Promise<void>;
90
90
  getPtzPosition(camera: number, options?: THttpRequestOptions): Promise<{
@@ -93,12 +93,12 @@ export declare class VapixAPI<Client extends IClient<TResponse, any>> extends Ba
93
93
  zoom?: number | undefined;
94
94
  }>;
95
95
  getPorts(options?: THttpRequestOptions): Promise<{
96
- name: string;
97
96
  port: string;
98
- direction: "output" | "input";
99
97
  state: "open" | "closed";
100
98
  configurable: boolean;
101
99
  usage: string;
100
+ direction: "output" | "input";
101
+ name: string;
102
102
  normalState: "open" | "closed";
103
103
  readonly?: boolean | undefined;
104
104
  }[]>;
@@ -108,9 +108,9 @@ export declare class VapixAPI<Client extends IClient<TResponse, any>> extends Ba
108
108
  getCameraUsers(options?: THttpRequestOptions): Promise<string[]>;
109
109
  editCameraUser(username: string, pass: string, options?: THttpRequestOptions): Promise<void>;
110
110
  getRecordingRuleList(options?: THttpRequestOptions): Promise<{
111
- options: Record<string, string>;
112
111
  diskid: string;
113
112
  eventid: string;
113
+ options: Record<string, string>;
114
114
  profile: string;
115
115
  }[]>;
116
116
  addRecordingRule(params: Record<string, string>, options?: THttpRequestOptions): Promise<string | null>;
package/cjs/VapixAPI.js CHANGED
@@ -199,7 +199,7 @@ class VapixAPI extends BasicAPI_1.BasicAPI {
199
199
  async getHeaders(options) {
200
200
  const data = { apiVersion: '1.0', method: 'list' };
201
201
  const res = await this._postJsonEncoded('/axis-cgi/customhttpheader.cgi', data, undefined, options);
202
- return zod_1.z.object({ data: zod_1.z.record(zod_1.z.string()) }).parse(await res.json()).data;
202
+ return zod_1.z.object({ data: zod_1.z.record(zod_1.z.string(), zod_1.z.string()) }).parse(await res.json()).data;
203
203
  }
204
204
  async setHeaders(headers, options) {
205
205
  const data = { apiVersion: '1.0', method: 'set', params: headers };
@@ -636,7 +636,7 @@ class VapixAPI extends BasicAPI_1.BasicAPI {
636
636
  headers: {
637
637
  contentType: 'application/octet-stream',
638
638
  },
639
- timeout: options?.timeout ?? 300000,
639
+ timeout: options?.timeout ?? 300_000,
640
640
  });
641
641
  if (!res.ok) {
642
642
  throw new errors_1.ErrorWithResponse(res);
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
15
15
  }) : function(o, v) {
16
16
  o["default"] = v;
17
17
  });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
25
35
  var __importDefault = (this && this.__importDefault) || function (mod) {
26
36
  return (mod && mod.__esModule) ? mod : { "default": mod };
27
37
  };
@@ -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,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isNullish = exports.pad = exports.isLoopPlayType = exports.isPlaylist = exports.isTracker = exports.isClip = exports.isStream = exports.isCamera = exports.arrayToUrl = exports.paramToUrl = exports.addParametersToPath = void 0;
3
+ exports.isLoopPlayType = exports.isPlaylist = exports.isTracker = exports.isClip = exports.isStream = exports.isCamera = exports.arrayToUrl = exports.paramToUrl = exports.addParametersToPath = void 0;
4
+ exports.pad = pad;
5
+ exports.isNullish = isNullish;
4
6
  const addParametersToPath = (path, params) => {
5
7
  if (params === undefined || Object.keys(params).length === 0) {
6
8
  return path;
@@ -51,8 +53,6 @@ function pad(num, size) {
51
53
  .join('0')
52
54
  .slice(-size));
53
55
  }
54
- exports.pad = pad;
55
56
  function isNullish(value) {
56
57
  return value === null || value === undefined;
57
58
  }
58
- exports.isNullish = isNullish;
@@ -1,6 +1,6 @@
1
1
  export declare const assertVersionString: (s: string, msg?: string) => void;
2
2
  export declare const isFirmwareVersionAtLeast: (version: string, compareVersion: string) => boolean;
3
3
  export declare const isVersionAtLeast: (version: string, compareVersion: string) => boolean;
4
- export declare const firmwareVersionCompare: (a: string, b: string) => 1 | 0 | -1;
5
- export declare const versionCompare: (a: string, b: string) => 1 | 0 | -1;
4
+ export declare const firmwareVersionCompare: (a: string, b: string) => 0 | 1 | -1;
5
+ export declare const versionCompare: (a: string, b: string) => 0 | 1 | -1;
6
6
  export declare const fixVersionToDots: (version: string) => string;
@@ -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
  }
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
15
15
  }) : function(o, v) {
16
16
  o["default"] = v;
17
17
  });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
25
35
  Object.defineProperty(exports, "__esModule", { value: true });
26
36
  exports.ResourceManager = void 0;
27
37
  const fs = __importStar(require("fs/promises"));
@@ -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> {
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
15
15
  }) : function(o, v) {
16
16
  o["default"] = v;
17
17
  });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
25
35
  Object.defineProperty(exports, "__esModule", { value: true });
26
36
  exports.Digest = void 0;
27
37
  const crypto = __importStar(require("crypto"));
@@ -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;
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
15
15
  }) : function(o, v) {
16
16
  o["default"] = v;
17
17
  });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
25
35
  Object.defineProperty(exports, "__esModule", { value: true });
26
36
  const http = __importStar(require("http"));
27
37
  const undici_1 = require("undici");
@@ -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 = {