camstreamerlib 4.0.0-beta.105 → 4.0.0-beta.107
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 +5 -12
- package/cjs/CamOverlayAPI.js +2 -2
- package/cjs/CamStreamerAPI.d.ts +22 -4
- package/cjs/types/CamOverlayAPI/CamOverlayAPI.d.ts +293 -12
- package/cjs/types/CamOverlayAPI/CamOverlayAPI.js +50 -11
- package/cjs/types/CamStreamerAPI/CamStreamerAPI.d.ts +105 -20
- package/cjs/types/CamStreamerAPI/gameChangerSchema.d.ts +19 -0
- package/cjs/types/CamStreamerAPI/gameChangerSchema.js +2 -2
- package/cjs/types/CamStreamerAPI/index.d.ts +1 -0
- package/cjs/types/CamStreamerAPI/index.js +1 -0
- package/cjs/types/CamStreamerAPI/mpegDvbSchema.d.ts +3 -3
- package/cjs/types/CamStreamerAPI/mpegDvbSchema.js +1 -1
- package/cjs/types/CamStreamerAPI/rtmpSchema.d.ts +313 -1
- package/cjs/types/CamStreamerAPI/rtmpSchema.js +8 -3
- package/cjs/types/CamStreamerAPI/youtubeSchema.d.ts +3 -3
- package/cjs/types/CamStreamerAPI/youtubeSchema.js +1 -1
- package/esm/CamOverlayAPI.js +3 -3
- package/esm/types/CamOverlayAPI/CamOverlayAPI.js +44 -10
- package/esm/types/CamStreamerAPI/gameChangerSchema.js +2 -2
- package/esm/types/CamStreamerAPI/index.js +1 -0
- package/esm/types/CamStreamerAPI/mpegDvbSchema.js +1 -1
- package/esm/types/CamStreamerAPI/rtmpSchema.js +7 -2
- package/esm/types/CamStreamerAPI/youtubeSchema.js +1 -1
- package/package.json +1 -1
- package/types/CamOverlayAPI.d.ts +5 -12
- package/types/CamStreamerAPI.d.ts +22 -4
- package/types/types/CamOverlayAPI/CamOverlayAPI.d.ts +293 -12
- package/types/types/CamStreamerAPI/CamStreamerAPI.d.ts +105 -20
- package/types/types/CamStreamerAPI/gameChangerSchema.d.ts +19 -0
- package/types/types/CamStreamerAPI/index.d.ts +1 -0
- package/types/types/CamStreamerAPI/mpegDvbSchema.d.ts +3 -3
- package/types/types/CamStreamerAPI/rtmpSchema.d.ts +313 -1
- package/types/types/CamStreamerAPI/youtubeSchema.d.ts +3 -3
package/cjs/CamOverlayAPI.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { IClient, TBlobResponse, TResponse } from './internal/types';
|
|
2
2
|
import { THttpRequestOptions, TProxyParams } from './types/common';
|
|
3
3
|
import { ProxyClient } from './internal/ProxyClient';
|
|
4
|
-
import { ImageType, TCoordinates, TField, TFile, TFileType, TFileStorageType, TService } from './types/CamOverlayAPI';
|
|
4
|
+
import { ImageType, TCoordinates, TField, TFile, TFileType, TFileStorageType, TService, TFileList, TStorageDataList } from './types/CamOverlayAPI';
|
|
5
5
|
export declare class CamOverlayAPI<Client extends IClient<TResponse, any>> {
|
|
6
6
|
private client;
|
|
7
7
|
constructor(client: Client);
|
|
@@ -16,17 +16,10 @@ export declare class CamOverlayAPI<Client extends IClient<TResponse, any>> {
|
|
|
16
16
|
}[]>;
|
|
17
17
|
wsAuthorization(options?: THttpRequestOptions): Promise<string>;
|
|
18
18
|
getMjpegStreamImage(mjpegUrl: string, options?: THttpRequestOptions): Promise<TBlobResponse<Client>>;
|
|
19
|
-
listFiles(fileType:
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
}[]>;
|
|
24
|
-
uploadFile(fileType: TFileType, formData: Parameters<Client['post']>[0]['data'], storage: TFileStorageType, options?: THttpRequestOptions): Promise<void>;
|
|
25
|
-
removeFile(fileType: TFileType, fileParams: TFile, options?: THttpRequestOptions): Promise<void>;
|
|
26
|
-
getFileStorage(fileType: TFileType, options?: THttpRequestOptions): Promise<{
|
|
27
|
-
type: "url" | "flash" | "SD0" | "ftp" | "samba";
|
|
28
|
-
state: string;
|
|
29
|
-
}[]>;
|
|
19
|
+
listFiles<T extends TFileType>(fileType: T, options?: THttpRequestOptions): Promise<TFileList<T>>;
|
|
20
|
+
uploadFile<T extends TFileType>(fileType: T, formData: Parameters<Client['post']>[0]['data'], storage: TFileStorageType<T>, options?: THttpRequestOptions): Promise<void>;
|
|
21
|
+
removeFile<T extends TFileType>(fileType: T, fileParams: TFile<T>, options?: THttpRequestOptions): Promise<void>;
|
|
22
|
+
getFileStorage<T extends TFileType>(fileType: T, options?: THttpRequestOptions): Promise<TStorageDataList<T>>;
|
|
30
23
|
getFilePreviewFromCamera(path: string, options?: THttpRequestOptions): Promise<TBlobResponse<Client>>;
|
|
31
24
|
updateInfoticker(serviceId: number, text: string, options?: THttpRequestOptions): Promise<void>;
|
|
32
25
|
setEnabled(serviceId: number, enabled: boolean, options?: THttpRequestOptions): Promise<void>;
|
package/cjs/CamOverlayAPI.js
CHANGED
|
@@ -36,7 +36,7 @@ class CamOverlayAPI {
|
|
|
36
36
|
}
|
|
37
37
|
async listFiles(fileType, options) {
|
|
38
38
|
const res = await this._getJson(`${BASE_PATH}/upload_${fileType}.cgi`, { action: 'list' }, options);
|
|
39
|
-
return CamOverlayAPI_1.
|
|
39
|
+
return (0, CamOverlayAPI_1.getFileListSchema)(fileType).parse(res.list);
|
|
40
40
|
}
|
|
41
41
|
async uploadFile(fileType, formData, storage, options) {
|
|
42
42
|
await this._post(`${BASE_PATH}/upload_${fileType}.cgi`, formData, {
|
|
@@ -55,7 +55,7 @@ class CamOverlayAPI {
|
|
|
55
55
|
if (res.code !== 200) {
|
|
56
56
|
throw new errors_1.StorageDataFetchError(res);
|
|
57
57
|
}
|
|
58
|
-
return CamOverlayAPI_1.
|
|
58
|
+
return (0, CamOverlayAPI_1.getStorageDataListSchema)(fileType).parse(res.list);
|
|
59
59
|
}
|
|
60
60
|
async getFilePreviewFromCamera(path, options) {
|
|
61
61
|
return await this._getBlob(CamOverlayAPI.getFilePreviewPath(path), undefined, options);
|
package/cjs/CamStreamerAPI.d.ts
CHANGED
|
@@ -132,7 +132,7 @@ export declare class CamStreamerAPI<Client extends IClient<TResponse, any>> {
|
|
|
132
132
|
providerName: string;
|
|
133
133
|
serviceName: string;
|
|
134
134
|
statusCameraLed: boolean;
|
|
135
|
-
statusCameraOutput: string;
|
|
135
|
+
statusCameraOutput: string | null;
|
|
136
136
|
saveToSdCard: boolean;
|
|
137
137
|
} | {
|
|
138
138
|
type: "rtmp";
|
|
@@ -187,6 +187,9 @@ export declare class CamStreamerAPI<Client extends IClient<TResponse, any>> {
|
|
|
187
187
|
isActive: boolean;
|
|
188
188
|
}[];
|
|
189
189
|
};
|
|
190
|
+
statusCameraLed: boolean;
|
|
191
|
+
statusCameraOutput: string | null;
|
|
192
|
+
saveToSdCard: boolean;
|
|
190
193
|
outputUrl: string;
|
|
191
194
|
streamKey: string;
|
|
192
195
|
streamIdentifier?: string | undefined;
|
|
@@ -350,7 +353,7 @@ export declare class CamStreamerAPI<Client extends IClient<TResponse, any>> {
|
|
|
350
353
|
}[];
|
|
351
354
|
};
|
|
352
355
|
statusCameraLed: boolean;
|
|
353
|
-
statusCameraOutput: string;
|
|
356
|
+
statusCameraOutput: string | null;
|
|
354
357
|
saveToSdCard: boolean;
|
|
355
358
|
tags: string[];
|
|
356
359
|
streamPrivacy: "public" | "unlisted" | "private";
|
|
@@ -1052,6 +1055,12 @@ export declare class CamStreamerAPI<Client extends IClient<TResponse, any>> {
|
|
|
1052
1055
|
isActive: boolean;
|
|
1053
1056
|
}[];
|
|
1054
1057
|
};
|
|
1058
|
+
statusCameraLed: boolean;
|
|
1059
|
+
statusCameraOutput: string | null;
|
|
1060
|
+
saveToSdCard: boolean;
|
|
1061
|
+
outputUrl: string;
|
|
1062
|
+
streamKey: string;
|
|
1063
|
+
streamIdentifier?: string | undefined;
|
|
1055
1064
|
})[]>;
|
|
1056
1065
|
setStreamList(streamList: TStreamList['streamList'], options?: THttpRequestOptions): Promise<void>;
|
|
1057
1066
|
getStream(streamId: number, options?: THttpRequestOptions): Promise<{
|
|
@@ -1174,7 +1183,7 @@ export declare class CamStreamerAPI<Client extends IClient<TResponse, any>> {
|
|
|
1174
1183
|
providerName: string;
|
|
1175
1184
|
serviceName: string;
|
|
1176
1185
|
statusCameraLed: boolean;
|
|
1177
|
-
statusCameraOutput: string;
|
|
1186
|
+
statusCameraOutput: string | null;
|
|
1178
1187
|
saveToSdCard: boolean;
|
|
1179
1188
|
} | {
|
|
1180
1189
|
type: "rtmp";
|
|
@@ -1229,6 +1238,9 @@ export declare class CamStreamerAPI<Client extends IClient<TResponse, any>> {
|
|
|
1229
1238
|
isActive: boolean;
|
|
1230
1239
|
}[];
|
|
1231
1240
|
};
|
|
1241
|
+
statusCameraLed: boolean;
|
|
1242
|
+
statusCameraOutput: string | null;
|
|
1243
|
+
saveToSdCard: boolean;
|
|
1232
1244
|
outputUrl: string;
|
|
1233
1245
|
streamKey: string;
|
|
1234
1246
|
streamIdentifier?: string | undefined;
|
|
@@ -1392,7 +1404,7 @@ export declare class CamStreamerAPI<Client extends IClient<TResponse, any>> {
|
|
|
1392
1404
|
}[];
|
|
1393
1405
|
};
|
|
1394
1406
|
statusCameraLed: boolean;
|
|
1395
|
-
statusCameraOutput: string;
|
|
1407
|
+
statusCameraOutput: string | null;
|
|
1396
1408
|
saveToSdCard: boolean;
|
|
1397
1409
|
tags: string[];
|
|
1398
1410
|
streamPrivacy: "public" | "unlisted" | "private";
|
|
@@ -2094,6 +2106,12 @@ export declare class CamStreamerAPI<Client extends IClient<TResponse, any>> {
|
|
|
2094
2106
|
isActive: boolean;
|
|
2095
2107
|
}[];
|
|
2096
2108
|
};
|
|
2109
|
+
statusCameraLed: boolean;
|
|
2110
|
+
statusCameraOutput: string | null;
|
|
2111
|
+
saveToSdCard: boolean;
|
|
2112
|
+
outputUrl: string;
|
|
2113
|
+
streamKey: string;
|
|
2114
|
+
streamIdentifier?: string | undefined;
|
|
2097
2115
|
}>;
|
|
2098
2116
|
setStream(streamId: number, streamData: TStream, options?: THttpRequestOptions): Promise<void>;
|
|
2099
2117
|
isStreaming(streamId: number, options?: THttpRequestOptions): Promise<boolean>;
|
|
@@ -4229,9 +4229,12 @@ export declare enum ImageType {
|
|
|
4229
4229
|
PNG = 0,
|
|
4230
4230
|
JPEG = 1
|
|
4231
4231
|
}
|
|
4232
|
-
export declare const
|
|
4233
|
-
export
|
|
4234
|
-
export
|
|
4232
|
+
export declare const imageFileStorageTypeSchema: z.ZodUnion<[z.ZodLiteral<"flash">, z.ZodLiteral<"SD0">, z.ZodLiteral<"ftp">, z.ZodLiteral<"samba">, z.ZodLiteral<"url">]>;
|
|
4233
|
+
export declare const fontFileStorageTypeSchema: z.ZodUnion<[z.ZodLiteral<"flash">, z.ZodLiteral<"SD0">]>;
|
|
4234
|
+
export type TImageFileStorageType = z.infer<typeof imageFileStorageTypeSchema>;
|
|
4235
|
+
export type TFontFileStorageType = z.infer<typeof fontFileStorageTypeSchema>;
|
|
4236
|
+
export type TFileStorageType<T extends TFileType> = T extends 'image' ? TImageFileStorageType : TFontFileStorageType;
|
|
4237
|
+
export declare const imageFilestorageDataListSchema: z.ZodArray<z.ZodObject<{
|
|
4235
4238
|
type: z.ZodUnion<[z.ZodLiteral<"flash">, z.ZodLiteral<"SD0">, z.ZodLiteral<"ftp">, z.ZodLiteral<"samba">, z.ZodLiteral<"url">]>;
|
|
4236
4239
|
state: z.ZodString;
|
|
4237
4240
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -4241,8 +4244,89 @@ export declare const storageDataListSchema: z.ZodArray<z.ZodObject<{
|
|
|
4241
4244
|
type: "url" | "flash" | "SD0" | "ftp" | "samba";
|
|
4242
4245
|
state: string;
|
|
4243
4246
|
}>, "many">;
|
|
4244
|
-
export
|
|
4245
|
-
|
|
4247
|
+
export declare const fontStorageDataListSchema: z.ZodArray<z.ZodObject<{
|
|
4248
|
+
type: z.ZodUnion<[z.ZodLiteral<"flash">, z.ZodLiteral<"SD0">]>;
|
|
4249
|
+
state: z.ZodString;
|
|
4250
|
+
}, "strip", z.ZodTypeAny, {
|
|
4251
|
+
type: "flash" | "SD0";
|
|
4252
|
+
state: string;
|
|
4253
|
+
}, {
|
|
4254
|
+
type: "flash" | "SD0";
|
|
4255
|
+
state: string;
|
|
4256
|
+
}>, "many">;
|
|
4257
|
+
export declare const getStorageDataListSchema: (fileType: TFileType) => z.ZodArray<z.ZodObject<{
|
|
4258
|
+
type: z.ZodUnion<[z.ZodLiteral<"flash">, z.ZodLiteral<"SD0">, z.ZodLiteral<"ftp">, z.ZodLiteral<"samba">, z.ZodLiteral<"url">]>;
|
|
4259
|
+
state: z.ZodString;
|
|
4260
|
+
}, "strip", z.ZodTypeAny, {
|
|
4261
|
+
type: "url" | "flash" | "SD0" | "ftp" | "samba";
|
|
4262
|
+
state: string;
|
|
4263
|
+
}, {
|
|
4264
|
+
type: "url" | "flash" | "SD0" | "ftp" | "samba";
|
|
4265
|
+
state: string;
|
|
4266
|
+
}>, "many"> | z.ZodArray<z.ZodObject<{
|
|
4267
|
+
type: z.ZodUnion<[z.ZodLiteral<"flash">, z.ZodLiteral<"SD0">]>;
|
|
4268
|
+
state: z.ZodString;
|
|
4269
|
+
}, "strip", z.ZodTypeAny, {
|
|
4270
|
+
type: "flash" | "SD0";
|
|
4271
|
+
state: string;
|
|
4272
|
+
}, {
|
|
4273
|
+
type: "flash" | "SD0";
|
|
4274
|
+
state: string;
|
|
4275
|
+
}>, "many">;
|
|
4276
|
+
export type TImageStorageDataList = z.infer<typeof imageFilestorageDataListSchema>;
|
|
4277
|
+
export type TFontStorageDataList = z.infer<typeof fontStorageDataListSchema>;
|
|
4278
|
+
export type TStorageDataList<T extends TFileType> = T extends 'image' ? TImageStorageDataList : TFontStorageDataList;
|
|
4279
|
+
export declare const imageStorageResponseSchema: z.ZodObject<{
|
|
4280
|
+
code: z.ZodNumber;
|
|
4281
|
+
list: z.ZodArray<z.ZodObject<{
|
|
4282
|
+
type: z.ZodUnion<[z.ZodLiteral<"flash">, z.ZodLiteral<"SD0">, z.ZodLiteral<"ftp">, z.ZodLiteral<"samba">, z.ZodLiteral<"url">]>;
|
|
4283
|
+
state: z.ZodString;
|
|
4284
|
+
}, "strip", z.ZodTypeAny, {
|
|
4285
|
+
type: "url" | "flash" | "SD0" | "ftp" | "samba";
|
|
4286
|
+
state: string;
|
|
4287
|
+
}, {
|
|
4288
|
+
type: "url" | "flash" | "SD0" | "ftp" | "samba";
|
|
4289
|
+
state: string;
|
|
4290
|
+
}>, "many">;
|
|
4291
|
+
}, "strip", z.ZodTypeAny, {
|
|
4292
|
+
code: number;
|
|
4293
|
+
list: {
|
|
4294
|
+
type: "url" | "flash" | "SD0" | "ftp" | "samba";
|
|
4295
|
+
state: string;
|
|
4296
|
+
}[];
|
|
4297
|
+
}, {
|
|
4298
|
+
code: number;
|
|
4299
|
+
list: {
|
|
4300
|
+
type: "url" | "flash" | "SD0" | "ftp" | "samba";
|
|
4301
|
+
state: string;
|
|
4302
|
+
}[];
|
|
4303
|
+
}>;
|
|
4304
|
+
export declare const fontStorageResponseSchema: z.ZodObject<{
|
|
4305
|
+
code: z.ZodNumber;
|
|
4306
|
+
list: z.ZodArray<z.ZodObject<{
|
|
4307
|
+
type: z.ZodUnion<[z.ZodLiteral<"flash">, z.ZodLiteral<"SD0">]>;
|
|
4308
|
+
state: z.ZodString;
|
|
4309
|
+
}, "strip", z.ZodTypeAny, {
|
|
4310
|
+
type: "flash" | "SD0";
|
|
4311
|
+
state: string;
|
|
4312
|
+
}, {
|
|
4313
|
+
type: "flash" | "SD0";
|
|
4314
|
+
state: string;
|
|
4315
|
+
}>, "many">;
|
|
4316
|
+
}, "strip", z.ZodTypeAny, {
|
|
4317
|
+
code: number;
|
|
4318
|
+
list: {
|
|
4319
|
+
type: "flash" | "SD0";
|
|
4320
|
+
state: string;
|
|
4321
|
+
}[];
|
|
4322
|
+
}, {
|
|
4323
|
+
code: number;
|
|
4324
|
+
list: {
|
|
4325
|
+
type: "flash" | "SD0";
|
|
4326
|
+
state: string;
|
|
4327
|
+
}[];
|
|
4328
|
+
}>;
|
|
4329
|
+
export declare const getStorageResponseSchema: (fileType: TFileType) => z.ZodObject<{
|
|
4246
4330
|
code: z.ZodNumber;
|
|
4247
4331
|
list: z.ZodArray<z.ZodObject<{
|
|
4248
4332
|
type: z.ZodUnion<[z.ZodLiteral<"flash">, z.ZodLiteral<"SD0">, z.ZodLiteral<"ftp">, z.ZodLiteral<"samba">, z.ZodLiteral<"url">]>;
|
|
@@ -4266,9 +4350,35 @@ export declare const storageResponseSchema: z.ZodObject<{
|
|
|
4266
4350
|
type: "url" | "flash" | "SD0" | "ftp" | "samba";
|
|
4267
4351
|
state: string;
|
|
4268
4352
|
}[];
|
|
4353
|
+
}> | z.ZodObject<{
|
|
4354
|
+
code: z.ZodNumber;
|
|
4355
|
+
list: z.ZodArray<z.ZodObject<{
|
|
4356
|
+
type: z.ZodUnion<[z.ZodLiteral<"flash">, z.ZodLiteral<"SD0">]>;
|
|
4357
|
+
state: z.ZodString;
|
|
4358
|
+
}, "strip", z.ZodTypeAny, {
|
|
4359
|
+
type: "flash" | "SD0";
|
|
4360
|
+
state: string;
|
|
4361
|
+
}, {
|
|
4362
|
+
type: "flash" | "SD0";
|
|
4363
|
+
state: string;
|
|
4364
|
+
}>, "many">;
|
|
4365
|
+
}, "strip", z.ZodTypeAny, {
|
|
4366
|
+
code: number;
|
|
4367
|
+
list: {
|
|
4368
|
+
type: "flash" | "SD0";
|
|
4369
|
+
state: string;
|
|
4370
|
+
}[];
|
|
4371
|
+
}, {
|
|
4372
|
+
code: number;
|
|
4373
|
+
list: {
|
|
4374
|
+
type: "flash" | "SD0";
|
|
4375
|
+
state: string;
|
|
4376
|
+
}[];
|
|
4269
4377
|
}>;
|
|
4270
|
-
export type
|
|
4271
|
-
export
|
|
4378
|
+
export type TImageStorageResponse = z.infer<typeof imageStorageResponseSchema>;
|
|
4379
|
+
export type TFontStorageResponse = z.infer<typeof fontStorageResponseSchema>;
|
|
4380
|
+
export type TStorageResponse<T extends TFileType> = T extends 'image' ? TImageStorageResponse : TFontStorageResponse;
|
|
4381
|
+
export declare const imageFileSchema: z.ZodObject<{
|
|
4272
4382
|
name: z.ZodString;
|
|
4273
4383
|
path: z.ZodString;
|
|
4274
4384
|
storage: z.ZodUnion<[z.ZodLiteral<"flash">, z.ZodLiteral<"SD0">, z.ZodLiteral<"ftp">, z.ZodLiteral<"samba">, z.ZodLiteral<"url">]>;
|
|
@@ -4281,8 +4391,20 @@ export declare const fileSchema: z.ZodObject<{
|
|
|
4281
4391
|
name: string;
|
|
4282
4392
|
storage: "url" | "flash" | "SD0" | "ftp" | "samba";
|
|
4283
4393
|
}>;
|
|
4284
|
-
export
|
|
4285
|
-
|
|
4394
|
+
export declare const fontFileSchema: z.ZodObject<{
|
|
4395
|
+
name: z.ZodString;
|
|
4396
|
+
path: z.ZodString;
|
|
4397
|
+
storage: z.ZodUnion<[z.ZodLiteral<"flash">, z.ZodLiteral<"SD0">]>;
|
|
4398
|
+
}, "strip", z.ZodTypeAny, {
|
|
4399
|
+
path: string;
|
|
4400
|
+
name: string;
|
|
4401
|
+
storage: "flash" | "SD0";
|
|
4402
|
+
}, {
|
|
4403
|
+
path: string;
|
|
4404
|
+
name: string;
|
|
4405
|
+
storage: "flash" | "SD0";
|
|
4406
|
+
}>;
|
|
4407
|
+
export declare const getFileSchema: (fileType: TFileType) => z.ZodObject<{
|
|
4286
4408
|
name: z.ZodString;
|
|
4287
4409
|
path: z.ZodString;
|
|
4288
4410
|
storage: z.ZodUnion<[z.ZodLiteral<"flash">, z.ZodLiteral<"SD0">, z.ZodLiteral<"ftp">, z.ZodLiteral<"samba">, z.ZodLiteral<"url">]>;
|
|
@@ -4294,9 +4416,77 @@ export declare const fileListSchema: z.ZodArray<z.ZodObject<{
|
|
|
4294
4416
|
path: string;
|
|
4295
4417
|
name: string;
|
|
4296
4418
|
storage: "url" | "flash" | "SD0" | "ftp" | "samba";
|
|
4419
|
+
}> | z.ZodObject<{
|
|
4420
|
+
name: z.ZodString;
|
|
4421
|
+
path: z.ZodString;
|
|
4422
|
+
storage: z.ZodUnion<[z.ZodLiteral<"flash">, z.ZodLiteral<"SD0">]>;
|
|
4423
|
+
}, "strip", z.ZodTypeAny, {
|
|
4424
|
+
path: string;
|
|
4425
|
+
name: string;
|
|
4426
|
+
storage: "flash" | "SD0";
|
|
4427
|
+
}, {
|
|
4428
|
+
path: string;
|
|
4429
|
+
name: string;
|
|
4430
|
+
storage: "flash" | "SD0";
|
|
4431
|
+
}>;
|
|
4432
|
+
export type TImageFile = z.infer<typeof imageFileSchema>;
|
|
4433
|
+
export type TFontFile = z.infer<typeof fontFileSchema>;
|
|
4434
|
+
export type TFile<T extends TFileType> = T extends 'image' ? TImageFile : TFontFile;
|
|
4435
|
+
export declare const imageFileListSchema: z.ZodArray<z.ZodObject<{
|
|
4436
|
+
name: z.ZodString;
|
|
4437
|
+
path: z.ZodString;
|
|
4438
|
+
storage: z.ZodUnion<[z.ZodLiteral<"flash">, z.ZodLiteral<"SD0">, z.ZodLiteral<"ftp">, z.ZodLiteral<"samba">, z.ZodLiteral<"url">]>;
|
|
4439
|
+
}, "strip", z.ZodTypeAny, {
|
|
4440
|
+
path: string;
|
|
4441
|
+
name: string;
|
|
4442
|
+
storage: "url" | "flash" | "SD0" | "ftp" | "samba";
|
|
4443
|
+
}, {
|
|
4444
|
+
path: string;
|
|
4445
|
+
name: string;
|
|
4446
|
+
storage: "url" | "flash" | "SD0" | "ftp" | "samba";
|
|
4447
|
+
}>, "many">;
|
|
4448
|
+
export declare const fontFileListSchema: z.ZodArray<z.ZodObject<{
|
|
4449
|
+
name: z.ZodString;
|
|
4450
|
+
path: z.ZodString;
|
|
4451
|
+
storage: z.ZodUnion<[z.ZodLiteral<"flash">, z.ZodLiteral<"SD0">]>;
|
|
4452
|
+
}, "strip", z.ZodTypeAny, {
|
|
4453
|
+
path: string;
|
|
4454
|
+
name: string;
|
|
4455
|
+
storage: "flash" | "SD0";
|
|
4456
|
+
}, {
|
|
4457
|
+
path: string;
|
|
4458
|
+
name: string;
|
|
4459
|
+
storage: "flash" | "SD0";
|
|
4460
|
+
}>, "many">;
|
|
4461
|
+
export declare const getFileListSchema: (fileType: TFileType) => z.ZodArray<z.ZodObject<{
|
|
4462
|
+
name: z.ZodString;
|
|
4463
|
+
path: z.ZodString;
|
|
4464
|
+
storage: z.ZodUnion<[z.ZodLiteral<"flash">, z.ZodLiteral<"SD0">, z.ZodLiteral<"ftp">, z.ZodLiteral<"samba">, z.ZodLiteral<"url">]>;
|
|
4465
|
+
}, "strip", z.ZodTypeAny, {
|
|
4466
|
+
path: string;
|
|
4467
|
+
name: string;
|
|
4468
|
+
storage: "url" | "flash" | "SD0" | "ftp" | "samba";
|
|
4469
|
+
}, {
|
|
4470
|
+
path: string;
|
|
4471
|
+
name: string;
|
|
4472
|
+
storage: "url" | "flash" | "SD0" | "ftp" | "samba";
|
|
4473
|
+
}>, "many"> | z.ZodArray<z.ZodObject<{
|
|
4474
|
+
name: z.ZodString;
|
|
4475
|
+
path: z.ZodString;
|
|
4476
|
+
storage: z.ZodUnion<[z.ZodLiteral<"flash">, z.ZodLiteral<"SD0">]>;
|
|
4477
|
+
}, "strip", z.ZodTypeAny, {
|
|
4478
|
+
path: string;
|
|
4479
|
+
name: string;
|
|
4480
|
+
storage: "flash" | "SD0";
|
|
4481
|
+
}, {
|
|
4482
|
+
path: string;
|
|
4483
|
+
name: string;
|
|
4484
|
+
storage: "flash" | "SD0";
|
|
4297
4485
|
}>, "many">;
|
|
4298
|
-
export type
|
|
4299
|
-
export
|
|
4486
|
+
export type TImageFileList = z.infer<typeof imageFileListSchema>;
|
|
4487
|
+
export type TFontFileList = z.infer<typeof fontFileListSchema>;
|
|
4488
|
+
export type TFileList<T extends TFileType> = T extends 'image' ? TImageFileList : TFontFileList;
|
|
4489
|
+
export declare const imageFileDataSchema: z.ZodObject<{
|
|
4300
4490
|
code: z.ZodNumber;
|
|
4301
4491
|
list: z.ZodArray<z.ZodObject<{
|
|
4302
4492
|
name: z.ZodString;
|
|
@@ -4326,5 +4516,96 @@ export declare const fileDataSchema: z.ZodObject<{
|
|
|
4326
4516
|
storage: "url" | "flash" | "SD0" | "ftp" | "samba";
|
|
4327
4517
|
}[];
|
|
4328
4518
|
}>;
|
|
4329
|
-
export
|
|
4519
|
+
export declare const fontFileDataSchema: z.ZodObject<{
|
|
4520
|
+
code: z.ZodNumber;
|
|
4521
|
+
list: z.ZodArray<z.ZodObject<{
|
|
4522
|
+
name: z.ZodString;
|
|
4523
|
+
path: z.ZodString;
|
|
4524
|
+
storage: z.ZodUnion<[z.ZodLiteral<"flash">, z.ZodLiteral<"SD0">]>;
|
|
4525
|
+
}, "strip", z.ZodTypeAny, {
|
|
4526
|
+
path: string;
|
|
4527
|
+
name: string;
|
|
4528
|
+
storage: "flash" | "SD0";
|
|
4529
|
+
}, {
|
|
4530
|
+
path: string;
|
|
4531
|
+
name: string;
|
|
4532
|
+
storage: "flash" | "SD0";
|
|
4533
|
+
}>, "many">;
|
|
4534
|
+
}, "strip", z.ZodTypeAny, {
|
|
4535
|
+
code: number;
|
|
4536
|
+
list: {
|
|
4537
|
+
path: string;
|
|
4538
|
+
name: string;
|
|
4539
|
+
storage: "flash" | "SD0";
|
|
4540
|
+
}[];
|
|
4541
|
+
}, {
|
|
4542
|
+
code: number;
|
|
4543
|
+
list: {
|
|
4544
|
+
path: string;
|
|
4545
|
+
name: string;
|
|
4546
|
+
storage: "flash" | "SD0";
|
|
4547
|
+
}[];
|
|
4548
|
+
}>;
|
|
4549
|
+
export declare const getFileDataSchema: (fileType: TFileType) => z.ZodObject<{
|
|
4550
|
+
code: z.ZodNumber;
|
|
4551
|
+
list: z.ZodArray<z.ZodObject<{
|
|
4552
|
+
name: z.ZodString;
|
|
4553
|
+
path: z.ZodString;
|
|
4554
|
+
storage: z.ZodUnion<[z.ZodLiteral<"flash">, z.ZodLiteral<"SD0">, z.ZodLiteral<"ftp">, z.ZodLiteral<"samba">, z.ZodLiteral<"url">]>;
|
|
4555
|
+
}, "strip", z.ZodTypeAny, {
|
|
4556
|
+
path: string;
|
|
4557
|
+
name: string;
|
|
4558
|
+
storage: "url" | "flash" | "SD0" | "ftp" | "samba";
|
|
4559
|
+
}, {
|
|
4560
|
+
path: string;
|
|
4561
|
+
name: string;
|
|
4562
|
+
storage: "url" | "flash" | "SD0" | "ftp" | "samba";
|
|
4563
|
+
}>, "many">;
|
|
4564
|
+
}, "strip", z.ZodTypeAny, {
|
|
4565
|
+
code: number;
|
|
4566
|
+
list: {
|
|
4567
|
+
path: string;
|
|
4568
|
+
name: string;
|
|
4569
|
+
storage: "url" | "flash" | "SD0" | "ftp" | "samba";
|
|
4570
|
+
}[];
|
|
4571
|
+
}, {
|
|
4572
|
+
code: number;
|
|
4573
|
+
list: {
|
|
4574
|
+
path: string;
|
|
4575
|
+
name: string;
|
|
4576
|
+
storage: "url" | "flash" | "SD0" | "ftp" | "samba";
|
|
4577
|
+
}[];
|
|
4578
|
+
}> | z.ZodObject<{
|
|
4579
|
+
code: z.ZodNumber;
|
|
4580
|
+
list: z.ZodArray<z.ZodObject<{
|
|
4581
|
+
name: z.ZodString;
|
|
4582
|
+
path: z.ZodString;
|
|
4583
|
+
storage: z.ZodUnion<[z.ZodLiteral<"flash">, z.ZodLiteral<"SD0">]>;
|
|
4584
|
+
}, "strip", z.ZodTypeAny, {
|
|
4585
|
+
path: string;
|
|
4586
|
+
name: string;
|
|
4587
|
+
storage: "flash" | "SD0";
|
|
4588
|
+
}, {
|
|
4589
|
+
path: string;
|
|
4590
|
+
name: string;
|
|
4591
|
+
storage: "flash" | "SD0";
|
|
4592
|
+
}>, "many">;
|
|
4593
|
+
}, "strip", z.ZodTypeAny, {
|
|
4594
|
+
code: number;
|
|
4595
|
+
list: {
|
|
4596
|
+
path: string;
|
|
4597
|
+
name: string;
|
|
4598
|
+
storage: "flash" | "SD0";
|
|
4599
|
+
}[];
|
|
4600
|
+
}, {
|
|
4601
|
+
code: number;
|
|
4602
|
+
list: {
|
|
4603
|
+
path: string;
|
|
4604
|
+
name: string;
|
|
4605
|
+
storage: "flash" | "SD0";
|
|
4606
|
+
}[];
|
|
4607
|
+
}>;
|
|
4608
|
+
export type TImageFileData = z.infer<typeof imageFileDataSchema>;
|
|
4609
|
+
export type TFontFileData = z.infer<typeof fontFileDataSchema>;
|
|
4610
|
+
export type TFileData<T extends TFileType> = T extends 'image' ? TImageFileData : TFontFileData;
|
|
4330
4611
|
export type TOverlayListItem = z.infer<typeof overlaySchema>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.getFileDataSchema = exports.fontFileDataSchema = exports.imageFileDataSchema = exports.getFileListSchema = exports.fontFileListSchema = exports.imageFileListSchema = exports.getFileSchema = exports.fontFileSchema = exports.imageFileSchema = exports.getStorageResponseSchema = exports.fontStorageResponseSchema = exports.imageStorageResponseSchema = exports.getStorageDataListSchema = exports.fontStorageDataListSchema = exports.imageFilestorageDataListSchema = exports.fontFileStorageTypeSchema = exports.imageFileStorageTypeSchema = exports.ImageType = exports.isScoreOverview = exports.isBaseballScoreBoardAutomatic = exports.isBaseballScoreBoard = exports.isScoreBoard = exports.isWebCameraSharing = exports.isScreenSharing = exports.isPtz = exports.isPtzCompass = exports.isPip = exports.isInfoticker = exports.isImages = exports.isCustomGraphics = exports.isAccuweather = exports.serviceListSchema = exports.servicesSchema = exports.wsResponseSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const infotickerSchema_1 = require("./infotickerSchema");
|
|
6
6
|
const accuweatherSchema_1 = require("./accuweatherSchema");
|
|
@@ -65,28 +65,67 @@ var ImageType;
|
|
|
65
65
|
ImageType[ImageType["PNG"] = 0] = "PNG";
|
|
66
66
|
ImageType[ImageType["JPEG"] = 1] = "JPEG";
|
|
67
67
|
})(ImageType || (exports.ImageType = ImageType = {}));
|
|
68
|
-
exports.
|
|
68
|
+
exports.imageFileStorageTypeSchema = zod_1.z.union([
|
|
69
69
|
zod_1.z.literal('flash'),
|
|
70
70
|
zod_1.z.literal('SD0'),
|
|
71
71
|
zod_1.z.literal('ftp'),
|
|
72
72
|
zod_1.z.literal('samba'),
|
|
73
73
|
zod_1.z.literal('url'),
|
|
74
74
|
]);
|
|
75
|
-
exports.
|
|
76
|
-
|
|
75
|
+
exports.fontFileStorageTypeSchema = zod_1.z.union([zod_1.z.literal('flash'), zod_1.z.literal('SD0')]);
|
|
76
|
+
exports.imageFilestorageDataListSchema = zod_1.z.array(zod_1.z.object({
|
|
77
|
+
type: exports.imageFileStorageTypeSchema,
|
|
77
78
|
state: zod_1.z.string(),
|
|
78
79
|
}));
|
|
79
|
-
exports.
|
|
80
|
+
exports.fontStorageDataListSchema = zod_1.z.array(zod_1.z.object({
|
|
81
|
+
type: exports.fontFileStorageTypeSchema,
|
|
82
|
+
state: zod_1.z.string(),
|
|
83
|
+
}));
|
|
84
|
+
const getStorageDataListSchema = (fileType) => {
|
|
85
|
+
return fileType === 'image' ? exports.imageFilestorageDataListSchema : exports.fontStorageDataListSchema;
|
|
86
|
+
};
|
|
87
|
+
exports.getStorageDataListSchema = getStorageDataListSchema;
|
|
88
|
+
exports.imageStorageResponseSchema = zod_1.z.object({
|
|
80
89
|
code: zod_1.z.number(),
|
|
81
|
-
list: exports.
|
|
90
|
+
list: exports.imageFilestorageDataListSchema,
|
|
82
91
|
});
|
|
83
|
-
exports.
|
|
92
|
+
exports.fontStorageResponseSchema = zod_1.z.object({
|
|
93
|
+
code: zod_1.z.number(),
|
|
94
|
+
list: exports.fontStorageDataListSchema,
|
|
95
|
+
});
|
|
96
|
+
const getStorageResponseSchema = (fileType) => {
|
|
97
|
+
return fileType === 'image' ? exports.imageStorageResponseSchema : exports.fontStorageResponseSchema;
|
|
98
|
+
};
|
|
99
|
+
exports.getStorageResponseSchema = getStorageResponseSchema;
|
|
100
|
+
exports.imageFileSchema = zod_1.z.object({
|
|
84
101
|
name: zod_1.z.string(),
|
|
85
102
|
path: zod_1.z.string().url(),
|
|
86
|
-
storage: exports.
|
|
103
|
+
storage: exports.imageFileStorageTypeSchema,
|
|
104
|
+
});
|
|
105
|
+
exports.fontFileSchema = zod_1.z.object({
|
|
106
|
+
name: zod_1.z.string(),
|
|
107
|
+
path: zod_1.z.string().url(),
|
|
108
|
+
storage: exports.fontFileStorageTypeSchema,
|
|
109
|
+
});
|
|
110
|
+
const getFileSchema = (fileType) => {
|
|
111
|
+
return fileType === 'image' ? exports.imageFileSchema : exports.fontFileSchema;
|
|
112
|
+
};
|
|
113
|
+
exports.getFileSchema = getFileSchema;
|
|
114
|
+
exports.imageFileListSchema = zod_1.z.array(exports.imageFileSchema);
|
|
115
|
+
exports.fontFileListSchema = zod_1.z.array(exports.fontFileSchema);
|
|
116
|
+
const getFileListSchema = (fileType) => {
|
|
117
|
+
return fileType === 'image' ? exports.imageFileListSchema : exports.fontFileListSchema;
|
|
118
|
+
};
|
|
119
|
+
exports.getFileListSchema = getFileListSchema;
|
|
120
|
+
exports.imageFileDataSchema = zod_1.z.object({
|
|
121
|
+
code: zod_1.z.number(),
|
|
122
|
+
list: exports.imageFileListSchema,
|
|
87
123
|
});
|
|
88
|
-
exports.
|
|
89
|
-
exports.fileDataSchema = zod_1.z.object({
|
|
124
|
+
exports.fontFileDataSchema = zod_1.z.object({
|
|
90
125
|
code: zod_1.z.number(),
|
|
91
|
-
list: exports.
|
|
126
|
+
list: exports.fontFileListSchema,
|
|
92
127
|
});
|
|
128
|
+
const getFileDataSchema = (fileType) => {
|
|
129
|
+
return fileType === 'image' ? exports.imageFileDataSchema : exports.fontFileDataSchema;
|
|
130
|
+
};
|
|
131
|
+
exports.getFileDataSchema = getFileDataSchema;
|