camstreamerlib 4.0.0-beta.12 → 4.0.0-beta.14

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.
@@ -1,7 +1,7 @@
1
1
  import { IClient, TResponse } from './internal/types';
2
2
  import { TNodeState, TPackageInfoList, TStorage, TStorageType } from './types/CamScripterAPI';
3
3
  import { TNetworkCamera } from './types/common';
4
- export declare class CamOverlayAPI<Client extends IClient<TResponse> = IClient<TResponse>> {
4
+ export declare class CamScripterAPI<Client extends IClient<TResponse> = IClient<TResponse>> {
5
5
  client: Client;
6
6
  constructor(client: Client);
7
7
  checkCameraTime(): Promise<boolean>;
@@ -1,10 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.CamOverlayAPI = void 0;
3
+ exports.CamScripterAPI = void 0;
4
4
  const utils_1 = require("./internal/utils");
5
5
  const CamScripterAPI_1 = require("./types/CamScripterAPI");
6
6
  const common_1 = require("./types/common");
7
- class CamOverlayAPI {
7
+ class CamScripterAPI {
8
8
  client;
9
9
  constructor(client) {
10
10
  this.client = client;
@@ -61,4 +61,4 @@ class CamOverlayAPI {
61
61
  }
62
62
  }
63
63
  }
64
- exports.CamOverlayAPI = CamOverlayAPI;
64
+ exports.CamScripterAPI = CamScripterAPI;
package/cjs/VapixAPI.js CHANGED
@@ -192,17 +192,11 @@ class VapixAPI {
192
192
  }
193
193
  async fetchRemoteDeviceInfo(payload, proxy = null) {
194
194
  const res = await this.postJson(proxy, '/axis-cgi/basicdeviceinfo.cgi', payload);
195
- const textXml = await res.text();
196
- const parser = new fast_xml_parser_1.XMLParser({
197
- ignoreAttributes: false,
198
- attributeNamePrefix: '',
199
- allowBooleanAttributes: true,
200
- });
201
- const result = parser.parse(textXml);
202
- if ((0, utils_1.isNullish)(result.body.data)) {
195
+ const json = await res.json();
196
+ if ((0, utils_1.isNullish)(json.data)) {
203
197
  throw new errors_1.NoDeviceInfoError();
204
198
  }
205
- return result.data;
199
+ return json.data;
206
200
  }
207
201
  async getHeaders(proxy = null) {
208
202
  const data = { apiVersion: '1.0', method: 'list' };
package/cjs/index.d.ts CHANGED
@@ -7,6 +7,8 @@ export { CamSwitcherAPI } from './CamSwitcherAPI';
7
7
  export { CamSwitcherEvents } from './CamSwitcherEvents';
8
8
  export { VapixAPI } from './VapixAPI';
9
9
  export { CamOverlayAPI } from './CamOverlayAPI';
10
+ export { CamScripterAPI } from './CamScripterAPI';
11
+ export { CamStreamerAPI } from './CamStreamerAPI';
10
12
  export * from './types/CamSwitcherEvents';
11
13
  export * from './types/CamSwitcherAPI';
12
14
  export * from './types/VapixAPI';
package/cjs/index.js CHANGED
@@ -14,7 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- exports.CamOverlayAPI = exports.VapixAPI = exports.CamSwitcherEvents = exports.CamSwitcherAPI = void 0;
17
+ exports.CamStreamerAPI = exports.CamScripterAPI = exports.CamOverlayAPI = exports.VapixAPI = exports.CamSwitcherEvents = exports.CamSwitcherAPI = void 0;
18
18
  __exportStar(require("./internal/types"), exports);
19
19
  __exportStar(require("./internal/constants"), exports);
20
20
  __exportStar(require("./internal/utils"), exports);
@@ -28,6 +28,10 @@ var VapixAPI_1 = require("./VapixAPI");
28
28
  Object.defineProperty(exports, "VapixAPI", { enumerable: true, get: function () { return VapixAPI_1.VapixAPI; } });
29
29
  var CamOverlayAPI_1 = require("./CamOverlayAPI");
30
30
  Object.defineProperty(exports, "CamOverlayAPI", { enumerable: true, get: function () { return CamOverlayAPI_1.CamOverlayAPI; } });
31
+ var CamScripterAPI_1 = require("./CamScripterAPI");
32
+ Object.defineProperty(exports, "CamScripterAPI", { enumerable: true, get: function () { return CamScripterAPI_1.CamScripterAPI; } });
33
+ var CamStreamerAPI_1 = require("./CamStreamerAPI");
34
+ Object.defineProperty(exports, "CamStreamerAPI", { enumerable: true, get: function () { return CamStreamerAPI_1.CamStreamerAPI; } });
31
35
  __exportStar(require("./types/CamSwitcherEvents"), exports);
32
36
  __exportStar(require("./types/CamSwitcherAPI"), exports);
33
37
  __exportStar(require("./types/VapixAPI"), exports);
@@ -1,7 +1,7 @@
1
1
  import { IClient, TResponse } from './internal/types';
2
2
  import { TNodeState, TPackageInfoList, TStorage, TStorageType } from './types/CamScripterAPI';
3
3
  import { TNetworkCamera } from './types/common';
4
- export declare class CamOverlayAPI<Client extends IClient<TResponse> = IClient<TResponse>> {
4
+ export declare class CamScripterAPI<Client extends IClient<TResponse> = IClient<TResponse>> {
5
5
  client: Client;
6
6
  constructor(client: Client);
7
7
  checkCameraTime(): Promise<boolean>;
@@ -1,7 +1,7 @@
1
1
  import { responseStringify } from './internal/utils';
2
2
  import { packageInfoListSchema, storageSchema, } from './types/CamScripterAPI';
3
3
  import { networkCameraListSchema } from './types/common';
4
- export class CamOverlayAPI {
4
+ export class CamScripterAPI {
5
5
  client;
6
6
  constructor(client) {
7
7
  this.client = client;
package/esm/VapixAPI.js CHANGED
@@ -189,17 +189,11 @@ export class VapixAPI {
189
189
  }
190
190
  async fetchRemoteDeviceInfo(payload, proxy = null) {
191
191
  const res = await this.postJson(proxy, '/axis-cgi/basicdeviceinfo.cgi', payload);
192
- const textXml = await res.text();
193
- const parser = new XMLParser({
194
- ignoreAttributes: false,
195
- attributeNamePrefix: '',
196
- allowBooleanAttributes: true,
197
- });
198
- const result = parser.parse(textXml);
199
- if (isNullish(result.body.data)) {
192
+ const json = await res.json();
193
+ if (isNullish(json.data)) {
200
194
  throw new NoDeviceInfoError();
201
195
  }
202
- return result.data;
196
+ return json.data;
203
197
  }
204
198
  async getHeaders(proxy = null) {
205
199
  const data = { apiVersion: '1.0', method: 'list' };
package/esm/index.d.ts CHANGED
@@ -7,6 +7,8 @@ export { CamSwitcherAPI } from './CamSwitcherAPI';
7
7
  export { CamSwitcherEvents } from './CamSwitcherEvents';
8
8
  export { VapixAPI } from './VapixAPI';
9
9
  export { CamOverlayAPI } from './CamOverlayAPI';
10
+ export { CamScripterAPI } from './CamScripterAPI';
11
+ export { CamStreamerAPI } from './CamStreamerAPI';
10
12
  export * from './types/CamSwitcherEvents';
11
13
  export * from './types/CamSwitcherAPI';
12
14
  export * from './types/VapixAPI';
package/esm/index.js CHANGED
@@ -7,6 +7,8 @@ export { CamSwitcherAPI } from './CamSwitcherAPI';
7
7
  export { CamSwitcherEvents } from './CamSwitcherEvents';
8
8
  export { VapixAPI } from './VapixAPI';
9
9
  export { CamOverlayAPI } from './CamOverlayAPI';
10
+ export { CamScripterAPI } from './CamScripterAPI';
11
+ export { CamStreamerAPI } from './CamStreamerAPI';
10
12
  export * from './types/CamSwitcherEvents';
11
13
  export * from './types/CamSwitcherAPI';
12
14
  export * from './types/VapixAPI';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "camstreamerlib",
3
- "version": "4.0.0-beta.12",
3
+ "version": "4.0.0-beta.14",
4
4
  "description": "Helper library for CamStreamer ACAP applications.",
5
5
  "prettier": "@camstreamer/prettier-config",
6
6
  "dependencies": {