camstreamerlib 4.0.0-beta.107 → 4.0.0-beta.108

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.
@@ -9,6 +9,7 @@ export declare class CamOverlayAPI<Client extends IClient<TResponse, any>> {
9
9
  static getProxyPath: () => string;
10
10
  static getFilePreviewPath: (path: string) => string;
11
11
  getClient(proxyParams?: TProxyParams): Client | ProxyClient<Client>;
12
+ checkAPIAvailable(options?: THttpRequestOptions): Promise<void>;
12
13
  checkCameraTime(options?: THttpRequestOptions): Promise<boolean>;
13
14
  getNetworkCameraList(options?: THttpRequestOptions): Promise<{
14
15
  name: string;
@@ -19,6 +19,9 @@ class CamOverlayAPI {
19
19
  getClient(proxyParams) {
20
20
  return proxyParams ? new ProxyClient_1.ProxyClient(this.client, proxyParams) : this.client;
21
21
  }
22
+ async checkAPIAvailable(options) {
23
+ await this._getJson(`${BASE_PATH}/api_check.cgi`, undefined, options);
24
+ }
22
25
  async checkCameraTime(options) {
23
26
  const res = await this._getJson(`${BASE_PATH}/camera_time.cgi`, undefined, options);
24
27
  return zod_1.z.boolean().parse(res.state);
@@ -6,6 +6,7 @@ export declare class CamScripterAPI<Client extends IClient<TResponse, any>> {
6
6
  constructor(client: Client);
7
7
  static getProxyPath: () => string;
8
8
  getClient(proxyParams?: TProxyParams): Client | ProxyClient<Client>;
9
+ checkAPIAvailable(options?: THttpRequestOptions): Promise<void>;
9
10
  checkCameraTime(options?: THttpRequestOptions): Promise<boolean>;
10
11
  getNetworkCameraList(options?: THttpRequestOptions): Promise<{
11
12
  name: string;
@@ -15,6 +15,9 @@ class CamScripterAPI {
15
15
  getClient(proxyParams) {
16
16
  return proxyParams ? new ProxyClient_1.ProxyClient(this.client, proxyParams) : this.client;
17
17
  }
18
+ async checkAPIAvailable(options) {
19
+ await this._getJson(`${BASE_PATH}/api_check.cgi`, undefined, options);
20
+ }
18
21
  async checkCameraTime(options) {
19
22
  const res = await this._getJson(`${BASE_PATH}/camera_time.cgi`, undefined, options);
20
23
  return CamScripterAPI_1.cameraTimeResponseSchema.parse(res).state;
@@ -9,6 +9,7 @@ export declare class CamStreamerAPI<Client extends IClient<TResponse, any>> {
9
9
  static getProxyPath: () => string;
10
10
  static getWsEventsPath: () => string;
11
11
  getClient(proxyParams?: TProxyParams): Client | ProxyClient<Client>;
12
+ checkAPIAvailable(options?: THttpRequestOptions): Promise<void>;
12
13
  wsAuthorization(options?: THttpRequestOptions): Promise<string>;
13
14
  getUtcTime(options?: THttpRequestOptions): Promise<number>;
14
15
  getMaxFps(source?: number, options?: THttpRequestOptions): Promise<any>;
@@ -18,6 +18,9 @@ class CamStreamerAPI {
18
18
  getClient(proxyParams) {
19
19
  return proxyParams ? new ProxyClient_1.ProxyClient(this.client, proxyParams) : this.client;
20
20
  }
21
+ async checkAPIAvailable(options) {
22
+ await this._getJson(`${BASE_PATH}/api_check.cgi`, undefined, options);
23
+ }
21
24
  async wsAuthorization(options) {
22
25
  const res = await this._getJson(`${BASE_PATH}/ws_authorization.cgi`, undefined, options);
23
26
  if (res.status !== 200) {
@@ -14,6 +14,7 @@ export declare class CamSwitcherAPI<Client extends IClient<TResponse, any>> {
14
14
  static getWsEventsPath: () => string;
15
15
  static getClipPreviewPath: (clipId: string, storage: TStorageType) => string;
16
16
  getClient(proxyParams?: TProxyParams): Client | ProxyClient<Client>;
17
+ checkAPIAvailable(options?: THttpRequestOptions): Promise<void>;
17
18
  checkCameraTime(options?: THttpRequestOptions): Promise<boolean>;
18
19
  getNetworkCameraList(options?: THttpRequestOptions): Promise<{
19
20
  name: string;
@@ -25,6 +25,9 @@ class CamSwitcherAPI {
25
25
  getClient(proxyParams) {
26
26
  return proxyParams ? new ProxyClient_1.ProxyClient(this.client, proxyParams) : this.client;
27
27
  }
28
+ async checkAPIAvailable(options) {
29
+ await this._getJson(`${BASE_PATH}/api_check.cgi`, undefined, options);
30
+ }
28
31
  async checkCameraTime(options) {
29
32
  const res = await this._getJson(`${BASE_PATH}/camera_time.cgi`, undefined, options);
30
33
  return zod_1.z.boolean().parse(res.data);
@@ -9,6 +9,7 @@ export declare class PlaneTrackerAPI<Client extends IClient<TResponse, any>> {
9
9
  static getProxyPath: () => string;
10
10
  static getWsEventsPath: () => string;
11
11
  getClient(proxyParams?: TProxyParams): Client | ProxyClient<Client>;
12
+ checkAPIAvailable(options?: THttpRequestOptions): Promise<void>;
12
13
  checkCameraTime(options?: THttpRequestOptions): Promise<boolean>;
13
14
  serverRunCheck(options?: THttpRequestOptions): Promise<TResponse>;
14
15
  getLiveViewAlias(rtspUrl: string, options?: THttpRequestOptions): Promise<{
@@ -20,6 +20,9 @@ class PlaneTrackerAPI {
20
20
  getClient(proxyParams) {
21
21
  return proxyParams ? new ProxyClient_1.ProxyClient(this.client, proxyParams) : this.client;
22
22
  }
23
+ async checkAPIAvailable(options) {
24
+ await this._getJson(`${BASE_PATH}/api_check.cgi`, undefined, options);
25
+ }
23
26
  async checkCameraTime(options) {
24
27
  const res = await this._getJson(`${BASE_PATH}/camera_time.cgi`, undefined, options);
25
28
  return zod_1.z.boolean().parse(res.state);
@@ -16,6 +16,9 @@ export class CamOverlayAPI {
16
16
  getClient(proxyParams) {
17
17
  return proxyParams ? new ProxyClient(this.client, proxyParams) : this.client;
18
18
  }
19
+ async checkAPIAvailable(options) {
20
+ await this._getJson(`${BASE_PATH}/api_check.cgi`, undefined, options);
21
+ }
19
22
  async checkCameraTime(options) {
20
23
  const res = await this._getJson(`${BASE_PATH}/camera_time.cgi`, undefined, options);
21
24
  return z.boolean().parse(res.state);
@@ -12,6 +12,9 @@ export class CamScripterAPI {
12
12
  getClient(proxyParams) {
13
13
  return proxyParams ? new ProxyClient(this.client, proxyParams) : this.client;
14
14
  }
15
+ async checkAPIAvailable(options) {
16
+ await this._getJson(`${BASE_PATH}/api_check.cgi`, undefined, options);
17
+ }
15
18
  async checkCameraTime(options) {
16
19
  const res = await this._getJson(`${BASE_PATH}/camera_time.cgi`, undefined, options);
17
20
  return cameraTimeResponseSchema.parse(res).state;
@@ -15,6 +15,9 @@ export class CamStreamerAPI {
15
15
  getClient(proxyParams) {
16
16
  return proxyParams ? new ProxyClient(this.client, proxyParams) : this.client;
17
17
  }
18
+ async checkAPIAvailable(options) {
19
+ await this._getJson(`${BASE_PATH}/api_check.cgi`, undefined, options);
20
+ }
18
21
  async wsAuthorization(options) {
19
22
  const res = await this._getJson(`${BASE_PATH}/ws_authorization.cgi`, undefined, options);
20
23
  if (res.status !== 200) {
@@ -22,6 +22,9 @@ export class CamSwitcherAPI {
22
22
  getClient(proxyParams) {
23
23
  return proxyParams ? new ProxyClient(this.client, proxyParams) : this.client;
24
24
  }
25
+ async checkAPIAvailable(options) {
26
+ await this._getJson(`${BASE_PATH}/api_check.cgi`, undefined, options);
27
+ }
25
28
  async checkCameraTime(options) {
26
29
  const res = await this._getJson(`${BASE_PATH}/camera_time.cgi`, undefined, options);
27
30
  return z.boolean().parse(res.data);
@@ -17,6 +17,9 @@ export class PlaneTrackerAPI {
17
17
  getClient(proxyParams) {
18
18
  return proxyParams ? new ProxyClient(this.client, proxyParams) : this.client;
19
19
  }
20
+ async checkAPIAvailable(options) {
21
+ await this._getJson(`${BASE_PATH}/api_check.cgi`, undefined, options);
22
+ }
20
23
  async checkCameraTime(options) {
21
24
  const res = await this._getJson(`${BASE_PATH}/camera_time.cgi`, undefined, options);
22
25
  return z.boolean().parse(res.state);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "camstreamerlib",
3
- "version": "4.0.0-beta.107",
3
+ "version": "4.0.0-beta.108",
4
4
  "description": "Helper library for CamStreamer ACAP applications.",
5
5
  "prettier": "@camstreamer/prettier-config",
6
6
  "engine": {
@@ -9,6 +9,7 @@ export declare class CamOverlayAPI<Client extends IClient<TResponse, any>> {
9
9
  static getProxyPath: () => string;
10
10
  static getFilePreviewPath: (path: string) => string;
11
11
  getClient(proxyParams?: TProxyParams): Client | ProxyClient<Client>;
12
+ checkAPIAvailable(options?: THttpRequestOptions): Promise<void>;
12
13
  checkCameraTime(options?: THttpRequestOptions): Promise<boolean>;
13
14
  getNetworkCameraList(options?: THttpRequestOptions): Promise<{
14
15
  name: string;
@@ -6,6 +6,7 @@ export declare class CamScripterAPI<Client extends IClient<TResponse, any>> {
6
6
  constructor(client: Client);
7
7
  static getProxyPath: () => string;
8
8
  getClient(proxyParams?: TProxyParams): Client | ProxyClient<Client>;
9
+ checkAPIAvailable(options?: THttpRequestOptions): Promise<void>;
9
10
  checkCameraTime(options?: THttpRequestOptions): Promise<boolean>;
10
11
  getNetworkCameraList(options?: THttpRequestOptions): Promise<{
11
12
  name: string;
@@ -9,6 +9,7 @@ export declare class CamStreamerAPI<Client extends IClient<TResponse, any>> {
9
9
  static getProxyPath: () => string;
10
10
  static getWsEventsPath: () => string;
11
11
  getClient(proxyParams?: TProxyParams): Client | ProxyClient<Client>;
12
+ checkAPIAvailable(options?: THttpRequestOptions): Promise<void>;
12
13
  wsAuthorization(options?: THttpRequestOptions): Promise<string>;
13
14
  getUtcTime(options?: THttpRequestOptions): Promise<number>;
14
15
  getMaxFps(source?: number, options?: THttpRequestOptions): Promise<any>;
@@ -14,6 +14,7 @@ export declare class CamSwitcherAPI<Client extends IClient<TResponse, any>> {
14
14
  static getWsEventsPath: () => string;
15
15
  static getClipPreviewPath: (clipId: string, storage: TStorageType) => string;
16
16
  getClient(proxyParams?: TProxyParams): Client | ProxyClient<Client>;
17
+ checkAPIAvailable(options?: THttpRequestOptions): Promise<void>;
17
18
  checkCameraTime(options?: THttpRequestOptions): Promise<boolean>;
18
19
  getNetworkCameraList(options?: THttpRequestOptions): Promise<{
19
20
  name: string;
@@ -9,6 +9,7 @@ export declare class PlaneTrackerAPI<Client extends IClient<TResponse, any>> {
9
9
  static getProxyPath: () => string;
10
10
  static getWsEventsPath: () => string;
11
11
  getClient(proxyParams?: TProxyParams): Client | ProxyClient<Client>;
12
+ checkAPIAvailable(options?: THttpRequestOptions): Promise<void>;
12
13
  checkCameraTime(options?: THttpRequestOptions): Promise<boolean>;
13
14
  serverRunCheck(options?: THttpRequestOptions): Promise<TResponse>;
14
15
  getLiveViewAlias(rtspUrl: string, options?: THttpRequestOptions): Promise<{