camstreamerlib 4.0.0-beta.33 → 4.0.0-beta.35
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.js +3 -3
- package/cjs/CamStreamerAPI.js +54 -11
- package/cjs/CamSwitcherAPI.js +7 -7
- package/cjs/CamSwitcherEvents.js +4 -60
- package/cjs/PlaneTrackerAPI.js +52 -52
- package/cjs/VapixAPI.js +10 -7
- package/cjs/index.js +2 -11
- package/cjs/internal/ProxyClient.js +6 -6
- package/cjs/internal/WsEvents.js +72 -0
- package/cjs/node/DefaultClient.js +4 -4
- package/cjs/node/HttpRequestSender.js +1 -1
- package/cjs/node/WsClient.js +1 -1
- package/cjs/{events → node/events}/AxisCameraStationEvents.js +4 -4
- package/cjs/{events → node/events}/GenetecAgent.js +1 -1
- package/cjs/node/index.js +2 -2
- package/cjs/types/CamOverlayAPI/CamOverlayAPI.js +14 -2
- package/cjs/types/CamOverlayAPI/scoreBoardSchema.js +127 -0
- package/cjs/types/CamStreamerAPI.js +30 -3
- package/esm/CamOverlayAPI.js +3 -3
- package/esm/CamStreamerAPI.js +53 -11
- package/esm/CamSwitcherAPI.js +7 -7
- package/esm/CamSwitcherEvents.js +5 -61
- package/esm/PlaneTrackerAPI.js +52 -52
- package/esm/VapixAPI.js +10 -7
- package/esm/index.js +1 -6
- package/esm/internal/ProxyClient.js +6 -6
- package/esm/internal/WsEvents.js +68 -0
- package/esm/node/DefaultClient.js +4 -4
- package/esm/node/HttpRequestSender.js +1 -1
- package/esm/node/WsClient.js +1 -1
- package/esm/{events → node/events}/AxisCameraStationEvents.js +3 -3
- package/esm/{events → node/events}/GenetecAgent.js +1 -1
- package/esm/node/index.js +2 -2
- package/esm/types/CamOverlayAPI/CamOverlayAPI.js +9 -1
- package/esm/types/CamOverlayAPI/scoreBoardSchema.js +124 -0
- package/esm/types/CamStreamerAPI.js +29 -2
- package/package.json +22 -2
- package/{cjs → types}/CamOverlayAPI.d.ts +3 -5
- package/{esm → types}/CamScripterAPI.d.ts +4 -4
- package/types/CamStreamerAPI.d.ts +48 -0
- package/{esm → types}/CamSwitcherAPI.d.ts +8 -8
- package/types/CamSwitcherEvents.d.ts +8 -0
- package/types/PlaneTrackerAPI.d.ts +43 -0
- package/{cjs → types}/VapixAPI.d.ts +11 -7
- package/{cjs → types}/index.d.ts +1 -6
- package/{esm → types}/internal/ProxyClient.d.ts +4 -4
- package/types/internal/WsEvents.d.ts +41 -0
- package/{esm → types}/internal/types.d.ts +12 -9
- package/{cjs → types}/node/DefaultClient.d.ts +6 -4
- package/{esm → types/node}/events/AxisCameraStationEvents.d.ts +4 -4
- package/{esm → types}/node/index.d.ts +2 -2
- package/{cjs → types}/types/CamOverlayAPI/CamOverlayAPI.d.ts +1071 -10
- package/{esm → types}/types/CamOverlayAPI/infotickerSchema.d.ts +2 -2
- package/types/types/CamOverlayAPI/scoreBoardSchema.d.ts +357 -0
- package/types/types/CamStreamerAPI.d.ts +274 -0
- package/types/web/DefaultClient.d.ts +6 -0
- package/cjs/CamScripterAPI.d.ts +0 -37
- package/cjs/CamStreamerAPI.d.ts +0 -19
- package/cjs/CamSwitcherAPI.d.ts +0 -54
- package/cjs/CamSwitcherEvents.d.ts +0 -18
- package/cjs/PlaneTrackerAPI.d.ts +0 -43
- package/cjs/events/AxisCameraStationEvents.d.ts +0 -12
- package/cjs/internal/ProxyClient.d.ts +0 -10
- package/cjs/internal/types.d.ts +0 -42
- package/cjs/node/index.d.ts +0 -5
- package/cjs/types/CamOverlayAPI/infotickerSchema.d.ts +0 -96
- package/cjs/types/CamStreamerAPI.d.ts +0 -150
- package/cjs/web/DefaultClient.d.ts +0 -6
- package/esm/CamOverlayAPI.d.ts +0 -41
- package/esm/CamOverlayDrawingAPI.d.ts +0 -41
- package/esm/CamOverlayPainter/Frame.d.ts +0 -67
- package/esm/CamOverlayPainter/Painter.d.ts +0 -43
- package/esm/CamOverlayPainter/ResourceManager.d.ts +0 -15
- package/esm/CamScripterAPICameraEventsGenerator.d.ts +0 -74
- package/esm/CamStreamerAPI.d.ts +0 -19
- package/esm/CamSwitcherEvents.d.ts +0 -18
- package/esm/CreatePackage.d.ts +0 -1
- package/esm/PlaneTrackerAPI.d.ts +0 -43
- package/esm/VapixAPI.d.ts +0 -80
- package/esm/VapixEvents.d.ts +0 -43
- package/esm/errors/errors.d.ts +0 -37
- package/esm/events/GenetecAgent.d.ts +0 -159
- package/esm/index.d.ts +0 -23
- package/esm/internal/Digest.d.ts +0 -4
- package/esm/internal/constants.d.ts +0 -1
- package/esm/internal/transformers.d.ts +0 -5
- package/esm/internal/utils.d.ts +0 -14
- package/esm/internal/versionCompare.d.ts +0 -6
- package/esm/node/DefaultClient.d.ts +0 -14
- package/esm/node/HttpRequestSender.d.ts +0 -29
- package/esm/node/HttpServer.d.ts +0 -21
- package/esm/node/WsClient.d.ts +0 -40
- package/esm/types/CamOverlayAPI/CamOverlayAPI.d.ts +0 -3260
- package/esm/types/CamOverlayAPI/accuweatherSchema.d.ts +0 -84
- package/esm/types/CamOverlayAPI/customGraphicsSchema.d.ts +0 -700
- package/esm/types/CamOverlayAPI/imagesSchema.d.ts +0 -95
- package/esm/types/CamOverlayAPI/index.d.ts +0 -11
- package/esm/types/CamOverlayAPI/pipSchema.d.ts +0 -125
- package/esm/types/CamOverlayAPI/ptzCompassSchema.d.ts +0 -93
- package/esm/types/CamOverlayAPI/ptzSchema.d.ts +0 -118
- package/esm/types/CamOverlayAPI/screenSharingSchema.d.ts +0 -58
- package/esm/types/CamOverlayAPI/webCameraSharingSchema.d.ts +0 -58
- package/esm/types/CamOverlayAPI/widgetCommonTypes.d.ts +0 -141
- package/esm/types/CamOverlayDrawingAPI.d.ts +0 -58
- package/esm/types/CamOverlayPainter.d.ts +0 -74
- package/esm/types/CamScripterAPI.d.ts +0 -132
- package/esm/types/CamStreamerAPI.d.ts +0 -150
- package/esm/types/CamSwitcherAPI.d.ts +0 -812
- package/esm/types/CamSwitcherEvents.d.ts +0 -568
- package/esm/types/PlaneTrackerAPI.d.ts +0 -8
- package/esm/types/VapixAPI.d.ts +0 -1819
- package/esm/types/common.d.ts +0 -46
- package/esm/web/DefaultClient.d.ts +0 -6
- package/esm/web/WsClient.d.ts +0 -13
- package/esm/web/index.d.ts +0 -2
- /package/cjs/{internal → node}/Digest.js +0 -0
- /package/esm/{internal → node}/Digest.js +0 -0
- /package/{cjs → types}/CamOverlayDrawingAPI.d.ts +0 -0
- /package/{cjs → types}/CamOverlayPainter/Frame.d.ts +0 -0
- /package/{cjs → types}/CamOverlayPainter/Painter.d.ts +0 -0
- /package/{cjs → types}/CamOverlayPainter/ResourceManager.d.ts +0 -0
- /package/{cjs → types}/CamScripterAPICameraEventsGenerator.d.ts +0 -0
- /package/{cjs → types}/CreatePackage.d.ts +0 -0
- /package/{cjs → types}/VapixEvents.d.ts +0 -0
- /package/{cjs → types}/errors/errors.d.ts +0 -0
- /package/{cjs → types}/internal/constants.d.ts +0 -0
- /package/{cjs → types}/internal/transformers.d.ts +0 -0
- /package/{cjs → types}/internal/utils.d.ts +0 -0
- /package/{cjs → types}/internal/versionCompare.d.ts +0 -0
- /package/{cjs/internal → types/node}/Digest.d.ts +0 -0
- /package/{cjs → types}/node/HttpRequestSender.d.ts +0 -0
- /package/{cjs → types}/node/HttpServer.d.ts +0 -0
- /package/{cjs → types}/node/WsClient.d.ts +0 -0
- /package/{cjs → types/node}/events/GenetecAgent.d.ts +0 -0
- /package/{cjs → types}/types/CamOverlayAPI/accuweatherSchema.d.ts +0 -0
- /package/{cjs → types}/types/CamOverlayAPI/customGraphicsSchema.d.ts +0 -0
- /package/{cjs → types}/types/CamOverlayAPI/imagesSchema.d.ts +0 -0
- /package/{cjs → types}/types/CamOverlayAPI/index.d.ts +0 -0
- /package/{cjs → types}/types/CamOverlayAPI/pipSchema.d.ts +0 -0
- /package/{cjs → types}/types/CamOverlayAPI/ptzCompassSchema.d.ts +0 -0
- /package/{cjs → types}/types/CamOverlayAPI/ptzSchema.d.ts +0 -0
- /package/{cjs → types}/types/CamOverlayAPI/screenSharingSchema.d.ts +0 -0
- /package/{cjs → types}/types/CamOverlayAPI/webCameraSharingSchema.d.ts +0 -0
- /package/{cjs → types}/types/CamOverlayAPI/widgetCommonTypes.d.ts +0 -0
- /package/{cjs → types}/types/CamOverlayDrawingAPI.d.ts +0 -0
- /package/{cjs → types}/types/CamOverlayPainter.d.ts +0 -0
- /package/{cjs → types}/types/CamScripterAPI.d.ts +0 -0
- /package/{cjs → types}/types/CamSwitcherAPI.d.ts +0 -0
- /package/{cjs → types}/types/CamSwitcherEvents.d.ts +0 -0
- /package/{cjs → types}/types/PlaneTrackerAPI.d.ts +0 -0
- /package/{cjs → types}/types/VapixAPI.d.ts +0 -0
- /package/{cjs → types}/types/common.d.ts +0 -0
- /package/{cjs → types}/web/WsClient.d.ts +0 -0
- /package/{cjs → types}/web/index.d.ts +0 -0
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
/// <reference types="node" />
|
|
3
1
|
import { IClient, TBlobResponse, TResponse } from './internal/types';
|
|
4
2
|
import { THttpRequestOptions, TProxyParams, TNetworkCamera } from './types/common';
|
|
5
3
|
import { ProxyClient } from './internal/ProxyClient';
|
|
6
4
|
import { ImageType, TCoordinates, TField, TFile, TFileList, TFileType, TStorage, TStorageDataList, TWidget } from './types/CamOverlayAPI';
|
|
7
|
-
export declare class CamOverlayAPI<Client extends IClient<TResponse
|
|
5
|
+
export declare class CamOverlayAPI<Client extends IClient<TResponse, any>> {
|
|
8
6
|
private client;
|
|
9
7
|
constructor(client: Client);
|
|
10
8
|
static getBasePath: () => string;
|
|
@@ -16,7 +14,7 @@ export declare class CamOverlayAPI<Client extends IClient<TResponse> = IClient<T
|
|
|
16
14
|
wsAuthorization(options?: THttpRequestOptions): Promise<string>;
|
|
17
15
|
getMjpegStreamImage(mjpegUrl: string, options?: THttpRequestOptions): Promise<TBlobResponse<Client>>;
|
|
18
16
|
listFiles(fileType: TFileType, options?: THttpRequestOptions): Promise<TFileList>;
|
|
19
|
-
uploadFile(fileType: TFileType, formData:
|
|
17
|
+
uploadFile(fileType: TFileType, formData: Parameters<Client['post']>[0]['data'], storage: TStorage, options?: THttpRequestOptions): Promise<void>;
|
|
20
18
|
removeFile(fileType: TFileType, fileParams: TFile, options?: THttpRequestOptions): Promise<void>;
|
|
21
19
|
getFileStorage(fileType: TFileType, options?: THttpRequestOptions): Promise<TStorageDataList>;
|
|
22
20
|
getFilePreviewFromCamera(path: string, options?: THttpRequestOptions): Promise<TBlobResponse<Client>>;
|
|
@@ -30,7 +28,7 @@ export declare class CamOverlayAPI<Client extends IClient<TResponse> = IClient<T
|
|
|
30
28
|
updateCGText(serviceId: number, fields: TField[], options?: THttpRequestOptions): Promise<void>;
|
|
31
29
|
updateCGImagePos(serviceId: number, coordinates?: TCoordinates, x?: number, y?: number, options?: THttpRequestOptions): Promise<void>;
|
|
32
30
|
updateCGImage(serviceId: number, path: string, coordinates?: TCoordinates, x?: number, y?: number, options?: THttpRequestOptions): Promise<void>;
|
|
33
|
-
updateCGImageFromData(serviceId: number, imageType: ImageType, imageData:
|
|
31
|
+
updateCGImageFromData(serviceId: number, imageType: ImageType, imageData: Parameters<Client['post']>[0]['data'], coordinates?: TCoordinates, x?: number, y?: number, options?: THttpRequestOptions): Promise<void>;
|
|
34
32
|
private promiseCGUpdate;
|
|
35
33
|
private _get;
|
|
36
34
|
private _post;
|
|
@@ -2,7 +2,7 @@ import { ProxyClient } from './internal/ProxyClient';
|
|
|
2
2
|
import { IClient, TResponse } from './internal/types';
|
|
3
3
|
import { TNodeState, TPackageInfoList, TStorage, TStorageType } from './types/CamScripterAPI';
|
|
4
4
|
import { THttpRequestOptions, TNetworkCamera, TProxyParams } from './types/common';
|
|
5
|
-
export declare class CamScripterAPI<Client extends IClient<TResponse
|
|
5
|
+
export declare class CamScripterAPI<Client extends IClient<TResponse, any>> {
|
|
6
6
|
client: Client;
|
|
7
7
|
constructor(client: Client);
|
|
8
8
|
static getProxyUrlPath: () => string;
|
|
@@ -11,7 +11,7 @@ export declare class CamScripterAPI<Client extends IClient<TResponse> = IClient<
|
|
|
11
11
|
getNetworkCameraList(options?: THttpRequestOptions): Promise<TNetworkCamera[]>;
|
|
12
12
|
getStorageInfo(options?: THttpRequestOptions): Promise<TStorage>;
|
|
13
13
|
getPackageList(options?: THttpRequestOptions): Promise<TPackageInfoList>;
|
|
14
|
-
installPackages(formData:
|
|
14
|
+
installPackages(formData: Parameters<Client['post']>[0]['data'], storage: TStorageType, options?: THttpRequestOptions): Promise<{
|
|
15
15
|
status: number;
|
|
16
16
|
message: string;
|
|
17
17
|
}>;
|
|
@@ -19,11 +19,11 @@ export declare class CamScripterAPI<Client extends IClient<TResponse> = IClient<
|
|
|
19
19
|
status: number;
|
|
20
20
|
message: string;
|
|
21
21
|
}>;
|
|
22
|
-
importSettings(packageId: string, formData:
|
|
22
|
+
importSettings(packageId: string, formData: Parameters<Client['post']>[0]['data'], options?: THttpRequestOptions): Promise<{
|
|
23
23
|
status: number;
|
|
24
24
|
message: string;
|
|
25
25
|
}>;
|
|
26
|
-
exportSettings(packageId: string, formData:
|
|
26
|
+
exportSettings(packageId: string, formData: Parameters<Client['post']>[0]['data'], options?: THttpRequestOptions): Promise<{
|
|
27
27
|
status: number;
|
|
28
28
|
message: string;
|
|
29
29
|
}>;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { ProxyClient } from './internal/ProxyClient';
|
|
2
|
+
import { IClient, TResponse } from './internal/types';
|
|
3
|
+
import { TCameraStream, TStream } from './types/CamStreamerAPI';
|
|
4
|
+
import { THttpRequestOptions, TProxyParams } from './types/common';
|
|
5
|
+
export declare class CamStreamerAPI<Client extends IClient<TResponse, any>> {
|
|
6
|
+
client: Client;
|
|
7
|
+
constructor(client: Client);
|
|
8
|
+
getClient(proxyParams?: TProxyParams): Client | ProxyClient<Client>;
|
|
9
|
+
getStreamList(options?: THttpRequestOptions): Promise<Record<number, {
|
|
10
|
+
enabled: 0 | 1;
|
|
11
|
+
schedule: string;
|
|
12
|
+
active: 0 | 1;
|
|
13
|
+
audioSource: string;
|
|
14
|
+
avSyncMsec: number;
|
|
15
|
+
internalVapixParameters: string;
|
|
16
|
+
userVapixParameters: string;
|
|
17
|
+
outputParameters: string;
|
|
18
|
+
outputType: "video" | "images" | "none";
|
|
19
|
+
mediaServerUrl: string;
|
|
20
|
+
inputType: "RTSP_URL" | "CSw" | "CRS";
|
|
21
|
+
inputUrl: string;
|
|
22
|
+
forceStereo: 0 | 1;
|
|
23
|
+
streamDelay: number | null;
|
|
24
|
+
statusLed: number;
|
|
25
|
+
statusPort: string;
|
|
26
|
+
callApi: number;
|
|
27
|
+
trigger: string;
|
|
28
|
+
prepareAhead: number;
|
|
29
|
+
startTime: number | null;
|
|
30
|
+
stopTime: number | null;
|
|
31
|
+
}>>;
|
|
32
|
+
getStream(streamId: number, options?: THttpRequestOptions): Promise<TStream>;
|
|
33
|
+
getStreamParameter(streamId: number, paramName: string, options?: THttpRequestOptions): Promise<string>;
|
|
34
|
+
setStream(streamId: number, params: Partial<TStream>, options?: THttpRequestOptions): Promise<{
|
|
35
|
+
message: string;
|
|
36
|
+
status: number;
|
|
37
|
+
}>;
|
|
38
|
+
setStreamParameter(streamId: number, paramName: string, value: string, options?: THttpRequestOptions): Promise<{
|
|
39
|
+
message: string;
|
|
40
|
+
status: number;
|
|
41
|
+
}>;
|
|
42
|
+
isStreaming(streamId: number, options?: THttpRequestOptions): Promise<boolean>;
|
|
43
|
+
deleteStream(streamId: number, options?: THttpRequestOptions): Promise<boolean>;
|
|
44
|
+
getWsAuthorization(options?: THttpRequestOptions): Promise<string>;
|
|
45
|
+
getUtcTime(options?: THttpRequestOptions): Promise<number>;
|
|
46
|
+
private get;
|
|
47
|
+
}
|
|
48
|
+
export declare const parseCameraStreamResponse: (cameraStreamData: TCameraStream) => TStream;
|
|
@@ -2,7 +2,7 @@ import { IClient, TResponse } from './internal/types';
|
|
|
2
2
|
import { TAudioPushInfo, TOutputInfo, TStorageInfo, TStreamSaveList, TClipList, TStreamSaveLoadList, TClipSaveLoadList, TPlaylistSaveLoadList, TTrackerSaveList, TrackerSaveLoadList, TClipSaveList, TPlaylistSaveList, TCameraOptions, TGlobalAudioSettings, TSecondaryAudioSettings } from './types/CamSwitcherAPI';
|
|
3
3
|
import { TAudioChannel, THttpRequestOptions, TNetworkCamera, TProxyParams, TStorageType } from './types/common';
|
|
4
4
|
import { ProxyClient } from './internal/ProxyClient';
|
|
5
|
-
export declare class CamSwitcherAPI<Client extends IClient<TResponse
|
|
5
|
+
export declare class CamSwitcherAPI<Client extends IClient<TResponse, any>> {
|
|
6
6
|
client: Client;
|
|
7
7
|
private CustomFormData;
|
|
8
8
|
private vapixAgent;
|
|
@@ -35,14 +35,14 @@ export declare class CamSwitcherAPI<Client extends IClient<TResponse> = IClient<
|
|
|
35
35
|
playlistQueueClear(options?: THttpRequestOptions): Promise<void>;
|
|
36
36
|
playlistQueueList(options?: THttpRequestOptions): Promise<string[]>;
|
|
37
37
|
playlistQueuePlayNext(options?: THttpRequestOptions): Promise<void>;
|
|
38
|
-
addNewClip(file: any, clipType: 'video' | 'audio', storage: TStorageType,
|
|
39
|
-
removeClip(
|
|
38
|
+
addNewClip(file: any, clipType: 'video' | 'audio', storage: TStorageType, clipId: string, fileName?: string, options?: THttpRequestOptions): Promise<void>;
|
|
39
|
+
removeClip(clipId: string, storage: TStorageType, options?: THttpRequestOptions): Promise<any>;
|
|
40
40
|
getClipList(options?: THttpRequestOptions): Promise<TClipList>;
|
|
41
|
-
setCamSwitchOptions(data: TCameraOptions, cameraFWVersion: string, options?: THttpRequestOptions): Promise<
|
|
42
|
-
setGlobalAudioSettings(settings: TGlobalAudioSettings, options?: THttpRequestOptions): Promise<
|
|
43
|
-
setSecondaryAudioSettings(settings: TSecondaryAudioSettings, options?: THttpRequestOptions): Promise<
|
|
44
|
-
setDefaultPlaylist(
|
|
45
|
-
setPermanentRtspUrlToken(token: string, options?: THttpRequestOptions): Promise<
|
|
41
|
+
setCamSwitchOptions(data: TCameraOptions, cameraFWVersion: string, options?: THttpRequestOptions): Promise<void>;
|
|
42
|
+
setGlobalAudioSettings(settings: TGlobalAudioSettings, options?: THttpRequestOptions): Promise<void>;
|
|
43
|
+
setSecondaryAudioSettings(settings: TSecondaryAudioSettings, options?: THttpRequestOptions): Promise<void>;
|
|
44
|
+
setDefaultPlaylist(playlistId: string, options?: THttpRequestOptions): Promise<void>;
|
|
45
|
+
setPermanentRtspUrlToken(token: string, options?: THttpRequestOptions): Promise<void>;
|
|
46
46
|
getCamSwitchOptions(options?: THttpRequestOptions): Promise<Partial<TCameraOptions>>;
|
|
47
47
|
getGlobalAudioSettings(options?: THttpRequestOptions): Promise<TGlobalAudioSettings>;
|
|
48
48
|
getSecondaryAudioSettings(options?: THttpRequestOptions): Promise<TSecondaryAudioSettings>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { IWebsocket } from './internal/types';
|
|
2
|
+
import { WsEvents } from './internal/WsEvents';
|
|
3
|
+
import { TCamSwitcherEvent } from './types/CamSwitcherEvents';
|
|
4
|
+
export declare class CamSwitcherEvents<Event extends {
|
|
5
|
+
data: string;
|
|
6
|
+
}> extends WsEvents<TCamSwitcherEvent, Event> {
|
|
7
|
+
constructor(ws: IWebsocket<Event>);
|
|
8
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { IClient, TBlobResponse, TParameters, TResponse } from './internal/types';
|
|
2
|
+
import { ICAO, TApiUser, TExportDataType, TImportDataType } from './types/PlaneTrackerAPI';
|
|
3
|
+
import { THttpRequestOptions, TProxyParams } from './types/common';
|
|
4
|
+
import { ProxyClient } from './internal/ProxyClient';
|
|
5
|
+
export declare class PlaneTrackerAPI<Client extends IClient<TResponse, any>> {
|
|
6
|
+
private client;
|
|
7
|
+
private apiUser;
|
|
8
|
+
constructor(client: Client, apiUser: TApiUser);
|
|
9
|
+
static getProxyUrlPath: () => string;
|
|
10
|
+
getClient(proxyParams?: TProxyParams): Client | ProxyClient<Client>;
|
|
11
|
+
checkCameraTime(options?: THttpRequestOptions): Promise<boolean>;
|
|
12
|
+
resetPtzCalibration(options?: THttpRequestOptions): Promise<TResponse>;
|
|
13
|
+
resetFocusCalibration(options?: THttpRequestOptions): Promise<TResponse>;
|
|
14
|
+
serverRunCheck(options?: THttpRequestOptions): Promise<TResponse>;
|
|
15
|
+
getLiveViewAlias(rtspUrl: string, options?: THttpRequestOptions): Promise<TResponse>;
|
|
16
|
+
fetchCameraSettings(options?: THttpRequestOptions): Promise<any>;
|
|
17
|
+
setCameraSettings(settingsJsonString: string, options?: THttpRequestOptions): Promise<TResponse>;
|
|
18
|
+
fetchServerSettings(options?: THttpRequestOptions): Promise<any>;
|
|
19
|
+
exportAppSettings(dataType: TExportDataType, options?: THttpRequestOptions): Promise<TBlobResponse<Client>>;
|
|
20
|
+
importAppSettings(dataType: TImportDataType, formData: Parameters<Client['post']>[0]['data'], options?: THttpRequestOptions): Promise<TResponse>;
|
|
21
|
+
fetchFlightInfo(icao: ICAO, options?: THttpRequestOptions): Promise<any>;
|
|
22
|
+
getTrackingMode(options?: THttpRequestOptions): Promise<any>;
|
|
23
|
+
setTrackingMode(modeJsonString: string, options?: THttpRequestOptions): Promise<TResponse>;
|
|
24
|
+
startTrackingPlane(icao: ICAO, options?: THttpRequestOptions): Promise<TResponse>;
|
|
25
|
+
stopTrackingPlane(options?: THttpRequestOptions): Promise<TResponse>;
|
|
26
|
+
getPriorityList(options?: THttpRequestOptions): Promise<any>;
|
|
27
|
+
setPriorityList(priorityListJsonString: string, options?: THttpRequestOptions): Promise<TResponse>;
|
|
28
|
+
getWhiteList(options?: THttpRequestOptions): Promise<any>;
|
|
29
|
+
setWhiteList(whiteListJsonString: string, options?: THttpRequestOptions): Promise<TResponse>;
|
|
30
|
+
getBlackList(options?: THttpRequestOptions): Promise<any>;
|
|
31
|
+
setBlackList(blackListJsonString: string, options?: THttpRequestOptions): Promise<TResponse>;
|
|
32
|
+
fetchMapInfo(options?: THttpRequestOptions): Promise<any>;
|
|
33
|
+
getZones(options?: THttpRequestOptions): Promise<any>;
|
|
34
|
+
setZones(zonesJsonString: string, options?: THttpRequestOptions): Promise<TResponse>;
|
|
35
|
+
goToCoordinates(lat: number, lon: number, alt?: number, options?: THttpRequestOptions): Promise<TResponse>;
|
|
36
|
+
checkGenetecConnection(params: TParameters, options?: THttpRequestOptions): Promise<TResponse>;
|
|
37
|
+
getGenetecCameraList(params: TParameters, options?: THttpRequestOptions): Promise<any>;
|
|
38
|
+
private _getJson;
|
|
39
|
+
private _getBlob;
|
|
40
|
+
private parseBlobResponse;
|
|
41
|
+
private _postJsonEncoded;
|
|
42
|
+
private _postUrlEncoded;
|
|
43
|
+
}
|
|
@@ -2,13 +2,17 @@ import { IClient, TParameters, TResponse } from './internal/types';
|
|
|
2
2
|
import { TAudioSampleRates, TSDCardInfo, TPtzOverview, TCameraPTZItem, TCameraPTZItemData, TAudioDevice, TPortSetSchema, TPortSequenceStateSchema } from './types/VapixAPI';
|
|
3
3
|
import { ProxyClient } from './internal/ProxyClient';
|
|
4
4
|
import { TCameraImageConfig, THttpRequestOptions, TProxyParams } from './types/common';
|
|
5
|
-
export declare class VapixAPI<Client extends IClient<TResponse
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
export declare class VapixAPI<Client extends IClient<TResponse, any>> {
|
|
6
|
+
client: Client;
|
|
7
|
+
private CustomFormData;
|
|
8
|
+
constructor(client: Client, CustomFormData?: {
|
|
9
|
+
new (form?: HTMLFormElement | undefined, submitter?: HTMLElement | null | undefined): FormData;
|
|
10
|
+
prototype: FormData;
|
|
11
|
+
});
|
|
8
12
|
getClient(proxyParams?: TProxyParams): Client | ProxyClient<Client>;
|
|
9
13
|
postUrlEncoded(path: string, parameters?: TParameters, headers?: Record<string, string>, options?: THttpRequestOptions): Promise<TResponse>;
|
|
10
14
|
postJson(path: string, jsonData: Record<string, any>, headers?: Record<string, string>, options?: THttpRequestOptions): Promise<TResponse>;
|
|
11
|
-
getCameraImage(parameters: TCameraImageConfig, options?: THttpRequestOptions): Promise<
|
|
15
|
+
getCameraImage(parameters: TCameraImageConfig, options?: THttpRequestOptions): Promise<ReturnType<Client["get"]>>;
|
|
12
16
|
getEventDeclarations(options?: THttpRequestOptions): Promise<string>;
|
|
13
17
|
getSupportedAudioSampleRate(options?: THttpRequestOptions): Promise<TAudioSampleRates[]>;
|
|
14
18
|
performAutofocus(options?: THttpRequestOptions): Promise<void>;
|
|
@@ -35,7 +39,7 @@ export declare class VapixAPI<Client extends IClient<TResponse> = IClient<TRespo
|
|
|
35
39
|
getHeaders(options?: THttpRequestOptions): Promise<Record<string, string>>;
|
|
36
40
|
setHeaders(headers: Record<string, string>, options?: THttpRequestOptions): Promise<TResponse>;
|
|
37
41
|
getParameter(paramNames: string | string[], options?: THttpRequestOptions): Promise<Record<string, string>>;
|
|
38
|
-
setParameter(params: Record<string, string | number | boolean>, options?: THttpRequestOptions): Promise<
|
|
42
|
+
setParameter(params: Record<string, string | number | boolean>, options?: THttpRequestOptions): Promise<void>;
|
|
39
43
|
getGuardTourList(options?: THttpRequestOptions): Promise<{
|
|
40
44
|
name: string;
|
|
41
45
|
id: string;
|
|
@@ -51,7 +55,7 @@ export declare class VapixAPI<Client extends IClient<TResponse> = IClient<TRespo
|
|
|
51
55
|
randomEnabled?: unknown;
|
|
52
56
|
timeBetweenSequences?: unknown;
|
|
53
57
|
}[]>;
|
|
54
|
-
setGuardTourEnabled(guardTourID: string, enable: boolean, options?: THttpRequestOptions): Promise<
|
|
58
|
+
setGuardTourEnabled(guardTourID: string, enable: boolean, options?: THttpRequestOptions): Promise<void>;
|
|
55
59
|
getPTZPresetList(channel: number, options?: THttpRequestOptions): Promise<string[]>;
|
|
56
60
|
listPTZ(camera: number, options?: THttpRequestOptions): Promise<TCameraPTZItem[]>;
|
|
57
61
|
listPtzVideoSourceOverview(options?: THttpRequestOptions): Promise<TPtzOverview>;
|
|
@@ -73,7 +77,7 @@ export declare class VapixAPI<Client extends IClient<TResponse> = IClient<TRespo
|
|
|
73
77
|
startApplication(applicationID: string, options?: THttpRequestOptions): Promise<void>;
|
|
74
78
|
restartApplication(applicationID: string, options?: THttpRequestOptions): Promise<void>;
|
|
75
79
|
stopApplication(applicationID: string, options?: THttpRequestOptions): Promise<void>;
|
|
76
|
-
installApplication(data:
|
|
80
|
+
installApplication(data: Parameters<typeof FormData.prototype.append>[1], fileName: string, options?: THttpRequestOptions): Promise<void>;
|
|
77
81
|
private static parseParameters;
|
|
78
82
|
private static parseCameraPtzResponse;
|
|
79
83
|
private static parsePtz;
|
package/{cjs → types}/index.d.ts
RENAMED
|
@@ -2,6 +2,7 @@ export * from './internal/types';
|
|
|
2
2
|
export * from './internal/constants';
|
|
3
3
|
export * from './internal/utils';
|
|
4
4
|
export * from './internal/versionCompare';
|
|
5
|
+
export * from './internal/ProxyClient';
|
|
5
6
|
export * from './types/common';
|
|
6
7
|
export { CamSwitcherAPI } from './CamSwitcherAPI';
|
|
7
8
|
export { CamSwitcherEvents } from './CamSwitcherEvents';
|
|
@@ -15,9 +16,3 @@ export * from './types/CamSwitcherAPI';
|
|
|
15
16
|
export * from './types/VapixAPI';
|
|
16
17
|
export * from './types/CamOverlayAPI';
|
|
17
18
|
export * from './types/PlaneTrackerAPI';
|
|
18
|
-
export { Frame } from './CamOverlayPainter/Frame';
|
|
19
|
-
export { Painter } from './CamOverlayPainter/Painter';
|
|
20
|
-
export { ResourceManager } from './CamOverlayPainter/ResourceManager';
|
|
21
|
-
export * from './types/CamOverlayPainter';
|
|
22
|
-
export { CamOverlayDrawingAPI } from './CamOverlayDrawingAPI';
|
|
23
|
-
export * from './types/CamOverlayDrawingAPI';
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { IClient, TGetParams,
|
|
1
|
+
import { IClient, TGetParams, TResponse } from './types';
|
|
2
2
|
import { TProxyParams } from '../types/common';
|
|
3
|
-
export declare class ProxyClient<Client extends IClient<TResponse
|
|
3
|
+
export declare class ProxyClient<Client extends IClient<TResponse, any>> {
|
|
4
4
|
private client;
|
|
5
5
|
private proxyParams;
|
|
6
6
|
constructor(client: Client, proxyParams: TProxyParams);
|
|
7
|
-
get
|
|
8
|
-
post
|
|
7
|
+
get(params: TGetParams): ReturnType<Client["get"]>;
|
|
8
|
+
post(params: Parameters<Client['post']>[0]): ReturnType<Client["post"]>;
|
|
9
9
|
private getReal;
|
|
10
10
|
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { IWebsocket } from './types';
|
|
2
|
+
type TEventType<T extends {
|
|
3
|
+
type: string;
|
|
4
|
+
}> = T extends {
|
|
5
|
+
type: infer Type;
|
|
6
|
+
} ? Type : never;
|
|
7
|
+
type TEvent<T extends {
|
|
8
|
+
type: string;
|
|
9
|
+
}, Type extends TEventType<T>> = T extends {
|
|
10
|
+
type: Type;
|
|
11
|
+
} ? T : never;
|
|
12
|
+
type TZodSchema<T extends {
|
|
13
|
+
type: string;
|
|
14
|
+
}> = {
|
|
15
|
+
parse: (data: string) => {
|
|
16
|
+
type: 'init';
|
|
17
|
+
data: TEvent<T, TEventType<T>>;
|
|
18
|
+
} | TEvent<T, TEventType<T>>;
|
|
19
|
+
};
|
|
20
|
+
type TListenerFunction<T extends {
|
|
21
|
+
type: string;
|
|
22
|
+
}, Type extends TEventType<T>> = (data: TEvent<T, Type>, isInit: boolean) => void;
|
|
23
|
+
export declare class WsEvents<T extends {
|
|
24
|
+
type: string;
|
|
25
|
+
}, Event extends {
|
|
26
|
+
data: string;
|
|
27
|
+
}> {
|
|
28
|
+
private zodSchema;
|
|
29
|
+
ws: IWebsocket<Event>;
|
|
30
|
+
private _isDestroyed;
|
|
31
|
+
private listeners;
|
|
32
|
+
constructor(zodSchema: TZodSchema<T>, ws: IWebsocket<Event>);
|
|
33
|
+
get isDestroyed(): boolean;
|
|
34
|
+
resendInitData(): void;
|
|
35
|
+
addListener<Type extends TEventType<T>>(type: Type, listener: TListenerFunction<T, Type>, id: string): void;
|
|
36
|
+
removeListener<Type extends TEventType<T>>(type: Type, id: string): void;
|
|
37
|
+
private onMessage;
|
|
38
|
+
private processMessage;
|
|
39
|
+
destroy(): void;
|
|
40
|
+
}
|
|
41
|
+
export {};
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
/// <reference types="node" />
|
|
3
|
-
import { Response as UndiciResponse } from 'undici';
|
|
4
1
|
export type Options = {
|
|
5
2
|
ip?: string;
|
|
6
3
|
port?: number;
|
|
@@ -14,25 +11,31 @@ export type HttpOptions = Options & {
|
|
|
14
11
|
};
|
|
15
12
|
export type WsOptions = Options;
|
|
16
13
|
export type TParameters = Record<string, string | number | boolean | null | undefined>;
|
|
17
|
-
export type TResponse =
|
|
14
|
+
export type TResponse = {
|
|
15
|
+
json: () => Promise<any>;
|
|
16
|
+
text: () => Promise<string>;
|
|
17
|
+
blob: () => Promise<unknown>;
|
|
18
|
+
status: number;
|
|
19
|
+
ok: boolean;
|
|
20
|
+
};
|
|
18
21
|
export type TGetParams = {
|
|
19
22
|
path: string;
|
|
20
23
|
parameters?: TParameters;
|
|
21
24
|
headers?: Record<string, string>;
|
|
22
25
|
timeout?: number;
|
|
23
26
|
};
|
|
24
|
-
export type TPostParams = {
|
|
27
|
+
export type TPostParams<Data> = {
|
|
25
28
|
path: string;
|
|
26
|
-
data: string |
|
|
29
|
+
data: string | Data;
|
|
27
30
|
parameters?: TParameters;
|
|
28
31
|
headers?: Record<string, string>;
|
|
29
32
|
timeout?: number;
|
|
30
33
|
};
|
|
31
|
-
export interface IClient<TRes extends TResponse> {
|
|
34
|
+
export interface IClient<TRes extends TResponse, Data> {
|
|
32
35
|
get: (params: TGetParams) => Promise<TRes>;
|
|
33
|
-
post: (params: TPostParams) => Promise<TRes>;
|
|
36
|
+
post: (params: TPostParams<Data>) => Promise<TRes>;
|
|
34
37
|
}
|
|
35
|
-
export type TBlobResponse<Client extends IClient<TResponse>> = Awaited<ReturnType<Awaited<ReturnType<Client['get']>>['blob']>>;
|
|
38
|
+
export type TBlobResponse<Client extends IClient<TResponse, any>> = Awaited<ReturnType<Awaited<ReturnType<Client['get']>>['blob']>>;
|
|
36
39
|
export interface IWebsocket<Event extends {
|
|
37
40
|
readonly data: string;
|
|
38
41
|
}> {
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
/// <reference types="node" />
|
|
1
3
|
import { IClient, HttpOptions, TGetParams, TPostParams } from '../internal/types';
|
|
2
|
-
import { Response as UndiciResponse } from 'undici';
|
|
3
|
-
export declare class DefaultClient implements IClient<UndiciResponse> {
|
|
4
|
+
import { FormData as UndiciFormData, Response as UndiciResponse } from 'undici';
|
|
5
|
+
export declare class DefaultClient implements IClient<UndiciResponse, UndiciFormData | Buffer> {
|
|
4
6
|
private tls;
|
|
5
7
|
private ip;
|
|
6
8
|
private port;
|
|
@@ -8,7 +10,7 @@ export declare class DefaultClient implements IClient<UndiciResponse> {
|
|
|
8
10
|
private pass;
|
|
9
11
|
private httpRequestSender;
|
|
10
12
|
constructor(opt?: HttpOptions);
|
|
11
|
-
get
|
|
12
|
-
post
|
|
13
|
+
get(params: TGetParams): Promise<UndiciResponse>;
|
|
14
|
+
post(params: TPostParams<UndiciFormData | Buffer>): Promise<UndiciResponse>;
|
|
13
15
|
private getBaseConnectionParams;
|
|
14
16
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { HttpOptions } from '
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { DefaultClient } from '../
|
|
1
|
+
import { HttpOptions } from '../../internal/types';
|
|
2
|
+
import { ProxyClient } from '../../internal/ProxyClient';
|
|
3
|
+
import { THttpRequestOptions, TProxyParams } from '../../types/common';
|
|
4
|
+
import { DefaultClient } from '../DefaultClient';
|
|
5
5
|
export declare class AxisCameraStationEvents {
|
|
6
6
|
private sourceKey;
|
|
7
7
|
private client;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export * from './DefaultClient';
|
|
2
2
|
export * from './WsClient';
|
|
3
3
|
export * from './HttpServer';
|
|
4
|
-
export * from '
|
|
5
|
-
export * from '
|
|
4
|
+
export * from './events/AxisCameraStationEvents';
|
|
5
|
+
export * from './events/GenetecAgent';
|