camstreamerlib 4.0.0-beta.107 → 4.0.0-beta.109
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/cjs/CamOverlayAPI.d.ts +1 -0
- package/cjs/CamOverlayAPI.js +3 -0
- package/cjs/CamScripterAPI.d.ts +1 -0
- package/cjs/CamScripterAPI.js +3 -0
- package/cjs/CamStreamerAPI.d.ts +1 -0
- package/cjs/CamStreamerAPI.js +3 -0
- package/cjs/CamSwitcherAPI.d.ts +2 -1
- package/cjs/CamSwitcherAPI.js +3 -0
- package/cjs/PlaneTrackerAPI.d.ts +1 -0
- package/cjs/PlaneTrackerAPI.js +3 -0
- package/cjs/types/CamStreamerAPI/CamStreamerAPI.d.ts +2 -1
- package/cjs/types/CamStreamerAPI/CamStreamerAPI.js +2 -1
- package/cjs/types/CamSwitcherAPI.d.ts +2 -2
- package/cjs/types/common.d.ts +8 -0
- package/cjs/types/common.js +6 -1
- package/esm/CamOverlayAPI.js +3 -0
- package/esm/CamScripterAPI.js +3 -0
- package/esm/CamStreamerAPI.js +3 -0
- package/esm/CamSwitcherAPI.js +3 -0
- package/esm/PlaneTrackerAPI.js +3 -0
- package/esm/types/CamStreamerAPI/CamStreamerAPI.js +2 -1
- package/esm/types/common.js +5 -0
- package/package.json +1 -1
- package/types/CamOverlayAPI.d.ts +1 -0
- package/types/CamScripterAPI.d.ts +1 -0
- package/types/CamStreamerAPI.d.ts +1 -0
- package/types/CamSwitcherAPI.d.ts +2 -1
- package/types/PlaneTrackerAPI.d.ts +1 -0
- package/types/types/CamStreamerAPI/CamStreamerAPI.d.ts +2 -1
- package/types/types/CamSwitcherAPI.d.ts +2 -2
- package/types/types/common.d.ts +8 -0
package/cjs/CamOverlayAPI.d.ts
CHANGED
|
@@ -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;
|
package/cjs/CamOverlayAPI.js
CHANGED
|
@@ -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);
|
package/cjs/CamScripterAPI.d.ts
CHANGED
|
@@ -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;
|
package/cjs/CamScripterAPI.js
CHANGED
|
@@ -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;
|
package/cjs/CamStreamerAPI.d.ts
CHANGED
|
@@ -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>;
|
package/cjs/CamStreamerAPI.js
CHANGED
|
@@ -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) {
|
package/cjs/CamSwitcherAPI.d.ts
CHANGED
|
@@ -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;
|
|
@@ -22,9 +23,9 @@ export declare class CamSwitcherAPI<Client extends IClient<TResponse, any>> {
|
|
|
22
23
|
generateSilence(sampleRate: number, channels: TAudioChannel, options?: THttpRequestOptions): Promise<void>;
|
|
23
24
|
getMaxFps(source: number, options?: THttpRequestOptions): Promise<number>;
|
|
24
25
|
getStorageInfo(options?: THttpRequestOptions): Promise<{
|
|
26
|
+
size: number;
|
|
25
27
|
storage: "FLASH" | "SD_DISK";
|
|
26
28
|
writable: boolean;
|
|
27
|
-
size: number;
|
|
28
29
|
available: number;
|
|
29
30
|
}[]>;
|
|
30
31
|
wsAuthorization(options?: THttpRequestOptions): Promise<string>;
|
package/cjs/CamSwitcherAPI.js
CHANGED
|
@@ -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);
|
package/cjs/PlaneTrackerAPI.d.ts
CHANGED
|
@@ -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<{
|
package/cjs/PlaneTrackerAPI.js
CHANGED
|
@@ -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);
|
|
@@ -18,6 +18,7 @@ import { ibmSchema } from './ibmSchema';
|
|
|
18
18
|
import { microsoftAzureSchema } from './microsoftAzureSchema';
|
|
19
19
|
import { microsoftStreamSchema } from './microsoftStreamSchema';
|
|
20
20
|
import { gameChangerSchema } from './gameChangerSchema';
|
|
21
|
+
import { FileLike } from '../common';
|
|
21
22
|
export declare const streamSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
22
23
|
id: z.ZodNumber;
|
|
23
24
|
enabled: z.ZodBoolean;
|
|
@@ -14395,7 +14396,7 @@ export type TAudioFileList = z.infer<typeof audioFileListSchema>;
|
|
|
14395
14396
|
export type TFileToUpload = {
|
|
14396
14397
|
storage: TAudioFileStorageType;
|
|
14397
14398
|
name: string;
|
|
14398
|
-
file:
|
|
14399
|
+
file: FileLike | string | null;
|
|
14399
14400
|
};
|
|
14400
14401
|
export declare const audioUrlSchema: z.ZodObject<{
|
|
14401
14402
|
fileUrl: z.ZodString;
|
|
@@ -21,6 +21,7 @@ const ibmSchema_1 = require("./ibmSchema");
|
|
|
21
21
|
const microsoftAzureSchema_1 = require("./microsoftAzureSchema");
|
|
22
22
|
const microsoftStreamSchema_1 = require("./microsoftStreamSchema");
|
|
23
23
|
const gameChangerSchema_1 = require("./gameChangerSchema");
|
|
24
|
+
const common_1 = require("../common");
|
|
24
25
|
exports.streamSchema = zod_1.z.discriminatedUnion('type', [
|
|
25
26
|
facebookSchema_1.facebookSchema,
|
|
26
27
|
mpegDvbSchema_1.mpegDvbSchema,
|
|
@@ -147,7 +148,7 @@ exports.audioUrlSchema = zod_1.z.object({
|
|
|
147
148
|
storage: zod_1.z.literal('url'),
|
|
148
149
|
});
|
|
149
150
|
exports.audioLocalSchema = zod_1.z.object({
|
|
150
|
-
file:
|
|
151
|
+
file: common_1.fileSchema,
|
|
151
152
|
name: zod_1.z.string(),
|
|
152
153
|
storage: zod_1.z.enum(['flash', 'SD0']),
|
|
153
154
|
});
|
|
@@ -9,14 +9,14 @@ export declare const storageInfoListSchema: z.ZodArray<z.ZodObject<{
|
|
|
9
9
|
size: z.ZodNumber;
|
|
10
10
|
available: z.ZodNumber;
|
|
11
11
|
}, "strip", z.ZodTypeAny, {
|
|
12
|
+
size: number;
|
|
12
13
|
storage: "FLASH" | "SD_DISK";
|
|
13
14
|
writable: boolean;
|
|
14
|
-
size: number;
|
|
15
15
|
available: number;
|
|
16
16
|
}, {
|
|
17
|
+
size: number;
|
|
17
18
|
storage: "FLASH" | "SD_DISK";
|
|
18
19
|
writable: boolean;
|
|
19
|
-
size: number;
|
|
20
20
|
available: number;
|
|
21
21
|
}>, "many">;
|
|
22
22
|
export type TStorageInfo = z.infer<typeof storageInfoListSchema>[number];
|
package/cjs/types/common.d.ts
CHANGED
|
@@ -67,3 +67,11 @@ export declare const bitrateVapixParamsSchema: z.ZodObject<{
|
|
|
67
67
|
bitRateLimit: number;
|
|
68
68
|
}>;
|
|
69
69
|
export type TBitrateVapixParams = z.infer<typeof bitrateVapixParamsSchema>;
|
|
70
|
+
export type FileLike = typeof File extends {
|
|
71
|
+
prototype: infer T;
|
|
72
|
+
} ? T : {
|
|
73
|
+
name: string;
|
|
74
|
+
size: number;
|
|
75
|
+
type: string;
|
|
76
|
+
};
|
|
77
|
+
export declare const fileSchema: z.ZodType<File, z.ZodTypeDef, File>;
|
package/cjs/types/common.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.bitrateVapixParamsSchema = exports.bitrateModeSchema = exports.keyboardShortcutsSchema = exports.keyboardShortcutSchema = exports.networkCameraListSchema = exports.storageTypeSchema = exports.sdCardStorageTypeSchema = exports.flashStorageTypeSchema = exports.h264ProfileSchema = exports.audioChannelCountSchema = exports.audioChannelSchema = exports.booleanSchema = void 0;
|
|
3
|
+
exports.fileSchema = exports.bitrateVapixParamsSchema = exports.bitrateModeSchema = exports.keyboardShortcutsSchema = exports.keyboardShortcutSchema = exports.networkCameraListSchema = exports.storageTypeSchema = exports.sdCardStorageTypeSchema = exports.flashStorageTypeSchema = exports.h264ProfileSchema = exports.audioChannelCountSchema = exports.audioChannelSchema = exports.booleanSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
exports.booleanSchema = zod_1.z.union([zod_1.z.literal(0), zod_1.z.literal(1)]);
|
|
6
6
|
exports.audioChannelSchema = zod_1.z.union([zod_1.z.literal('mono'), zod_1.z.literal('stereo')]);
|
|
@@ -22,3 +22,8 @@ exports.bitrateVapixParamsSchema = zod_1.z.object({
|
|
|
22
22
|
retentionTime: zod_1.z.number(),
|
|
23
23
|
bitRateLimit: zod_1.z.number(),
|
|
24
24
|
});
|
|
25
|
+
exports.fileSchema = typeof File !== 'undefined'
|
|
26
|
+
? zod_1.z.instanceof(File)
|
|
27
|
+
: zod_1.z.custom((val) => {
|
|
28
|
+
return val !== null && typeof val === 'object' && 'name' in val && 'size' in val && 'type' in val;
|
|
29
|
+
});
|
package/esm/CamOverlayAPI.js
CHANGED
|
@@ -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);
|
package/esm/CamScripterAPI.js
CHANGED
|
@@ -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;
|
package/esm/CamStreamerAPI.js
CHANGED
|
@@ -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) {
|
package/esm/CamSwitcherAPI.js
CHANGED
|
@@ -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);
|
package/esm/PlaneTrackerAPI.js
CHANGED
|
@@ -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);
|
|
@@ -18,6 +18,7 @@ import { ibmSchema } from './ibmSchema';
|
|
|
18
18
|
import { microsoftAzureSchema } from './microsoftAzureSchema';
|
|
19
19
|
import { microsoftStreamSchema } from './microsoftStreamSchema';
|
|
20
20
|
import { gameChangerSchema } from './gameChangerSchema';
|
|
21
|
+
import { fileSchema } from '../common';
|
|
21
22
|
export const streamSchema = z.discriminatedUnion('type', [
|
|
22
23
|
facebookSchema,
|
|
23
24
|
mpegDvbSchema,
|
|
@@ -125,7 +126,7 @@ export const audioUrlSchema = z.object({
|
|
|
125
126
|
storage: z.literal('url'),
|
|
126
127
|
});
|
|
127
128
|
export const audioLocalSchema = z.object({
|
|
128
|
-
file:
|
|
129
|
+
file: fileSchema,
|
|
129
130
|
name: z.string(),
|
|
130
131
|
storage: z.enum(['flash', 'SD0']),
|
|
131
132
|
});
|
package/esm/types/common.js
CHANGED
|
@@ -19,3 +19,8 @@ export const bitrateVapixParamsSchema = z.object({
|
|
|
19
19
|
retentionTime: z.number(),
|
|
20
20
|
bitRateLimit: z.number(),
|
|
21
21
|
});
|
|
22
|
+
export const fileSchema = typeof File !== 'undefined'
|
|
23
|
+
? z.instanceof(File)
|
|
24
|
+
: z.custom((val) => {
|
|
25
|
+
return val !== null && typeof val === 'object' && 'name' in val && 'size' in val && 'type' in val;
|
|
26
|
+
});
|
package/package.json
CHANGED
package/types/CamOverlayAPI.d.ts
CHANGED
|
@@ -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;
|
|
@@ -22,9 +23,9 @@ export declare class CamSwitcherAPI<Client extends IClient<TResponse, any>> {
|
|
|
22
23
|
generateSilence(sampleRate: number, channels: TAudioChannel, options?: THttpRequestOptions): Promise<void>;
|
|
23
24
|
getMaxFps(source: number, options?: THttpRequestOptions): Promise<number>;
|
|
24
25
|
getStorageInfo(options?: THttpRequestOptions): Promise<{
|
|
26
|
+
size: number;
|
|
25
27
|
storage: "FLASH" | "SD_DISK";
|
|
26
28
|
writable: boolean;
|
|
27
|
-
size: number;
|
|
28
29
|
available: number;
|
|
29
30
|
}[]>;
|
|
30
31
|
wsAuthorization(options?: THttpRequestOptions): Promise<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<{
|
|
@@ -18,6 +18,7 @@ import { ibmSchema } from './ibmSchema';
|
|
|
18
18
|
import { microsoftAzureSchema } from './microsoftAzureSchema';
|
|
19
19
|
import { microsoftStreamSchema } from './microsoftStreamSchema';
|
|
20
20
|
import { gameChangerSchema } from './gameChangerSchema';
|
|
21
|
+
import { FileLike } from '../common';
|
|
21
22
|
export declare const streamSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
22
23
|
id: z.ZodNumber;
|
|
23
24
|
enabled: z.ZodBoolean;
|
|
@@ -14395,7 +14396,7 @@ export type TAudioFileList = z.infer<typeof audioFileListSchema>;
|
|
|
14395
14396
|
export type TFileToUpload = {
|
|
14396
14397
|
storage: TAudioFileStorageType;
|
|
14397
14398
|
name: string;
|
|
14398
|
-
file:
|
|
14399
|
+
file: FileLike | string | null;
|
|
14399
14400
|
};
|
|
14400
14401
|
export declare const audioUrlSchema: z.ZodObject<{
|
|
14401
14402
|
fileUrl: z.ZodString;
|
|
@@ -9,14 +9,14 @@ export declare const storageInfoListSchema: z.ZodArray<z.ZodObject<{
|
|
|
9
9
|
size: z.ZodNumber;
|
|
10
10
|
available: z.ZodNumber;
|
|
11
11
|
}, "strip", z.ZodTypeAny, {
|
|
12
|
+
size: number;
|
|
12
13
|
storage: "FLASH" | "SD_DISK";
|
|
13
14
|
writable: boolean;
|
|
14
|
-
size: number;
|
|
15
15
|
available: number;
|
|
16
16
|
}, {
|
|
17
|
+
size: number;
|
|
17
18
|
storage: "FLASH" | "SD_DISK";
|
|
18
19
|
writable: boolean;
|
|
19
|
-
size: number;
|
|
20
20
|
available: number;
|
|
21
21
|
}>, "many">;
|
|
22
22
|
export type TStorageInfo = z.infer<typeof storageInfoListSchema>[number];
|
package/types/types/common.d.ts
CHANGED
|
@@ -67,3 +67,11 @@ export declare const bitrateVapixParamsSchema: z.ZodObject<{
|
|
|
67
67
|
bitRateLimit: number;
|
|
68
68
|
}>;
|
|
69
69
|
export type TBitrateVapixParams = z.infer<typeof bitrateVapixParamsSchema>;
|
|
70
|
+
export type FileLike = typeof File extends {
|
|
71
|
+
prototype: infer T;
|
|
72
|
+
} ? T : {
|
|
73
|
+
name: string;
|
|
74
|
+
size: number;
|
|
75
|
+
type: string;
|
|
76
|
+
};
|
|
77
|
+
export declare const fileSchema: z.ZodType<File, z.ZodTypeDef, File>;
|