camstreamerlib 4.0.0-beta.108 → 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/CamSwitcherAPI.d.ts +1 -1
- 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/types/CamStreamerAPI/CamStreamerAPI.js +2 -1
- package/esm/types/common.js +5 -0
- package/package.json +1 -1
- package/types/CamSwitcherAPI.d.ts +1 -1
- 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/CamSwitcherAPI.d.ts
CHANGED
|
@@ -23,9 +23,9 @@ export declare class CamSwitcherAPI<Client extends IClient<TResponse, any>> {
|
|
|
23
23
|
generateSilence(sampleRate: number, channels: TAudioChannel, options?: THttpRequestOptions): Promise<void>;
|
|
24
24
|
getMaxFps(source: number, options?: THttpRequestOptions): Promise<number>;
|
|
25
25
|
getStorageInfo(options?: THttpRequestOptions): Promise<{
|
|
26
|
+
size: number;
|
|
26
27
|
storage: "FLASH" | "SD_DISK";
|
|
27
28
|
writable: boolean;
|
|
28
|
-
size: number;
|
|
29
29
|
available: number;
|
|
30
30
|
}[]>;
|
|
31
31
|
wsAuthorization(options?: THttpRequestOptions): Promise<string>;
|
|
@@ -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
|
+
});
|
|
@@ -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
|
@@ -23,9 +23,9 @@ export declare class CamSwitcherAPI<Client extends IClient<TResponse, any>> {
|
|
|
23
23
|
generateSilence(sampleRate: number, channels: TAudioChannel, options?: THttpRequestOptions): Promise<void>;
|
|
24
24
|
getMaxFps(source: number, options?: THttpRequestOptions): Promise<number>;
|
|
25
25
|
getStorageInfo(options?: THttpRequestOptions): Promise<{
|
|
26
|
+
size: number;
|
|
26
27
|
storage: "FLASH" | "SD_DISK";
|
|
27
28
|
writable: boolean;
|
|
28
|
-
size: number;
|
|
29
29
|
available: number;
|
|
30
30
|
}[]>;
|
|
31
31
|
wsAuthorization(options?: THttpRequestOptions): Promise<string>;
|
|
@@ -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>;
|